// <![CDATA[

//////////////////////////////////////////////////////
// ADDTHIS
//////////////////////////////////////////////////////

var addthis_config = {
	ui_header_color:'#FFFFFF',
	ui_header_background:'#CC0000'
}

//////////////////////////////////////////////////////
// NAV MAIN (IE FIX)
//////////////////////////////////////////////////////

$(document).ready(function(){
	$("ul#nav_main li").hover(
		function() {
		$(this).addClass("iehover");
		},
		function() {
		$(this).removeClass("iehover");
		}
	);
});

//////////////////////////////////////////////////////
// TOOLTIP
//////////////////////////////////////////////////////

$(document).ready(function(){
	$('.tooltip').tooltip({
		track: true,
		delay: 0,
		showURL: false,
		showBody: " - ",
		opacity: 0.80,
		fade: 250
	});
});

//////////////////////////////////////////////////////
// INDEX IMAGES
//////////////////////////////////////////////////////

$(document).ready(function () {
	$('.imageShow li a span').hide();
	$(".imageShow li a").mouseover(function() {
		$(this).find("span").show();
	}).mouseout(function(){
		$(this).find("span").hide();
	});
});

//////////////////////////////////////////////////////
// LIGHTBOX (FANCYBOX)
//////////////////////////////////////////////////////

$(document).ready(function() {
	$('.lightbox').fancybox({
	'margin' : '0',
	'padding' : '5',
	'scrolling' : 'no',
	'overlayColor' : '#000000',
	'overlayOpacity' : 0.7,
	'titlePosition' : 'inside',
	'titleFormat' : formatTitle
	});
	function formatTitle(title, currentArray, currentIndex, currentOpts) {
		return '<div id="special-lightbox-title"><span class="left">' + (title && title.length ? '<b>' + title + '</b>' : '' ) + '</span><span class="right">Bild ' + (currentIndex + 1) + ' von ' + currentArray.length + '</span><br class="cb" /></div>';
	}
});

//////////////////////////////////////////////////////
// A FOCUS BLUR FIX
//////////////////////////////////////////////////////

onload = function() {
	a_tags=document.getElementsByTagName('a')
	for (i=0;i<a_tags.length;i++) {
		a_tags[i].onfocus=blur_links
	}
}
function blur_links() {
	this.blur()
}

// ]]>
