$(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: */

	$("div#home-masthead").flash(
		{src:"flash/home.swf",
		 width:807,
		 height:305,
		 wmode:"transparent",
		 quality:"high"},
		 {version:"7"});
	
	$("div#dhr-flash").flash(
		{src:"http://www.destinationhotels.com/flash/branding/flash_logoDhr.swf?link=embassysuitesdcmetro",
		 width:250,
		 height:25,
		 wmode:"transparent",
		 allowScriptAccess:"always",
		 quality:"high"},
		 {version:"7"});
	
	$("div#photo-gallery").flash(
		{src:"flash/slideshow.swf",
		 width:400,
		 height:291,
		 wmode:"transparent",
		 quality:"high"},
		 {version:"7"});
		 
 
$('div#weekend-rates').hover(
	function() {$(this).attr('style','background-position:0px 30px;');},
	function() {$(this).attr('style','background-position:0px 0px;');}
);


//Clickheat tracking
    if(document.body.className === "home") {
	clickHeatPage = 'es-index';
	initClickHeat();
    }
    
    $('a.modal').each(function(i,o) {
	var image = $('<img/>')
		.attr('src', $(o).attr('href'));

	var wrap = $('<div/>')
		.addClass('jqmWindow')
		.append( image )
		.append( $('<a href="#">close</a>').addClass('close-btn') )
		.jqm();

	(function(o,wrap) {
	    $(o).click(function() {
		wrap.jqmShow();
		$(wrap).addClass('modal')
		return false;
	    });
	})(o,wrap);

	$('body').append( wrap )

    });

    $('a.close-btn').click(function() {
	$(this).parent().jqmHide();
	return false;
    });	
});
