function clickButton(n,t){var r=n?n:window.event,i=document.getElementById(t);i&&r.keyCode==13&&fakeClick(i)}function OnSerialTextBoxKeyDown(n,t){var r,i,f,e,o,u;if(t.ctrlKey&&t.keyCode==86&&window.clipboardData){if(r=window.clipboardData.getData("Text"),r&&(r=r.toUpperCase(),i=r.split("-"),i.length==5&&i[0].length==5&&i[1].length==5&&i[2].length==5&&i[3].length==5&&i[4].length==5))return $("#txtLicensePart1").attr("value",i[0]),$("#txtLicensePart2").attr("value",i[1]),$("#txtLicensePart3").attr("value",i[2]),$("#txtLicensePart4").attr("value",i[3]),f=$("#txtLicensePart5"),f.attr("value",i[4]),f.focus(),!1}else if(t.keyCode>=65&&t.keyCode<=90&&!t.ctrlKey&&(e=$(n),o=e.attr("value"),o.length<5&&(u=String.fromCharCode(t.keyCode),u!="")))return u=u.toUpperCase(),e.attr("value",o+u),!1}function focusElement(n){var t=$("#"+n);t.focus()}function fakeClickById(n){var t=document.getElementById(n);fakeClick(t)}function fakeClick(n){var t,i;n.click?n.click():document.createEvent&&(t=document.createEvent("MouseEvents"),t.initMouseEvent("click",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),i=n.dispatchEvent(t))}function CloseLayer(n,t,i){$(n+" a.close").click();$(n).attr("style","position:absolute");$(t).attr("style","display:block");$(i).attr("style","display:none")}function setTabVisibleAndDeactivateOld(n,t,i,r){var u=$("#"+n),f=$("#"+t),e=$("#"+i),o=$("#"+r);u.addClass("current");f.attr("style","display: block;");e.removeClass("current");o.attr("style","display: none;")}function setTabVisible(n,t){var i=$("#"+n),r=$("#"+t);i.addClass("current");r.attr("style","display: block;")}function doSearch(n,t){var i=such_ziel||"suchausgabe.html";$.ajax({url:i,data:"eingabe="+n,type:"POST",success:function(n){$(t).html(n);$(t).fadeIn()}})}function UserAgentAdapter(n){this.getUserAgent=function(){var t;return t=n==null?navigator.userAgent:n,t.toString().toLowerCase()}}function _createVersionInfo(n){function o(){return l.getUserAgent()}function i(n){var t=o();return t.match(n)!==null}function e(n){var t=o();return parseInt(t.match(n)[1],10)}function a(n){return viewBag.getAppName().toLowerCase()===n}function c(){return i(/applewebkit/i)}function f(n){return r>=n}function v(n){return r===n}function y(){var n=0,t=o();switch(s){case h.iOS:n=parseFloat(t.match(/os(?:.*?)(\d+_\d+)/)[1].toString().replace(/_/,"."))}return n}function p(n){var t=y();return t===0||t>=n}function w(){u=i(/chrome\//i)?t.Chrome:c()&&!i(/mobile/i)?t.Safari:c()&&i(/mobile/i)?t.MobileSafari:i(/opera/i)?t.Opera:i(/firefox/i)?t.Firefox:i(/msie/i)||i(/trident/i)?t.MSIE:t.Other}function b(){var n=o();try{switch(u){case t.MSIE:try{r=i(/msie/i)?e(/msie(?:.*?)(\d+)/i):i(/\bie/i)?e(/\bie(?:.*?)(\d+)/i):e(/rv(?:.*?)(\d+)/i)}catch(f){r=e(/rv(?:.*?)(\d+)/i)}break;case t.Firefox:r=e(/firefox\/(\d+)/i);break;case t.Chrome:r=e(/chrome\/(\d+)/i);break;case t.MobileSafari:case t.Safari:r=e(/version\/(\d+)/i);break;case t.Opera:r=parseFloat(n.match(/version\/(\d+\.\d+)/i)[1])}}catch(f){r=0}}function k(){l=n==null?new UserAgentAdapter:n;w();b()}function d(){return/tablet/gi.test(navigator.appVersion)}var u=null,s,r,l,t={MSIE:"msie",Firefox:"firefox",Chrome:"chrome",Safari:"safari",MobileSafari:"mobilesafari",Opera:"opera",Other:"nonstandard"},h={Windows:"windows",MacOS:"macosx",Android:"android",iOS:"ios",Other:"other"};return versionInfo.isIosApp=function(){return viewBag.getAppOs().toLowerCase()==="ios"},versionInfo.isMacApp=function(){return viewBag.getAppOs().toLowerCase()==="mac"},versionInfo.isAndroidApp=function(){return viewBag.getAppOs().toLowerCase()==="android"},versionInfo.isWin8App=function(){return viewBag.getAppOs().toLowerCase()==="win8"},versionInfo.isWin8WrapperApp=function(){return viewBag.getAppOs().toLowerCase()==="win8rt"},versionInfo.isFbPay=function(){return a("fbpay")},versionInfo.isTouchScreen=function(){return i(/touch/)||modernizr.touch||"ontouchstart"in window&&!d()},versionInfo.isBusinessVersion=function(){return clientSessionInfo.isBusinessVersion},versionInfo.isCosmosDirekt=function(){return viewBag.isCosmosDirekt()},versionInfo.getBrowser=function(){return u},versionInfo.isEmbeddedBrowser=function(){var t=clientSessionInfo.isEmbedded,i,r,f,u,n;if(!t&&location.search==="")for(i=location.search.split("&"),n=0;n<i.length;n++)r=i[n].split("="),f=r[0],u=r[1],f==="register"&&(u==="1"||u==="2")&&(t=!0);return t},versionInfo.isIPhone=function(){return i(/iphone/i)},versionInfo.isIPod=function(){return i(/ipod/i)},versionInfo.isChrome=function(){return u===t.Chrome},versionInfo.isOpera=function(){return u===t.Opera},versionInfo.isFirefox=function(){return u===t.Firefox},versionInfo.isInternetExplorer=function(){return u===t.MSIE},versionInfo.isMobileSafari=function(){return u===t.MobileSafari},versionInfo.isUnsupportedMobileSafari=function(){return u===t.MobileSafari&&r<5&&r!==0},versionInfo.isInternetExplorer10=function(){return versionInfo.isInternetExplorer()&&f(10)},versionInfo.isMacOsX=function(){return s===h.MacOS},versionInfo.isAndroid=function(){return s===h.Android},versionInfo.isIOS=function(){return s===h.iOS},versionInfo.isSupportedBrowser=function(){var n=!0;switch(u){case t.MSIE:n=f(9);break;case t.Firefox:n=f(9);break;case t.Chrome:n=f(15);break;case t.Safari:n=f(5)||versionInfo.isAndroid()&&f(4)||f(0);break;case t.MobileSafari:n=(f(4)||v(0))&&(!versionInfo.isIOS()||p(4));break;case t.Opera:n=f(11.6)}return n},k(),versionInfo}function showSearchResult(n){$(".suchfeldoverlay").hide();document.location=n}function scrollnavigation(n){if($("div.col1:first").css("height")){var e=window.innerHeight,t=parseInt($("div.col1:first").css("height").substring(0,$("div.col1:first").css("height").indexOf("px"))),i=parseInt($("div.col2:first").css("height").substring(0,$("div.col2:first").css("height").indexOf("px")));if(i>t){var r=n,u=$(document).scrollTop()-r+"px",f=i-t+"px";$(document).scrollTop()>r?$(document).scrollTop()<r-90+i-t?$("div.col1:first").animate({top:u},{duration:700,queue:!1}):$("div.col1:first").animate({top:f},{duration:700,queue:!1}):$("div.col1:first").animate({top:0},{duration:700,queue:!1})}else $("div.col1:first").animate({top:0},{duration:700,queue:!1})}}function login_overlay(){$("#login_overlay").html();$("#login_overlay").slideDown("slow");nx_setLoginOverlayCloseButton()}function fehlermeldung(n){var t=navigator.userAgent.toLowerCase();$.magnificPopup.open({items:{src:n},type:"inline"})}function startloading(){blockloading||$("#loading_overlay").css("display","block")}function stoploading(){$("#loading_overlay").css("display","none")}function checkAllBoxes(){$("input[type='checkbox'] + label.checkboxlabel").each(function(){alert($(this).prev().prop("checked"))})}function init_tooltips(){$("a.overlay_info[title]").tooltip({offset:[10,2],effect:"slide",html:!0});$(".verfuegbarkeitsbereich img[title]").tooltip({position:"top center"})}function nx_setLoginOverlayCloseButton(){$("#login_overlay .login_zeile .button_close").click(function(){$("#login_overlay").slideUp("slow")})}function resizeBoxes(){var n=0,t;$(".produktuebersicht_billboard .buhlbox").each(function(t,i){$(i).outerHeight()>n&&(n=$(i).outerHeight())});$(".produktuebersicht_billboard .buhlbox").css("min-height",n);$(".produktuebersicht_testversion .buhlbox").each(function(t,i){$(i).outerHeight()>n&&(n=$(i).outerHeight())});$(".produktuebersicht_testversion .buhlbox").css("min-height",n);$("#main_content_area_suchergebnisse").length>0&&(t=0,$("#main_content_area_suchergebnisse .buhlbox").css("min-heigth",""),$("#main_content_area_suchergebnisse .buhlbox").each(function(n,i){$(i).outerHeight()>t&&(t=$(i).outerHeight())}),$("#main_content_area_suchergebnisse  .buhlbox").css("min-height",t))}function PopIt(){if(doPopUp&&$("#hiddenad").length>0)return $.magnificPopup.open({items:{src:"#hiddenad"},type:"inline",modal:!1,preloader:!1,closeBtnInside:!0,closeOnContentClick:!1,closeOnBgClick:!1,showCloseBtn:!0,enableEscapeKey:!0,removalDelay:300,mainClass:".mfp-figure animated bounceInLeft",callbacks:{open:function(){$(".mfp-container").css("text-align","left")}}}),"Sie wollen die Seite verlassen?"}var PF={},IBAN,cHelper,header,cDropdown,cSearch,cRequest,cBasket,versionInfo,SearchMenuIsOpen,HoldSearchMenuOpen,blockloading,doPopUp,getUrlParameter,buhl_scripte_loaded;PF.module={};PF.init=function(n,t,i){PF.module.hasOwnProperty(n)||(PF.module[n]={ids:t,activePatches:[]});for(var r=0;r<t.length;r++)PF.addClickEvent(n,"pf-"+t[r],i);$("#"+n+"_weiter").click(function(){PF.gotoTo(n)})};PF.addClickEvent=function(n,t,i){$("#"+t).click(function(){(n=="finanzen001"||n=="buero001")&&PF.uncheckAll(n);var r=this.id.split("-"),t=r[r.length-1];PF.clickActions(n,t);PF.patchIsCheckedGeneral(n,t)?PF.togglePatch(t,1,i):PF.togglePatch(t,0,i)})};PF.togglePatch=function(n,t,i){var f="checkbox",u="",r="";$("#img-"+n).length&&(r=document.getElementById("img-"+n).src);document.getElementById("cb-"+n).src.indexOf("radio")!==-1&&(f="radio");$("#pf-"+n).removeClass("produktfinderbox produktfinderbox_click");t==1?($("#pf-"+n).addClass("produktfinderbox_click"),u="_checked",i&&(r=r=r.replace(".svg","-a.svg"))):($("#pf-"+n).addClass("produktfinderbox"),u="",r=r=r.replace("-a.svg",".svg"));document.getElementById("cb-"+n).src="/shop/images/responsive/icons/customized/"+f+u+".svg";r!=""&&(document.getElementById("img-"+n).src=r)};PF.clickActions=function(n,t){var i=PF.oneIsCheckedCalc(n,t);i?($("#"+n+"_weiter").removeClass("pf_buttonDeactive"),$("#"+n+"_weiter").addClass("pf_buttonActive")):($("#"+n+"_weiter").removeClass("pf_buttonActive"),$("#"+n+"_weiter").addClass("pf_buttonDeactive"))};PF.oneIsCheckedCalc=function(n,t){for(var i,u=!1,r=0;r<PF.module[n].activePatches.length;r++)PF.module[n].activePatches[r]==t&&(u=!0);return u?(i=PF.module[n].activePatches.indexOf(t),i>-1&&PF.module[n].activePatches.splice(i,1)):PF.module[n].activePatches.push(t),PF.module[n].activePatches.length>0};PF.uncheckAll=function(n){for(var t=0;t<PF.module[n].activePatches.length;t++)PF.togglePatch(PF.module[n].activePatches[t],0);PF.module[n].activePatches=[]};PF.patchIsCheckedGeneral=function(n,t){var i=PF.module[n].activePatches.indexOf(t);return i>-1};PF.patchIsChecked=function(n,t){var i=PF.module[n].activePatches.indexOf(t);return i>-1&&PF.module[n].activePatches.length==1};PF.isKombi=function(n){return PF.module[n].activePatches.length>1};PF.gotoTo=function(n){var t=PF.getTarget(n);t!=""&&pf_goto(t)};PF.loadValues=function(n,t){for(var i=0;i<PF.module[n].activePatches.length;i++)PF.togglePatch(PF.module[n].activePatches[i],1,t);PF.module[n].activePatches.length>0&&($("#"+n+"_weiter").removeClass("pf_buttonDeactive"),$("#"+n+"_weiter").addClass("pf_buttonActive"))};PF.reset=function(){PF.module={}};PF.getTarget=function(n){if(PF.module[n].activePatches.length==0)return"";if(n=="steuer002"){if(PF.patchIsChecked(n,"arbeitnehmer"))return"steuer003_ergebnis1_st_sp_ts";if(PF.patchIsChecked(n,"selbststaendig"))return"steuer003_ergebnis3_sp_so_tp";if(PF.patchIsChecked(n,"vermieter")||PF.patchIsChecked(n,"kapitalertraege")||PF.patchIsChecked(n,"rentner")||PF.patchIsChecked(n,"studium"))return"steuer003_ergebnis2_sp_so_ts";if(PF.patchIsCheckedGeneral(n,"selbststaendig"))return"steuer003_ergebnis3_sp_so_tp";if(!PF.patchIsCheckedGeneral(n,"selbststaendig")&&PF.isKombi(n))return"steuer003_ergebnis2_sp_so_ts"}if(n=="buero001"){if(PF.patchIsChecked(n,"mitarbeiter"))return"buero002";if(PF.patchIsChecked(n,"alleine"))return"buero005"}if(n=="buero003"){if(PF.patchIsChecked(n,"basics"))return"buero003_ergebnis_mb_cloud";if(PF.patchIsChecked(n,"buchfuehrung")||PF.patchIsChecked(n,"pos")||PF.isKombi(n))return"buero003_ergebnis_mbp_cloud"}if(n=="buero004"){if(PF.patchIsChecked(n,"basics"))return"buero004_ergebnis_mb";if(PF.patchIsChecked(n,"buchfuehrung")||PF.patchIsChecked(n,"pos")||PF.isKombi(n))return"buero004_ergebnis_mbp"}if(n=="buero006"){if(PF.patchIsChecked(n,"basics"))return"buero006_ergebnis_mbonline";if(PF.patchIsChecked(n,"buchfuehrung")||PF.patchIsChecked(n,"pos")||PF.isKombi(n))return"buero006_ergebnis_mbp_cloud"}if(n=="finanzen001"){if(PF.patchIsChecked(n,"hhb"))return"finanzen002_ergebnis_hhb";if(PF.patchIsChecked(n,"kto"))return"finanzen002_ergebnis_kto";if(PF.patchIsChecked(n,"mg"))return"finanzen002_ergebnis_mg"}return""};IBAN={};IBAN.validateIban=function(n){var u=["BE16","DE22","EE20","FI18","FR27","GR27","IE22","IT27","MT31","NL18","AT20","PT25","SK24","SI19","ES25","CY28","BG22","DK18","GB22","LV21","LT20","LU20","PL28","RO24","SE24","CZ24","HU28","IS26","LI21","NO15","MC27","CH21"],i="",e=!1,r,o,t,f,s;if(n=n.replace(/\s/g,""),n.length>=2){for(i="WW",r=n.substring(0,2).toUpperCase(),o=n.length,t=0;t<u.length;t++)if(f=u[t].substring(0,2),s=parseInt(u[t].substring(2,4)),r==f&&(i="EU"),r==f&&o==s){e=!0;break}r=="DE"&&(i="DE")}return{modus:i,valid:e}};IBAN.checkShowHideBic_Basket=function(){var n,t;($("#cphContentMainPrimaryArea_ctlCheckoutPayment_ctlBankCollection_bicTextBox").addClass("hidden"),$("#cphContentMainPrimaryArea_ctlCheckoutPayment_ctlBankCollection_bicAutoGenHint").addClass("hidden"),$("#cphContentMainPrimaryArea_ctlCheckoutPayment_ctlBankCollection_bicLabel").addClass("hidden"),n=$.trim($("#cphContentMainPrimaryArea_ctlCheckoutPayment_ctlBankCollection_ibanTextBox").val().toUpperCase()),n=n.replace(/\s/g,""),t=IBAN.validateIban(n),t.modus!="")&&(t.modus=="DE"&&$("#cphContentMainPrimaryArea_ctlCheckoutPayment_ctlBankCollection_bicAutoGenHint").removeClass("hidden"),t.modus=="EU"&&($("#cphContentMainPrimaryArea_ctlCheckoutPayment_ctlBankCollection_bicTextBox").removeClass("hidden"),$("#cphContentMainPrimaryArea_ctlCheckoutPayment_ctlBankCollection_bicLabel").removeClass("hidden")))};IBAN.showError_Basket=function(n){$("#BankError").removeClass("hidden");$("#BankErrorContent").html(n)};IBAN.init_Basket=function(){IBAN.checkShowHideBic_Basket();$("#cphContentMainPrimaryArea_ctlCheckoutPayment_ctlBankCollection_ibanTextBox").keyup(function(){IBAN.checkShowHideBic_Basket()})};cHelper={};cHelper.getUrlParameter=function(n){for(var u=window.location.search.substring(1),r=u.split("&"),t,i=0;i<r.length;i++)if(t=r[i].split("="),t[0]===n)return t[1]===undefined?!0:decodeURIComponent(t[1])};cHelper.isMobile=function(){try{return document.createEvent("TouchEvent"),!0}catch(n){return!1}};header={};header.layerIsHovered=!1;header.timeout;header.showBasketDropDown=!1;header.initOverlayer=function(){header.showBasketDropDown=$("#showBasketDropDown").val();cBasket.itemsCount=$("#itemsCount").val();$("#header-loginPatch").mouseenter(function(){header.hideLayer("header-basket-dropdown");header.showLayer("header-user-dropdown");window.clearTimeout(header.timeout)}).mouseleave(function(){header.timeout=window.setTimeout(function(){header.layerIsHovered||header.hideLayer("header-user-dropdown")},1e3)});$("#header-user-dropdown").mouseenter(function(){header.layerIsHovered=!0}).mouseleave(function(){header.hideLayer("header-user-dropdown")});$("#header-BasketBut").mouseenter(function(){header.showBasketDropDownIsAllowed()&&(header.hideLayer("header-user-dropdown"),header.showLayer("header-basket-dropdown"),window.clearTimeout(header.timeout))}).mouseleave(function(){header.showBasketDropDownIsAllowed()&&(header.timeout=window.setTimeout(function(){header.layerIsHovered||header.hideLayer("header-basket-dropdown")},1e3))});$("#header-basket-dropdown").mouseenter(function(){header.layerIsHovered=!0}).mouseleave(function(){header.hideLayer("header-basket-dropdown")})};header.showLayer=function(n){$("#"+n).removeClass("hidden")};header.hideLayer=function(n){$("#"+n).removeClass("hidden");$("#"+n).addClass("hidden")};header.showBasketDropDownIsAllowed=function(){return!cBasket.currentPageIsBasket()&&header.showBasketDropDown&&cBasket.itemsCount>0&&!cHelper.isMobile()?!0:!1};header.toggleButtons=function(){var n=$(window).width();n>992};cDropdown={};cDropdown.open={};cDropdown.openSubMenu=function(n){$("#submenu_"+n).toggleClass("hidden");var t=$("#arrow_"+n).attr("src");t=t.includes("right")?t.replace("right","down"):t.replace("down","right");$("#arrow_"+n).attr("src",t)};cDropdown.close=function(){$("#header_dropdown_menu").addClass("hidden")};cDropdown.open=function(){$("#header_dropdown_menu").removeClass("hidden")};cSearch={};cSearch.typingTimer;cSearch.doneTypingInterval=200;cSearch.cSearchDefaultValue="buhl:Shop durchsuchen ...";cSearch.cSearchDefaultColor="#ccc";cSearch.cSearchActiveColor="#222";cSearch.resultIsOpen=!1;cSearch.init=function(){$("#headerSucheIco_1").click(function(){cSearch.open()});$("#header-searchWrapperClose").click(function(){cSearch.close()});$("#header-searchWrapperText").on("keyup",function(){window.clearTimeout(cSearch.typingTimer);typingTimer=window.setTimeout(function(){cSearch.get($("#header-searchWrapperText").val())},cSearch.doneTypingInterval)});$("#header-searchWrapperText").on("keydown",function(){window.clearTimeout(cSearch.typingTimer)});$("#header-searchWrapperText").focus(function(){cSearch.setStyle("active")});$(window).click(function(){cSearch.resultIsOpen&&($("#searchResultLayer").addClass("hidden"),cSearch.resultIsOpen=!1)})};cSearch.open=function(){$("#header-content").addClass("hidden");$("#header-searchWrapper").removeClass("hidden");cDropdown.close();cSearch.setStyle("deactive")};cSearch.close=function(){$("#header-content").removeClass("hidden");$("#header-searchWrapper").addClass("hidden");$("#searchResultLayer").addClass("hidden");cSearch.setStyle("deactive")};cSearch.setStyle=function(n){n=="active"&&($("#header-searchWrapperText").val(""),$("#header-searchWrapperText").css({color:cSearch.cSearchActiveColor}));n=="deactive"&&($("#header-searchWrapperText").val(cSearch.cSearchDefaultValue),$("#header-searchWrapperText").css({color:cSearch.cSearchDefaultColor}))};cSearch.get=function(){cRequest.get("shop/Search/getData",{q:$("#header-searchWrapperText").val()},cSearch.getReady)};cSearch.getReady=function(n){for(var i="",t=0;t<n.length;t++)i+='<div class="item"><a href="'+n[t].url+'">'+n[t].name+"<\/a><\/div>";i!=""?($("#searchResultLayer").removeClass("hidden"),$("#searchResultLayer").html(i),cSearch.resultIsOpen=!0):($("#searchResultLayer").addClass("hidden"),$("#searchResultLayer").html(""))};cRequest={};cRequest.get=function(n,t,i){var r=window.location.protocol+"//"+window.location.host;$.ajax({type:"POST",url:r+"/"+n,data:t,success:function(n){i(n)}})};cBasket={};cBasket.itemsCount;cBasket.removeItem=function(n){cRequest.get("Checkout/removeItem",{tempid:n},function(){cBasket.removeItemReady(n)})};cBasket.removeItemReady=function(n){$("#item_wrapper_"+n).remove();cBasket.itemsCount--;cBasket.itemsCount==0&&(header.hideLayer("header-basket-dropdown"),$("#header-BasketButQty").addClass("hidden"))};cBasket.currentPageIsBasket=function(){for(var t=["warenkorb.html","anmeldenmitbk.html","zahlungsart.html","bestellen.html","adresse_bk.html","anmeldenmitbkg_pe.html"],n=0;n<t.length;n++)if(window.location.pathname.indexOf(t[n])>=0)return!0;return!1};$(document).ready(function(){header.initOverlayer();cSearch.init();cHelper.getUrlParameter("produktfinder")=="load"&&start_productfinder_from_header();$(window).resize(function(){})});versionInfo={};_createVersionInfo();$(function(){function r(){if($("#anmelden-oben-rechts").hasClass("hide")){var n=$("#sucheingabe").val();if(n)return window.location.href="/suchergebnisse?query="+encodeURIComponent($("#sucheingabe").val()),!0}return!1}function t(n){(SearchMenuIsOpen=!0,$("#search_suchlupe").data("dont")!=1)&&($("#search_suchlupe").data("dont",1),setTimeout(function(){$(".has-feedback").addClass("showClass")},20),setTimeout(function(){$("#sucheingabe").attr("placeholder",$("#sucheingabe_label").val());$("#sucheingabe_label").data("txt",$("#sucheingabe").attr("placeholder"));n&&$("#sucheingabe").focus()},50),setTimeout(function(){$("#search_suchlupe").data("dont",0)},300))}function i(){(SearchMenuIsOpen=!1,$("#search_suchlupe").data("dont")!=1)&&($("#search_suchlupe").data("dont",1),$("#sucheingabe").attr("placeholder",""),$("#sucheingabe").val(""),$(".has-feedback").removeClass("showClass"),setTimeout(function(){},20),setTimeout(function(){$("#search_suchlupe").data("dont",0)},20))}function u(){$("#anmelden-oben-rechts").hasClass("hide")?i():t(!0)}function f(){SearchMenuIsOpen&&!HoldSearchMenuOpen&&(i(),HoldSearchMenuOpen=!1)}$("body").click(function(){f()});init_tooltips();$("img.icon_alert[title]").tooltip({position:"center right",onShow:function(){this.getTip().css("z-index","10001")},html:!0});$("#btnSearch").on("click",function(){doSearch($("#btnSearch").val())});$("#sucheingabe").on("click",function(){HoldSearchMenuOpen=!0});$("#sucheingabe").keypress(function(n){n.which==13&&(window.location.href="/suchergebnisse?query="+encodeURIComponent($("#sucheingabe").val()))});$("#sucheingabe").focusout(function(){$(".suchfeldoverlay").fadeOut();HoldSearchMenuOpen=!1});$("#sucheingabe").keyup(function(){this.value.length>2&&doSearch(this.value,".suchfeldoverlay")});$("#nav_top_suche").click(function(n){var i=n.pageX-$(this).offset().left,t;(i<24||i>202)&&(t=$("#sucheingabe").val(),t.length>2&&(window.location.href="/suchergebnisse?query="+encodeURIComponent(t)))});$("#sucheingabe2").focusout(function(){$(".suchfeldoverlay2").fadeOut()});$("#sucheingabe2").keyup(function(){this.value.length>2?$("#sucheingabe_label").data("txt").indexOf("Im Kundencenter suchen")==-1&&doSearch(this.value,"#suchfeldoverlay2"):$("#suchfeldoverlay2").fadeOut()});$("#suchfeldoverlay2").click(function(){$("#suchfeldoverlay2").fadeOut()});$(".suchfeldoverlay").click(function(){$(".suchfeldoverlay").fadeOut()});$("#topmenu-right-lupe").focusin(function(){t(!1)});$("#search_suchlupe").click(function(){r()||u()});$("ul.tabs_top").tabs("div.tabs_top_panes > div",{initialIndex:0});var e=navigator.userAgent.toLowerCase(),n=$(".scrollable .items a:first").attr("rel");$(".scrollable .items a").click(function(){var r=$(this),t=r.attr("rel"),u=$("#"+n),i;t!=n&&(n=t,u.fadeOut("fast",function(){var n=$(this),r=n.html(),i;n.html(r);i=$("#"+t);i.fadeIn("fast")}));i=$(this).children().attr("alt");$("#image_details").html(i)}).filter(":first").click();$(".content_accordeon_content").hide();$(".content_accordeon_btn").click(function(){var n=$(this).parent(".content_accordeon"),t=$(n).children(".content_accordeon_content").toggle("slow",function(){$(this).is(":visible")?($(this).siblings(".content_accordeon_btn").addClass("active"),$(this).siblings(".content_accordeon_btn").text("Details ausblenden")):($(this).siblings(".content_accordeon_btn").removeClass("active"),$(this).siblings(".content_accordeon_btn").text("Details einblenden"))})});$(".init_popover").popover()});SearchMenuIsOpen=!1;HoldSearchMenuOpen=!1;blockloading=!1;$.fn.cssCheckbox=function(n){var t=n||"",i=$("div").not("#myid");$(t+" input[type='checkbox'] + label.checkboxlabel").not("selectnot").each(function(){$(this).prev().attr("checked")==!0&&$(this).addClass("checked")});$(t+" input[type='checkbox'] + label.checkboxlabel").not("selectnot").click(function(){$(this).toggleClass("checked");var n=$(this).prev();n.length>0&&(n=$(n[0]),n.click())}).prev().hide();$(t+" .ausgeblendet  input[type='checkbox'] + label.checkboxlabel").not("selectnot").unbind("click");$(t+" .ausgeblendet input[type=checkbox]").not("selectnot").attr("disabled","disabled")};$.extend({createUploadIframe:function(n,t){var r="jUploadFrame"+n,i='<iframe id="'+r+'" name="'+r+'" style="position:absolute; top:-9999px; left:-9999px"';return window.ActiveXObject&&(typeof t=="boolean"?i+=' src="javascript:false"':typeof t=="string"&&(i+=' src="'+t+'"')),i+=" />",$(i).appendTo(document.body),$("#"+r).get(0)},createUploadForm:function(n,t,i){var e="jUploadForm"+n,s="jUploadFile"+n,r=$('<form  action="" method="POST" name="'+e+'" id="'+e+'" enctype="multipart/form-data"><\/form>'),f,u,o;if(i)for(f in i)$('<input type="hidden" name="'+f+'" value="'+i[f]+'" />').appendTo(r);return u=$("#"+t),o=$(u).clone(),$(u).attr("id",s),$(u).before(o),$(u).appendTo(r),$(r).css("position","absolute"),$(r).css("top","-1200px"),$(r).css("left","-1200px"),$(r).appendTo("body"),r},ajaxFileUpload:function(n){var u,t,f,i;n=jQuery.extend({},jQuery.ajaxSettings,n);var r=(new Date).getTime(),i=jQuery.createUploadForm(r,n.fileElementId,typeof n.data=="undefined"?!1:n.data),h=jQuery.createUploadIframe(r,n.secureuri),e="jUploadFrame"+r,o="jUploadForm"+r;n.global&&!jQuery.active++&&jQuery.event.trigger("ajaxStart");u=!1;t={};n.global&&jQuery.event.trigger("ajaxSend",[t,n]);f=function(r){var f=document.getElementById(e),o,s;try{f.contentWindow?(t.responseText=f.contentWindow.document.body?f.contentWindow.document.body.innerHTML:null,t.responseXML=f.contentWindow.document.XMLDocument?f.contentWindow.document.XMLDocument:f.contentWindow.document):f.contentDocument&&(t.responseText=f.contentDocument.document.body?f.contentDocument.document.body.innerHTML:null,t.responseXML=f.contentDocument.document.XMLDocument?f.contentDocument.document.XMLDocument:f.contentDocument.document)}catch(h){jQuery.handleError(n,t,null,h)}if(t||r=="timeout"){u=!0;try{o=r!="timeout"?"success":"error";o!="error"?(s=jQuery.uploadHttpData(t,n.dataType),n.success&&n.success(s,o),n.global&&jQuery.event.trigger("ajaxSuccess",[t,n])):jQuery.handleError(n,t,o)}catch(h){o="error";jQuery.handleError(n,t,o,h)}n.global&&jQuery.event.trigger("ajaxComplete",[t,n]);n.global&&!--jQuery.active&&jQuery.event.trigger("ajaxStop");n.complete&&n.complete(t,o);$(f).unbind();setTimeout(function(){try{$(f).remove();$(i).remove()}catch(r){jQuery.handleError(n,t,null,r)}},100);t=null}};n.timeout>0&&setTimeout(function(){u||f("timeout")},n.timeout);try{i=$("#"+o);$(i).attr("action",n.url);$(i).attr("method","POST");$(i).attr("target",e);i.encoding?$(i).attr("encoding","multipart/form-data"):$(i).attr("enctype","multipart/form-data");$(i).submit()}catch(s){jQuery.handleError(n,t,null,s)}return $("#"+e).load(f),{abort:function(){}}},uploadHttpData:function(n,t){var i=!t;return i=t=="xml"||i?n.responseXML:n.responseText,t=="script"&&jQuery.globalEval(i),t=="json"&&eval("data = "+i),t=="html"&&$("<div>").html(i).evalScripts(),i}});$(window).on("resize",function(){var n=0;$(".produktuebersicht_billboard .buhlbox").css("min-height",0);$(".produktuebersicht_billboard .buhlbox").each(function(t,i){$(i).outerHeight()>n&&(n=$(i).outerHeight())});$(".produktuebersicht_billboard .buhlbox").css("min-height",n);resizeBoxes()});$(document).ready(function(){var n=$("#teaserstartseite"),u=$("#bestsellers .boxbody .row > .clearfix"),t,i,r;$("#bestsellers .boxbody > .row > .clearfix").remove();$("#bestsellers .boxbody > .row").append(n);$("#bestsellers .boxbody > .row").append(u);window.location.href.indexOf("login/page.html")>0&&$("#cphContentMainPrimaryArea_content_2").addClass("col-md-9 col-sm-6 col-xs-12");t=$("#networking");$("#cphContentMainPrimaryArea_content_3").prepend(t);$("#mantel #cphContentMainPrimaryArea_teasergroup_4").length>0?$("#mantel #cphContentMainPrimaryArea_teasergroup_4").removeClass("col-md-3 col-sm-6 col-xs-12 paddingb20"):$("#cphContentMainPrimaryArea_teasergroup_4").addClass("col-md-3 col-sm-6 col-xs-12 paddingb20");$('.warenkorb_pfadleiste_text a[class*="_active"]').parent().parent().addClass("active");$("#cphContentMainPrimaryArea_teasergroup_4 #aktuelleEmpfehlung").removeClass("col-md-3 col-sm-6 col-xs-12 paddingb20").addClass("row");window.location.href.indexOf("testversionen/sonstige")>0&&(n=$("#cphContentMainPrimaryArea_content_4"),n.insertAfter("#cphContentMainPrimaryArea_teasergroup_3 div#aktuelleEmpfehlung"),n=null);$("table").not(".table").not(".not-responsive").addClass("table").parent().addClass("table-responsive");window.location.href.indexOf("testversionen/handwerkersoftware")>0&&(n=$("#cphContentMainPrimaryArea_teasergroup_4 > div.row"),n.addClass("margint20"),n.insertAfter("#cphContentMainPrimaryArea_content_3 div.buhlbox "),n=null);$("#mmsao .loginbox .loginbox").removeClass("loginbox");resizeBoxes();$(".tab-content .tabs_top_panes_inner").length>0&&$(".tab-content .tabs_top_panes_inner img").not(".img-responsive").addClass("img-responsive");i="placeholder"in document.createElement("input");r="placeholder"in document.createElement("textarea");i&&r||$("[placeholder]").focus(function(){var n=$(this);n.val()==n.attr("placeholder")&&n.data("placeholder")&&(n.val(""),n.removeClass("placeholder"))}).blur(function(){var n=$(this);n.val()==""?(n.addClass("placeholder"),n.val(n.attr("placeholder")),n.data("placeholder",!0)):n.data("placeholder",!1)}).blur().parents("form").submit(function(){$(this).find("[placeholder]").each(function(){var n=$(this);n.val()==n.attr("placeholder")&&n.data("placeholder")&&n.val("")})});$(".popup-iframe.mfp-iframe").magnificPopup({type:"iframe"});$(".open-gallery-link").click(function(){var n=[];$.each($(".slide > "),function(t,i){var r,u;typeof $(i).attr("src")!="undefined"&&(r={},r.src=$(i).attr("src"),r.type="image",r.title=$(i).attr("alt"),n.push(r));$(i).children().length>0&&(u=$(i).children(),$.each(u,function(t,i){if(i.nodeName=="IFRAME"){var r={};r.src=$(i).attr("src");r.type="iframe";n.push(r)}}))});$.magnificPopup.open({items:n,gallery:{enabled:!0,preload:[0,1]},type:"iframe",preloader:!0,closeBtnInside:!0})});$(".open-popup-link").magnificPopup({type:"inline",modal:!1,preloader:!0});$(".row-eq-height").each(function(){var n=$(this).find(".col-eq-height").map(function(){return $(this).outerHeight()}).get(),t=Math.max.apply(null,n);$(this).find(".col-eq-height").outerHeight(t)});$(".row-eq-height2").each(function(){var n=$(this).find(".col-eq-height2").map(function(){return $(this).outerHeight()}).get(),t=Math.max.apply(null,n);$(this).find(".col-eq-height2").outerHeight(t)});versionInfo.isSupportedBrowser()||$.magnificPopup.open({items:{src:"https://www.buhl.de/shop/old_browser_js.html",type:"iframe"},callbacks:{markupParse:function(n){n.find("iframe").addClass("old-browser")}}});$("a,input[type='button'],a.icon_rating").on("click",function(){doPopUp=!1})});$(document).on("keydown",function(n){n.keyCode==115&&n.ctrlKey&&(doPopUp=!0);(n.keyCode==116||n.keyCode==82&&n.ctrlKey)&&(doPopUp=!1)});doPopUp=!1;getUrlParameter=function(n){for(var u=decodeURIComponent(window.location.search.substring(1)),r=u.split("&"),t,i=0;i<r.length;i++)if(t=r[i].split("="),t[0]===n)return t[1]===undefined?!0:t[1]};$(function(){$(".lazy").Lazy()});buhl_scripte_loaded="loaded"