var window,paginiModal,EventTracking;$(function(){$(".close-btn").click(function(){$(this).parent(".alert").fadeOut(500,function(){$(this).remove()})});$(".tabs-navigation a").on("click",function(n){var t=$(this),i=t.parent(),r=t.attr("href"),u=t.parents(".tabs");i.addClass("current");i.siblings().removeClass("current");u.find(".tab-content").not(r).hide();u.find(r).fadeIn();n.preventDefault()});$(".search-bar-wrap a").click(function(){var n=$(this).parent(".search-bar-wrap").find("#where").val().split(" ").join("+"),t=$(this).parent(".search-bar-wrap").find("#what").val().split(" ").join("+"),i=["http://www.1188.lv/search/web/{what}/{where}","http://www.visalietuva.lt/en/search/{what}/{where}","http://www.1182.ee/otsing?what={what}&where={where}","http://www.goldenpages.ie/q/business/advanced/where/{where}/what/{what}/","http://www.clearsearch.se/foretag/{where}/q_{what}/","http://www.zlatestranky.cz/hledani/{what}+{where}/","http://www.zlatestranky.sk/hladanie/{what}+{where}/","http://aranyoldalak.hu/kereses.jspv?what={what}&where={where}","http://www.e-adres.ru/poisk/{what}+near+{where}/","http://www.zutestranice.hr/odmah.php3?T1={what}&T2={where}"][$(this).attr("id")].replace("{what}",t).replace("{where}",n);window.open(i,"_blank").focus()});var n=/android/i.test(navigator.userAgent.toLowerCase()),t=/windows phone/i.test(navigator.userAgent.toLowerCase()),i=/blackberry/i.test(navigator.userAgent.toLowerCase()),r=/ipad|iphone|ipod/i.test(navigator.userAgent.toLowerCase());$(".result-items > li.item").on("mouseover",function(){var n=$(this);n.hasClass("active")||($("li.item",".result-items").removeClass("active"),n.addClass("active"))});if(n||t||i||r){$(".bubble-opener").on("click",function(){$(this).hasClass("active")?$(this).removeClass("active"):$(this).addClass("active")});return}$(".bubble-opener").hover(function(){$(this).addClass("active")},function(){$(this).removeClass("active")});$(".result-items > li.item").on("mouseover",function(){var i=$(this),n=$("#miniprofile-area"),t=$("#map-wrapper"),f=t.width(),e=$("#sticky-area"),o=n.find(".miniprofile").data("id"),r=$(".miniprofile",i),u=r.data("id");o!==u&&(n.empty().addClass("active"),r.clone(!0).appendTo(n),setTimeout(function(){n.find(".miniprofile").data("id")===u&&EventTracking.trackProfileCardShown(u,r.data("index"))},2e3),f>333?(t.height(200),e.parent().height(244+$(".miniprofile",i).height()),Map.refresh()):f<=333&&t.is(":visible")&&(t.height(120),e.parent().height(154+$(".miniprofile",i).height()),Map.refresh()),Map.zoomDetail($(this).data("index")))});$("#websiteTest").on("click",function(){$("body").scrollTop(0).addClass("webTest__overlay")});$(window).bind("pageshow",function(){$("body").find("webTest__overlay").length&&window.location.reload()})});window=this;$.fn.alqSticker=function(n,t){var i=this,r=$(window),e=$(n),o=$(t),f=$("#top-bar").outerHeight(),u;anchorHeight=e.outerHeight();u=function(){thisHeight=i.outerHeight();startAnchorPos=e.offset().top;endAnchorPos=o.offset().top;r.scrollTop()<startAnchorPos-f+anchorHeight?i.css({position:"absolute",top:""}):r.scrollTop()>endAnchorPos-f-thisHeight?i.css({position:"absolute",top:""}).addClass("sticky-end"):i.css({position:"fixed",top:f}).removeClass("sticky-end")};r.resize(function(){thisHeight=i.outerHeight();u()});r.scroll(u);u()};paginiModal=function(n,t){var i=document.getElementById(n||"pagini-modal"),r=document.getElementById(t||"pagini-modal-open"),u=document.getElementsByClassName("close")[0];r.onclick=function(){i.style.display="block"};u.onclick=function(){i.style.display="none"};window.onclick=function(n){n.target==i&&(i.style.display="none")}};$(document).ready(function(){$("input[required='required']").each(function(n,t){t.oninvalid=function(n){n.target.validity.valid||n.target.setCustomValidity("Va rugam sa completati acest camp");t.oninput=function(n){n.target.setCustomValidity("")}}})});EventTracking=EventTracking||{};EventTracking.trackEvent=function(n,t,i){ga("send","event",{eventCategory:n,eventAction:t,eventLabel:i})};EventTracking.init=function(){$(".t-c").each(function(){var t=$(this).closest("li.item"),n=$(this).data("td")||{};typeof n.id=="undefined"&&typeof t.data("id")!="undefined"&&(n.id=t.data("id"));$.isEmptyObject(n)||$(this).data("td",n)});$(".t-c").click(function(){var t=Settings.pageType||"UNKNOWN",i=$(this).data("ta")||"UNKNOWN CLICK",n=Settings.pageData||{};typeof $(this).data("td")!="undefined"&&(n.actionData=$(this).data("td"));EventTracking.trackEvent(t,i,JSON.stringify(n))});$(".t-fpbc").click(function(){var n=jQuery.extend(!0,{},Settings.pageData),t=$(this).closest(".item-data");n.l=t.data("id")||"unknown";n.lo=t.data("index")||0;EventTracking.trackEvent(Settings.pageType,"FullProfileButtonClick",JSON.stringify(n))})};EventTracking.trackProfileCardShown=function(n,t){Settings.var=Settings.var||{};Settings.var.profileCardsShown=Settings.var.profileCardsShown||0;var i=jQuery.extend(!0,{},Settings.pageData);i.l=n;i.lo=t;i.lc=++Settings.var.profileCardsShown;EventTracking.trackEvent(Settings.pageType,"ProfileCardShown",JSON.stringify(i))};$(document).ready(function(){EventTracking.init();typeof Settings.pageType!="undefined"&&typeof Settings.pageData!="undefined"&&EventTracking.trackEvent(Settings.pageType,"Load",JSON.stringify(Settings.pageData))})