$(function() {
		   
	// Sifr
	if (LANG == 'jp') {
		$('div#content h1').sifr({ strSWF: '/flash/kozuka-gothic-pro-m-italic.swf', strColor: '#ffffff', strWmode: 'transparent'},{ expressInstall: true });
		$('div#content .room-title h2').sifr({ strSWF: '/flash/kozuka-gothic-pro-b.swf', strColor: '#fad865', strWmode: 'transparent', strFlashVars: 'textalign=center&'},{ expressInstall: true });
		$('div#content #room-title-3 h2').sifr({ strSWF: '/flash/kozuka-gothic-pro-b.swf', strColor: '#fad865', strWmode: 'transparent', strFlashVars: 'textalign=center&'},{ expressInstall: true });
	} else {			
		$('div#content h1').sifr({ strSWF: '/flash/helvetica-neue-light-italic.swf', strColor: '#ffffff', strWmode: 'transparent'},{ expressInstall: true });
		$('div#content div.room-type h2').sifr({ strSWF: '/flash/helvetica-neue.swf', strColor: '#fad865', strWmode: 'transparent', strFlashVars: 'textalign=center&'},{ expressInstall: true });
		$('div#content div#room-title-3 h2').sifr({ strSWF: '/flash/helvetica-neue.swf', strColor: '#fad865', strWmode: 'transparent', strFlashVars: 'textalign=center&'},{ expressInstall: true });
	}
	
	
	// Flash	
	$("body.home div#masthead").flash({src:"/"+LANG+"/flash/sunroute-masthead.swf", width:695, height:432, wmode:"transparent", quality:"high"},{version:"8"});
	$("div#photo-gallery").flash(
		{src:"/"+LANG+"/flash/photo_gallery.swf",
		 width:466,
		 height:385,
		 wmode:"window",
		 quality:"high"},
		 {version:"8"},
			function(htmlOptions) { //Use this to specify a query string, take out if not needed.
				htmlOptions.flashvars.epostConfigXML = "/"+LANG+"/flash/xml/epostConfig.xml";
				htmlOptions.flashvars.imagesXML = "/"+LANG+"/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));
		});
	
	// Forms
	$('#promo-wrapper').hide();
	$('div#members-link a').toggle(function() { 
		$(this).addClass('current');
		$(this).parent().parent().children('#promo-wrapper').show();				
		//$('form#reservations-console label').sifr({ strSWF: '/flash/helvetica-bold.swf', strColor: '#ffffff', strWmode: 'transparent'},{ expressInstall: true });			
	},function() {
		$(this).removeClass('current');
		$(this).parent().parent().children('#promo-wrapper').hide();														
	});
	$('div.member-code').hide();
	$('input#membercheck').click(function() {
		if( $(this).is(':checked') == true ) {
			$(this).parent().parent().children('div.member-code').show();
			$(this).parent().parent().children('div.member-code').children('input').addClass('required');
			$('input#promo-code').val('SNCM');
		}else {
			$(this).parent().parent().children('div.member-code').hide();
			$(this).parent().parent().children('div.member-code').children('input').removeClass('required');
			$('input#promo-code').val('');
		}
	});
	
	// Room Types Carousel
	$('#mycarousel').jcarousel();

	// JCyle Push Items
	$('div.push-item').hide();
	$('div#jcycle-packages-push').each(function() { $(this).cycle({ 
		fx:     'scrollHorz', 
		speed:  1000, 
		timeout: 0, 
		next:   '#next-push', 
		prev:   '#prev-push',
		cleartypeNoBg:true
		});
	});	
	
	// JCycle Trip Advisor Items
	$('div.trip-item').hide();
	$('div#jcycle-packages-trip').each(function() { $(this).cycle({ 
		fx:     'scrollHorz', 
		speed:  1000, 
		timeout: 0, 
		next:   '#next-push-trip', 
		prev:   '#prev-push-trip',
		cleartypeNoBg:true,
        before:  function(){
            $(this).parent().css('height',$(this).height()+10);
        },
        after:   function(){
            $(this).css('height',$(this).height()+10);   
        }
		});
	});	
	$('div.trip-item').css('width',220);
	
	
	
	
	

});

