Inline=function(a){if(typeof jQuery==="undefined"){throw"Inline exception: jQuery not found."}jQuery(document).ready(function(){});this.Common_AdButton=function(c){var b=this.getCookie("BSSID");if(b!=null){b=jQuery.parseJSON(b);var d=c;jQuery(".commonAddButton .button a, .commonNavigation .menu .i1 a, .shopAdsManagement .menu .t-add a").attr("href",d)}};this.Ad_AddFormBSSID=function(d,c){var b=new Tools.Cookie("BSSID");if(b!=null&&d=="add"&&(c!=top.location.pathname&&c+",type,correct"!=top.location.pathname)){window.location=c}};this.Ad_AddFormGetSessionLocation=function(){if(!jQuery("#land").val()){jQuery.ajax({type:"GET",url:"/ajax/session-location",dataType:"json",success:function(d,e){var c=d.response;if(c==1){var b=d.location;if(b.fc!=null){jQuery("#land").val(b.fc);jQuery("#land").change()}if(b.ds!=null){jQuery("#district").val(b.ds)}}}})}};this.FrontPage_MapHover=function(){jQuery(".frontPageMap .lands li").mouseover(function(){var b=jQuery(this).attr("class");jQuery("#mainmap").addClass(b)}).mouseout(function(){jQuery("#mainmap").attr("class","")});jQuery(".frontPageMap .map area").mouseover(function(){jQuery(".frontPageMap .lands a").removeClass("selected");var b=jQuery(this).attr("class");jQuery(".frontPageMap .lands ."+b+" a").addClass("selected");jQuery("#mainmap").addClass(b)}).mouseout(function(){jQuery(".frontPageMap .lands a").removeClass("selected");jQuery("#mainmap").attr("class","")});jQuery("#austriaMap area").removeAttr("title")};this.Search_ShopsForm_Suggest=function(){jQuery("#q").autocomplete("/suggest/suggest_ads",{width:189,selectFirst:false,dataType:"jsonp",extraParams:{cid:function(){return parseInt(1*jQuery("#cId").val())},loc:function(){if(jQuery("#fc").val()=="nfc"||jQuery("#fc").val()=="nd"){return parseInt(1*jQuery("#loc").val())}else{return parseInt(1*jQuery("#fc").val())}},fc:function(){return(jQuery("#fc").val()=="nfc"||jQuery("#fc").val()=="nd")?"Y":"N"},dir:function(){return"H"}},formatItem:function(f,d,b,e,c){var g="";g+='<span class="title">'+f.title+"</span>";g+='<span class="resCnt">'+gettext("results about")+": "+f.resCnt+"</span>";return g},parse:function(d){var c=new Array();for(var b=0;b<d.items.length;b++){c[c.length]={data:d.items[b],value:d.items[b].title,result:d.items[b].title}}return c}}).result(function(c,b){})};this.Search_AdForm_Suggest=function(){jQuery("#q").autocomplete("/suggest/suggest_ads",{width:189,selectFirst:false,dataType:"jsonp",extraParams:{cid:function(){return parseInt(1*jQuery("#cId").val())},loc:function(){if(jQuery("#fc").val()=="nfc"||jQuery("#fc").val()=="nd"){return parseInt(1*jQuery("#loc").val())}else{return parseInt(1*jQuery("#fc").val())}},fc:function(){return(jQuery("#fc").val()=="nfc"||jQuery("#fc").val()=="nd")?"Y":"N"},dir:function(){return jQuery("#dir").val()==1?"S":"W"}},formatItem:function(f,d,b,e,c){var g="";g+='<span class="title">'+f.title+"</span>";g+='<span class="resCnt">'+gettext("results about")+": "+f.resCnt+"</span>";return g},parse:function(d){var c=new Array();for(var b=0;b<d.items.length;b++){c[c.length]={data:d.items[b],value:d.items[b].title,result:d.items[b].title}}return c}}).result(function(c,b){jQuery("#searchForm").submit()})};this.Search_Ads_GoogleAFS=function(){var b=jQuery(".googleAFS .right");jQuery(b).each(function(d,c){if(jQuery(c).find("iframe").css("visibility")!="visible"){jQuery(c).parent().parent().hide()}else{jQuery(c).parent().parent().show()}})};this.Search_Ads_TagsMargin=function(){var b=jQuery(".adsTagsList p").width();jQuery(".adsTagsList ul").css("margin-left",b+15+"px")};this.Search_Ads_SaveSearchAgent=function(){jQuery(".adOption .saveSearchAgent").click(function(){var b=jQuery(this).attr("href");jQuery.ajax({type:"GET",url:"/ajax/token",dataType:"json",success:function(d,e){var c=d.response;jQuery.ajax({type:"POST",url:"/ajax"+b,data:{token:c},dataType:"json",success:function(g,h){if(g.response>0){window.location=g.url}else{var f="";switch(g.response){case -1:f=gettext("Your search agent couldn't be saved. Please narrow your search criteria.");type="warn";break;case -2:f=gettext("Your search agent couldn't be saved. An error occured, please try again.");type="error";break;case -4:f=gettext("You have reached maximum limit of search agents for a single user, and cannot save any more agents until you delete some of them.");type="error";break;case -3:default:f=gettext("Your search agent couldn't be saved. Refresh page and try again.");type="error";break}new Tools().Message({message:f,type:type})}},error:function(f,h,g){}})},error:function(c,e,d){}});return false})};this.Ad_Forward_Form=function(){var e=gettext("your name");var h=gettext("e-mail of your friend");var f=gettext("message");var g=new Tools();var c=jQuery("#forwardFormId #forwardFormName");var b=jQuery("#forwardFormId #forwardFormEmail");var d=jQuery("#forwardFormId #forwardFormContent");if(c.val()==""){c.val(e)}c.focus(function(){if(jQuery(this).val()==e){jQuery(this).val("")}}).blur(function(){if(jQuery(this).val()==""){jQuery(this).val(e)}});if(b.val()==""){b.val(h)}b.focus(function(){if(jQuery(this).val()==h){jQuery(this).val("")}}).blur(function(){if(jQuery(this).val()==""){jQuery(this).val(h)}});if(d.val()==""){d.val(f)}d.focus(function(){if(jQuery(this).val()==f){jQuery(this).val("")}}).blur(function(){if(jQuery(this).val()==""){jQuery(this).val(f)}});jQuery(".forwardForm #forwardFormId").submit(function(){c.focus();g.SVnotEmpty(c,gettext("Enter your name"));b.focus();g.SVnotEmpty(b,gettext("Enter friend's e-mail"));g.SVemailAddress(b,gettext("Enter friend's e-mail"));d.focus();g.SVnotEmpty(d,gettext("Enter message"));if(jQuery(this).find("ul.errors").size()>0){return false}else{return true}});jQuery(".communicates .close a").click(function(){jQuery(this).parents("div").find(".communicates").fadeOut(800);return false})};this.Ad_Options=function(){var e=jQuery("#contactFormContent").val();var k=jQuery("#contactFormName").val();var d=jQuery("#contactFormEmail").val();var j=jQuery("#contactFormPhone").val();var g=jQuery("#contactFormContainer").hasClass("sent");var c=jQuery("#contactFormContent").val();var f=new Tools();var b=function(){jQuery("#contactFormName").val("");jQuery("#contactFormEmail").val("");jQuery("#contactFormPhone").val("");jQuery("#contactFormSendCopy").removeAttr("checked");jQuery("#contactFormContent").val(c);jQuery(".contactForm .errors").remove()};if(g){b()}jQuery(".adOption .save a").click(function(){var l=new Tools();jQuery.ajax({type:"POST",url:"/ajax/ad/save/add,id,"+l.GetAdId(),data:{BCID:l.Cookie("BCID")},dataType:"json",success:function(m,n){if(m.response==1){jQuery(".adOption .save a").replaceWith("<span>"+gettext("Saved")+"</span>");if(jQuery(".adVisitedTab .naviBox .save").hasClass("active")){setActiveTab("save")}jQuery("#mycarousel-save").html("<ul></ul>");setActiveTab("save")}},error:function(m,o,n){}});return false});jQuery(".adOption .send a").click(function(l){l.preventDefault();jQuery(".contactFormContent").find("ul.errors").remove();jQuery(".additionalForm").hide();if(jQuery.browser.msie&&jQuery.browser.version<8){jQuery(".communicates").hide();jQuery(".reportForm").hide();jQuery(".contactForm").show(function(){jQuery.scrollTo(".contactForm")})}else{jQuery(".reportForm").slideUp(800);jQuery(".communicates").slideUp(800);jQuery(".contactForm").slideDown(800,function(){jQuery.scrollTo(".contactForm")})}jQuery("#contactFormId").ajaxForm({dataType:"json",success:function(n,m){var o=n.sent;var q=n.errors;var p=n.success;jQuery(".contactFormContent").find("ul.errors").remove();if(o=="ok"){jQuery(".contactForm").slideUp(800,function(){jQuery(".submitInfo").html('<div class="communicates"><div class="close"><a href="#"><span>'+p.close+'</span></a></div><div class="communicate ok"><p class="title"><strong>'+p.header+'</strong></p><p class="content">'+p.text+"</p></div></div>");jQuery(".communicates .close a").click(function(){jQuery(".communicates").slideUp(800);return false})});jQuery("#contactFormName").val("");jQuery("#contactFormEmail").val("");jQuery("#contactFormPhone").val("");jQuery("#contactFormContent").val("")}else{if(o=="error"&&q.length>0&&q.stopWordText.length==0){jQuery(".contactForm").slideUp(800,function(){jQuery(".submitInfo").html('<div class="communicates"><div class="close"><a href="#"><span>'+q.close+'</span></a></div><div class="communicate fault"><p class="title"><strong>'+q.header+'</strong></p><p class="content">'+q.text+"</p></div></div>");jQuery(".communicates .close a").click(function(){jQuery(".communicates").slideUp(800);return false})})}else{if(o=="error"&&q.stopWordsText.length>0){jQuery("#contactFormContent").after('<ul class="errors"><li>'+q.stopWordsText+"</li>");return false}}}}});return false});jQuery(".adSingle .boxHeader a").click(function(){location.hash="contactFormContainer";jQuery(".additionalForm").hide();jQuery(".communicates").hide();if(jQuery.browser.msie&&jQuery.browser.version<8){jQuery(".reportForm").hide();jQuery(".contactForm").show()}else{jQuery(".reportForm").slideUp(800);jQuery(".contactForm").slideDown(800)}return false});jQuery(".adOption .report a").click(function(l){l.preventDefault();jQuery(".additionalForm").hide();if(jQuery.browser.msie&&jQuery.browser.version<8){jQuery(".communicates").hide();jQuery(".contactForm").hide();jQuery(".reportForm").show(function(){jQuery.scrollTo(".reportForm")})}else{jQuery(".contactForm").slideUp(800);jQuery(".communicates").slideUp(800);jQuery(".reportForm").slideDown(800,function(){jQuery.scrollTo(".reportForm")})}jQuery("#reportFormId").ajaxForm({dataType:"json",success:function(n,m){var o=n.sent;var q=n.errors;var p=n.success;if(o=="ok"){jQuery(".reportForm").slideUp(800,function(){jQuery(".submitInfo").html('<div class="communicates"><div class="close"><a href="#"><span>'+p.close+'</span></a></div><div class="communicate ok"><p class="title"><strong>'+p.header+'</strong></p><p class="content">'+p.text+"</p></div></div>");jQuery(".communicates .close a").click(function(){jQuery(".communicates").slideUp(800);return false})});jQuery("#reportFormName").val("");jQuery("#reportFormEmail").val("");jQuery("#reportFormPhone").val("");jQuery("#reportFormContent").val("")}else{if(o=="error"&&q.length>0){jQuery(".contactForm").slideUp(800,function(){jQuery(".submitInfo").html('<div class="communicates"><div class="close"><a href="#"><span>'+q.close+'</span></a></div><div class="communicate fault"><p class="title"><strong>'+q.header+'</strong></p><p class="content">'+q.text+"</p></div></div>");jQuery(".communicates .close a").click(function(){jQuery(".communicates").slideUp(800);return false})})}}}});return false});jQuery("#printPreview").click(function(){$("#floatbox-box").printElement()});jQuery(".contactForm .contactFormSendCopy").hide();jQuery(".contactForm #contactFormReset").click(function(){setTimeout(function(){b()},100);return false});jQuery(".contactForm .closeForm a, .contactForm #contactFormReset").click(function(){jQuery(".contactForm").slideUp(800);jQuery("#contactFormName").val("");jQuery("#contactFormEmail").val("");jQuery("#contactFormPhone").val("");jQuery("#contactFormSendCopy").removeAttr("checked");return false});jQuery(".contactForm #contactFormName").blur(function(){var l=this;setTimeout(function(){f.SVnotEmpty(l)},100)});jQuery(".contactForm #contactFormEmail").blur(function(){var l=this;setTimeout(function(){f.SVbothNotEmpty(l,jQuery(".contactForm #contactFormPhone"),gettext("your e-mail address"),gettext("phonenumber"));f.SVemailAddress(l)},100)});jQuery(".contactForm #contactFormEmail").keydown(function(){var l=this;setTimeout(function(){f.IsNotEmpty(l,jQuery(".contactForm .contactFormSendCopy"))},100)});jQuery(".contactForm #contactFormPhone").blur(function(){var l=this;setTimeout(function(){f.SVbothNotEmpty(jQuery(".contactForm #contactFormEmail"),l,gettext("your e-mail address"),gettext("phonenumber"));f.SVphoneNumber(l)},100)});jQuery(".contactForm #contactFormId").submit(function(){jQuery(".contactForm #contactFormName").blur();jQuery(".contactForm #contactFormEmail").blur();jQuery(".contactForm #contactFormPhone").blur();jQuery(".contactForm #contactFormContent").blur();if(jQuery(this).find("ul.errors").size()>0){return false}else{return true}});var h=jQuery("#reportFormContainer").hasClass("sent");jQuery(".reportForm .reportFormSendCopy").hide();var i=function(){jQuery("#reportFormName").val("");jQuery("#reportFormEmail").val("");jQuery("#reportFormPhone").val("");jQuery("#reportFormContent").val("");jQuery("#reportFormSendCopy").removeAttr("checked");jQuery(".reportForm .errors").remove()};if(h){i()}jQuery(".reportForm #reportFormReset").click(function(){setTimeout(function(){i()},100);return false});jQuery(".reportForm .closeForm a, .reportForm #reportFormReset").click(function(){jQuery(".reportForm").slideUp(800);return false});jQuery(".reportForm #reportFormName").blur(function(){f.SVnotEmpty(this)});jQuery(".reportForm #reportFormEmail").blur(function(){var l=this;setTimeout(function(){f.SVbothNotEmpty(l,jQuery(".reportForm #reportFormPhone"),gettext("your e-mail address"),gettext("phonenumber"));f.SVemailAddress(l)},100)});jQuery(".reportForm #reportFormEmail").keydown(function(){var l=this;setTimeout(function(){f.IsNotEmpty(l,jQuery(".reportForm .reportFormSendCopy"))},100)});jQuery(".reportForm #reportFormPhone").blur(function(){var l=this;setTimeout(function(){f.SVbothNotEmpty(jQuery(".reportForm #reportFormEmail"),l,gettext("your e-mail address"),gettext("phonenumber"));f.SVphoneNumber(l)},100)});jQuery(".reportForm #reportFormContent").blur(function(){var l=this;setTimeout(function(){f.SVnotEmpty(l)},100)});jQuery(".reportForm #reportFormId").submit(function(){jQuery(".reportForm #reportFormName").blur();jQuery(".reportForm #reportFormEmail").blur();jQuery(".reportForm #reportFormPhone").blur();jQuery(".reportForm #reportFormContent").blur();if(jQuery(this).find("ul.errors").size()>0){return false}else{return true}});jQuery(".communicates .close a").click(function(){jQuery(this).parents("div").find(".communicates").slideUp(800);var n=new Tools();var l=jQuery(this).attr("href");var m=n.GetAdIdFromHref(l);document.cookie="gc_contact_"+m+"=; path=/";return false})};this.Ad_NextAd=function(b,c){jQuery.ajax({type:"GET",url:"/ajax/isnext,id,"+b,data:"",dataType:"json",success:function(d,e){if(d.response=="next"){jQuery(".nextAd .next span").replaceWith('<a href="'+c+'">'+gettext("next classifield ad")+"</a>")}else{if(d.response!=0){jQuery(".nextAd .next span").replaceWith('<a href="'+d.response+'">'+gettext("next classifield ad")+"</a>")}}},error:function(d,f,e){}})};this.getCookie=function(b){return new Tools().Cookie(b)};this.setCookie=function(c,d,b){new Tools().Cookie(c,d,b)};this.gaTrack=function(b){_gaq.push(["_trackPageview"],b)};this.gaTrackClick=function(c,b){jQuery(c).click(function(){new Inline().gaTrack(b)})};this.gaTrackAjax=function(b){jQuery(b.params).each(function(d,c){if(c!==undefined){new Inline().gaTrackClick(c[0],c[1])}})};this.gaTrackAjaxEvents=function(b){jQuery.each(b,function(d,c){jQuery.each(c,function(e,f){jQuery.each(f,function(h,g){if(g==""){jQuery(h).click(function(){_gaq.push(["_trackEvent",d,e])})}else{jQuery(h).click(function(){_gaq.push(["_trackEvent",d,e,g])})}})})})};this.counterClickAd=function(g,c,b,e,d){var f=new Tools();jQuery(g).click(function(){if(e=="href"){var h=jQuery(this).attr("href");var i=f.GetAdIdFromHref(h)}else{if(e=="url"){var i=f.GetAdId()}}var j=b+"/a/ad?type="+c+"&adId="+i+"&t="+(new Date()).getTime();f.doRequest(j)})}};
