var kurier=kurier||{};kurier.Questionnaire=function(c,a){var b=this;var d=$(c);d.data("questionnaire",b);b.showMessage=function(f,e){d.find(".jsQuestionnaireChoices").removeClass("loading").html(f);d.find(".jsQuestionnaireButtons .buttonsmall").hide()};b.showResult=function(u){if(a){var q=$("<ul></ul>");if(typeof u.questions!=="undefined"){q.append($("<li>"+u.completeUserCount+" Mitspieler.</li>"));q.append($("<li>Du hast "+u.correctAnswerRatio+"% richtig.</li>"));q.append($("<li>Mehr erfährst du auf der Quizseite.</li>"))}else{for(var o in u){if(u.length>1){d.find(".questionText").text("");q.append("<li>"+u[o].text+"<span>"+u[o].count+"</span></li>")}else{d.find(".questionText").html(u[o].text+"<span>"+u[o].count+"</span>")}if($.map(u[o].choices,function(k,j){return j}).length>3){q.append($('<li><span class="resulttext">Danke für Deine Stimme!</span></li>'));q.append($('<li><span class="resulttext">Das Ergebnis erfährst Du auf der Umfrageseite.</span></li>'))}else{for(var m in u[o].choices){var n=u[o].choices[m];q.append($('<li><span class="resulttext">'+n.text+'</span><div class="resultcontainer"><span class="bar" style="width:'+n.percentage+'%"><span class="percent open9 cpaper">'+n.percentage+'%</span></span></div><div class="clear"></div></li>'))}}}}d.find(".jsQuestionnaireChoices").replaceWith($('<div class="jsQuestionnaireChoices" />').append(q));d.find(".jsQuestionnaireButtons .buttonsmall").hide()}else{var q=$("<ul></ul>");if(typeof u.questions!=="undefined"){d.find(".jsQuestionnaireText").text("");d.find(".jsQuestionnaireChoices").removeClass("loading");d.find(".questioncount").empty().append($('<span class="openbold">Auflösung</span>'));var f=d.find(".questioncontainer");f.empty();var h="Sie verfügen über ein solides Grundwissen auf diesem Gebiet. Weiter so!";if(u.correctAnswerRatio>66){h="Sehr gut gemacht! Ihnen kann auf diesem Gebiet keiner etwas vormachen."}else{if(u.correctAnswerRatio<33){h="Da geht noch was. Ihre Fachgebiete liegen offenbar in anderen Bereichen."}}f.prepend($('<span class="blockcontent">Sie haben '+u.correctAnswerCount+" von "+u.questionCount+" Fragen richtig beantwortet. "+h+"</span>"));var q=$("<ul></ul>");var e=1;for(var o in u.questions){var r=$('<li class="question"><span class="open9 blockletters">Frage '+e+++"</span></li>");r.append($('<h2 class="metalight26">'+u.questions[o].text+"</h2>"));if(typeof u.questions[o].imageUrl!=="undefined"){r.append($('<img src="'+u.questions[o].imageUrl+'" alt="'+u.questions[o].text+'" /><span class="open12">'+u.questions[o].imageDescription+"</span>"))}var w=$('<ul class="withimg"></ul>');for(var m in u.questions[o].choices){var v="";var g="";if(u.questions[o].choices[m].userAnswer&&u.questions[o].choices[m].correctAnswer){v="green";g="richtig"}else{if(u.questions[o].choices[m].correctAnswer){v="green";g=""}else{if(u.questions[o].choices[m].userAnswer&&!u.questions[o].choices[m].correctAnswer){v="red";g="falsch"}}}var p=$('<label for="choice-'+m+'" class="'+v+'"></label>');if(g!==""){p.append($('<span class="conclusion open9 blockletters">'+g+"</span>"))}if(u.questions[o].choices[m].userAnswer){p.append($('<input name="choices['+o+'][]" type="radio" disabled checked id="choice-'+m+'">'))}else{p.append($('<input name="choices['+o+'][]" type="radio" disabled id="choice-'+m+'">'))}if(u.questions[o].choices[m].relatedContent){for(var l in u.questions[o].choices[m].relatedContent){var t=u.questions[o].choices[m].text;var s=u.questions[o].choices[m].relatedContent[l].imageUrl;if(!s){continue}p.append($('<span class="answer"><img src="'+s+'" height="80" alt="'+t+'"/></span>'));break}}else{p.append($('<span class="answer">'+u.questions[o].choices[m].text+"</span>"))}p.append($('<div class="clear"></div>'));w.append($("<li></li>").append(p))}r.append(w);q.append(r)}f.append(q);$(".type_buzzquiz div.questionnaireContainer").addClass("hide");$(".type_buzzquiz hgroup, .type_buzzquiz figure").removeClass("hide")}else{if(typeof u.resultcategorytext!=="undefined"){d.find(".questionnaireResultText").removeClass("hide");if(typeof u.imageUrl!=="undefined"){$(".type_buzzquiz .inner figure img").attr("src",u.imageUrl).css({display:"block",margin:"10px 0"});$(".type_buzzquiz .inner figure").addClass("relative");$(".type_buzzquiz .inner figure").append('<span class="buzzfeed-img-copyright">'+u.imageCopyright+"</span>");$(".type_buzzquiz .inner figure").removeClass("hide")}$(".type_buzzquiz hgroup h1").text(u.title);$(".type_buzzquiz hgroup .textsection").html(u.resultcategorytext);$(".type_buzzquiz div.questionnaireContainer").addClass("hide");$(".type_buzzquiz hgroup").removeClass("hide");if(typeof u.color!=="undefined"){$(".quizcontainer").css("background-color",u.color)}}else{d.find(".jsQuestionnaireChoices").removeClass("loading");for(var o in u){if(u.length>1){d.find(".questionText").text("");q.append("<li>"+u[o].text+"<span>"+u[o].count+"</span></li>")}else{d.find(".questionText").html(u[o].text+"<span>"+u[o].count+"</span>")}for(var m in u[o].choices){var n=u[o].choices[m];q.append($('<li><span class="resulttext block">'+n.text+'</span><div class="resultcontainer"><span class="percent open9 cpaper">'+n.percentage+'%</span><span class="percentdivider"></span><span class="bar" style="width:'+Math.round(n.percentage)+'%"></span></div><div class="clear"></div></li>'))}}}}d.find(".jsQuestionnaireChoices").empty().append(q);d.find(".jsQuestionnaireButtons .buttonsmall").hide()}};b.showQuestion=function(k){var m=$("<ul></ul>");d.attr("action",k.action);$userReference=d.find("input[name=userReference]");if($userReference.length===0){$userReference=$('<input type="hidden" name="userReference" value="'+k.userReference+'">')}d.append($userReference);if(a){d.find(".questionText").html(k.text);for(var h in k.choices){var g=$('<label for="choice-'+h+'"></label>');g.append($('<input name="choice[]" type="radio" value="'+h+'" id="choice-'+h+'">'));g.append($('<span class="blockcontent">'+k.choices[h].text+'</span><span class="clear"></span>'));m.append($("<li></li>").append(g))}}else{d.find(".jsQuestionnaireText").html(k.text);d.find(".buzzfeed-question-sub-text").removeClass("hide");d.find(".jsQuestionIndex").text((k.index+1));d.find(".bullets .bullet").removeClass("active").eq(k.index).addClass("active");if(typeof k.imageUrl!=="undefined"){d.find(".questionImageContainer .questionImage").attr({src:k.imageUrl,alt:k.text,style:""}).removeClass("hide");d.find(".buzzfeed-textimage-text.jsQuestionnaireText").text(k.text.substr(0,80));d.find(".buzzfeed-img-copyright").removeClass("hide");d.find(".questionImageContainer .questionImageCaption").text(k.imageDescription);if(typeof k.imageCopyright!=="undefined"&&k.imageCopyright!=null){if(k.questionnaire.type===5){d.find(".buzzfeed-textimage .buzzfeed-img-copyright").text(k.imageCopyright)}if(k.imageDescription.length!==0){d.find(".questionImageContainer .questionImageCopyright").text(" - "+k.imageCopyright)}else{d.find(".questionImageContainer .questionImageCopyright").text(k.imageCopyright)}}if(typeof k.imageCopyrightUri!=="undefined"&&k.imageCopyrightUri!=null){if(k.imageCopyright.length!==0){d.find(".questionImageContainer .questionImageCopyrightUri").text(" - "+k.imageCopyrightUri)}else{d.find(".questionImageContainer .questionImageCopyrightUri").text(k.imageCopyrightUri)}}}else{d.find(".buzzfeed-question-sub-text").addClass("hide");d.find(".buzzfeed-img-copyright").addClass("hide");d.find(".questionImageContainer .questionImage").addClass("hide")}for(var h in k.choices){var l;if(k.choices[h].relatedContent){for(var f in k.choices[h].relatedContent){if(k.questionnaire.type===5){l='<span class="answer down">'+k.choices[h].text+"</span>";l+='<img src="'+k.choices[h].relatedContent[f].imageUrl+'" width="195" height="137" alt="'+k.choices[h].text+'" /><span class="buzzfeed-img-copyright">'+k.choices[h].relatedContent[f].imageCopyright+"</span>"}else{if(k.questionnaire.styleSheet){l='<img src="'+k.choices[h].relatedContent[f].imageUrl+'" width="195" height="137" alt="'+k.choices[h].text+'" />'}else{l='<img src="'+k.choices[h].relatedContent[f].imageUrl+'" height="80" alt="'+k.choices[h].text+'" />'}}break}}else{l=k.choices[h].text}var g=$('<label for="choice-'+h+'"></label>');g.append($('<input name="choice[]" type="radio" value="'+h+'" id="choice-'+h+'">'));if(k.questionnaire.styleSheet&&k.choices[h].relatedContent){for(var f in k.choices[h].relatedContent){if(k.choices[h].relatedContent[f].imageUrl!=null){g.append($('<span class="answer down">'+k.choices[h].text+'</span><span class="clear"></span>'+l));g.addClass("block")}}}else{g.append($('<span class="answer">'+l+'</span><span class="clear"></span>'))}if(k.questionnaire.styleSheet){m.append($('<li style="background-color: '+k.questionnaire.styleSheet+';"></li>').append(g))}else{m.append($("<li></li>").append(g))}}if(typeof k.uploadAction!=="undefined"){var g=$('<iframe height="75" width="400" src="'+k.uploadAction+'" border="0" frameborder="0" allowTransparency="true"></iframe>');m.append($("<li></li>").append(g))}if(k.freeTextAllowed){var g=$('<label for="question-'+k.id+'-freechoice"></label>');g.append($('<input name="choice[]" type="text" id="question-'+k.id+'-freechoice">'));m.append($("<li></li>").append(g))}}d.find(".jsQuestionnaireChoices").replaceWith($('<div class="jsQuestionnaireChoices" />').append(m));var e=d.find("input");b.buttonControl(e);d.find(".jsQuestionnaireButtons").addClass("buttonsmall-inactive")};b.buttonControl=function(f){d.find(".jsQuestionnaireButtons").show();if(f.length==0){var k=d.find("textarea");var h=d.find("iframe");if(k){for(var g=0,e=k.length;g<e;g++){$(k[g]).bind("keydown",function(){d.find(".jsQuestionnaireButtons").removeClass("buttonsmall-inactive");$(this).unbind("keydown")})}}if(h){d.find(".jsQuestionnaireButtons").removeClass("buttonsmall-inactive")}}else{for(var g=0,e=f.length;g<e;g++){var j=f[g].type;if(j=="radio"){$(f[g]).bind("change",function(){d.find(".jsQuestionnaireButtons").removeClass("buttonsmall-inactive");$(this).unbind("change")})}else{if(j=="text"){$(f[g]).bind("keydown",function(){d.find(".jsQuestionnaireButtons").removeClass("buttonsmall-inactive");$(this).unbind("keydown")})}else{d.find(".jsQuestionnaireButtons").removeClass("buttonsmall-inactive")}}}}if($(".type_buzzquiz div.questionnaireContainer")){d.find('input[type="radio"]').click(function(){$(".jsQuestionnaireChoices ul li").css("opacity",0.5);$(this).closest("li").css("opacity",1)})}};(function(){var e=d.find("input");b.buttonControl(e);$(document).on(kurier.events.SESSION_LOADED,function(g,h){if(h&&!$.isEmptyObject(h)){d.find(".questionnaireContainer").removeClass("hide");d.find(".loginNotice").addClass("hide")}});d.find("a.login").on("click",function(g){var h=$(".topmenus .minimenu .symbol.login");if(h){h.click()}return false});d.find(".submitButton").on("click",function(){var h=d.find("input");var l=false;if(h.length==0){var n=d.find("textarea");if(n){for(var k=0,g=n.length;k<g;k++){if(n[0].value!=""){l=true;break}}}}else{for(var k=0,g=h.length;k<g;k++){if(h[k].type=="radio"){if(h[k].checked==true){l=true;break}}else{if(h[k].type=="text"){if(h[k].value!=""){l=true;break}}else{if(h[k].type=="file"){if(h[k].value!=""){l=true;break}}}}}}if(!l){return false}d.find(".jsQuestionnaireButtons").hide();d.find(".jsQuestionnaireButtons").addClass("buttonsmall-inactive");var j=d.attr("action");var m=d.serialize();if(m.length==0){return false}d.find(".jsQuestionnaireChoices").addClass("loading").html("");reloadOewa();$.ajax({url:j,type:"POST",data:m,dataType:"JSON",success:function(o,p,i){if(typeof o.error!=="undefined"){b.showMessage(o.error.message,"error")}else{if(typeof o.message!=="undefined"){b.showMessage(o.message,"info")}else{if(typeof o.result!=="undefined"){b.showResult(o.result)}else{if(typeof o.question!=="undefined"){b.showQuestion(o.question)}}}}}});return false});d.find(".freeTextChoice").keypress(function(g){if(g.which===13){d.find(".submitButton").focus().click();return false}});if(d.data("questionnaire-type")=="1"&&$.cookie("questionnaire:"+d.data("questionnaire-id")+"-question:"+d.data("firstquestion-id"))!==null){var f=d.data("result-url");$.ajax({url:f,type:"GET",dataType:"JSON",success:function(h,i,g){if(typeof h.error!=="undefined"){b.showMessage(h.error.message,"error")}else{if(typeof h.message!=="undefined"){b.showMessage(h.message,"info")}else{if(typeof h.result!=="undefined"){b.showResult(h.result)}}}}})}})()};var cms=cms||{};cms.ArticleSlider=function(f){var b=this;this.id=f;var d=$("#"+f+"-images");var c=d.find(".article-slider-image");var a=d.find(".article-slider-caption");this.slideshow=new cms.Slideshow(d,c);this.thumblist=new cms.BulletThumblist(this.slideshow);$("#"+f).append(this.thumblist.$node);var e=false;b.slideshow.on("slidechange",function(g){if(e){return}e=true;b.thumblist.jumpTo(g.index);e=false});b.thumblist.on("select",function(g){if(e){return}e=true;b.slideshow.jumpTo(g.index);e=false});$("#"+f+" .slide-wrapper").on("click",function(g){b.slideshow.next();g.preventDefault();return false});$("#"+f+"-nextslide").on("click",function(g){b.slideshow.next();g.preventDefault();return false});$("#"+f+"-prevslide").on("click",function(g){b.slideshow.prev();g.preventDefault();return false});b.slideshow.on("slidechange",function(g){$("#"+f+"-caption").html(a.eq(g.index).show())});$("#"+f+"-caption").html(a.eq(0).show())};var kurier=kurier||{};kurier.StickyNav=function(){var a=this;var d=$("#stickyNav");var h=$("#stickyNavWrapper");var f=$("#articleWrapper");var c=50;var e=50;a.adjustStickyNavWrapperHeight=function(){h.css("height",f.height())};var g=function(){h.css("height",f.height());if($(".grid-partition").length!=0){if($(window).scrollTop()>($("#loadcontent").offset().top-d.height()-e-(2*c))){d.css("position","absolute");d.css("bottom",e);d.css("top","auto");return true}else{d.css("position","fixed");d.css("top",c);d.css("bottom","auto")}}if(navigator.userAgent.match(/Android.+Mobile|iPhone|iPod|BlackBerry|Opera Mini|IEMobile|Windows Phone/i)){d.css("position","static")}else{if($(window).scrollTop()<(h.offset().top-c)){d.css("position","static")}else{if($(window).scrollTop()>($("footer.footer").offset().top-d.height()-e-(2*c))){d.css("position","absolute");d.css("bottom",e);d.css("top","auto")}else{d.css("position","fixed");d.css("top",c);d.css("bottom","auto")}}}};var b=function(j,l){if(j==="article"&&l==="up"){return}var k=$('#stickyNav li[data-nav-section="'+j+'"]');var i=$("#stickyNav li.item").index(k);if(l==="up"){k.removeClass("done");k=$("#stickyNav li.item").eq((i-1))}else{if(l==="down"){$("#stickyNav li.done .stickycontent").slideUp();if(!k.hasClass("done")){k.addClass("done")}}}if(!k.hasClass("highlighted")){$("#stickyNav li").removeClass("highlighted");$("#stickyNav .redheadline").removeClass("redheadline").addClass("stickynavheadline");$("#stickyNav li:not(.done) .stickycontent").slideDown();k.find(".stickynavheadline").removeClass("stickynavheadline").addClass("redheadline");k.find(".stickycontent").slideDown();k.addClass("highlighted")}};(function(){if(d.length>0){$(window).on("scroll",function(){g()});$(window).on("resize",function(){g()});$("section.heroheader").waypoint(function(i,j){b("article",j)},{offset:200});$('a[name="diskussion"]').waypoint(function(i,j){b("comments",j)},{offset:200});$("section#relatedStories").waypoint(function(i,j){b("related",j)},{offset:200});$("[data-text-section]").waypoint(function(i,j){b($(this).data("text-section"),j)},{offset:200});$(".tickerlist").on("CONTENT_CHANGED",function(){$(this).find("[data-text-section]").waypoint(function(i,j){b($(this).data("text-section"),j)},{offset:200})})}})()};var stickyNav;$(document).ready(function(){if(!($.browser.msie&&parseInt($.browser.version)<=8)){if($(".frontend-kurier").length>0){stickyNav=kurier.StickyNav()}$(".linktoanchor").click(function(d){var a=$(this).attr("href");var c=$(this).closest("li");var g=$(this).closest("ul");var f=($("li",g).index(c)*30)+50;var b=$(a).offset().top-f;$("html, body").animate({scrollTop:b},600)})}});var cms=cms||{};cms.Gallery=function(m){var k=(function(){var i=function(v,w){cms.Slideshow.call(this,v,w)};i.prototype=$.extend({},cms.Slideshow.prototype);i.prototype.sizeChanged=function(){cms.Slideshow.prototype.sizeChanged.call(this);if($.browser.msie&&parseInt($.browser.version)<=8){this.$node.css("height",$(window).height()-286);this.$node.css("width",$(window).width()-339)}var v=this;this.$slides.each(function(z,x){var B=$(this);var y=B.find(".slide-image");y.css({"max-width":v.$node.width()+"px","max-height":(v.$node.height()-20)+"px"});B.find(".gallery-campaign-innerimage").css({width:(y.width()-10)+"px",height:(y.height()-10)+"px"});var A=y.width();if(A!=0){var w=B.find(".slide-copyright").width(A)}})};cms.makeEventListener(i);return i})();var l=this;this.id=m;var p=$("#"+m+"-slides");var s=p.find(".slide");var t=p.find(".slide-text-long");var e=p.find(".slide-text-short");var c=p.find(".slide-title");var q=$("#"+m+"-thumbs");var d=p.find(".slide-thumb");var n=$(window).scrollTop();this.slideshow=new k(p,s);this.slideshow.$node.addClass("gallery-slideshow");this.slideshow.sizeChanged();$("#"+m+" .slide-wrapper .slide-image, #"+m+" .slide-wrapper .gallery-campaign-innerimage").on("click",function(i){if(l.isFullscreen()){l.slideshow.next();i.preventDefault();return false}});$("#"+m+"-nextslide").on("click",function(i){l.slideshow.next();i.preventDefault();return false});$("#"+m+"-prevslide").on("click",function(i){l.slideshow.prev();i.preventDefault();return false});var u=function(v){var i=typeof v!=="undefined"?v.index:l.slideshow.currentSlideNum();$("#"+m+"-title").html(c.eq(i).show());if(l.isFullscreen()){$("#"+m+"-caption").html(t.eq(i).show())}else{$("#"+m+"-caption").html(e.eq(i).show())}};l.slideshow.on("slidechange",u);this.on("enabled-fullscreen, disabled-fullscreen",u);this.thumblist=new cms.Thumblist(q,d);this.thumblist.$node.addClass("gallery-thumblist");var r=$("#"+m+"-thumb-forward");var h=$("#"+m+"-thumb-backward");r.on("click",function(i){l.thumblist.scrollForward();i.preventDefault();return false});h.on("click",function(i){l.thumblist.scrollBackward();i.preventDefault();return false});if(jQuery.support.opacity){var f=$([r[0],h[0]]);q.hover(function(){f.stop().animate({opacity:1},250)},function(){f.stop().animate({opacity:0},250)})}var g=false;l.slideshow.on("slidechange",function(i){if(g){return}g=true;l.thumblist.jumpTo(i.index);g=false});l.thumblist.on("select",function(i){if(g){return}g=true;l.slideshow.jumpTo(i.index);g=false});$("#"+m+"-fullscreen").on("click",function(i){l.enableFullscreen();reloadOewa();trackAnalytics(["Slideshows","SlideshowClick",l.getSlideShowId()]);i.preventDefault();return false});$("#"+this.id+" .closegallery").on("click",function(i){l.disableFullscreen();reloadOewa();trackAnalytics(["Slideshows","SlideshowClick",l.getSlideShowId()]);i.preventDefault();return false});$("#"+this.id+" .fullscreen").on("click",function(i){if(cms.toggleFullscreen()){reloadOewa();trackAnalytics(["Slideshows","SlideshowClick",l.getSlideShowId()])}else{l.disableFullscreen()}i.preventDefault();return false});l.slideshow.on("slidechange",function(i){if(i.isUserTriggered){reloadOewa()}if(!i.isUserTriggered){return}if(l.isFullscreen()){return}l.enableFullscreen();l.slideshow.jumpTo(i.index)});$("#"+this.id).on("click",function(i){if(l.isFullscreen()){return}l.enableFullscreen();l.slideshow.jumpTo(i.index)});$("#"+l.id+" .slidenumber").text(1);$("#"+l.id+" .totalslides").text(s.length);l.slideshow.on("slidechange",function(i){$("#"+l.id+" .slidenumber").text(i.index+1)});var b=window.location.hash.replace(/^#/,"");if(b){var j=b.replace(/,.*/,"");if(j==this.getSlideShowId()){var a=b.replace(/^[^,]*,/,"");for(var o=0;o<s.length;o++){if(s.eq(o).attr("data-slide-id")==a){this.slideshow.jumpTo(o,false);this.enableFullscreen();break}}}}$(window).on("hashchange",function(){var y=window.location.hash.replace(/^#/,"");if(y){var x=y.replace(/,.*/,"");if(x==l.getSlideShowId()){var w=y.replace(/^[^,]*,/,"");for(var v=0;v<s.length;v++){if(s.eq(v).attr("data-slide-id")==w){if(l.slideshow.currentSlideNum()!=v){l.slideshow.jumpTo(v,false)}l.enableFullscreen();break}}}}else{l.disableFullscreen()}});l.on("enabled-fullscreen",function(){window.location.hash="#"+l.getSlideShowId()+","+l.slideshow.currentSlide().find(".slide").attr("data-slide-id")}).on("disabled-fullscreen",function(){window.location.hash=""});l.slideshow.on("slidechange",function(i){if(i.isUserTriggered){window.location.hash="#"+l.getSlideShowId()+","+s.eq(i.index).attr("data-slide-id")}});l.slideshow.on("slidechange",function(v){var i=s.eq(v.index).find(".slide-image").attr("src");updateSlideShowSocialShare(l.getSlideShowId(),window.location.href,i)});l.on("enabled-fullscreen",function(){$(".sharebarslideshow").removeClass("hide")}).on("disabled-fullscreen",function(){$(".sharebarslideshow").addClass("hide")})};cms.makeEventListener(cms.Gallery);$(window).resize(function(){if(isTouchDevice()){$(".fullscreen").remove();return}if((window.fullScreen)||(window.innerWidth==screen.width&&window.innerHeight==screen.height)){$(".fullscreen").addClass("max");$(".vollbild").text("Vollbild beenden");$(".fullscreenicon").addClass("exit");$(".closegallery").hide()}else{$(".fullscreen").removeClass("max");$(".vollbild").text("Vollbild");$(".fullscreenicon").removeClass("exit");$(".closegallery").show()}});cms.Gallery.prototype.getSlideShowId=function(){return this.id.replace(/[^0-9]/g,"")};cms.Gallery.fullscreenInstance=null;cms.Gallery.prototype.enableFullscreen=function(){currentScrollPosition=$(window).scrollTop();if(cms.Gallery.fullscreenInstance===this){return}if(typeof adGallerySlot!=="undefined"){adGallerySlot()}if(cms.Gallery.fullscreenInstance){cms.Gallery.fullscreenInstance.disableFullscreen()}this.trigger("enabling-fullscreen");cms.Gallery.fullscreenInstance=this;var a=$("#"+this.id+"-container");$("body").addClass("gallery-in-fullscreen");$("#sitebar").addClass("hide");a.removeClass("gallery-container").addClass("gallery-fullscreen-container");var c=a.closest(".gallery-fullscreen-overlay-disabled");c.addClass("gallery-fullscreen-overlay").removeClass("gallery-fullscreen-overlay-disabled");if($.browser.msie||(isTouchDevice()==true)){$(".fullscreen").remove()}if($.browser.msie&&parseInt($.browser.version)<=8){$("#"+this.id+"-slides").css("height",$(window).height()-286)}setTimeout(function(){cms.Gallery.hideAdOverlays()},300);this.slideshow.sizeChanged();this.thumblist.nodeSizeChanged();var b=this;$(document).on("keydown."+this.id,function(d){if(d.keyCode==27){b.disableFullscreen();d.preventDefault();return false}if(d.keyCode==39){b.slideshow.next();d.preventDefault();return false}if(d.keyCode==37){b.slideshow.prev();d.preventDefault();return false}});this.trigger("enabled-fullscreen")};cms.Gallery.prototype.isFullscreen=function(){return cms.Gallery.fullscreenInstance===this};cms.Gallery.prototype.disableFullscreen=function(){if(cms.Gallery.fullscreenInstance!==this){return}this.trigger("disabling-fullscreen");var a=$("#"+this.id+"-container");if(this.slideshow.isLastSlide()&&($("#gallery-"+this.id+"-related")!==undefined)){this.slideshow.jumpTo(0,false)}cms.Gallery.showAdOverlays();var b=a.closest(".gallery-fullscreen-overlay");b.addClass("gallery-fullscreen-overlay-disabled").removeClass("gallery-fullscreen-overlay");a.addClass("gallery-container").removeClass("gallery-fullscreen-container");$("#sitebar").removeClass("hide");$("body").removeClass("gallery-in-fullscreen");this.slideshow.sizeChanged();this.thumblist.nodeSizeChanged();cms.Gallery.fullscreenInstance=null;$(document).off("keydown."+this.id);this.trigger("disabled-fullscreen");if($.browser.msie&&parseInt($.browser.version,10)<=8){this.slideshow.$node.css("width","460px");this.slideshow.$node.css("height","273px")}window.scrollTo(0,currentScrollPosition)};cms.Gallery.adOverlaySelectors=["#adwxbottomsujet","#wdaylayer","#adwxwpbsb","#adwxwpsky","#adwxwpsky2","#adwxwpskypos","#groupM_Ipage","#groupM_Ipage_container","#AdContainer_Position1","#adwSitebar",".adform-adbox",".adform-adbox object","#AdContainer_Top1","#sitebar","#adv_sitebar","#AdContainer_Skyscraper","[id^=ftdiv]","#groupM_Ipage"];cms.Gallery.showAdOverlays=function(){$(cms.Gallery.adOverlaySelectors).show().each(function(b,c){var a=$(c);if(!a.data("orginial-z-index")){return}a.css("z-index",a.data("orginial-z-index"))})};cms.Gallery.hideAdOverlays=function(){$(cms.Gallery.adOverlaySelectors).hide().each(function(b,c){var a=$(c);if(a.length){}if(!a.css("z-index")){return}if(a.data("orginial-z-index")){a.css("z-index",1);return}a.data("orginial-z-index",a.css("z-index"));a.css("z-index",1)})};
/*!
 * hoverIntent r7 // 2013.03.11 // jQuery 1.9.1+
 * http://cherne.net/brian/resources/jquery.hoverIntent.html
 *
 * You may use hoverIntent under the terms of the MIT license. Basically that
 * means you are free to use hoverIntent as long as this header is left intact.
 * Copyright 2007, 2013 Brian Cherne
 */
(function(a){a.fn.hoverIntent=function(m,d,h){var j={interval:100,sensitivity:7,timeout:0};if(typeof m==="object"){j=a.extend(j,m)}else{if(a.isFunction(d)){j=a.extend(j,{over:m,out:d,selector:h})}else{j=a.extend(j,{over:m,out:m,selector:d})}}var l,k,g,f;var e=function(n){l=n.pageX;k=n.pageY};var c=function(o,n){n.hoverIntent_t=clearTimeout(n.hoverIntent_t);if((Math.abs(g-l)+Math.abs(f-k))<j.sensitivity){a(n).off("mousemove.hoverIntent",e);n.hoverIntent_s=1;return j.over.apply(n,[o])}else{g=l;f=k;n.hoverIntent_t=setTimeout(function(){c(o,n)},j.interval)}};var i=function(o,n){n.hoverIntent_t=clearTimeout(n.hoverIntent_t);n.hoverIntent_s=0;return j.out.apply(n,[o])};var b=function(p){var o=jQuery.extend({},p);var n=this;if(n.hoverIntent_t){n.hoverIntent_t=clearTimeout(n.hoverIntent_t)}if(p.type=="mouseenter"){g=o.pageX;f=o.pageY;a(n).on("mousemove.hoverIntent",e);if(n.hoverIntent_s!=1){n.hoverIntent_t=setTimeout(function(){c(o,n)},j.interval)}}else{a(n).off("mousemove.hoverIntent",e);if(n.hoverIntent_s==1){n.hoverIntent_t=setTimeout(function(){i(o,n)},j.timeout)}}};return this.on({"mouseenter.hoverIntent":b,"mouseleave.hoverIntent":b},j.selector)}})(jQuery);if(!Array.prototype.indexOf){Array.prototype.indexOf=function(c){if(this==null){throw new TypeError()}var d=Object(this);var a=d.length>>>0;if(a===0){return -1}var e=0;if(arguments.length>1){e=Number(arguments[1]);if(e!=e){e=0}else{if(e!=0&&e!=Infinity&&e!=-Infinity){e=(e>0||-1)*Math.floor(Math.abs(e))}}}if(e>=a){return -1}var b=e>=0?e:Math.max(a-Math.abs(e),0);for(;b<a;b++){if(b in d&&d[b]===c){return b}}return -1}}var kurier=kurier||{};kurier.Comments=function(){var a=this;a.isLoggedIn=function(){if(typeof Community==="undefined"){return false}return Community.loggedIn};a.redirectToLogin=function(){var b=$(".navigation-user-related .user .header-main-button");if(b){b.click()}return null};a.loadPermalink=function(e,c,d,b){if(typeof c==="undefined"||typeof e==="undefined"){return false}$.ajax("/comment/permalink/"+e+"/"+c,{type:"GET",success:function(g,h,f){if(g){Comments.loadComments(e,g);$(document).one(kurier.events.COMMENTS_LOADED,function(){$("[id^=commentbox_], .comments-pagination").removeClass("hide");$("#showMoreComments").addClass("hide");if(window.location.hash.length!==0&&window.location.hash.indexOf("commentbox")!==-1){var i=window.location.hash.split("_")[1];a.goToPermalink(i)}})}}})};a.goToPermalink=function(b){$("[id^=commentbox_], .comments-pagination").removeClass("hide");$("#showMoreComments").addClass("hide");if(typeof $("#commentbox_"+b).offset()!=="undefined"){$("html, body").animate({scrollTop:$("#commentbox_"+b).offset().top-$(".mainmenu").height()})}};a.openTanRegister=function(){var b=$("#community-tan-management");if(b){b.click()}return null};(function(){$(document).on(kurier.events.CONTENT_LOADED,function(){$("#commentformwrapper, .comments-login-link").off("click").on("click",function(b){if(!a.isLoggedIn()){comments.redirectToLogin()}})})})()};var comments;(function(){comments=new kurier.Comments()})();
/*!
jQuery Waypoints - v1.1.7
Copyright (c) 2011-2012 Caleb Troughton
Dual licensed under the MIT license and GPL license.
https://github.com/imakewebthings/jquery-waypoints/blob/master/MIT-license.txt
https://github.com/imakewebthings/jquery-waypoints/blob/master/GPL-license.txt
*/
(function($,k,m,i,d){var e=$(i),g="waypoint.reached",b=function(o,n){o.element.trigger(g,n);if(o.options.triggerOnce){o.element[k]("destroy")}},h=function(p,o){if(!o){return -1}var n=o.waypoints.length-1;while(n>=0&&o.waypoints[n].element[0]!==p[0]){n-=1}return n},f=[],l=function(n){$.extend(this,{element:$(n),oldScroll:0,waypoints:[],didScroll:false,didResize:false,doScroll:$.proxy(function(){var q=this.element.scrollTop(),p=q>this.oldScroll,s=this,r=$.grep(this.waypoints,function(u,t){return p?(u.offset>s.oldScroll&&u.offset<=q):(u.offset<=s.oldScroll&&u.offset>q)}),o=r.length;if(!this.oldScroll||!q){$[m]("refresh")}this.oldScroll=q;if(!o){return}if(!p){r.reverse()}$.each(r,function(u,t){if(t.options.continuous||u===o-1){b(t,[p?"down":"up"])}})},this)});$(n).bind("scroll.waypoints",$.proxy(function(){if(!this.didScroll){this.didScroll=true;i.setTimeout($.proxy(function(){this.doScroll();this.didScroll=false},this),$[m].settings.scrollThrottle)}},this)).bind("resize.waypoints",$.proxy(function(){if(!this.didResize){this.didResize=true;i.setTimeout($.proxy(function(){$[m]("refresh");this.didResize=false},this),$[m].settings.resizeThrottle)}},this));e.load($.proxy(function(){this.doScroll()},this))},j=function(n){var o=null;$.each(f,function(p,q){if(q.element[0]===n){o=q;return false}});return o},c={init:function(o,n){this.each(function(){var u=$.fn[k].defaults.context,q,t=$(this);if(n&&n.context){u=n.context}if(!$.isWindow(u)){u=t.closest(u)[0]}q=j(u);if(!q){q=new l(u);f.push(q)}var p=h(t,q),s=p<0?$.fn[k].defaults:q.waypoints[p].options,r=$.extend({},s,n);r.offset=r.offset==="bottom-in-view"?function(){var v=$.isWindow(u)?$[m]("viewportHeight"):$(u).height();return v-$(this).outerHeight()}:r.offset;if(p<0){q.waypoints.push({element:t,offset:null,options:r})}else{q.waypoints[p].options=r}if(o){t.bind(g,o)}if(n&&n.handler){t.bind(g,n.handler)}});$[m]("refresh");return this},remove:function(){return this.each(function(o,p){var n=$(p);$.each(f,function(r,s){var q=h(n,s);if(q>=0){s.waypoints.splice(q,1);if(!s.waypoints.length){s.element.unbind("scroll.waypoints resize.waypoints");f.splice(r,1)}}})})},destroy:function(){return this.unbind(g)[k]("remove")}},a={refresh:function(){$.each(f,function(r,s){var q=$.isWindow(s.element[0]),n=q?0:s.element.offset().top,p=q?$[m]("viewportHeight"):s.element.height(),o=q?0:s.element.scrollTop();$.each(s.waypoints,function(u,x){if(!x){return}var t=x.options.offset,w=x.offset;if(typeof x.options.offset==="function"){t=x.options.offset.apply(x.element)}else{if(typeof x.options.offset==="string"){var v=parseFloat(x.options.offset);t=x.options.offset.indexOf("%")?Math.ceil(p*(v/100)):v}}x.offset=x.element.offset().top-n+o-t;if(x.options.onlyOnScroll){return}if(w!==null&&s.oldScroll>w&&s.oldScroll<=x.offset){b(x,["up"])}else{if(w!==null&&s.oldScroll<w&&s.oldScroll>=x.offset){b(x,["down"])}else{if(!w&&s.element.scrollTop()>x.offset){b(x,["down"])}}}});s.waypoints.sort(function(u,t){return u.offset-t.offset})})},viewportHeight:function(){return(i.innerHeight?i.innerHeight:e.height())},aggregate:function(){var n=$();$.each(f,function(o,p){$.each(p.waypoints,function(q,r){n=n.add(r.element)})});return n}};$.fn[k]=function(n){if(c[n]){return c[n].apply(this,Array.prototype.slice.call(arguments,1))}else{if(typeof n==="function"||!n){return c.init.apply(this,arguments)}else{if(typeof n==="object"){return c.init.apply(this,[null,n])}else{$.error("Method "+n+" does not exist on jQuery "+k)}}}};$.fn[k].defaults={continuous:true,offset:0,triggerOnce:false,context:i};$[m]=function(n){if(a[n]){return a[n].apply(this)}else{return a.aggregate()}};$[m].settings={resizeThrottle:200,scrollThrottle:100};e.load(function(){$[m]("refresh")})})(jQuery,"waypoint","waypoints",window);var cms=cms||{};cms.ArticleSliderIntegrated=function(a){var i=this;this.id=a;var e=jQuery("#"+a),c=e.find(".slides"),d=e.find(".slide"),b=e.find(".slide-caption"),h=e.find(".slide-copyright"),g=e.find(".slider-caption"),f=e.find(".slider-copyright");this.slideshow=new cms.SlideshowIntegrated(c,d);e.find(".slide-wrapper").on("click",function(j){i.slideshow.next();return false});e.find(".arrow.next").on("click",function(j){i.slideshow.next();trackEvent("Slideshows","SlideshowClick","next",i.id.replace(/[^\d]+/,""));return false});e.find(".arrow.prev").on("click",function(j){i.slideshow.prev();trackEvent("Slideshows","SlideshowClick","prev",i.id.replace(/[^\d]+/,""));return false});i.slideshow.on("slidechange",function(j){g.html(b.eq(j.index).html());f.html(h.eq(j.index).html())});i.slideshow.jumpTo(0);i.slideshow.trigger("slidechange",{index:0,isUserTriggered:false})};var kurier=kurier||{};kurier.QuestionnaireIntegrated=function(c,a){var b=this;var d=$(c);d.data("questionnaire",b);b.showMessage=function(f,e){d.find(".jsQuestionnaireChoices").removeClass("loading").html(f);d.find(".jsQuestionnaireButtons .buttonsmall").hide()};b.showResult=function(u){if(a){var q=$("<ul></ul>");if(typeof u.questions!=="undefined"){q.append($("<li>"+u.completeUserCount+" Mitspieler.</li>"));q.append($("<li>Du hast "+u.correctAnswerRatio+"% richtig.</li>"));q.append($("<li>Mehr erfährst du auf der Quizseite.</li>"))}else{for(var o in u){if(u.length>1){d.find(".questionText").text("");q.append("<li>"+u[o].text+"<span>"+u[o].count+"</span></li>")}else{d.find(".questionText").html(u[o].text+"<span>"+u[o].count+"</span>")}if($.map(u[o].choices,function(k,j){return j}).length>3){q.append($('<li><span class="resulttext">Danke für Deine Stimme!</span></li>'));q.append($('<li><span class="resulttext">Das Ergebnis erfährst Du auf der Umfrageseite.</span></li>'))}else{for(var m in u[o].choices){var n=u[o].choices[m];q.append($('<li><span class="resulttext">'+n.text+'</span><div class="resultcontainer"><span class="bar" style="width:'+n.percentage+'%"><span class="percent open9 cpaper">'+n.percentage+'%</span></span></div><div class="clear"></div></li>'))}}}}d.find(".jsQuestionnaireChoices").replaceWith($('<div class="jsQuestionnaireChoices" />').append(q));d.find(".jsQuestionnaireButtons .buttonsmall").hide()}else{var q=$("<ul></ul>");if(typeof u.questions!=="undefined"){d.find(".jsQuestionnaireText").text("");d.find(".jsQuestionnaireChoices").removeClass("loading");d.find(".questioncount").empty().append($('<span class="openbold">Auflösung</span>'));var f=d.find(".questioncontainer");f.empty();var h="Sie verfügen über ein solides Grundwissen auf diesem Gebiet. Weiter so!";if(u.correctAnswerRatio>66){h="Sehr gut gemacht! Ihnen kann auf diesem Gebiet keiner etwas vormachen."}else{if(u.correctAnswerRatio<33){h="Da geht noch was. Ihre Fachgebiete liegen offenbar in anderen Bereichen."}}f.prepend($('<span class="blockcontent">Sie haben '+u.correctAnswerCount+" von "+u.questionCount+" Fragen richtig beantwortet. "+h+"</span>"));var q=$("<ul></ul>");var e=1;for(var o in u.questions){var r=$('<li class="question"><span class="open9 blockletters">Frage '+e+++"</span></li>");r.append($('<h2 class="metalight26">'+u.questions[o].text+"</h2>"));if(typeof u.questions[o].imageUrl!=="undefined"){r.append($('<img src="'+u.questions[o].imageUrl+'" alt="'+u.questions[o].text+'" /><span class="open12">'+u.questions[o].imageDescription+"</span>"))}var w=$('<ul class="withimg"></ul>');for(var m in u.questions[o].choices){var v="";var g="";if(u.questions[o].choices[m].userAnswer&&u.questions[o].choices[m].correctAnswer){v="green";g="richtig"}else{if(u.questions[o].choices[m].correctAnswer){v="green";g=""}else{if(u.questions[o].choices[m].userAnswer&&!u.questions[o].choices[m].correctAnswer){v="red";g="falsch"}}}var p=$('<label for="choice-'+m+'" class="'+v+'"></label>');if(u.questions[o].choices[m].userAnswer){p.append($('<input name="choices['+o+'][]" type="radio" disabled checked id="choice-'+m+'">'))}else{p.append($('<input name="choices['+o+'][]" type="radio" disabled id="choice-'+m+'">'))}if(u.questions[o].choices[m].relatedContent){for(var l in u.questions[o].choices[m].relatedContent){var t=u.questions[o].choices[m].text;var s=u.questions[o].choices[m].relatedContent[l].imageUrl;if(!s){continue}p.append($('<span class="answer"><img src="'+s+'" height="80" alt="'+t+'"/></span>'));break}}else{p.append($('<span class="answer">'+u.questions[o].choices[m].text+"</span>"))}p.append($('<div class="clear"></div>'));w.append($("<li></li>").append(p))}r.append(w);q.append(r)}f.append(q);$(".type_buzzquiz div.questionnaireContainer").addClass("hide");$(".type_buzzquiz hgroup, .type_buzzquiz figure").removeClass("hide")}else{if(typeof u.resultcategorytext!=="undefined"){d.find(".questionnaireResultText").removeClass("hide");if(typeof u.imageUrl!=="undefined"){$(".type_buzzquiz figure img").attr("src",u.imageUrl).css({display:"block",margin:"10px 0"});$(".type-buzzquiz figure").addClass("relative");$(".type-buzzquiz figure").append('<span class="buzzfeed-img-copyright">'+u.imageCopyright+"</span>");$(".type-buzzquiz figure").removeClass("hide")}$(".type-buzzquiz hgroup h1").text(u.title);$(".type-buzzquiz hgroup .textsection").html(u.resultcategorytext);$(".type-buzzquiz div.questionnaireContainer").addClass("hide");$(".type-buzzquiz hgroup").removeClass("hide");if(typeof u.color!=="undefined"){$(".quizcontainer").css("background-color",u.color)}}else{d.find(".jsQuestionnaireChoices").removeClass("loading");for(var o in u){if(u.length>1){d.find(".questionText").text("");q.append("<li>"+u[o].text+"<span>"+u[o].count+"</span></li>")}else{d.find(".questionText").html(u[o].text+"<span>"+u[o].count+"</span>")}for(var m in u[o].choices){var n=u[o].choices[m];q.append($('<li><span class="resulttext block">'+n.text+'</span><div class="resultcontainer"><span class="cpaper">'+n.percentage+'%</span><span class="percentdivider"></span><div class="bar-block"><span class="bar" style="width:'+Math.round(n.percentage)+'%"></span></div></div><div class="clear"></div></li>'))}}}}d.find(".jsQuestionnaireChoices").empty().append(q);d.find(".jsQuestionnaireButtons .buttonsmall").hide()}};b.showQuestion=function(n){var l=$("<ul></ul>");d.attr("action",n.action);$userReference=d.find("input[name=userReference]");if($userReference.length===0){$userReference=$('<input type="hidden" name="userReference" value="'+n.userReference+'">')}d.append($userReference);if(a){d.find(".questionText").html(n.text);for(var g in n.choices){var m=$('<label for="choice-'+g+'"></label>');m.append($('<input name="choice[]" type="radio" value="'+g+'" id="choice-'+g+'">'));m.append($('<span class="blockcontent">'+n.choices[g].text+'</span><span class="clear"></span>'));l.append($("<li></li>").append(m))}}else{d.find(".jsQuestionnaireText").html(n.text);d.find(".buzzfeed-question-sub-text").removeClass("hide");d.find(".jsQuestionIndex").text((n.index+1));d.find(".bullets .bullet").removeClass("active").eq(n.index).addClass("active");if(typeof n.imageUrl!=="undefined"){d.find(".questionImageContainer .questionImage").attr({src:n.imageUrl,alt:n.text,style:""}).removeClass("hide");d.find(".buzzfeed-textimage-text.jsQuestionnaireText").text(n.text.substr(0,80));d.find(".buzzfeed-img-copyright").removeClass("hide");d.find(".questionImageContainer .questionImageCaption").text(n.imageDescription);if(typeof n.imageCopyright!=="undefined"&&n.imageCopyright!=null){if(n.questionnaire.type===5){d.find(".buzzfeed-textimage .buzzfeed-img-copyright").text(n.imageCopyright)}if(n.imageDescription.length!==0){d.find(".questionImageContainer .questionImageCopyright").text(" - "+n.imageCopyright)}else{d.find(".questionImageContainer .questionImageCopyright").text(n.imageCopyright)}}if(typeof n.imageCopyrightUri!=="undefined"&&n.imageCopyrightUri!=null){if(n.imageCopyright.length!==0){d.find(".questionImageContainer .questionImageCopyrightUri").text(" - "+n.imageCopyrightUri)}else{d.find(".questionImageContainer .questionImageCopyrightUri").text(n.imageCopyrightUri)}}}else{d.find(".buzzfeed-question-sub-text").addClass("hide");d.find(".buzzfeed-img-copyright").addClass("hide");d.find(".questionImageContainer .questionImage").addClass("hide")}for(var g in n.choices){var e;var k=false;if(n.choices[g].relatedContent){k=true;for(var f in n.choices[g].relatedContent){if(n.questionnaire.type===5){e='<div><img src="'+n.choices[g].relatedContent[f].imageUrl+'" width="195" height="137" alt="'+n.choices[g].text+'" /><div></div><span class="buzzfeed-img-copyright">'+n.choices[g].relatedContent[f].imageCopyright+"</span>"}else{if(n.questionnaire.styleSheet){e='<div><img src="'+n.choices[g].relatedContent[f].imageUrl+'" width="195" height="137" alt="'+n.choices[g].text+'" /></div>'}else{e='<img src="'+n.choices[g].relatedContent[f].imageUrl+'" height="80" alt="'+n.choices[g].text+'" />'}}break}}else{e=n.choices[g].text}var m=$('<input name="choice[]" type="radio" value="'+g+'" id="choice-'+g+'"/><label for="choice-'+g+'"><span><span></span></span><span class="answer_2">'+n.choices[g].text+"</span></label>");if(n.questionnaire.styleSheet&&n.choices[g].relatedContent){for(var f in n.choices[g].relatedContent){if(n.choices[g].relatedContent[f].imageUrl!=null){m.prepend($(e+'<span class="clear"></span>'));m.addClass("block")}}}else{m.append($('<span class="answer">'+e+'</span><span class="clear"></span>'))}var o="";if(k){o='class="questionWithImage"'}if(n.questionnaire.styleSheet){l.append($("<li "+o+' style="background-color: '+n.questionnaire.styleSheet+';"></li>').append(m))}else{l.append($("<li "+o+" ></li>").append(m))}}if(typeof n.uploadAction!=="undefined"){var m=$('<iframe height="75" width="400" src="'+n.uploadAction+'" border="0" frameborder="0" allowTransparency="true"></iframe>');l.append($("<li></li>").append(m))}if(n.freeTextAllowed){var m=$('<label for="question-'+n.id+'-freechoice"></label>');m.append($('<input name="choice[]" type="text" id="question-'+n.id+'-freechoice">'));l.append($("<li></li>").append(m))}}d.find(".jsQuestionnaireChoices").replaceWith($('<div class="jsQuestionnaireChoices" />').append(l));var h=d.find("input");b.buttonControl(h);d.find(".jsQuestionnaireButtons").addClass("buttonsmall-inactive")};b.buttonControl=function(f){d.find(".jsQuestionnaireButtons").show();if(f.length==0){var k=d.find("textarea");var h=d.find("iframe");if(k){for(var g=0,e=k.length;g<e;g++){$(k[g]).bind("keydown",function(){d.find(".jsQuestionnaireButtons").removeClass("buttonsmall-inactive");$(this).unbind("keydown")})}}if(h){d.find(".jsQuestionnaireButtons").removeClass("buttonsmall-inactive")}}else{for(var g=0,e=f.length;g<e;g++){var j=f[g].type;if(j=="radio"){$(f[g]).bind("change",function(){d.find(".jsQuestionnaireButtons").removeClass("buttonsmall-inactive");$(this).unbind("change")})}else{if(j=="text"){$(f[g]).bind("keydown",function(){d.find(".jsQuestionnaireButtons").removeClass("buttonsmall-inactive");$(this).unbind("keydown")})}else{d.find(".jsQuestionnaireButtons").removeClass("buttonsmall-inactive")}}}}if($(".type_buzzquiz div.questionnaireContainer")){d.find('input[type="radio"]').click(function(){$(".jsQuestionnaireChoices ul li").css("opacity",0.5).removeClass("active");$(this).closest("li").css("opacity",1).addClass("active")})}};(function(){var e=d.find("input");b.buttonControl(e);$(document).on(kurier.events.SESSION_LOADED,function(g,h){if(h&&!$.isEmptyObject(h)){d.find(".questionnaireContainer").removeClass("hide");d.find(".loginNotice").addClass("hide")}});d.find("a.login").on("click",function(g){var h=$(".topmenus .minimenu .symbol.login");if(h){h.click()}return false});d.find(".submitButton").on("click",function(h){if(!d.hasClass("type-poll")&&d.attr("data-require-user")==="1"&&typeof comments!=="undefined"&&!comments.isLoggedIn()){comments.redirectToLogin();return false}var j=d.find("input");var m=false;if(j.length==0){var o=d.find("textarea");if(o){for(var l=0,g=o.length;l<g;l++){if(o[0].value!=""){m=true;break}}}}else{for(var l=0,g=j.length;l<g;l++){if(j[l].type=="radio"){if(j[l].checked==true){m=true;break}}else{if(j[l].type=="text"){if(j[l].value!=""){m=true;break}}else{if(j[l].type=="file"){if(j[l].value!=""){m=true;break}}}}}}if(!m){return false}d.find(".jsQuestionnaireButtons").hide();d.find(".jsQuestionnaireButtons").addClass("buttonsmall-inactive");var k=d.attr("action");var n=d.serialize();if(n.length==0){return false}d.find(".jsQuestionnaireChoices").addClass("loading").html("");reloadOewa();$.ajax({url:k,type:"POST",data:n,dataType:"JSON",success:function(p,q,i){if(typeof p.error!=="undefined"){b.showMessage(p.error.message,"error")}else{if(typeof p.message!=="undefined"){b.showMessage(p.message,"info")}else{if(typeof p.result!=="undefined"){b.showResult(p.result)}else{if(typeof p.question!=="undefined"){b.showQuestion(p.question);if(d){window.scrollTo(0,parseInt(d.offset().top))}}}}}}});return false});d.find(".freeTextChoice").keypress(function(g){if(g.which===13){d.find(".submitButton").focus().click();return false}});if(d.data("questionnaire-type")=="1"&&$.cookie("questionnaire:"+d.data("questionnaire-id")+"-question:"+d.data("firstquestion-id"))!==null){var f=d.data("result-url");$.ajax({url:f,type:"GET",dataType:"JSON",success:function(h,i,g){if(typeof h.error!=="undefined"){b.showMessage(h.error.message,"error")}else{if(typeof h.message!=="undefined"){b.showMessage(h.message,"info")}else{if(typeof h.result!=="undefined"){b.showResult(h.result)}}}}})}})()};if(!Array.prototype.indexOf){Array.prototype.indexOf=function(c){if(this==null){throw new TypeError()}var d=Object(this);var a=d.length>>>0;if(a===0){return -1}var e=0;if(arguments.length>1){e=Number(arguments[1]);if(e!=e){e=0}else{if(e!=0&&e!=Infinity&&e!=-Infinity){e=(e>0||-1)*Math.floor(Math.abs(e))}}}if(e>=a){return -1}var b=e>=0?e:Math.max(a-Math.abs(e),0);for(;b<a;b++){if(b in d&&d[b]===c){return b}}return -1}}var kurier=kurier||{};kurier.Comments_integrated=function(){var a=this;a.isLoggedIn=function(){if(typeof Community==="undefined"){return false}return Community.loggedIn};a.redirectToLogin=function(){var b=$(".topmenus .minimenu .symbol.login");if(b.length){b.click()}else{$(window).trigger("hashchange","#login")}return null};a.loadPermalink=function(e,c,d,b){if(typeof c==="undefined"||typeof e==="undefined"){return false}$.ajax("/comment/permalink/"+e+"/"+c,{type:"GET",success:function(g,h,f){if(g){Comments_integrated.loadComments(e,g);$(document).one(kurier.events.COMMENTS_LOADED,function(){$("[id^=commentbox_], .comments-pagination").removeClass("hide");$("#showMoreComments").addClass("hide");if(window.location.hash.length!==0&&window.location.hash.indexOf("commentbox")!==-1){var i=window.location.hash.split("_")[1];a.goToPermalink(i)}})}}})};a.goToPermalink=function(b){$("[id^=commentbox_], .comments-pagination").removeClass("hide");$("#showMoreComments").addClass("hide");if(typeof $("#commentbox_"+b).offset()!=="undefined"){$("html, body").animate({scrollTop:$("#commentbox_"+b).offset().top-$(".mainmenu").height()})}};a.openTanRegister=function(){var b=$("#community-tan-management");if(b){b.click()}return null};(function(){$(document).on(kurier.events.CONTENT_LOADED,function(){$("#commentformwrapper, .comments-login-link").off("click").on("click",function(b){if(!$(b.target).closest("#showMoreComments")&&!a.isLoggedIn()){comments_integrated.redirectToLogin()}})})})()};var comments_integrated;(function(){comments_integrated=new kurier.Comments_integrated()})();