1/*! 2 * @package YJ News Pop 3 * @author Youjoomla LLC 4 * @website Youjoomla.com 5 * @copyright Copyright (c) 2007 - 2011 Youjoomla LLC. 6 * @license http://www.opensource.org/licenses/mit-license.php 7 */ 8;jQuery.noConflict();(function($,window,document,undefined){var pluginName="yjnewsPop",defaults={container:".yjNewsPopContainer",layout:".yjnewspopLayout",maxpopnews:4,getmore:".getmore",modpath:"",sqlstart:4,itemload:4,jitemid:101,jmodid:119,loadtxt:"Get more posts",loadingtxt:"Loading the next set of posts...",donetxt:"That's all folks!",loadaction:"click",popwidth:"70%",popheight:"600px",popvwidth:"640px",popvheight:"390px",popiwidth:"70%",popiheight:"600px",popboxbgcolor:"#ffffff",popboxbgcolorv:"#000000",popboxbgcolori:"#ffffff",popboxpacity:0.8,touchbehavior:false,cursorcolor:"#000000",callback:function(){}};function Plugin(element,options){this.element=element;this.settings=$.extend({},defaults,options);this._defaults=defaults;this._name=pluginName;this.init()}Plugin.prototype={init:function(){this.newspopIsotope();this.newspopFilter();this.newspopLoadmore();$(this.settings.container).animate({opacity:1},1000)},newspopIsotope:function(){var self=this;var newspopsHolder=$(this.settings.layout);$(window).smartresize(function(){newspopsHolder.imagesLoaded(function(){newspopsHolder.isotope({itemSelector:" .yjnewspopItem"}).isotope("reLayout")});self.newspopWidth();self.newspopMoveintros();self.newspopHover();self.yjnewspopColorbox();self.newspopaddTips();$.fancybox.update()}).smartresize();$(".showtips").tipr({speed:700,mode:"bottom"})},newspopWidth:function(){var self=this;var containerWidth=$(this.settings.container).width();var newspopItems=$(this.settings.container).find(".yjnewspopItem");var newspopItemsWidth=newspopItems.width();if($(window).width()<980){var maxItemsperRow=Math.round(containerWidth/newspopItemsWidth)}else{maxItemsperRow=this.settings.maxpopnews}var newItemsWidth=(containerWidth/maxItemsperRow)-1;newspopItems.width(newItemsWidth)},newspopaddTips:function(){var self=this;var catsArray=$(this.settings.container).data("catsarray").split(",");var yjNewsPopFilter=$(this.settings.container).find(".yjnewspopFilter");$(this.settings.layout+" .yjnewspop").each(function(index,element){$(yjNewsPopFilter).find('li[data-iscat=".'+$(this).data("catname")+'"]').removeClass("hide").addClass("show");var $elements=$(yjNewsPopFilter).find('li[data-iscat=".'+$(this).data("catname")+'"]').find("a");var $countItems=$("."+$(this).data("catname")+"").length;$realCatName=$(this).data('relacatname');if($countItems>1){var $textItems=" items"}else{$textItems=" item"}$elements.attr("data-tip",""+$realCatName+" category on this page contains "+$countItems+$textItems+"")})},newspopFilter:function(){var self=this;var filters={};var newspopsHolder=$(this.settings.layout);$(this.settings.container+' .yjnewspopFilter a[data-filter-value=""]').addClass("selected");$(this.settings.container+" .yjnewspopFilter a").click(function(e){e.preventDefault();var clicked_filter=$(this);if(clicked_filter.hasClass("selected")){return}var optionSet=clicked_filter.parents(".option-set");optionSet.find(".selected").removeClass("selected");clicked_filter.addClass("selected");var group=optionSet.attr("data-filter-group");filters[group]=clicked_filter.attr("data-filter-value");var filters_to_use=[];for(var group in filters){filters_to_use.push(filters[group])}var selector=filters_to_use.join("");newspopsHolder.isotope({filter:selector})})},newspopHover:function(){var self=this;$(this.settings.layout+" .yjnewspop").each(function(){$(this).hoverdir({hoverDelay:75})})},newspopMoveintros:function(){var self=this;var newspopsHolder=$(this.settings.layout);newspopsHolder.imagesLoaded(function(){$(".yjnewspopIntro").each(function(){var getmyHeight=$(this).height();var getInfoBox=$(this).find(".yjnewspopInfo");var getInfoBoxHeight=getInfoBox.height();var moveItro=(getmyHeight-getInfoBoxHeight)/2;getInfoBox.css("margin-top",moveItro)})})},newspopAjax:function(){var self=this;var $container=$(this.settings.layout);desturl=self.settings.modpath+"src/ajax/get_new_content.php?sql_start="+self.settings.sqlstart+"&Itemid="+self.settings.jitemid+"&modid="+self.settings.jmodid;self.settings.sqlstart+=self.settings.itemload;return $.ajax({cache:false,url:desturl,dataType:"html",beforeSend:function(html){var itemsleft=$(self.settings.container).attr("data-items");$(self.settings.container).find(".loading").remove();if(itemsleft>0){$(self.settings.container).append('<div class="loading"><div class="loadingtxt">'+self.settings.loadingtxt+"</div></div>");var load_poz=($(window).width()-$(".loading").width())/2;$(self.settings.container).find(".loading").css({left:load_poz}).animate({opacity:0.8})}},success:function(html){var items=$(".yjnewspopItem",$(html));if(items.length>0){$container.imagesLoaded(function(){$container.append(items).isotope("appended",items).smartresize();items.animate({opacity:1});if(self.settings.loadaction=="click"){$("html, body").animate({scrollTop:$(self.settings.container).find(".getmore").offset().top+$(self.settings.container).find(".getmore").height()/2-$(window).height()/2},1000)}});$(self.settings.container).attr("data-items",items.length)}else{$(self.settings.container).find(".loadingtxt").html(self.settings.donetxt);$(self.settings.getmore).unbind("click");$(window).unbind("scroll");$(self.settings.container).attr("data-items","0")}},complete:function(xhr){setTimeout(function(){$(self.settings.container).find(".loading").fadeOut("normal")},800)}})},newspopLoadmore:function(){var self=this;if(this.settings.loadaction=="click"){$(this.settings.getmore).click(function(event){self.newspopAjax()})}if(this.settings.loadaction=="scroll"){var delay=50;var timeout=null;$(window).bind("scroll",function(){clearTimeout(timeout);timeout=setTimeout(function(){self.newspopAjax();clearTimeout(timeout)},delay)})}},newspoHexToRgb:function(hex){var self=this;var result=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex);return result?{r:parseInt(result[1],16),g:parseInt(result[2],16),b:parseInt(result[3],16),rgb:parseInt(result[1],16)+", "+parseInt(result[2],16)+", "+parseInt(result[3],16)}:null},yjnewspopColorbox:function(){var self=this;var bgColor=this.newspoHexToRgb(this.settings.popboxbgcolor).rgb;var bgColorv=this.newspoHexToRgb(this.settings.popboxbgcolorv).rgb;var bgColori=this.newspoHexToRgb(this.settings.popboxbgcolori).rgb;$(".group"+this.settings.jmodid).attr("rel","gallery").fancybox({openEffect:"elastic",closeEffect:"elastic",nextEffect:"elastic",prevEffect:"elastic",maxWidth:self.settings.popwidth,maxHeight:self.settings.popheight,afterLoad:function(){this.title=this.element.data("nptitle")},margin:[20,60,20,60],helpers:{overlay:{css:{background:"rgba("+bgColor+","+self.settings.popboxpacity+")"}}}});$(".newspopmedia").attr("rel","media").fancybox({afterLoad:function(){this.title=this.element.data("nptitle")},openEffect:"none",closeEffect:"elastic",nextEffect:"none",prevEffect:"none",padding:0,maxWidth:self.settings.popvwidth,maxHeight:self.settings.popvheight,margin:[20,60,20,60],helpers:{overlay:{css:{background:"rgba("+bgColorv+","+self.settings.popboxpacity+")"}},media:{}}});$(".popnewsLoad"+this.settings.jmodid).attr("rel","popnewsajax").fancybox({nextEffect:"none",prevEffect:"none",closeEffect:"elastic",type:"iframe",autoSize:true,maxWidth:self.settings.popiwidth,maxHeight:self.settings.popiheight,beforeLoad:function(){this.href=this.element.data("getlink")},afterLoad:function(){this.title=this.element.data("nptitle");$(".fancybox-iframe").load(function(){$(this).contents().find("head").append('<base target="_parent" />')})},iframe:{preload:false,scrolling:"no"},helpers:{overlay:{locked:true,css:{background:"rgba("+bgColori+","+self.settings.popboxpacity+")"}}},scrolling:"no",afterShow:function(){$(".fancybox-inner").niceScroll(".fancybox-inner iframe",{boxzoom:false,autohidemode:"false",cursorwidth:"8px",scrollspeed:50,touchbehavior:self.settings.touchbehavior,bouncescroll:true,cursorcolor:self.settings.cursorcolor});$("body").css("overflow-y","hidden")},beforeClose:function(){$("body").css("overflow-y","")}});$(".newspopmaps").attr("rel","maps").fancybox({afterLoad:function(){this.title=this.element.data("nptitle")},openEffect:"none",closeEffect:"elastic",nextEffect:"none",prevEffect:"none",padding:0,maxWidth:self.settings.popvwidth,maxHeight:self.settings.popvheight,margin:[20,60,20,60],helpers:{overlay:{css:{background:"rgba("+bgColorv+","+self.settings.popboxpacity+")"}},media:{}}})}};$.fn[pluginName]=function(options){return this.each(function(){if(!$.data(this,"plugin_"+pluginName)){$.data(this,"plugin_"+pluginName,new Plugin(this,options))}})}})(jQuery,window,document); 9 10 11/*! fancyBox v2.1.5 fancyapps.com | fancyapps.com/fancybox/#license */ 12(function(r,G,f,v){var J=f("html"),n=f(r),p=f(G),b=f.fancybox=function(){b.open.apply(this,arguments)},I=navigator.userAgent.match(/msie/i),B=null,s=G.createTouch!==v,t=function(a){return a&&a.hasOwnProperty&&a instanceof f},q=function(a){return a&&"string"===f.type(a)},E=function(a){return q(a)&&0<a.indexOf("%")},l=function(a,d){var e=parseInt(a,10)||0;d&&E(a)&&(e*=b.getViewport()[d]/100);return Math.ceil(e)},w=function(a,b){return l(a,b)+"px"};f.extend(b,{version:"2.1.5",defaults:{padding:15,margin:20, 13width:800,height:600,minWidth:100,minHeight:100,maxWidth:9999,maxHeight:9999,pixelRatio:1,autoSize:!0,autoHeight:!1,autoWidth:!1,autoResize:!0,autoCenter:!s,fitToView:!0,aspectRatio:!1,topRatio:0.5,leftRatio:0.5,scrolling:"auto",wrapCSS:"",arrows:!0,closeBtn:!0,closeClick:!1,nextClick:!1,mouseWheel:!0,autoPlay:!1,playSpeed:3E3,preload:3,modal:!1,loop:!0,ajax:{dataType:"html",headers:{"X-fancyBox":!0}},iframe:{scrolling:"auto",preload:!0},swf:{wmode:"transparent",allowfullscreen:"true",allowscriptaccess:"always"}, 14keys:{next:{13:"left",34:"up",39:"left",40:"up"},prev:{8:"right",33:"down",37:"right",38:"down"},close:[27],play:[32],toggle:[70]},direction:{next:"left",prev:"right"},scrollOutside:!0,index:0,type:null,href:null,content:null,title:null,tpl:{wrap:'<div class="fancybox-wrap" tabIndex="-1"><div class="fancybox-skin"><div class="fancybox-outer"><div class="fancybox-inner"></div></div></div></div>',image:'<img class="fancybox-image" src="{href}" alt="" />',iframe:'<iframe id="fancybox-frame{rnd}" name="fancybox-frame{rnd}" class="fancybox-iframe" frameborder="0" vspace="0" hspace="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen'+ 15(I?' allowtransparency="true"':"")+"></iframe>",error:'<p class="fancybox-error">The requested content cannot be loaded.<br/>Please try again later.</p>',closeBtn:'<a title="Close" class="fancybox-item fancybox-close" href="javascript:;"></a>',next:'<a title="Next" class="fancybox-nav fancybox-next" href="javascript:;"><span></span></a>',prev:'<a title="Previous" class="fancybox-nav fancybox-prev" href="javascript:;"><span></span></a>'},openEffect:"fade",openSpeed:250,openEasing:"swing",openOpacity:!0, 16openMethod:"zoomIn",closeEffect:"fade",closeSpeed:250,closeEasing:"swing",closeOpacity:!0,closeMethod:"zoomOut",nextEffect:"elastic",nextSpeed:250,nextEasing:"swing",nextMethod:"changeIn",prevEffect:"elastic",prevSpeed:250,prevEasing:"swing",prevMethod:"changeOut",helpers:{overlay:!0,title:!0},onCancel:f.noop,beforeLoad:f.noop,afterLoad:f.noop,beforeShow:f.noop,afterShow:f.noop,beforeChange:f.noop,beforeClose:f.noop,afterClose:f.noop},group:{},opts:{},previous:null,coming:null,current:null,isActive:!1,
vendor: 16,778 bytes, lines 17-49
17isOpen:!1,isOpened:!1,wrap:null,skin:null,outer:null,inner:null,player:{timer:null,isActive:!1},ajaxLoad:null,imgPreload:null,transitions:{},helpers:{},open:function(a,d){if(a&&(f.isPlainObject(d)||(d={}),!1!==b.close(!0)))return f.isArray(a)||(a=t(a)?f(a).get():[a]),f.each(a,function(e,c){var k={},g,h,j,m,l;"object"===f.type(c)&&(c.nodeType&&(c=f(c)),t(c)?(k={href:c.data("fancybox-href")||c.attr("href"),title:c.data("fancybox-title")||c.attr("title"),isDom:!0,element:c},f.metadata&&f.extend(!0,k, 18c.metadata())):k=c);g=d.href||k.href||(q(c)?c:null);h=d.title!==v?d.title:k.title||"";m=(j=d.content||k.content)?"html":d.type||k.type;!m&&k.isDom&&(m=c.data("fancybox-type"),m||(m=(m=c.prop("class").match(/fancybox\.(\w+)/))?m[1]:null));q(g)&&(m||(b.isImage(g)?m="image":b.isSWF(g)?m="swf":"#"===g.charAt(0)?m="inline":q(c)&&(m="html",j=c)),"ajax"===m&&(l=g.split(/\s+/,2),g=l.shift(),l=l.shift()));j||("inline"===m?g?j=f(q(g)?g.replace(/.*(?=#[^\s]+$)/,""):g):k.isDom&&(j=c):"html"===m?j=g:!m&&(!g&& 19k.isDom)&&(m="inline",j=c));f.extend(k,{href:g,type:m,content:j,title:h,selector:l});a[e]=k}),b.opts=f.extend(!0,{},b.defaults,d),d.keys!==v&&(b.opts.keys=d.keys?f.extend({},b.defaults.keys,d.keys):!1),b.group=a,b._start(b.opts.index)},cancel:function(){var a=b.coming;a&&!1!==b.trigger("onCancel")&&(b.hideLoading(),b.ajaxLoad&&b.ajaxLoad.abort(),b.ajaxLoad=null,b.imgPreload&&(b.imgPreload.onload=b.imgPreload.onerror=null),a.wrap&&a.wrap.stop(!0,!0).trigger("onReset").remove(),b.coming=null,b.current|| 20b._afterZoomOut(a))},close:function(a){b.cancel();!1!==b.trigger("beforeClose")&&(b.unbindEvents(),b.isActive&&(!b.isOpen||!0===a?(f(".fancybox-wrap").stop(!0).trigger("onReset").remove(),b._afterZoomOut()):(b.isOpen=b.isOpened=!1,b.isClosing=!0,f(".fancybox-item, .fancybox-nav").remove(),b.wrap.stop(!0,!0).removeClass("fancybox-opened"),b.transitions[b.current.closeMethod]())))},play:function(a){var d=function(){clearTimeout(b.player.timer)},e=function(){d();b.current&&b.player.isActive&&(b.player.timer= 21setTimeout(b.next,b.current.playSpeed))},c=function(){d();p.unbind(".player");b.player.isActive=!1;b.trigger("onPlayEnd")};if(!0===a||!b.player.isActive&&!1!==a){if(b.current&&(b.current.loop||b.current.index<b.group.length-1))b.player.isActive=!0,p.bind({"onCancel.player beforeClose.player":c,"onUpdate.player":e,"beforeLoad.player":d}),e(),b.trigger("onPlayStart")}else c()},next:function(a){var d=b.current;d&&(q(a)||(a=d.direction.next),b.jumpto(d.index+1,a,"next"))},prev:function(a){var d=b.current; 22d&&(q(a)||(a=d.direction.prev),b.jumpto(d.index-1,a,"prev"))},jumpto:function(a,d,e){var c=b.current;c&&(a=l(a),b.direction=d||c.direction[a>=c.index?"next":"prev"],b.router=e||"jumpto",c.loop&&(0>a&&(a=c.group.length+a%c.group.length),a%=c.group.length),c.group[a]!==v&&(b.cancel(),b._start(a)))},reposition:function(a,d){var e=b.current,c=e?e.wrap:null,k;c&&(k=b._getPosition(d),a&&"scroll"===a.type?(delete k.position,c.stop(!0,!0).animate(k,200)):(c.css(k),e.pos=f.extend({},e.dim,k)))},update:function(a){var d= 23a&&a.type,e=!d||"orientationchange"===d;e&&(clearTimeout(B),B=null);b.isOpen&&!B&&(B=setTimeout(function(){var c=b.current;c&&!b.isClosing&&(b.wrap.removeClass("fancybox-tmp"),(e||"load"===d||"resize"===d&&c.autoResize)&&b._setDimension(),"scroll"===d&&c.canShrink||b.reposition(a),b.trigger("onUpdate"),B=null)},e&&!s?0:300))},toggle:function(a){b.isOpen&&(b.current.fitToView="boolean"===f.type(a)?a:!b.current.fitToView,s&&(b.wrap.removeAttr("style").addClass("fancybox-tmp"),b.trigger("onUpdate")), 24b.update())},hideLoading:function(){p.unbind(".loading");f("#fancybox-loading").remove()},showLoading:function(){var a,d;b.hideLoading();a=f('<div id="fancybox-loading"><div></div></div>').click(b.cancel).appendTo("body");p.bind("keydown.loading",function(a){if(27===(a.which||a.keyCode))a.preventDefault(),b.cancel()});b.defaults.fixed||(d=b.getViewport(),a.css({position:"absolute",top:0.5*d.h+d.y,left:0.5*d.w+d.x}))},getViewport:function(){var a=b.current&&b.current.locked||!1,d={x:n.scrollLeft(), 25y:n.scrollTop()};a?(d.w=a[0].clientWidth,d.h=a[0].clientHeight):(d.w=s&&r.innerWidth?r.innerWidth:n.width(),d.h=s&&r.innerHeight?r.innerHeight:n.height());return d},unbindEvents:function(){b.wrap&&t(b.wrap)&&b.wrap.unbind(".fb");p.unbind(".fb");n.unbind(".fb")},bindEvents:function(){var a=b.current,d;a&&(n.bind("orientationchange.fb"+(s?"":" resize.fb")+(a.autoCenter&&!a.locked?" scroll.fb":""),b.update),(d=a.keys)&&p.bind("keydown.fb",function(e){var c=e.which||e.keyCode,k=e.target||e.srcElement; 26if(27===c&&b.coming)return!1;!e.ctrlKey&&(!e.altKey&&!e.shiftKey&&!e.metaKey&&(!k||!k.type&&!f(k).is("[contenteditable]")))&&f.each(d,function(d,k){if(1<a.group.length&&k[c]!==v)return b[d](k[c]),e.preventDefault(),!1;if(-1<f.inArray(c,k))return b[d](),e.preventDefault(),!1})}),f.fn.mousewheel&&a.mouseWheel&&b.wrap.bind("mousewheel.fb",function(d,c,k,g){for(var h=f(d.target||null),j=!1;h.length&&!j&&!h.is(".fancybox-skin")&&!h.is(".fancybox-wrap");)j=h[0]&&!(h[0].style.overflow&&"hidden"===h[0].style.overflow)&& 27(h[0].clientWidth&&h[0].scrollWidth>h[0].clientWidth||h[0].clientHeight&&h[0].scrollHeight>h[0].clientHeight),h=f(h).parent();if(0!==c&&!j&&1<b.group.length&&!a.canShrink){if(0<g||0<k)b.prev(0<g?"down":"left");else if(0>g||0>k)b.next(0>g?"up":"right");d.preventDefault()}}))},trigger:function(a,d){var e,c=d||b.coming||b.current;if(c){f.isFunction(c[a])&&(e=c[a].apply(c,Array.prototype.slice.call(arguments,1)));if(!1===e)return!1;c.helpers&&f.each(c.helpers,function(d,e){if(e&&b.helpers[d]&&f.isFunction(b.helpers[d][a]))b.helpers[d][a](f.extend(!0, 28{},b.helpers[d].defaults,e),c)});p.trigger(a)}},isImage:function(a){return q(a)&&a.match(/(^data:image\/.*,)|(\.(jp(e|g|eg)|gif|png|bmp|webp|svg)((\?|#).*)?$)/i)},isSWF:function(a){return q(a)&&a.match(/\.(swf)((\?|#).*)?$/i)},_start:function(a){var d={},e,c;a=l(a);e=b.group[a]||null;if(!e)return!1;d=f.extend(!0,{},b.opts,e);e=d.margin;c=d.padding;"number"===f.type(e)&&(d.margin=[e,e,e,e]);"number"===f.type(c)&&(d.padding=[c,c,c,c]);d.modal&&f.extend(!0,d,{closeBtn:!1,closeClick:!1,nextClick:!1,arrows:!1, 29mouseWheel:!1,keys:null,helpers:{overlay:{closeClick:!1}}});d.autoSize&&(d.autoWidth=d.autoHeight=!0);"auto"===d.width&&(d.autoWidth=!0);"auto"===d.height&&(d.autoHeight=!0);d.group=b.group;d.index=a;b.coming=d;if(!1===b.trigger("beforeLoad"))b.coming=null;else{c=d.type;e=d.href;if(!c)return b.coming=null,b.current&&b.router&&"jumpto"!==b.router?(b.current.index=a,b[b.router](b.direction)):!1;b.isActive=!0;if("image"===c||"swf"===c)d.autoHeight=d.autoWidth=!1,d.scrolling="visible";"image"===c&&(d.aspectRatio= 30!0);"iframe"===c&&s&&(d.scrolling="scroll");d.wrap=f(d.tpl.wrap).addClass("fancybox-"+(s?"mobile":"desktop")+" fancybox-type-"+c+" fancybox-tmp "+d.wrapCSS).appendTo(d.parent||"body");f.extend(d,{skin:f(".fancybox-skin",d.wrap),outer:f(".fancybox-outer",d.wrap),inner:f(".fancybox-inner",d.wrap)});f.each(["Top","Right","Bottom","Left"],function(a,b){d.skin.css("padding"+b,w(d.padding[a]))});b.trigger("onReady");if("inline"===c||"html"===c){if(!d.content||!d.content.length)return b._error("content")}else if(!e)return b._error("href"); 31"image"===c?b._loadImage():"ajax"===c?b._loadAjax():"iframe"===c?b._loadIframe():b._afterLoad()}},_error:function(a){f.extend(b.coming,{type:"html",autoWidth:!0,autoHeight:!0,minWidth:0,minHeight:0,scrolling:"no",hasError:a,content:b.coming.tpl.error});b._afterLoad()},_loadImage:function(){var a=b.imgPreload=new Image;a.onload=function(){this.onload=this.onerror=null;b.coming.width=this.width/b.opts.pixelRatio;b.coming.height=this.height/b.opts.pixelRatio;b._afterLoad()};a.onerror=function(){this.onload= 32this.onerror=null;b._error("image")};a.src=b.coming.href;!0!==a.complete&&b.showLoading()},_loadAjax:function(){var a=b.coming;b.showLoading();b.ajaxLoad=f.ajax(f.extend({},a.ajax,{url:a.href,error:function(a,e){b.coming&&"abort"!==e?b._error("ajax",a):b.hideLoading()},success:function(d,e){"success"===e&&(a.content=d,b._afterLoad())}}))},_loadIframe:function(){var a=b.coming,d=f(a.tpl.iframe.replace(/\{rnd\}/g,(new Date).getTime())).attr("scrolling",s?"auto":a.iframe.scrolling).attr("src",a.href); 33f(a.wrap).bind("onReset",function(){try{f(this).find("iframe").hide().attr("src","//about:blank").end().empty()}catch(a){}});a.iframe.preload&&(b.showLoading(),d.one("load",function(){f(this).data("ready",1);s||f(this).bind("load.fb",b.update);f(this).parents(".fancybox-wrap").width("100%").removeClass("fancybox-tmp").show();b._afterLoad()}));a.content=d.appendTo(a.inner);a.iframe.preload||b._afterLoad()},_preloadImages:function(){var a=b.group,d=b.current,e=a.length,c=d.preload?Math.min(d.preload, 34e-1):0,f,g;for(g=1;g<=c;g+=1)f=a[(d.index+g)%e],"image"===f.type&&f.href&&((new Image).src=f.href)},_afterLoad:function(){var a=b.coming,d=b.current,e,c,k,g,h;b.hideLoading();if(a&&!1!==b.isActive)if(!1===b.trigger("afterLoad",a,d))a.wrap.stop(!0).trigger("onReset").remove(),b.coming=null;else{d&&(b.trigger("beforeChange",d),d.wrap.stop(!0).removeClass("fancybox-opened").find(".fancybox-item, .fancybox-nav").remove());b.unbindEvents();e=a.content;c=a.type;k=a.scrolling;f.extend(b,{wrap:a.wrap,skin:a.skin, 35outer:a.outer,inner:a.inner,current:a,previous:d});g=a.href;switch(c){case "inline":case "ajax":case "html":a.selector?e=f("<div>").html(e).find(a.selector):t(e)&&(e.data("fancybox-placeholder")||e.data("fancybox-placeholder",f('<div class="fancybox-placeholder"></div>').insertAfter(e).hide()),e=e.show().detach(),a.wrap.bind("onReset",function(){f(this).find(e).length&&e.hide().replaceAll(e.data("fancybox-placeholder")).data("fancybox-placeholder",!1)}));break;case "image":e=a.tpl.image.replace("{href}", 36g);break;case "swf":e='<object id="fancybox-swf" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="100%" height="100%"><param name="movie" value="'+g+'"></param>',h="",f.each(a.swf,function(a,b){e+='<param name="'+a+'" value="'+b+'"></param>';h+=" "+a+'="'+b+'"'}),e+='<embed src="'+g+'" type="application/x-shockwave-flash" width="100%" height="100%"'+h+"></embed></object>"}(!t(e)||!e.parent().is(a.inner))&&a.inner.append(e);b.trigger("beforeShow");a.inner.css("overflow","yes"===k?"scroll": 37"no"===k?"hidden":k);b._setDimension();b.reposition();b.isOpen=!1;b.coming=null;b.bindEvents();if(b.isOpened){if(d.prevMethod)b.transitions[d.prevMethod]()}else f(".fancybox-wrap").not(a.wrap).stop(!0).trigger("onReset").remove();b.transitions[b.isOpened?a.nextMethod:a.openMethod]();b._preloadImages()}},_setDimension:function(){var a=b.getViewport(),d=0,e=!1,c=!1,e=b.wrap,k=b.skin,g=b.inner,h=b.current,c=h.width,j=h.height,m=h.minWidth,u=h.minHeight,n=h.maxWidth,p=h.maxHeight,s=h.scrolling,q=h.scrollOutside? 38h.scrollbarWidth:0,x=h.margin,y=l(x[1]+x[3]),r=l(x[0]+x[2]),v,z,t,C,A,F,B,D,H;e.add(k).add(g).width("auto").height("auto").removeClass("fancybox-tmp");x=l(k.outerWidth(!0)-k.width());v=l(k.outerHeight(!0)-k.height());z=y+x;t=r+v;C=E(c)?(a.w-z)*l(c)/100:c;A=E(j)?(a.h-t)*l(j)/100:j;if("iframe"===h.type){if(H=h.content,h.autoHeight&&1===H.data("ready"))try{H[0].contentWindow.document.location&&(g.width(C).height(9999),F=H.contents().find("body"),q&&F.css("overflow-x","hidden"),A=F.outerHeight(!0))}catch(G){}}else if(h.autoWidth|| 39h.autoHeight)g.addClass("fancybox-tmp"),h.autoWidth||g.width(C),h.autoHeight||g.height(A),h.autoWidth&&(C=g.width()),h.autoHeight&&(A=g.height()),g.removeClass("fancybox-tmp");c=l(C);j=l(A);D=C/A;m=l(E(m)?l(m,"w")-z:m);n=l(E(n)?l(n,"w")-z:n);u=l(E(u)?l(u,"h")-t:u);p=l(E(p)?l(p,"h")-t:p);F=n;B=p;h.fitToView&&(n=Math.min(a.w-z,n),p=Math.min(a.h-t,p));z=a.w-y;r=a.h-r;h.aspectRatio?(c>n&&(c=n,j=l(c/D)),j>p&&(j=p,c=l(j*D)),c<m&&(c=m,j=l(c/D)),j<u&&(j=u,c=l(j*D))):(c=Math.max(m,Math.min(c,n)),h.autoHeight&& 40"iframe"!==h.type&&(g.width(c),j=g.height()),j=Math.max(u,Math.min(j,p)));if(h.fitToView)if(g.width(c).height(j),e.width(c+x),a=e.width(),y=e.height(),h.aspectRatio)for(;(a>z||y>r)&&(c>m&&j>u)&&!(19<d++);)j=Math.max(u,Math.min(p,j-10)),c=l(j*D),c<m&&(c=m,j=l(c/D)),c>n&&(c=n,j=l(c/D)),g.width(c).height(j),e.width(c+x),a=e.width(),y=e.height();else c=Math.max(m,Math.min(c,c-(a-z))),j=Math.max(u,Math.min(j,j-(y-r)));q&&("auto"===s&&j<A&&c+x+q<z)&&(c+=q);g.width(c).height(j);e.width(c+x);a=e.width(); 41y=e.height();e=(a>z||y>r)&&c>m&&j>u;c=h.aspectRatio?c<F&&j<B&&c<C&&j<A:(c<F||j<B)&&(c<C||j<A);f.extend(h,{dim:{width:w(a),height:w(y)},origWidth:C,origHeight:A,canShrink:e,canExpand:c,wPadding:x,hPadding:v,wrapSpace:y-k.outerHeight(!0),skinSpace:k.height()-j});!H&&(h.autoHeight&&j>u&&j<p&&!c)&&g.height("auto")},_getPosition:function(a){var d=b.current,e=b.getViewport(),c=d.margin,f=b.wrap.width()+c[1]+c[3],g=b.wrap.height()+c[0]+c[2],c={position:"absolute",top:c[0],left:c[3]};d.autoCenter&&d.fixed&& 42!a&&g<=e.h&&f<=e.w?c.position="fixed":d.locked||(c.top+=e.y,c.left+=e.x);c.top=w(Math.max(c.top,c.top+(e.h-g)*d.topRatio));c.left=w(Math.max(c.left,c.left+(e.w-f)*d.leftRatio));return c},_afterZoomIn:function(){var a=b.current;a&&(b.isOpen=b.isOpened=!0,b.wrap.css("overflow","visible").addClass("fancybox-opened"),b.update(),(a.closeClick||a.nextClick&&1<b.group.length)&&b.inner.css("cursor","pointer").bind("click.fb",function(d){!f(d.target).is("a")&&!f(d.target).parent().is("a")&&(d.preventDefault(), 43b[a.closeClick?"close":"next"]())}),a.closeBtn&&f(a.tpl.closeBtn).appendTo(b.skin).bind("click.fb",function(a){a.preventDefault();b.close()}),a.arrows&&1<b.group.length&&((a.loop||0<a.index)&&f(a.tpl.prev).appendTo(b.outer).bind("click.fb",b.prev),(a.loop||a.index<b.group.length-1)&&f(a.tpl.next).appendTo(b.outer).bind("click.fb",b.next)),b.trigger("afterShow"),!a.loop&&a.index===a.group.length-1?b.play(!1):b.opts.autoPlay&&!b.player.isActive&&(b.opts.autoPlay=!1,b.play()))},_afterZoomOut:function(a){a= 44a||b.current;f(".fancybox-wrap").trigger("onReset").remove();f.extend(b,{group:{},opts:{},router:!1,current:null,isActive:!1,isOpened:!1,isOpen:!1,isClosing:!1,wrap:null,skin:null,outer:null,inner:null});b.trigger("afterClose",a)}});b.transitions={getOrigPosition:function(){var a=b.current,d=a.element,e=a.orig,c={},f=50,g=50,h=a.hPadding,j=a.wPadding,m=b.getViewport();!e&&(a.isDom&&d.is(":visible"))&&(e=d.find("img:first"),e.length||(e=d));t(e)?(c=e.offset(),e.is("img")&&(f=e.outerWidth(),g=e.outerHeight())): 45(c.top=m.y+(m.h-g)*a.topRatio,c.left=m.x+(m.w-f)*a.leftRatio);if("fixed"===b.wrap.css("position")||a.locked)c.top-=m.y,c.left-=m.x;return c={top:w(c.top-h*a.topRatio),left:w(c.left-j*a.leftRatio),width:w(f+j),height:w(g+h)}},step:function(a,d){var e,c,f=d.prop;c=b.current;var g=c.wrapSpace,h=c.skinSpace;if("width"===f||"height"===f)e=d.end===d.start?1:(a-d.start)/(d.end-d.start),b.isClosing&&(e=1-e),c="width"===f?c.wPadding:c.hPadding,c=a-c,b.skin[f](l("width"===f?c:c-g*e)),b.inner[f](l("width"=== 46f?c:c-g*e-h*e))},zoomIn:function(){var a=b.current,d=a.pos,e=a.openEffect,c="elastic"===e,k=f.extend({opacity:1},d);delete k.position;c?(d=this.getOrigPosition(),a.openOpacity&&(d.opacity=0.1)):"fade"===e&&(d.opacity=0.1);b.wrap.css(d).animate(k,{duration:"none"===e?0:a.openSpeed,easing:a.openEasing,step:c?this.step:null,complete:b._afterZoomIn})},zoomOut:function(){var a=b.current,d=a.closeEffect,e="elastic"===d,c={opacity:0.1};e&&(c=this.getOrigPosition(),a.closeOpacity&&(c.opacity=0.1));b.wrap.animate(c, 47{duration:"none"===d?0:a.closeSpeed,easing:a.closeEasing,step:e?this.step:null,complete:b._afterZoomOut})},changeIn:function(){var a=b.current,d=a.nextEffect,e=a.pos,c={opacity:1},f=b.direction,g;e.opacity=0.1;"elastic"===d&&(g="down"===f||"up"===f?"top":"left","down"===f||"right"===f?(e[g]=w(l(e[g])-200),c[g]="+=200px"):(e[g]=w(l(e[g])+200),c[g]="-=200px"));"none"===d?b._afterZoomIn():b.wrap.css(e).animate(c,{duration:a.nextSpeed,easing:a.nextEasing,complete:b._afterZoomIn})},changeOut:function(){var a= 48b.previous,d=a.prevEffect,e={opacity:0.1},c=b.direction;"elastic"===d&&(e["down"===c||"up"===c?"top":"left"]=("up"===c||"left"===c?"-":"+")+"=200px");a.wrap.animate(e,{duration:"none"===d?0:a.prevSpeed,easing:a.prevEasing,complete:function(){f(this).trigger("onReset").remove()}})}};b.helpers.overlay={defaults:{closeClick:!0,speedOut:200,showEarly:!0,css:{},locked:!s,fixed:!0},overlay:null,fixed:!1,el:f("html"),create:function(a){a=f.extend({},this.defaults,a);this.overlay&&this.close();this.overlay= 49f('<div class="fancybox-overlay"></div>').appendTo(b.coming?b.coming.parent:a.parent);this.fixed=!1;a.fixed&&b.defaults.fixed&&(this.overlay.addClass("fancybox-overlay-fixed"),this.fixed=!0)},open:function(a){var d=this;a=f.extend({},this.defaults,a);this.overlay?this.overlay.unbind(".overlay").width("auto").height("auto"):this.create(a);this.fixed||(n.bind("resize.overlay",f.proxy(this.update,this)),this.update());
49a.closeClick&&this.overlay.bind("click.overlay",function(a){if(f(a.target).hasClass("fancybox-overlay"))return b.isActive? 50b.close():d.close(),!1});this.overlay.css(a.css).show()},close:function(){var a,b;n.unbind("resize.overlay");this.el.hasClass("fancybox-lock")&&(f(".fancybox-margin").removeClass("fancybox-margin"),a=n.scrollTop(),b=n.scrollLeft(),this.el.removeClass("fancybox-lock"),n.scrollTop(a).scrollLeft(b));f(".fancybox-overlay").remove().hide();f.extend(this,{overlay:null,fixed:!1})},update:function(){var a="100%",b;this.overlay.width(a).height("100%");I?(b=Math.max(G.documentElement.offsetWidth,G.body.offsetWidth), 51p.width()>b&&(a=p.width())):p.width()>n.width()&&(a=p.width());this.overlay.width(a).height(p.height())},onReady:function(a,b){var e=this.overlay;f(".fancybox-overlay").stop(!0,!0);e||this.create(a);a.locked&&(this.fixed&&b.fixed)&&(e||(this.margin=p.height()>n.height()?f("html").css("margin-right").replace("px",""):!1),b.locked=this.overlay.append(b.wrap),b.fixed=!1);!0===a.showEarly&&this.beforeShow.apply(this,arguments)},beforeShow:function(a,b){var e,c;b.locked&&(!1!==this.margin&&(f("*").filter(function(){return"fixed"=== 52f(this).css("position")&&!f(this).hasClass("fancybox-overlay")&&!f(this).hasClass("fancybox-wrap")}).addClass("fancybox-margin"),this.el.addClass("fancybox-margin")),e=n.scrollTop(),c=n.scrollLeft(),this.el.addClass("fancybox-lock"),n.scrollTop(e).scrollLeft(c));this.open(a)},onUpdate:function(){this.fixed||this.update()},afterClose:function(a){this.overlay&&!b.coming&&this.overlay.fadeOut(a.speedOut,f.proxy(this.close,this))}};b.helpers.title={defaults:{type:"float",position:"bottom"},beforeShow:function(a){var d= 53b.current,e=d.title,c=a.type;f.isFunction(e)&&(e=e.call(d.element,d));if(q(e)&&""!==f.trim(e)){d=f('<div class="fancybox-title fancybox-title-'+c+'-wrap">'+e+"</div>");switch(c){case "inside":c=b.skin;break;case "outside":c=b.wrap;break;case "over":c=b.inner;break;default:c=b.skin,d.appendTo("body"),I&&d.width(d.width()),d.wrapInner('<span class="child"></span>'),b.current.margin[2]+=Math.abs(l(d.css("margin-bottom")))}d["top"===a.position?"prependTo":"appendTo"](c)}}};f.fn.fancybox=function(a){var d, 54e=f(this),c=this.selector||"",k=function(g){var h=f(this).blur(),j=d,k,l;!g.ctrlKey&&(!g.altKey&&!g.shiftKey&&!g.metaKey)&&!h.is(".fancybox-wrap")&&(k=a.groupAttr||"data-fancybox-group",l=h.attr(k),l||(k="rel",l=h.get(0)[k]),l&&(""!==l&&"nofollow"!==l)&&(h=c.length?f(c):e,h=h.filter("["+k+'="'+l+'"]'),j=h.index(this)),a.index=j,!1!==b.o
54pen(h,a)&&g.preventDefault())};a=a||{};d=a.index||0;!c||!1===a.live?e.unbind("click.fb-start").bind("click.fb-start",k):p.undelegate(c,"click.fb-start").delegate(c+ 55":not('.fancybox-item, .fancybox-nav')","click.fb-start",k);this.filter("[data-fancybox-start=1]").trigger("click");return this};p.ready(function(){var a,d;f.scrollbarWidth===v&&(f.scrollbarWidth=function(){var a=f('<div style="width:50px;height:50px;overflow:auto"><div/></div>').appendTo("body"),b=a.children(),b=b.innerWidth()-b.height(99).innerWidth();a.remove();return b});if(f.support.fixedPosition===v){a=f.support;d=f('<div style="position:fixed;top:20px;"></div>').appendTo("body");var e=20=== 56d[0].offsetTop||15===d[0].offsetTop;d.remove();a.fixedPosition=e}f.extend(b.defaults,{scrollbarWidth:f.scrollbarWidth(),fixed:f.support.fixedPosition,parent:f("body")});a=f(r).width();J.addClass("fancybox-lock-test");d=f(r).width();J.removeClass("fancybox-lock-test");f("<style type='text/css'>.fancybox-margin{margin-right:"+(d-a)+"px;}</style>").appendTo("head")})})(window,document,jQuery); 57 58 59/*! 60 * Media helper for fancyBox 61 * version: 1.0.6 (Fri, 14 Jun 2013) 62 * @requires fancyBox v2.0 or later 63 * 64 * Usage: 65 * $(".fancybox").fancybox({ 66 * helpers : { 67 * media: true 68 * } 69 * }); 70 * 71 * Set custom URL parameters: 72 * $(".fancybox").fancybox({ 73 * helpers : { 74 * media: { 75 * youtube : { 76 * params : { 77 * autoplay : 0 78 * } 79 * } 80 * } 81 * } 82 * }); 83 * 84 * Or: 85 * $(".fancybox").fancybox({, 86 * helpers : { 87 * media: true 88 * }, 89 * youtube : { 90 * autoplay: 0 91 * } 92 * }); 93 * 94 * Supports: 95 * 96 * Youtube 97 * http://www.youtube.com/watch?v=opj24KnzrWo 98 * http://www.youtube.com/embed/opj24KnzrWo 99 * http://youtu.be/opj24KnzrWo 100 * http://www.youtube-nocookie.com/embed/opj24KnzrWo 101 * Vimeo 102 * http://vimeo.com/40648169 103 * http://vimeo.com/channels/staffpicks/38843628 104 * http://vimeo.com/groups/surrealism/videos/36516384 105 * http://player.vimeo.com/video/45074303 106 * Metacafe 107 * http://www.metacafe.com/watch/7635964/dr_seuss_the_lorax_movie_trailer/ 108 * http://www.metacafe.com/watch/7635964/ 109 * Dailymotion 110 * http://www.dailymotion.com/video/xoytqh_dr-seuss-the-lorax-premiere_people 111 * Twitvid 112 * http://twitvid.com/QY7MD 113 * Twitpic 114 * http://twitpic.com/7p93st 115 * Instagram 116 * http://instagr.am/p/IejkuUGxQn/ 117 * http://instagram.com/p/IejkuUGxQn/ 118 * Google maps 119 * http://maps.google.com/maps?q=Eiffel+Tower,+Avenue+Gustave+Eiffel,+Paris,+France&t=h&z=17 120 * http://maps.google.com/?ll=48.857995,2.294297&spn=0.007666,0.021136&t=m&z=16 121 * http://maps.google.com/?ll=48.859463,2.292626&spn=0.000965,0.002642&t=m&z=19&layer=c&cbll=48.859524,2.292532&panoid=YJ0lq28OOy3VT2IqIuVY0g&cbp=12,151.58,,0,-15.56 122 */ 123(function(b){var a=b.fancybox,c=function(d,e,f){f=f||"";if(b.type(f)==="object"){f=b.param(f,true)}b.each(e,function(g,h){d=d.replace("$"+g,h||"")});if(f.length){d+=(d.indexOf("?")>0?"&":"?")+f}return d};a.helpers.media={defaults:{youtube:{matcher:/(youtube\.com|youtu\.be|youtube-nocookie\.com)\/(watch\?v=|v\/|u\/|embed\/?)?(videoseries\?list=(.*)|[\w-]{11}|\?listType=(.*)&list=(.*)).*/i,params:{autoplay:1,autohide:1,fs:1,rel:0,hd:1,wmode:"opaque",enablejsapi:1},type:"iframe",url:"//www.youtube.com/embed/$3"},vimeo:{matcher:/(?:vimeo(?:pro)?.com)\/(?:[^\d]+)?(\d+)(?:.*)/,params:{autoplay:1,hd:1,show_title:1,show_byline:1,show_portrait:0,fullscreen:1},type:"iframe",url:"//player.vimeo.com/video/$1"},metacafe:{matcher:/metacafe.com\/(?:watch|fplayer)\/([\w\-]{1,10})/,params:{autoPlay:"yes"},type:"swf",url:function(e,f,d){d.swf.flashVars="playerVars="+b.param(f,true);return"//www.metacafe.com/fplayer/"+e[1]+"/.swf"}},dailymotion:{matcher:/dailymotion.com\/video\/(.*)\/?(.*)/,params:{additionalInfos:0,autoStart:1},type:"swf",url:"//www.dailymotion.com/swf/video/$1"},twitvid:{matcher:/twitvid\.com\/([a-zA-Z0-9_\-\?\=]+)/i,params:{autoplay:0},type:"iframe",url:"//www.twitvid.com/embed.php?guid=$1"},twitpic:{matcher:/twitpic\.com\/(?!(?:place|photos|events)\/)([a-zA-Z0-9\?\=\-]+)/i,type:"image",url:"//twitpic.com/show/full/$1/"},instagram:{matcher:/(instagr\.am|instagram\.com)\/p\/([a-zA-Z0-9_\-]+)\/?/i,type:"image",url:"//$1/p/$2/media/?size=l"},google_maps:{matcher:/maps\.google\.([a-z]{2,3}(\.[a-z]{2})?)\/(\?ll=|maps\?)(.*)/i,type:"iframe",url:function(d){return"//maps.google."+d[1]+"/"+d[3]+""+d[4]+"&output="+(d[4].indexOf("layer=c")>0?"svembed":"embed")}}},beforeLoad:function(g,j){var d=j.href||"",e=false,i,f,h,k;for(i in g){if(g.hasOwnProperty(i)){f=g[i];h=d.match(f.matcher);if(h){e=f.type;k=b.extend(true,{},f.params,j[i]||(b.isPlainObject(g[i])?g[i].params:null));d=b.type(f.url)==="function"?f.url.call(this,h,k,j):c(f.url,h,k);break}}}if(e){j.href=d;j.type=e;j.autoHeight=false}}}}(jQuery)); 124/** 125 * jquery.hoverdir.js v1.1.0 126 * http://www.codrops.com 127 * 128 * Licensed under the MIT license. 129 * http://www.opensource.org/licenses/mit-license.php 130 * 131 * Copyright 2012, Codrops 132 * http://www.codrops.com 133 */ 134 135 136 137 (function(c,b,d){c.HoverDir=function(e,f){this.$el=c(f);this._init(e)};c.HoverDir.defaults={speed:300,easing:"ease",hoverDelay:0,inverse:false};c.HoverDir.prototype={_init:function(e){this.options=c.extend(true,{},c.HoverDir.defaults,e);this.transitionProp="all "+this.options.speed+"ms "+this.options.easing;
137this.support=Modernizr.csstransitions;this._loadEvents()},_loadEvents:function(){var e=this;this.$el.on("mouseenter.hoverdir, mouseleave.hoverdir",function(i){var g=c(this),f=g.find(".yjnewspopIntro"),j=e._getDir(g,{x:i.pageX,y:i.pageY}),h=e._getStyle(j);f.css("opacity",0.93);if(i.type==="mouseenter"){f.hide().css(h.from);clearTimeout(e.tmhover);e.tmhover=setTimeout(function(){f.show(0,function(){var k=c(this);if(e.support){k.css("transition",e.transitionProp)}e._applyAnimation(k,h.to,e.options.speed)})},e.options.hoverDelay)}else{if(e.support){f.css("transition",e.transitionProp)}clearTimeout(e.tmhover);e._applyAnimation(f,h.from,e.options.speed)}})},_getDir:function(g,k){var f=g.width(),i=g.height(),e=(k.x-g.offset().left-(f/2))*(f>i?(i/f):1),l=(k.y-g.offset().top-(i/2))*(i>f?(f/i):1),j=Math.round((((Math.atan2(l,e)*(180/Math.PI))+180)/90)+3)%4;return j},_getStyle:function(k){var g,l,i={left:"0px",top:"-100%"},e={left:"0px",top:"100%"},h={left:"-100%",top:"0px"},f={left:"100%",top:"0px"},m={top:"0px"},j={left:"0px"};switch(k){case 0:g=!this.options.inverse?i:e;l=m;break;case 1:g=!this.options.inverse?f:h;l=j;break;case 2:g=!this.options.inverse?e:i;l=m;break;case 3:g=!this.options.inverse?h:f;l=j;break}return{from:g,to:l}},_applyAnimation:function(f,e,g){c.fn.applyStyle=this.support?c.fn.css:c.fn.animate;f.stop().applyStyle(e,c.extend(true,[],{duration:g+"ms"}))}};var a=function(e){if(b.console){b.console.error(e)}};c.fn.hoverdir=function(g){var e=c.data(this,"hoverdir");if(typeof g==="string"){var f=Array.prototype.slice.call(arguments,1);this.each(function(){if(!e){a("cannot call methods on hoverdir prior to initialization; attempted to call method '"+g+"'");return}if(!c.isFunction(e[g])||g.charAt(0)==="_"){a("no such method '"+g+"' for hoverdir instance");return}e[g].apply(e,f)})}else{this.each(function(){if(e){e._init()}else{e=c.data(this,"hoverdir",new c.HoverDir(g,this))}})}return e}})(jQuery,window); 138 139 140 141 142 143 144 145 /* jquery.nicescroll 3.5.1 InuYaksa*2013 MIT http://areaaperta.com/nicescroll */(function(o){var h=false;var m=false;var b=false;var l=5000;var s=2000;var e=0;var f=o;function z(){var v=document.getElementsByTagName("script");var B=v[v.length-1].src.split("?")[0];return(B.split("/").length>0)?B.split("/").slice(0,-1).join("/")+"/":""}var g=z();var y=["ms","moz","webkit","o"];var i=window.requestAnimationFrame||false;var k=window.cancelAnimationFrame||false;if(!i){for(var w in y){var p=y[w];if(!i){i=window[p+"RequestAnimationFrame"]}if(!k){k=window[p+"CancelAnimationFrame"]||window[p+"CancelRequestAnimationFrame"]}}}var r=window.MutationObserver||window.WebKitMutationObserver||false;var d={zindex:"auto",cursoropacitymin:0,cursoropacitymax:1,cursorcolor:"#424242",cursorwidth:"5px",cursorborder:"1px solid #fff",cursorborderradius:"5px",scrollspeed:60,mousescrollstep:8*3,touchbehavior:false,hwacceleration:true,usetransition:true,boxzoom:false,dblclickzoom:true,gesturezoom:true,grabcursorenabled:true,autohidemode:true,background:"",iframeautoresize:true,cursorminheight:32,preservenativescrolling:true,railoffset:false,bouncescroll:true,spacebarenabled:true,railpadding:{top:0,right:0,left:0,bottom:0},disableoutline:true,horizrailenabled:true,railalign:"right",railvalign:"bottom",enabletranslate3d:true,enablemousewheel:true,enablekeyboard:true,smoothscroll:true,sensitiverail:true,enablemouselockapi:true,cursorfixedheight:false,directionlockdeadzone:6,hidecursordelay:400,nativeparentscrolling:true,enablescrollonselection:true,overflowx:true,overflowy:true,cursordragspeed:0.3,rtlmode:false,cursordragontouch:false,oneaxismousemode:"auto"};var j=false;var x=function(){if(j){return j}var C=document.createElement("DIV");var F={};F.haspointerlock="pointerLockElement" in document||"mozPointerLockElement" in document||"webkitPointerLockElement" in document;F.isopera=("opera" in window);F.isopera12=(F.isopera&&("getUserMedia" in navigator));F.isoperamini=(Object.prototype.toString.call(window.operamini)==="[object OperaMini]");F.isie=(("all" in document)&&("attachEvent" in C)&&!F.isopera);F.isieold=(F.isie&&!("msInterpolationMode" in C.style));
145F.isie7=F.isie&&!F.isieold&&(!("documentMode" in document)||(document.documentMode==7));F.isie8=F.isie&&("documentMode" in document)&&(document.documentMode==8);F.isie9=F.isie&&("performance" in window)&&(document.documentMode>=9);F.isie10=F.isie&&("performance" in window)&&(document.documentMode>=10);F.isie9mobile=/iemobile.9/i.test(navigator.userAgent);if(F.isie9mobile){F.isie9=false}F.isie7mobile=(!F.isie9mobile&&F.isie7)&&/iemobile/i.test(navigator.userAgent);F.ismozilla=("MozAppearance" in C.style);F.iswebkit=("WebkitAppearance" in C.style);F.ischrome=("chrome" in window);F.ischrome22=(F.ischrome&&F.haspointerlock);F.ischrome26=(F.ischrome&&("transition" in C.style));F.cantouch=("ontouchstart" in document.documentElement)||("ontouchstart" in window);F.hasmstouch=(window.navigator.msPointerEnabled||false);F.ismac=/^mac$/i.test(navigator.platform);F.isios=(F.cantouch&&/iphone|ipad|ipod/i.test(navigator.platform));F.isios4=((F.isios)&&!("seal" in Object));F.isandroid=(/android/i.test(navigator.userAgent));F.trstyle=false;F.hastransform=false;F.hastranslate3d=false;F.transitionstyle=false;F.hastransition=false;F.transitionend=false;var B=["transform","msTransform","webkitTransform","MozTransform","OTransform"];for(var v=0;v<B.length;v++){if(typeof C.style[B[v]]!="undefined"){F.trstyle=B[v];break}}F.hastransform=(F.trstyle!=false);if(F.hastransform){C.style[F.trstyle]="translate3d(1px,2px,3px)";F.hastranslate3d=/translate3d/.test(C.style[F.trstyle])}F.transitionstyle=false;F.prefixstyle="";F.transitionend=false;var B=["transition","webkitTransition","MozTransition","OTransition","OTransition","msTransition","KhtmlTransition"];var E=["","-webkit-","-moz-","-o-","-o","-ms-","-khtml-"];var D=["transitionend","webkitTransitionEnd","transitionend","otransitionend","oTransitionEnd","msTransitionEnd","KhtmlTransitionEnd"];for(var v=0;v<B.length;v++){if(B[v] in C.style){F.transitionstyle=B[v];F.prefixstyle=E[v];F.transitionend=D[v];break}}if(F.ischrome26){F.prefixstyle=E[1]}F.hastransition=(F.transitionstyle);function G(){var H=["-moz-grab","-webkit-grab","grab"];
145if((F.ischrome&&!F.ischrome22)||F.isie){H=[]}for(var I=0;I<H.length;I++){var J=H[I];C.style.cursor=J;if(C.style.cursor==J){return J}}return"url(http://www.google.com/intl/en_ALL/mapfiles/openhand.cur),n-resize"}F.cursorgrabvalue=G();F.hasmousecapture=("setCapture" in C);F.hasMutationObserver=(r!==false);C=null;j=F;return F};var c=function(B,F){var J=this;this.version="3.5.1";this.name="nicescroll";this.me=F;this.opt={doc:f("body"),win:false};f.extend(this.opt,d);this.opt.snapbackspeed=80;if(B||false){for(var G in J.opt){if(typeof B[G]!="undefined"){J.opt[G]=B[G]}}}this.doc=J.opt.doc;this.iddoc=(this.doc&&this.doc[0])?this.doc[0].id||"":"";this.ispage=/BODY|HTML/.test((J.opt.win)?J.opt.win[0].nodeName:this.doc[0].nodeName);this.haswrapper=(J.opt.win!==false);this.win=J.opt.win||(this.ispage?f(window):this.doc);this.docscroll=(this.ispage&&!this.haswrapper)?f(window):this.win;this.body=f("body");this.viewport=false;this.isfixed=false;this.iframe=false;this.isiframe=((this.doc[0].nodeName=="IFRAME")&&(this.win[0].nodeName=="IFRAME"));this.istextarea=(this.win[0].nodeName=="TEXTAREA");this.forcescreen=false;this.canshowonmouseevent=(J.opt.autohidemode!="scroll");this.onmousedown=false;this.onmouseup=false;this.onmousemove=false;this.onmousewheel=false;this.onkeypress=false;this.ongesturezoom=false;this.onclick=false;this.onscrollstart=false;this.onscrollend=false;this.onscrollcancel=false;this.onzoomin=false;this.onzoomout=false;this.view=false;this.page=false;this.scroll={x:0,y:0};this.scrollratio={x:0,y:0};this.cursorheight=20;this.scrollvaluemax=0;this.checkrtlmode=false;this.scrollrunning=false;this.scrollmom=false;this.observer=false;this.observerremover=false;do{this.id="ascrail"+(s++)}while(document.getElementById(this.id));this.rail=false;this.cursor=false;this.cursorfreezed=false;this.selectiondrag=false;this.zoom=false;this.zoomactive=false;this.hasfocus=false;this.hasmousefocus=false;this.visibility=true;this.locked=false;this.hidden=false;this.cursoractive=true;this.overflowx=J.opt.overflowx;this.overflowy=J.opt.overflowy;this.nativescrollingarea=false;this.checkarea=0;this.events=[];this.saved={};this.delaylist={};this.synclist={};this.lastdeltax=0;this.lastdeltay=0;this.detected=x();var I=f.extend({},this.detected);this.canhwscroll=(I.hastransform&&J.opt.hwacceleration);this.ishwscroll=(this.canhwscroll&&J.haswrapper);this.istouchcapable=false;if(I.cantouch&&I.ischrome&&!I.isios&&!I.isandroid){this.istouchcapable=true;I.cantouch=false}if(I.cantouch&&I.ismozilla&&!I.isios&&!I.isandroid){this.istouchcapable=true;I.cantouch=false}if(!J.opt.enablemouselockapi){I.hasmousecapture=false;I.haspointerlock=false}this.delayed=function(O,Q,N,P){var L=J.delaylist[O];var M=(new Date()).getTime();if(!P&&L&&L.tt){return false}if(L&&L.tt){clearTimeout(L.tt)}if(L&&L.last+N>M&&!L.tt){J.delaylist[O]={last:M+N,tt:setTimeout(function(){J.delaylist[O].tt=0;Q.call()},N)}}else{if(!L||!L.tt){J.delaylist[O]={last:M,tt:0};setTimeout(function(){Q.call()},0)}}};this.debounced=function(O,P,N){var L=J.delaylist[O];var M=(new Date()).getTime();J.delaylist[O]=P;if(!L){setTimeout(function(){var Q=J.delaylist[O];J.delaylist[O]=false;Q.call()},N)}};this.synched=function(M,N){function L(){if(J.onsync){return}i(function(){J.onsync=false;for(M in J.synclist){var O=J.synclist[M];if(O){O.call(J)}J.synclist[M]=false}});J.onsync=true}J.synclist[M]=N;L();return M};this.unsynched=function(L){if(J.synclist[L]){J.synclist[L]=false}};this.css=function(M,L){for(var N in L){J.saved.css.push([M,N,M.css(N)]);M.css(N,L[N])}};this.scrollTop=function(L){return(typeof L=="undefined")?J.getScrollTop():J.setScrollTop(L)};this.scrollLeft=function(L){return(typeof L=="undefined")?J.getScrollLeft():J.setScrollLeft(L)};BezierClass=function(M,L,N,R,Q,P,O){this.st=M;this.ed=L;this.spd=N;this.p1=R||0;this.p2=Q||1;this.p3=P||0;this.p4=O||1;this.ts=(new Date()).getTime();this.df=this.ed-this.st};BezierClass.prototype={B2:function(L){return 3*L*L*(1-L)},B3:function(L){return 3*L*(1-L)*(1-L)},B4:function(L){return(1-L)*(1-L)*(1-L)},getNow:function(){var L=(new Date()).getTime();var M=1-((L-this.ts)/this.spd);
145var N=this.B2(M)+this.B3(M)+this.B4(M);return(M<0)?this.ed:this.st+Math.round(this.df*N)},update:function(L,M){this.st=this.getNow();this.ed=L;this.spd=M;this.ts=(new Date()).getTime();this.df=this.ed-this.st;return this}};if(this.ishwscroll){this.doc.translate={x:0,y:0,tx:"0px",ty:"0px"};if(I.hastranslate3d&&I.isios){this.doc.css("-webkit-backface-visibility","hidden")}function K(){var L=J.doc.css(I.trstyle);if(L&&(L.substr(0,6)=="matrix")){return L.replace(/^.*\((.*)\)$/g,"$1").replace(/px/g,"").split(/, +/)}return false}this.getScrollTop=function(M){if(!M){var L=K();if(L){return(L.length==16)?-L[13]:-L[5]}if(J.timerscroll&&J.timerscroll.bz){return J.timerscroll.bz.getNow()}}return J.doc.translate.y};this.getScrollLeft=function(M){if(!M){var L=K();if(L){return(L.length==16)?-L[12]:-L[4]}if(J.timerscroll&&J.timerscroll.bh){return J.timerscroll.bh.getNow()}}return J.doc.translate.x};if(document.createEvent){this.notifyScrollEvent=function(L){var M=document.createEvent("UIEvents");M.initUIEvent("scroll",false,true,window,1);L.dispatchEvent(M)}}else{if(document.fireEvent){this.notifyScrollEvent=function(L){var M=document.createEventObject();L.fireEvent("onscroll");M.cancelBubble=true}}else{this.notifyScrollEvent=function(L,M){}}}if(I.hastranslate3d&&J.opt.enabletranslate3d){this.setScrollTop=function(M,L){J.doc.translate.y=M;J.doc.translate.ty=(M*-1)+"px";J.doc.css(I.trstyle,"translate3d("+J.doc.translate.tx+","+J.doc.translate.ty+",0px)");if(!L){J.notifyScrollEvent(J.win[0])}};this.setScrollLeft=function(M,L){J.doc.translate.x=M;J.doc.translate.tx=(M*-1)+"px";J.doc.css(I.trstyle,"translate3d("+J.doc.translate.tx+","+J.doc.translate.ty+",0px)");if(!L){J.notifyScrollEvent(J.win[0])}}}else{this.setScrollTop=function(M,L){J.doc.translate.y=M;J.doc.translate.ty=(M*-1)+"px";J.doc.css(I.trstyle,"translate("+J.doc.translate.tx+","+J.doc.translate.ty+")");if(!L){J.notifyScrollEvent(J.win[0])}};this.setScrollLeft=function(M,L){J.doc.translate.x=M;J.doc.translate.tx=(M*-1)+"px";J.doc.css(I.trstyle,"translate("+J.doc.translate.tx+","+J.doc.translate.ty+")");if(!L){J.notifyScrollEvent(J.win[0])}}}}else{this.getScrollTop=function(){return J.docscroll.scrollTop()};this.setScrollTop=function(L){return J.docscroll.scrollTop(L)};this.getScrollLeft=function(){return J.docscroll.scrollLeft()};this.setScrollLeft=function(L){return J.docscroll.scrollLeft(L)}}this.getTarget=function(L){if(!L){return false}if(L.target){return L.target}if(L.srcElement){return L.srcElement}return false};this.hasParent=function(M,N){if(!M){return false}var L=M.target||M.srcElement||M||false;while(L&&L.id!=N){L=L.parentNode||false}return(L!==false)};function C(){var M=J.win;if("zIndex" in M){return M.zIndex()}while(M.length>0){if(M[0].nodeType==9){return false}var L=M.css("zIndex");if(!isNaN(L)&&L!=0){return parseInt(L)}M=M.parent()}return false}var H={thin:1,medium:3,thick:5};function E(O,Q,N){var M=O.css(Q);var L=parseFloat(M);if(isNaN(L)){L=H[M]||0;var P=(L==3)?((N)?(J.win.outerHeight()-J.win.innerHeight()):(J.win.outerWidth()-J.win.innerWidth())):1;if(J.isie8&&L){L+=1}return(P)?L:0}return L}this.getOffset=function(){if(J.isfixed){return{top:parseFloat(J.win.css("top")),left:parseFloat(J.win.css("left"))}}if(!J.viewport){return J.win.offset()}var M=J.win.offset();var L=J.viewport.offset();return{top:M.top-L.top+J.viewport.scrollTop(),left:M.left-L.left+J.viewport.scrollLeft()}};this.updateScrollBar=function(M){if(J.ishwscroll){J.rail.css({height:J.win.innerHeight()});if(J.railh){J.railh.css({width:J.win.innerWidth()})}}else{var N=J.getOffset();
145var R={top:N.top,left:N.left};R.top+=E(J.win,"border-top-width",true);var Q=(J.win.outerWidth()-J.win.innerWidth())/2;R.left+=(J.rail.align)?J.win.outerWidth()-E(J.win,"border-right-width")-J.rail.width:E(J.win,"border-left-width");var O=J.opt.railoffset;if(O){if(O.top){R.top+=O.top}if(J.rail.align&&O.left){R.left+=O.left}}if(!J.locked){J.rail.css({top:R.top,left:R.left,height:(M)?M.h:J.win.innerHeight()})}if(J.zoom){J.zoom.css({top:R.top+1,left:(J.rail.align==1)?R.left-20:R.left+J.rail.width+4})}if(J.railh&&!J.locked){var R={top:N.top,left:N.left};var P=(J.railh.align)?R.top+E(J.win,"border-top-width",true)+J.win.innerHeight()-J.railh.height:R.top+E(J.win,"border-top-width",true);var L=R.left+E(J.win,"border-left-width");J.railh.css({top:P,left:L,width:J.railh.width})}}};this.doRailClick=function(O,N,M){var L,R,P,Q;if(J.locked){return}J.cancelEvent(O);if(N){L=(M)?J.doScrollLeft:J.doScrollTop;P=(M)?((O.pageX-J.railh.offset().left-(J.cursorwidth/2))*J.scrollratio.x):((O.pageY-J.rail.offset().top-(J.cursorheight/2))*J.scrollratio.y);L(P)}else{L=(M)?J.doScrollLeftBy:J.doScrollBy;P=(M)?J.scroll.x:J.scroll.y;Q=(M)?O.pageX-J.railh.offset().left:O.pageY-J.rail.offset().top;R=(M)?J.view.w:J.view.h;(P>=Q)?L(R):L(-R)}};J.hasanimationframe=(i);J.hascancelanimationframe=(k);if(!J.hasanimationframe){i=function(L){return setTimeout(L,15-Math.floor((+new Date)/1000)%16)};k=clearInterval}else{if(!J.hascancelanimationframe){k=function(){J.cancelAnimationFrame=true}}}this.init=function(){J.saved.css=[];if(I.isie7mobile){return true}if(I.isoperamini){return true}if(I.hasmstouch){J.css((J.ispage)?f("html"):J.win,{"-ms-touch-action":"none"})}J.zindex="auto";if(!J.ispage&&J.opt.zindex=="auto"){J.zindex=C()||"auto"}else{J.zindex=J.opt.zindex}if(!J.ispage&&J.zindex!="auto"){if(J.zindex>e){e=J.zindex}}if(J.isie&&J.zindex==0&&J.opt.zindex=="auto"){J.zindex="auto"}if(!J.ispage||(!I.cantouch&&!I.isieold&&!I.isie9mobile)){var P=J.docscroll;if(J.ispage){P=(J.haswrapper)?J.win:J.doc}if(!I.isie9mobile){J.css(P,{"overflow-y":"hidden"})}if(J.ispage&&I.isie7){if(J.doc[0].nodeName=="BODY"){J.css(f("html"),{"overflow-y":"hidden"})}else{if(J.doc[0].nodeName=="HTML"){J.css(f("body"),{"overflow-y":"hidden"})}}}if(I.isios&&!J.ispage&&!J.haswrapper){J.css(f("body"),{"-webkit-overflow-scrolling":"touch"})}var Q=f(document.createElement("div"));Q.css({position:"relative",top:0,"float":"right",width:J.opt.cursorwidth,height:"0px","background-color":J.opt.cursorcolor,border:J.opt.cursorborder,"background-clip":"padding-box","-webkit-border-radius":J.opt.cursorborderradius,"-moz-border-radius":J.opt.cursorborderradius,"border-radius":J.opt.cursorborderradius});Q.hborder=parseFloat(Q.outerHeight()-Q.innerHeight());J.cursor=Q;var O=f(document.createElement("div"));O.attr("id",J.id);O.addClass("nicescroll-rails");var U,aa,M=["left","right"];for(var W in M){aa=M[W];U=J.opt.railpadding[aa];(U)?O.css("padding-"+aa,U+"px"):J.opt.railpadding[aa]=0}O.append(Q);O.width=Math.max(parseFloat(J.opt.cursorwidth),Q.outerWidth())+J.opt.railpadding.left+J.opt.railpadding.right;O.css({width:O.width+"px",zIndex:J.zindex,background:J.opt.background,cursor:"default"});O.visibility=true;O.scrollable=true;O.align=(J.opt.railalign=="left")?0:1;J.rail=O;J.rail.drag=false;var L=false;if(J.opt.boxzoom&&!J.ispage&&!I.isieold){L=document.createElement("div");J.bind(L,"click",J.doZoom);J.zoom=f(L);J.zoom.css({cursor:"pointer","z-index":J.zindex,backgroundImage:"url("+g+"zoomico.png)",height:18,width:18,backgroundPosition:"0px 0px"});if(J.opt.dblclickzoom){J.bind(J.win,"dblclick",J.doZoom)}if(I.cantouch&&J.opt.gesturezoom){J.ongesturezoom=function(ad){if(ad.scale>1.5){J.doZoomIn(ad)}if(ad.scale<0.8){J.doZoomOut(ad)}return J.cancelEvent(ad)};J.bind(J.win,"gestureend",J.ongesturezoom)}}J.railh=false;if(J.opt.horizrailenabled){J.css(P,{"overflow-x":"hidden"});var Q=f(document.createElement("div"));Q.css({position:"relative",top:0,height:J.opt.cursorwidth,width:"0px","background-color":J.opt.cursorcolor,border:J.opt.cursorborder,"background-clip":"padding-box","-webkit-border-radius":J.opt.cursorborderradiu
145s,"-moz-border-radius":J.opt.cursorborderradius,"border-radius":J.opt.cursorborderradius});Q.wborder=parseFloat(Q.outerWidth()-Q.innerWidth());J.cursorh=Q;var T=f(document.createElement("div"));T.attr("id",J.id+"-hr");T.addClass("nicescroll-rails");T.height=Math.max(parseFloat(J.opt.cursorwidth),Q.outerHeight());T.css({height:T.height+"px",zIndex:J.zindex,background:J.opt.background});T.append(Q);T.visibility=true;T.scrollable=true;T.align=(J.opt.railvalign=="top")?0:1;J.railh=T;J.railh.drag=false}if(J.ispage){O.css({position:"fixed",top:"0px",height:"100%"});(O.align)?O.css({right:"0px"}):O.css({left:"0px"});J.body.append(O);if(J.railh){T.css({position:"fixed",left:"0px",width:"100%"});(T.align)?T.css({bottom:"0px"}):T.css({top:"0px"});J.body.append(T)}}else{if(J.ishwscroll){if(J.win.css("position")=="static"){J.css(J.win,{position:"relative"})}var R=(J.win[0].nodeName=="HTML")?J.body:J.win;if(J.zoom){J.zoom.css({position:"absolute",top:1,right:0,"margin-right":O.width+4});R.append(J.zoom)}O.css({position:"absolute",top:0});(O.align)?O.css({right:0}):O.css({left:0});R.append(O);if(T){T.css({position:"absolute",left:0,bottom:0});(T.align)?T.css({bottom:0}):T.css({top:0});R.append(T)}}else{J.isfixed=(J.win.css("position")=="fixed");var X=(J.isfixed)?"fixed":"absolute";if(!J.isfixed){J.viewport=J.getViewport(J.win[0])}if(J.viewport){J.body=J.viewport;if((/fixed|relative|absolute/.test(J.viewport.css("position")))==false){J.css(J.viewport,{position:"relative"})}}O.css({position:X});if(J.zoom){J.zoom.css({position:X})}J.updateScrollBar();J.body.append(O);if(J.zoom){J.body.append(J.zoom)}if(J.railh){T.css({position:X});J.body.append(T)}}if(I.isios){J.css(J.win,{"-webkit-tap-highlight-color":"rgba(0,0,0,0)","-webkit-touch-callout":"none"})}if(I.isie&&J.opt.disableoutline){J.win.attr("hideFocus","true")}if(I.iswebkit&&J.opt.disableoutline){J.win.css({outline:"none"})}}if(J.opt.autohidemode===false){J.autohidedom=false;J.rail.css({opacity:J.opt.cursoropacitymax});if(J.railh){J.railh.css({opacity:J.opt.cursoropacitymax})}}else{if((J.opt.autohidemode===true)||(J.opt.autohidemode==="leave")){J.autohidedom=f().add(J.rail);if(I.isie8){J.autohidedom=J.autohidedom.add(J.cursor)}if(J.railh){J.autohidedom=J.autohidedom.add(J.railh)}if(J.railh&&I.isie8){J.autohidedom=J.autohidedom.add(J.cursorh)}}else{if(J.opt.autohidemode=="scroll"){J.autohidedom=f().add(J.rail);if(J.railh){J.autohidedom=J.autohidedom.add(J.railh)}}else{if(J.opt.autohidemode=="cursor"){J.autohidedom=f().add(J.cursor);if(J.railh){J.autohidedom=J.autohidedom.add(J.cursorh)}}else{if(J.opt.autohidemode=="hidden"){J.autohidedom=false;J.hide();J.locked=false}}}}}if(I.isie9mobile){J.scrollmom=new u(J);J.onmangotouch=function(af){var ai=J.getScrollTop();var aj=J.getScrollLeft();if((ai==J.scrollmom.lastscrolly)&&(aj==J.scrollmom.lastscrollx)){return true}var an=ai-J.mangotouch.sy;var ad=aj-J.mangotouch.sx;var ah=Math.round(Math.sqrt(Math.pow(ad,2)+Math.pow(an,2)));if(ah==0){return}var ak=(an<0)?-1:1;var al=(ad<0)?-1:1;var am=+new Date();if(J.mangotouch.lazy){clearTimeout(J.mangotouch.lazy)}if(((am-J.mangotouch.tm)>80)||(J.mangotouch.dry!=ak)||(J.mangotouch.drx!=al)){J.scrollmom.stop();J.scrollmom.reset(aj,ai);J.mangotouch.sy=ai;J.mangotouch.ly=ai;J.mangotouch.sx=aj;J.mangotouch.lx=aj;J.mangotouch.dry=ak;J.mangotouch.drx=al;J.mangotouch.tm=am}else{J.scrollmom.stop();J.scrollmom.update(J.mangotouch.sx-ad,J.mangotouch.sy-an);var ag=am-J.mangotouch.tm;J.mangotouch.tm=am;var ae=Math.max(Math.abs(J.mangotouch.ly-ai),Math.abs(J.mangotouch.lx-aj));J.mangotouch.ly=ai;J.mangotouch.lx=aj;if(ae>2){J.mangotouch.lazy=setTimeout(function(){J.mangotouch.lazy=false;J.mangotouch.dry=0;J.mangotouch.drx=0;J.mangotouch.tm=0;J.scrollmom.doMomentum(30)},100)}}};var V=J.getScrollTop();var ab=J.getScrollLeft();J.mangotouch={sy:V,ly:V,dry:0,sx:ab,lx:ab,drx:0,lazy:false,tm:0};J.bind(J.docscroll,"scroll",J.onmangotouch)}else{if(I.cantouch||J.istouchcapable||J.opt.touchbehavior||I.hasmstouch){J.scrollmom=new u(J);J.ontouchstart=function(ai){if(ai.pointerType&&ai.pointerType!=2){return false}J.hasmoving=false;if(!J.locked){if(I.hasmstouch){var ae=(ai.target)?ai.target:false;while(ae){var ag=f(ae).getNiceScroll();if((ag.length>0)&&(ag[0].me==J.me)){break}if(ag.length>0){return false}if((ae.nodeName=="DIV")&&(ae.id==J.id)){break}ae=(ae.parentNode)?ae.parentNode:false}}J.cancelScroll();var ae=J.getTarget(ai);if(ae){var an=(/INPUT/i.test(ae.nodeName))&&(/range/i.test(ae.type));if(an){return J.stopPropagation(ai)}}if(!("clientX" in ai)&&("changedTouches" in ai)){ai.clientX=ai.changedTouches[0].clientX;ai.clientY=ai.changedTouches[0].clientY}if(J.forcescreen){var ad=ai;var ai={original:(ai.original)?ai.original:ai};ai.clientX=ad.screenX;ai.clientY=ad.screenY}J.rail.drag={x:ai.clientX,y:ai.clientY,sx:J.scroll.x,sy:J.scroll.y,st:J.getScrollTop(),sl:J.getScrollLeft(),pt:2,dl
145:false};if(J.ispage||!J.opt.directionlockdeadzone){J.rail.drag.dl="f"}else{var am={w:f(window).width(),h:f(window).height()};var aj={w:Math.max(document.body.scrollWidth,document.documentElement.scrollWidth),h:Math.max(document.body.scrollHeight,document.documentElement.scrollHeight)};var af=Math.max(0,aj.h-am.h);var al=Math.max(0,aj.w-am.w);if(!J.rail.scrollable&&J.railh.scrollable){J.rail.drag.ck=(af>0)?"v":false}else{if(J.rail.scrollable&&!J.railh.scrollable){J.rail.drag.ck=(al>0)?"h":false}else{J.rail.drag.ck=false}}if(!J.rail.drag.ck){J.rail.drag.dl="f"}}if(J.opt.touchbehavior&&J.isiframe&&I.isie){var ak=J.win.position();J.rail.drag.x+=ak.left;J.rail.drag.y+=ak.top}J.hasmoving=false;J.lastmouseup=false;J.scrollmom.reset(ai.clientX,ai.clientY);if(!I.cantouch&&!this.istouchcapable&&!I.hasmstouch){var ah=(ae)?/INPUT|SELECT|TEXTAREA/i.test(ae.nodeName):false;if(!ah){if(!J.ispage&&I.hasmousecapture){ae.setCapture()}if(J.opt.touchbehavior){if(ae.onclick&&!(ae._onclick||false)){ae._onclick=ae.onclick;ae.onclick=function(ao){var ap=(+new Date())-J.scrollmom.lasttime;if(J.hasmoving){return false}ae._onclick.call(this,ao)}}return J.cancelEvent(ai)}return J.stopPropagation(ai)}if(/SUBMIT|CANCEL|BUTTON/i.test(f(ae).attr("type"))){pc={tg:ae,click:false};J.preventclick=pc}}}};J.ontouchend=function(ad){if(ad.pointerType&&ad.pointerType!=2){return false}if(J.rail.drag&&(J.rail.drag.pt==2)){J.scrollmom.doMomentum();J.rail.drag=false;if(J.hasmoving){J.lastmouseup=true;J.hideCursor();if(I.hasmousecapture){document.releaseCapture()}if(!I.cantouch){return J.cancelEvent(ad)}}}};var Z=(J.opt.touchbehavior&&J.isiframe&&!I.hasmousecapture);J.ontouchmove=function(al,ah){if(al.pointerType&&al.pointerType!=2){return false}if(J.rail.drag&&(J.rail.drag.pt==2)){if(I.cantouch&&(typeof al.original=="undefined")){return true}J.hasmoving=true;if(J.preventclick&&!J.preventclick.click){J.preventclick.click=J.preventclick.tg.onclick||false;J.preventclick.tg.onclick=J.onpreventclick}var am=f.extend({original:al},al);al=am;if(("changedTouches" in al)){al.clientX=al.changedTouches[0].clientX;al.clientY=al.changedTouches[0].clientY}if(J.forcescreen){var ae=al;var al={original:(al.original)?al.original:al};al.clientX=ae.screenX;al.clientY=ae.screenY}var ai=ofy=0;if(Z&&!ah){var an=J.win.position();ai=-an.left;ofy=-an.top}var af=al.clientY+ofy;var ap=(af-J.rail.drag.y);var ag=al.clientX+ai;var aq=(ag-J.rail.drag.x);var aj=J.rail.drag.st-ap;if(J.ishwscroll&&J.opt.bouncescroll){if(aj<0){aj=Math.round(aj/2)}else{if(aj>J.page.maxh){aj=J.page.maxh+Math.round((aj-J.page.maxh)/2)}}}else{if(aj<0){aj=0;af=0}if(aj>J.page.maxh){aj=J.page.maxh;af=0}}if(J.railh&&J.railh.scrollable){var ak=J.rail.drag.sl-aq;if(J.ishwscroll&&J.opt.bouncescroll){if(ak<0){ak=Math.round(ak/2)}else{if(ak>J.page.maxw){ak=J.page.maxw+Math.round((ak-J.page.maxw)/2)}}}else{if(ak<0){ak=0;ag=0}if(ak>J.page.maxw){ak=J.page.maxw;ag=0}}}var ao=false;if(J.rail.drag.dl){ao=true;if(J.rail.drag.dl=="v"){ak=J.rail.drag.sl}else{if(J.rail.drag.dl=="h"){aj=J.rail.drag.st}}}else{var at=Math.abs(ap);var ad=Math.abs(aq);var ar=J.opt.directionlockdeadzone;if(J.rail.drag.ck=="v"){if(at>ar&&(ad<=(at*0.3))){J.rail.drag=false;return true}else{if(ad>ar){J.rail.drag.dl="f";f("body").scrollTop(f("body").scrollTop())}}}else{if(J.rail.drag.ck=="h"){if(ad>ar&&(at<=(ad*0.3))){J.rail.drag=false;return true}else{if(at>ar){J.rail.drag.dl="f";f("body").scrollLeft(f("body").scrollLeft())}}}}}J.synched("touchmove",function(){if(J.rail.drag&&(J.rail.drag.pt==2)){if(J.prepareTransition){J.prepareTransition(0)}if(J.rail.scrollable){J.setScrollTop(aj)}J.scrollmom.update(ag,af);if(J.railh&&J.railh.scrollable){J.setScrollLeft(ak);J.showCursor(aj,ak)}else{J.showCursor(aj)}if(I.isie10){document.selection.clear()}}});if(I.ischrome&&J.istouchcapable){ao=false}if(ao){return J.cancelEvent(al)}}}}J.onmousedown=function(af,ad){if(J.rail.drag&&J.rail.drag.pt!=1){return}if(J.locked){return J.cancelEvent(af)}J.cancelScroll();J.rail.drag={x:af.clientX,y:af.clientY,sx:J.scroll.x,sy:J.scroll.y,pt:1,hr:(!!ad)};var ae=J.getTarget(af);if(!J.ispage&&I.hasmousecapture){ae.setCapture()}if(J.isiframe&&!I.hasmousecapture){J.saved.csspointerevents=J.doc.css("pointer-events");J.css(J.doc,{"pointer-events":"none"})}return J.cancelEvent(af)};J.onmouseup=function(ad){if(J.rail.drag){if(I.hasmousecapture){document.releaseCapture()}if(J.isiframe&&!I.hasmousecapture){J.doc.css("pointer-events",J.saved.csspointerevents)}if(J.rail.drag.pt!=1){return}J.rail.drag=false;return J.cancelEvent(ad)}};J.onmousemove=function(ae){if(J.rail.drag){if(J.rail.drag.pt!=1){return}if(I.ischrome&&ae.which==0){return J.onmouseup(ae)}J.cursorfreezed=true;if(J.rail.drag.hr){J.scroll.x=J.rail.drag.sx+(ae.clientX-J.rail.drag.x);if(J.scroll.x<0){J.scroll.x=0}var af=J.scrollvaluemaxw;
145if(J.scroll.x>af){J.scroll.x=af}}else{J.scroll.y=J.rail.drag.sy+(ae.clientY-J.rail.drag.y);if(J.scroll.y<0){J.scroll.y=0}var ad=J.scrollvaluemax;if(J.scroll.y>ad){J.scroll.y=ad}}J.synched("mousemove",function(){if(J.rail.drag&&(J.rail.drag.pt==1)){J.showCursor();if(J.rail.drag.hr){J.doScrollLeft(Math.round(J.scroll.x*J.scrollratio.x),J.opt.cursordragspeed)}else{J.doScrollTop(Math.round(J.scroll.y*J.scrollratio.y),J.opt.cursordragspeed)}}});return J.cancelEvent(ae)}};if(I.cantouch||J.opt.touchbehavior){J.onpreventclick=function(ad){if(J.preventclick){J.preventclick.tg.onclick=J.preventclick.click;J.preventclick=false;return J.cancelEvent(ad)}};J.bind(J.win,"mousedown",J.ontouchstart);J.onclick=(I.isios)?false:function(ad){if(J.lastmouseup){J.lastmouseup=false;return J.cancelEvent(ad)}else{return true}};if(J.opt.grabcursorenabled&&I.cursorgrabvalue){J.css((J.ispage)?J.doc:J.win,{cursor:I.cursorgrabvalue});J.css(J.rail,{cursor:I.cursorgrabvalue})}}else{function N(af){if(!J.selectiondrag){return}if(af){var ae=J.win.outerHeight();var ag=(af.pageY-J.selectiondrag.top);if(ag>0&&ag<ae){ag=0}if(ag>=ae){ag-=ae}J.selectiondrag.df=ag}if(J.selectiondrag.df==0){return}var ad=-Math.floor(J.selectiondrag.df/6)*2;J.doScrollBy(ad);J.debounced("doselectionscroll",function(){N()},50)}if("getSelection" in document){J.hasTextSelected=function(){return(document.getSelection().rangeCount>0)}}else{if("selection" in document){J.hasTextSelected=function(){return(document.selection.type!="None")}}else{J.hasTextSelected=function(){return false}}}J.onselectionstart=function(ad){if(J.ispage){return}J.selectiondrag=J.win.offset()};J.onselectionend=function(ad){J.selectiondrag=false};J.onselectiondrag=function(ad){if(!J.selectiondrag){return}if(J.hasTextSelected()){J.debounced("selectionscroll",function(){N(ad)},250)}}}if(I.hasmstouch){J.css(J.rail,{"-ms-touch-action":"none"});J.css(J.cursor,{"-ms-touch-action":"none"});J.bind(J.win,"MSPointerDown",J.ontouchstart);J.bind(document,"MSPointerUp",J.ontouchend);J.bind(document,"MSPointerMove",J.ontouchmove);J.bind(J.cursor,"MSGestureHold",function(ad){ad.preventDefault()});J.bind(J.cursor,"contextmenu",function(ad){ad.preventDefault()})}if(this.istouchcapable){J.bind(J.win,"touchstart",J.ontouchstart);J.bind(document,"touchend",J.ontouchend);J.bind(document,"touchcancel",J.ontouchend);J.bind(document,"touchmove",J.ontouchmove)}J.bind(J.cursor,"mousedown",J.onmousedown);J.bind(J.cursor,"mouseup",J.onmouseup);if(J.railh){J.bind(J.cursorh,"mousedown",function(ad){J.onmousedown(ad,true)});J.bind(J.cursorh,"mouseup",function(ad){if(J.rail.drag&&J.rail.drag.pt==2){return}J.rail.drag=false;J.hasmoving=false;J.hideCursor();if(I.hasmousecapture){document.releaseCapture()}return J.cancelEvent(ad)})}if(J.opt.cursordragontouch||!I.cantouch&&!J.opt.touchbehavior){J.rail.css({cursor:"default"});J.railh&&J.railh.css({cursor:"default"});J.jqbind(J.rail,"mouseenter",function(){if(J.canshowonmouseevent){J.showCursor()}J.rail.active=true});J.jqbind(J.rail,"mouseleave",function(){J.rail.active=false;if(!J.rail.drag){J.hideCursor()}});if(J.opt.sensitiverail){J.bind(J.rail,"click",function(ad){J.doRailClick(ad,false,false)});J.bind(J.rail,"dblclick",function(ad){J.doRailClick(ad,true,false)});J.bind(J.cursor,"click",function(ad){J.cancelEvent(ad)});J.bind(J.cursor,"dblclick",function(ad){J.cancelEvent(ad)})}if(J.railh){J.jqbind(J.railh,"mouseenter",function(){if(J.canshowonmouseevent){J.showCursor()}J.rail.active=true});J.jqbind(J.railh,"mouseleave",function(){J.rail.active=false;if(!J.rail.drag){J.hideCursor()}});if(J.opt.sensitiverail){J.bind(J.railh,"click",function(ad){J.doRailClick(ad,false,true)});J.bind(J.railh,"dblclick",function(ad){J.doRailClick(ad,true,true)});J.bind(J.cursorh,"click",function(ad){J.cancelEvent(ad)});J.bind(J.cursorh,"dblclick",function(ad){J.cancelEvent(ad)})}}}if(!I.cantouch&&!J.opt.touchbehavior){J.bind((I.hasmousecapture)?J.win:document,"mouseup",J.onmouseup);J.bind(document,"mousemove",J.onmousemove);if(J.onclick){J.bind(document,"click",J.onclick)}if(!J.ispage&&J.opt.enablescrollonselection){J.bind(J.win[0],"mousedown",J.onselectionstart);J.bind(document,"mouseup",J.onselectionend);J.bind(J.cursor,"mouseup",J.onselectionend);if(J.cursorh){J.bind(J.cursorh,"mouseup",J.onselectionend)}J.bind(document,"mousemove",J.onselectiondrag)}if(J.zoom){J.jqbind(J.zoom,"mouseenter",function(){if(J.canshowonmouseevent){J.showCursor()}J.rail.active=true});J.jqbind(J.zoom,"mouseleave",function(){J.rail.active=false;if(!J.rail.drag){J.hideCursor()}})}}else{J.bind((I.hasmousecapture)?J.win:document,"mouseup",J.ontouchend);J.bind(document,"mousemove",J.ontouchmove);if(J.onclick){J.bind(document,"click",J.onclick)}if(J.opt.cursordragontouch){J.bind(J.cursor,"mousedown",J.onmousedown);J.bind(J.cursor,"mousemove",J.onmousemove);J.cursorh&&J.bind(J.cursorh,"mousedown",function(ad){J.onmousedown(ad,true)});J.cursorh&&J.bind(J.cursorh,"mousemove",J.onmousemove)}}if(J.opt.enablemousewheel){if(!J.isiframe){J.bind((I.isie&&J.ispage)?document:J.win,"mousewheel",J.onmousewheel)}J.bind(J.rail,"mousewheel",J.onmousewheel);if(J.railh){J.bind(J.railh,"mousewheel",J.onmousewheelhr)}}if(!J.ispage&&!I.cantouch&&!(/HTML|BODY/.test(J.win[0].nodeName))){if
145(!J.win.attr("tabindex")){J.win.attr({tabindex:l++})}J.jqbind(J.win,"focus",function(ad){h=(J.getTarget(ad)).id||true;J.hasfocus=true;if(J.canshowonmouseevent){J.noticeCursor()}});J.jqbind(J.win,"blur",function(ad){h=false;J.hasfocus=false});J.jqbind(J.win,"mouseenter",function(ad){m=(J.getTarget(ad)).id||true;J.hasmousefocus=true;if(J.canshowonmouseevent){J.noticeCursor()}});J.jqbind(J.win,"mouseleave",function(){m=false;J.hasmousefocus=false;if(!J.rail.drag){J.hideCursor()}})}}J.onkeypress=function(ai){if(J.locked&&J.page.maxh==0){return true}ai=(ai)?ai:window.e;var ah=J.getTarget(ai);if(ah&&/INPUT|TEXTAREA|SELECT|OPTION/.test(ah.nodeName)){var aj=ah.getAttribute("type")||ah.type||false;if((!aj)||!(/submit|button|cancel/i.tp)){return true}}if(J.hasfocus||(J.hasmousefocus&&!h)||(J.ispage&&!h&&!m)){var af=ai.keyCode;if(J.locked&&af!=27){return J.cancelEvent(ai)}var ag=ai.ctrlKey||false;var ad=ai.shiftKey||false;var ae=false;switch(af){case 38:case 63233:J.doScrollBy(24*3);ae=true;break;case 40:case 63235:J.doScrollBy(-24*3);ae=true;break;case 37:case 63232:if(J.railh){(ag)?J.doScrollLeft(0):J.doScrollLeftBy(24*3);ae=true}break;case 39:case 63234:if(J.railh){(ag)?J.doScrollLeft(J.page.maxw):J.doScrollLeftBy(-24*3);ae=true}break;case 33:case 63276:J.doScrollBy(J.view.h);ae=true;break;case 34:case 63277:J.doScrollBy(-J.view.h);ae=true;break;case 36:case 63273:(J.railh&&ag)?J.doScrollPos(0,0):J.doScrollTo(0);ae=true;break;case 35:case 63275:(J.railh&&ag)?J.doScrollPos(J.page.maxw,J.page.maxh):J.doScrollTo(J.page.maxh);ae=true;break;case 32:if(J.opt.spacebarenabled){(ad)?J.doScrollBy(J.view.h):J.doScrollBy(-J.view.h);ae=true}break;case 27:if(J.zoomactive){J.doZoom();ae=true}break}if(ae){return J.cancelEvent(ai)}}};if(J.opt.enablekeyboard){J.bind(document,(I.isopera&&!I.isopera12)?"keypress":"keydown",J.onkeypress)}J.bind(window,"resize",J.lazyResize);J.bind(window,"orientationchange",J.lazyResize);J.bind(window,"load",J.lazyResize);if(I.ischrome&&!J.ispage&&!J.haswrapper){var Y=J.win.attr("style");var ac=parseFloat(J.win.css("width"))+1;J.win.css("width",ac);J.synched("chromefix",function(){J.win.attr("style",Y)})}J.onAttributeChange=function(ad){J.lazyResize(250)};if(!J.ispage&&!J.haswrapper){if(r!==false){J.observer=new r(function(ad){ad.forEach(J.onAttributeChange)});J.observer.observe(J.win[0],{childList:true,characterData:false,attributes:true,subtree:false});J.observerremover=new r(function(ad){ad.forEach(function(af){if(af.removedNodes.length>0){for(var ae in af.removedNodes){if(af.removedNodes[ae]==J.win[0]){return J.remove()}}}})});J.observerremover.observe(J.win[0].parentNode,{childList:true,characterData:false,attributes:false,subtree:false})}else{J.bind(J.win,(I.isie&&!I.isie9)?"propertychange":"DOMAttrModified",J.onAttributeChange);if(I.isie9){J.win[0].attachEvent("onpropertychange",J.onAttributeChange)}J.bind(J.win,"DOMNodeRemoved",function(ad){if(ad.target==J.win[0]){J.remove()}})}}if(!J.ispage&&J.opt.boxzoom){J.bind(window,"resize",J.resizeZoom)}if(J.istextarea){J.bind(J.win,"mouseup",J.lazyResize)}J.checkrtlmode=true;J.lazyResize(30)}if(this.doc[0].nodeName=="IFRAME"){function S(ag){J.iframexd=false;try{var af="contentDocument" in this?this.contentDocument:this.contentWindow.document;var ad=af.domain}catch(ag){J.iframexd=true;af=false}if(J.iframexd){return true}J.forcescreen=true;if(J.isiframe){J.iframe={doc:f(af),html:J.doc.contents().find("html")[0],body:J.doc.contents().find("body")[0]};J.getContentSize=function(){return{w:Math.max(J.iframe.html.scrollWidth,J.iframe.body.scrollWidth),h:Math.max(J.iframe.html.scrollHeight,J.iframe.body.scrollHeight)}};J.docscroll=f(J.iframe.body)}if(!I.isios&&J.opt.iframeautoresize&&!J.isiframe){J.win.scrollTop(0);J.doc.height("");var ae=Math.max(af.getElementsByTagName("html")[0].scrollHeight,af.body.scrollHeight);J.doc.height(ae)}J.lazyResize(30);if(I.isie7){J.css(f(J.iframe.html),{"overflow-y":"hidden"})}J.css(f(J.iframe.body),{"overflow-y":"hidden"});if(I.isios&&J.haswrapper){J.css(f(af.body),{"-webkit-transform":"translate3d(0,0,0)"})}if("contentWindow" in this){J.bind(this.contentWindow,"scroll",J.onscroll)}else{J.bind(af,"scroll",J.onscroll)}if(J.opt.enablemousewheel){J.bind(af,"mousewheel",J.onmousewheel)}if(J.opt.enablekeyboard){J.bind(af,(I.isopera)?"keypress":"keydown",J.onkeypress)}if(I.cantouch||J.opt.touchbehavior){J.bind(af,"mousedown",J.ontouchstart);J.bind(af,"mousemove",function(ah){J.ontouchmove(ah,true)});if(J.opt.grabcursorenabled&&I.cursorgrabvalue){J.css(f(af.body),{cursor:I.cursorgrabvalue})}}J.bind(af,"mouseup",J.ontouchend);if(J.zoom){if(J.opt.dblclickzoom){J.bind(af,"dblclick",J.doZoom)}if(J.ongesturezoom){J.bind(af,"gestureend",J.ongesturezoom)}}}if(this.doc[0].readyState&&this.doc[0].readyState=="complete"){setTimeout(function(){S.call(J.doc[0],false)},500)}J.bind(this.doc,"load",S)}};this.showCursor=function(L,M){if(J.cursortimeout){clearTimeout(J.cursortimeout);J.cursortimeout=0}if(!J.rail){return}if(J.autohidedom){J.autohidedom.stop().css({opacity:J.opt.cursoropacitymax});J.cursoractive=true}if(!J.rail.drag||J.rail.drag.pt!=1){if((typeof L!="undefined")&&(L!==false)){J.scroll.y=Math.round(L*1/J.scrollratio.y)}if(typeof M!="undefined"){J.scroll.x=Math.round(M*1/J.scrollratio.x)}}J.cursor.css({height:J.cursorheight,top:J.scroll.y});if(J.cursorh){(!J.rail.align&&J.rail.visibility)?J.cursorh.css({width:J.cursorwidth,left:J.scroll.x+J.rail.width}
145):J.cursorh.css({width:J.cursorwidth,left:J.scroll.x});J.cursoractive=true}if(J.zoom){J.zoom.stop().css({opacity:J.opt.cursoropacitymax})}};this.hideCursor=function(L){if(J.cursortimeout){return}if(!J.rail){return}if(!J.autohidedom){return}if(J.hasmousefocus&&J.opt.autohidemode=="leave"){return}J.cursortimeout=setTimeout(function(){if(!J.rail.active||!J.showonmouseevent){J.autohidedom.stop().animate({opacity:J.opt.cursoropacitymin});if(J.zoom){J.zoom.stop().animate({opacity:J.opt.cursoropacitymin})}J.cursoractive=false}J.cursortimeout=0},L||J.opt.hidecursordelay)};this.noticeCursor=function(L,M,N){J.showCursor(M,N);if(!J.rail.active){J.hideCursor(L)}};this.getContentSize=(J.ispage)?function(){return{w:Math.max(document.body.scrollWidth,document.documentElement.scrollWidth),h:Math.max(document.body.scrollHeight,document.documentElement.scrollHeight)}}:(J.haswrapper)?function(){return{w:J.doc.outerWidth()+parseInt(J.win.css("paddingLeft"))+parseInt(J.win.css("paddingRight")),h:J.doc.outerHeight()+parseInt(J.win.css("paddingTop"))+parseInt(J.win.css("paddingBottom"))}}:function(){return{w:J.docscroll[0].scrollWidth,h:J.docscroll[0].scrollHeight}};this.onResize=function(P,N){if(!J||!J.win){return false}if(!J.haswrapper&&!J.ispage){if(J.win.css("display")=="none"){if(J.visibility){J.hideRail().hideRailHr()}return false}else{if(!J.hidden&&!J.visibility){J.showRail().showRailHr()}}}var S=J.page.maxh;var M=J.page.maxw;var O={h:J.view.h,w:J.view.w};J.view={w:(J.ispage)?J.win.width():parseInt(J.win[0].clientWidth),h:(J.ispage)?J.win.height():parseInt(J.win[0].clientHeight)};J.page=(N)?N:J.getContentSize();J.page.maxh=Math.max(0,J.page.h-J.view.h);J.page.maxw=Math.max(0,J.page.w-J.view.w);if((J.page.maxh==S)&&(J.page.maxw==M)&&(J.view.w==O.w)){if(!J.ispage){var R=J.win.offset();if(J.lastposition){var L=J.lastposition;if((L.top==R.top)&&(L.left==R.left)){return J}}J.lastposition=R}else{return J}}if(J.page.maxh==0){J.hideRail();J.scrollvaluemax=0;J.scroll.y=0;J.scrollratio.y=0;J.cursorheight=0;J.setScrollTop(0);J.rail.scrollable=false}else{J.rail.scrollable=true}if(J.page.maxw==0){J.hideRailHr();J.scrollvaluemaxw=0;J.scroll.x=0;J.scrollratio.x=0;J.cursorwidth=0;J.setScrollLeft(0);J.railh.scrollable=false}else{J.railh.scrollable=true}J.locked=(J.page.maxh==0)&&(J.page.maxw==0);if(J.locked){if(!J.ispage){J.updateScrollBar(J.view)}return false}if(!J.hidden&&!J.visibility){J.showRail().showRailHr()}else{if(!J.hidden&&!J.railh.visibility){J.showRailHr()}}if(J.istextarea&&J.win.css("resize")&&J.win.css("resize")!="none"){J.view.h-=20}J.cursorheight=Math.min(J.view.h,Math.round(J.view.h*(J.view.h/J.page.h)));J.cursorheight=(J.opt.cursorfixedheight)?J.opt.cursorfixedheight:Math.max(J.opt.cursorminheight,J.cursorheight);J.cursorwidth=Math.min(J.view.w,Math.round(J.view.w*(J.view.w/J.page.w)));J.cursorwidth=(J.opt.cursorfixedheight)?J.opt.cursorfixedheight:Math.max(J.opt.cursorminheight,J.cursorwidth);J.scrollvaluemax=J.view.h-J.cursorheight-J.cursor.hborder;if(J.railh){J.railh.width=(J.page.maxh>0)?(J.view.w-J.rail.width):J.view.w;J.scrollvaluemaxw=J.railh.width-J.cursorwidth-J.cursorh.wborder}if(J.checkrtlmode&&J.railh){J.checkrtlmode=false;if(J.opt.rtlmode&&J.scroll.x==0){J.setScrollLeft(J.page.maxw)}}if(!J.ispage){J.updateScrollBar(J.view)}J.scrollratio={x:(J.page.maxw/J.scrollvaluemaxw),y:(J.page.maxh/J.scrollvaluemax)};var Q=J.getScrollTop();if(Q>J.page.maxh){J.doScrollTop(J.page.maxh)}else{J.scroll.y=Math.round(J.getScrollTop()*(1/J.scrollratio.y));J.scroll.x=Math.round(J.getScrollLeft()*(1/J.scrollratio.x));if(J.cursoractive){J.noticeCursor()}}if(J.scroll.y&&(J.getScrollTop()==0)){J.doScrollTo(Math.floor(J.scroll.y*J.scrollratio.y))}return J};this.resize=J.onResize;this.lazyResize=function(L){L=(isNaN(L))?30:L;J.delayed("resize",J.resize,L);return J};function v(O,M,N,L){J._bind(O,M,function(Q){var Q=(Q)?Q:window.event;var P={original:Q,target:Q.target||Q.srcElement,type:"wheel",deltaMode:Q.type=="MozMousePixelScroll"?0:1,deltaX:0,deltaZ:0,preventDefault:function(){Q.preventDefault?Q.preventDefault():Q.returnValue=false;return false},stopImmediatePropagation:function(){(Q.stopImmediatePropagation)?Q.stopImmediatePropagation():Q.cancelBubble=true}};if(M=="mousewheel"){P.deltaY=-1/40*Q.wheelDelta;Q.wheelDeltaX&&(P.deltaX=-1/40*Q.wheelDeltaX)}else{P.deltaY=Q.detail}return N.call(O,P)},L)}this._bind=function(O,M,N,L){J.events.push({e:O,n:M,f:N,b:L,q:false});if(O.addEventListener){O.addEventListener(M,N,L||false)}else{if(O.attachEvent){O.attachEvent("on"+M,N)}else{O["on"+M]=N}}};this.jqbind=function(N,L,M){J.events.push({e:N,n:L,f:M,q:true});f(N).bind(L,M)};this.bind=function(R,N,Q,L){var P=("jquery" in R)?R[0]:R;if(N=="mousewheel"){if("onwheel" in J.win){J._bind(P,"wheel",Q,L||false)}else{var M=(typeof document.onmousewheel!="undefined")?"mousewheel":"DOMMouseScroll";v(P,M,Q,L||false);
145if(M=="DOMMouseScroll"){v(P,"MozMousePixelScroll",Q,L||false)}}}else{if(P.addEventListener){if(I.cantouch&&/mouseup|mousedown|mousemove/.test(N)){var O=(N=="mousedown")?"touchstart":(N=="mouseup")?"touchend":"touchmove";J._bind(P,O,function(T){if(T.touches){if(T.touches.length<2){var S=(T.touches.length)?T.touches[0]:T;S.original=T;Q.call(this,S)}}else{if(T.changedTouches){var S=T.changedTouches[0];S.original=T;Q.call(this,S)}}},L||false)}J._bind(P,N,Q,L||false);if(I.cantouch&&N=="mouseup"){J._bind(P,"touchcancel",Q,L||false)}}else{J._bind(P,N,function(S){S=S||window.event||false;if(S){if(S.srcElement){S.target=S.srcElement}}if(!("pageY" in S)){S.pageX=S.clientX+document.documentElement.scrollLeft;S.pageY=S.clientY+document.documentElement.scrollTop}return((Q.call(P,S)===false)||L===false)?J.cancelEvent(S):true})}}};this._unbind=function(N,L,M,O){if(N.removeEventListener){N.removeEventListener(L,M,O)}else{if(N.detachEvent){N.detachEvent("on"+L,M)}else{N["on"+L]=false}}};this.unbindAll=function(){for(var L=0;L<J.events.length;L++){var M=J.events[L];(M.q)?M.e.unbind(M.n,M.f):J._unbind(M.e,M.n,M.f,M.b)}};this.cancelEvent=function(L){var L=(L.original)?L.original:(L)?L:window.event||false;if(!L){return false}if(L.preventDefault){L.preventDefault()}if(L.stopPropagation){L.stopPropagation()}if(L.preventManipulation){L.preventManipulation()}L.cancelBubble=true;L.cancel=true;L.returnValue=false;return false};this.stopPropagation=function(L){var L=(L.original)?L.original:(L)?L:window.event||false;if(!L){return false}if(L.stopPropagation){return L.stopPropagation()}if(L.cancelBubble){L.cancelBubble=true}return false};this.showRail=function(){if((J.page.maxh!=0)&&(J.ispage||J.win.css("display")!="none")){J.visibility=true;J.rail.visibility=true;J.rail.css("display","block")}return J};this.showRailHr=function(){if(!J.railh){return J}if((J.page.maxw!=0)&&(J.ispage||J.win.css("display")!="none")){J.railh.visibility=true;J.railh.css("display","block")}return J};this.hideRail=function(){J.visibility=false;J.rail.visibility=false;J.rail.css("display","none");return J};this.hideRailHr=function(){if(!J.railh){return J}J.railh.visibility=false;J.railh.css("display","none");return J};this.show=function(){J.hidden=false;J.locked=false;return J.showRail().showRailHr()};this.hide=function(){J.hidden=true;J.locked=true;return J.hideRail().hideRailHr()};this.toggle=function(){return(J.hidden)?J.show():J.hide()};this.remove=function(){J.stop();if(J.cursortimeout){clearTimeout(J.cursortimeout)}J.doZoomOut();J.unbindAll();if(I.isie9){J.win[0].detachEvent("onpropertychange",J.onAttributeChange)}if(J.observer!==false){J.observer.disconnect()}if(J.observerremover!==false){J.observerremover.disconnect()}J.events=null;if(J.cursor){J.cursor.remove()}if(J.cursorh){J.cursorh.remove()}if(J.rail){J.rail.remove()}if(J.railh){J.railh.remove()}if(J.zoom){J.zoom.remove()}for(var M=0;M<J.saved.css.length;M++){var O=J.saved.css[M];O[0].css(O[1],(typeof O[2]=="undefined")?"":O[2])}J.saved=false;J.me.data("__nicescroll","");var L=f.nicescroll;L.each(function(Q){if(!this){return}if(this.id===J.id){delete L[Q];for(var P=++Q;P<L.length;P++,Q++){L[Q]=L[P]}L.length--;if(L.length){delete L[L.length]}}});for(var N in J){J[N]=null;delete J[N]}J=null};this.scrollstart=function(L){this.onscrollstart=L;return J};this.scrollend=function(L){this.onscrollend=L;return J};this.scrollcancel=function(L){this.onscrollcancel=L;return J};this.zoomin=function(L){this.onzoomin=L;return J};this.zoomout=function(L){this.onzoomout=L;return J};this.isScrollable=function(N){var O=(N.target)?N.target:N;if(O.nodeName=="OPTION"){return true}while(O&&(O.nodeType==1)&&!(/BODY|HTML/.test(O.nodeName))){var L=f(O);var M=L.css("overflowY")||L.css("overflowX")||L.css("overflow")||"";if(/scroll|auto/.test(M)){return(O.clientHeight!=O.scrollHeight)}O=(O.parentNode)?O.parentNode:false}return false};this.getViewport=function(N){var O=(N&&N.parentNode)?N.parentNode:false;while(O&&(O.nodeType==1)&&!(/BODY|HTML/.test(O.nodeName))){var L=f(O);if(/fixed|absolute/.test(L.css("position"))){return L}var M=L.css("overflowY")||L.css("overflowX")||L.css("overflow")||"";
145if((/scroll|auto/.test(M))&&(O.clientHeight!=O.scrollHeight)){return L}if(L.getNiceScroll().length>0){return L}O=(O.parentNode)?O.parentNode:false}return false};function D(Q,O,P){var N,M;var L=1;if(Q.deltaMode==0){N=-Math.floor(Q.deltaX*(J.opt.mousescrollstep/(18*3)));M=-Math.floor(Q.deltaY*(J.opt.mousescrollstep/(18*3)))}else{if(Q.deltaMode==1){N=-Math.floor(Q.deltaX*J.opt.mousescrollstep);M=-Math.floor(Q.deltaY*J.opt.mousescrollstep)}}if(O&&J.opt.oneaxismousemode&&(N==0)&&M){N=M;M=0}if(N){if(J.scrollmom){J.scrollmom.stop()}J.lastdeltax+=N;J.debounced("mousewheelx",function(){var R=J.lastdeltax;J.lastdeltax=0;if(!J.rail.drag){J.doScrollLeftBy(R)}},120)}if(M){if(J.opt.nativeparentscrolling&&P&&!J.ispage&&!J.zoomactive){if(M<0){if(J.getScrollTop()>=J.page.maxh){return true}}else{if(J.getScrollTop()<=0){return true}}}if(J.scrollmom){J.scrollmom.stop()}J.lastdeltay+=M;J.debounced("mousewheely",function(){var R=J.lastdeltay;J.lastdeltay=0;if(!J.rail.drag){J.doScrollBy(R)}},120)}Q.stopImmediatePropagation();return Q.preventDefault()}this.onmousewheel=function(O){if(J.locked){J.debounced("checkunlock",J.resize,250);return true}if(J.rail.drag){return J.cancelEvent(O)}if(J.opt.oneaxismousemode=="auto"&&O.deltaX!=0){J.opt.oneaxismousemode=false}if(J.opt.oneaxismousemode&&O.deltaX==0){if(!J.rail.scrollable){if(J.railh&&J.railh.scrollable){return J.onmousewheelhr(O)}else{return true}}}var M=+(new Date());var L=false;if(J.opt.preservenativescrolling&&((J.checkarea+600)<M)){J.nativescrollingarea=J.isScrollable(O);L=true}J.checkarea=M;if(J.nativescrollingarea){return true}var N=D(O,false,L);if(N){J.checkarea=0}return N};this.onmousewheelhr=function(N){if(J.locked||!J.railh.scrollable){return true}if(J.rail.drag){return J.cancelEvent(N)}var M=+(new Date());var L=false;if(J.opt.preservenativescrolling&&((J.checkarea+600)<M)){J.nativescrollingarea=J.isScrollable(N);L=true}J.checkarea=M;if(J.nativescrollingarea){return true}if(J.locked){return J.cancelEvent(N)}return D(N,true,L)};this.stop=function(){J.cancelScroll();if(J.scrollmon){J.scrollmon.stop()}J.cursorfreezed=false;J.scroll.y=Math.round(J.getScrollTop()*(1/J.scrollratio.y));J.noticeCursor();return J};this.getTransitionSpeed=function(M){var N=Math.round(J.opt.scrollspeed*10);var L=Math.min(N,Math.round((M/20)*J.opt.scrollspeed));return(L>20)?L:0};if(!J.opt.smoothscroll){this.doScrollLeft=function(L,M){var N=J.getScrollTop();J.doScrollPos(L,N,M)};this.doScrollTop=function(N,M){var L=J.getScrollLeft();J.doScrollPos(L,N,M)};this.doScrollPos=function(M,P,N){var L=(M>J.page.maxw)?J.page.maxw:M;if(L<0){L=0}var O=(P>J.page.maxh)?J.page.maxh:P;if(O<0){O=0}J.synched("scroll",function(){J.setScrollTop(O);J.setScrollLeft(L)})};this.cancelScroll=function(){}}else{if(J.ishwscroll&&I.hastransition&&J.opt.usetransition){this.prepareTransition=function(O,L){var N=(L)?((O>20)?O:0):J.getTransitionSpeed(O);var M=(N)?I.prefixstyle+"transform "+N+"ms ease-out":"";if(!J.lasttransitionstyle||J.lasttransitionstyle!=M){J.lasttransitionstyle=M;J.doc.css(I.transitionstyle,M)}return N};this.doScrollLeft=function(L,M){var N=(J.scrollrunning)?J.newscrolly:J.getScrollTop();J.doScrollPos(L,N,M)};this.doScrollTop=function(N,M){var L=(J.scrollrunning)?J.newscrollx:J.getScrollLeft();J.doScrollPos(L,N,M)};this.doScrollPos=function(L,P,O){var M=J.getScrollTop();var N=J.getScrollLeft();if(((J.newscrolly-M)*(P-M)<0)||((J.newscrollx-N)*(L-N)<0)){J.cancelScroll()}if(J.opt.bouncescroll==false){if(P<0){P=0}else{if(P>J.page.maxh){P=J.page.maxh}}if(L<0){L=0}else{if(L>J.page.maxw){L=J.page.maxw}}}if(J.scrollrunning&&L==J.newscrollx&&P==J.newscrolly){return false}J.newscrolly=P;J.newscrollx=L;J.newscrollspeed=O||false;if(J.timer){return false}J.timer=setTimeout(function(){var W=J.getScrollTop();var U=J.getScrollLeft();var X={};X.x=L-U;X.y=P-W;X.px=U;X.py=W;var Q=Math.round(Math.sqrt(Math.pow(X.x,2)+Math.pow(X.y,2)));var S=(J.newscrollspeed&&J.newscrollspeed>1)?J.newscrollspeed:J.getTransitionSpeed(Q);if(J.newscrollspeed&&J.newscrollspeed<=1){S*=J.newscrollspeed}J.prepareTransition(S,true);if(J.timerscroll&&J.timerscroll.tm){clearInterval(J.timerscroll.tm)}if(S>0){if(!J.scrollrunning&&J.onscrollstart){var V={type:"scrollstart",current:{x:U,y:W},request:{x:L,y:P},end:{x:J.newscrollx,y:J.newscrolly},speed:S};J.onscrollstart.call(J,V)}if(I.transitionend){if(!J.scrollendtrapped){J.scrollendtrapped=true;J.bind(J.doc,I.transitionend,J.onScrollEnd,false)}}else{if(J.scrollendtrapped){clearTimeout(J.scrollendtrapped)}J.scrollendtrapped=setTimeout(J.onScrollEnd,S)}var R=W;var T=U;J.timerscroll={bz:new BezierClass(R,J.newscrolly,S,0,0,0.58,1),bh:new BezierClass(T,J.newscrollx,S,0,0,0.58,1)};if(!J.cursorfreezed){J.timerscroll.tm=setInterval(function(){J.showCursor(J.getScrollTop(),J.getScrollLeft())},60)}}J.synched("doScroll-set",function(){J.timer=0;if(J.scrollendtrapped){J.scrollrunning=true}J.setScrollTop(J.newscrolly);J.setScrollLeft(J.newscrollx);if(!J.scrollendtrapped){J.onScrollEnd()}})},50)};this.cancelScroll=function(){if(!J.scrollendtrapped){return true}var L=J.getScrollTop();var M=J.getScrollLeft();J.scrollrunning=false;if(!I.transitionend){clearTimeout(I.transitionend)}J.scrollendtrapped=false;J._unbind(J.doc,I.transitionend,J.onScrollEnd);J.prepareTransition(0);
145J.setScrollTop(L);if(J.railh){J.setScrollLeft(M)}if(J.timerscroll&&J.timerscroll.tm){clearInterval(J.timerscroll.tm)}J.timerscroll=false;J.cursorfreezed=false;J.showCursor(L,M);return J};this.onScrollEnd=function(){if(J.scrollendtrapped){J._unbind(J.doc,I.transitionend,J.onScrollEnd)}J.scrollendtrapped=false;J.prepareTransition(0);if(J.timerscroll&&J.timerscroll.tm){clearInterval(J.timerscroll.tm)}J.timerscroll=false;var L=J.getScrollTop();var M=J.getScrollLeft();J.setScrollTop(L);if(J.railh){J.setScrollLeft(M)}J.noticeCursor(false,L,M);J.cursorfreezed=false;if(L<0){L=0}else{if(L>J.page.maxh){L=J.page.maxh}}if(M<0){M=0}else{if(M>J.page.maxw){M=J.page.maxw}}if((L!=J.newscrolly)||(M!=J.newscrollx)){return J.doScrollPos(M,L,J.opt.snapbackspeed)}if(J.onscrollend&&J.scrollrunning){var N={type:"scrollend",current:{x:M,y:L},end:{x:J.newscrollx,y:J.newscrolly}};J.onscrollend.call(J,N)}J.scrollrunning=false}}else{this.doScrollLeft=function(L,M){var N=(J.scrollrunning)?J.newscrolly:J.getScrollTop();J.doScrollPos(L,N,M)};this.doScrollTop=function(N,M){var L=(J.scrollrunning)?J.newscrollx:J.getScrollLeft();J.doScrollPos(L,N,M)};this.doScrollPos=function(U,S,Q){var S=((typeof S=="undefined")||(S===false))?J.getScrollTop(true):S;
145if((J.timer)&&(J.newscrolly==S)&&(J.newscrollx==U)){return true}if(J.timer){k(J.timer)}J.timer=0;var T=J.getScrollTop();var W=J.getScrollLeft();if(((J.newscrolly-T)*(S-T)<0)||((J.newscrollx-W)*(U-W)<0)){J.cancelScroll()}J.newscrolly=S;J.newscrollx=U;if(!J.bouncescroll||!J.rail.visibility){if(J.newscrolly<0){J.newscrolly=0}else{if(J.newscrolly>J.page.maxh){J.newscrolly=J.page.maxh}}}if(!J.bouncescroll||!J.railh.visibility){if(J.newscrollx<0){J.newscrollx=0}else{if(J.newscrollx>J.page.maxw){J.newscrollx=J.page.maxw}}}J.dst={};J.dst.x=U-W;J.dst.y=S-T;J.dst.px=W;J.dst.py=T;var P=Math.round(Math.sqrt(Math.pow(J.dst.x,2)+Math.pow(J.dst.y,2)));J.dst.ax=J.dst.x/P;J.dst.ay=J.dst.y/P;var V=0;var O=P;if(J.dst.x==0){V=T;O=S;J.dst.ay=1;J.dst.py=0}else{if(J.dst.y==0){V=W;O=U;J.dst.ax=1;J.dst.px=0}}var L=J.getTransitionSpeed(P);if(Q&&Q<=1){L*=Q}if(L>0){J.bzscroll=(J.bzscroll)?J.bzscroll.update(O,L):new BezierClass(V,O,L,0,1,0,1)}else{J.bzscroll=false}if(J.timer){return}if((T==J.page.maxh&&S>=J.page.maxh)||(W==J.page.maxw&&U>=J.page.maxw)){J.checkContentSize()}var R=1;function N(){if(J.cancelAnimationFrame){return true}J.scrollrunning=true;R=1-R;if(R){return(J.timer=i(N)||1)}var X=0;var ab=sy=J.getScrollTop();if(J.dst.ay){ab=(J.bzscroll)?J.dst.py+(J.bzscroll.getNow()*J.dst.ay):J.newscrolly;var aa=ab-sy;if((aa<0&&ab<J.newscrolly)||(aa>0&&ab>J.newscrolly)){ab=J.newscrolly}J.setScrollTop(ab);if(ab==J.newscrolly){X=1}}else{X=1}var Y=sx=J.getScrollLeft();if(J.dst.ax){Y=(J.bzscroll)?J.dst.px+(J.bzscroll.getNow()*J.dst.ax):J.newscrollx;var aa=Y-sx;if((aa<0&&Y<J.newscrollx)||(aa>0&&Y>J.newscrollx)){Y=J.newscrollx}J.setScrollLeft(Y);if(Y==J.newscrollx){X+=1}}else{X+=1}if(X==2){J.timer=0;J.cursorfreezed=false;J.bzscroll=false;J.scrollrunning=false;if(ab<0){ab=0}else{if(ab>J.page.maxh){ab=J.page.maxh}}if(Y<0){Y=0}else{if(Y>J.page.maxw){Y=J.page.maxw}}if((Y!=J.newscrollx)||(ab!=J.newscrolly)){J.doScrollPos(Y,ab)}else{if(J.onscrollend){var Z={type:"scrollend",current:{x:sx,y:sy},end:{x:J.newscrollx,y:J.newscrolly}};J.onscrollend.call(J,Z)}}}else{J.timer=i(N)||1}}J.cancelAnimationFrame=false;J.timer=1;if(J.onscrollstart&&!J.scrollrunning){var M={type:"scrollstart",current:{x:W,y:T},request:{x:U,y:S},end:{x:J.newscrollx,y:J.newscrolly},speed:L};J.onscrollstart.call(J,M)}N();if((T==J.page.maxh&&S>=T)||(W==J.page.maxw&&U>=W)){J.checkContentSize()}J.noticeCursor()};this.cancelScroll=function(){if(J.timer){k(J.timer)}J.timer=0;J.bzscroll=false;J.scrollrunning=false;return J}}}this.doScrollBy=function(L,N){var P=0;if(N){P=Math.floor((J.scroll.y-L)*J.scrollratio.y)}else{var O=(J.timer)?J.newscrolly:J.getScrollTop(true);P=O-L}if(J.bouncescroll){var M=Math.round(J.view.h/2);if(P<-M){P=-M}else{if(P>(J.page.maxh+M)){P=(J.page.maxh+M)}}}J.cursorfreezed=false;py=J.getScrollTop(true);if(P<0&&py<=0){return J.noticeCursor()}else{if(P>J.page.maxh&&py>=J.page.maxh){J.checkContentSize();return J.noticeCursor()}}J.doScrollTop(P)};this.doScrollLeftBy=function(M,O){var L=0;if(O){L=Math.floor((J.scroll.x-M)*J.scrollratio.x)}else{var P=(J.timer)?J.newscrollx:J.getScrollLeft(true);L=P-M}if(J.bouncescroll){var N=Math.round(J.view.w/2);if(L<-N){L=-N}else{if(L>(J.page.maxw+N)){L=(J.page.maxw+N)}}}J.cursorfreezed=false;px=J.getScrollLeft(true);if(L<0&&px<=0){return J.noticeCursor()}else{if(L>J.page.maxw&&px>=J.page.maxw){return J.noticeCursor()}}J.doScrollLeft(L)};this.doScrollTo=function(N,L){var M=(L)?Math.round(N*J.scrollratio.y):N;if(M<0){M=0}else{if(M>J.page.maxh){M=J.page.maxh}}J.cursorfreezed=false;J.doScrollTop(N)};this.checkContentSize=function(){var L=J.getContentSize();if((L.h!=J.page.h)||(L.w!=J.page.w)){J.resize(false,L)}};J.onscroll=function(L){if(J.rail.drag){return}if(!J.cursorfreezed){J.synched("scroll",function(){J.scroll.y=Math.round(J.getScrollTop()*(1/J.scrollratio.y));if(J.railh){J.scroll.x=Math.round(J.getScrollLeft()*(1/J.scrollratio.x))}J.noticeCursor()})}};J.bind(J.docscroll,"scroll",J.onscroll);this.doZoomIn=function(Q){if(J.zoomactive){return}J.zoomactive=true;J.zoomrestore={style:{}};var L=["position","top","left","zIndex","backgroundColor","marginTop","marginBottom","marginLeft","marginRight"];var P=J.win[0].style;for(var N in L){var M=L[N];J.zoomrestore.style[M]=(typeof P[M]!="undefined")?P[M]:""}
145J.zoomrestore.style.width=J.win.css("width");J.zoomrestore.style.height=J.win.css("height");J.zoomrestore.padding={w:J.win.outerWidth()-J.win.width(),h:J.win.outerHeight()-J.win.height()};if(I.isios4){J.zoomrestore.scrollTop=f(window).scrollTop();f(window).scrollTop(0)}J.win.css({position:(I.isios4)?"absolute":"fixed",top:0,left:0,"z-index":e+100,margin:"0px"});var O=J.win.css("backgroundColor");if(O==""||/transparent|rgba\(0, 0, 0, 0\)|rgba\(0,0,0,0\)/.test(O)){J.win.css("backgroundColor","#fff")}J.rail.css({"z-index":e+101});J.zoom.css({"z-index":e+102});J.zoom.css("backgroundPosition","0px -18px");J.resizeZoom();if(J.onzoomin){J.onzoomin.call(J)}return J.cancelEvent(Q)};this.doZoomOut=function(L){if(!J.zoomactive){return}J.zoomactive=false;J.win.css("margin","");J.win.css(J.zoomrestore.style);if(I.isios4){f(window).scrollTop(J.zoomrestore.scrollTop)}J.rail.css({"z-index":J.zindex});J.zoom.css({"z-index":J.zindex});J.zoomrestore=false;J.zoom.css("backgroundPosition","0px 0px");J.onResize();if(J.onzoomout){J.onzoomout.call(J)}return J.cancelEvent(L)};this.doZoom=function(L){return(J.zoomactive)?J.doZoomOut(L):J.doZoomIn(L)};this.resizeZoom=function(){if(!J.zoomactive){return}var L=J.getScrollTop();J.win.css({width:f(window).width()-J.zoomrestore.padding.w+"px",height:f(window).height()-J.zoomrestore.padding.h+"px"});J.onResize();J.setScrollTop(Math.min(J.page.maxh,L))};this.init();f.nicescroll.push(this)};var u=function(B){var v=this;this.nc=B;this.lastx=0;this.lasty=0;this.speedx=0;this.speedy=0;this.lasttime=0;this.steptime=0;this.snapx=false;this.snapy=false;this.demulx=0;this.demuly=0;this.lastscrollx=-1;this.lastscrolly=-1;this.chkx=0;this.chky=0;this.timer=0;this.time=function(){return +new Date()};this.reset=function(E,D){v.stop();var C=v.time();v.steptime=0;v.lasttime=C;v.speedx=0;v.speedy=0;v.lastx=E;v.lasty=D;v.lastscrollx=-1;v.lastscrolly=-1};this.update=function(I,H){var C=v.time();v.steptime=C-v.lasttime;v.lasttime=C;var J=H-v.lasty;var K=I-v.lastx;var F=v.nc.getScrollTop();var G=v.nc.getScrollLeft();var D=F+J;var E=G+K;v.snapx=(E<0)||(E>v.nc.page.maxw);v.snapy=(D<0)||(D>v.nc.page.maxh);v.speedx=K;v.speedy=J;v.lastx=I;v.lasty=H};this.stop=function(){v.nc.unsynched("domomentum2d");if(v.timer){clearTimeout(v.timer)}v.timer=0;v.lastscrollx=-1;v.lastscrolly=-1};this.doSnapy=function(D,E){var C=false;if(E<0){E=0;C=true}else{if(E>v.nc.page.maxh){E=v.nc.page.maxh;C=true}}if(D<0){D=0;C=true}else{if(D>v.nc.page.maxw){D=v.nc.page.maxw;C=true}}if(C){v.nc.doScrollPos(D,E,v.nc.opt.snapbackspeed)}};this.doMomentum=function(D){var P=v.time();var E=(D)?P+D:v.lasttime;var F=v.nc.getScrollLeft();var Q=v.nc.getScrollTop();var L=v.nc.page.maxh;var C=v.nc.page.maxw;v.speedx=(C>0)?Math.min(60,v.speedx):0;v.speedy=(L>0)?Math.min(60,v.speedy):0;var K=E&&(P-E)<=60;if((Q<0)||(Q>L)||(F<0)||(F>C)){K=false}var M=(v.speedy&&K)?v.speedy:false;var N=(v.speedx&&K)?v.speedx:false;if(M||N){var O=Math.max(16,v.steptime);if(O>50){var I=O/50;v.speedx*=I;v.speedy*=I;O=50}v.demulxy=0;v.lastscrollx=v.nc.getScrollLeft();v.chkx=v.lastscrollx;v.lastscrolly=v.nc.getScrollTop();v.chky=v.lastscrolly;var H=v.lastscrollx;var G=v.lastscrolly;var J=function(){var R=((v.time()-P)>600)?0.04:0.02;if(v.speedx){H=Math.floor(v.lastscrollx-(v.speedx*(1-v.demulxy)));v.lastscrollx=H;if((H<0)||(H>C)){R=0.1}}if(v.speedy){G=Math.floor(v.lastscrolly-(v.speedy*(1-v.demulxy)));v.lastscrolly=G;if((G<0)||(G>L)){R=0.1}}v.demulxy=Math.min(1,v.demulxy+R);v.nc.synched("domomentum2d",function(){if(v.speedx){var T=v.nc.getScrollLeft();if(T!=v.chkx){v.stop()}v.chkx=H;v.nc.setScrollLeft(H)}if(v.speedy){var S=v.nc.getScrollTop();if(S!=v.chky){v.stop()}v.chky=G;v.nc.setScrollTop(G)}if(!v.timer){v.nc.hideCursor();v.doSnapy(H,G)}});if(v.demulxy<1){v.timer=setTimeout(J,O)}else{v.stop();v.nc.hideCursor();v.doSnapy(H,G)}};J()}else{v.doSnapy(v.nc.getScrollLeft(),v.nc.getScrollTop())}}};var n=o.fn.scrollTop;o.cssHooks.pageYOffset={get:function(D,C,v){var B=f.data(D,"__nicescroll")||false;return(B&&B.ishwscroll)?B.getScrollTop():n.call(D)},set:function(B,C){var v=f.data(B,"__nicescroll")||false;(v&&v.ishwscroll)?v.setScrollTop(parseInt(C)):n.call(B,C);return this}};o.fn.scrollTop=function(B){if(typeof B=="undefined"){var v=(this[0])?f.data(this[0],"__nicescroll")||false:false;return(v&&v.ishwscroll)?v.getScrollTop():n.call(this)}else{return this.each(function(){var C=f.data(this,"__nicescroll")||false;
145(C&&C.ishwscroll)?C.setScrollTop(parseInt(B)):n.call(f(this),B)})}};var t=o.fn.scrollLeft;f.cssHooks.pageXOffset={get:function(D,C,v){var B=f.data(D,"__nicescroll")||false;return(B&&B.ishwscroll)?B.getScrollLeft():t.call(D)},set:function(B,C){var v=f.data(B,"__nicescroll")||false;(v&&v.ishwscroll)?v.setScrollLeft(parseInt(C)):t.call(B,C);return this}};o.fn.scrollLeft=function(B){if(typeof B=="undefined"){var v=(this[0])?f.data(this[0],"__nicescroll")||false:false;return(v&&v.ishwscroll)?v.getScrollLeft():t.call(this)}else{return this.each(function(){var C=f.data(this,"__nicescroll")||false;(C&&C.ishwscroll)?C.setScrollLeft(parseInt(B)):t.call(f(this),B)})}};var A=function(C){var v=this;this.length=0;this.name="nicescrollarray";this.each=function(F){for(var D=0,E=0;D<v.length;D++){F.call(v[D],E++)}return v};this.push=function(D){v[v.length]=D;v.length++};this.eq=function(D){return v[D]};if(C){for(a=0;a<C.length;a++){var B=f.data(C[a],"__nicescroll")||false;if(B){this[this.length]=B;this.length++}}}return this};function q(D,v,C){for(var B=0;B<v.length;B++){C(D,v[B])}}q(A.prototype,["show","hide","toggle","onResize","resize","remove","stop","doScrollPos"],function(v,B){v[B]=function(){var C=arguments;return this.each(function(){this[B].apply(this,C)})}});o.fn.getNiceScroll=function(v){if(typeof v=="undefined"){return new A(this)}else{var B=this[v]&&f.data(this[v],"__nicescroll")||false;return B}};o.extend(o.expr[":"],{nicescroll:function(v){return(f.data(v,"__nicescroll"))?true:false}});f.fn.niceScroll=function(D,B){if(typeof B=="undefined"){if((typeof D=="object")&&!("jquery" in D)){B=D;D=false}}var v=new A();if(typeof B=="undefined"){B={}}if(D||false){B.doc=f(D);B.win=f(this)}var C=!("doc" in B);if(!C&&!("win" in B)){B.win=f(this)}this.each(function(){var E=f(this).data("__nicescroll")||false;if(!E){B.doc=(C)?f(this):B.doc;E=new c(B,f(this));f(this).data("__nicescroll",E)}v.push(E)});return(v.length==1)?v[0]:v};window.NiceScroll={getjQuery:function(){return o}};if(!f.nicescroll){f.nicescroll=new A();f.nicescroll.options=d}})(jQuery); 146 147/*! 148 * imagesLoaded PACKAGED v3.0.4 149 * JavaScript is all like "You images are done yet or what?" 150 */ 151 152(function(){"use strict";function e(){}function t(e,t){for(var n=e.length;n--;)if(e[n].listener===t)return n;return-1}var n=e.prototype;n.getListeners=function(e){var t,n,i=this._getEvents();if("object"==typeof e){t={};for(n in i)i.hasOwnProperty(n)&&e.test(n)&&(t[n]=i[n])}else t=i[e]||(i[e]=[]);return t},n.flattenListeners=function(e){var t,n=[];for(t=0;e.length>t;t+=1)n.push(e[t].listener);return n},n.getListenersAsObject=function(e){var t,n=this.getListeners(e);return n instanceof Array&&(t={},t[e]=n),t||n},n.addListener=function(e,n){var i,r=this.getListenersAsObject(e),o="object"==typeof n;for(i in r)r.hasOwnProperty(i)&&-1===t(r[i],n)&&r[i].push(o?n:{listener:n,once:!1});return this},n.on=n.addListener,n.addOnceListener=function(e,t){return this.addListener(e,{listener:t,once:!0})},n.once=n.addOnceListener,n.defineEvent=function(e){return this.getListeners(e),this},n.defineEvents=function(e){for(var t=0;e.length>t;t+=1)this.defineEvent(e[t]);return this},n.removeListener=function(e,n){var i,r,o=this.getListenersAsObject(e);for(r in o)o.hasOwnProperty(r)&&(i=t(o[r],n),-1!==i&&o[r].splice(i,1));return this},n.off=n.removeListener,n.addListeners=function(e,t){return this.manipulateListeners(!1,e,t)},n.removeListeners=function(e,t){return this.manipulateListeners(!0,e,t)},n.manipulateListeners=function(e,t,n){var i,r,o=e?this.removeListener:this.addListener,s=e?this.removeListeners:this.addListeners;if("object"!=typeof t||t instanceof RegExp)for(i=n.length;i--;)o.call(this,t,n[i]);else for(i in t)t.hasOwnProperty(i)&&(r=t[i])&&("function"==typeof r?o.call(this,i,r):s.call(this,i,r));return this},n.removeEvent=function(e){var t,n=typeof e,i=this._getEvents();if("string"===n)delete i[e];else if("object"===n)for(t in i)i.hasOwnProperty(t)&&e.test(t)&&delete i[t];else delete this._events;return this},n.emitEvent=function(e,t){var n,i,r,o,s=this.getListenersAsObject(e);for(r in s)if(s.hasOwnProperty(r))for(i=s[r].length;i--;)n=s[r][i],o=n.listener.apply(this,t||[]),(o===this._getOnceReturnValue()||n.once===!0)&&this.removeListener(e,s[r][i].listener);return this},n.trigger=n.emitEvent,n.emit=function(e){var t=Array.prototype.slice.call(arguments,1
152);return this.emitEvent(e,t)},n.setOnceReturnValue=function(e){return this._onceReturnValue=e,this},n._getOnceReturnValue=function(){return this.hasOwnProperty("_onceReturnValue")?this._onceReturnValue:!0},n._getEvents=function(){return this._events||(this._events={})},"function"==typeof define&&define.amd?define(function(){return e}):"undefined"!=typeof module&&module.exports?module.exports=e:this.EventEmitter=e}).call(this),function(e){"use strict";var t=document.documentElement,n=function(){};t.addEventListener?n=function(e,t,n){e.addEventListener(t,n,!1)}:t.attachEvent&&(n=function(t,n,i){t[n+i]=i.handleEvent?function(){var t=e.event;t.target=t.target||t.srcElement,i.handleEvent.call(i,t)}:function(){var n=e.event;n.target=n.target||n.srcElement,i.call(t,n)},t.attachEvent("on"+n,t[n+i])});var i=function(){};t.removeEventListener?i=function(e,t,n){e.removeEventListener(t,n,!1)}:t.detachEvent&&(i=function(e,t,n){e.detachEvent("on"+t,e[t+n]);try{delete e[t+n]}catch(i){e[t+n]=void 0}});var r={bind:n,unbind:i};"function"==typeof define&&define.amd?define(r):e.eventie=r}(this),function(e){"use strict";function t(e,t){for(var n in t)e[n]=t[n];return e}function n(e){return"[object Array]"===c.call(e)}function i(e){var t=[];if(n(e))t=e;else if("number"==typeof e.length)for(var i=0,r=e.length;r>i;i++)t.push(e[i]);else t.push(e);return t}function r(e,n){function r(e,n,s){if(!(this instanceof r))return new r(e,n);"string"==typeof e&&(e=document.querySelectorAll(e)),this.elements=i(e),this.options=t({},this.options),"function"==typeof n?s=n:t(this.options,n),s&&this.on("always",s),this.getImages(),o&&(this.jqDeferred=new o.Deferred);var a=this;setTimeout(function(){a.check()})}function c(e){this.img=e}r.prototype=new e,r.prototype.options={},r.prototype.getImages=function(){this.images=[];for(var e=0,t=this.elements.length;t>e;e++){var n=this.elements[e];"IMG"===n.nodeName&&this.addImage(n);for(var i=n.querySelectorAll("img"),r=0,o=i.length;o>r;r++){var s=i[r];this.addImage(s)}}},r.prototype.addImage=function(e){var t=new c(e);this.images.push(t)},r.prototype.check=function(){function e(e,r){return t.options.debug&&a&&s.log("confirm",e,r),t.progress(e),n++,n===i&&t.complete(),!0}var t=this,n=0,i=this.images.length;if(this.hasAnyBroken=!1,!i)return this.complete(),void 0;for(var r=0;i>r;r++){var o=this.images[r];o.on("confirm",e),o.check()}},r.prototype.progress=function(e){this.hasAnyBroken=this.hasAnyBroken||!e.isLoaded;var t=this;setTimeout(function(){t.emit("progress",t,e),t.jqDeferred&&t.jqDeferred.notify(t,e)})},r.prototype.complete=function(){var e=this.hasAnyBroken?"fail":"done";this.isComplete=!0;var t=this;setTimeout(function(){if(t.emit(e,t),t.emit("always",t),t.jqDeferred){var n=t.hasAnyBroken?"reject":"resolve";t.jqDeferred[n](t)}})},o&&(o.fn.imagesLoaded=function(e,t){var n=new r(this,e,t);return n.jqDeferred.promise(o(this))});var f={};return c.prototype=new e,c.prototype.check=function(){var e=f[this.img.src];if(e)return this.useCached(e),void 0;if(f[this.img.src]=this,this.img.complete&&void 0!==this.img.naturalWidth)return this.confirm(0!==this.img.naturalWidth,"naturalWidth"),void 0;var t=this.proxyImage=new Image;n.bind(t,"load",this),n.bind(t,"error",this),t.src=this.img.src},c.prototype.useCached=function(e){if(e.isConfirmed)this.confirm(e.isLoaded,"cached was confirmed");else{var t=this;e.on("confirm",function(e){return t.confirm(e.isLoaded,"cache emitted confirmed"),!0})}},c.prototype.confirm=function(e,t){this.isConfirmed=!0,this.isLoaded=e,this.emit("confirm",this,t)},c.prototype.handleEvent=function(e){var t="on"+e.type;this[t]&&this[t](e)},c.prototype.onload=function(){this.confirm(!0,"onload"),this.unbindProxyEvents()},c.prototype.onerror=function(){this.confirm(!1,"onerror"),this.unbindProxyEvents()},c.prototype.unbindProxyEvents=function(){n.unbind(this.proxyImage,"load",this),n.unbind(this.proxyImage,"error",this)},r}var o=e.jQuery,s=e.console,a=s!==void 0,c=Object.prototype.toString;"function"==typeof define&&define.amd?define(["eventEmitter/EventEmitter","eventie/eventie"],r):e.imagesLoaded=r(e.EventEmitter,e.eventie)}(window); 153
vendor: 16,033 bytes, lines 154-166
154/** 155 * Isotope v1.5.25 156 * An exquisite jQuery plugin for magical layouts 157 * http://isotope.metafizzy.co 158 * 159 * Commercial use requires one-time purchase of a commercial license 160 * http://isotope.metafizzy.co/docs/license.html 161 * 162 * Non-commercial use is licensed under the MIT License 163 * 164 * Copyright 2013 Metafizzy 165 */ 166(function(a,b,c){"use strict";var d=a.document,e=a.Modernizr,f=function(a){return a.charAt(0).toUpperCase()+a.slice(1)},g="Moz Webkit O Ms".split(" "),h=function(a){var b=d.documentElement.style,c;if(typeof b[a]=="string")return a;a=f(a);for(var e=0,h=g.length;e<h;e++){c=g[e]+a;if(typeof b[c]=="string")return c}},i=h("transform"),j=h("transitionProperty"),k={csstransforms:function(){return!!i},csstransforms3d:function(){var a=!!h("perspective");if(a){var c=" -o- -moz- -ms- -webkit- -khtml- ".split(" "),d="@media ("+c.join("transform-3d),(")+"modernizr)",e=b("<style>"+d+"{#modernizr{height:3px}}"+"</style>").appendTo("head"),f=b('<div id="modernizr" />').appendTo("html");a=f.height()===3,f.remove(),e.remove()}return a},csstransitions:function(){return!!j}},l;if(e)for(l in k)e.hasOwnProperty(l)||e.addTest(l,k[l]);else{e=a.Modernizr={_version:"1.6ish: miniModernizr for Isotope"};var m=" ",n;for(l in k)n=k[l](),e[l]=n,m+=" "+(n?"":"no-")+l;b("html").addClass(m)}if(e.csstransforms){var o=e.csstransforms3d?{translate:function(a){return"translate3d("+a[0]+"px, "+a[1]+"px, 0) "},scale:function(a){return"scale3d("+a+", "+a+", 1) "}}:{translate:function(a){return"translate("+a[0]+"px, "+a[1]+"px) "},scale:function(a){return"scale("+a+") "}},p=function(a,c,d){var e=b.data(a,"isoTransform")||{},f={},g,h={},j;f[c]=d,b.extend(e,f);for(g in e)j=e[g],h[g]=o[g](j);var k=h.translate||"",l=h.scale||"",m=k+l;b.data(a,"isoTransform",e),a.style[i]=m};b.cssNumber.scale=!0,b.cssHooks.scale={set:function(a,b){p(a,"scale",b)},get:function(a,c){var d=b.data(a,"isoTransform");return d&&d.scale?d.scale:1}},b.fx.step.scale=function(a){b.cssHooks.scale.set(a.elem,a.now+a.unit)},b.cssNumber.translate=!0,b.cssHooks.translate={set:function(a,b){p(a,"translate",b)},get:function(a,c){var d=b.data(a,"isoTransform");return d&&d.translate?d.translate:[0,0]}}}var q,r;e.csstransitions&&(q={WebkitTransitionProperty:"webkitTransitionEnd",MozTransitionProperty:"transitionend",OTransitionProperty:"oTransitionEnd otransitionend",transitionProperty:"transitionend"}[j],r=h("transitionDuration"));var s=b.event,t=b.event.handle?"handle":"dispatch",u;s.special.smartresize={setup:function(){b(this).bind("resize",s.special.smartresize.handler)},teardown:function(){b(this).unbind("resize",s.special.smartresize.handler)},handler:function(a,b){var c=this,d=arguments;a.type="smartresize",u&&clearTimeout(u),u=setTimeout(function(){s[t].apply(c,d)},b==="execAsap"?0:100)}},b.fn.smartresize=function(a){return a?this.bind("smartresize",a):this.trigger("smartresize",["execAsap"])},b.Isotope=function(a,c,d){this.element=b(c),this._create(a),this._init(d)};var v=["width","height"],w=b(a);b.Isotope.settings={resizable:!0,layoutMode:"masonry",containerClass:"isotope",itemClass:"isotope-item",hiddenClass:"isotope-hidden",hiddenStyle:{opacity:0,scale:.001},visibleStyle:{opacity:1,scale:1},containerStyle:{position:"relative",overflow:"hidden"},animationEngine:"best-available",animationOptions:{queue:!1,duration:800},sortBy:"original-order",sortAscending:!0,resizesContainer:!0,transformsEnabled:!0,itemPositionDataEnabled:!1},b.Isotope.prototype={_create:function(a){this.options=b.extend({},b.Isotope.settings,a),this.styleQueue=[],this.elemCount=0;var c=this.element[0].style;this.originalStyle={};var d=v.slice(0);for(var e in this.options.containerStyle)d.push(e);for(var f=0,g=d.length;f<g;f++)e=d[f],this.originalStyle[e]=c[e]||"";this.element.css(this.options.containerStyle),this._updateAnimationEngine(),this._updateUsingTransforms();var h={"original-order":function(a,b){return b.elemCount++,b.elemCount},random:function(){return Math.random()}};this.options.getSortData=b.extend(this.options.getSortData,h),this.reloadItems(),this.offset={left:parseInt(this.element.css("padding-left")||0,10),top:parseInt(this.element.css("padding-top")||0,10)};var i=this;setTimeout(function(){i.element.addClass(i.options.containerClass)},0),this.options.resizable&&w.bind("smartresize.isotope",function(){i.resize()}),this.element.delegate("."+this.options.hiddenClass,"click",function(){return!1})},_getAtoms:function(a){var b=this.options.itemSelector,c=b?a.filter(b).add(a.find(b)):a,d={position:"absolute"};return c=c.filter(function(a,b){return b.nodeType===1}),this.usingTransforms&&(d.left=0,d.top=0),c.css(d).addClass(this.options.itemClass),this.updateSortData(c,!0),c},_init:function(a){this.$filteredAtoms=this._filter(this.$allAtoms),this._sort(),this.reLayout(a)},option:function(a){if(b.isPlainObject(a)){this.options=b.extend(!0,this.options,a);var c;for(var d in a)c="_update"+f(d),this[c]&&this[c]()}},_updateAnimationEngine:function(){var a=this.options.animationEngine.toLowerCase().replace(/[ _\-]/g,""),b;switch(a){case"css":case"none":b=!1;break;case"jquery":b=!0;break;default:b=!e.csstransitions}this.isUsingJQueryAnimation=b,this._updateUsingTransforms()},_updateTransformsEnabled:function(){this._updateUsingTransforms()},_updateUsingTransforms:function(){var a=this.usingTransforms=this.options.transformsEnabled&&e.csstransforms&&e.csstransitions&&!this.isUsingJQueryAnimation;a||(delete this.options.hiddenStyle.scale,delete this.options.visibleStyle.scale),this.getPositionStyles=a?this._translate:this._positionAbs},_filter:function(a){var b=this.options.filter===""?"*":this.options.filter;if(!b)return a;var c=this.options.hiddenClass,d="."+c,e=a.filter(d),f=e;if(b!=="*"){f=e.filter(b);var g=a.not(d).not(b).addClass(c);this.styleQueue.push({$el:g,style:this.options.hiddenStyle})}return this.styleQueue.push({$el:f,style:this.options.visibleStyle}),f.removeClass(c),a.filter(b)},updateSortData:function(a,c){var d=this,e=this.options.getSortData,f,g;a.each(function(){f=b(this),g={};for(var a in e)!c&&a==="original-order"?g[a]=b.data(this,"isotope-sort-data")[a]:g[a]=e[a](f,d);b.data(this,"isotope-sort-data",g)})},_sort:function(){var a=this.options.sortBy,b=this._getSorter,c=this.options.sortAscending?1:-1,d=function(d,e){var f=b(d,a),g=b(e,a);return f===g&&a!=="original-order"&&(f=b(d,"original-order"),g=b(e,"original-order")),(f>g?1:f<g?-1:0)*c};this.$filteredAtoms.sort(d)},_getSorter:function(a,c){return b.data(a,"isotope-sort-data")[c]},_translate:function(a,b){return{translate:[a,b]}},_positionAbs:function(a,b){return{left:a,top:b}},_pushPosition:function(a,b,c){b=Math.round(b+this.offset.left),c=Math.round(c+this.offset.top);var d=this.getPositionStyles(b,c);this.styleQueue.push({$el:a,style:d}),this.options.itemPositionDataEnabled&&a.data("isotope-item-position",{x:b,y:c})},layout:function(a,b){var c=this.options.layoutMode;this["_"+c+"Layout"](a);if(this.options.resizesContainer){var d=this["_"+c+"GetContainerSize"]();this.styleQueue.push({$el:this.element,style:d})}this._processStyleQueue(a,b),this.isLaidOut=!0},_processStyleQueue:function(a,c){var d=this.isLaidOut?this.isUsingJQueryAnimation?"animate":"css":"css",f=this.options.animationOptions,g=this.options.onLayout,h,i,j,k;i=function(a,b){b.$el[d](b.style,f)};if(this._isInserting&&this.isUsingJQueryAnimation)i=function(a,b){h=b.$el.hasClass("no-transition")?"css":d,b.$el[h](b.style,f)};else if(c||g||f.complete){var l=!1,m=[c,g,f.complete],n=this;j=!0,k=function(){if(l)return;var b;for(var c=0,d=m.length;c<d;c++)b=m[c],typeof b=="function"&&b.call(n.element,a,n);l=!0};if(this.isUsingJQueryAnimation&&d==="animate")f.complete=k,j=!1;else if(e.csstransitions){var o=0,p=this.styleQueue[0],s=p&&p.$el,t;while(!s||!s.length){t=this.styleQueue[o++];if(!t)return;s=t.$el}var u=parseFloat(getComputedStyle(s[0])[r]);u>0&&(i=function(a,b){b.$el[d](b.style,f).one(q,k)},j=!1)}}b.each(this.styleQueue,i),j&&k(),this.styleQueue=[]},resize:function(){this["_"+this.options.layoutMode+"ResizeChanged"]()&&this.reLayout()},reLayout:function(a){this["_"+this.options.layoutMode+"Reset"](),this.layout(this.$filteredAtoms,a)},addItems:function(a,b){var c=this._getAtoms(a);this.$allAtoms=this.$allAtoms.add(c),b&&b(c)},insert:function(a,b){this.element.append(a);var c=this;this.addItems(a,function(a){var d=c._filter(a);c._addHideAppended(d),c._sort(),c.reLayout(),c._revealAppended(d,b)})},appended:function(a,b){var c=this;this.addItems(a,function(a){c._addHideAppended(a),c.layout(a),c._revealAppended(a,b)})},_addHideAppended:function(a){this.$filteredAtoms=this.$filteredAtoms.add(a),a.addClass("no-transition"),this._isInserting=!0,this.styleQueue.push({$el:a,style:this.options.hiddenStyle})},_revealAppended:function(a,b){var c=this;setTimeout(function(){a.removeClass("no-transition"),c.styleQueue.push({$el:a,style:c.options.visibleStyle}),c._isInserting=!1,c._processStyleQueue(a,b)},10)},reloadItems:function(){this.$allAtoms=this._getAtoms(this.element.children())},remove:function(a,b){this.$allAtoms=this.$allAtoms.not(a),this.$filteredAtoms=this.$filteredAtoms.not(a);var c=this,d=function(){a.remove(),b&&b.call(c.element)};a.filter(":not(."+this.options.hiddenClass+")").length?(this.styleQueue.push({$el:a,style:this.options.hiddenStyle}),this._sort(),this.reLayout(d)):d()},shuffle:function(a){this.updateSortData(this.$allAtoms),this.options.sortBy="random",this._sort(),this.reLayout(a)},destroy:function(){var a=this.usingTransforms,b=this.options;this.$allAtoms.removeClass(b.hiddenClass+" "+b.itemClass).each(function(){var b=this.style;b.position="",b.top="",b.left="",b.opacity="",a&&(b[i]="")});var c=this.element[0].style;for(var d in this.originalStyle)c[d]=this.originalStyle[d];this.element.unbind(".isotope").undelegate("."+b.hiddenClass,"click").removeClass(b.containerClass).removeData("isotope"),w.unbind(".isotope")},_getSegments:function(a){var b=this.options.layoutMode,c=a?"rowHeight":"columnWidth",d=a?"height":"width",e=a?"rows":"cols",g=this.element[d](),h,i=this.options[b]&&this.options[b][c]||this.$filteredAtoms["outer"+f(d)](!0)||g;h=Math.floor(g/i),h=Math.max(h,1),this[b][e]=h,this[b][c]=i},_checkIfSegmentsChanged:function(a){var b=this.options.layoutMode,c=a?"rows":"cols",d=this[b][c];return this._getSegments(a),this[b][c]!==d},_masonryReset:function(){this.masonry={},this._getSegments();var a=this.masonry.cols;this.masonry.colYs=[];while(a--)this.masonry.colYs.push(0)},_masonryLayout:function(a){var c=this,d=c.masonry;a.each(function(){var a=b(this),e=Math.ceil(a.outerWidth(!0)/d.columnWidth);e=Math.min(e,d.cols);if(e===1)c._masonryPlaceBrick(a,d.colYs);else{var f=d.cols+1-e,g=[],h,i;for(i=0;i<f;i++)h=d.colYs.slice(i,i+e),g[i]=Math.max.apply(Math,h);c._masonryPlaceBrick(a,g)}})},_masonryPlaceBrick:function(a,b){var c=Math.min.apply(Math,b),d=0;for(var e=0,f=b.length;e<f;e++)if(b[e]===c){d=e;break}var g=this.masonry.columnWidth*d,h=c;this._pushPosition(a,g,h);var i=c+a.outerHeight(!0),j=this.masonry.cols+1-f;for(e=0;e<j;e++)this.masonry.colYs[d+e]=i},_masonryGetContainerSize:function(){var a=Math.max.apply(Math,this.masonry.colYs);return{height:a}},_masonryResizeChanged:function(){return this._checkIfSegmentsChanged()},_fitRowsReset:function(){this.fitRows={x:0,y:0,height:0}},_fitRowsLayout:function(a){var c=this,d=this.element.width(),e=this.fitRows;a.each(function(){var a=b(this),f=a.outerWidth(!0),g=a.outerHeight(!0);e.x!==0&&f+e.x>d&&(e.x=0,e.y=e.height),c._pushPosition(a,e.x,e.y),e.height=Math.max(e.y+g,e.height),e.x+=f})},_fitRowsGetContainerSize:function(){return{height:this.fitRows.height}},_fitRowsResizeChanged:function(){return!0},_cellsByRowReset:function(){this.cellsByRow={index:0},this._getSegments(),this._getSegments(!0)},_cellsByRowLayout:function(a){var c=this,d=this.cellsByRow;a.each(function(){var a=b(this),e=d.index%d.cols,f=Math.floor(d.index/d.cols),g=(e+.5)*d.columnWidth-a.outerWidth(!0)/2,h=(f+.5)*d.rowHeight-a.outerHeight(!0)/2;c._pushPosition(a,g,h),d.index++})},_cellsByRowGetContainerSize:function(){return{height:Math.ceil(this.$filteredAtoms.length/this.cellsByRow.cols)*this.cellsByRow.rowHeight+this.offset.top}},_cellsByRowResizeChanged:function(){return this._checkIfSegmentsChanged()},_straightDownReset:function(){this.straightDown={y:0}},_straightDownLayout:function(a){var c=this;a.each(function(a){var d=b(this);c._pushPosition(d,0,c.straightDown.y),c.straightDown.y+=d.outerHeight(!0)})},_straightDownGetContainerSize:function(){return{height:this.straightDown.y}},_straightDownResizeChanged:function(){return!0},_masonryHorizontalReset:function(){this.masonryHorizontal={},this._getSegments(!0);var a=this.masonryHorizontal.rows;this.masonryHorizontal.rowXs=[];while(a--)this.masonryHorizontal.rowXs.push(0)},_masonryHorizontalLayout:function(a){var c=this,d=c.masonryHorizontal;a.each(function(){var a=b(this),e=Math.ceil(a.outerHeight(!0)/d.rowHeight);e=Math.min(e,d.rows);if(e===1)c._masonryHorizontalPlaceBrick(a,d.rowXs);else{var f=d.rows+1-e,g=[],h,i;for(i=0;i<f;i++)h=d.rowXs.slice(i,i+e),g[i]=Math.max.apply(Math,h);c._masonryHorizontalPlaceBrick(a,g)}})},_masonryHorizontalPlaceBrick:function(a,b){var c=Math.min.apply(Math,b),d=0;for(var e=0,f=b.length;e<f;e++)if(b[e]===c){d=e;break}var g=c,h=this.masonryHorizontal.rowHeight*d;this._pushPosition(a,g,h);var i=c+a.outerWidth(!0),j=this.masonryHorizontal.rows+1-f;for(e=0;e<j;e++)this.masonryHorizontal.rowXs[d+e]=i},_masonryHorizontalGetContainerSize:function(){var a=Math.max.apply(Math,this.masonryHorizontal.rowXs);return{width:a}},_masonryHorizontalResizeChanged:function(){return this._checkIfSegmentsChanged(!0)},_fitColumnsReset:function(){this.fitColumns={x:0,y:0,width:0}},_fitColumnsLayout:function(a){var c=this,d=this.element.height(),e=this.fitColumns;a.each(function(){var a=b(this),f=a.outerWidth(!0),g=a.outerHeight(!0);e.y!==0&&g+e.y>d&&(e.x=e.width,e.y=0),c._pushPosition(a,e.x,e.y),e.width=Math.max(e.x+f,e.width),e.y+=g})},_fitColumnsGetContainerSize:function(){return{width:this.fitColumns.width}},_fitColumnsResizeChanged:function(){return!0},_cellsByColumnReset:function(){this.cellsByColumn={index:0},this._getSegments(),this._getSegments(!0)},_cellsByColumnLayout:function(a){var c=this,d=this.cellsByColumn;a.each(function(){var a=b(this),e=Math.floor(d.index/d.rows),f=d.index%d.rows,g=(e+.5)*d.columnWidth-a.outerWidth(!0)/2,h=(f+.5)*d.rowHeight-a.outerHeight(!0)/2;c._pushPosition(a,g,h),d.index++})},_cellsByColumnGetContainerSize:function(){return{width:Math.ceil(this.$filteredAtoms.length/this.cellsByColumn.rows)*this.cellsByColumn.columnWidth}},_cellsByColumnResizeChanged:function(){return this._checkIfSegmentsChanged(!0)},_straightAcrossReset:function(){this.straightAcross={x:0}},_straightAcrossLayout:function(a){var c=this;a.each(function(a){var d=b(this);c._pushPosition(d,c.straightAcross.x,0),c.straightAcross.x+=d.outerWidth(!0)})},_straightAcrossGetContainerSize:function(){return{width:this.straightAcross.x}},_straightAcrossResizeChanged:function(){return!0}},b.fn.imagesLoaded=function(a){function h(){a.call(c,d)}function i(a){var c=a.target;c.src!==f&&b.inArray(c,g)===-1&&(g.push(c),--e<=0&&(setTimeout(h),d.unbind(".imagesLoaded",i)))}var c=this,d=c.find("img").add(c.filter("img")),e=d.length,f="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///ywAAAAAAQABAAACAUwAOw==",g=[];return e||h(),d.bind("load.imagesLoaded error.imagesLoaded",i).each(function(){var a=this.src;this.src=f,this.src=a}),c};var x=function(b){a.console&&a.console.error(b)};b.fn.isotope=function(a,c){if(typeof a=="string"){var d=Array.prototype.slice.call(arguments,1);this.each(function(){var c=b.data(this,"isotope");if(!c){x("cannot call methods on isotope prior to initialization; attempted to call method '"+a+"'");return}if(!b.isFunction(c[a])||a.charAt(0)==="_"){x("no such method '"+a+"' for isotope instance");return}c[a].apply(c,d)})}else this.each(function(){var d=b.data(this,"isotope");d?(d.option(a),d._init(c)):b.data(this,"isotope",new b.Isotope(a,this,c))});return this}})(window,jQuery);
166 167 168/* 169Tipr drop 1.0 170Copyright (c) 2013 Tipue 171Tipr is released under the MIT License 172http://www.tipue.com/tipr 173*/ 174(function($){$.fn.tipr=function(options){var set=$.extend({"speed":200,"mode":"bottom"},options);return this.each(function(){var tipr_cont=".tipr_container_"+set.mode;$(this).hover(function(){var out='<div class="tipr_container_'+set.mode+'"><div class="tipr_point_'+set.mode+'"><div class="tipr_content">'+$(this).attr("data-tip")+"</div></div></div>";$(this).append(out);var w_t=$(tipr_cont).outerWidth();var w_e=$(this).width();var m_l=w_e/2-w_t/2;$(tipr_cont).css("margin-left",m_l+"px");$(this).removeAttr("title"); 175$(tipr_cont).fadeIn(set.speed)},function(){$(tipr_cont).remove()})})}})(jQuery);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.