$(function() {

	// Sifr
	$('div#content h1').sifr({ strSWF: 'flash/mrs-eaves.swf', strColor: '#345909', strWmode: 'transparent', strCase: 'upper' },{ expressInstall: true });
	
	//Events Calendar Page
	$('div.event-description').hide();
	
	$('div.event-description').hide();
	$(".event-content a.show-details").toggle(function() {
		$(this).parents(".event-content").find("div.event-description").animate({
			height: 'show'
			/*opacity: 'show'*/
		}, 'slow');
		// Changes the Text of the Control
		$(this).html("Hide Details");
	}, function() {
		$(this).parents(".event-content").find("div.event-description").animate({
			height: 'hide'
			/*opacity: 'hide'*/
		}, 'slow');
		// Changes the Text of the Control
		$(this).html("View Details");
	});

	$('#south-course-tour').flash({
	    src:'flash/coursemap-maui-south.swf',
	    width:720,
	    height:450,
	    wmode:'transparent',
	    quality:'high'
	},
	{version:'8'});

	$('#north-course-tour').flash({
	    src:'flash/coursemap-maui-north.swf',
	    width:720,
	    height:450,
	    wmode:'transparent',
	    quality:'high'
	},
	{version:'8'});

	// Flash photo gallery :
	
	$('#flash-photo-gallery').flash(
		{src:"flash/photo_gallery.swf",
		 width:466,
		 height:415,
		 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));
		}
	);

	$('#golf-tours-ul li a').click(function() {
	    var popup = window.open($(this).attr('href'), '', 'width=720,height=453');
	    if (popup) { popup.focus(); }
	    return false;
	});


// 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#home-masthead").flash(
		{src:"flash/masthead-home.swf",
		 width:960,
		 height:391,
		 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); }
		);
	});

};   
