// Innitiate Main Menu
$(document).ready(function() { 
	$('ul#menu').superfish(); 
}); 

//Homepage boxes
function equalHeight(group) {
	tallest = 0;
	group.each(function() {
		thisHeight = $(this).height();
		if(thisHeight > tallest) {
			tallest = thisHeight;
		}
	});
	group.height(tallest);
}
$(document).ready(function() {
	equalHeight($(".equalize"));
	equalHeight($(".equalize2"));
});


//News Scroller (Widget)
$(document).ready(function() {
 
 	$('.news-scroller').cycle({ 
	    fx: 'scrollVert',
		speed: 1000,
		rev: true,
		timeout: 7000,
		next: '.news-next', 
	    prev: '.news-previous'
	 });      
 
});


// Social Drop Down Panel 
$(document).ready(function() {
	$(".btn-slide").click( function() {
		if ($("#openCloseIdentifier").is(":hidden")) {
			$("#social").animate( {top: "0"} , 650 );
			$(this).addClass("active");
			$("#openCloseIdentifier").show();
		} else {
			$("#social").animate( {top: "-46px"} , 650 );
			$(this).removeClass("active");
			$("#openCloseIdentifier").hide();
		}
	});  
});


//Innititate Pretty Photo
// $(document).ready(function(){
	// $("a[rel^='lightbox']").prettyPhoto({theme:'light_rounded'});
// });

//Cufon text
//Cufon.replace('h2, h3');
Cufon.replace('#headerinfo h3, #content .title');

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

