vanilla.namespace("com.labootx.post.slider");vanilla.require("vanilla.toolkit.slide");com.labootx.post.slider={init:function(a,d,b){var c=new vanilla.toolkit.slide.Show(a,this._createSlideByType.bind(this,d));c.setTransition(new vanilla.toolkit.slide.FadingTransition(350));if(c){c.onNextSlide.subscribe(function(e){var f=e.container.id.split("-").last();$(".pastille",c.container).toggleClass("selected",false).filter(".pastille-"+f).toggleClass("selected",true)});c.init(b)}return c},_createSlideByType:function(g,e,d,b){var a=new vanilla.toolkit.slide.ImageSlide(d,b,{fixedImageTime:7});var c=b.id.substr(a.container.id.lastIndexOf("-")+1);if(vanilla.html.DOM.hasClassName(b,"ajax")){a.setLazyLoading(com.labootx.post.url+"ajax_slide.php?post-code="+g+"|"+c)}var f=this._initPastille(d,c);a.onLoad.subscribe(function(){f.removeClass("loading").css("opacity",0).animate({opacity:1})});return a},_initPastille:function(b,a){return $(".slideshow-navigation .pastille-"+a,b.container).removeClass("selected").addClass("loading").css("opacity",0.5).click(function(c){b.goToSlide(a);c.preventDefault()})}};