$(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-flash").flash(
		{src:"flash/homepage.swf",
		 width:600,
		 height:600,
		 wmode:"transparent",
		 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 h2').sifr(
		{ strSWF: 'flash/font-name.swf', strColor: '#cc0000', strWmode: 'transparent', intPadding: [35, 0, 0, 0], strFlashVars: 'textalign=center&', strCase: 'upper' },
		{ expressInstall: true }
	);
	*/
//sIFr styles
$("div#title-wrapper h1").sifr( { strSWF: './flash/sabon.swf', strColor: '#2C3554', intPadding: [0, 0, 11, 0], strCase: 'upper', strWmode:'transparent'} );
$("div#title-wrapper h2").sifr( { strSWF: './flash/sabon.swf', strColor: '#939598', intPadding: [26, 5, 11, 0], strCase: 'upper', strWmode:'transparent'} );

$("div#content h2").sifr( { strSWF: './flash/sabon.swf', strColor: '#1B4164', intPadding: [0, 0, 0, 0], strCase: 'upper', strWmode:'transparent'} );
$("div#content h3").sifr( { strSWF: './flash/sabon.swf', strColor: '#848689', intPadding: [36, 0, 0, 2], strCase: 'upper', strWmode:'transparent'} );
$("div#content h4").sifr( { strSWF: './flash/sabon.swf', strColor: '#848689', intPadding: [0, 0, 0, 0], strCase: 'upper', strWmode:'transparent'} );
//sIFr styles US Bank FlexPerks Reserve Visa Signature landing page
$("p.benefits-us-bank").sifr( { strSWF: './flash/sabon.swf', strColor: '#1b4164', intPadding: [0, 0, 0, 0], strCase: 'upper', strWmode:'transparent'} );
//$("ul.benefits-us-bank li").sifr( { strSWF: './flash/sabon.swf', strColor: '#1b4164', intPadding: [0, 0, 0, 0], strCase: '', strWmode:'transparent'} );
//$("body.us-bank div#sidebar h2").sifr( { strSWF: './flash/sabon.swf', strColor: '#1b4164', intPadding: [0, 0, 0, 0], strCase: upper', strWmode:'transparent'} );

// 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");
    }
	*/
	//reservation console	
	$("#reserve").submit(function(){
		//return false;
		var today = formatDate(new Date(), "dd/MM/yyyy");
		var temp = $("#arrive").attr("value") || today;
		temp = temp.split("/");
		temp = temp[0]+"/"+temp[1]+"/"+temp[2];
		$("#DateIn").attr("value",temp);
		temp = new Date();
		temp.setDate(temp.getDate() + 1);
		var tomorrow = formatDate(temp, "dd/MM/yyyy");
		temp = $("#depart").attr("value") || tomorrow;
		temp = temp.split("/");
		temp = temp[0]+"/"+temp[1]+"/"+temp[2];
		$("#DateOut").attr("value",temp);
	});

});


// 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); }
		);
	});

};   
