$(function() {
// 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:
	*/

	$("body.home div#masthead").flash(
		{src:"flash/masthead-home.swf",
		 width:958,
		 height:306,
		 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));
		}*/);

	$('div#photo-gallery').flash(
	{src:'flash/photo-gallery.swf',
	width:650,
	height:440,
	wmode:'transparent',
	quality:'high'},
	{version:'8'}
	);

	$("div#logo-dhr").flash(
		{src:"http://www.destinationhotels.com/flash/branding/flash_logoDhr.swf?link=rizzoconferencecenter",
		 width:250,
		 height:25,
		 wmode:"transparent",
		 allowScriptAccess:"always",
		 quality:"high"},
		 {version:"7"});


// Sample sifr usage - remove if not needed
	// intPadding array order is: left, top, right, bottom - must match css for corresponding element
	$('div#content h1').sifr(
		{ strSWF: 'flash/sifr/granjon.swf', strColor: '#5a5b5c', strLinkColor: '#5a5b5c', strHoverColor: '#5a5b5c', strWmode: 'transparent', intPadding: [35, 0, 0, 0], strFlashVars: ''},
		{ expressInstall: true }
	);


	$('ul#nav-primary li ul').each(function() {
	    $(this).addClass('gone');
	});

// Adds hover class for IE and animation for drop down nav - remove if not needed
	$("ul#nav-primary li").hover(
	    function(){ 
		$("ul", this).removeClass('gone');
	    }, 
	    function() {
		$("ul", this).addClass('gone');
	    } 
	);

	if (document.all && !window.opera) {
        $("ul#nav-primary li").hoverClass("over");
		//$("ul#nav-primary li ul li").hoverClass("over");
	}


	// Virtual Tours
	$("div#classroom-tour").flash({src:"flash/virtual-tours/Classroom109_650x440.swf", width:650, height:440, wmode:"transparent", allowScriptAccess:"always", quality:"high"},{version:"7"});
	$("div#dubose-tour").flash({src:"flash/virtual-tours/DuBose_650x440.swf", width:650, height:440, wmode:"transparent", allowScriptAccess:"always", quality:"high"},{version:"7"});
	$("div#duboseinterior-tour").flash({src:"flash/virtual-tours/DuboseInterior_650x440.swf", width:650, height:440, wmode:"transparent", allowScriptAccess:"always", quality:"high"},{version:"7"});
	$("div#garden-tour").flash({src:"flash/virtual-tours/Garden_650x440.swf", width:650, height:440, wmode:"transparent", allowScriptAccess:"always", quality:"high"},{version:"7"});
	$("div#guestroom-tour").flash({src:"flash/virtual-tours/GuestRoom_650x440.swf", width:650, height:440, wmode:"transparent", allowScriptAccess:"always", quality:"high"},{version:"7"});
	$("div#banquet-tour").flash({src:"flash/virtual-tours/Magnolia_banquet_650x440.swf", width:650, height:440, wmode:"transparent", allowScriptAccess:"always", quality:"high"},{version:"7"});
	$("div#magclass-tour").flash({src:"flash/virtual-tours/Magnolia_classroom_650x440.swf", width:650, height:440, wmode:"transparent", allowScriptAccess:"always", quality:"high"},{version:"7"});
	$("div#seminar-tour").flash({src:"flash/virtual-tours/Seminar145_650x440.swf", width:650, height:440, wmode:"transparent", allowScriptAccess:"always", quality:"high"},{version:"7"});
	$("div#sports-tour").flash({src:"flash/virtual-tours/SportsBar_650x440.swf", width:650, height:440, wmode:"transparent", allowScriptAccess:"always", quality:"high"},{version:"7"});
	$("div#workout-tour").flash({src:"flash/virtual-tours/WorkoutRoom_650x440.swf", width:650, height:440, wmode:"transparent", allowScriptAccess:"always", quality:"high"},{version:"7"});

//Reservation center:
	$('div#code-box').hide();
	$('a#promo-link').toggle(function() {
		$('div#code-box').slideDown();
		$(this).css('background-position', 'right bottom').parents('div#check-availability').addClass('check-long');
		return false; 
	}, function() { 
		$('div#code-box').slideUp();
		$(this).css('background-position', 'right 0').parents('div#check-availability').removeClass('check-long'); 
		return false; 
	});


});


// 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); }
		);
	});

};   
