$(document).ready(function(){

	/* ----- NAV ----- */
		
		$("#nav-inner li:has(ul)").find("ul").addClass("sub-nav-list");
		$("#nav-inner li:has(ul)").find("li").addClass("sub-nav-item").css("opacity", 0.95);
		
		$("#nav-inner li:has(ul)").find("li:first").addClass("first");			

		$('#nav-inner li:last-child').addClass("last");
				
		$("#nav-inner li").hover(function() {
			$(this).addClass("hover");
			$('ul:first',this).show();
		}, function() {
			$(this).removeClass("hover");
			$('ul:first',this).hide();		
		});

		$("#nav-inner li:has(ul) li").hover(function(){
			$(this).fadeTo("fast", 1.0); // This sets the opacity to 100% on hover
		},function(){
	   		$(this).fadeTo("fast", 0.95); // This sets the opacity back to 95% on mouseout
		});

	/* ----- HOMEPAGE ----- */

	$("#homepage-video img:first").fadeTo("slow", 0.85);

	$("#homepage-video img:first").hover(function(){
		$(this).fadeTo("slow", 1.0); // This sets the opacity to 100% on hover
	},function(){
   		$(this).fadeTo("slow", 0.85); // This sets the opacity back to 85% on mouseout
	});

	/* ----- jQuery PrettyPhoto ----- */

		$("a[rel^='lightbox']").prettyPhoto({
			animationSpeed: 'normal', /* fast/slow/normal */
			opacity: 0.80, /* Value between 0 and 1 */
			showTitle: false, /* true/false */
			allowresize: false, /* true/false */
			default_width: 800,
			default_height: 600,
			theme: 'light_rounded' /* light_rounded / dark_rounded / light_square / dark_square / facebook */
		});
		
	/* ----- CUFON ----- */

	Cufon.replace('h1', { fontFace: 'CaeciliaBold' });
	Cufon.replace('h2', { fontFace: 'CaeciliaBold', hover: true });
	Cufon.replace('#footer h3', { fontFace: 'CaeciliaBold'});
	Cufon.replace('#footer address strong', { fontFace: 'CaeciliaBold'});		
});
