$(document).ready(function(){$(".top-menu-active").prev().css("backgroundImage","none");$("#sale-menu").hover(function(){var a=$(this).offset();$("#for-sale-dropdown").css({left:a.left,top:a.top+35,zIndex:9999}).show();$("#frame-for-sale-dropdown").css({left:a.left-2,top:a.top+35,height:$("#for-sale-dropdown").height()}).show()},function(){$("#for-sale-dropdown").hide();$("#frame-for-sale-dropdown").hide()});$("#for-sale-dropdown").hover(function(){$("#for-sale-dropdown").show();$("#frame-for-sale-dropdown").show()},
function(){$("#for-sale-dropdown").hide();$("#frame-for-sale-dropdown").hide()});$("#rent-menu").hover(function(){var a=$(this).offset();$("#for-rent-dropdown").css({left:a.left,top:a.top+35,zIndex:9999}).show();$("#frame-for-rent-dropdown").css({left:a.left-2,top:a.top+35,height:$("#for-rent-dropdown").height()}).show()},function(){$("#for-rent-dropdown").hide();$("#frame-for-rent-dropdown").hide()});$("#for-rent-dropdown").hover(function(){$("#for-rent-dropdown").show();$("#frame-for-rent-dropdown").show()},
function(){$("#for-rent-dropdown").hide();$("#frame-for-rent-dropdown").hide()});$("#lang-menu").hover(function(){var a=$(this).offset();$("#lang-menu-dropdown").css({left:a.left-51,top:a.top+23,zIndex:9999}).show();$("#frame-lang-menu-dropdown").css({left:a.left-51,top:a.top+23,height:$("#lang-menu-dropdown").height()}).show()},function(){$("#lang-menu-dropdown").hide();$("#frame-lang-menu-dropdown").hide()});$("#lang-menu-dropdown").hover(function(){$("#lang-menu-dropdown").show();$("#frame-lang-menu-dropdown").show()},
function(){$("#lang-menu-dropdown").hide();$("#frame-lang-menu-dropdown").hide()});$("#carousel").css("display","block");$("#carousel").jCarouselLite({auto:2500,speed:1000,visible:12,start:0,vertical:false,btnNext:".carousel-next",btnPrev:".carousel-prev"});$(".carousel-list").hover(function(){var a=$(this).offset();$("#carousel-popup").css({left:a.left,top:a.top-110,zIndex:900}).show()},function(){$("#carousel-popup").hide()});$(".carousel-list").hover(function(){$.ajax({type:"GET",url:"include/ajax.php",
data:"action=getCarouselPopup&culture="+$("#lang").val()+"&advert_id="+$(this).attr("advert_id"),contentType:"application/json; charset=utf-8",beforeSend:function(){$("#carousel-popup-loading").css("display","block");$("#carousel-popup-content").css("display","none")},error:function(a){ajaxError(a.responseText);$("#carousel-popup-loading").css("display","none");$("#carousel-popup-content").css("display","none")},success:function(a){$("#carousel-popup-loading").css("display","none");$("#carousel-popup-content").html(a);
$("#carousel-popup-content").css("display","block")}});return false});$(".private-advert-content li img").click(function(){$.ajax({type:"GET",url:"include/ajax.php",data:"action=getPrivateAdvertBigAjaxImage&id="+$(this).attr("img_id"),contentType:"application/json; charset=utf-8",beforeSend:function(){$("#big-image-loading").css("display","block")},error:function(a){$("#big-image-loading").css("display","none");ajaxError(a.responseText)},success:function(a){$("#big-image-loading").css("display","none");
$(".private-advert-big-image").html(a)}});return false});$("#main-advert li a").click(function(){$("#main-advert li").removeClass("main-advert-selected");$(this).parent().addClass("main-advert-selected");var a=$(this),c=a.html();$.ajax({type:"GET",url:"include/ajax.php",data:"action=getMainAdvertAcclaim&culture="+$("#lang").val()+"&list_type="+a.attr("list_type"),contentType:"application/json; charset=utf-8",beforeSend:function(){a.html(AllLoading)},error:function(b){ajaxError(b.responseText)},success:function(b){a.html(c);
$("#main-advert-content").html(b)}});return false})});