// The Trigger
jQuery(document).ready(function(){
jQuery("ul.trigger").click(function(){
jQuery(this).toggleClass("active").next().slideToggle("slow");
});
});

jQuery(document).ready(function() { 
        $('ul.sf-menu').superfish({ 
            delay:       100,                            // one second delay on mouseout 
            animation:   {opacity:'show',height:'show'},  // fade-in and slide-down animation 
            speed:       'fast',                          // faster animation speed 
            autoArrows:  true,                           // disable generation of arrow mark-up 
            dropShadows: true                            // disable drop shadows 
        }); 
    }); 

jQuery(document).ready(function(){
$("a[rel^='prettyPhoto']").prettyPhoto({theme:'dark_rounded'});


		});

jQuery(document).ready(function(){
	$("a[rel^='prettyPhoto']").each(function() {	
		var $image = $(this).contents("img");
			$hoverclass = 'hover_video';

	if($(this).attr('href').match(/(jpg|gif|jpeg|png|tif)/)) 
	$hoverclass = 'hover_image';
		
	if ($image.length > 0)
	{	
		var $hoverbg = $("<span class='"+$hoverclass+"'></span>").appendTo($(this));
		
			$(this).bind('mouseenter', function(){
			$height = $image.height();
			$width = $image.width();
			$pos =  $image.position();		
			$hoverbg.css({height:$height, width:$width, top:$pos.top, left:$pos.left});
		});
	}

});	

$("a[rel^='prettyPhoto']").contents("img").hover(function() {
		$(this).stop().animate({"opacity": "0.2"}, 400); // hover fade
		},function() {
		$(this).stop().animate({"opacity": "1"},400);
	});
});

jQuery(document).ready(function(){
//Hide (Collapse) the toggle containers on load
	jQuery(".toggle_content").hide(); 

	//Switch the "Open" and "Close" state per click
	jQuery("h3.toggle").toggle(function(){
		jQuery(this).addClass("active");
		}, function () {
		jQuery(this).removeClass("active");
	});

	//Slide up and down on click
	jQuery("h3.toggle").click(function(){
		jQuery(this).next(".toggle_content").slideToggle();
	});
	});

jQuery(document).ready(function()
{
	// Hide all the tooltips
	jQuery("#jquery li").each(function() {
		jQuery("a strong", this).css("opacity", "0");
	});
	
	jQuery("#jquery li").hover(function() { // Mouse over
		jQuery(this)
			.stop().fadeTo(500, 1)
			.siblings().stop().fadeTo(500, 0.2);
			
		jQuery("a strong", this)
			.stop()
			.animate({
				opacity: 1,
				top: "-10px"
			}, 300);
		
	}, function() { // Mouse out
		jQuery(this)
			.stop().fadeTo(500, 1)
			.siblings().stop().fadeTo(500, 1);
			
		jQuery("a strong", this)
			.stop()
			.animate({
				opacity: 0,
				top: "-1px"
			}, 300);
	});
	
});

jQuery(document).ready(function()
{
	// Hide all the tooltips
	jQuery("#toggle li").each(function() {
		jQuery("a strong", this).css("opacity", "0");
	});
	
	jQuery("#toggle li").hover(function() { // Mouse over
		jQuery(this)
			.stop().fadeTo(500, 1)
			.siblings().stop().fadeTo(500, 0.2);
			
		jQuery("a strong", this)
			.stop()
			.animate({
				opacity: 1,
				top: "-10px"
			}, 300);
		
	}, function() { // Mouse out
		jQuery(this)
			.stop().fadeTo(500, 1)
			.siblings().stop().fadeTo(500, 1);
			
		jQuery("a strong", this)
			.stop()
			.animate({
				opacity: 0,
				top: "-1px"
			}, 300);
	});
	
});

jQuery(document).ready(function(){
						   
	jQuery("div#content.g640 ul.display li").click(function(){
    	window.location=$(this).find("a.expand").attr("href");return false;
	});

}); //close doc ready



	// box-light hover effect
        jQuery(document).ready(function($){
                $("div#content.g640 ul.display li").hover(function() {				
                $(this).stop().animate({ backgroundColor: "#f1f1f1" }, 400);
        },function() {
                 $(this).stop().animate({ backgroundColor: "#fff" }, 500);
        });
  });
