<!--

$(document).ready(function(){

	$(document).pngFix();

	//block resize textarea on safari - because need css 3.0
	if(jQuery.browser.safari && parseInt(jQuery.browser.version) >= 522){
		$('textarea').css({'resize':'none'});
	}
	
	//hide divs
	$('div.hide').hide();
		
	//show div more info
	$('a.show').click(function () {
		var top = ($(this).parent().parent().offset().top);
		if($(this).parent().parent().find('div.hide').css('display')=='none'){
			$('html, body').animate({scrollTop:top}, { 'duration': 'slow', 'easing': 'swing' });
		}
		$(this).parent().parent().find('div.hide').slideToggle('slow');
		return false;
	});
	
	//message contact form
	var str = new String(parent.top.location);
	if(str.indexOf("sent=1")!=-1){		
		$('html, body').animate({scrollTop:550}, { 'duration': 0});	
		$('a#contact_response').fancybox({
		'frameWidth': 450,
		'frameHeight': 200,
		'overlayShow': true		
		}).trigger('click');
	}
	
	//message booking form
	var str = new String(parent.top.location);
	if(str.indexOf("book=1")!=-1){		
		$('html, body').animate({scrollTop:550}, { 'duration': 0});	
		$('a#book_response').fancybox({
		'frameWidth': 450,
		'frameHeight': 200,
		'overlayShow': true		
		}).trigger('click');
	}
	
	//scroll page into paging
	var str = new String(parent.top.location);
	if(str.indexOf("paging=")!=-1){
		top = ($('div.dark').offset().top);
		$('html, body').animate({scrollTop:top}, { 'duration': 'slow', 'easing': 'swing' });
	}
	
	//window login form
	var str = new String(parent.top.location);
	if(str.indexOf("login=-1")!=-1){		
		$('a#window_login').fancybox({
		'frameWidth': 550,
		'frameHeight': 300,
		'overlayShow': true		
		}).trigger('click');
	}
	//window login form
	var str = new String(parent.top.location);
	if(str.indexOf("login=1")!=-1){		
		$('a#window_login_done').fancybox({
		'frameWidth': 550,
		'frameHeight': 300,
		'overlayShow': true		
		}).trigger('click');
	}
	//window logout form
	var str = new String(parent.top.location);
	if(str.indexOf("login=2")!=-1){		
		$('a#window_logout').fancybox({
		'frameWidth': 550,
		'frameHeight': 300,
		'overlayShow': true		
		}).trigger('click');
	}
	
	//window exired form
	var str = new String(parent.top.location);
	if(str.indexOf("err=expired")!=-1){		
		$('a#window_exired').fancybox({
		'frameWidth': 550,
		'frameHeight': 300,
		'overlayShow': true		
		}).trigger('click');
	}
	
	$('a.iframe').fancybox({
		'frameWidth': 650,
		'frameHeight': 500,
		'overlayShow': true,
		'overlayOpacity': 0.7,
		
	});

});

//-->
