
//alert('http://www.cerrihotel.it/');

window.addEvent('domready', function() {
	
	if(typeof sIFR == "function"){
		sIFR.replaceElement(named({sSelector:".booking-title", sFlashSrc:"http://www.cerrihotel.it/flash/fonts/helvetica_35_thin.swf", sColor:"#7B7368", sBgColor:"#FFFFFF", sWmode:"opaque"}));
		sIFR.replaceElement(named({sSelector:".hotel-title", sFlashSrc:"http://www.cerrihotel.it/flash/fonts/helvetica_35_thin.swf", sColor:"#FFFFFF", sBgColor:"#000000", sWmode:"transparent", sFlashVars:"textalign=right"}));
	};
	
	
});

jQuery(function() { 
	
	
	if( document.getElementById('slideshow') ) {
		var fl = new SWFObject( "http://www.cerrihotel.it/flash/slideshows/default.swf", "slideshow_inner_id", "980", "219", "8,0,0,0", "#ffffff", true );
		fl.addVariable( 'xmlfile', 'http://www.cerrihotel.it/xml/slideshows/hotel-home.php' );
		fl.addParam( "menu", "false" );
		fl.addParam( 'scale', 'noscale' );
		fl.write( "slideshow" );
	}
	
	if( document.getElementById('location-right-slideshow') ) {
		var fl = new SWFObject( "http://www.cerrihotel.it/flash/location-right-slideshow.swf", "location-right-slideshow_inner_id", "326", "259", "8,0,0,0", "#ffffff", true );
		fl.addVariable( 'xmlfile', 'http://www.cerrihotel.it/xml/location-right-slideshow.php' );
		fl.addParam( "menu", "false" );
		fl.addParam( "wmode", "transparent" );
		fl.addParam( 'scale', 'noscale' );
		fl.write( "location-right-slideshow" );
	}
	
	
	if( document.getElementById('BookingArrival') ) {
	
		
		var arrivalCal    = new Calendar({ BookingArrival: 'd/m/Y'}, { draggable:false, direction:1, navigation:1, pad:0, tweak:{ x:25, y: -45}, onHideComplete:function(){if(!this.calendars[0].visible){ this.toggle(this.calendars[0]); } }  } );
		var departureCal  = new Calendar({ BookingDeparture: 'd/m/Y' },{ draggable:false, direction:2, navigation:1, pad:0, tweak:{ x:25, y: -96}, onHideStart:function(){this.calendars[0].button.blur();}  } );
		
		arrivalCal.toggle(arrivalCal.calendars[0]);
		
		jQuery(arrivalCal.calendars[0].button).click( function() { jQuery('#BookingArrival').css({border:'1px solid #FF0000'});jQuery('#BookingDeparture').css({border:'1px solid #B8B8B8'}); } );
		jQuery(departureCal.calendars[0].button).click( function() { jQuery('#BookingArrival').css({border:'1px solid #B8B8B8'});jQuery('#BookingDeparture').css({border:'1px solid #FFFF00'}); } );
	
		jQuery(arrivalCal.calendars[0].button).blur( function() { jQuery('#BookingArrival').css({border:'1px solid #B8B8B8'}); } );
		jQuery(departureCal.calendars[0].button).blur( function() { jQuery('#BookingDeparture').css({border:'1px solid #B8B8B8'}); } );
	
	}
	
	var morpher = document.getElementById('morpher');
	if( morpher ) {
		var fx = new Fx.Styles(morpher, {duration:1000, wait:false});
		fx.start({
			'font-size': '11px',
			'color': '#FFFFFF',
			'padding': '0 10px 0 40px'
		});
	}
	
	
	
});



