function openSearchTab(tab)
{
	if (tab == 'metro') {
		$("#tab_hotels").hide();
		$("#tab_metro").show();
	} else {
		$("#tab_metro").hide();
		$("#tab_hotels").show();
	}
	


}

$(function(){
	$(".refreshblue").click(function(){
	var rand = Math.random(1,99999);
	$(".img_capcha").attr('src','/capcha/secpic.php?'+rand);
	});
	
		 var stoprel = setInterval("minigallery()",6000);
$("#big_image img").mouseover(function(){
	 //clearInterval(stoprel);
});

$("#big_image img").mouseout(function(){
		//stoprel = setInterval("minigallery()",6000);
  });
  
  $(".layer").hover(function(){
	$(this).children(".menu_body").stop(false,true).slideDown('500');
  },function(){
	$(this).children(".menu_body").stop(false,true).slideUp('500');
  });
  
  $(".gal-pr-img a").click(function(){
	var src = $(this).children('img').attr('src').replace('_sm','');
	var gal_big_img = $(this).parent().parent().prev();
	gal_big_img.children('img').attr('src',src);
	return false;
  });
  
});


function minigallery(){
	var curDiv = $("#big_image div.current");
	var nextDiv = curDiv.next();
	if(nextDiv.length == 0){
		nextDiv = $("#big_image div:first");
	}
	curDiv.removeClass("current").addClass("previous");
	nextDiv.css({"opacity":"0.0"}).addClass("current").animate({"opacity":"1.0"},1500, function(){
		curDiv.removeClass("previous");
	});
}
