function primary_navigation_dropdown(){
$(".nav ul ul").css({display: "none"}); // Opera Fix
	$(".nav>ul>li").hover(function()
	{
		$(this).addClass('hover');
		$(this).find('ul:first').css({visibility: "visible"}).slideDown(200);
	},function(){
		$(this).removeClass('hover');
		$(this).find('ul:first').css({visibility: "hidden"}).slideUp(200);
	});
}


$(document).ready(function() {

primary_navigation_dropdown();

$("#news").css("overflow", "hidden");

	$("#news ul").not('#news ul#nav_news').cycle({
		fx: 'fade',
		pause: 1,
		prev: '#prev',
		next: '#next',
		speed: 200,
		timeout: 7000
	});

	$(".bg_logo ul").cycle({
		fx: 'fade',
		speed: 1200,
		timeout: 7000
	});

});


$(document).ready(function(){


	/*
	// BEGIN homepage slideshow
	$("#homepage_photo1_link").click(function () { 
		$("#homepage_photo1").fadeIn();
		$("#homepage_photo2").fadeOut();
		$("#homepage_photo3").fadeOut();
		$("#homepage_photo4").fadeOut();
		return false;
    });

	$("#homepage_photo2_link").click(function () { 
		$("#homepage_photo1").fadeOut();
		$("#homepage_photo2").fadeIn();
		$("#homepage_photo3").fadeOut();
		$("#homepage_photo4").fadeOut();
		return false;
    });

	$("#homepage_photo3_link").click(function () { 
		$("#homepage_photo1").fadeOut();
		$("#homepage_photo2").fadeOut();
		$("#homepage_photo3").fadeIn();
		$("#homepage_photo4").fadeOut();
		return false;
    });

	$("#homepage_photo4_link").click(function () { 
		$("#homepage_photo1").fadeOut();
		$("#homepage_photo2").fadeOut();
		$("#homepage_photo3").fadeOut();
		$("#homepage_photo4").fadeIn();
		return false;
    });
	// END homepage slideshow
	*/

	$('#homepage_photo ul')
	.before('<div id="home_slideshow_nav">')
	.cycle({ 
		fx: 'fade',
		speed: 750,
		timeout: 7500,
		pager: '#home_slideshow_nav'
	});

});
