$(function() {
	//$(document).pngFix();
	$('div#title-wrapper h1').sifr(
		{ strSWF: '/fonts/mrs-eaves-allcaps.swf', strColor: '#5d86a0', strWmode: 'transparent', intPadding: [0, 37, 0, 0], strCase: 'upper' },
		{ expressInstall: true }
	);
	$('div#title-wrapper h2').sifr(
		{ strSWF: '/fonts/humanst521-bt-roman.swf', strColor: '#5d86a0', strWmode: 'transparent', strCase: 'lower' },
		{ expressInstall: true }
	);
	$('body.home h1').sifr(
		{ strSWF: '/fonts/mrs-eaves-allcaps.swf', strColor: '#5d87a1', strWmode: 'transparent', strCase: 'upper' },
		{ expressInstall: true }
	);
	$("body.home div#photo-bg").flash(
		{src:"flash/home.swf",
		 width:818,
		 height:544,
		 wmode:"transparent",
		 quality:"high"},
		 {version:"8"});
	$("body:not('.home') div#nav ul li.current div").css("width",0).animate({ 
		width: "150px"
	},1000);
	if (!$.browser.msie){
		$("body:not('.home') ul#lagunabeach li:not('.current') a").bind("mouseenter",
			function(){
				$(this).css("backgroundImage","inherit");
				$(this).fadeTo(500, 0);
			} 
		).bind("mouseleave",
			function(){
				$(this).fadeTo(0,100);
			} 
		);
	}
	
	$("body.home div#content-wrapper").flash(
		{src:"/flash/home.swf",
		 width:961,
		 height:622,
		 wmode:"transparent",
		 quality:"high"},
		 {version:"8", update:false});
	//$("body:not('.home') ul#lagunabeach li a").hover(function(){$(this).toggleClass("over");},function(){alert("foo");});


	$('#offerCycle').cycle({ 
    fx:     'fade', 
    speed:  'fast', 
    timeout: 0, 
    next:   '#next', 
    prev:   '#prev' 
});
	
	

// Sample usage of jquery.flash plugin - remove if not needed
	/*	If given the following markup:

	<div id="masthead">
		<img src="images/mastheads/flash-alt.jpg" alt="" /><br />
	</div>
	
	you would use the following to replace the alternate content:

	$("div#masthead").flash(
		{src:"flash/home.swf",
		 width:600,
		 height:300,
		 wmode:"transparent",
		 quality:"high"},
		 {version:"8"},
			function(htmlOptions) { //Use this to specify a query string, take out if not needed.
				htmlOptions.flashvars.configFile = "flash/xml/gallery_config.xml";
				htmlOptions.flashvars.xmlFile = "flash/xml/images.xml";
				$(this).html($.fn.flash.transform(htmlOptions));
		});
	*/


// Sample sifr usage - remove if not needed
	/*
	// intPadding array order is: left, top, right, bottom - must match css for corresponding element
	$('div#content h2').sifr(
		{ strSWF: 'flash/font-name.swf', strColor: '#cc0000', strLinkColor: '#cccc00', strHoverColor: '#cc00cc', strWmode: 'transparent', intPadding: [35, 0, 0, 0], strFlashVars: 'textalign=center&', strCase: 'upper' },
		{ expressInstall: true }
	);
	*/


// Adds hover class for IE and animation for drop down nav - remove if not needed
	/*
	$("ul#nav-primary li").hover(
        function(){ $("ul", this).fadeIn("fast"); }, 
        function() { } 
    );
    if (document.all) {
        $("ul#nav-primary li").hoverClass("over");
		$("ul#nav-primary li ul li").hoverClass("over");
    }
	*/
});


// Function to add/remove "over" class for drop down nav - remove if not needed
$.fn.hoverClass = function(c) {
	return this.each(function(){
		$(this).hover( 
			function() { $(this).addClass(c);  },
			function() { $(this).removeClass(c); }
		);
	});

};   
