!function(){var t=window.Adaptive||{},s=window.Mobify=window.Mobify||{};void 0===t.$&&(s.$=s.$||window.$||window.Zepto||window.jQuery);var i,e,o=t.$||s.$;s.UI=s.UI||{classPrefix:"m-"},s.UI.Magnifik=((e=function(t,s){this.options=o.extend({},e.defaults,s),this.options.classNames=o.extend(i.classNames,this.options.classNames),this.options.imageStyle.width=100*this.options.ratio+"%",this.options.stage||(this.options.stage=o("body"),this.options.global=!0),this.$element=o(t),this.bind()}).defaults=i={stage:void 0,classNames:{zooming:"zooming",close:"close",control:"magnifikControl",canvas:"magnifikCanvas",thumb:"magnifikThumb",full:"magnifikFull"},ratio:2,seekImage:!0,clickCloses:!0,activationEvent:"click",canvasStyle:{position:"absolute",width:"100%",height:"100%",overflow:"auto","-webkit-overflow-scrolling":"touch"},imageStyle:{position:"absolute",top:"0",left:"0",maxWidth:"none",maxHeight:"none"},stageHTML:function(){return'
'},globalStyle:function(){var t="."+this._getClass("zooming");return t+" { overflow: hidden; padding-top:0px}"+t+" > * { display: none !important; }"+t+" > ."+this._getClass("control")+" { display: block !important; }"}},e.prototype.unbind=function(){return this.bind(!0)},e.prototype.makeElems=function(){if(this.$stage=this.options.stage,this.$canvas=o(this.options.stageHTML.call(this)).addClass(this._getClass("control")),this.$canvas.first().css(this.options.canvasStyle),this.$thumb=this.$canvas.find("."+this._getClass("thumb")).css(this.options.imageStyle),this.$full=this.$canvas.find("."+this._getClass("full")).css(this.options.imageStyle),this.options.clickCloses&&this.$canvas.first().addClass(this._getClass("close")),this.options.global){if(!o('style[data-magnifik="'+this._getClass("zooming")+'"]').length){var t=document.createElement("style"),s=this.options.globalStyle.call(this);t.setAttribute("type","text/css"),t.styleSheet?t.styleSheet.cssText=s:t.appendChild(document.createTextNode(s)),o("head")[0].appendChild(t)}}else this.$stage.css("position","relative");var i="."+this._getClass("close");this.$close=this.$canvas.find(i).add(this.$canvas.filter(i)),this.bindClose("bind")},e.prototype.close=function(t){this.isOpen&&(this.isOpen=!1,this.$element.trigger("magnifik:closing"),this.$canvas.detach(),this.$stage.removeClass(this._getClass("zooming")),this.options.global&&(document.body.scrollTop=this.oldScrollTop),this.$element.trigger("magnifik:close"))},e.prototype.open=function(t){if(t.preventDefault(),!this.isOpen){this.isOpen=!0,this.$element.trigger("magnifik:opening"),this.$stage||this.makeElems();var s,i,e=.5,n=.5,a=o(t.target);if("IMG"!==t.target.tagName){var l=this.$element;this.options.seekImage&&(l=l.add(this.$element.parents()));for(var h=0;h