var bits=document.domain.split(".");var l=bits.length;document.domain=bits[(l-2)]+"."+bits[(l-1)];var qsParm=[];function qs(){var D=window.location.search.substring(1);var C=D.split("&");for(var B=0;B<C.length;B++){var F=C[B].indexOf("=");if(F>0){var A=C[B].substring(0,F);var E=C[B].substring(F+1);qsParm[A]=E}}}if(top!=self&&top.location.hostname!=self.location.hostname){qs();if(typeof (qsParm.checkitout)=="undefined"){top.location.replace(self.location.href)}else{var href="/checkitout.php?checkitout="+qsParm.checkitout;$.get(href,function(A){if(A!=1){top.location.replace(self.location.href)}})}}function toggleBox(A,C){var B=document.layers?document.layers[A]:document.getElementById?document.getElementById(A).style:document.all[A].style;if(B.visibility=="visible"){B.visibility="hidden"}else{if(B.visibility=="show"){B.visibility="hide"}else{B.visibility=document.layers?(C?"show":"hide"):(C?"visible":"hidden")}}}function loadWarenkorb(){var A=String(window.location);if(!(A.indexOf("warenkorb2010")!=-1&&A.indexOf("index")!=-1)){$("#minikorb").load("/warenkorb/warenkorb_ajax.php")}}function viewport(){var B=window.innerHeight;if(!B){B=$(window).height()}var A=window.innerWidth;if(!A){A=$(window).width()}return{x:$(window).scrollLeft(),y:$(window).scrollTop(),cx:$(window).width(),cy:$(window).height_opera95_fixed(),sy:B,sx:A}}jQuery.fn.height_opera95_fixed=function(){if(this[0]==window&&jQuery.browser.opera&&jQuery.browser.version>=9.5){return window.innerHeight}else{return $(this[0]).height()}};$(document).ready(function(){$(".jseinblenden").show();$(".jsausblenden").hide();var C="https://hilfe.westfalia.eu/";var A="http://hilfe.westfalia.de/";$(".hilfelink").each(function(){var L=$(this);L.addClass("thickbox");L.attr("target","_blank");var I=L.attr("href").split("#");var J="";var M="?";if(I[0].indexOf("?")>=0){M="&"}var H=I[0].indexOf("static");var K="";if(H>=0){K=I[0].substring(H)}else{var G=I[0].replace(/http(s)?:\/\//,"");var E=G.indexOf("/");K=G.substring(E)}if(K.length==0){K=I[0]}var D="";if(document.location.protocol=="http:"){D=A+K}else{D=C+K}if(typeof (I[1])!="undefined"&&I[1].length>0){J="&springto="+I[1]}var F=D+M+J+"&KeepThis=true&TB_iframe=true&height=450&width=580";L.attr("href",F)});$(".weitershoppen").click(function(){$.unblockUI();return false});$(".multikauf").click(function(){var E=$(this).attr("rel");var D=$(this).parents(".buyartikel").find("input[rel="+E+"]");if(D.val()==0){D.val(1)}});$(".buyartikel").submit(function(G){G.preventDefault();$.blockUI.defaults.css.width="427px";$.blockUI.defaults.css.cursor="default";$.blockUI.defaults.overlayCSS.cursor="default";$.blockUI({message:$("#waitimg")});var F={};var I="";var H="";var E=false;$(this).find("[name^=ANZAHL]").each(function(){I=$(this).attr("name");H=$(this).val();if(H!=""){E=true}F[I]=H});F.version="westfalia";F.ajax=1;if(E==false){$.blockUI({message:$("#nomenge")});return }qs();var D="";if(typeof (qsParm.vbSESSID)!="undefined"){D="?vbSESSID="+qsParm.vbSESSID}$.post("/warenkorb/kauf.php"+D,F,function(J){if(J==1){$.blockUI({message:$("#bought")});loadWarenkorb()}else{if(J=="nocookie"){$("#fehler").hide();$("#nocookie").show();$.blockUI({message:$("#notbought")})}else{$("#fehler").show();$("#nocookie").hide();$.blockUI({message:$("#notbought")})}}$(".blockOverlay").click(function(){$.unblockUI()})})});$(".more").click(function(){var D=$(this).attr("rel");obj=document.getElementById(D);$(this).parent("span").hide();$(obj).show();return false});$(".less").click(function(){var D=$(this).attr("rel");$(this).parent("span").hide();obj=document.getElementById(D);$(obj).show();return false});if($("#miniwarenkorb").length>0){$("#miniwarenkorb").show();loadWarenkorb()}var B="Artikelname / Artikelnummer / Schlagwort /  ....";$("#suchbegriff_fact_finder").val(B);$("#suchbegriff_fact_finder").focus(function(){if($(this).val()==B){$(this).val("")}});$("#suchbegriff_fact_finder").blur(function(){if($(this).val()==""){$(this).val(B)}});$("#brandselect").show();$(".dynamicselect").change(function(){document.location.href=$(this).val()});if(jQuery.support.opacity===false){$("img").each(function(){var E=$(this).attr("src");var D=E.split(".");if(D[D.length-1]=="png"){$(this).css("behavior",'url("/global/medien/skripte/iepngfix.htc")')}})}$(".sliderPortfolio").innerfade({speed:"slow",timeout:6000,type:"sequence",containerheight:"160px"});$(".flyoutlink").click(function(){var E=$(this).attr("rel");var D=$(this).parents(".sidebarmenu").offset();$(".flyoutmenu").hide();$("#"+E).clone(true).prependTo("body").css({top:D.top,left:D.left}).fadeIn("fast").animate({left:D.left+184});return false});$(".flyoutclose").click(function(){var D=$(this).offset();$(this).parents(".flyoutmenu").animate({left:D.left-182}).fadeOut("fast");return false});$(".cbtoggle").click(function(){if($(this).attr("checked")){$("#"+$(this).attr("rel")).show()}else{$("#"+$(this).attr("rel")).hide()}})});(function(A){A.fn.innerfade=function(B){this.each(function(){var D={animationtype:"fade",speed:"normal",timeout:2000,type:"sequence",containerheight:"auto",runningclass:"innerfade"};if(B){A.extend(D,B)}var E=A(this).children();if(E.length>1){A(this).css("position","relative");A(this).css("height",D.containerheight);A(this).addClass(D.runningclass);for(var C=0;C<E.length;C++){A(E[C]).css("z-index",String(E.length-C)).css("position","absolute");A(E[C]).hide()}if(D.type=="sequence"){setTimeout(function(){A.innerfade.next(E,D,1,0)},D.timeout);A(E[0]).show()}else{if(D.type=="random"){setTimeout(function(){do{current=Math.floor(Math.random()*(E.length))}while(current==0);A.innerfade.next(E,D,current,0)},D.timeout);A(E[0]).show()}else{alert("type must either be 'sequence' or 'random'")}}}})};A.innerfade=function(){};A.innerfade.next=function(D,B,E,C){if(B.animationtype=="slide"){A(D[C]).slideUp(B.speed,A(D[E]).slideDown(B.speed))}else{if(B.animationtype=="fade"){A(D[C]).fadeOut(B.speed);A(D[E]).fadeIn(B.speed)}else{alert("animationtype must either be 'slide' or 'fade'")}}if(B.type=="sequence"){if((E+1)<D.length){E=E+1;C=E-1}else{E=0;C=D.length-1}}else{if(B.type=="random"){C=E;while(E==C){E=Math.floor(Math.random()*(D.length))}}else{alert("type must either be 'sequence' or 'random'")}}setTimeout((function(){A.innerfade.next(D,B,E,C)}),B.timeout)}})(jQuery);(function(A){A.fn.hoverIntent=function(I,H){var J={sensitivity:7,interval:100,timeout:0};J=A.extend(J,H?{over:I,out:H}:I);var L,K,F,D;var E=function(M){L=M.pageX;K=M.pageY};var C=function(N,M){M.hoverIntent_t=clearTimeout(M.hoverIntent_t);if((Math.abs(F-L)+Math.abs(D-K))<J.sensitivity){A(M).unbind("mousemove",E);M.hoverIntent_s=1;return J.over.apply(M,[N])}else{F=L;D=K;M.hoverIntent_t=setTimeout(function(){C(N,M)},J.interval)}};var G=function(N,M){M.hoverIntent_t=clearTimeout(M.hoverIntent_t);M.hoverIntent_s=0;return J.out.apply(M,[N])};var B=function(P){var O=(P.type=="mouseover"?P.fromElement:P.toElement)||P.relatedTarget;while(O&&O!=this){try{O=O.parentNode}catch(P){O=this}}if(O==this){return false}var N=jQuery.extend({},P);var M=this;if(M.hoverIntent_t){M.hoverIntent_t=clearTimeout(M.hoverIntent_t)}if(P.type=="mouseover"){F=N.pageX;D=N.pageY;A(M).bind("mousemove",E);if(M.hoverIntent_s!=1){M.hoverIntent_t=setTimeout(function(){C(N,M)},J.interval)}}else{A(M).unbind("mousemove",E);if(M.hoverIntent_s==1){M.hoverIntent_t=setTimeout(function(){G(N,M)},J.timeout)}}};return this.mouseover(B).mouseout(B)}})(jQuery);(function(E){var I,H,G,D,F,J,C;E.fn.cluetip=function(K){var L={width:160,height:"auto",cluezIndex:97,positionBy:"fixed",topOffset:5,leftOffset:-180,local:true,hideLocal:true,attribute:"rel",titleAttribute:"title",splitTitle:"",showTitle:true,cluetipClass:"default",hoverClass:"",waitImage:false,cursor:"help",arrows:false,dropShadow:true,dropShadowSteps:6,sticky:false,mouseOutClose:true,activation:"hover",closePosition:"top",closeText:"Close",truncate:0,fx:{open:"show",openSpeed:""},hoverIntent:{sensitivity:3,interval:50,timeout:0},onActivate:function(M){return true},onShow:function(M,N){},ajaxCache:true,ajaxProcess:function(M){M=E(M).not("style, meta, link, script, title");return M},ajaxSettings:{dataType:"html"}};if(K&&K.ajaxSettings){E.extend(L.ajaxSettings,K.ajaxSettings);delete K.ajaxSettings}if(K&&K.fx){E.extend(L.fx,K.fx);delete K.fx}if(K&&K.hoverIntent){E.extend(L.hoverIntent,K.hoverIntent);delete K.hoverIntent}E.extend(L,K);return this.each(function(){var Y=false;var r=parseInt(L.cluezIndex,10)-1;var k=false;if(!I){H=E('<div id="cluetip-inner"></div>');D=E('<h3 id="cluetip-title"></h3>');G=E('<div id="cluetip-outer"></div>').append(H).prepend(D);I=E("<div></div>").attr({id:"cluetip"}).css({zIndex:L.cluezIndex}).append(G).append('<div id="cluetip-extra"></div>')[B](A).hide();E('<div id="cluetip-waitimage"></div>').css({position:"absolute",zIndex:r-1}).insertBefore("#cluetip").hide();I.css({position:"absolute",zIndex:r});G.css({position:"relative",zIndex:r+1});F=E('<div id="cluetip-arrows" class="cluetip-arrows"></div>').css({zIndex:r+1}).appendTo("#cluetip")}var q=(L.dropShadow)?+L.dropShadowSteps:0;if(!J){J=E([]);for(var m=0;m<q;m++){J=J.add(E("<div></div>").css({zIndex:r-m-1,opacity:0.1,top:1+m,left:1+m}))}J.css({position:"absolute",backgroundColor:"#000"}).prependTo(I)}var R=E(this);var b=R.attr(L.attribute),P=L.cluetipClass;if(!b&&!L.splitTitle){return true}if(L.local&&L.hideLocal){E(b+":first").hide()}var h=parseInt(L.topOffset,10),Q=parseInt(L.leftOffset,10);var c,S;var Z=isNaN(parseInt(L.height,10))?"auto":(/\D/g).test(L.height)?L.height:L.height+"px";var t,M,T,e,V;var p=parseInt(L.width,10)+parseInt(I.css("paddingLeft"))+parseInt(I.css("paddingRight"))+q;if(isNaN(p)){p=275}var o=this.offsetWidth;var g,U,f,W,a;var n;var N=(L.attribute!="title")?R.attr(L.titleAttribute):"";if(L.splitTitle){n=N.split(L.splitTitle);N=n.shift()}var j;var O=function(x){if(!L.onActivate(R)){return false}k=true;I.removeClass().css({width:L.width});if(b==R.attr("href")){R.css("cursor",L.cursor)}R.attr("title","");if(L.hoverClass){R.addClass(L.hoverClass)}M=T=R.offset().top;g=R.offset().left;W=x.pageX;V=x.pageY;if(R[0].tagName.toLowerCase()!="area"){t=E(document).scrollTop();a=E(window).width()}if(L.positionBy=="fixed"){U=o+g+Q;I.css({left:U})}else{U=(o>g&&g>p)||g+o+p+Q>a?g-p-Q:o+g+Q;if(R[0].tagName.toLowerCase()=="area"||L.positionBy=="mouse"||o+p>a){if(W+20+p>a){U=(W-p-Q)>=0?W-p-Q:W-(p/2)}else{U=W+Q}var v=U<0?x.pageY+h:x.pageY}I.css({left:(U>0&&L.positionBy!="bottomTop")?U:(W+(p/2)>a)?a/2-p/2:Math.max(W-(p/2),0)})}S=E(window).height();if(n){for(var w=0;w<n.length;w++){if(w==0){H.html(n[w])}else{H.append('<div class="split-body">'+n[w]+"</div>")}}d(v)}else{if(!L.local&&b.indexOf("#")!=0){if(Y&&L.ajaxCache){H.html(Y);d(v)}else{var y=L.ajaxSettings;y.url=b;y.beforeSend=function(){G.children().empty();if(L.waitImage){E("#cluetip-waitimage").css({top:V-10,left:parseInt(U+(p/2),10)}).show()}H.html("<i>loading</i>")};y.error=function(){if(k){H.html("<i>sorry, the contents could not be loaded</i>")}};y.success=function(AA){if(k){H.html(AA)}};y.complete=function(){C=E("#cluetip-inner img").length;if(C){E("#cluetip-inner img").load(function(){C--;if(C<1){E("#cluetip-waitimage").hide();if(k){d(v)}}})}else{E("#cluetip-waitimage").hide();if(k){d(v)}}};E.ajax(y)}}else{if(L.local){var z=E(b+":first");var u=E.fn.wrapInner?z.wrapInner("<div></div>").children().clone(true):z.html();E.fn.wrapInner?H.empty().append(u):H.html(u);d(v)}}}};var d=function(w){I.addClass("cluetip-"+P);if(L.truncate){var x=H.text().slice(0,L.truncate)+"...";H.html(x)}function u(){}N?D.show().html(N):(L.showTitle)?D.show().html("&nbsp;"):D.hide();if(L.sticky){var v=E('<div id="cluetip-close"><a href="#">'+L.closeText+"</a></div>");(L.closePosition=="bottom")?v.appendTo(H):(L.closePosition=="title")?v.prependTo(D):v.prependTo(H);v.click(function(){X();return false});if(L.mouseOutClose){I.hover(function(){u()},function(){v.trigger("click")})}else{I.unbind("mouseout")}}var y="";G.css({overflow:Z=="auto"?"visible":"auto",height:Z});c=Z=="auto"?I.outerHeight():parseInt(Z,10);e=T;if(L.positionBy=="fixed"){e=T-L.dropShadowSteps+h}else{if((U<W&&Math.max(U,0)+p>W)||L.positionBy=="bottomTop"){if(T+c+h>t+S&&V-t>c+h){e=V-c-h;y="top"}else{e=V+h;y="bottom"}}else{if(T+c+h>t+S){e=(c>=S)?t:t+S-c-h}else{if(R.css("display")=="block"||R[0].tagName.toLowerCase()=="area"||L.positionBy=="mouse"){e=w-h}else{e=T-L.dropShadowSteps}}}}if(y==""){U<g?y="left":y="right"}I.css({top:e+"px"}).removeClass().addClass("clue-"+y+"-"+P).addClass(" cluetip-"+P);if(L.arrows){var z=(T-e-L.dropShadowSteps);F.css({top:(/(left|right)/.test(y)&&U>=0&&z>0)?z+"px":/(left|right)/.test(y)?0:""}).show()}else{F.hide()}J.hide();I.hide()[L.fx.open](L.fx.open!="show"&&L.fx.openSpeed);if(L.dropShadow){J.css({height:c,width:L.width}).show()}L.onShow(I,H)};var s=function(){k=false;E("#cluetip-waitimage").hide();if(!L.sticky){X()}if(L.hoverClass){R.removeClass(L.hoverClass)}};var X=function(){G.parent().hide().removeClass().end().children().empty();if(N){R.attr("title",N)}R.css("cursor","");if(L.arrows){F.css({top:""})}};if(L.activation=="click"||L.activation=="toggle"){R.click(function(u){if(I.is(":hidden")){O(u)}else{s(u)}this.blur();return false})}else{R.click(function(){if(b==R.attr("href")){return false}});if(E.fn.hoverIntent&&L.hoverIntent){R.hoverIntent({sensitivity:L.hoverIntent.sensitivity,interval:L.hoverIntent.interval,over:function(u){O(u)},timeout:L.hoverIntent.timeout,out:function(u){s(u)}})}else{R.hover(function(u){O(u)},function(u){s(u)})}}})};var B="appendTo",A="body";E.cluetip={};E.cluetip.setup=function(K){if(K&&K.insertionType&&(K.insertionType).match(/appendTo|prependTo|insertBefore|insertAfter/)){B=K.insertionType}if(K&&K.insertionElement){A=K.insertionElement}}})(jQuery);$(document).ready(function(){$("a.basic").cluetip({cluetipClass:"bauteil",sticky:false});$("a.basic").css("cursor","help");$("a.lesezeichnen").cluetip({cluetipClass:"lesezeichnen"});$("a.lesezeichnen").css("cursor","help");$("a.warenkorb_layer").cluetip({cluetipClass:"warenkorb_layer"});$("a.warenkorb_layer").css("cursor","help");$(".season").hide();$("#breadcrumb a").each(function(){var A=$(this).attr("href");if(A.indexOf("?")>-1){$(this).attr("href",A+"&b=1")}else{$(this).attr("href",A+"?b=1")}})});function pop_up(F,B,E,A,D){var C="width="+E+",height="+A+",screenX=125,screenY=25,locationbar=no,menubar=no,scrollbars="+D+",resizable=yes,status=yes";popUpFenster=window.open("",B,C);popUpFenster.focus()}function pop_up_center(F,B,E,A,D){popupLeft=(screen.width/2)-(E/2);popupTop=(screen.height/2)-(A/2);var C="width="+E+",height="+A+",left="+popupLeft+",top="+popupTop+",locationbar=no,menubar=no,scrollbars="+D+",resizable=yes,status=yes";popUpFenster=window.open("",B,C);popUpFenster.focus()}function changeFrame(URI,FrameName){Frame=eval("parent."+FrameName);Frame.location.href=URI}function pop_up_url(F,B,E,A,D){var C="width="+E+",height="+A+",screenX=125,screenY=25,locationbar=no,menubar=no,scrollbars="+D+",resizable=yes,status=yes";popUpFenster=window.open(F,B,C);popUpFenster.focus()}function addtofav(){linkUrl=window.location.href;linkTitle=document.getElementsByTagName("title")[0].text;linkUrl=linkUrl.replace(/www1/,"www");linkUrl=linkUrl.replace(/www2/,"www");if((navigator.appName=="Microsoft Internet Explorer")&&(parseInt(navigator.appVersion)>=4)){window.external.AddFavorite(linkUrl,linkTitle);return true}else{if(window.sidebar&&window.sidebar.addPanel){window.sidebar.addPanel(linkTitle,linkUrl,"");return true}else{alert("Please hit [ctrl-d] to bookmark this page");return false}}}(function(E){var B;var F=window.location.host;var I=F.split(".");var A=I[0];var C=I[1];if(A=="de-dev"){C="dev"}E.geekGaTrackPage=function(K,P,M,O,J,N){var L=(("https:"==document.location.protocol)?"https://ssl.":"http://www.");var Q=L+"google-analytics.com/ga.js";E.ajax({type:"GET",url:Q,success:function(){if(typeof _gat!=="undefined"){B=_gat._getTracker(K);if(C!="dev"){B._trackPageview(P)}else{}if(typeof M!=="undefined"){if(C!="dev"){E.geekGaTrackEvent(M,O,J,N)}else{}}}},error:function(){throw"Unable to load ga.js; _gat has not been defined."},dataType:"script",cache:true})};E.geekGaTrackEvent=function(K,M,J,L){if(C=="dev"){return }if(typeof B!=="undefined"){B._trackEvent(K,M,J,L)}else{throw"Unable to track event; pageTracker has not been defined"}};if(typeof plstart!="undefined"&&plstart!==false){var D=new Date();var H=D.getTime()-plstart.getTime();if(H<2000){lc="< 2 Sekunde"}else{if(H<5000){lc="< 5 Sekunde"}else{if(H<10000){lc="< 10 Sekunde"}else{if(H<30000){lc="< 30 Sekunde"}else{if(H<45000){lc="< 45 Sekunde"}else{lc="> 45 Sekunde"}}}}}var G=document.location.pathname;if(document.location.search){G+=document.location.search}E.geekGaTrackPage("UA-4423771-5","","Page Load",lc,G,Math.round(H/1000))}else{E.geekGaTrackPage("UA-4423771-5")}if(A=="www2"||A=="de2-ssl"){E.geekGaTrackPage("UA-4423771-2")}})(jQuery);$(document).ready(function(){$(".eventtrackme").click(function(){var E=$(this).attr("rel").split("|");var C=E[0];var D=E[1];var A=E[2];var B=E[3];$.geekGaTrackEvent(C,D,A,B)})});
/*
 * jQuery blockUI plugin
 * Version 2.33 (29-MAR-2010)
 * @requires jQuery v1.2.3 or later
 *
 * Examples at: http://malsup.com/jquery/block/
 * Copyright (c) 2007-2008 M. Alsup
 * Dual licensed under the MIT and GPL licenses:
 * http://www.opensource.org/licenses/mit-license.php
 * http://www.gnu.org/licenses/gpl.html
 *
 * Thanks to Amir-Hossein Sobhi for some excellent contributions!
 */
(function(I){if(/1\.(0|1|2)\.(0|1|2)/.test(I.fn.jquery)||/^1.1/.test(I.fn.jquery)){alert("blockUI requires jQuery v1.2.3 or later!  You are using v"+I.fn.jquery);return }I.fn._fadeIn=I.fn.fadeIn;var C=function(){};var J=document.documentMode||0;var E=I.browser.msie&&((I.browser.version<8&&!J)||J<8);var F=I.browser.msie&&/MSIE 6.0/.test(navigator.userAgent)&&!J;I.blockUI=function(P){D(window,P)};I.unblockUI=function(P){H(window,P)};I.growlUI=function(T,R,S,P){var Q=I('<div class="growlUI"></div>');if(T){Q.append("<h1>"+T+"</h1>")}if(R){Q.append("<h2>"+R+"</h2>")}if(S==undefined){S=3000}I.blockUI({message:Q,fadeIn:700,fadeOut:1000,centerY:false,timeout:S,showOverlay:false,onUnblock:P,css:I.blockUI.defaults.growlCSS})};I.fn.block=function(P){return this.unblock({fadeOut:0}).each(function(){if(I.css(this,"position")=="static"){this.style.position="relative"}if(I.browser.msie){this.style.zoom=1}D(this,P)})};I.fn.unblock=function(P){return this.each(function(){H(this,P)})};I.blockUI.version=2.33;I.blockUI.defaults={message:"<h1>Please wait...</h1>",title:null,draggable:true,theme:false,css:{padding:0,margin:0,width:"30%",top:"40%",left:"35%",textAlign:"center",color:"#000",border:"3px solid #aaa",backgroundColor:"#fff",cursor:"wait"},themedCSS:{width:"30%",top:"40%",left:"35%"},overlayCSS:{backgroundColor:"#000",opacity:0.6,cursor:"wait"},growlCSS:{width:"350px",top:"10px",left:"",right:"10px",border:"none",padding:"5px",opacity:0.6,cursor:"default",color:"#fff",backgroundColor:"#000","-webkit-border-radius":"10px","-moz-border-radius":"10px","border-radius":"10px"},iframeSrc:/^https/i.test(window.location.href||"")?"javascript:false":"about:blank",forceIframe:false,baseZ:1000,centerX:true,centerY:true,allowBodyStretch:true,bindEvents:true,constrainTabKey:true,fadeIn:200,fadeOut:400,timeout:0,showOverlay:true,focusInput:true,applyPlatformOpacityRules:true,onBlock:null,onUnblock:null,quirksmodeOffsetHack:4};var B=null;var G=[];function D(R,c){var X=(R==window);var U=c&&c.message!==undefined?c.message:undefined;c=I.extend({},I.blockUI.defaults,c||{});c.overlayCSS=I.extend({},I.blockUI.defaults.overlayCSS,c.overlayCSS||{});var Z=I.extend({},I.blockUI.defaults.css,c.css||{});var m=I.extend({},I.blockUI.defaults.themedCSS,c.themedCSS||{});U=U===undefined?c.message:U;if(X&&B){H(window,{fadeOut:0})}if(U&&typeof U!="string"&&(U.parentNode||U.jquery)){var f=U.jquery?U[0]:U;var o={};I(R).data("blockUI.history",o);o.el=f;o.parent=f.parentNode;o.display=f.style.display;o.position=f.style.position;if(o.parent){o.parent.removeChild(f)}}var Y=c.baseZ;var k=(I.browser.msie||c.forceIframe)?I('<iframe class="blockUI" style="z-index:'+(Y++)+';display:none;border:none;margin:0;padding:0;position:absolute;width:100%;height:100%;top:0;left:0" src="'+c.iframeSrc+'"></iframe>'):I('<div class="blockUI" style="display:none"></div>');var j=I('<div class="blockUI blockOverlay" style="z-index:'+(Y++)+';display:none;border:none;margin:0;padding:0;width:100%;height:100%;top:0;left:0"></div>');var h,d;if(c.theme&&X){d='<div class="blockUI blockMsg blockPage ui-dialog ui-widget ui-corner-all" style="z-index:'+Y+';display:none;position:fixed"><div class="ui-widget-header ui-dialog-titlebar blockTitle">'+(c.title||"&nbsp;")+'</div><div class="ui-widget-content ui-dialog-content"></div></div>'}else{if(c.theme){d='<div class="blockUI blockMsg blockElement ui-dialog ui-widget ui-corner-all" style="z-index:'+Y+';display:none;position:absolute"><div class="ui-widget-header ui-dialog-titlebar blockTitle">'+(c.title||"&nbsp;")+'</div><div class="ui-widget-content ui-dialog-content"></div></div>'}else{if(X){d='<div class="blockUI blockMsg blockPage" style="z-index:'+Y+';display:none;position:fixed"></div>'}else{d='<div class="blockUI blockMsg blockElement" style="z-index:'+Y+';display:none;position:absolute"></div>'}}}h=I(d);if(U){if(c.theme){h.css(m);h.addClass("ui-widget-content")}else{h.css(Z)}}if(!c.applyPlatformOpacityRules||!(I.browser.mozilla&&/Linux/.test(navigator.platform))){j.css(c.overlayCSS)}j.css("position",X?"fixed":"absolute");if(I.browser.msie||c.forceIframe){k.css("opacity",0)}var W=[k,j,h],n=X?I("body"):I(R);I.each(W,function(){this.appendTo(n)});if(c.theme&&c.draggable&&I.fn.draggable){h.draggable({handle:".ui-dialog-titlebar",cancel:"li"})}var T=E&&(!I.boxModel||I("object,embed",X?null:R).length>0);if(F||T){if(X&&c.allowBodyStretch&&I.boxModel){I("html,body").css("height","100%")}if((F||!I.boxModel)&&!X){var b=M(R,"borderTopWidth"),g=M(R,"borderLeftWidth");var V=b?"(0 - "+b+")":0;var a=g?"(0 - "+g+")":0}I.each([k,j,h],function(p,u){var q=u[0].style;q.position="absolute";if(p<2){X?q.setExpression("height","Math.max(document.body.scrollHeight, document.body.offsetHeight) - (jQuery.boxModel?0:"+c.quirksmodeOffsetHack+') + "px"'):q.setExpression("height",'this.parentNode.offsetHeight + "px"');X?q.setExpression("width",'jQuery.boxModel && document.documentElement.clientWidth || document.body.clientWidth + "px"'):q.setExpression("width",'this.parentNode.offsetWidth + "px"');if(a){q.setExpression("left",a)}if(V){q.setExpression("top",V)}}else{if(c.centerY){if(X){q.setExpression("top",'(document.documentElement.clientHeight || document.body.clientHeight) / 2 - (this.offsetHeight / 2) + (blah = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + "px"')}q.marginTop=0}else{if(!c.centerY&&X){var r=(c.css&&c.css.top)?parseInt(c.css.top):0;var t="((document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + "+r+') + "px"';q.setExpression("top",t)}}}})}if(U){if(c.theme){h.find(".ui-widget-content").append(U)}else{h.append(U)}if(U.jquery||U.nodeType){I(U).show()}}if((I.browser.msie||c.forceIframe)&&c.showOverlay){k.show()}if(c.fadeIn){var e=c.onBlock?c.onBlock:C;var Q=(c.showOverlay&&!U)?e:C;var P=U?e:C;if(c.showOverlay){j._fadeIn(c.fadeIn,Q)}if(U){h._fadeIn(c.fadeIn,P)}}else{if(c.showOverlay){j.show()}if(U){h.show()}if(c.onBlock){c.onBlock()}}L(1,R,c);if(X){B=h[0];G=I(":input:enabled:visible",B);if(c.focusInput){setTimeout(O,20)}}else{A(h[0],c.centerX,c.centerY)}if(c.timeout){var S=setTimeout(function(){X?I.unblockUI(c):I(R).unblock(c)},c.timeout);I(R).data("blockUI.timeout",S)}}function H(S,T){var R=(S==window);var Q=I(S);var U=Q.data("blockUI.history");var V=Q.data("blockUI.timeout");if(V){clearTimeout(V);Q.removeData("blockUI.timeout")}T=I.extend({},I.blockUI.defaults,T||{});L(0,S,T);var P;if(R){P=I("body").children().filter(".blockUI").add("body > .blockUI")}else{P=I(".blockUI",S)}if(R){B=G=null}if(T.fadeOut){P.fadeOut(T.fadeOut);setTimeout(function(){K(P,U,T,S)},T.fadeOut)}else{K(P,U,T,S)}}function K(P,S,R,Q){P.each(function(T,U){if(this.parentNode){this.parentNode.removeChild(this)}});if(S&&S.el){S.el.style.display=S.display;S.el.style.position=S.position;if(S.parent){S.parent.appendChild(S.el)}I(Q).removeData("blockUI.history")}if(typeof R.onUnblock=="function"){R.onUnblock(Q,R)}}function L(P,T,U){var S=T==window,R=I(T);if(!P&&(S&&!B||!S&&!R.data("blockUI.isBlocked"))){return }if(!S){R.data("blockUI.isBlocked",P)}if(!U.bindEvents||(P&&!U.showOverlay)){return }var Q="mousedown mouseup keydown keypress";P?I(document).bind(Q,U,N):I(document).unbind(Q,N)}function N(S){if(S.keyCode&&S.keyCode==9){if(B&&S.data.constrainTabKey){var R=G;var Q=!S.shiftKey&&S.target==R[R.length-1];var P=S.shiftKey&&S.target==R[0];if(Q||P){setTimeout(function(){O(P)},10);return false}}}if(I(S.target).parents("div.blockMsg").length>0){return true}return I(S.target).parents().children().filter("div.blockUI").length==0}function O(P){if(!G){return }var Q=G[P===true?G.length-1:0];if(Q){Q.focus()}}function A(T,P,V){var U=T.parentNode,S=T.style;var Q=((U.offsetWidth-T.offsetWidth)/2)-M(U,"borderLeftWidth");var R=((U.offsetHeight-T.offsetHeight)/2)-M(U,"borderTopWidth");if(P){S.left=Q>0?(Q+"px"):"0"}if(V){S.top=R>0?(R+"px"):"0"}}function M(P,Q){return parseInt(I.css(P,Q))||0}})(jQuery);$(document).ready(function(){$("#bsw_mouseover").cluetip({cluetipClass:"bsw_text",topOffset:40});$(".zahlart_radio").click(function(){zahloptions($(this).val(),0)});$("#country").change(function(){proof_land()});$("#anrede").change(function(){proof_anrede()});$(".newcalc").change(function(){calcload()});$(".infodazu").cluetip({cluetipClass:"bsw_text",topOffset:40});$(".wohnhaft").change(function(){proof_wohnhaft()});$(".freelance").click(function(){proof_freelance()});$(".employedsince").change(function(){proof_employedsince()});$(".morezub").click(function(){var A=$(this).attr("rel");$("."+A).show();$(this).hide();return false});$(".receive_mail").click(function(A){A.preventDefault();$.blockUI({message:$("#waiting").html()});$(".msgs").hide();$("#"+$(this).attr("rel")).show();$.ajax({url:"/warenkorb/kredit_layer.php",cache:false,dataType:"script",data:"cmd=receive_mail",success:function(B){},complete:function(){$.blockUI({message:$("#finished")})}})});$(".print_pdf").click(function(C){C.preventDefault();$.blockUI({message:$("#waiting").html()});$(".msgs").hide();var B="";qs();var A="";if(typeof (qsParm.vbSESSID)!="undefined"){A="&vbSESSID="+qsParm.vbSESSID}B=window.open("/warenkorb/kredit_layer.php?cmd=serve_pdf"+A,"vertrag","menubar=no,width=800,height=600,toolbar=yes");if(B!=""){$("#"+$(this).attr("rel")).show()}else{$("#err").show()}$.blockUI({message:$("#finished")})});$("#kredit_ok").click(function(){$.ajax({url:"kredit_layer.php",cache:false,dataType:"script",data:"cmd=clear_data",success:function(A){},complete:function(){$.unblockUI()}})})});function proof_anrede(){var A=$("#anrede").val();if(A==4||A==9){if(A==4){$("#firm").show();$("#vat_block").show();$("#other").hide()}else{$("#firm").hide();$("#vat_block").hide();$("#other").show()}$("#firma_row").show();$("#kredit").removeAttr("selected").removeAttr("checked");zahloptions(0,0);$("#kredit_row").hide()}else{$("#firma_row").hide();$("#vat_block").hide();$("#kredit_row").show()}}function calcload(){if(isNumeric($("#geb_tt").val())&&isNumeric($("#geb_mm").val())&&isNumeric($("#geb_jjjj").val())&&$("#kredit").attr("checked")){if(lessthanXyearsago("geb",18)){$("#calctable").html('<div class="calcmsg">Leider ist eine Ratenzahlung erst ab 18 möglich.</div>')}else{if(!(lessthanXyearsago("geb",100))){$("#calctable").html('<div class="calcmsg">Leider ist aus technischen Gründen eine Ratenzahlung nur bis zu einem Alter von maximal 99 Jahren möglich. </div>')}else{$("#calctable").html('<img src="/global/medien/skripte/js/loading.gif">');var C=$("#geb_jjjj").val()+"-"+$("#geb_mm").val()+"-"+$("#geb_tt").val();var A="ajax_santander_calcs.php?zahltag="+$("#zahltag").val()+"&laufzeit="+$("#laufzeit").val()+"&dob="+C;qs();var B="";if(typeof (qsParm.vbSESSID)!="undefined"){B="&vbSESSID="+qsParm.vbSESSID}$("#calctable").load(A+B,"",boldLaufzeit)}}}}function boldLaufzeit(){$(".zins").css("font-weight","normal");$("#m"+$("#laufzeit").val()).css("font-weight","bold")}function zahloptions(B,A){if(B=="6"){$("#bankverbindung").show()}else{$("#bankverbindung").hide()}if(B=="5"){$(".kreditfeld").show();if($("#geb_tt").val()==""||$("#geb_mm").val()==""||$("#geb_jjjj").val()==""){$("#dobinfo").css("color","red")}if($("#telefon").val()==""||$("#telefon_vorwahl").val()==""){$("#telinfo").css("color","red")}$(".kreditchangemax").attr("maxlength",23);$("#email").attr("maxlength",50);calcload()}else{$(".kreditfeld").hide();$(".kreditchangemax").attr("maxlength",27);$("#email").attr("maxlength",80);$("#telefon").attr("maxlength",8)}}function proof_land(){var A=$("#country").val();if(A==95){$("#LayerLaender").show();if($("#LayerLaender").hasClass("js_newkasse")){if($("select","#LayerLaender").length==0){var B="?cmd=loadlandlayer&ajax=1";$.ajax({url:B,dataType:"json",success:function(D){$("#LayerLaender").html(D)},error:function(F,D,E){$("#LayerLaender").html("Fehler")}})}$("#ad_plz").attr("maxlength","10")}$("#Schritt_Lieferanschrift").hide();$("#rechnung").attr("checked","checked");$("#Schritt_Zahlungsart").hide()}else{$("#LayerLaender").hide();$("#Schritt_Lieferanschrift").show();$("#Schritt_Zahlungsart").show();$("#ad_plz").attr("maxlength","5")}if($("#otherShop").hasClass("js_newkasse")){if(A!=95&&A!=1){var B="?cmd=loaddomain&ajax=1&land="+A;$.ajax({url:B,dataType:"json",success:function(D){$(".js_domain","#otherShop").attr("href","http://"+D);$(".js_domain","#otherShop").html(D)},error:function(F,D,E){$("#otherShop").html("Fehler")}});$("#otherShop").show()}else{$("#otherShop").hide()}}else{if(A==2||A==4){var C="Anderer Laendershop";$("#otherShop").show();if(A==2){$.geekGaTrackEvent(C,"Oesterreich","Auswahl",0);$("#at").show()}else{$("#at").hide()}if(A==4){$.geekGaTrackEvent(C,"Schweiz","Auswahl",0);$("#ch").show()}else{$("#ch").hide()}}else{$("#otherShop").hide();$("#at").hide();$("#ch").hide()}}}function on_submit(){window.scrollTo(0,0);$.blockUI({message:$("#uiblock_loading").html(),centerY:0,css:{top:"30%"}});return(false)}function isNumeric(A){if(A==null||A==""||!A.toString().match(/^[-]?\d*\.?\d*$/)){return false}return true}function lessthan3monthsago(C){var B=new Date;B.setMonth(B.getMonth()-3);var A=new Date;A.setDate($("#"+C+"_tt").val());A.setMonth($("#"+C+"_mm").val()-1);A.setYear($("#"+C+"_jjjj").val());if(A.getTime()>B.getTime()){return true}return false}function lessthanXyearsago(D,A){var C=new Date;C.setYear(C.getFullYear()-A);var B=new Date;B.setDate($("#"+D+"_tt").val());B.setMonth($("#"+D+"_mm").val()-1);B.setYear($("#"+D+"_jjjj").val());if(B.getTime()>C.getTime()){return true}return false}function proof_wohnhaft(){if(isNumeric($("#wohnhaft_tt").val())&&isNumeric($("#wohnhaft_mm").val())&&isNumeric($("#wohnhaft_jjjj").val())){if(lessthanXyearsago("wohnhaft",3)){$(".prevaddr").show()}else{$(".prevaddr").hide()}}else{$(".prevaddr").hide()}}function proof_employedsince(){if(isNumeric($("#employedsince_tt").val())&&isNumeric($("#employedsince_mm").val())&&isNumeric($("#employedsince_jjjj").val())){if(lessthan3monthsago("employedsince")){$(".prevemployer").show()}else{$(".prevemployer").hide()}}else{$(".prevemployer").hide()}}function proof_freelance(){var A=$(".freelance:checked").val();if(A==1){$(".freelancer").show();$(".nofreelancer").hide();$(".prevemployer").hide()}else{$(".freelancer").hide()}if(A==0){$(".freelancer").hide();$(".nofreelancer").show();proof_employedsince()}else{$(".nofreelancer").hide()}}var tb_pathToImage="/global/medien/skripte/js/loadingAnimation.gif";$(document).ready(function(){tb_init("a.thickbox, area.thickbox, input.thickbox");imgLoader=new Image();imgLoader.src=tb_pathToImage});function tb_init(A){$(A).click(function(){var C=this.title||this.name||null;var B=this.href||this.alt;var D=this.rel||false;tb_show(C,B,D);this.blur();return false})}function tb_show(I,B,G){try{if(typeof document.body.style.maxHeight==="undefined"){$("body","html").css({height:"100%",width:"100%"});$("html").css("overflow","hidden");if(document.getElementById("TB_HideSelect")===null){$("body").append("<iframe id='TB_HideSelect'></iframe><div id='TB_overlay' onClick='tb_remove();'></div><div id='TB_window'></div>");$("#TB_overlay").click(tb_remove)}}else{if(document.getElementById("TB_overlay")===null){$("body").append("<div id='TB_overlay' onClick='tb_remove()';></div><div id='TB_window'></div>");$("#TB_overlay").click(tb_remove)}}if(tb_detectMacXFF()){$("#TB_overlay").addClass("TB_overlayMacFFBGHack")}else{$("#TB_overlay").addClass("TB_overlayBG")}if(I===null){I=""}$("body").append("<div id='TB_load'><img src='"+imgLoader.src+"' /></div>");$("#TB_load").show();var C;if(B.indexOf("?")!==-1){C=B.substr(0,B.indexOf("?"))}else{C=B}var E=/\.jpg$|\.jpeg$|\.png$|\.gif$|\.bmp$/;var J=C.toLowerCase().match(E);if(J==".jpg"||J==".jpeg"||J==".png"||J==".gif"||J==".bmp"){TB_PrevCaption="";TB_PrevURL="";TB_PrevHTML="";TB_NextCaption="";TB_NextURL="";TB_NextHTML="";TB_imageCount="";TB_FoundURL=false;if(G){TB_TempArray=$("a[@rel="+G+"]").get();for(TB_Counter=0;((TB_Counter<TB_TempArray.length)&&(TB_NextHTML===""));TB_Counter++){var F=TB_TempArray[TB_Counter].href.toLowerCase().match(E);if(!(TB_TempArray[TB_Counter].href==B)){if(TB_FoundURL){TB_NextCaption=TB_TempArray[TB_Counter].title;TB_NextURL=TB_TempArray[TB_Counter].href;TB_NextHTML="<span id='TB_next'>&nbsp;&nbsp;<a href='#'>Next &gt;</a></span>"}else{TB_PrevCaption=TB_TempArray[TB_Counter].title;TB_PrevURL=TB_TempArray[TB_Counter].href;TB_PrevHTML="<span id='TB_prev'>&nbsp;&nbsp;<a href='#'>&lt; Prev</a></span>"}}else{TB_FoundURL=true;TB_imageCount="Image "+(TB_Counter+1)+" of "+(TB_TempArray.length)}}}imgPreloader=new Image();imgPreloader.onload=function(){imgPreloader.onload=null;var N=tb_getPageSize();var L=N[0]-150;var Q=N[1]-150;var M=imgPreloader.width;var K=imgPreloader.height;if(M>L){K=K*(L/M);M=L;if(K>Q){M=M*(Q/K);K=Q}}else{if(K>Q){M=M*(Q/K);K=Q;if(M>L){K=K*(L/M);M=L}}}TB_WIDTH=M+30;TB_HEIGHT=K+60;$("#TB_window").append("<a href='' id='TB_ImageOff' title='Schliessen'><img id='TB_Image' src='"+B+"' width='"+M+"' height='"+K+"' alt='"+I+"'/></a><div id='TB_caption'>"+I+"<div id='TB_secondLine'>"+TB_imageCount+TB_PrevHTML+TB_NextHTML+"</div></div><div id='TB_closeWindow'><a href='#' id='TB_closeWindowButton' title='Schliessen'>Schlie&szlig;en</a> oder Esc-Taste drucken</div>");$("#TB_closeWindowButton").click(tb_remove);if(!(TB_PrevHTML==="")){function P(){if($(document).unbind("click",P)){$(document).unbind("click",P)}$("#TB_window").remove();$("body").append("<div id='TB_window'></div>");tb_show(TB_PrevCaption,TB_PrevURL,G);return false}$("#TB_prev").click(P)}if(!(TB_NextHTML==="")){function O(){$("#TB_window").remove();$("body").append("<div id='TB_window'></div>");tb_show(TB_NextCaption,TB_NextURL,G);return false}$("#TB_next").click(O)}document.onkeydown=function(R){if(R==null){keycode=event.keyCode}else{keycode=R.which}if(keycode==27){tb_remove()}else{if(keycode==190){if(!(TB_NextHTML=="")){document.onkeydown="";O()}}else{if(keycode==188){if(!(TB_PrevHTML=="")){document.onkeydown="";P()}}}}};tb_position();$("#TB_load").remove();$("#TB_ImageOff").click(tb_remove);$("#TB_window").css({display:"block"})};imgPreloader.src=B}else{var A=B.replace(/^[^\?]+\??/,"");var D=tb_parseQuery(A);TB_WIDTH=(D.width*1)+30||630;TB_HEIGHT=(D.height*1)+40||440;ajaxContentW=TB_WIDTH-30;ajaxContentH=TB_HEIGHT-45;if(B.indexOf("TB_iframe")!=-1){urlNoQuery=B.split("TB_");$("#TB_iframeContent").remove();if(D.modal!="true"){$("#TB_window").append("<div id='TB_title'><div id='TB_ajaxWindowTitle'>"+I+"</div><div id='TB_closeAjaxWindow'><a href='#' id='TB_closeWindowButton' title='Schliessen'>Schlie&szlig;en</a> oder Esc-Taste drucken</div></div><iframe frameborder='0' hspace='0' src='"+urlNoQuery[0]+"' id='TB_iframeContent' name='TB_iframeContent"+Math.round(Math.random()*1000)+"' onload='tb_showIframe()' style='width:"+(ajaxContentW+29)+"px;height:"+(ajaxContentH+17)+"px;' > </iframe>")}else{$("#TB_overlay").unbind();$("#TB_window").append("<iframe frameborder='0' hspace='0' src='"+urlNoQuery[0]+"' id='TB_iframeContent' name='TB_iframeContent"+Math.round(Math.random()*1000)+"' onload='tb_showIframe()' style='width:"+(ajaxContentW+29)+"px;height:"+(ajaxContentH+17)+"px;'> </iframe>")}}else{if($("#TB_window").css("display")!="block"){if(D.modal!="true"){$("#TB_window").append("<div id='TB_title'><div id='TB_ajaxWindowTitle'>"+I+"</div><div id='TB_closeAjaxWindow'><a href='#' id='TB_closeWindowButton'>Schlie&szlig;en</a> oder Esc-Taste drucken</div></div><div id='TB_ajaxContent' style='width:"+ajaxContentW+"px;height:"+ajaxContentH+"px'></div>")}else{$("#TB_overlay").unbind();$("#TB_window").append("<div id='TB_ajaxContent' class='TB_modal' style='width:"+ajaxContentW+"px;height:"+ajaxContentH+"px;'></div>")}}else{$("#TB_ajaxContent")[0].style.width=ajaxContentW+"px";$("#TB_ajaxContent")[0].style.height=ajaxContentH+"px";$("#TB_ajaxContent")[0].scrollTop=0;$("#TB_ajaxWindowTitle").html(I)}}$("#TB_closeWindowButton").click(tb_remove);if(B.indexOf("TB_inline")!=-1){$("#TB_ajaxContent").append($("#"+D.inlineId).children());$("#TB_window").unload(function(){$("#"+D.inlineId).append($("#TB_ajaxContent").children())});tb_position();$("#TB_load").remove();$("#TB_window").css({display:"block"})}else{if(B.indexOf("TB_iframe")!=-1){tb_position();if($.browser.safari){$("#TB_load").remove();$("#TB_window").css({display:"block"})}}else{$("#TB_ajaxContent").load(B+="&random="+(new Date().getTime()),function(){tb_position();$("#TB_load").remove();tb_init("#TB_ajaxContent a.thickbox");$("#TB_window").css({display:"block"})})}}}if(!D.modal){document.onkeyup=function(K){if(K==null){keycode=event.keyCode}else{keycode=K.which}if(keycode==27){tb_remove()}}}}catch(H){}}function tb_showIframe(){$("#TB_load").remove();$("#TB_window").css({display:"block"})}function tb_remove(){$("#TB_imageOff").unbind("click");$("#TB_closeWindowButton").unbind("click");$("#TB_window").hide();$("#TB_window").fadeOut("fast",function(){$("#TB_window,#TB_overlay,#TB_HideSelect").trigger("unload").unbind().remove()});$("#TB_load").remove();if(typeof document.body.style.maxHeight=="undefined"){$("body","html").css({height:"auto",width:"auto"});$("html").css("overflow","")}document.onkeydown="";document.onkeyup="";return false}function tb_position(){$("#TB_window").css({marginLeft:"-"+parseInt((TB_WIDTH/2),10)+"px",width:TB_WIDTH+"px"});if(!(jQuery.browser.msie&&jQuery.browser.version<7)){$("#TB_window").css({marginTop:"-"+parseInt((TB_HEIGHT/2),10)+"px"})}}function tb_parseQuery(D){var E={};if(!D){return E}var A=D.split(/[;&]/);for(var C=0;C<A.length;C++){var G=A[C].split("=");if(!G||G.length!=2){continue}var B=unescape(G[0]);var F=unescape(G[1]);F=F.replace(/\+/g," ");E[B]=F}return E}function tb_getPageSize(){var C=document.documentElement;var A=window.innerWidth||self.innerWidth||(C&&C.clientWidth)||document.body.clientWidth;var B=window.innerHeight||self.innerHeight||(C&&C.clientHeight)||document.body.clientHeight;arrayPageSize=[A,B];return arrayPageSize}function tb_detectMacXFF(){var A=navigator.userAgent.toLowerCase();if(A.indexOf("mac")!=-1&&A.indexOf("firefox")!=-1){return true}}var debug=false;var currentwk="";var zublayer=[];var zubzeile=[];var layerloaded=[];var submitted=false;var zubpfeillocked=false;var lang=getMetaContents("content-language");if(lang==""){lang="de"}var meldung=[];meldung.de=[];meldung.de.unknown_err="Unbekannter Fehler!";meldung.de.bad_artnr="Artikelnummer ist fehlerhaft!";meldung.de.no_artnr="Bitte geben Sie eine Artikelnummer ein.";meldung.de.bad_anzahl="Die eingegebene Anzahl ist ungültig!";meldung.de.fill_pflichtfelder="Bitte füllen Sie alle Pflichtfelder aus.";meldung.de.is_pflichtfeld="Dieses Feld ist ein Pflichtfeld.";meldung.de.no_gravurtext="Bitte geben Sie einen Text ein.";meldung.de.short_login="Die Länge des Loginnamen und des Passwortes sollte mehr als 6 Zeichen betragen!";meldung.de.art_added=" wurde erfolgreich im Warenkorb eingetragen.";meldung.de.no_zahlart="Bitte wählen Sie eine Zahlart!";function getMetaContents(C){var A=document.getElementsByTagName("meta");for(var B in A){if(A[B].name==C){return A[B].content}}}function get_uniqueid(C,B){var E=C.attr("id");var F="";if(E==""){var A=C.attr("name");if(A===undefined||A==""){var D=new Date();A="x_"+D.getTime();C.attr("id",A)}F=A.replace(/\[/,"").replace(/\]/,"")+$("[name="+A+"]").index(C)}else{F=E}return B+"_"+F}function max_zindex(){var A=0;$(".js_popup:visible").each(function(){var B=Number($(this).css("z-index"));if(A<B){A=B}});return(A+1)}function position(C,N,J,G){if(C.length===0){return }var A=C.offset();var L=C.outerWidth(true);var B=L-C.width();if(B>0){L=L-(B/2)}var O=A.left+L;var E=C.outerHeight(true);var K=A.top+(E/2);var M=viewport();var F=N.is(".helplayer, .zubehoerlayer");var I=N.is(".layerok, .layerbusy");var H={position:"absolute",visibility:"hidden",display:"block"};var D=0;$(".js_close",N).click(function(P){P.preventDefault();$(this).parents(".js_popup").fadeOut();if(!($.browser.msie)){$(this).parents(".js_popup").fadeOut(100)}else{$(this).parents(".js_popup").hide()}});$(N).mouseover(function(){var P=max_zindex();if(Number($(this).css("z-index"))+1!=P){$(this).css("z-index",P)}});setTimeout(function(){$.swap(N[0],H,function(){D=N.width();if(!I){if(J=="left"||(!N.hasClass("zubehoerlayer")&&O+D>M.cx)){O=A.left-D;if(F){N.addClass("help_right")}}else{if(J>0){O=J+10;if(G>0){K=G}}else{if(F){N.removeClass("help_right")}}}}else{var Q=C.position();D=32;if(J!="left"){O=Q.left+L-10}else{O=Q.left-D}K=Q.top}if(F){K=K-43}var P=max_zindex();N.css({left:O,top:K,width:D,"z-index":P})});if(!($.browser.msie)){N.fadeIn()}else{N.show()}},100)}function clear(B){B.parents(".js_errhere").removeClass("error");$(".error",B).removeClass("error");B.removeClass("error");var A=get_uniqueid(B,"error");$("#"+A).remove()}function bind_js_stuff(A){$(".js_kasseausblenden, #miniwarenkorb",A).hide();$(".js_kasseeinblenden",A).show();$(".js_errclose",A).click(function(B){B.preventDefault();if($(this).parents(".js_popup").length==0){$(this).parents(".js_errorbox").slideUp(1000)}else{$(this).parents(".js_popup").remove()}})}function minitip(B,C,E){if(C!="busy"&&C!="okay"){return false}clear(B);var D=get_uniqueid(B,"minitip");$("#"+D).remove();var A=$("#"+C).clone();A.attr("id",D);B.after(A);B.parent().css("position","relative");position(B,A,E);if(C=="okay"){setTimeout(function(){if(!($.browser.msie)){$("#"+D).fadeOut(100,function(){$(this).remove()})}else{$("#"+D).remove()}},5000)}return D}function error(D,C,G,H,J){if(J!==false){clear(D)}var A=get_uniqueid(D,"error");if(C!=""){var I=$("#errortemplate").clone();I.attr("id",A);$(".helplayertop",I).append(C);bind_js_stuff(I);bind_ajaxlink(I);var B=5000;var F=$(".js_errortime",I).text();if(F!=""){B=F*1000}$("body").append(I);position(D,I);setTimeout(function(){if(!($.browser.msie)){$("#"+A).fadeOut(100,function(){$(this).remove()})}else{$("#"+A).remove()}},B)}if(G===true){if(H!==undefined&&H!=""){D=H}var E=D.parents(".js_errhere");if(E.length>0){E.addClass("error")}else{D.addClass("error")}}}function valid_artnr(B){B=B.replace(/^\s*/,"").replace(/\s*$/,"");var A=new RegExp("^[0-9]{6}$");if(!B.match(A)){if(B=="87765"||B=="0087765"){return true}return false}return true}function valid_anzahl(B){B=B.replace(/^\s*/,"").replace(/\s*$/,"");var A=new RegExp("^[1-9][0-9]*$");if(B!=""&&!B.match(A)){return false}if(B>1000){return false}return true}function zebra(){$("tr.js_art:visible:odd","#js_wklist").removeClass("even").addClass("odd");$("tr.js_art:visible:even","#js_wklist").removeClass("odd").addClass("even")}function zubehoer_pfeil(D){if($(".js_zubslider",D).length>0){if($("fieldset.js_zubzeile",D).length<=3){$(".js_zubpfeildown",D).slideUp();$(".js_zubpfeilup",D).slideUp();$(".js_zubcontainer",D).css({position:""});$(".js_zubslider",D).removeClass("italiener")}else{if($("fieldset.js_zubzeile:not(.hidden):last",D).attr("id")!=$("fieldset.js_zubzeile:last",D).attr("id")){$(".js_zubpfeildown",D).removeClass("zubscrollinactive").addClass("zubscrollactive")}else{$(".js_zubpfeildown",D).removeClass("zubscrollactive").addClass("zubscrollinactive")}if($("fieldset.js_zubzeile:not(.hidden):first",D).attr("id")!=$("fieldset.js_zubzeile:first",D).attr("id")){$(".js_zubpfeilup",D).removeClass("zubscrollinactive").addClass("zubscrollactive")}else{$(".js_zubpfeilup",D).removeClass("zubscrollactive").addClass("zubscrollinactive")}}if($("fieldset.js_zubzeile:not(.hidden)",D).length<3){var B=$("fieldset.js_zubzeile.hidden:last",D);var C=$("fieldset.js_zubzeile",D).index(B);var A=B.outerHeight();$(".js_zubcontainer",D).animate({top:"-"+(C*A)});B.removeClass("hidden")}}}function gratisclose(A){var B=$(".js_gratiscontainer",A);if($.browser.msie){B.children(".js_gratisrow").css("visibility","hidden")}B.slideUp(1000,function(){A.removeClass("ggopen").addClass("ggclosed")})}function gratisopen(A){$(".js_gratiscontainer",A).slideDown(1000,function(){if($.browser.msie){$(this).children(".js_gratisrow").css("visibility","")}A.removeClass("ggclosed").addClass("ggopen")})}function checkzubclose(A){var B=A.attr("id");if(!zubzeile["zub_"+B]&&!zublayer["zub_"+B]){if(!($.browser.msie)){$("#zub_"+B).fadeOut(1000,function(){$(this).remove()})}else{$("#zub_"+B).remove()}A.removeClass("active")}}function artikelform_finish(C,D,B){if(C!="undefined"&&C!=""){var A=$("input[value="+D+"]",C);if(C.hasClass("js_clearaftersuccess")){A.val("");A.next("[name^=anzahl]").val("")}minitip(B,"okay")}}function closeopenzublayers(){$(".zubehoerlayer[id^=zub_]").each(function(){var A=$(this).parents("fieldset");var B=A.attr("id");$(this).remove();zublayer["zub_"+B]=false;zubzeile["zub_"+B]=false})}function bind_zubehoer_in_sliders(B){$(".js_zubpopuplink",B).click(function(H){H.preventDefault();closeopenzublayers();var G=$(this).parents("fieldset");var I=G.attr("id");if($("#zub_"+I).length===0){var C=$(this).attr("id");var E=$("#zubehoertemplate");var F=E.clone();E.after(F);if(layerloaded[C]===undefined){var D="?cmd=loadzinfo&ajax=1&art_nr="+$(this).attr("id");$(".zubehoerlayertop",F).html($("#busy").html());position($(this),F);$.ajax({url:D,dataType:"json",success:function(J){layerloaded[C]=J;$(".zubehoerlayertop",F).html(J)},error:function(L,J,K){$(".zubehoerlayertop",F).html(meldung[lang].unknown_err)}})}else{$(".zubehoerlayertop",F).html(layerloaded[C]);position($(this),F)}F.attr("id","zub_"+I);zublayer["zub_"+I]=false;F.hoverIntent(function(J){zublayer["zub_"+I]=true},function(J){zublayer["zub_"+I]=false;setTimeout(function(){checkzubclose(G)},500)})}});$(".js_zubzeile",B).each(function(){var C=$(this).attr("id");zublayer["zub_"+C]=false;zubzeile["zub_"+C]=false});var A={over:function(C){var D=$(this).attr("id");zubzeile["zub_"+D]=true},out:function(D){var C=$(this);var E=C.attr("id");zubzeile["zub_"+E]=false;setTimeout(function(){checkzubclose(C)},500)},timeout:10};$(".js_zubzeile",B).hoverIntent(A)}function bind_formelement(B){var A=$(".js_ajaxcheckbox",B);A.click(function(D){var C=$(this).parents("form");C.submit();return false})}function zubehoer_preload(D,A,C){var B="?cmd=loadzzeile&ajax=1&art_nr="+A+"&zub_nr="+C;$.ajax({url:B,dataType:"json",success:function(E){D.replaceWith(E);var F=$("#"+A+"_"+C);bind_zubehoer_in_sliders(F);bind_formelement(F)},error:function(G,E,F){D.replaceWith(meldung[lang].unknown_err)}})}function bind_zubehoer_sliders(A){$(".js_zubslider",A).parents("form[id^=zubehoer]").each(function(){zubehoer_pfeil($(this))});$(".js_zubpfeildown",A).click(function(I){if(zubpfeillocked===true){return false}zubpfeillocked=true;I.preventDefault();closeopenzublayers();var G=$(this).parents("form");if($("fieldset.js_zubzeile:not(.hidden):last",G).attr("id")!=$("fieldset.js_zubzeile:last",G).attr("id")){var D=$("fieldset.js_zubzeile:not(.hidden):last",G).next("fieldset.js_zubzeile");var E=$("fieldset.js_zubzeile",G).index(D);var C=D.outerHeight();var F="-"+(-2+((E-2)*C));$(".js_zubcontainer",G).animate({top:F});D.removeClass("hidden");$("fieldset.js_zubzeile:not(.hidden):first",G).addClass("hidden");var H=D.next("fieldset.js_zubzeile:not(.loaded)");if(H.length==1){var B=H.attr("id").split("_");zubehoer_preload(H,B[0],B[1])}setTimeout(function(){zubehoer_pfeil(G)},10)}setTimeout(function(){zubpfeillocked=false},500)});$(".js_zubpfeilup",A).click(function(F){F.preventDefault();var E=$(this).parents("form");if($("fieldset.js_zubzeile:not(.hidden):first",E).attr("id")!=$("fieldset.js_zubzeile:first",E).attr("id")){closeopenzublayers();var C=$("fieldset.js_zubzeile:not(.hidden):first",E).prev("fieldset.js_zubzeile");var D=$("fieldset.js_zubzeile",E).index(C);if(D===0){$(".js_zubcontainer",E).animate({top:+2})}else{var B=C.outerHeight();$(".js_zubcontainer",E).animate({top:"-"+(-2+(D*B))})}$("fieldset.js_zubzeile:not(.hidden):last",E).addClass("hidden");C.removeClass("hidden");setTimeout(function(){zubehoer_pfeil(E)},10)}})}function bind_ajaxlink(A){$(".js_ajaxlink",A).live("click",function(E){E.preventDefault();var D=$(this);var C=D.attr("href")+"&ajax=1";debug=true;clear(D);debug=false;var B=minitip(D,"busy");$.ajax({url:C,cache:false,dataType:"json",success:function(F){check_result(F,D,D);if(currentwk=="bestellschein"){$("#minikorb").load("/warenkorb/warenkorb_ajax.php");var H=$("#message");var G=F.added_artnr.concat(F.changed_artnr);$.each(G,function(I,J){H.append("<p>"+J+meldung[lang].art_added+"</p>")})}$("#"+B).remove()},error:function(H,F,G){error(D,meldung[lang].unknown_err,false);$("#"+B).remove()}});if(D.hasClass("js_onokclose")){if($(this).parents(".js_popup").length==0){$(this).parents(".js_errorbox").slideUp(1000)}else{$(this).parents(".js_popup").remove()}}return false})}function bind_articleform(B){var A=$(".js_ajaxarticleform",B);A.submit(function(I){I.preventDefault();var D=$(this);var K=$(".js_iconitem",D);if(K.length===0){K=$(":visible:first",D)}var E=false;var L=true;clear(D);var J=$(".js_required",D);J.each(function(){if($(this).val()==""){error($(this),meldung[lang].is_pflichtfeld,true);E=true}});var M=$("[name^=artikel_nr]",D);if(M.length>0){L=false}M.each(function(){if($(this).length>0){var N=$(this).val();if(N!=""){if(!valid_artnr(N)){error($(this),meldung[lang].bad_artnr,true);E=true}else{L=true}}}});if(L===false&&E===false){error(K,meldung[lang].no_artnr,true)}var H=$("[name^=anzahl]",D);H.each(function(){if($(this).length>0){if(!valid_anzahl($(this).val())){error($(this),meldung[lang].bad_anzahl,true);$(this).val($("[name^=orig_anzahl]",D).val());E=true}}});if(!E&&L){var G=D.serialize();var C="?ajax=1";var F=minitip(K,"busy");$.ajax({url:C,cache:false,data:G,dataType:"json",success:function(N){$("#"+F).remove();check_result(N,K,D)},error:function(P,N,O){$("#"+F).remove();error(K,meldung[lang].unknown_err,false)}})}return false})}function bind_formlink(B){var A=$(".js_formlink",B);A.click(function(E){var D=$(this).attr("href").split("#");var C="#"+D[1];$(C).submit();return false})}function bind_gravurlink(A){$(".js_gravurformlink",A).click(function(F){F.preventDefault();var E=$(this).attr("href").split("#");var D=$("#"+E[1]);var C=$(this);clear(C);var B=$("input:text:not([value=''])",D);if(B.length>0){D.submit()}else{error(C,meldung[lang].no_gravurtext,true,$("input:text",D))}})}function add_arts(D,A,C,B){$.each(D,function(E,H){var G=$("tr.js_art:last","#js_wklist");if(B.hasClass("js_addnext")){G=B.parents(".js_art")}var F=A[E].replace(/\ufeff/g,"");G.after(F);$("#art"+H).fadeIn(1000);bind_formlink("#art"+H);bind_articleform("#art"+H);bind_js_stuff("#art"+H);bind_ajaxlink("#art"+H);bind_gravurlink("#art"+H);bind_zubehoer_sliders("#art"+H);bind_zubehoer_in_sliders("form[id^=zubehoer]",$("#art"+H));bind_formelement($("#art"+H));$("#empty").remove();artikelform_finish(B,H,C)})}function change_arts(D,A,C,B){$.each(D,function(F,H){var G=$("#art"+H);if(B.hasClass("js_addtoend")){G=$("#art"+H).clone(true);$("#art"+H).remove();$("tr.js_art:last").after(G)}$("[name=anzahl]",G).val(A[F].anzahl);$("[name=orig_anzahl]",G).val(A[F].anzahl);$(".js_artgesamtpreis",G).html(A[F].gesamtpreis);if(A[F].einzelpreis!==false){$(".js_arteinzelpreis",G).html(A[F].einzelpreis)}if(A[F].gravur!==false){$(".js_gravur",G).html(A[F].gravur);var E=$(".js_gravur",G);bind_gravurlink(E);bind_articleform(E);bind_js_stuff(E)}artikelform_finish(B,H,C)})}function scroll_lastarticle(){var C=$("tr.js_art:last","#js_wklist").offset();var A=viewport();var B=(A.y-C.top);if(B>0){$("html, body").animate({scrollTop:(C.top-50)},200)}}function scroll_nextarticle(C){var E=C.offset();var B=viewport();var D=E.top+C.height();var A=B.y+B.cy;if(A<D){$("html, body").animate({scrollTop:(B.y+C.height())},200)}}function bind_gratisbox(){var A=$("#js_gratisbox");$("h3",A).click(function(){if(A.hasClass("ggclosed")){gratisopen(A)}else{gratisclose(A)}})}function bind_tooltip(A){$(".tooltip").click(function(B){B.preventDefault()});$(".tooltip").hoverIntent(function(){var B=$("#tooltiptemplate");var C=$(this).attr("href").split("#");var D=$("#"+C[1]).html();$(".helplayertop",B).html(D);var E="";if($(this).hasClass("js_openleft")){E="left"}position($(this),B,E)},function(){if(!($.browser.msie)){$("#tooltiptemplate").fadeOut()}else{$("#tooltiptemplate").hide()}})}function check_result(result,icon,scope){if(result.changed_artnr!==undefined&&result.changed_artnr.length>0){change_arts(result.changed_artnr,result.changed_info,icon,scope)}if(result.added_artnr!==undefined&&result.added_artnr.length>0){add_arts(result.added_artnr,result.added_artzeile,icon,scope)}if(result.removed_artnr!==undefined&&result.removed_artnr.length>0){$.each(result.removed_artnr,function(i,val){$("#art"+val).remove()})}if(result.error!==undefined&&result.error.length>0){error(icon,result.error,false)}if(result.errorfield!==undefined&&result.errorfield.length>0){$.each(result.errorfield,function(i,val){if(scope!="undefined"&&scope!=""){var obj=$("[value="+val+"]",scope);if(obj.length>0){obj.each(function(){error($(this),"",true,"",false)})}}})}if(result.gutscheine!==undefined&&result.gutscheine!==false){$(".js_gut","#js_wklist").remove();result.gutscheine=result.gutscheine.replace(/\ufeff/g,"");$("tr.js_art:last").after(result.gutscheine);$(".js_gut","#js_wklist").show()}else{if(result.gutscheine===false){$(".js_gut","#js_wklist").remove()}}if(result.total!==undefined&&result.total){$("#js_total").html(result.total)}if(scope!="undefined"&&scope!=""){var fun=$("input[name=function]",scope).val();if(!fun){fun=scope.attr("rel")}if(typeof eval(fun)=="function"){eval(fun+"(result, icon, scope)")}if(scope.hasClass("js_scrolllast")){scroll_lastarticle()}}if(result.gutschein!==undefined){if(result.gutschein===false){$("td","#gutschein_row").html("")}else{if($("td","#gutschein_row").html()==""){$("td","#gutschein_row").html(result.gutschein);bind_js_stuff("#gutschein_row");bind_tooltip("#gutschein_row");bind_formlink("#gutschein_row");bind_articleform("#gutschein_row")}}}if(result.transport!==undefined){$("#transport, #versicherung").remove();$("#gutschein_row").after(result.transport);bind_js_stuff("#transport, #versicherung");bind_tooltip("#transport, #versicherung")}if(result.gratisbox!==undefined){if(result.gratisbox===false){$("#js_gratiscontainer:visible").fadeOut()}else{$("#js_gratiscontainer:hidden").fadeIn();var box=$("#js_gratisbox","#js_wklist");var inhalt=$(".js_gratiscontainer",box);inhalt.html(result.gratisbox);if(box.hasClass("ggclosed")){inhalt.hide();if($.browser.msie){$(".js_gratisrow",box).css("visibility","hidden")}}bind_gratisbox(inhalt);bind_ajaxlink(inhalt)}}if(result.mb_erreicht){$(".js_mb_hinweis").fadeOut();if(result.vkfrei_rest!==false){$("#vkfrei_rest").html(result.vkfrei_rest);$("#js_versandfreiab").fadeIn()}else{$("#js_versandfreiab").fadeOut()}}else{$("#js_versandfreiab").fadeOut();$(".js_mb_hinweis").fadeIn()}zebra()}function zubehoer(A,C,B){var D=A.added_artnr.concat(A.changed_artnr);$.each(D,function(E,G){var F=$("fieldset[name="+G+"]",B);var H=F.attr("id");zublayer["zub_"+H]=false;zubzeile["zub_"+H]=false;checkzubclose(F);F.fadeOut(500,function(){var J=$("fieldset.js_zubzeile:not(.hidden):last",B).next("fieldset.js_zubzeile");J.removeClass("hidden");if(J.length){var K=J.next("fieldset.js_zubzeile:not(.loaded)");if(K.length==1){var I=K.attr("id").split("_");zubehoer_preload(K,I[0],I[1])}}$(this).remove();setTimeout(function(){if($("fieldset.js_zubzeile",B).length===0){var L=B.parents(".js_arthaszub");if($.browser.msie&&$.browser.version=="7.0"){L.children().hide()}L.slideUp(500,function(){$(this).remove()})}else{var M=$(".js_zubcount",B);M.text($("fieldset.js_zubzeile",B).length);zubehoer_pfeil(B)}},100)})})}function gratis(A,C,B){if(A.error!==undefined&&A.error.length>0){error(C,A.error,false)}else{var E=B.parents(".js_gratisrow");var F=$("#gratis_pickme").html();var D=$("#gratis_picked").html();$("a",E).removeClass("selected").children("span").addClass("hoverblue").html(F);$("span",B).removeClass("hoverblue").html(D);B.addClass("selected");minitip(C,"okay")}}function gravur(A,C,B){if(A.success==1){minitip(C,"okay");$(".js_gravursavelink",B).hide();$(".js_gravurchangelink",B).show()}}function bestellschein(A,C,B){if(A.error===undefined||A.error.length===0){location.href="/warenkorb2010/index.php";return }var E=$("#message");E.html("");var D=A.added_artnr.concat(A.changed_artnr);$.each(D,function(F,G){E.append("<p>"+G+meldung[lang].art_added+"</p>")});$("[name^=anzahl]","#direktbestellung").each(function(){if($(this).val()>0){var F=$(this).parent().siblings(".artnr").children("input").val();if(F==""){$(this).val("")}}});if(A.success==1){$("#minikorb").load("/warenkorb/warenkorb_ajax.php")}}function gutschein(A,C,B){if(A.success==1){$("input:text",B).val("");minitip(C,"okay")}}function bind_lieferung(A){$("[name=has_lieferadresse]",A).click(function(){if($(this).val()==1){$(".js_lieferadresse",A).slideDown()}else{$(".js_lieferadresse",A).slideUp()}})}function bind_zahlart(B){var A="";$(".js_makemeactive").each(function(){A=$(this).children(".contentslide");if($(this).hasClass("paypallogo")){$(this).addClass("paypalactive")}else{$(this).addClass("active")}if(A.length==1){$(this).addClass("slideactive");A.show()}});$(".radio",B).click(function(){var H=$(this).parents(".segment");var J=H.siblings(".slideactive");var C=$(".contentslide",H);H.siblings().removeClass("active paypalactive");clear(H);clear(H.siblings());var E="active";if(H.hasClass("paypallogo")){E="paypalactive"}var G="";if(C.length>0){G="slideactive"}var I=0;if(J.length>0){var D=J.offset();$("html, body").animate({scrollTop:(D.top-100)},200);var F=J.children(".contentslide");if($.browser.msie&&$.browser.version=="7.0"){$("div, fieldset",F).css("visibility","hidden")}F.slideUp(750,function(){J.removeClass("slideactive");I=750})}setTimeout(function(){if($.browser.msie&&$.browser.version=="7.0"){$("div, fieldset",C).css("visibility","hidden")}H.addClass(E).addClass(G);C.slideDown(750,function(){if($.browser.msie&&$.browser.version=="7.0"){$("div, fieldset",C).css("visibility","")}})},I)});$("#ad_bankbekannt",B).change(function(){if($(this).attr("checked")){$("#bankeinzug_unbekannt").slideUp()}else{$("#bankeinzug_unbekannt").slideDown()}})}function bind_activitylink(A){$(".js_link").live("click",function(E){E.preventDefault();var D=$(this);var C=D.attr("href")+"&ajax=1";clear(D);var B=minitip(D,"busy","left");$.ajax({url:C,cache:false,dataType:"json",success:function(F){if(F.success){location.href=D.attr("href")}else{error(D,F.error,false)}$("#"+B).remove()},error:function(H,F,G){error(D,meldung[lang].unknown_err,false);$("#"+B).remove()}})})}function bind_form(B){var A=$(".js_ajaxform",B);A.submit(function(){submitted=true;var I=$(this);var G=$(".js_iconitem",I);if(G.length===0){G=$(":visible:first",I)}var H=false;var E=true;clear(I);var C="";var F=$("#anrede").val();if(F==4||F==9){if($("#ad_firma").val()==""){E=false;C=", #ad_firma:visible"}}if($("[name=ownbill]").length>0){if($("[name=ownbill]:checked").length===0){C+=", [name=ownbill]"}}if($("[name=freelancer]").length>0){if($("[name=freelancer]:checked").length===0){C+=", [name=freelancer]"}}if($("#has_lieferadresse1:checked").length===1){C+=", .js_lieferfeld[value='']:visible"}if($("#bankeinzug:checked").length===1){if($("#ad_bankbekannt:checked").length===1){C+=", .js_bankbekannt[value='']:visible"}else{C+=", .js_bankfeld[value='']:visible"}}if($("#ratenzahlung:checked").length===1){C+=", .js_credittable[value='']:visible"}var J=$(".js_required[value='']:visible"+C,I);if(J.length>0){E=false;H=true;G=$(".js_required[value='']:visible:first"+C,I);error(G,meldung[lang].fill_pflichtfelder,true,J);var D=G.offset();$("html, body").animate({scrollTop:(D.top-100)},200)}if($("[name=zahlart]").length>0&&$("[name=zahlart]:checked").length===0){E=false;H=true;G=$("[name=zahlart]:first",I);error(G,meldung[lang].no_zahlart,true,J);var D=G.offset();$("html, body").animate({scrollTop:(D.top-100)},200);return false}if(!H){return true}return false})}function check_unsaved(D){return false;if(submitted===false){var B=$("#"+D);$("[name=cmd]",B).val("tempsave");var C=B.serialize();var A="/warenkorb2010/savedata.php?ajax=1&which="+D;$.ajax({url:A,data:C,dataType:"json",success:function(E){},error:function(G,E,F){}})}}function load_credittable(E){if($("#ratenzahlung:checked").length===1){var D=$(".js_credittable[value='']:visible");if(D.length===0&&($("#js_zinsen").children().length===0||E===true)){var B=minitip($("#calctable"),"busy");var A="?ajax=1&cmd=loadzinsen";var C=$(".js_credittable").serialize();$.ajax({url:A,cache:false,data:C,dataType:"json",success:function(F){$("#js_zinsen").html(F);$("tr:odd","#js_zinsen").addClass("odd");$("tr:even","#js_zinsen").addClass("even");$("#m"+$("#laufzeit").val()).css("font-weight","bold");$("#js_zinsen").slideDown();$("#"+B).remove()},error:function(H,F,G){$("#js_zinsen").html(meldung[lang].unknown_err).slideDown();$("#"+B).remove()}})}}}function bind_ratenzahlung(){$("#laufzeit").change(function(){if($("table","#js_zinsen").length===1){$("tr","#js_zinsen").css("font-weight","normal");$("#m"+$("#laufzeit").val()).css("font-weight","bold")}});$(".js_credittable").change(function(){load_credittable(true)});$("#ratenzahlung").change(function(){load_credittable()});load_credittable()}function bind_kreditlayer(){$(".js_receive_mail").click(function(A){A.preventDefault();$.blockUI({message:$("#waiting").html()});$.ajax({url:"/warenkorb2010/kredit_layer.php",cache:false,dataType:"json",data:"cmd=receive_mail",success:function(B){},complete:function(){$.blockUI({message:$("#mailfinished")})}})});$(".js_print_pdf").click(function(A){A.preventDefault();$.blockUI({message:$("#waiting").html()});window.open("/warenkorb2010/kredit_layer.php?cmd=serve_pdf","vertrag","menubar=no,width=800,height=600,toolbar=yes");$.blockUI({message:$("#pdffinished")})});$(".kredit_ok").click(function(A){A.preventDefault();$.ajax({url:"/warenkorb2010/kredit_layer.php",cache:false,dataType:"json",data:"cmd=clear_data",success:function(B){},complete:function(){$.unblockUI()},error:function(D,B,C){}})})}function bind_loginanlegen(){$("#ad_login").change(function(){var A=$(this).val();if(A.length>5){var B="?cmd=checklogin&ajax=1&username="+A;$.ajax({url:B,dataType:"json",success:function(C){if(C!=1){error($("#ad_login"),C,true)}},error:function(E,C,D){error($("#ad_login"),meldung[lang].unknown_err,true)}})}else{if(A.length>0){error($("#ad_login"),meldung[lang].short_login,true)}}});$("#ad_password, #ad_password2").change(function(){var A=$(this).val();if(A.length<6){error($(this),meldung[lang].short_login,true)}})}function bestellschein_fields(B){var A;var C;for(i=0;i<B;i++){C=$("#dummy").clone();C.attr("id","");A=$("#morelink").before(C);$("td:first",C).html((C.index()+1)+".");C.show();if(C.index()>=35){$("#morelink").remove()}}}function bind_bestellschein(){$("[name^=artikel_nr]").click(function(){var A=$(this).parents("tr").find("[name^=anzahl]");if(A.val()==""){A.val(1)}});$(".morearts").click(function(A){A.preventDefault();bestellschein_fields(5)});$("#miniwarenkorb").show()}$("document").ready(function(){var A=String(window.location);if(!($.browser.msie&&$.browser.version=="6.0")&&A.indexOf("warenkorb")!=-1){bind_js_stuff();bind_formlink();bind_form();bind_tooltip();if(A.indexOf("adresse")!=-1){currentwk="adresse";$(window).unload(function(){check_unsaved("adresse")});$("#ad_kundennr").focus();bind_loginanlegen();proof_anrede();proof_land();$("#js_on").val(1)}else{if(A.indexOf("anmeldung")!=-1){currentwk="anmeldung";$("#username").focus()}else{if(A.indexOf("ratenzahlung")!=-1){currentwk="ratenzahlung";$(window).unload(function(){check_unsaved("ratenzahlung")});$("#ad_telefon").focus();proof_wohnhaft();proof_freelance()}else{if(A.indexOf("zahlung")!=-1){currentwk="zahlung";$(window).unload(function(){check_unsaved("lieferung")});$(".versteckmich").removeClass("versteckmich");bind_lieferung($("#lieferung"));bind_zahlart($("#js_accordion"));if($("#ad_bankbekannt").attr("checked")){$("#bankeinzug_unbekannt").slideUp()}if($("#has_lieferadresse1:checked").length==1){$(".js_lieferadresse").slideDown()}bind_ratenzahlung();proof_anrede()}else{if(A.indexOf("uebersicht")!=-1){currentwk="uebersicht";$(".js_popup").click(function(B){B.preventDefault()});$(".js_submit").click(function(B){$.blockUI({message:$("#waiting").html()})})}else{if(A.indexOf("bestellschein")!=-1){currentwk="bestellschein";bind_articleform();bind_bestellschein()}else{if(A.indexOf("danke")!=-1){currentwk="danke";bind_kreditlayer();$("#miniwarenkorb").show()}else{if(A.indexOf("index")!=-1){currentwk="wk";bind_articleform();bind_activitylink();bind_formelement();bind_ajaxlink();if($.browser.msie){$(".js_gratisrow").css("visibility","hidden")}bind_gratisbox();$("#js_gratisbox").removeClass("ggopen").addClass("ggclosed");bind_zubehoer_sliders();bind_zubehoer_in_sliders("form[id^=zubehoer]");bind_gravurlink("form[id^=gravur]")}}}}}}}}}});function print_r(G,F,I,C){C=C||0;F=F||10;I=I||" ";if(C>F){return"[WARNING: Too much recursion]\n"}var D,A="",H=typeof G,B="";if(G===null){A+="(null)\n"}else{if(H=="object"){C++;for(D=0;D<C;D++){B+=I}if(G&&G.length){H="array"}A+="("+H+") :\n";for(D in G){try{A+=B+"["+D+"] : "+print_r(G[D],F,I,(C+1))}catch(E){return"[ERROR: "+E+"]\n"}}}else{if(H=="string"){if(G==""){G="(empty)"}}A+="("+H+") "+G+"\n"}}return A};