$(document).ready(function(){$("option").each(function(){$(this).html($(this).text()+"&nbsp;&nbsp;")});$("a.target").attr("target","_blank");$("td.post_names").css({width:$(this).find("div.post_name").width()+"px"});$("#slider-show").jqFancyTransitions({titleOpacity:1,strips:30,navigation:true,background:false,delay:7000,width:700,height:332});$("#slider-show-other").jqFancyTransitions({effect:"wave",background:false,titleOpacity:1,strips:10,navigation:true,delay:8000,width:614,height:332});$("#menu li.level_0").hoverIntent({over:function(){$(this).find("ul").slideToggle("normal")},sensitivity:2,interval:60,timeout:100,out:function(){$(this).find("ul").slideToggle("fast")}});$("#carousel-navigation div.number").click(function(){if($(this).attr("class")=="number inactive"){$("#carousel-images img").fadeOut("slow");$("#carousel-images .ft-title").fadeOut("slow");$("#image-"+$(this).attr("id")).fadeIn("slow");$("#label-"+$(this).attr("id")).fadeIn("slow");$("#carousel-navigation div.active").removeClass("active").addClass("inactive");$(this).removeClass("inactive").addClass("active")}});$("#scrollbar1").tinyscrollbar();var c=$("#inwestments div.investments").length*90-3*90;$("#inwestments-down").click(function(){if($("#inwestments:animated").length<1){var h=$("#inwestments").position();if(h.top>-c){$("#inwestments").animate({top:h.top-270},400)}}});$("#inwestments-up").click(function(){if($("#inwestments:animated").length<1){var h=$("#inwestments").position();if(h.top<0){$("#inwestments").animate({top:h.top+270},400)}}});$(".news_hide span").click(function(){$(this).parent().parent().slideToggle("slow")});$(".news_title").click(function(h){h.preventDefault();$(this).next().slideToggle("slow")});$(".news_gallery a:has(img)").attr("rel","gallery").fancybox({hideOnContentClick:true,overlayColor:"#000000",transitionIn:"elastic",transitionOut:"elastic",cyclic:true});var a=$.cookie("popup");function b(){$.ajax({type:"POST",cache:false,url:$("#popup").attr("title"),data:$(this).serializeArray(),success:function(i){$.fancybox({speedIn:"1200",hideOnContentClick:true,overlayColor:"transparent",shadow:false,transitionIn:"fade",transitionOut:"fade",content:i,onStart:function(){$("#fancybox-wrap").addClass("popup")}})}});var h=new Date();h.setTime(h.getTime()+(120*60*1000));$.cookie("popup","1",{path:"/",expires:h})}if($("#popup").length>0&&a==null){setTimeout(function(){b()},10000)}$(".references_gallery a:has(img)").attr("rel","gallery").fancybox({hideOnContentClick:true,overlayColor:"#000000",transitionIn:"elastic",transitionOut:"elastic",cyclic:true,onStart:function(){$.fn.fancybox.defaults.custom_width=600},onComplete:function(){var h=$("#fancybox-wrap").outerHeight();var i=$("body").height();p=$("#fancybox-wrap").position();var j=Math.round(p.top);var k=i-h;if(h<i&&h+j>i){$("#fancybox-wrap").css({top:k})}}});function g(){$('body *:contains("PRIBO-EPB")').each(function(){if($(this).children().length<1){$(this).html($(this).text().replace("PRIBO-EPB",'<span containsStringImLookingFor="true" class="notranslate"> PRIBO-EPB </span>'))}})}$.translate.load("DE6265D0E24E1B70DE143C1ED6762D8F6740CD17");$.translate(function(){g();function j(k){$("body").translate("pl",k,{not:".notranslate",fromOriginal:true})}function i(k){$("body").translate("pl",k,{not:".notranslate",fromOriginal:false})}var h=$.cookie("destLang");if(h){i(h)}$("#translations li a").click(function(k){k.preventDefault();j($(this).attr("title"));$.cookie("destLang",null,{path:"/",expires:-10});$.cookie("destLang",$(this).attr("title"),{path:"/",expires:3});$("#translation-content li").removeClass("active").addClass("inactive");$(this).parent().addClass("active");$("#translation-content").css({height:"16px"})})});$("#translation-content").hoverIntent({over:function(){$(this).css({height:"auto"})},sensitivity:2,interval:60,timeout:100,out:function(){$(this).css({height:"16px"})}});$.tablesorter.addParser({id:"currencySpace",is:function(h){return/^[\%£$€?.]/.test(h)},format:function(h){return $.tablesorter.formatFloat(h.replace(new RegExp(/[ ]/g),""))},type:"numeric"});$.tablesorter.addParser({id:"numberAlpha",is:function(h){return/^[0-9][A-Za-z]/.test(h)},format:function(h){return $.tablesorter.formatFloat(h)},type:"numeric"});$("#apartments-list table.sorter").tablesorter({headers:{3:{sorter:"Alpha"},5:{sorter:"currencySpace"}},sortList:[[0,0]]}).tablesorterPager({container:$("#pager"),size:10});$("#apartments-list-search table.sorter").tablesorter({headers:{8:{sorter:"currencySpace"}},sortList:[[0,0]]}).tablesorterPager({container:$("#pager-search"),size:20});$("#apartments-list-garages table").tablesorter({headers:{2:{sorter:"currencySpace"}},sortList:[[0,0]]}).tablesorterPager({container:("#pager-garages"),size:5});$("#apartments-list-demurrages table").tablesorter({headers:{2:{sorter:"currencySpace"}},sortList:[[0,0]]}).tablesorterPager({container:("#pager-demurrages"),size:5});var f=$("span#hover-color").attr("class");var e=$("span#hover-list-color").attr("class");$("img[usemap].plan").maphilight({fillColor:f,fillOpacity:0.5,stroke:false});$("div#map-list ul li").mouseover(function(h){$(this).css({background:"#"+e});$("#shape-"+$(this).attr("id")).mouseover()}).mouseout(function(h){$(this).css({background:"transparent"});$("#shape-"+$(this).attr("id")).mouseout()}).click(function(h){if($(this).parent().attr("class")!="clickable"){h.preventDefault()}});$("map#room-points area").mouseover(function(h){$("div#map-list ul li#"+$(this).attr("id").replace("shape-","")).css({background:"#"+e})}).mouseout(function(h){$("div#map-list ul li#"+$(this).attr("id").replace("shape-","")).css({background:"transparent"})});$("img[usemap].floor_plan").maphilight();$("#apartment-points area").tooltip({delay:0,track:true,showBody:" - ",showURL:false,top:-10,fade:250});var d=$.cookie("sidebar");if(d==null){$(window).scroll(function(){if($("#search-bar").length==0){var h=$("#footer").offset().top-$(window).height()}else{var h=$("#search-bar").offset().top-$(window).height()}if($(window).scrollTop()>h){$("#slidebox-right").animate({right:"0px"},300)}else{$("#slidebox-right").stop(true).animate({right:"-430px"},100)}});$("#slidebox-right-close").bind("click",function(){$(this).parent().remove();var h=new Date();h.setTime(h.getTime()+(120*60*1000));$.cookie("sidebar","1",{path:"/",expires:h})})}});
