//FLIR.init( new FLIRStyle( { realFontHeight: true, mode: 'static' } ) );
//$("#level2 a,#level1 a, #headline h1, #infobox h3, #content h2").each( function() { FLIR.replace(this); } );




$(document).ready(function(){

    $('.slideshow a').wrap('<li/>');
    $('.slideshow .csc-textpic').addClass('box_skitter').wrapInner('<ul/>');
    $('.slideshow .csc-textpic').skitter({
        animation: 'randomSmart',
        numbers: false,
        navigation: false,
        label: false
    });
    
    
    $('.jqfancybox, .slideshow a').fancybox({
	overlayColor		:	'#000000',
	overlayOpacity		:	0.3,
	transitionIn		:	'elastic',	// 'elastic', 'fade' or 'none'
	transitionOut		:	'elastic',	// 'elastic', 'fade' or 'none'
	speedOut		:	300,
	changeSpeed		:	300,
	changeFade		:	'fast',
	easingIn		:	'swing',
	easingOut		:	'swing'
    });
    

    Cufon.replace("#headline h1, #infobox h3, #content h2",{

	});
    Cufon.replace("#level2 a,#level1 a",{
	hover: true
    });

    $("#content").css({
	overflow: "hidden"
    });

    $("#level1 a").css("margin-top","-80px");
    $("#level2 a").css("margin-top","-25px");

    $("#level1 li.inactive, #level2 li.inactive").css("background-image","none");

    $("#level1 a, #level2 a").before('<div class="nav_animation_color"></div>');
    $("#level1 a, #level2 a").before('<div class="nav_animation_hover"><a></a></div>');

    //$(".nav_animation_color").animate( { opacity: 0 }, 0 );
    $(".nav_animation_color").css({
	opacity: 0
    });

    $(".nav_animation_hover").each(function(){
	var str = $(this).parent().children("a").attr("href");
	$(this).children("a").attr("href",str);
	$(this).children("a").css("text-decoration","none");
		
    //	var temp = $(this).parent().find("img");
    //	$(this).parent().children("a").replaceWith(temp);
    });

    $(".nav_animation_hover").mouseover(function(){
	$(this).prev().stop().animate({
	    opacity: 1
	}, 300 );
    }).mouseout(function(){
	$(this).prev().stop().animate({
	    opacity: 0
	}, 300 );
    });
});

