$(document).ready(function(){
	
	$('.hide').hide();
	
	//Hover State for Main Nav
	$("#main_nav ul li").not('.active').mouseenter(function() {
		var pos = $(this).position(); 
		var hover_width = $(".hover_state").width();
		var li_width = $(this).width();
		var width = hover_width/2 - li_width/2;
		$(".hover_state").css( { "left": (pos.left + 28 - width) + "px", "top":pos.top + "px" } );
		$(".hover_state").show();
	});
	
	$("#main_nav ul li").mouseleave(function() {
		$(".hover_state").hide();
	});
		
	//Fix black outline on carousel fade in IE
	//$('#carousel').pngFix();
		
	/*
// Carousels
	$('#carousel').cycle({ 
	    fx: 'fade',
	    timeout:  5000,
		prev:    '#prev',
        next:    '#next',
        pager:  '.carousel_nav',
		cleartype:  true,
	    cleartypeNoBg:  true
	});
*/
	
	$('#latest_news, #upcoming_events').jcarousel({
    	'scroll': 3,
    	'vertical': true
    });
	
	// Fancybox
	$("a.enlarge").fancybox();
	
	// Contact Links Hover
	$('a.contact_link').hover(function(){
		$(this).find('div.arrow_btn').toggleClass('arrow_btn_hover');
	});
	
	// Enticers Hover for IE6
	$('div.ent1').hover(function(){
		$(this).toggleClass('ent1_hover');
	});
	
	$('div.ent2').hover(function(){
		$(this).toggleClass('ent2_hover');
	});	
	
	$('div.ent3').hover(function(){
		$(this).toggleClass('ent3_hover');
	});
	
	$('div.ent4').hover(function(){
		$(this).toggleClass('ent4_hover');
	});	
	
	//Second Nav fix for IE6
	$('li.first.last').addClass('first_last');	
	
});

