$(function() {
	//$('.rotate').rotate(-3)
});

$(function() {
	//$('#gallery a').lightBox({fixedNavigation:true});	
	//$('#gallery a').lightBox();
});

$(function() {
    //if($.fontAvailable('Helvetica Neue-Light')) {
	//	alert('got it');
	//}
});

$(function() {
	$(document).pngFix(); 
});

// BOOK NOW LINK
$("a[class='cat_13']").attr('href', 'javascript:;');	
$("a[class*='cat_13']").click(function(){
	hhotelSearchGroup('CAMOSTAndre', '', '', '', '');
	return false;
});


// NASCONDO TUUTE LE RISPOSTE DELLE FAQ
$("#faq .story .full_box .body").each(function() {	
	$(this).css("display","none");
});

// VISUALIZZO LA RISPOSTA DELLA FAQ
$("#faq .story .full_box .moreinfo a").click(function(){
	// nascodo tutte le risposte aperte
	$("#faq .story .full_box .body").each(function() {	
		$(this).hide(1000);
	});
	var hidden_id = parseInt($(this).parent('.moreinfo').attr('id').replace('h_', ''), 10); 
	$("#faq .story .full_box #risp_" + hidden_id).show(1000);
	return false;
});


// SCROLLING TEXT 
$("#down a").hover(
  function () {
	var position = $('#text').css("top");
	position = position.replace('px','');
	
	var height = $('#text').height();
	
	var p = Number(position);
	var h = -Number(height-200);

	if (p>h) {
		$('#text').animate({"top": "-=220px"}, "slow");
	} 						
	return false;
  }, 
  function () { }
);

$("#up a").hover(
  function () {
	var position = $('#text').css("top");
	if (position=="0px") {
	}else{
	$('#text').animate({"top": "+=220px"}, "slow");
	}
	return false;
  }, 
  function () { }
);


// SCROLLING IMAGE OFFERS / EVENTS
(function($) {
	$(function() { //on DOM ready
		$("#scroller").simplyScroll({
			className: 'vert',
			horizontal: false,
			frameRate: 20,
			speed: 10
		});
		
		$("#scroller_gallery").simplyScroll({
			className: 'vert',
			horizontal: false,
			frameRate: 20,
			speed: 10
		});
	});
})(jQuery);
