$(function() {
	$("div#dhr-logo").flash(
		{src:"http://www.destinationhotels.com/flash/branding/flash_logoDhr.swf?link=hamiltonparkhotel",
		 width:250,
		 height:25,
		 wmode:"transparent",
		 allowScriptAccess:"always",
		 quality:"high"},
		 {version:"7"});

	$("body#home div#rightHeader").flash(
		{src:"flash/homepage.swf",
		 width:523,
		 height:289,
		 wmode:"transparent",
		 quality:"high"},
		 {version:"7"});

	$("div#photo-gallery").flash(
		{src:"flash/photo_gallery.swf",
		 width:499,
		 height:329,
		 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_resort.xml";
				htmlOptions.flashvars.xmlFile = "flash/xml/images_album_resort.xml";
				$(this).html($.fn.flash.transform(htmlOptions));
		});
	$("div#events-gallery").flash(
		{src:"flash/photo_gallery.swf",
		 width:499,
		 height:329,
		 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_wedding.xml";
				htmlOptions.flashvars.xmlFile = "flash/xml/images_album_wedding.xml";
				$(this).html($.fn.flash.transform(htmlOptions));
		});
	
	$("a#secondary-meetingspace").click(function(){window.open(this.href,'meetingspace','width=830,height=802,scrollbars=yes,resizable=yes');return false;});
	$("a#home-meetingspace").click(function(){window.open(this.href,'meetingspace','width=830,height=802,scrollbars=yes,resizable=yes');return false;});
	$("div#meeting-space").flash(
		{src:"flash/interactive-map.swf",
		 width:810,
		 height:791,	
		 wmode:"transparent",
		 quality:"high"},
		 {version:"8"}
	);
	
	$('a#add-promo').toggle(function() {
		$('div#code-box').show();
		$(this).addClass('check-long');
		return false; 
		}, function() { 
			$('div#code-box').hide();
			$(this).removeClass('check-long'); 
			return false; 
		});
	
	
	$("div#cortney-gallery").flash(
		{src:"flash/piccolo-wedding-video.swf",
		 width:480,
		 height:400,
		 wmode:"transparent",
		 quality:"high"},
		 {version:"7"});
	
	$("div#kristen-gallery").flash(
		{src:"flash/kristen-lenny-wedding-video.swf",
		 width:480,
		 height:340,
		 wmode:"transparent",
		 quality:"high"},
		 {version:"7"});

/*--------------- Special Packages ------------------*/
$('.package').packagePreview();

/*---------------Calendar of Events ------------------*/
$(".vcalendar").eventPreview();

/*---------------Share Panel ------------------*/
$('.share-link').initializeSharing();
	
// 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); }
		);
	});

};   
