$(function() {
	//Home page flash
	$("body.home div#masthead").flash(
	{src:"/flash/home-masthead.swf",
	 width:884,
	 height:252,
	 wmode:"transparent",
	 quality:"high"},
	 {version:"8"},
		function(htmlOptions) { //Use this to specify a query string, take out if not needed.
			//htmlOptions.flashvars.epostConfigXML = "/flash/xml/epostConfig.xml";
			htmlOptions.flashvars.imagesXML = "/flash/xml/mastheadImages.xml";
			//htmlOptions.flashvars.langXML="/flash/xml/i18n/"+LANG+"_formLabels.xml";
			//htmlOptions.flashvars.browser = BROWSER;  //Used for SSP Postcard feature, comment out if not needed.
			//$(this).html($.fn.flash.transform(htmlOptions));

		this.innerHTML = '<div class="alt">'+this.innerHTML+'</div>';
		jQuery(this)
			.addClass('flash-replaced')
			.prepend($.fn.flash.transform(htmlOptions));

	});
	//Email form
	$("div#email-form").flash(
	{src:"/flash/email-form.swf",
	 width:234,
	 height:227,
	 wmode:"transparent",
	 quality:"high"},
	 {version:"8"});

	//Slideshow Photo Gallery
	$("div#photo-gallery").flash(
	{src:"/flash/tampa-slideshow.swf",
	 width:573,
	 height:381,
	 wmode:"transparent",
	 quality:"high"},
	 {version:"8"},
		function(htmlOptions) { //Use this to specify a query string, take out if not needed.
			//htmlOptions.flashvars.epostConfigXML = "/flash/xml/epostConfig.xml";
			htmlOptions.flashvars.imagesXML = "/flash/xml/images.xml";
			//htmlOptions.flashvars.langXML="/flash/xml/i18n/"+LANG+"_formLabels.xml";
			//htmlOptions.flashvars.browser = BROWSER;  //Used for SSP Postcard feature, comment out if not needed.
			$(this).html($.fn.flash.transform(htmlOptions));
	});
	//DHR Footer logo
	$("div#dhr-logo").flash( {src:"http://www.destinationhotels.com/flash/branding/flash_logoDhr-white.swf?link=intercontampa", width:250, height:25, wmode:"transparent", quality:"high", allowscriptaccess:"always"}, {version:"7"});
	
	//Hotel video:
	$("div#downtown-tampa-video").flash(
	{src:"/videos/downtown-tampa-hotels.swf",
	 width:549,
	 height:415,
	 wmode:"transparent",
	 quality:"high"},
	 {version:"8"}
	);

	//Documentation located in special.docs.js
	$('div#content h1').sifr(
		{ strSWF: '/fonts/trajan-pro-bold.swf', strColor: '#241d0e', strWmode: 'transparent', intPadding: [0, 0, 0, 0], strCase: 'upper' },
		{ expressInstall: true }
	);
	$('div.push h3').sifr(
		{ strSWF: '/fonts/trajan-pro-bold.swf', strColor: '#1d387b', strWmode: 'transparent', intPadding: [0, 0, 0, 0], strFlashVars: 'textalign=center&',  strCase: 'upper' },
		{ expressInstall: true }
	);
	
		//Rotating Push Marketing
	$('#mycarousel').each(function() { $(this).jcarousel({
		scroll: 1, wrap: 'last', buttonNextHTML: '<div><img src="/images/homepage/btn-blue-more-features.gif" alt="Next Feature" /></div>', buttonPrevHTML: '<div><img src="/images/homepage/btn-blue-more-features.gif" alt="Next Feature" /></div>'
		});
	});

	//MMSN Map
	var openFn=function(hash){
		hash.w.show();
		var leftPos = ($(window).width()-$('#map-container').width())/2;
		var topPos = Math.max($(window).scrollTop(),parseInt($('#map-container').css('top')));
		$('#map-container').css({left:leftPos,top:topPos});
		$('#map').msnMap({listView:true, hotelOnly: true});
	};
	var hideFn=function(hash){
		hash.w.hide()
		hash.o.remove();
		$('.places').remove();
		$('#map-container').css({top:0});
	};
	$('#map-container').jqm({trigger:'#btn-msnmap', onShow: openFn, onHide: hideFn});

});
