$(document).ready(function(){
//To switch directions up/down and left/right just place a "-" in front of the top/left attribute
//Vertical Sliding
//Caption Sliding (Partially Hidden to Visible)


$("#nav_bottom", this).css("bottom","-85px");
$(".csc-textpic-imagerow", this).css("width","930px");
//$('#nav_bottom').hide().slideDown('slow');


//$("img.csc-textpic").colorbox({width:"80%",height:"80%",iframe:true});

$(function() {
	var open = false;
	$('#nav_bottom').hover(function() {
		if(open === false) {
			$('#nav_bottom').animate({ bottom: '0px' });
			$(this).css('backgroundPosition', 'bottom left');
			open = true;
		} else {
			$('#nav_bottom').animate({ bottom: '-85px' });
			$(this).css('backgroundPosition', 'top left');
			open = false;
		}
	});
});




$(".cover", this).css("top","165px");

$('.boxgrid.caption').hover(function(){
$(".cover", this).stop().animate({top:'50px'},{queue:false,duration:160});
}, 
function() {
$(".cover", this).stop().animate({top:'165px'},{queue:false,duration:160});
});
});



/* Plugin to make variable height divs equal heights */
$.fn.sameHeights = function() {

$(this).each(function(){
var tallest = 0;

$(this).children().each(function(i){
if (tallest < $(this).height()) { tallest = $(this).height(); }
});
$(this).children().css({'height': tallest});
});
return this;
};

$(document).ready(function(){

 /* Make boxes same height */
 $('#inner_frame_home_lower').sameHeights();

});


$(document).ready(function(){

	//Hide (Collapse) the toggle containers on load
	$(".toggle_container").hide(); 

	//Switch the "Open" and "Close" state per click then slide up/down (depending on open/close state)
	$("h6.trigger").click(function(){
		$(this).toggleClass("active").next().slideToggle("fast");
		return false; //Prevent the browser jump to the link anchor
	});

});


