﻿window.hbv=window.hbv||{};function activateSliders(){$("div.ui-slider").each(function(c,e){var d=parseInt($(e).next("input[type=hidden]").val()||0,10),a=$(e),b=$('<div style="background:transparent url(/media/img/bg_slider_high.gif) 0 2px no-repeat"></div>').css("margin",a.css("margin"));e.updateBG=function(f){var h=Math.floor((6-272)+272*f/100),g=h+"px 2px";this.parentNode.style.backgroundPosition=g};$(e).slider({change:function(g,f){$(this.parentNode).next("input[type=hidden]").val(f.value).parents(".module").trigger("change");this.updateBG(f.value)},min:0,max:100,startValue:d}).css("margin",0).wrap(b);e.updateBG(d)})}var RIL={jOv:null,isON:0,currWinH:0,currScroll:0,currH:0,init:function(){if(!this.jOv){this.jOv=$('<div id="RILOverlay"></div>');$("body").append(this.jOv);$(document).bind("mousemove",this.updPos)}$("#rResults a.zutaten, #rResults td.pic img, label.ingredientBasedSearch, img.notelistHelp, img.ingredientBasedSearch, div.barometer_liste div.barometer_bild img").unbind("mouseover").unbind("mouseout").bind("mouseover",this.on).bind("mouseout",this.off)},updPos:function(d){if(!RIL.isON){return}var c=$.iUtil.getPointer(d),b=(RIL.currScroll+RIL.currWinH)-(c.y+30+RIL.currH),a=(b<0)?b:0;RIL.jOv.css({left:c.x+20+"px",top:c.y+15+a+"px"})},on:function(c){RIL.isON=1;RIL.currWinH=$(window).height();RIL.currScroll=$(window).scrollTop();RIL.updPos(c);if(this.className.indexOf("ingredientBasedSearch")>=0){RIL.jOv.html('<div style="margin: 5px";>Mit der <b>LECKER.de</b>-K&uuml;hlschranksuche finden Sie passende<br/>Rezepte zu vorhandenen Zutaten Ihres Haushaltes.  Sie aktivieren die<br/>K&uuml;hlschranksuche durch das Setzen des Hakens rechts neben dem<br/>Sucheingabefeld. Geben Sie anschlie&szlig;end Ihre Lebensmittel/Zutaten<br/>ein, die Sie noch im Haus haben. Alle Suchergebnisse beinhalten genau<br/>die Zutaten, die Sie in die K&uuml;hlschranksuche eingegeben haben.<br/><br/>An dieser Stelle ein Tipp: Geben Sie nicht zu viele Zutaten ein, denn<br/>je mehr Zutaten Sie eingeben desto weniger passenden Rezepte werden<br/>gefunden. Beschr&auml;nken Sie sich bestenfalls auf die Hauptbestandteile<br/>aus denen Ihr Gericht zubereitet werden soll.</div>').show();if($.browser.msie){if(!this.jSortSelect){this.jSortSelect=$("select[@name=sortBy]")}this.jSortSelect.css("visibility","hidden")}}else{if(this.className.indexOf("notelistHelp")>=0){RIL.jOv.html('<div style="margin: 5px";>Ihr pers&ouml;nlicher Merkzettel speichert die von Ihnen gemerkten Rezepte in einer separaten<br/>Rezeptliste ab. Damit ist es Ihnen m&ouml;glich auf einfache Weise Ihre Lieblingsrezepte zu sammeln.<br/>Die Speicherung erfolgt auf Basis Ihrer Cookies. Sollten Sie die Cookies zwischenzeitlich l&ouml;schen,<br/>so wird Ihr Merkzettel geleert.</div>').show();if($.browser.msie){if(!this.jSortSelect){this.jSortSelect=$("select[@name=sortBy]")}this.jSortSelect.css("visibility","hidden")}}else{if(this.nodeName=="A"){var b=$(this).next("ul.zutatenliste")[0].cloneNode(1),a=$('<h5 class="cBrand3"></h5>').html(b.title||"Zutaten");RIL.jOv.html(a).append($(b).show()).show()}else{if(this.nodeName=="IMG"){var d=$(this).prev(":hidden")[0].value;if(!d||!d.indexOf("/")<0){RIL.isON=0;return}jImg=$("<img>").attr({src:d});RIL.jOv.html(jImg).show()}}}}RIL.currH=RIL.jOv.height();RIL.updPos(c)},off:function(){RIL.jOv.hide();RIL.isON=0;if(this.jSortSelect){this.jSortSelect.css("visibility","visible")}}};function addRateSwitchBehavior(){if(top.RATE_SWITCH_DONE){return}top.RATE_SWITCH_DONE=1;var d=$("#ratingLayer");if(d.length){$('img.rateSwitch[@alt=""]').attr("alt","rate_1");d.addClass("ratingLayer").attr("id","ratingLayer_1");$("#ratingError").addClass("ratingError");$("#ratingForm").addClass("ratingForm");$("#ratingCaptchaImg").addClass("ratingCaptchaImg");$("#ratingCaptchaImg").addClass("ratingCaptchaImg");$("#ratingCaptchaText").addClass("ratingCaptchaText").attr("id","ratingCaptchaText_1");$("img[@src*=dialog_close]",d).parent("a").bind("click",function(){$(this).parents(".ratingLayer:first").slideUp(300);return false})}var a=$(".ratingLayer"),b=$("span.ratingspan");if(!a.length){b.css("opacity",0.3).attr("title","Fehler: ratinglayer fehlt");return}$(document.body).append(a);var c=0;b.bind("click",function(){var h=$(this).find("img.rateSwitch");var k=(h.attr("alt")||"").match(/rate_([a-z0-9]*)/),e=(k)?("_"+k[1]):"",g=$("#ratingLayer"+e),j=$(h).offset(),f=(c==0)?parseInt(g.width()):c;c=f;g.css({left:j.left-f+45,top:j.top+17,width:f-50});initRatingBox("");$("input[@name=rating]").removeAttr("checked");g.slideToggle(300,function(){if(g.css("display")=="block"){hbv.track(".bewertung_toggle");if(location.href.indexOf("/fs4preview")<0){_gaq.push(["_trackPageview",location.pathname+location.search+"#/inhalt/bewerten_auf_zuklappen"])}}return;var l=$(this).height(),n=$("#article");if(!n.length){return}var m=n.height(),p=l+80,o=($(this).css("display")=="block");if(!o){n.height("auto")}else{if(m<p){n.height(p)}}})});$(a).find("input[@type=submit]").bind("click",function(){var g=$(this).attr("disabled",true).parents(".ratingLayer:first"),f=$(this).parents("form:first"),e=f.attr("action"),h=f.serialize();jQuery.post(e,h,function(j){if(j=="OK"){g.slideUp(300)}else{var k=j.split("|")[1];initRatingBox(k,g)}})})}function initRatingBox(c,b){var d=$(".ratingError",b),a=(b)?$("input[@type=submit]",b):$(".ratingLayer input[@type=submit]");if(c!=""){d.show()}else{d.hide()}d.find(".errorBox").text(c);a.attr("disabled",false)}jQuery.fn.setDefaultValue=function(a){this.each(function(b,c){if(c.value.length&&c.value!==a){return}c.defaultval=a;c.value=a;$(c).bind("focus",function(){if(this.value===this.defaultval){this.value=""}}).bind("blur",function(){if(!this.value.length){this.value=this.defaultval}}).parents("form").bind("submit",function(){$("input[@defaultval]",this).trigger("focus")})});return this};function addLexikonBehavior(){$("#lexlist h4").each(function(c,a){var f=$(a),e=$(a).next("div"),b=(a.className||"").match(/selectedItem/),d=(b)?"toggleArrow":"toggleArrow toggleArrowClosed";a.refdiv=e[0];if(!b){e.hide()}f.addClass(d).bind("click",function(){var g=this;$(this.refdiv).slideToggle("fast",function(){$(g).toggleClass("toggleArrowClosed")})});f.bind("click",function(){_gaq.push(["_trackPageview",location.pathname+location.search+"#/azlisten/inhalt_auf_zuklappen"])})})}var PicNavi={jPicDiv:null,jDiv:null,jCountDiv:null,jImgs:null,firstDelay:2000,delay:2000,jPlay:0,jPause:0,jNext:0,jPrev:0,index:0,count:0,play:0,timer:0,enableAutoplay:0,init:function(a){this.jPicDiv=$("#article .articleImage:first");this.jImgs=$(this.jPicDiv).children("img");this.count=this.jImgs.length;this.jDiv=$('<div class="fr picnavi" id="picNavi"></div>');this.jCountDiv=$('<small id="picNo" class="fr copyrightnotice">Bild 1/'+this.count+"</small>");if(this.count<2){return}this.jPlay=$('<a href="javascript:void(0)"><img class="play" src="/media/img/trans.gif" alt="Bildlauf" title="Bildlauf starten" /></a>');this.jPause=$('<a href="javascript:void(0)"><img class="pause" src="/media/img/trans.gif" alt="Pause" title="Bildlauf anhalten" /></a>');this.jPrev=$('<a href="javascript:void(0)" class="inactive"><img class="prev" src="/media/img/trans.gif" alt="Vorheriges" title="vorheriges Bild" /></a>');this.jNext=$('<a href="javascript:void(0)"><img class="next" src="/media/img/trans.gif" alt="Nächstes" title="nächstes Bild" /></a>');this.jDiv.append(this.jPlay,this.jPause,this.jPrev,this.jNext);this.jPause.bind("click",function(){PicNavi.stop()});this.jNext.bind("click",function(){PicNavi.stop();PicNavi.next()});this.jNext.bind("click",function(){_gaq.push(["_trackPageview",location.pathname+location.search+"#/inhalt/bild_weiter_zurueck"]);hbv.track(".inhalt_bild_weiter_zurueck")});this.jPrev.bind("click",function(){PicNavi.stop();PicNavi.prev()});this.jPrev.bind("click",function(){_gaq.push(["_trackPageview",location.pathname+location.search+"#/inhalt/bild_weiter_zurueck"]);hbv.track(".inhalt_bild_weiter_zurueck")});this.enableAutoplay=!!a;this.jPlay.hide().bind("click",function(){PicNavi.jPlay.hide();PicNavi.jPause.show();PicNavi.play=1;PicNavi.timeNext()});this.jDiv.insertBefore($(this.jPicDiv).children("div.break"));this.jCountDiv.insertAfter(this.jDiv);if(a){setTimeout(function(){PicNavi.jPlay.trigger("click")},this.firstDelay)}else{this.jPause.hide()}},stop:function(){this.play=0;if(this.timer){clearTimeout(this.timer);this.timer=0}if(this.enableAutoplay){this.jPause.hide();this.jPlay.show()}},timeNext:function(){this.timer=setTimeout(function(){PicNavi.next()},this.delay)},next:function(){var a=(this.index+1)%this.count;this.switchTo(a)},prev:function(){var a=(this.index)?(this.index-1):(this.count-1);this.switchTo(a)},switchTo:function(a){var b=this.jImgs[this.index];if(b.id){$("#"+b.id+"_copyright").hide()}this.jCountDiv.html("Bild "+(a+1)+"/"+this.count);$(b).fadeOut(300,function(){$(PicNavi.jImgs[a]).fadeIn(300,function(){PicNavi.index=a;if(PicNavi.play){PicNavi.timeNext()}var c=PicNavi.jImgs[a];if(c.id){$("#"+c.id+"_copyright").show()}PicNavi.jNext[0].className=(PicNavi.index==PicNavi.count-1)?"inactive":"";PicNavi.jPrev[0].className=(PicNavi.index==0)?"inactive":""})})}};function addCommentFormBehavior(){$("#writeComment, #writeComment_top, #writeComment_bottom").bind("click",function(){_gaq.push(["_trackPageview",location.pathname+location.search+"#/inhalt/kommentieren"]);$("#writeComment").hide();$("#commentForm").fadeIn(500,function(){$("#iUsername",$(this)).focus()})})}function addToggleArrows(a){$(a).each(function(d,c){var e=$(c),b=$(c).next("div,table");e.addClass("toggleArrow");c.refElem=b[0];e.bind("click",function(){var f=this;$(this.refElem).slideToggle("fast",function(){$(f).toggleClass("toggleArrowClosed")});return false})}).filter(".closed").removeClass("closed").trigger("click")}function addAllSelectorBehavior(a){$("#"+a).bind("click",function(){$(this).parents("table:first").find("input[@type=checkbox]").attr("checked",!!this.checked)}).parents("table:first").attr("allselid",a).bind("click",function(){var c=$(this).attr("allselid"),b=$(this).find("input[@type=checkbox]:not([@id="+c+"])"),d=$(b).filter("[@checked]");$("#"+c).attr("checked",!!(b.length==d.length))})}function alignMDWImages(){$("div.menuederwoche .right").each(function(b,d){if(d.getElementsByTagName("table").length){return}var c=$('<table cellspacing="0" cellpadding="0"><tr></tr></table>'),a=c.find("tr:first");$("img",this).each(function(f,e){a.append($("<td>").append(e))});$(this).append(c)})}function initSIFR(){if(typeof sIFR=="undefined"){return}var a={src:"infotext.swf"},d=0,c=function(f){var e=parseInt(f,10)||0,g=(e<10)?"0":"";return g+e.toString(16)},b=function(e){if(!/rgba? ?\((\d+), ?(\d+), ?(\d+)\)/.exec(e)){return e}return"#"+c(RegExp.$1)+c(RegExp.$2)+c(RegExp.$3)};sIFR.useStyleCheck=true;sIFR.activate(a);$(".customFont").each(function(){var e=b($(this).css("color")||"#000000");this.id=this.id||("sifrAutoID"+(++d));sIFR.replace(a,{selector:"#"+this.id,css:".sIFR-root { color:"+e+" }",selectable:true,wmode:"transparent"})})}function addSendArticleSwitchBehavior(){var c=$("#sendArticle");var b=$("#sendArticle").height();var a=$("#sendArticle").width();var d=$("a.ilSend");if(!c.length){d.css("opacity",0.3).attr("title","Fehler: sendArticle fehlt");return}d.bind("click",function(j){initSendArticleBox("","");var g=$("#sendArticle");var h=g.css("display");if(h=="block"){g.fadeOut(400)}else{if($(".notelist #sendArticle").html()){g.fadeIn(400)}else{if($(this).attr("class").match(/top/)){g.css("left",(j.pageX-a-20)).css("top",40).addClass("top").fadeIn(400)}else{if($(this).attr("class").match(/bottom/)){var f=$(this);g.css("left",(f.position().left-a-20)).css("top",(f.position().top-b)).addClass("bottom").fadeIn(400)}else{g.css("margin-top",-b).fadeIn(400)}}}hbv.track(".artikel_versenden_close","WdWsend");if(location.href.indexOf("/fs4preview")<0){_gaq.push(["_trackPageview",location.pathname+location.search+"#/inhalt/versenden/schliessen"])}}});$("#submitSendArticle").bind("click",function(){var g=window.location.href;if($("#contentUrl").attr("value").length==0){$("#contentUrl").attr("value",g)}var e=$("#sendArticleForm").attr("action"),f=$("#sendArticleForm").serialize();$("#submitSendArticle").attr("disabled",true);jQuery.post(e,f,function(n){var h=$("#sendArticle");var m="";var k="";var p=n.split("|");var l=p[0];var o=p.length>1?p[1]:"";if(l=="OK"){k=o!=""?o:"Ihre E-Mail wurde erfolgreich gesendet"}else{m=o!=""?o:"Ein allgemeiner Fehler ist aufgetreten"}initSendArticleBox(m,k);var j=$("#sendArticleError").height();if($(".notelist #sendArticle").css("margin-top")>0){$("#sendArticle").css("margin-top",-(b+j+12))}else{if($("#sendArticle").hasClass("bottom")){h.css("top",(parseInt(h.css("top"))-(j+12))).fadeIn(400)}}})})}function initSendArticleBox(d,b){var a=$("#sendArticleError");var f=$("#sendArticleCaptchaText");var c=$("#sendArticleCaptchaImg");var g=$("#submitSendArticle");var e=c.attr("src").match(/^(.*\.(htm|gif|jpg|png))/)[1];c.attr("src",e+"?"+(new Date()).getTime());if(d&&d!=null&&d!=""){a.find(".errorBox").html(d);a.find(".errorBox").show();a.find(".okayBox").hide();a.show()}else{if(b&&b!=null&&b!=""){a.find(".okayBox").html(b);a.find(".errorBox").hide();a.find(".okayBox").show();a.show()}else{a.hide()}}f.attr("value","");g.attr("disabled",false)}function fixArrowLinksIE(){if(!$.browser.msie){return}$("a.rightArrowHigh").each(function(f,b){var d=$(this);if(d.parents(".catBox").length){return}if(!/\(\"?(http[^\)\"]*)\"?\)/.exec(d.css("background-image")||"")){return}var e=RegExp.$1,c=new Image(),j=$('<img style="margin-left:5px;vertical-align:middle;width:auto;float:none">').attr("src",e);d.css({backgroundImage:"none",paddingRight:0}).append(j);if(document.all){c.src=e;var g=parseInt(c.height||"0",10);j.css("height",(g>0)?g+"px":"auto")}delete c;if(b.parentNode.style.height=="auto"){b.parentNode.style.height="auto"}})}function reportViolation(f,d,c){var b=$("#violationLayer_"+f);if(!b.length){return}_gaq.push(["_trackPageview",location.pathname+location.search+"#/allgemein/verstoss"]);if(b.css("display")=="none"){initViolationReportBox(f,"",c)}if(b[0].parentNode!=document.body){$(document.body).append(b);b.find("input[@type=submit]").bind("click",function(){var j=$(this);var k=j.parents(".violationLayer:first");var h=j.parents("form:first");var g=h.attr("action");var l=h.serialize();j.attr("disabled",true);jQuery.post(g,l,function(m){if(m=="OK"){k.slideUp(300)}else{var n=m.split("|")[1];initViolationReportBox(f,n,c)}j.attr("disabled",false)})})}var e=$(d).offset(),a="360px";b.css({left:e.left,top:e.top+21,width:a});b.slideToggle(300)}function initViolationReportBox(f,d,c){$(".violationLayer").hide();var a=$("#violationLayer_"+f);var b=createCaptchaKey();a.find("form input[name=captchaKey]").attr("value",b).focus();$("#captchaImg_"+f).attr("src",c+"?key="+b+"&t="+(new Date()).getTime());a.find("input[name=captchaText]").attr("value","");var e=a.find(".violError");if(d!=""){e.show()}else{e.hide()}e.find(".errorBox").text(d)}function createCaptchaKey(){return parseInt(Math.random()*10000000000)}jQuery.fn.counter=function(b){var a={text:"(noch <b>##</b> Zeichen)",goodClass:"ccGood",badClass:"ccBad",maxLength:0};$.extend(a,b);$(this).each(function(){$(this).attr("maxlength",a.maxLength||parseInt($(this).attr("maxlength")||0)).after("<div class='ccount'>");$(this).keyup(function(e){var c=$(this).attr("maxlength"),h=($(this).attr("value")||"").length,g=c-h,f=(g>=0)?a.goodClass:a.badClass;var d=$(this).next(".ccount").html(a.text.replace("##",g)).find("b");if(d.length){d[0].className=f}});$(this).trigger("keyup")});return this};function shortenTextUntilHeight(c,b,a){if(c.innerHTML.length<10){return}if(b.offsetHeight>a){c.innerHTML=c.innerHTML.replace(/\s\S+[ .]*$/," ...");window.setTimeout(function(){shortenTextUntilHeight(c,b,a)},0)}}hbv.track=function(c,b){if(!c){return}var a=document.getElementById("hbvivwpix")||{src:""};if(typeof(b)!="undefined"){if(typeof(ivwPixelSite)=="undefined"||ivwPixelSite.length==0){ivwPixelSite=a.src.match(/CP\/(.+?)\?r/);if(typeof(ivwPixelSite)=="object"&&ivwPixelSite instanceof Array&&ivwPixelSite.length==2){ivwPixelSite=ivwPixelSite[1]}}a.src=a.src.replace(/\d+$/,new Date().getTime()).replace(/CP\/.+?\?r/,"CP/"+b+"?r")}else{if(typeof(ivwPixelSite)!="undefined"&&ivwPixelSite.length>0){a.src=a.src.replace(/\d+$/,new Date().getTime()).replace(/CP\/.+?\?r/,"CP/"+ivwPixelSite+"?r")}else{a.src=a.src.replace(/\d+$/,new Date().getTime())}}};hbv.trackrefresh=function(a){if(!a){return}};hbv.trackflash=function(a){if(!a){return}};hbv.trackGoogleFlash=function(a){_gaq.push(["_trackPageview",location.pathname+location.search+"#"+a])};function ivwTrackingFlash(){var a=document.getElementById("hbvivwpix")||{src:""};tmp=a.src.replace("/CP/","/FP/");a.src=tmp.replace(/\d+$/,new Date().getTime())}$(document).ready(function(){$("div#sendArticle input#submitSendArticle.button").bind("mousedown",function(){hbv.track(".artikel_versenden_submit","WdWsend");if(location.href.indexOf("/fs4preview")<0){_gaq.push(["_trackPageview",location.pathname+location.search+"#/inhalt/versenden/abschicken"])}});$("div.carousel .scrollable .next, div.carousel .scrollable .prev").bind("mousedown",function(){hbv.track(".karussell");if(location.href.indexOf("/fs4preview")<0){_gaq.push(["_trackPageview",location.pathname+location.search+"#/inhalt/bildergalerie/karussell_weiter_zurueck"])}});$(".site_menu .prev, .site_menu .next, .galleryImgNextLink").bind("mousedown",function(){if(location.href.indexOf("/fs4preview")<0){_gaq.push(["_trackPageview",location.pathname+location.search+"#/inhalt/bildergalerie/karussell_weiter_zurueck"])}hbv.track(".galerie_bildwechsel")});$(".textgallery_button .prev, .textgallery_button .next").bind("mousedown",function(){if(location.href.indexOf("/fs4preview")<0){_gaq.push(["_trackPageview",location.pathname+location.search+"#/inhalt/textgallery/karussell_weiter_zurueck"])}hbv.track(".galerie_textwechsel")});$("div#carousel_items a").bind("mousedown",function(){hbv.track(".galerie_bildwechsel");if(location.href.indexOf("/fs4preview")<0){_gaq.push(["_trackPageview",location.pathname+location.search+"#/inhalt/bildergalerie/karussell_weiter_zurueck"])}});$("#writeComment, #writeComment_top, #writeComment_bottom").bind("mousedown",function(){hbv.track(".kommentar_schreiben")});$("#lexlist h4").bind("mousedown",function(){hbv.track(".abisz")});$(".ratingLayer form").bind("submit",function(){hbv.track(".bewertung_submit");if(location.href.indexOf("/fs4preview")<0){_gaq.push(["_trackPageview",location.pathname+location.search+"#/inhalt/bewerten"])}});$("div.ratingLayer input[@name=rating]").bind("mousedown",function(){hbv.track(".rating_rate");if(location.href.indexOf("/fs4preview")<0){_gaq.push(["_trackPageview",location.pathname+location.search+"#/inhalt/bewerten_sterne_auswaehlen"])}});$("a.ilViolation").bind("mousedown",function(){hbv.track(".verstoss_toggle")});$("form.violationForm").bind("submit",function(){hbv.track(".verstoss_submit")});$("ul.ui-tabs-nav.weblog_newsletter_rss").bind("mousedown",function(){hbv.track(".tabteaser")});$(".kalender_einspaltig li").bind("mousedown",function(){hbv.track(".kalenderteaser_toggle")});$(".reiternav ul.0_1_2 li").bind("mousedown",function(){hbv.track(".tabteaser")});$("div#rotTeaser .reiternav ul.ui-tabs-nav li").bind("mousedown",function(){hbv.track(".rotierenderteaser");if(location.href.indexOf("/fs4preview")<0){_gaq.push(["_trackPageview",location.pathname+location.search+"#teaser/rotierender_teaser/tab"])}});$("form#recipeSearchDrilldowns input").bind("mousedown",function(){hbv.trackrefresh(".suche_verfeinern_checkbox")});$("form#recipeSearchDrilldowns div.ui-slider-handle").bind("mousedown",function(){hbv.trackrefresh(".suche_verfeinern_slider")});$("a.ilAddKochbuch").bind("mousedown",function(){hbv.track(".rezept_in_kochbuch_open");if(location.href.indexOf("/fs4preview")<0){_gaq.push(["_trackPageview",location.pathname+location.search+"#/suche/rezeptsuche/kochbuch"])}});$("div#cookbookDialog img[@src*=dialog_close]").bind("mousedown",function(){hbv.track(".rezept_in_kochbuch_close");if(location.href.indexOf("/fs4preview")<0){_gaq.push(["_trackPageview",location.pathname+location.search+"#/suche/rezeptsuche/kochbuch"])}});$("div#cookbookDialog input#submit.button").bind("mousedown",function(){hbv.track(".rezept_in_kochbuch_submit");if(location.href.indexOf("/fs4preview")<0){_gaq.push(["_trackPageview",location.pathname+location.search+"#/suche/rezeptsuche/kochbuch"])}});$("#cpt_reload_link").bind("mousedown",function(){hbv.track(".captcha_reload");if(location.href.indexOf("/fs4preview")<0){_gaq.push(["_trackPageview",location.pathname+location.search+"#/captcha_reload"])}});$('li[id*="threeStarsVorspeise"]').bind("mousedown",function(){hbv.track(".menue_der_woche_teaser");if(location.href.indexOf("/fs4preview")<0){_gaq.push(["_trackPageview",location.pathname+location.search+"#teaser/menue_der_woche"])}});$('li[id*="fiveStars"]').bind("mousedown",function(){hbv.track(".menue_der_woche_teaser");if(location.href.indexOf("/fs4preview")<0){_gaq.push(["_trackPageview",location.pathname+location.search+"#teaser/menue_der_woche"])}});$('li[id*="threeStarsDessert"]').bind("mousedown",function(){hbv.track(".menue_der_woche_teaser");if(location.href.indexOf("/fs4preview")<0){_gaq.push(["_trackPageview",location.pathname+location.search+"#teaser/menue_der_woche"])}})});$(document).ready(function(){$("#short_register").find("input:radio").click(function(){$("#short_register").attr("action",$("input:radio:checked").val());if($("input:radio:checked").val().indexOf("unsubscribe.htm")>0){$("input[@type=submit]").val("Abmelden")}else{$("input[@type=submit]").val("Anmelden")}})});var theConcerningForm="";var cpk=createCaptchaKey();function reloadCaptcha(){cpk=createCaptchaKey();$("#captchaImageTag").attr("src","/captcha/show.htm?key="+cpk);$("#captchaTextLayer").val("").focus()}function displayCaptcha(c){reloadCaptcha();var b=$("#"+c).offset();var a=$("#"+c+" > #voteTop").offset();theConcerningForm=c;$("#captchaLayer").css({top:b.top+1,left:a.left,display:"block"})}function displayCaptchaBaro(c){$("#captchaLayer").hide();var b=$("#"+c).offset();var d=69;var a=($.browser.msie)?-20:-10;theConcerningForm=c;cpk=createCaptchaKey();$("#captchaImageTag").attr("src","/captcha/show.htm?key="+cpk);$("#captchaLayer").css({top:b.top+a,left:b.left+d}).fadeIn(400);$("#captchaTextLayer").val("").focus()}function voteAction(d,b,c){var a=document.getElementById(d);a.action=b;var e=a.getElementsByTagName("input");for(i=0;i<e.length;i++){if(e[i].name=="type"){e[i].value=c}}displayCaptcha(d)}function voteBarometer(b,a){$("#form"+b).attr("action",a);displayCaptchaBaro("form"+b)}function makeVote(){var a=$("#captchaTextLayer").val();if(!a){$("#captchaTextLayer").focus();return false}$("#"+theConcerningForm+" > input[name=captchaText]").val($("#captchaTextLayer").val());$("#"+theConcerningForm+" > input[name=captchaKey]").val(cpk);$("#"+theConcerningForm).submit();theConcerningForm=""}function showRaffleLayer(){var b=$(".powered").offset();$("#underRaffleLayer").css({display:"block",height:b.top+105});var c=$(".mIndent:first").offset();var a=c.left+170;$("#rafflelayer").css({top:c.top+1,left:a,display:"block"})}function showPreview(b,c,a){$(document).ready(function(){var e=0;var d=0;var g=0;var f="";if(b=="player-big"){e=592;d=373;g=40;f="/media/img/lecker/player-big.gif"}else{if(b=="player-middle"){e=308;d=216;g=43;f="/media/img/lecker/player-middle.gif"}else{if(b=="player-small"){e=285;d=200;g=40;f="/media/img/lecker/player-small.gif"}}}html='<a onClick="showVideo'+a+'(); return false;" href="#" class="layer" style=""><img src="/media/img/blank.gif" width="'+e+'" height="'+d+'" border="0" /></a>';html+='<div class="playbutton" style=""><img src="/media/img/lecker/player-button.png" width="66" height="38" /></div>';html+='<div class="preview"><img src="'+c+'" width="'+e+'" height="'+(d-g)+'" /></div><img src="'+f+'" width="'+e+'" height="'+g+'" />';if(b=="player-big"){$("#image_"+a).attr("class",b+" imageLeft")}else{$("#image_"+a).attr("class",b+" fl imageLeft")}$("#image_"+a).html(html)})}function JSTemplate(){this.template=null;this.blocks=new Object();this.loadTemplate=function(id){if($("#"+id)){this.template=unescape($("#"+id).html());return true}return false};this.getBlock=function(blockname){var block=null;var blockObject=new JSTemplate();var pattern1=escape("# START BLOCK:"+blockname+" #");var pattern2=escape("# END BLOCK:"+blockname+" #");var pattern=pattern1+".+?"+pattern2;if(this.template!=null&&blockname!=null){block=escape(this.template).match(pattern)}if(block&&block.length==1){block[0]=block[0].replace(pattern1,"");block[0]=block[0].replace(pattern2,"");blockObject.template=unescape(block[0])}return blockObject};this.setBlock=function(blockname,block){if(blockname==null||block==null){return false}if(this.blocks[blockname]==null){this.blocks[blockname]=new Array()}this.blocks[blockname][this.blocks[blockname].length]=block;return true};this.replace=function(name,replacement){if(this.template==null||name==null||replacement==null){return false}var pattern=eval("/"+escape("# "+name+" #")+"/g");var tmp=escape(this.template);tmp=tmp.replace(pattern,escape(replacement));this.template=unescape(tmp);return true};this.clear=function(){var pattern1=escape("# START BLOCK:")+".+?"+escape(" #");var pattern2=escape("# END BLOCK:")+".+?"+escape(" #");var pattern=eval("/"+pattern1+".+?"+pattern2+"/g");var tmp=escape(this.template);tmp=tmp.replace(pattern,"");pattern1=escape("# ");pattern2=escape(" #");pattern=eval("/"+pattern1+".+?"+pattern2+"/g");tmp=tmp.replace(pattern,"");this.template=unescape(tmp)};this.render=function(){if(this.template==null){return""}var pattern1="";var pattern2="";var pattern="";var replacement="";var tmp=escape(this.template);for(var value in this.blocks){for(var i=0;i<this.blocks[value].length;i++){replacement+=this.blocks[value][i].template}pattern1=escape("# START BLOCK:"+value+" #");pattern2=escape("# END BLOCK:"+value+" #");pattern=eval("/"+pattern1+".+?"+pattern2+"/g");tmp=tmp.replace(pattern,escape(replacement))}this.template=unescape(tmp);this.clear();return this.template.replace(/<!--/,"").replace(/-->/,"")}}var googleAdContainer=new Object();var googleAdCount=0;$(document).ready(function(){insertGoogleAds()});function renderGoogleAds(e,c,a,b){var f=new JSTemplate();f.loadTemplate(c);f.replace("FEEDBACK_URL",google_info.feedback_url);var g=null;for(var d=0;d<e.length;d++){g=f.getBlock("AD");g.replace("URL",e[d].url);g.replace("VISIBLE_URL",e[d].visible_url);g.replace("LINE1",e[d].line1);g.replace("LINE2",e[d].line2);g.replace("LINE3",e[d].line3);f.setBlock("AD",g);if(b!=null&&d+1<e.length){g=f.getBlock();g.template=b;f.setBlock("AD",g)}}$("#"+a).html(f.render())}function google_ad_request_done(b){var a=0;for(var c in googleAdContainer){if(a==googleAdCount){googleAdContainer[c]["ads"]=b;googleAdCount+=1;break}a+=1}if(b[0].bidtype=="CPC"){google_adnum=google_adnum+b.length}return}function insertGoogleAds(){var d=null;var c=null;var a=null;var b=null;for(var e in googleAdContainer){c="layout_"+googleAdContainer[e]["name"];a="ad_"+googleAdContainer[e]["name"];b=googleAdContainer[e]["spacer"];d=googleAdContainer[e]["ads"];if(!d||d.length==0||a==null||c==null){break}renderGoogleAds(d,c,a,b)}}function Gallery(randomID,currentIndex){this.currentIndex=0;this.ITEM_COUNT=0;this.jNext=0;this.jPrev=0;this.jNumCurrent=0;this.jnumLast=0;this.randomID="";if(typeof currentIndex!="undefined"){this.currentIndex=currentIndex}if(typeof randomID!="undefined"){this.randomID=randomID}this.init=function(){this.ITEM_COUNT=$("#page_img"+this.randomID).children().length;$("#page_next"+this.randomID).text(this.ITEM_COUNT);this.jNumCurrent=$("#page_prev"+this.randomID);this.jNumLast=$("#page_next"+this.randomID);this.setCurrent(this.currentIndex);jNext=$("#next"+this.randomID).bind("click",{randomID:this.randomID},function(event){eval("gallery"+event.data.randomID).next();return false});jPrev=$("#prev"+this.randomID).bind("click",{randomID:this.randomID},function(event){eval("gallery"+event.data.randomID).prev();return false});jNext2=$("#page_img"+this.randomID+" .galleryImgNextLink").bind("click",{randomID:this.randomID},function(event){eval("gallery"+event.data.randomID).next();return false})};this.next=function(){this.currentIndex=(this.currentIndex+1)%this.ITEM_COUNT;this.setCurrent(this.currentIndex)};this.prev=function(){if(--this.currentIndex<0){this.currentIndex=this.ITEM_COUNT-1}this.setCurrent(this.currentIndex)};this.setCurrent=function(index){ivw_fliege(index);this.currentIndex=index;this.jNumCurrent.text(index+1);$("#page_img"+this.randomID).children().addClass("hide");$("#page_subtitle"+this.randomID).children().addClass("hide");$("#page_img"+this.randomID+" > div:eq("+index+")").removeClass("hide");$("#page_subtitle"+this.randomID+" > div:eq("+index+")").removeClass("hide")}}function reloadAds(par_randomID,par_icid){adReloadCount+=1;if(adReloadCount==galleryPageReload&&galleryPageReload!=0){var next=1;var prev=1;var url=location.href.replace(/#/,"");var gallery;var randomID;var icid;if(typeof par_randomID!="undefined"&&typeof par_icid!="undefined"){randomID=par_randomID;icid=par_icid}if(randomID&&par_icid){gallery=eval("gallery"+randomID)}else{gallery=hbv.Gallery}if((gallery.currentIndex+2)>gallery.ITEM_COUNT){next=1}else{next=(gallery.currentIndex+2)}if((gallery.currentIndex)==0){prev=gallery.ITEM_COUNT}else{prev=(gallery.currentIndex)}if(location.href.match(/\?/)){hrefNext=url.replace(/\?.*/,"?i="+(next));hrefPrev=url.replace(/\?.*/,"?i="+(prev));if(randomID&&par_icid){hrefNext+="&icid="+icid;hrefPrev+="&icid="+icid}}else{hrefNext=url+"?i="+(next);hrefPrev=url+"?i="+(prev);if(randomID&&par_icid){hrefNext+="&icid="+icid;hrefPrev+="&icid="+icid}}var scrollTop=$(document).scrollTop();hrefNext=hrefNext+"&scroll="+scrollTop;hrefPrev=hrefPrev+"&scroll="+scrollTop;if(randomID&&icid){$("#next"+randomID).unbind("click");$("#next"+randomID).attr("href",hrefNext);$("#page_img"+randomID+" .galleryImgNextLink").unbind("click");$("#page_img"+randomID+" .galleryImgNextLink").attr("href",hrefNext);$("#prev"+randomID).unbind("click");$("#prev"+randomID).attr("href",hrefPrev)}else{$("#next").unbind("click");$("#next").attr("href",hrefNext);$(".galleryImgNextLink").unbind("click");$(".galleryImgNextLink").attr("href",hrefNext);$("#prev").unbind("click");$("#prev").attr("href",hrefPrev)}}}$(document).ready(function(){var a=getUrlVar("scroll");if(a!=undefined){$(document).scrollTop(a)}});function ivw_fliege(a){var b=new Array("/media/img/trans.gif","2","3","4","5","6","7","8","9");if(document.getElementById("ivw")){document.getElementById("ivw").src=b[a]}}function toggleCSSClass(link,class1,class2){regex1=eval("/"+class1+"/");regex2=eval("/"+class2+"/");if($(link).attr("class").match(regex1)){linkClass=$(link).attr("class");linkClass=linkClass.replace(class1,class2)}else{if($(link).attr("class").match(regex2)){linkClass=$(link).attr("class");linkClass=linkClass.replace(class2,class1)}}$(link).attr("class",linkClass)}$(document).ready(function(){var a=$("#recipeSearchQueryString").val()});function customSubmit(a){$("#recipeSearchForm").find("div .errorBox").remove();if((searchVal==$("#recipeSearchQueryString").val())){text="Bitte geben Sie einen Suchbegriff ein.";$("#recipeSearchForm").find("div .cboxes").append("<div style='margin-top:8px' class='errorBox'>"+text+"</div>");return false}else{if($("#recipeSearchQueryString").val().length==0){text="Bitte geben Sie einen Suchbegriff ein.<br> Die Suchanfrage darf nicht leer sein.";$("#recipeSearchForm").find("div .cboxes").append("<div style='margin-top:8px' class='errorBox'>"+text+"</div>");return false}else{return true}}}function unisearchSubmit(b,e,a){var c=b.action;var d=$("#"+a).val();c=c.replace("*",d);c=c.replace('"','""');c=c.replace("%","%25");c=c.replace("?","");c=c.replace("#","%23");b.action=c;if(c.indexOf("esearch.htm")<0){$("#"+a).val("")}if(e){customSubmit(b)}else{b.submit()}}function insertAfs(){if(window.adBlockTop!==undefined){afsParamList[afsParamList.length]=adBlockTop}if(window.adBlockMiddle!==undefined&&$("#afs_middle").length>0){afsParamList[afsParamList.length]=adBlockMiddle}if(window.adBlockBottom!==undefined){afsParamList[afsParamList.length]=adBlockBottom}if(afsParamList.length>0){afsExecuteStr="new google.ads.search.Ads(pageOptions";for(var i=0;i<afsParamList.length;i++){afsExecuteStr+=", afsParamList["+i+"]"}afsExecuteStr+=");"}if(window.google.ads!==undefined&&afsExecuteStr.indexOf("new google.ads.search.ads")){eval(afsExecuteStr);$(".afsHide").css("display","block")}}function removeFromNotelist(e){var c=readCookie("nl");var a=new Array();var d=new Array();if(c!=null&&c.length>0){a=c.split("#")}if(a.length>0){for(var b=0;b<a.length;b++){if(a[b]!=e){d.push(a[b])}}a=d}c=a.join("#");createCookie("nl",c,356);createCookie("nlc",a.length,356)}function addToNotelist(d){var c=readCookie("nl");var a=new Array();if(c!=null&&c.length>0){a=c.split("#")}if(a.length<100){for(var b=0;b<a.length;b++){if(a[b]==d){return false}}a.push(d);c=a.join("#");createCookie("nl",c,356);createCookie("nlc",a.length,356)}}function updateNotelistBox(){var a=readCookie("nlc");if(a!=null&&a>0&&a<100){$(".notelistBox").removeClass("hide");$("#notelistCount").text(a);if(a==1){$("#notelistCountText").html('Sie haben sich <a href="'+$("#notelistCountText > a").attr("href")+'"><b class="cHigh">'+a+" Rezept</b></a> gemerkt");$("#notelistCountText2").html("Es steht 1 Rezept auf Ihrem Merkzettel")}else{$("#notelistCountText").html('Sie haben sich <a href="'+$("#notelistCountText > a").attr("href")+'"><b class="cHigh">'+a+" Rezepte</b></a> gemerkt");$("#notelistCountText2").html("Es stehen "+a+" Rezepte auf Ihrem Merkzettel")}}else{if($("#notelistCountText2").html()){$(".notelistBox").removeClass("hide")}else{$(".notelistBox").addClass("hide")}$("#notelistCount").text(a);$("#notelistCountText").html('Sie haben sich <a href="'+$("#notelistCountText > a").attr("href")+'"><b class="cHigh">kein Rezept</b></a> gemerkt');$("#notelistCountText2").html("Es steht kein Rezept auf Ihrem Merkzettel")}}function containsNotelistId(c){var a=readCookie("nl");var b=c;if(a!=null&&a.match(b)){return true}return false}function setNotelistButtonStatus(a){if(containsNotelistId(a)){$("#addToNotelist_"+a+" .ilAddNotelistInactive").removeClass("hide");$("#addToNotelist_"+a+" .ilAddNotelist").addClass("hide")}}function setNotelistContentUrl(){var f=$("#contentUrl");if(!window.location.href.match(/ids/)){var c=readCookie("nl");var a=new Array();var d=new Array();var e="";if(c!=null&&c.length>0){a=c.split("#")}if(a.length>0&&a.length<100){for(var b=0;b<a.length;b++){if(a[b].match(/[1-90]/)){d[b]=a[b]}}}if(d.length>0){$("#contentUrl").attr("value",window.location.href+"?ids="+d.join("-"))}else{$("#contentUrl").attr("value",window.location.href)}}}function getUrlVars(){var d=[],c;var a=window.location.href.slice(window.location.href.indexOf("?")+1).split("&");for(var b=0;b<a.length;b++){c=a[b].split("=");d.push(c[0]);d[c[0]]=c[1]}return d}function getUrlVar(a){return getUrlVars()[a]}function bindEventOnNotelistButtons(){$("a.ilAddNotelist, a.ilAddNotelistRecipe").bind("click",function(){hbv.track(".rezept_in_merkliste");if(location.href.indexOf("/fs4preview")<0){_gaq.push(["_trackPageview",location.pathname+location.search+"#/merkzettel/rezept_merken"])}addToNotelist($(this).attr("cmsId"));$(this).addClass("hide");$(this).removeClass("ilAddNotelist");$(this).removeClass("ilAddNotelistRecipe");var a=$(this).parent().attr("id");$("#"+a+" > .ilAddNotelistInactive").removeClass("hide");updateNotelistBox()});$("a.ilDelNotelist").bind("click",function(){hbv.track(".rezept_aus_merkliste_loeschen");if(location.href.indexOf("/fs4preview")<0){_gaq.push(["_trackPageview",location.pathname+location.search+"#/merkzettel/rezept_loeschen"])}check=confirm("Wollen Sie dieses Objekt wirklich löschen?");if(check==true){$(".notelist_"+$(this).attr("cmsId")).addClass("hide");removeFromNotelist($(this).attr("cmsId"));updateNotelistBox()}})}$(document).ready(function(){bindEventOnNotelistButtons()});function replaceHtml(a,b){if($.browser.msie){$(a).each(function(){var c=this.cloneNode(false);this.parentNode.replaceChild(c,this)});$(a).append(b)}else{$(a).html(b)}};

