Cufon.replace('.cufon, h1, h2, h3, h4, h5', {
	hover: true
});

$(function(){	
   
   $("#news > div.mini").hide();
   
	$("#flash .scrollable").scrollable({
		items: '.items',
		speed: 1000,
		easing: 'custom',
		circular: true,
		next: '.next2',
		prev: '.prev2'
	});
	
	$(".scrollable2").scrollable({
		items: '.items',
		speed: 1000,
		easing: 'custom',
		circular: true
	}).navigator({
		navi: '.navi'
	}).autoscroll({
		interval: 4000
	});
	
	$(".scrollable3").scrollable({
		items: '.items',
		speed: 1000,
		easing: 'custom',
		circular: true
	});
	
	$.easing.custom = function (x, t, b, c, d) {
		if (t==0) return b;
		if (t==d) return b+c;
		if ((t/=d/2) < 1) return c/2 * Math.pow(2, 10 * (t - 1)) + b;
		return c/2 * (-Math.pow(2, -10 * --t) + 2) + b;
	}
	
	$("ul.tabs").tabs("div.panes > div");
	
	$(".mini a").bind("click",function(event){
		event.preventDefault();
		$("#room-photo a").hide();
		var url = $(this).attr("href").replace("_t", "_b");	
		var href = url.replace("_b", "");
		$("#room-photo a").attr("href", href);
		$("#room-photo img").attr("src", url);
		$("#room-photo a").fadeIn();
	});
	
	$(".more-pic").click(function(event){
		event.preventDefault();
		$(this).next().toggle("slow");	
	});
	
	$("a[rel^='fancybox']").fancybox({ 'zoomSpeedIn': 1000, 'zoomSpeedOut': 0, 'overlayShow': true, 'enableEscapeButton': true, 'padding': 0, 'overlayOpacity': 0.6, 'overlayColor': '#0e1329' });

	try{
	$(".dateselect").datepicker({ 
		  showOn: 'both',
		  buttonImage: 'css/date.gif',
		  buttonImageOnly: true,
		  dateFormat: 'yy-mm-dd',
		  minDate: new Date(),
		  maxDate: '+ 2y',
		  onSelect: function(date, dp){
							var datum = new Date(date);
							var day = datum.getDate();
							var month = datum.getMonth() + 1;
							if (day < 10){
								day = "0"+day;
							}
							if (month < 10){							
								month = "0"+month;
							}
							$("#sd option[value=" + day + "]").attr('selected', 'selected');
							$("#sm option[value=" + month + "]").attr('selected', 'selected');
							$("#sy option[value=" + datum.getFullYear() + "]").attr('selected', 'selected');
						}
	  });
	}
	catch(err){}

});



