1/* Pre-Define HTML5 Elements in IE */ 2(function(){ var els = "source|address|article|aside|audio|canvas|command|datalist|details|dialog|figure|figcaption|footer|header|hgroup|keygen|mark|meter|menu|nav|picture|progress|ruby|section|time|video".split('|'); for(var i = 0; i < els.length; i++) { document.createElement(els[i]); } } )(); 3 4 5 6 7 8/*! SmartMenus jQuery Plugin - v1.0.0-beta1 - June 1, 2015 9 * http://www.smartmenus.org/ 10 * Copyright 2015 Vasil Dinkov, Vadikom Web Ltd. http://vadikom.com; Licensed MIT */ 11 12 (function(t){function i(i){var r=".smartmenus_mouse";if(h||i)h&&i&&(t(document).unbind(r),h=!1);else{var u=!0,l=null;t(document).bind(o([["mousemove",function(i){var e={x:i.pageX,y:i.pageY,timeStamp:(new Date).getTime()};if(l){var s=Math.abs(l.x-e.x),o=Math.abs(l.y-e.y);if((s>0||o>0)&&2>=s&&2>=o&&300>=e.timeStamp-l.timeStamp&&(n=!0,u)){var r=t(i.target).closest("a");r.is("a")&&t.each(a,function(){return t.contains(this.$root[0],r[0])?(this.itemEnter({currentTarget:r[0]}),!1):void 0}),u=!1}}l=e}],[s()?"touchstart":"pointerover pointermove pointerout MSPointerOver MSPointerMove MSPointerOut",function(t){e(t.originalEvent)&&(n=!1)}]],r)),h=!0}}function e(t){return!/^(4|mouse)$/.test(t.pointerType)}function s(){return"ontouchstart"in window}function o(i,e){e||(e="");var s={};return t.each(i,function(t,i){s[i[0].split(" ").join(e+" ")+e]=i[1]}),s}var a=[],r=!!window.createPopup,n=!1,h=!1;t.SmartMenus=function(i,e){this.$root=t(i),this.opts=e,this.rootId="",this.accessIdPrefix="",this.$subArrow=null,this.activatedItems=[],this.visibleSubMenus=[],this.showTimeout=0,this.hideTimeout=0,this.scrollTimeout=0,this.clickActivated=!1,this.focusActivated=!1,this.zIndexInc=0,this.idInc=0,this.$firstLink=null,this.$firstSub=null,this.disabled=!1,this.$disableOverlay=null,this.isTouchScrolling=!1,this.wasCollapsible=!1,this.init()},t.extend(t.SmartMenus,{hideAll:function(){t.each(a,function(){this.menuHideAll()})},destroy:function(){for(;a.length;)a[0].destroy();i(!0)},prototype:{init:function(e){var s=this;if(!e){a.push(this),this.rootId=((new Date).getTime()+Math.random()+"").replace(/\D/g,""),this.accessIdPrefix="sm-"+this.rootId+"-",this.$root.hasClass("sm-rtl")&&(this.opts.rightToLeftSubMenus=!0);var r=".smartmenus";this.$root.data("smartmenus",this).attr("data-smartmenus-id",this.rootId).dataSM("level",1).bind(o([["mouseover focusin",t.proxy(this.rootOver,this)],["mouseout focusout",t.proxy(this.rootOut,this)],["keydown",t.proxy(this.rootKeyDown,this)]],r)).delegate("a",o([["mouseenter",t.proxy(this.itemEnter,this)],["mouseleave",t.proxy(this.itemLeave,this)],["mousedown",t.proxy(this.itemDown,this)],["focus",t.proxy(this.itemFocus,this)],["blur",t.proxy(this.itemBlur,this)],["click",t.proxy(this.itemClick,this)],["touchend",t.proxy(this.itemTouchEnd,this)]],r)),r+=this.rootId,this.opts.hideOnClick&&t(document).bind(o([["touchstart",t.proxy(this.docTouchStart,this)],["touchmove",t.proxy(this.docTouchMove,this)],["touchend",t.proxy(this.docTouchEnd,this)],["click",t.proxy(this.docClick,this)]],r)),t(window).bind(o([["resize orientationchange",t.proxy(this.winResize,this)]],r)),this.opts.subIndicators&&(this.$subArrow=t("<span/>").addClass("sub-arrow"),this.opts.subIndicatorsText&&this.$subArrow.html(this.opts.subIndicatorsText)),i()}if(this.$firstSub=this.$root.find("ul").each(function(){s.menuInit(t(this))}).eq(0),this.$firstLink=this.$root.find("a").eq(0),this.opts.markCurrentItem){var n=/(index|default)\.[^#\?\/]*/i,h=/#.*/,u=window.location.href.replace(n,""),l=u.replace(h,"");this.$root.find("a").each(function(){var i=this.href.replace(n,""),e=t(this);(i==u||i==l)&&(e.addClass("current"),s.opts.markCurrentTree&&e.parentsUntil("[data-smartmenus-id]","ul").each(function(){t(this).dataSM("parent-a").addClass("current")}))})}this.wasCollapsible=this.isCollapsible()},destroy:function(i){if(!i){var e=".smartmenus";this.$root.removeData("smartmenus").removeAttr("data-smartmenus-id").removeDataSM("level").unbind(e).undelegate(e),e+=this.rootId,t(document).unbind(e),t(window).unbind(e),this.opts.subIndicators&&(this.$subArrow=null)}this.menuHideAll();var s=this;this.$root.find("ul").each(function(){var i=t(this);i.dataSM("scroll-arrows")&&i.dataSM("scroll-arrows").remove(),i.dataSM("shown-before")&&((s.opts.subMenusMinWidth||s.opts.subMenusMaxWidth)&&i.css({width:"",minWidth:"",maxWidth:""}).removeClass("sm-nowrap"),i.dataSM("scroll-arrows")&&i.dataSM("scroll-arrows").remove(),i.css({zIndex:"",top:"",left:"",marginLeft:"",marginTop:"",display:""})),0==i.attr("id").indexOf(s.accessIdPrefix)&&i.removeAttr("id")}).removeDataSM("in-mega").removeDataSM("shown-before").removeDataSM("ie-shim").removeDataSM("scroll-arrows").removeDataSM("parent-a").removeDataSM("level").removeDataSM("beforefirstshowfired").removeAttr("role").removeAttr("aria-hidden").removeAttr("aria-labelledby").removeAttr("aria-expanded"),this.$root.find("a.has-submenu").each(function(){var i=t(this);0==i.attr("id").indexOf(s.accessIdPrefix)&&i.removeAttr("id")}).removeClass("has-submenu").removeDataSM("sub").removeAttr("aria-haspopup").removeAttr("aria-controls").removeAttr("aria-expanded").closest("li").removeDataSM("sub"),this.opts.subIndicators&&this.$root.find("span.sub-arrow").remove(),this.opts.markCurrentItem&&this.$root.find("a.current").removeClass("current"),i||(this.$root=null,this.$firstLink=null,this.$firstSub=null,this.$disableOverlay&&(this.$disableOverlay.remove(),this.$disableOverlay=null),a.splice(t.inArray(this,a),1))},disable:function(i){if(!this.disabled){if(this.menuHideAll(),!i&&!this.opts.isPopup&&this.$root.is(":visible")){var e=this.$root.offset();this.$disableOverlay=t('<div class="sm-jquery-disable-overlay"/>
12').css({position:"absolute",top:e.top,left:e.left,width:this.$root.outerWidth(),height:this.$root.outerHeight(),zIndex:this.getStartZIndex(!0),opacity:0}).appendTo(document.body)}this.disabled=!0}},docClick:function(i){return this.isTouchScrolling?(this.isTouchScrolling=!1,void 0):((this.visibleSubMenus.length&&!t.contains(this.$root[0],i.target)||t(i.target).is("a"))&&this.menuHideAll(),void 0)},docTouchEnd:function(){if(this.lastTouch){if(!(!this.visibleSubMenus.length||void 0!==this.lastTouch.x2&&this.lastTouch.x1!=this.lastTouch.x2||void 0!==this.lastTouch.y2&&this.lastTouch.y1!=this.lastTouch.y2||this.lastTouch.target&&t.contains(this.$root[0],this.lastTouch.target))){this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=0);var i=this;this.hideTimeout=setTimeout(function(){i.menuHideAll()},350)}this.lastTouch=null}},docTouchMove:function(t){if(this.lastTouch){var i=t.originalEvent.touches[0];this.lastTouch.x2=i.pageX,this.lastTouch.y2=i.pageY}},docTouchStart:function(t){var i=t.originalEvent.touches[0];this.lastTouch={x1:i.pageX,y1:i.pageY,target:i.target}},enable:function(){this.disabled&&(this.$disableOverlay&&(this.$disableOverlay.remove(),this.$disableOverlay=null),this.disabled=!1)},getClosestMenu:function(i){for(var e=t(i).closest("ul");e.dataSM("in-mega");)e=e.parent().closest("ul");return e[0]||null},getHeight:function(t){return this.getOffset(t,!0)},getOffset:function(t,i){var e;"none"==t.css("display")&&(e={position:t[0].style.position,visibility:t[0].style.visibility},t.css({position:"absolute",visibility:"hidden"}).show());var s=t[0].getBoundingClientRect&&t[0].getBoundingClientRect(),o=s&&(i?s.height||s.bottom-s.top:s.width||s.right-s.left);return o||0===o||(o=i?t[0].offsetHeight:t[0].offsetWidth),e&&t.hide().css(e),o},getStartZIndex:function(t){var i=parseInt(this[t?"$root":"$firstSub"].css("z-index"));return!t&&isNaN(i)&&(i=parseInt(this.$root.css("z-index"))),isNaN(i)?1:i},getTouchPoint:function(t){return t.touches&&t.touches[0]||t.changedTouches&&t.changedTouches[0]||t},getViewport:function(t){var i=t?"Height":"Width",e=document.documentElement["client"+i],s=window["inner"+i];return s&&(e=Math.min(e,s)),e},getViewportHeight:function(){return this.getViewport(!0)},getViewportWidth:function(){return this.getViewport()},getWidth:function(t){return this.getOffset(t)},handleEvents:function(){return!this.disabled&&this.isCSSOn()},handleItemEvents:function(t){return this.handleEvents()&&!this.isLinkInMegaMenu(t)},isCollapsible:function(){return"static"==this.$firstSub.css("position")},isCSSOn:function(){return"block"==this.$firstLink.css("display")},isFixed:function(){var i="fixed"==this.$root.css("position");return i||this.$root.parentsUntil("body").each(function(){return"fixed"==t(this).css("position")?(i=!0,!1):void 0}),i},isLinkInMegaMenu:function(i){return t(this.getClosestMenu(i[0])).hasClass("mega-menu")},isTouchMode:function(){return!n||this.isCollapsible()},itemActivate:function(i,e){var s=i.closest("ul"),o=s.dataSM("level");if(o>1&&(!this.activatedItems[o-2]||this.activatedItems[o-2][0]!=s.dataSM("parent-a")[0])){var a=this;t(s.parentsUntil("[data-smartmenus-id]","ul").get().reverse()).add(s).each(function(){a.itemActivate(t(this).dataSM("parent-a"))})}if((!this.isCollapsible()||e)&&this.menuHideSubMenus(this.activatedItems[o-1]&&this.activatedItems[o-1][0]==i[0]?o:o-1),this.activatedItems[o-1]=i,this.$root.triggerHandler("activate.smapi",i[0])!==!1){var r=i.dataSM("sub");r&&(this.isTouchMode()||!this.opts.showOnClick||this.clickActivated)&&this.menuShow(r)}},itemBlur:function(i){var e=t(i.currentTarget);this.handleItemEvents(e)&&this.$root.triggerHandler("blur.smapi",e[0])},itemClick:function(i){if(this.isTouchScrolling)return this.isTouchScrolling=!1,i.stopPropagation(),!1;var e=t(i.currentTarget);if(this.handleItemEvents(e)){if(this.$root.triggerHandler("click.smapi",e[0])===!1)return!1;e.dataSM("href")&&e.attr("href",e.dataSM("href")).removeDataSM("href");var s=t(i.target).is("span.sub-arrow"),o=e.dataSM("sub");if(o&&!o.is(":visible")){if(this.itemActivate(e),o.is(":visible"))return this.focusActivated=!0,!1}else if(this.isCollapsible()&&s)return this.itemActivate(e),this.menuHide(o),!1;return this.opts.showOnClick&&o&&2==o.dataSM("level")?(this.clickActivated=!0,this.menuShow(o),!1):e.hasClass("disabled")?!1:this.$root.triggerHandler("select.smapi",e[0])===!1?!1:void 0}},itemDown:function(i){var e=t(i.currentTarget);this.handleItemEvents(e)&&e.dataSM("mousedown",!0)},itemEnter:function(i){var e=t(i.currentTarget);if(this.handleItemEvents(e)){if(!this.isTouchMode()){this.showTimeout&&(clearTimeout(this.showTimeout),this.showTimeout=0);var s=this;this.showTimeout=setTimeout(function(){s.itemActivate(e)},this.opts.showOnClick&&1==e.closest("ul").dataSM("level")?1:this.opts.showTimeout)}this.$root.triggerHandler("mouseenter.smapi",e[0])}},itemFocus:function(i){var e=t(i.currentTarget);this.handleItemEvents(e)&&(!this.focusActivated||this.isTouchMode()&&e.dataSM("mousedown")||this.activatedItems.length&&this.activatedItems[this.activatedItems.length-1][0]==e[0]||this.itemActivate(e,!0),this.$root.triggerHandler("focus.smapi",e[0]))},itemLeave:function(i){var e=t(i.currentTarget);this.handleItemEvents(e)&&(this.isTouchMode()||this.showTimeout&&(clearTimeout(this.showTimeout),this.showTimeout=0),e.removeDataSM("mousedown"),this.$root.triggerHandler("mouseleave.
12smapi",e[0]))},itemTouchEnd:function(i){var e=t(i.currentTarget);if(this.handleItemEvents(e)){var s=e.dataSM("sub");"#"!==e.attr("href").charAt(0)&&s&&!s.is(":visible")&&e.dataSM("href",e.attr("href")).attr("href","#")}},menuHide:function(i){if(this.$root.triggerHandler("beforehide.smapi",i[0])!==!1&&(i.stop(!0,!0),"none"!=i.css("display"))){var e=function(){i.css("z-index","")};this.isCollapsible()?this.opts.collapsibleHideFunction?this.opts.collapsibleHideFunction.call(this,i,e):i.hide(this.opts.collapsibleHideDuration,e):this.opts.hideFunction?this.opts.hideFunction.call(this,i,e):i.hide(this.opts.hideDuration,e),i.dataSM("ie-shim")&&i.dataSM("ie-shim").remove(),i.dataSM("scroll")&&(this.menuScrollStop(i),i.css({"touch-action":"","-ms-touch-action":""}).unbind(".smartmenus_scroll").removeDataSM("scroll").dataSM("scroll-arrows").hide()),i.dataSM("parent-a").removeClass("highlighted").attr("aria-expanded","false"),i.attr({"aria-expanded":"false","aria-hidden":"true"});var s=i.dataSM("level");this.activatedItems.splice(s-1,1),this.visibleSubMenus.splice(t.inArray(i,this.visibleSubMenus),1),this.$root.triggerHandler("hide.smapi",i[0])}},menuHideAll:function(){this.showTimeout&&(clearTimeout(this.showTimeout),this.showTimeout=0);for(var t=this.opts.isPopup?1:0,i=this.visibleSubMenus.length-1;i>=t;i--)this.menuHide(this.visibleSubMenus[i]);this.opts.isPopup&&(this.$root.stop(!0,!0),this.$root.is(":visible")&&(this.opts.hideFunction?this.opts.hideFunction.call(this,this.$root):this.$root.hide(this.opts.hideDuration),this.$root.dataSM("ie-shim")&&this.$root.dataSM("ie-shim").remove())),this.activatedItems=[],this.visibleSubMenus=[],this.clickActivated=!1,this.focusActivated=!1,this.zIndexInc=0},menuHideSubMenus:function(t){for(var i=this.activatedItems.length-1;i>=t;i--){var e=this.activatedItems[i].dataSM("sub");e&&this.menuHide(e)}},menuIframeShim:function(i){r&&this.opts.overlapControlsInIE&&!i.dataSM("ie-shim")&&i.dataSM("ie-shim",t("<iframe/>").attr({src:"javascript:0",tabindex:-9}).css({position:"absolute",top:"auto",left:"0",opacity:0,border:"0"}))},menuInit:function(t){if(!t.dataSM("in-mega")){t.hasClass("mega-menu")&&t.find("ul").dataSM("in-mega",!0);for(var i=2,e=t[0];(e=e.parentNode.parentNode)!=this.$root[0];)i++;var s=t.prevAll("a").eq(-1);s.length||(s=t.prevAll().find("a").eq(-1)),s.addClass("has-submenu").dataSM("sub",t),t.dataSM("parent-a",s).dataSM("level",i).parent().dataSM("sub",t);var o=s.attr("id")||this.accessIdPrefix+ ++this.idInc,a=t.attr("id")||this.accessIdPrefix+ ++this.idInc;s.attr({id:o,"aria-haspopup":"true","aria-controls":a,"aria-expanded":"false"}),t.attr({id:a,role:"group","aria-hidden":"true","aria-labelledby":o,"aria-expanded":"false"}),this.opts.subIndicators&&s[this.opts.subIndicatorsPos](this.$subArrow.clone())}},menuPosition:function(i){var e,a,r=i.dataSM("parent-a"),n=r.closest("li"),h=n.parent(),u=i.dataSM("level"),l=this.getWidth(i),c=this.getHeight(i),d=r.offset(),m=d.left,p=d.top,f=this.getWidth(r),v=this.getHeight(r),b=t(window),S=b.scrollLeft(),g=b.scrollTop(),M=this.getViewportWidth(),w=this.getViewportHeight(),T=h.hasClass("sm")&&!h.hasClass("sm-vertical"),I=this.opts.rightToLeftSubMenus&&!n.is("[data-sm-reverse]")||!this.opts.rightToLeftSubMenus&&n.is("[data-sm-reverse]"),$=2==u?this.opts.mainMenuSubOffsetX:this.opts.subMenusSubOffsetX,x=2==u?this.opts.mainMenuSubOffsetY:this.opts.subMenusSubOffsetY;if(T?(e=I?f-l-$:$,a=this.opts.bottomToTopSubMenus?-c-x:v+x):(e=I?$-l:f-$,a=this.opts.bottomToTopSubMenus?v-x-c:x),this.opts.keepInViewport){var y=m+e,C=p+a;if(I&&S>y?e=T?S-y+e:f-$:!I&&y+l>S+M&&(e=T?S+M-l-y+e:$-l),T||(w>c&&C+c>g+w?a+=g+w-c-C:(c>=w||g>C)&&(a+=g-C)),T&&(C+c>g+w+.49||g>C)||!T&&c>w+.49){var H=this;i.dataSM("scroll-arrows")||i.dataSM("scroll-arrows",t([t('<span class="scroll-up"><span class="scroll-up-arrow"></span></span>')[0],t('<span class="scroll-down"><span class="scroll-down-arrow"></span></span>')[0]]).bind({mouseenter:function(){i.dataSM("scroll").up=t(this).hasClass("scroll-up"),H.menuScroll(i)},mouseleave:function(t){H.menuScrollStop(i),H.menuScrollOut(i,t)},"mousewheel DOMMouseScroll":function(t){t.preventDefault()}}).insertAfter(i));var A=".smartmenus_scroll";i.dataSM("scroll",{step:1,itemH:v,subH:c,arrowDownH:this.getHeight(i.dataSM("scroll-arrows").eq(1))}).bind(o([["mouseover",function(t){H.menuScrollOver(i,t)}],["mouseout",function(t){H.menuScrollOut(i,t)}],["mousewheel DOMMouseScroll",function(t){H.menuScrollMousewheel(i,t)}]],A)).dataSM("scroll-arrows").css({top:"auto",left:"0",marginLeft:e+(parseInt(i.css("border-left-width"))||0),width:l-(parseInt(i.css("border-left-width"))||0)-(parseInt(i.css("border-right-width"))||0),zIndex:i.css("z-index")}).eq(T&&this.opts.bottomToTopSubMenus?0:1).show(),this.isFixed()&&i.css({"touch-action":"none","-ms-touch-action":"none"}).bind(o([[s()?"touchstart touchmove touchend":"pointerdown pointermove pointerup MSPointerDown MSPointerMove MSPointerUp",function(t){H.menuScrollTouch(i,t)}]],A))}}i.css({top:"auto",left:"0",marginLeft:e,marginTop:a-v}),this.menuIframeShim(i),i.dataSM("ie-shim")&&i.dataSM("ie-shim").css({zIndex:i.css("z-index"),width:l,height:c,marginLeft:e,marginTop:a-v})},menuScroll:function(t,i,e){var s,o=t.dataSM("scroll"),a=t.dataSM("scroll-arrows"),r=parseFloat(t.css("margin-top")),h=o.up?o.upEnd:o.downEnd;
12if(!i&&o.velocity){if(o.velocity*=.9,s=o.velocity,.5>s)return this.menuScrollStop(t),void 0}else s=e||(i||!this.opts.scrollAccelerate?this.opts.scrollStep:Math.floor(o.step));var u=t.dataSM("level");this.activatedItems[u-1]&&this.activatedItems[u-1].dataSM("sub")&&this.activatedItems[u-1].dataSM("sub").is(":visible")&&this.menuHideSubMenus(u-1);var l=o.up&&r>=h||!o.up&&h>=r?r:Math.abs(h-r)>s?r+(o.up?s:-s):h;if(t.add(t.dataSM("ie-shim")).css("margin-top",l),n&&(o.up&&l>o.downEnd||!o.up&&o.upEnd>l)&&a.eq(o.up?1:0).show(),l==h)n&&a.eq(o.up?0:1).hide(),this.menuScrollStop(t);else if(!i){this.opts.scrollAccelerate&&o.step<this.opts.scrollStep&&(o.step+=.5);var c=this;this.scrollTimeout=setTimeout(function(){c.menuScroll(t)},this.opts.scrollInterval)}},menuScrollMousewheel:function(t,i){if(this.getClosestMenu(i.target)==t[0]){i=i.originalEvent;var e=(i.wheelDelta||-i.detail)>0;t.dataSM("scroll-arrows").eq(e?0:1).is(":visible")&&(t.dataSM("scroll").up=e,this.menuScroll(t,!0))}i.preventDefault()},menuScrollOut:function(i,e){n&&(/^scroll-(up|down)/.test((e.relatedTarget||"").className)||(i[0]==e.relatedTarget||t.contains(i[0],e.relatedTarget))&&this.getClosestMenu(e.relatedTarget)==i[0]||i.dataSM("scroll-arrows").css("visibility","hidden"))},menuScrollOver:function(t,i){if(n&&!/^scroll-(up|down)/.test(i.target.className)&&this.getClosestMenu(i.target)==t[0]){this.menuScrollRefreshData(t);var e=t.dataSM("scroll");t.dataSM("scroll-arrows").eq(0).css("margin-top",e.upEnd).end().eq(1).css("margin-top",e.downEnd+e.subH-e.arrowDownH).end().css("visibility","visible")}},menuScrollRefreshData:function(i){var e=i.dataSM("scroll"),s=t(window),o=s.scrollTop()-i.dataSM("parent-a").offset().top-e.itemH;t.extend(e,{upEnd:o,downEnd:o+this.getViewportHeight()-e.subH})},menuScrollStop:function(i){return this.scrollTimeout?(clearTimeout(this.scrollTimeout),this.scrollTimeout=0,t.extend(i.dataSM("scroll"),{step:1,velocity:0}),!0):void 0},menuScrollTouch:function(i,s){if(s=s.originalEvent,e(s)){var o=this.getTouchPoint(s);if(this.getClosestMenu(o.target)==i[0]){var a=i.dataSM("scroll");if(/(start|down)$/i.test(s.type))this.menuScrollStop(i)?(s.preventDefault(),this.isTouchScrolling=!0):this.isTouchScrolling=!1,this.menuScrollRefreshData(i),t.extend(a,{touchY:o.pageY,touchTimestamp:s.timeStamp,velocity:0});else if(/move$/i.test(s.type)){var r=a.touchY;void 0!==r&&r!=o.pageY&&(this.isTouchScrolling=!0,t.extend(a,{up:o.pageY>r,touchY:o.pageY,touchTimestamp:s.timeStamp,velocity:a.velocity+.5*Math.abs(o.pageY-r)}),this.menuScroll(i,!0,Math.abs(a.touchY-r))),s.preventDefault()}else void 0!==a.touchY&&(120>s.timeStamp-a.touchTimestamp&&a.velocity>0&&(a.velocity*=.5,this.menuScrollStop(i),this.menuScroll(i),s.preventDefault()),delete a.touchY)}}},menuShow:function(t){if((t.dataSM("beforefirstshowfired")||(t.dataSM("beforefirstshowfired",!0),this.$root.triggerHandler("beforefirstshow.smapi",t[0])!==!1))&&this.$root.triggerHandler("beforeshow.smapi",t[0])!==!1&&(t.dataSM("shown-before",!0).stop(!0,!0),!t.is(":visible"))){var i=t.dataSM("parent-a");if((this.opts.keepHighlighted||this.isCollapsible())&&i.addClass("highlighted"),this.isCollapsible())t.removeClass("sm-nowrap").css({zIndex:"",width:"auto",minWidth:"",maxWidth:"",top:"",left:"",marginLeft:"",marginTop:""});else{if(t.css("z-index",this.zIndexInc=(this.zIndexInc||this.getStartZIndex())+1),(this.opts.subMenusMinWidth||this.opts.subMenusMaxWidth)&&(t.css({width:"auto",minWidth:"",maxWidth:""}).addClass("sm-nowrap"),this.opts.subMenusMinWidth&&t.css("min-width",this.opts.subMenusMinWidth),this.opts.subMenusMaxWidth)){var e=this.getWidth(t);t.css("max-width",this.opts.subMenusMaxWidth),e>this.getWidth(t)&&t.removeClass("sm-nowrap").css("width",this.opts.subMenusMaxWidth)}this.menuPosition(t),t.dataSM("ie-shim")&&t.dataSM("ie-shim").insertBefore(t)}var s=function(){t.css("overflow","")};this.isCollapsible()?this.opts.collapsibleShowFunction?this.opts.collapsibleShowFunction.call(this,t,s):t.show(this.opts.collapsibleShowDuration,s):this.opts.showFunction?this.opts.showFunction.call(this,t,s):t.show(this.opts.showDuration,s),i.attr("aria-expanded","true"),t.attr({"aria-expanded":"true","aria-hidden":"false"}),this.visibleSubMenus.push(t),this.$root.triggerHandler("show.smapi",t[0])}},popupHide:function(t){this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=0);var i=this;this.hideTimeout=setTimeout(function(){i.menuHideAll()},t?1:this.opts.hideTimeout)},popupShow:function(t,i){if(!this.opts.isPopup)return alert('SmartMenus jQuery Error:\n\nIf you want to show this menu via the "popupShow" method, set the isPopup:true option.'),void 0;if(this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=0),this.$root.dataSM("shown-before",!0).stop(!0,!0),!this.$root.is(":visible")){this.$root.css({left:t,top:i}
12),this.menuIframeShim(this.$root),this.$root.dataSM("ie-shim")&&this.$root.dataSM("ie-shim").css({zIndex:this.$root.css("z-index"),width:this.getWidth(this.$root),height:this.getHeight(this.$root),left:t,top:i}).insertBefore(this.$root);var e=this,s=function(){e.$root.css("overflow","")};this.opts.showFunction?this.opts.showFunction.call(this,this.$root,s):this.$root.show(this.opts.showDuration,s),this.visibleSubMenus[0]=this.$root}},refresh:function(){this.destroy(!0),this.init(!0)},rootKeyDown:function(i){if(this.handleEvents())switch(i.keyCode){case 27:var e=this.activatedItems[0];if(e){this.menuHideAll(),e[0].focus();var s=e.dataSM("sub");s&&this.menuHide(s)}break;case 32:var o=t(i.target);if(o.is("a")&&this.handleItemEvents(o)){var s=o.dataSM("sub");s&&!s.is(":visible")&&(this.itemClick({currentTarget:i.target}),i.preventDefault())}}},rootOut:function(t){if(this.handleEvents()&&!this.isTouchMode()&&t.target!=this.$root[0]&&(this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=0),!this.opts.showOnClick||!this.opts.hideOnClick)){var i=this;this.hideTimeout=setTimeout(function(){i.menuHideAll()},this.opts.hideTimeout)}},rootOver:function(t){this.handleEvents()&&!this.isTouchMode()&&t.target!=this.$root[0]&&this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=0)},winResize:function(t){if(this.handleEvents()){if(!("onorientationchange"in window)||"orientationchange"==t.type){var i=this.isCollapsible();this.wasCollapsible&&i||(this.activatedItems.length&&this.activatedItems[this.activatedItems.length-1][0].blur(),this.menuHideAll()),this.wasCollapsible=i}}else if(this.$disableOverlay){var e=this.$root.offset();this.$disableOverlay.css({top:e.top,left:e.left,width:this.$root.outerWidth(),height:this.$root.outerHeight()})}}}}),t.fn.dataSM=function(t,i){return i?this.data(t+"_smartmenus",i):this.data(t+"_smartmenus")},t.fn.removeDataSM=function(t){return this.removeData(t+"_smartmenus")},t.fn.smartmenus=function(i){if("string"==typeof i){var e=arguments,s=i;return Array.prototype.shift.call(e),this.each(function(){var i=t(this).data("smartmenus");i&&i[s]&&i[s].apply(i,e)})}var o=t.extend({},t.fn.smartmenus.defaults,i);return this.each(function(){new t.SmartMenus(this,o)})},t.fn.smartmenus.defaults={isPopup:!1,mainMenuSubOffsetX:0,mainMenuSubOffsetY:0,subMenusSubOffsetX:0,subMenusSubOffsetY:0,subMenusMinWidth:"10em",subMenusMaxWidth:"20em",subIndicators:!0,subIndicatorsPos:"prepend",subIndicatorsText:"+",scrollStep:30,scrollInterval:30,scrollAccelerate:!0,showTimeout:250,hideTimeout:500,showDuration:0,showFunction:null,hideDuration:0,hideFunction:function(t,i){t.fadeOut(200,i)},collapsibleShowDuration:0,collapsibleShowFunction:function(t,i){t.slideDown(200,i)},collapsibleHideDuration:0,collapsibleHideFunction:function(t,i){t.slideUp(200,i)},showOnClick:!1,hideOnClick:!0,keepInViewport:!0,keepHighlighted:!0,markCurrentItem:!1,markCurrentTree:!0,rightToLeftSubMenus:!1,bottomToTopSubMenus:!1,overlapControlsInIE:!0}})(jQuery); 13 14 15 16/*! SmartMenus jQuery Plugin Keyboard Addon - v0.2.0 - June 1, 2015 17 * http://www.smartmenus.org/ 18 * Copyright 2015 Vasil Dinkov, Vadikom Web Ltd. http://vadikom.com; Licensed MIT */ 19 20 (function(t){function e(t){return t.find("> li > a:not(.disabled), > li > :not(ul) a:not(.disabled)").eq(0)}function s(t){return t.find("> li > a:not(.disabled), > li > :not(ul) a:not(.disabled)").eq(-1)}function i(t,s){var i=t.nextAll("li").find("> a:not(.disabled), > :not(ul) a:not(.disabled)").eq(0);return s||i.length?i:e(t.parent())}function a(e,i){var a=e.prevAll("li").find("> a:not(.disabled), > :not(ul) a:not(.disabled)").eq(/^1\.8\./.test(t.fn.jquery)?0:-1);return i||a.length?a:s(e.parent())}t.fn.focusSM=function(){return this.length&&this[0].focus&&this[0].focus(),this},t.extend(t.SmartMenus.Keyboard={},{docKeydown:function(o){var n=o.keyCode;if(/^(37|38|39|40)$/.test(n)){var r=t(this),h=r.data("smartmenus"),u=t(o.target);if(h&&u.is("a")&&h.handleItemEvents(u)){var l=u.closest("li"),d=l.parent(),c=d.dataSM("level");switch(r.hasClass("sm-rtl")&&(37==n?n=39:39==n&&(n=37)),n){case 37:if(h.isCollapsible())break;c>2||2==c&&r.hasClass("sm-vertical")?h.activatedItems[c-2].focusSM():r.hasClass("sm-vertical")||a((h.activatedItems[0]||u).closest("li")).focusSM();break;case 38:if(h.isCollapsible()){var m;c>1&&(m=e(d)).length&&u[0]==m[0]?h.activatedItems[c-2].focusSM():a(l).focusSM()}else 1==c&&!r.hasClass("sm-vertical")&&h.opts.bottomToTopSubMenus?(!h.activatedItems[0]&&u.dataSM("sub")&&(h.itemActivate(u),u.dataSM("sub").is(":visible")&&(h.focusActivated=!0)),h.activatedItems[0]&&h.activatedItems[0].dataSM("sub")&&h.activatedItems[0].dataSM("sub").is(":visible")&&!h.activatedItems[0].dataSM("sub").hasClass("mega-menu")&&s(h.activatedItems[0].dataSM("sub")).focusSM()):(c>1||r.hasClass("sm-vertical"))&&a(l).focusSM();break;case 39:if(h.isCollapsible())break;1==c&&r.hasClass("sm-vertical")?(!h.activatedItems[0]&&u.dataSM("sub")&&(h.itemActivate(u),u.dataSM("sub").is(":visible")&&(h.focusActivated=!0)),h.activatedItems[0]&&h.activatedItems[0].dataSM("sub")&&h.activatedItems[0].dataSM("sub").is(":visible")&&!h.activatedItems[0].dataSM("sub").hasClass("mega-menu")&&e(h.activatedItems[0].dataSM("sub")).focusSM()):1!=c&&(!h.activatedItems[c-1]||h.activatedItems[c-1].dataSM("sub")&&h.activatedItems[c-1].dataSM("sub").is(":visible")&&!h.activatedItems[c-1].dataSM("sub").hasClass("mega-menu"))||r.hasClass("sm-vertical")?h.activatedItems[c-1]&&h.activatedItems[c-1].dataSM("sub")&&h.activatedItems[c-1].dataSM("sub").is(":visible")&&!h.activatedItems[c-1].dataSM("sub").hasClass("mega-menu")&&e(h.activatedItems[c-1].dataSM("sub")).focusSM():i((h.activatedItems[0]||u).closest("li")).focusSM();break;case 40:if(h.isCollapsible()){var p,f;if(h.activatedItems[c-1]&&h.activatedItems[c-1].dataSM("sub")&&h.activatedItems[c-1].dataSM("sub").is(":visible")&&!h.activatedItems[c-1].dataSM("sub").hasClass("mega-menu")&&(p=e(h.activatedItems[c-1].dataSM("sub"))).length)p.focusSM();else if(c>1&&(f=s(d)).length&&u[0]==f[0]){for(var v=h.activatedItems[c-2].closest("li"),b=null;v.is("li")&&!(b=i(v,!0)).length;)v=v.parent().parent();b.length?b.focusSM():e(r).focusSM()}else i(l).focusSM()}else 1!=c||r.hasClass("sm-vertical")||h.opts.bottomToTopSubMenus?(c>1||r.hasClass("sm-vertical"))&&i(l).focusSM():(!h.activatedItems[0]&&u.dataSM("sub")&&(h.itemActivate(u),u.dataSM("sub").is(":visible")&&(h.focusActivated=!0)),h.activatedItems[0]&&h.activatedItems[0].dataSM("sub")&&h.activatedItems[0].dataSM("sub").is(":visible")&&!h.activatedItems[0].dataSM("sub").hasClass("mega-menu")&&e(h.activatedItems[0].dataSM("sub")).focusSM())}o.stopPropagation(),o.preventDefault()}}}}),t(document).delegate("ul.sm","keydown.smartmenus",t.SmartMenus.Keyboard.docKeydown),t.extend(t.SmartMenus.prototype,{keyboardSetHotkey:function(s,i){var a=this;t(document).bind("keydown.smartmenus"+this.rootId,function(o){if
20(s==o.keyCode){var n=!0;i&&("string"==typeof i&&(i=[i]),t.each(["ctrlKey","shiftKey","altKey","metaKey"],function(e,s){return t.inArray(s,i)>=0&&!o[s]||0>t.inArray(s,i)&&o[s]?(n=!1,!1):void 0})),n&&(e(a.$root).focusSM(),o.stopPropagation(),o.preventDefault())}})}})})(jQuery); 21 22 23 24 25/* BROWSER DETECT */ 26var BrowserDetect = { 27 init: function() { 28 this.browser = this.searchString(this.dataBrowser) || "An unknown browser"; 29 this.version = this.searchVersion(navigator.userAgent) || this.searchVersion(navigator.appVersion) || "an unknown version"; 30 this.OS = this.searchString(this.dataOS) || "an unknown OS"; 31 }, 32 searchString: function(data) { 33 for (var i = 0; i < data.length; i++) { 34 var dataString = data[i].string; 35 var dataProp = data[i].prop; 36 this.versionSearchString = data[i].versionSearch || data[i].identity; 37 if (dataString) { 38 if (dataString.indexOf(data[i].subString) != -1) { 39 return data[i].identity; 40 } 41 } else { 42 if (dataProp) { 43 return data[i].identity; 44 } 45 } 46 } 47 }, 48 searchVersion: function(dataString) { 49 var index = dataString.indexOf(this.versionSearchString); 50 if (index == -1) { 51 return; 52 } 53 return parseFloat(dataString.substring(index + this.versionSearchString.length + 1)); 54 }, 55 dataBrowser: [{ 56 string: navigator.userAgent, 57 subString: "Chrome", 58 identity: "Chrome" 59 }, {
60 string: navigator.vendor, 61 subString: "Apple", 62 identity: "Safari", 63 versionSearch: "Version" 64 }, { 65 prop: window.opera, 66 identity: "Opera" 67 }, { 68 string: navigator.vendor, 69 subString: "KDE", 70 identity: "Konqueror" 71 }, { 72 string: navigator.userAgent, 73 subString: "Firefox", 74 identity: "Firefox" 75 }, { 76 string: navigator.userAgent, 77 subString: "MSIE", 78 identity: "Explorer", 79 versionSearch: "MSIE" 80 }, ], 81 dataOS: [{ 82 string: navigator.platform, 83 subString: "Win", 84 identity: "Windows" 85 }, { 86 string: navigator.platform, 87 subString: "Mac", 88 identity: "Mac" 89 }, { 90 string: navigator.userAgent, 91 subString: "iPhone", 92 identity: "iPhone/iPod" 93 }, { 94 string: navigator.platform, 95 subString: "Linux", 96 identity: "Linux" 97 }] 98 99}; 100BrowserDetect.init(); 101 102 103 104//! moment.js 105//! version : 2.10.6 106//! authors : Tim Wood, Iskren Chernev, Moment.js contributors 107//! license : MIT 108//! momentjs.com 109 110(function(global, factory) { 111 typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : typeof define === 'function' && define.amd ? define(factory) : global.moment = factory() 112}(this, function() { 113 'use strict'; 114 115 var hookCallback; 116 117 function utils_hooks__hooks() { 118 return hookCallback.apply(null, arguments); 119 } 120 121 // This is done to register the method called with moment() 122 // without creating circular dependencies. 123 function setHookCallback(callback) { 124 hookCallback = callback; 125 } 126 127 function isArray(input) { 128 return Object.prototype.toString.call(input) === '[object Array]'; 129 } 130 131 function isDate(input) { 132 return input instanceof Date || Object.prototype.toString.call(input) === '[object Date]'; 133 } 134 135 function map(arr, fn) { 136 var res = [], 137 i; 138 for (i = 0; i < arr.length; ++i) { 139 res.push(fn(arr[i], i)); 140 } 141 return res; 142 } 143 144 function hasOwnProp(a, b) { 145 return Object.prototype.hasOwnProperty.call(a, b); 146 } 147 148 function extend(a, b) { 149 for (var i in b) { 150 if (hasOwnProp(b, i)) { 151 a[i] = b[i]; 152 } 153 } 154 155 if (hasOwnProp(b, 'toString')) { 156 a.toString = b.toString; 157 } 158 159 if (hasOwnProp(b, 'valueOf')) { 160 a.valueOf = b.valueOf; 161 } 162 163 return a; 164 } 165 166 function create_utc__createUTC(input, format, locale, strict) { 167 return createLocalOrUTC(input, format, locale, strict, true).utc(); 168 } 169 170 function defaultParsingFlags() { 171 // We need to deep clone this object. 172 return { 173 empty: false, 174 unusedTokens: [], 175 unusedInput: [], 176 overflow: -2, 177 charsLeftOver: 0, 178 nullInput: false, 179 invalidMonth: null, 180 invalidFormat: false, 181 userInvalidated: false, 182 iso: false 183 }; 184 } 185 186 function getParsingFlags(m) { 187 if (m._pf == null) { 188 m._pf = defaultParsingFlags(); 189 } 190 return m._pf; 191 } 192 193 function valid__isValid(m) { 194 if (m._isValid == null) { 195 var flags = getParsingFlags(m); 196 m._isValid = !isNaN(m._d.getTime()) && flags.overflow < 0 && !flags.empty && !flags.invalidMonth && !flags.invalidWeekday && !flags.nullInput && !flags.invalidFormat && !flags.userInvalidated; 197 198 if (m._strict) { 199 m._isValid = m._isValid && flags.charsLeftOver === 0 && flags.unusedTokens.length === 0 && flags.bigHour === undefined; 200 } 201 } 202 return m._isValid; 203 } 204 205 function valid__createInvalid(flags) { 206 var m = create_utc__createUTC(NaN); 207 if (flags != null) { 208 extend(getParsingFlags(m), flags); 209 } else { 210 getParsingFlags(m).userInvalidated = true; 211 } 212 213 return m; 214 } 215 216 var momentProperties = utils_hooks__hooks.momentProperties = []; 217 218 function copyConfig(to, from) { 219 var i, prop, val; 220 221 if (typeof from._isAMomentObject !== 'undefined') { 222 to._isAMomentObject = from._isAMomentObject; 223 } 224 if (typeof from._i !== 'undefined') { 225 to._i = from._i; 226 } 227 if (typeof from._f !== 'undefined') { 228 to._f = from._f; 229 } 230 if (typeof from._l !== 'undefined') { 231 to._l = from._l; 232 } 233 if (typeof from._strict !== 'undefined') { 234 to._strict = from._strict; 235 } 236 if (typeof from._tzm !== 'undefined') { 237 to._tzm = from._tzm; 238 } 239 if (typeof from._isUTC !== 'undefined') { 240 to._isUTC = from._isUTC; 241 } 242 if (typeof from._offset !== 'undefined') { 243 to._offset = from._offset; 244 } 245 if (typeof from._pf !== 'undefined') { 246 to._pf = getParsingFlags(from); 247 } 248 if (typeof from._locale !== 'undefined') { 249 to._locale = from._locale; 250 } 251 252 if (momentProperties.length > 0) { 253 for (i in momentProperties) { 254 prop = momentProperties[i]; 255 val = from[prop]; 256 if (typeof val !== 'undefined') { 257 to[prop] = val; 258 } 259 } 260 } 261 262 return to; 263 } 264 265 var updateInProgress = false;
vendor: 17,957 bytes, lines 266-830
266 267 // Moment prototype object 268 function Moment(config) { 269 copyConfig(this, config); 270 this._d = new Date(config._d != null ? config._d.getTime() : NaN); 271 // Prevent infinite loop in case updateOffset creates new moment 272 // objects. 273 if (updateInProgress === false) { 274 updateInProgress = true; 275 utils_hooks__hooks.updateOffset(this); 276 updateInProgress = false; 277 } 278 } 279 280 function isMoment(obj) { 281 return obj instanceof Moment || (obj != null && obj._isAMomentObject != null); 282 } 283 284 function absFloor(number) { 285 if (number < 0) { 286 return Math.ceil(number); 287 } else { 288 return Math.floor(number); 289 } 290 } 291 292 function toInt(argumentForCoercion) { 293 var coercedNumber = +argumentForCoercion, 294 value = 0; 295 296 if (coercedNumber !== 0 && isFinite(coercedNumber)) { 297 value = absFloor(coercedNumber); 298 } 299 300 return value; 301 } 302 303 function compareArrays(array1, array2, dontConvert) { 304 var len = Math.min(array1.length, array2.length), 305 lengthDiff = Math.abs(array1.length - array2.length), 306 diffs = 0, 307 i; 308 for (i = 0; i < len; i++) { 309 if ((dontConvert && array1[i] !== array2[i]) || (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))) { 310 diffs++; 311 } 312 } 313 return diffs + lengthDiff; 314 } 315 316 function Locale() {} 317 318 var locales = {}; 319 var globalLocale; 320 321 function normalizeLocale(key) { 322 return key ? key.toLowerCase().replace('_', '-') : key; 323 } 324 325 // pick the locale from the array 326 // try ['en-au', 'en-gb'] as 'en-au', 'en-gb', 'en', as in move through the list trying each 327 // substring from most specific to least, but move to the next array item if it's a more specific variant than the current root 328 function chooseLocale(names) { 329 var i = 0, 330 j, next, locale, split; 331 332 while (i < names.length) { 333 split = normalizeLocale(names[i]).split('-'); 334 j = split.length; 335 next = normalizeLocale(names[i + 1]); 336 next = next ? next.split('-') : null; 337 while (j > 0) { 338 locale = loadLocale(split.slice(0, j).join('-')); 339 if (locale) { 340 return locale; 341 } 342 if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) { 343 //the next array item is better than a shallower substring of this one 344 break; 345 } 346 j--; 347 } 348 i++; 349 } 350 return null; 351 } 352 353 function loadLocale(name) { 354 var oldLocale = null; 355 // TODO: Find a better way to register and load all the locales in Node 356 if (!locales[name] && typeof module !== 'undefined' && module && module.exports) { 357 try { 358 oldLocale = globalLocale._abbr; 359 require('./locale/' + name); 360 // because defineLocale currently also sets the global locale, we 361 // want to undo that for lazy loaded locales 362 locale_locales__getSetGlobalLocale(oldLocale); 363 } catch (e) {} 364 } 365 return locales[name]; 366 } 367 368 // This function will load locale and then set the global locale. If 369 // no arguments are passed in, it will simply return the current global 370 // locale key. 371 function locale_locales__getSetGlobalLocale(key, values) { 372 var data; 373 if (key) { 374 if (typeof values === 'undefined') { 375 data = locale_locales__getLocale(key); 376 } else { 377 data = defineLocale(key, values); 378 } 379 380 if (data) { 381 // moment.duration._locale = moment._locale = data; 382 globalLocale = data; 383 } 384 } 385 386 return globalLocale._abbr; 387 } 388 389 function defineLocale(name, values) { 390 if (values !== null) { 391 values.abbr = name; 392 locales[name] = locales[name] || new Locale(); 393 locales[name].set(values); 394 395 // backwards compat for now: also set the locale 396 locale_locales__getSetGlobalLocale(name); 397 398 return locales[name]; 399 } else { 400 // useful for testing 401 delete locales[name]; 402 return null; 403 } 404 } 405 406 // returns locale data 407 function locale_locales__getLocale(key) { 408 var locale; 409 410 if (key && key._locale && key._locale._abbr) { 411 key = key._locale._abbr; 412 } 413 414 if (!key) { 415 return globalLocale; 416 } 417 418 if (!isArray(key)) { 419 //short-circuit everything else 420 locale = loadLocale(key); 421 if (locale) { 422 return locale; 423 } 424 key = [key]; 425 } 426 427 return chooseLocale(key); 428 } 429 430 var aliases = {}; 431 432 function addUnitAlias(unit, shorthand) { 433 var lowerCase = unit.toLowerCase(); 434 aliases[lowerCase] = aliases[lowerCase + 's'] = aliases[shorthand] = unit; 435 } 436 437 function normalizeUnits(units) { 438 return typeof units === 'string' ? aliases[units] || aliases[units.toLowerCase()] : undefined; 439 } 440 441 function normalizeObjectUnits(inputObject) { 442 var normalizedInput = {}, 443 normalizedProp, 444 prop; 445 446 for (prop in inputObject) { 447 if (hasOwnProp(inputObject, prop)) { 448 normalizedProp = normalizeUnits(prop); 449 if (normalizedProp) { 450 normalizedInput[normalizedProp] = inputObject[prop]; 451 } 452 } 453 } 454 455 return normalizedInput; 456 } 457 458 function makeGetSet(unit, keepTime) { 459 return function(value) { 460 if (value != null) { 461 get_set__set(this, unit, value); 462 utils_hooks__hooks.updateOffset(this, keepTime); 463 return this; 464 } else { 465 return get_set__get(this, unit); 466 } 467 }; 468 } 469 470 function get_set__get(mom, unit) { 471 return mom._d['get' + (mom._isUTC ? 'UTC' : '') + unit](); 472 } 473 474 function get_set__set(mom, unit, value) { 475 return mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](value); 476 } 477 478 // MOMENTS 479 480 function getSet(units, value) { 481 var unit; 482 if (typeof units === 'object') { 483 for (unit in units) { 484 this.set(unit, units[unit]); 485 } 486 } else { 487 units = normalizeUnits(units); 488 if (typeof this[units] === 'function') { 489 return this[units](value); 490 } 491 } 492 return this; 493 } 494 495 function zeroFill(number, targetLength, forceSign) { 496 var absNumber = '' + Math.abs(number), 497 zerosToFill = targetLength - absNumber.length, 498 sign = number >= 0; 499 return (sign ? (forceSign ? '+' : '') : '-') + Math.pow(10, Math.max(0, zerosToFill)).toString().substr(1) + absNumber; 500 } 501 502 var formattingTokens = /(\[[^\[]*\])|(\\)?(Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Q|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g; 503 504 var localFormattingTokens = /(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g; 505 506 var formatFunctions = {}; 507 508 var formatTokenFunctions = {}; 509 510 // token: 'M' 511 // padded: ['MM', 2] 512 // ordinal: 'Mo' 513 // callback: function () { this.month() + 1 } 514 function addFormatToken(token, padded, ordinal, callback) { 515 var func = callback; 516 if (typeof callback === 'string') { 517 func = function() { 518 return this[callback](); 519 }; 520 } 521 if (token) { 522 formatTokenFunctions[token] = func; 523 } 524 if (padded) { 525 formatTokenFunctions[padded[0]] = function() { 526 return zeroFill(func.apply(this, arguments), padded[1], padded[2]); 527 }; 528 } 529 if (ordinal) { 530 formatTokenFunctions[ordinal] = function() { 531 return this.localeData().ordinal(func.apply(this, arguments), token); 532 }; 533 } 534 } 535 536 function removeFormattingTokens(input) { 537 if (input.match(/\[[\s\S]/)) { 538 return input.replace(/^\[|\]$/g, ''); 539 } 540 return input.replace(/\\/g, ''); 541 } 542 543 function makeFormatFunction(format) { 544 var array = format.match(formattingTokens), 545 i, length; 546 547 for (i = 0, length = array.length; i < length; i++) { 548 if (formatTokenFunctions[array[i]]) { 549 array[i] = formatTokenFunctions[array[i]]; 550 } else { 551 array[i] = removeFormattingTokens(array[i]); 552 } 553 } 554 555 return function(mom) { 556 var output = ''; 557 for (i = 0; i < length; i++) { 558 output += array[i] instanceof Function ? array[i].call(mom, format) : array[i]; 559 } 560 return output; 561 }; 562 } 563 564 // format date using native date object 565 function formatMoment(m, format) { 566 if (!m.isValid()) { 567 return m.localeData().invalidDate(); 568 } 569 570 format = expandFormat(format, m.localeData()); 571 formatFunctions[format] = formatFunctions[format] || makeFormatFunction(format); 572 573 return formatFunctions[format](m); 574 } 575 576 function expandFormat(format, locale) { 577 var i = 5; 578 579 function replaceLongDateFormatTokens(input) { 580 return locale.longDateFormat(input) || input; 581 } 582 583 localFormattingTokens.lastIndex = 0; 584 while (i >= 0 && localFormattingTokens.test(format)) { 585 format = format.replace(localFormattingTokens, replaceLongDateFormatTokens); 586 localFormattingTokens.lastIndex = 0; 587 i -= 1; 588 } 589 590 return format; 591 } 592 593 var match1 = /\d/; // 0 - 9 594 var match2 = /\d\d/; // 00 - 99 595 var match3 = /\d{3}/; // 000 - 999 596 var match4 = /\d{4}/; // 0000 - 9999 597 var match6 = /[+-]?\d{6}/; // -999999 - 999999 598 var match1to2 = /\d\d?/; // 0 - 99 599 var match1to3 = /\d{1,3}/; // 0 - 999 600 var match1to4 = /\d{1,4}/; // 0 - 9999 601 var match1to6 = /[+-]?\d{1,6}/; // -999999 - 999999 602 603 var matchUnsigned = /\d+/; // 0 - inf 604 var matchSigned = /[+-]?\d+/; // -inf - inf 605 606 var matchOffset = /Z|[+-]\d\d:?\d\d/gi; // +00:00 -00:00 +0000 -0000 or Z 607 608 var matchTimestamp = /[+-]?\d+(\.\d{1,3})?/; // 123456789 123456789.123 609 610 // any word (or two) characters or numbers including two/three word month in arabic. 611 var matchWord = /[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\/]+(\s*?[\u0600-\u06FF]+){1,2}/i; 612 613 var regexes = {}; 614 615 function isFunction(sth) { 616 // https://github.com/moment/moment/issues/2325 617 return typeof sth === 'function' && Object.prototype.toString.call(sth) === '[object Function]'; 618 } 619 620 621 function addRegexToken(token, regex, strictRegex) { 622 regexes[token] = isFunction(regex) ? regex : function(isStrict) { 623 return (isStrict && strictRegex) ? strictRegex : regex; 624 }; 625 } 626 627 function getParseRegexForToken(token, config) { 628 if (!hasOwnProp(regexes, token)) { 629 return new RegExp(unescapeFormat(token)); 630 } 631 632 return regexes[token](config._strict, config._locale); 633 } 634 635 // Code from http://stackoverflow.com/questions/3561493/is-there-a-regexp-escape-function-in-javascript 636 function unescapeFormat(s) { 637 return s.replace('\\', '').replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g, function(matched, p1, p2, p3, p4) { 638 return p1 || p2 || p3 || p4; 639 }).replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&'); 640 } 641 642 var tokens = {}; 643 644 function addParseToken(token, callback) { 645 var i, func = callback; 646 if (typeof token === 'string') { 647 token = [token]; 648 } 649 if (typeof callback === 'number') { 650 func = function(input, array) { 651 array[callback] = toInt(input); 652 }; 653 } 654 for (i = 0; i < token.length; i++) { 655 tokens[token[i]] = func; 656 } 657 } 658 659 function addWeekParseToken(token, callback) { 660 addParseToken(token, function(input, array, config, token) { 661 config._w = config._w || {}; 662 callback(input, config._w, config, token); 663 }); 664 } 665 666 function addTimeToArrayFromToken(token, input, config) { 667 if (input != null && hasOwnProp(tokens, token)) { 668 tokens[token](input, config._a, config, token); 669 } 670 } 671 672 var YEAR = 0; 673 var MONTH = 1; 674 var DATE = 2; 675 var HOUR = 3; 676 var MINUTE = 4; 677 var SECOND = 5; 678 var MILLISECOND = 6; 679 680 function daysInMonth(year, month) { 681 return new Date(Date.UTC(year, month + 1, 0)).getUTCDate(); 682 } 683 684 // FORMATTING 685 686 addFormatToken('M', ['MM', 2], 'Mo', function() { 687 return this.month() + 1; 688 }); 689 690 addFormatToken('MMM', 0, 0, function(format) { 691 return this.localeData().monthsShort(this, format); 692 }); 693 694 addFormatToken('MMMM', 0, 0, function(format) { 695 return this.localeData().months(this, format); 696 }); 697 698 // ALIASES 699 700 addUnitAlias('month', 'M'); 701 702 // PARSING 703 704 addRegexToken('M', match1to2); 705 addRegexToken('MM', match1to2, match2); 706 addRegexToken('MMM', matchWord); 707 addRegexToken('MMMM', matchWord); 708 709 addParseToken(['M', 'MM'], function(input, array) { 710 array[MONTH] = toInt(input) - 1; 711 }); 712 713 addParseToken(['MMM', 'MMMM'], function(input, array, config, token) { 714 var month = config._locale.monthsParse(input, token, config._strict); 715 // if we didn't find a month name, mark the date as invalid. 716 if (month != null) { 717 array[MONTH] = month; 718 } else { 719 getParsingFlags(config).invalidMonth = input; 720 } 721 }); 722 723 // LOCALES 724 725 var defaultLocaleMonths = 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_'); 726 727 function localeMonths(m) { 728 return this._months[m.month()]; 729 } 730 731 var defaultLocaleMonthsShort = 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'); 732 733 function localeMonthsShort(m) { 734 return this._monthsShort[m.month()]; 735 } 736 737 function localeMonthsParse(monthName, format, strict) { 738 var i, mom, regex; 739 740 if (!this._monthsParse) { 741 this._monthsParse = []; 742 this._longMonthsParse = []; 743 this._shortMonthsParse = []; 744 } 745 746 for (i = 0; i < 12; i++) { 747 // make the regex if we don't have it already 748 mom = create_utc__createUTC([2000, i]); 749 if (strict && !this._longMonthsParse[i]) { 750 this._longMonthsParse[i] = new RegExp('^' + this.months(mom, '').replace('.', '') + '$', 'i'); 751 this._shortMonthsParse[i] = new RegExp('^' + this.monthsShort(mom, '').replace('.', '') + '$', 'i'); 752 } 753 if (!strict && !this._monthsParse[i]) { 754 regex = '^' + this.months(mom, '') + '|^' + this.monthsShort(mom, ''); 755 this._monthsParse[i] = new RegExp(regex.replace('.', ''), 'i'); 756 } 757 // test the regex 758 if (strict && format === 'MMMM' && this._longMonthsParse[i].test(monthName)) { 759 return i; 760 } else if (strict && format === 'MMM' && this._shortMonthsParse[i].test(monthName)) { 761 return i; 762 } else if (!strict && this._monthsParse[i].test(monthName)) { 763 return i; 764 } 765 } 766 } 767 768 // MOMENTS 769 770 function setMonth(mom, value) { 771 var dayOfMonth; 772 773 // TODO: Move this out of here! 774 if (typeof value === 'string') { 775 value = mom.localeData().monthsParse(value); 776 // TODO: Another silent failure? 777 if (typeof value !== 'number') { 778 return mom; 779 } 780 } 781 782 dayOfMonth = Math.min(mom.date(), daysInMonth(mom.year(), value)); 783 mom._d['set' + (mom._isUTC ? 'UTC' : '') + 'Month'](value, dayOfMonth); 784 return mom; 785 } 786 787 function getSetMonth(value) { 788 if (value != null) { 789 setMonth(this, value); 790 utils_hooks__hooks.updateOffset(this, true); 791 return this; 792 } else { 793 return get_set__get(this, 'Month'); 794 } 795 } 796 797 function getDaysInMonth() { 798 return daysInMonth(this.year(), this.month()); 799 } 800 801 function checkOverflow(m) { 802 var overflow; 803 var a = m._a; 804 805 if (a && getParsingFlags(m).overflow === -2) { 806 overflow = a[MONTH] < 0 || a[MONTH] > 11 ? MONTH : a[DATE] < 1 || a[DATE] > daysInMonth(a[YEAR], a[MONTH]) ? DATE : a[HOUR] < 0 || a[HOUR] > 24 || (a[HOUR] === 24 && (a[MINUTE] !== 0 || a[SECOND] !== 0 || a[MILLISECOND] !== 0)) ? HOUR : a[MINUTE] < 0 || a[MINUTE] > 59 ? MINUTE : a[SECOND] < 0 || a[SECOND] > 59 ? SECOND : a[MILLISECOND] < 0 || a[MILLISECOND] > 999 ? MILLISECOND : -1; 807 808 if (getParsingFlags(m)._overflowDayOfYear && (overflow < YEAR || overflow > DATE)) { 809 overflow = DATE; 810 } 811 812 getParsingFlags(m).overflow = overflow; 813 } 814 815 return m; 816 } 817 818 function warn(msg) { 819 if (utils_hooks__hooks.suppressDeprecationWarnings === false && typeof console !== 'undefined' && console.warn) { 820 console.warn('Deprecation warning: ' + msg); 821 } 822 } 823 824 function deprecate(msg, fn) { 825 var firstTime = true; 826 827 return extend(function() { 828 if (firstTime) { 829 warn(msg + '\n' + (new Error()).stack); 830 firstTime = false;
831 } 832 return fn.apply(this, arguments); 833 }, fn); 834 } 835 836 var deprecations = {}; 837 838 function deprecateSimple(name, msg) { 839 if (!deprecations[name]) { 840 warn(msg); 841 deprecations[name] = true; 842 } 843 } 844 845 utils_hooks__hooks.suppressDeprecationWarnings = false; 846 847 var from_string__isoRegex = /^\s*(?:[+-]\d{6}|\d{4})-(?:(\d\d-\d\d)|(W\d\d$)|(W\d\d-\d)|(\d\d\d))((T| )(\d\d(:\d\d(:\d\d(\.\d+)?)?)?)?([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/; 848 849 var isoDates = [ 850 ['YYYYYY-MM-DD', /[+-]\d{6}-\d{2}-\d{2}/], 851 ['YYYY-MM-DD', /\d{4}-\d{2}-\d{2}/], 852 ['GGGG-[W]WW-E', /\d{4}-W\d{2}-\d/], 853 ['GGGG-[W]WW', /\d{4}-W\d{2}/], 854 ['YYYY-DDD', /\d{4}-\d{3}/] 855 ]; 856 857 // iso time formats and regexes 858 var isoTimes = [ 859 ['HH:mm:ss.SSSS', /(T| )\d\d:\d\d:\d\d\.\d+/], 860 ['HH:mm:ss', /(T| )\d\d:\d\d:\d\d/], 861 ['HH:mm', /(T| )\d\d:\d\d/], 862 ['HH', /(T| )\d\d/] 863 ]; 864 865 var aspNetJsonRegex = /^\/?Date\((\-?\d+)/i; 866 867 // date from iso format 868 function configFromISO(config) { 869 var i, l, 870 string = config._i, 871 match = from_string__isoRegex.exec(string); 872 873 if (match) { 874 getParsingFlags(config).iso = true; 875 for (i = 0, l = isoDates.length; i < l; i++) { 876 if (isoDates[i][1].exec(string)) { 877 config._f = isoDates[i][0]; 878 break; 879 } 880 } 881 for (i = 0, l = isoTimes.length; i < l; i++) { 882 if (isoTimes[i][1].exec(string)) { 883 // match[6] should be 'T' or space 884 config._f += (match[6] || ' ') + isoTimes[i][0]; 885 break; 886 } 887 } 888 if (string.match(matchOffset)) { 889 config._f += 'Z'; 890 } 891 configFromStringAndFormat(config); 892 } else { 893 config._isValid = false; 894 } 895 } 896 897 // date from iso format or fallback 898 function configFromString(config) { 899 var matched = aspNetJsonRegex.exec(config._i); 900 901 if (matched !== null) { 902 config._d = new Date(+matched[1]); 903 return; 904 } 905 906 configFromISO(config); 907 if (config._isValid === false) { 908 delete config._isValid; 909 utils_hooks__hooks.createFromInputFallback(config); 910 } 911 } 912 913 utils_hooks__hooks.createFromInputFallback = deprecate('moment construction falls back to js Date. This is ' + 'discouraged and will be removed in upcoming major ' + 'release. Please refer to ' + 'https://github.com/moment/moment/issues/1407 for more info.', 914 915 function(config) { 916 config._d = new Date(config._i + (config._useUTC ? ' UTC' : '')); 917 }); 918 919 function createDate(y, m, d, h, M, s, ms) { 920 //can't just apply() to create a date: 921 //http://stackoverflow.com/questions/181348/instantiating-a-javascript-object-by-calling-prototype-constructor-apply 922 var date = new Date(y, m, d, h, M, s, ms); 923 924 //the date constructor doesn't accept years < 1970 925 if (y < 1970) { 926 date.setFullYear(y); 927 } 928 return date; 929 } 930 931 function createUTCDate(y) { 932 var date = new Date(Date.UTC.apply(null, arguments)); 933 if (y < 1970) { 934 date.setUTCFullYear(y); 935 } 936 return date; 937 } 938 939 addFormatToken(0, ['YY', 2], 0, function() { 940 return this.year() % 100; 941 }); 942 943 addFormatToken(0, ['YYYY', 4], 0, 'year'); 944 addFormatToken(0, ['YYYYY', 5], 0, 'year'); 945 addFormatToken(0, ['YYYYYY', 6, true], 0, 'year'); 946 947 // ALIASES 948 949 addUnitAlias('year', 'y'); 950 951 // PARSING 952 953 addRegexToken('Y', matchSigned); 954 addRegexToken('YY', match1to2, match2); 955 addRegexToken('YYYY', match1to4, match4); 956 addRegexToken('YYYYY', match1to6, match6); 957 addRegexToken('YYYYYY', match1to6, match6); 958 959 addParseToken(['YYYYY', 'YYYYYY'], YEAR); 960 addParseToken('YYYY', function(input, array) { 961 array[YEAR] = input.length === 2 ? utils_hooks__hooks.parseTwoDigitYear(input) : toInt(input); 962 }); 963 addParseToken('YY', function(input, array) { 964 array[YEAR] = utils_hooks__hooks.parseTwoDigitYear(input); 965 }); 966 967 // HELPERS 968 969 function daysInYear(year) { 970 return isLeapYear(year) ? 366 : 365; 971 } 972 973 function isLeapYear(year) { 974 return (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0; 975 } 976 977 // HOOKS 978 979 utils_hooks__hooks.parseTwoDigitYear = function(input) { 980 return toInt(input) + (toInt(input) > 68 ? 1900 : 2000); 981 }; 982 983 // MOMENTS 984 985 var getSetYear = makeGetSet('FullYear', false); 986 987 function getIsLeapYear() { 988 return isLeapYear(this.year()); 989 } 990 991 addFormatToken('w', ['ww', 2], 'wo', 'week'); 992 addFormatToken('W', ['WW', 2], 'Wo', 'isoWeek'); 993 994 // ALIASES 995 996 addUnitAlias('week', 'w'); 997 addUnitAlias('isoWeek', 'W'); 998 999 // PARSING 1000 1001 addRegexToken('w', match1to2); 1002 addRegexToken('ww', match1to2, match2); 1003 addRegexToken('W', match1to2); 1004 addRegexToken('WW', match1to2, match2); 1005
1006 addWeekParseToken(['w', 'ww', 'W', 'WW'], function(input, week, config, token) { 1007 week[token.substr(0, 1)] = toInt(input); 1008 }); 1009 1010 // HELPERS 1011 1012 // firstDayOfWeek 0 = sun, 6 = sat 1013 // the day of the week that starts the week 1014 // (usually sunday or monday) 1015 // firstDayOfWeekOfYear 0 = sun, 6 = sat 1016 // the first week is the week that contains the first 1017 // of this day of the week 1018 // (eg. ISO weeks use thursday (4)) 1019 function weekOfYear(mom, firstDayOfWeek, firstDayOfWeekOfYear) { 1020 var end = firstDayOfWeekOfYear - firstDayOfWeek, 1021 daysToDayOfWeek = firstDayOfWeekOfYear - mom.day(), 1022 adjustedMoment; 1023 1024 1025 if (daysToDayOfWeek > end) { 1026 daysToDayOfWeek -= 7; 1027 } 1028 1029 if (daysToDayOfWeek < end - 7) { 1030 daysToDayOfWeek += 7; 1031 } 1032 1033 adjustedMoment = local__createLocal(mom).add(daysToDayOfWeek, 'd'); 1034 return { 1035 week: Math.ceil(adjustedMoment.dayOfYear() / 7), 1036 year: adjustedMoment.year() 1037 }; 1038 } 1039 1040 // LOCALES 1041 1042 function localeWeek(mom) { 1043 return weekOfYear(mom, this._week.dow, this._week.doy).week; 1044 } 1045 1046 var defaultLocaleWeek = { 1047 dow: 0, // Sunday is the first day of the week. 1048 doy: 6 // The week that contains Jan 1st is the first week of the year. 1049 }; 1050 1051 function localeFirstDayOfWeek() { 1052 return this._week.dow; 1053 } 1054 1055 function localeFirstDayOfYear() { 1056 return this._week.doy; 1057 } 1058 1059 // MOMENTS 1060 1061 function getSetWeek(input) { 1062 var week = this.localeData().week(this); 1063 return input == null ? week : this.add((input - week) * 7, 'd'); 1064 } 1065 1066 function getSetISOWeek(input) { 1067 var week = weekOfYear(this, 1, 4).week; 1068 return input == null ? week : this.add((input - week) * 7, 'd'); 1069 } 1070 1071 addFormatToken('DDD', ['DDDD', 3], 'DDDo', 'dayOfYear'); 1072 1073 // ALIASES 1074 1075 addUnitAlias('dayOfYear', 'DDD'); 1076 1077 // PARSING 1078 1079 addRegexToken('DDD', match1to3); 1080 addRegexToken('DDDD', match3); 1081 addParseToken(['DDD', 'DDDD'], function(input, array, config) { 1082 config._dayOfYear = toInt(input); 1083 }); 1084 1085 // HELPERS 1086 1087 //http://en.wikipedia.org/wiki/ISO_week_date#Calculating_a_date_given_the_year.2C_week_number_and_weekday 1088 function dayOfYearFromWeeks(year, week, weekday, firstDayOfWeekOfYear, firstDayOfWeek) { 1089 var week1Jan = 6 + firstDayOfWeek - firstDayOfWeekOfYear, 1090 janX = createUTCDate(year, 0, 1 + week1Jan), 1091 d = janX.getUTCDay(), 1092 dayOfYear; 1093 if (d < firstDayOfWeek) { 1094 d += 7; 1095 } 1096 1097 weekday = weekday != null ? 1 * weekday : firstDayOfWeek; 1098 1099 dayOfYear = 1 + week1Jan + 7 * (week - 1) - d + weekday; 1100 1101 return { 1102 year: dayOfYear > 0 ? year : year - 1, 1103 dayOfYear: dayOfYear > 0 ? dayOfYear : daysInYear(year - 1) + dayOfYear 1104 }; 1105 } 1106 1107 // MOMENTS 1108 1109 function getSetDayOfYear(input) { 1110 var dayOfYear = Math.round((this.clone().startOf('day') - this.clone().startOf('year')) / 864e5) + 1; 1111 return input == null ? dayOfYear : this.add((input - dayOfYear), 'd'); 1112 } 1113 1114 // Pick the first defined of two or three arguments. 1115 function defaults(a, b, c) { 1116 if (a != null) { 1117 return a; 1118 } 1119 if (b != null) { 1120 return b; 1121 } 1122 return c; 1123 } 1124 1125 function currentDateArray(config) { 1126 var now = new Date(); 1127 if (config._useUTC) { 1128 return [now.getUTCFullYear(), now.getUTCMonth(), now.getUTCDate()]; 1129 } 1130 return [now.getFullYear(), now.getMonth(), now.getDate()]; 1131 } 1132 1133 // convert an array to a date. 1134 // the array should mirror the parameters below 1135 // note: all values past the year are optional and will default to the lowest possible value. 1136 // [year, month, day , hour, minute, second, millisecond] 1137 function configFromArray(config) { 1138 var i, date, input = [], 1139 currentDate, yearToUse; 1140 1141 if (config._d) { 1142 return; 1143 } 1144 1145 currentDate = currentDateArray(config); 1146 1147 //compute day of the year from weeks and weekdays 1148 if (config._w && config._a[DATE] == null && config._a[MONTH] == null) { 1149 dayOfYearFromWeekInfo(config); 1150 } 1151 1152 //if the day of the year is set, figure out what it is 1153 if (config._dayOfYear) { 1154 yearToUse = defaults(config._a[YEAR], currentDate[YEAR]); 1155 1156 if (config._dayOfYear > daysInYear(yearToUse)) { 1157 getParsingFlags(config)._overflowDayOfYear = true; 1158 } 1159 1160 date = createUTCDate(yearToUse, 0, config._dayOfYear); 1161 config._a[MONTH] = date.getUTCMonth(); 1162 config._a[DATE] = date.getUTCDate(); 1163 } 1164 1165 // Default to current date. 1166 // * if no year, month, day of month are given, default to today 1167 // * if day of month is given, default month and year 1168 // * if month is given, default only year 1169 // * if year is given, don't default anything 1170 for (i = 0; i < 3 && config._a[i] == null; ++i) {
vendor: 28,967 bytes, lines 1171-2018
1171 config._a[i] = input[i] = currentDate[i]; 1172 } 1173 1174 // Zero out whatever was not defaulted, including time 1175 for (; i < 7; i++) { 1176 config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i]; 1177 } 1178 1179 // Check for 24:00:00.000 1180 if (config._a[HOUR] === 24 && config._a[MINUTE] === 0 && config._a[SECOND] === 0 && config._a[MILLISECOND] === 0) { 1181 config._nextDay = true; 1182 config._a[HOUR] = 0; 1183 } 1184 1185 config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input); 1186 // Apply timezone offset from input. The actual utcOffset can be changed 1187 // with parseZone. 1188 if (config._tzm != null) { 1189 config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm); 1190 } 1191 1192 if (config._nextDay) { 1193 config._a[HOUR] = 24; 1194 } 1195 } 1196 1197 function dayOfYearFromWeekInfo(config) { 1198 var w, weekYear, week, weekday, dow, doy, temp; 1199 1200 w = config._w; 1201 if (w.GG != null || w.W != null || w.E != null) { 1202 dow = 1; 1203 doy = 4; 1204 1205 // TODO: We need to take the current isoWeekYear, but that depends on 1206 // how we interpret now (local, utc, fixed offset). So create 1207 // a now version of current config (take local/utc/offset flags, and 1208 // create now). 1209 weekYear = defaults(w.GG, config._a[YEAR], weekOfYear(local__createLocal(), 1, 4).year); 1210 week = defaults(w.W, 1); 1211 weekday = defaults(w.E, 1); 1212 } else { 1213 dow = config._locale._week.dow; 1214 doy = config._locale._week.doy; 1215 1216 weekYear = defaults(w.gg, config._a[YEAR], weekOfYear(local__createLocal(), dow, doy).year); 1217 week = defaults(w.w, 1); 1218 1219 if (w.d != null) { 1220 // weekday -- low day numbers are considered next week 1221 weekday = w.d; 1222 if (weekday < dow) { 1223 ++week; 1224 } 1225 } else if (w.e != null) { 1226 // local weekday -- counting starts from begining of week 1227 weekday = w.e + dow; 1228 } else { 1229 // default to begining of week 1230 weekday = dow; 1231 } 1232 } 1233 temp = dayOfYearFromWeeks(weekYear, week, weekday, doy, dow); 1234 1235 config._a[YEAR] = temp.year; 1236 config._dayOfYear = temp.dayOfYear; 1237 } 1238 1239 utils_hooks__hooks.ISO_8601 = function() {}; 1240 1241 // date from string and format string 1242 function configFromStringAndFormat(config) { 1243 // TODO: Move this to another part of the creation flow to prevent circular deps 1244 if (config._f === utils_hooks__hooks.ISO_8601) { 1245 configFromISO(config); 1246 return; 1247 } 1248 1249 config._a = []; 1250 getParsingFlags(config).empty = true; 1251 1252 // This array is used to make a Date, either with `new Date` or `Date.UTC` 1253 var string = '' + config._i, 1254 i, parsedInput, tokens, token, skipped, 1255 stringLength = string.length, 1256 totalParsedInputLength = 0; 1257 1258 tokens = expandFormat(config._f, config._locale).match(formattingTokens) || []; 1259 1260 for (i = 0; i < tokens.length; i++) { 1261 token = tokens[i]; 1262 parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0]; 1263 if (parsedInput) { 1264 skipped = string.substr(0, string.indexOf(parsedInput)); 1265 if (skipped.length > 0) { 1266 getParsingFlags(config).unusedInput.push(skipped); 1267 } 1268 string = string.slice(string.indexOf(parsedInput) + parsedInput.length); 1269 totalParsedInputLength += parsedInput.length; 1270 } 1271 // don't parse if it's not a known token 1272 if (formatTokenFunctions[token]) { 1273 if (parsedInput) { 1274 getParsingFlags(config).empty = false; 1275 } else { 1276 getParsingFlags(config).unusedTokens.push(token); 1277 } 1278 addTimeToArrayFromToken(token, parsedInput, config); 1279 } else if (config._strict && !parsedInput) { 1280 getParsingFlags(config).unusedTokens.push(token); 1281 } 1282 } 1283 1284 // add remaining unparsed input length to the string 1285 getParsingFlags(config).charsLeftOver = stringLength - totalParsedInputLength; 1286 if (string.length > 0) { 1287 getParsingFlags(config).unusedInput.push(string); 1288 } 1289 1290 // clear _12h flag if hour is <= 12 1291 if (getParsingFlags(config).bigHour === true && config._a[HOUR] <= 12 && config._a[HOUR] > 0) { 1292 getParsingFlags(config).bigHour = undefined; 1293 } 1294 // handle meridiem 1295 config._a[HOUR] = meridiemFixWrap(config._locale, config._a[HOUR], config._meridiem); 1296 1297 configFromArray(config); 1298 checkOverflow(config); 1299 } 1300 1301 1302 function meridiemFixWrap(locale, hour, meridiem) { 1303 var isPm; 1304 1305 if (meridiem == null) { 1306 // nothing to do 1307 return hour; 1308 } 1309 if (locale.meridiemHour != null) { 1310 return locale.meridiemHour(hour, meridiem); 1311 } else if (locale.isPM != null) { 1312 // Fallback 1313 isPm = locale.isPM(meridiem); 1314 if (isPm && hour < 12) { 1315 hour += 12; 1316 } 1317 if (!isPm && hour === 12) { 1318 hour = 0; 1319 } 1320 return hour; 1321 } else { 1322 // this is not supposed to happen 1323 return hour; 1324 } 1325 } 1326 1327 function configFromStringAndArray(config) { 1328 var tempConfig, 1329 bestMoment, 1330 1331 scoreToBeat, 1332 i, 1333 currentScore; 1334 1335 if (config._f.length === 0) { 1336 getParsingFlags(config).invalidFormat = true; 1337 config._d = new Date(NaN); 1338 return; 1339 } 1340 1341 for (i = 0; i < config._f.length; i++) { 1342 currentScore = 0; 1343 tempConfig = copyConfig({}, config); 1344 if (config._useUTC != null) { 1345 tempConfig._useUTC = config._useUTC; 1346 } 1347 tempConfig._f = config._f[i]; 1348 configFromStringAndFormat(tempConfig); 1349 1350 if (!valid__isValid(tempConfig)) { 1351 continue; 1352 } 1353 1354 // if there is any input that was not parsed add a penalty for that format 1355 currentScore += getParsingFlags(tempConfig).charsLeftOver; 1356 1357 //or tokens 1358 currentScore += getParsingFlags(tempConfig).unusedTokens.length * 10; 1359 1360 getParsingFlags(tempConfig).score = currentScore; 1361 1362 if (scoreToBeat == null || currentScore < scoreToBeat) { 1363 scoreToBeat = currentScore; 1364 bestMoment = tempConfig; 1365 } 1366 } 1367 1368 extend(config, bestMoment || tempConfig); 1369 } 1370 1371 function configFromObject(config) { 1372 if (config._d) { 1373 return; 1374 } 1375 1376 var i = normalizeObjectUnits(config._i); 1377 config._a = [i.year, i.month, i.day || i.date, i.hour, i.minute, i.second, i.millisecond]; 1378 1379 configFromArray(config); 1380 } 1381 1382 function createFromConfig(config) { 1383 var res = new Moment(checkOverflow(prepareConfig(config))); 1384 if (res._nextDay) { 1385 // Adding is smart enough around DST 1386 res.add(1, 'd'); 1387 res._nextDay = undefined; 1388 } 1389 1390 return res; 1391 } 1392 1393 function prepareConfig(config) { 1394 var input = config._i, 1395 format = config._f; 1396 1397 config._locale = config._locale || locale_locales__getLocale(config._l); 1398 1399 if (input === null || (format === undefined && input === '')) { 1400 return valid__createInvalid({ 1401 nullInput: true 1402 }); 1403 } 1404 1405 if (typeof input === 'string') { 1406 config._i = input = config._locale.preparse(input); 1407 } 1408 1409 if (isMoment(input)) { 1410 return new Moment(checkOverflow(input)); 1411 } else if (isArray(format)) { 1412 configFromStringAndArray(config); 1413 } else if (format) { 1414 configFromStringAndFormat(config); 1415 } else if (isDate(input)) { 1416 config._d = input; 1417 } else { 1418 configFromInput(config); 1419 } 1420 1421 return config; 1422 } 1423 1424 function configFromInput(config) { 1425 var input = config._i; 1426 if (input === undefined) { 1427 config._d = new Date(); 1428 } else if (isDate(input)) { 1429 config._d = new Date(+input); 1430 } else if (typeof input === 'string') { 1431 configFromString(config); 1432 } else if (isArray(input)) { 1433 config._a = map(input.slice(0), function(obj) { 1434 return parseInt(obj, 10); 1435 }); 1436 configFromArray(config); 1437 } else if (typeof(input) === 'object') { 1438 configFromObject(config); 1439 } else if (typeof(input) === 'number') { 1440 // from milliseconds 1441 config._d = new Date(input); 1442 } else { 1443 utils_hooks__hooks.createFromInputFallback(config); 1444 } 1445 } 1446 1447 function createLocalOrUTC(input, format, locale, strict, isUTC) { 1448 var c = {}; 1449 1450 if (typeof(locale) === 'boolean') { 1451 strict = locale; 1452 locale = undefined; 1453 } 1454 // object construction must be done this way. 1455 // https://github.com/moment/moment/issues/1423 1456 c._isAMomentObject = true; 1457 c._useUTC = c._isUTC = isUTC; 1458 c._l = locale; 1459 c._i = input; 1460 c._f = format; 1461 c._strict = strict; 1462 1463 return createFromConfig(c); 1464 } 1465 1466 function local__createLocal(input, format, locale, strict) { 1467 return createLocalOrUTC(input, format, locale, strict, false); 1468 } 1469 1470 var prototypeMin = deprecate('moment().min is deprecated, use moment.min instead. https://github.com/moment/moment/issues/1548', 1471 1472 function() { 1473 var other = local__createLocal.apply(null, arguments); 1474 return other < this ? this : other; 1475 }); 1476 1477 var prototypeMax = deprecate('moment().max is deprecated, use moment.max instead. https://github.com/moment/moment/issues/1548', 1478 1479 function() { 1480 var other = local__createLocal.apply(null, arguments); 1481 return other > this ? this : other; 1482 }); 1483 1484 // Pick a moment m from moments so that m[fn](other) is true for all 1485 // other. This relies on the function fn to be transitive. 1486 // 1487 // moments should either be an array of moment objects or an array, whose 1488 // first element is an array of moment objects. 1489 function pickBy(fn, moments) { 1490 var res, i; 1491 if (moments.length === 1 && isArray(moments[0])) { 1492 moments = moments[0]; 1493 } 1494 if (!moments.length) { 1495 return local__createLocal(); 1496 } 1497 res = moments[0]; 1498 for (i = 1; i < moments.length; ++i) { 1499 if (!moments[i].isValid() || moments[i][fn](res)) { 1500 res = moments[i]; 1501 } 1502 } 1503 return res; 1504 } 1505 1506 // TODO: Use [].sort instead? 1507 function min() { 1508 var args = [].slice.call(arguments, 0); 1509 1510 return pickBy('isBefore', args); 1511 } 1512 1513 function max() { 1514 var args = [].slice.call(arguments, 0); 1515 1516 return pickBy('isAfter', args); 1517 } 1518 1519 function Duration(duration) { 1520 var normalizedInput = normalizeObjectUnits(duration), 1521 years = normalizedInput.year || 0, 1522 quarters = normalizedInput.quarter || 0, 1523 months = normalizedInput.month || 0, 1524 weeks = normalizedInput.week || 0, 1525 days = normalizedInput.day || 0, 1526 hours = normalizedInput.hour || 0, 1527 minutes = normalizedInput.minute || 0, 1528 seconds = normalizedInput.second || 0, 1529 milliseconds = normalizedInput.millisecond || 0; 1530 1531 // representation for dateAddRemove 1532 this._milliseconds = +milliseconds + seconds * 1e3 + // 1000 1533 minutes * 6e4 + // 1000 * 60 1534 hours * 36e5; // 1000 * 60 * 60 1535 // Because of dateAddRemove treats 24 hours as different from a 1536 // day when working around DST, we need to store them separately 1537 this._days = +days + weeks * 7; 1538 // It is impossible translate months into days without knowing 1539 // which months you are are talking about, so we have to store 1540 // it separately. 1541 this._months = +months + quarters * 3 + years * 12; 1542 1543 this._data = {}; 1544 1545 this._locale = locale_locales__getLocale(); 1546 1547 this._bubble(); 1548 } 1549 1550 function isDuration(obj) { 1551 return obj instanceof Duration; 1552 } 1553 1554 function offset(token, separator) { 1555 addFormatToken(token, 0, 0, function() { 1556 var offset = this.utcOffset(); 1557 var sign = '+'; 1558 if (offset < 0) { 1559 offset = -offset; 1560 sign = '-'; 1561 } 1562 return sign + zeroFill(~~ (offset / 60), 2) + separator + zeroFill(~~ (offset) % 60, 2); 1563 }); 1564 } 1565 1566 offset('Z', ':'); 1567 offset('ZZ', ''); 1568 1569 // PARSING 1570 1571 addRegexToken('Z', matchOffset); 1572 addRegexToken('ZZ', matchOffset); 1573 addParseToken(['Z', 'ZZ'], function(input, array, config) { 1574 config._useUTC = true; 1575 config._tzm = offsetFromString(input); 1576 }); 1577 1578 // HELPERS 1579 1580 // timezone chunker 1581 // '+10:00' > ['10', '00'] 1582 // '-1530' > ['-15', '30'] 1583 var chunkOffset = /([\+\-]|\d\d)/gi; 1584 1585 function offsetFromString(string) { 1586 var matches = ((string || '').match(matchOffset) || []); 1587 var chunk = matches[matches.length - 1] || []; 1588 var parts = (chunk + '').match(chunkOffset) || ['-', 0, 0]; 1589 var minutes = +(parts[1] * 60) + toInt(parts[2]); 1590 1591 return parts[0] === '+' ? minutes : -minutes; 1592 } 1593 1594 // Return a moment from input, that is local/utc/zone equivalent to model. 1595 function cloneWithOffset(input, model) { 1596 var res, diff; 1597 if (model._isUTC) { 1598 res = model.clone(); 1599 diff = (isMoment(input) || isDate(input) ? +input : +local__createLocal(input)) - (+res); 1600 // Use low-level api, because this fn is low-level api. 1601 res._d.setTime(+res._d + diff); 1602 utils_hooks__hooks.updateOffset(res, false); 1603 return res; 1604 } else { 1605 return local__createLocal(input).local(); 1606 } 1607 } 1608 1609 function getDateOffset(m) { 1610 // On Firefox.24 Date#getTimezoneOffset returns a floating point. 1611 // https://github.com/moment/moment/pull/1871 1612 return -Math.round(m._d.getTimezoneOffset() / 15) * 15; 1613 } 1614 1615 // HOOKS 1616 1617 // This function will be called whenever a moment is mutated. 1618 // It is intended to keep the offset in sync with the timezone. 1619 utils_hooks__hooks.updateOffset = function() {}; 1620 1621 // MOMENTS 1622 1623 // keepLocalTime = true means only change the timezone, without 1624 // affecting the local hour. So 5:31:26 +0300 --[utcOffset(2, true)]--> 1625 // 5:31:26 +0200 It is possible that 5:31:26 doesn't exist with offset 1626 // +0200, so we adjust the time as needed, to be valid. 1627 // 1628 // Keeping the time actually adds/subtracts (one hour) 1629 // from the actual represented time. That is why we call updateOffset 1630 // a second time. In case it wants us to change the offset again 1631 // _changeInProgress == true case, then we have to adjust, because 1632 // there is no such time in the given timezone. 1633 function getSetOffset(input, keepLocalTime) { 1634 var offset = this._offset || 0, 1635 localAdjust; 1636 if (input != null) { 1637 if (typeof input === 'string') { 1638 input = offsetFromString(input); 1639 } 1640 if (Math.abs(input) < 16) { 1641 input = input * 60; 1642 } 1643 if (!this._isUTC && keepLocalTime) { 1644 localAdjust = getDateOffset(this); 1645 } 1646 this._offset = input; 1647 this._isUTC = true; 1648 if (localAdjust != null) { 1649 this.add(localAdjust, 'm'); 1650 } 1651 if (offset !== input) { 1652 if (!keepLocalTime || this._changeInProgress) { 1653 add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false); 1654 } else if (!this._changeInProgress) { 1655 this._changeInProgress = true; 1656 utils_hooks__hooks.updateOffset(this, true); 1657 this._changeInProgress = null; 1658 } 1659 } 1660 return this; 1661 } else { 1662 return this._isUTC ? offset : getDateOffset(this); 1663 } 1664 } 1665 1666 function getSetZone(input, keepLocalTime) { 1667 if (input != null) { 1668 if (typeof input !== 'string') { 1669 input = -input; 1670 } 1671 1672 this.utcOffset(input, keepLocalTime); 1673 1674 return this; 1675 } else { 1676 return -this.utcOffset(); 1677 } 1678 } 1679 1680 function setOffsetToUTC(keepLocalTime) { 1681 return this.utcOffset(0, keepLocalTime); 1682 } 1683 1684 function setOffsetToLocal(keepLocalTime) { 1685 if (this._isUTC) { 1686 this.utcOffset(0, keepLocalTime); 1687 this._isUTC = false; 1688 1689 if (keepLocalTime) { 1690 this.subtract(getDateOffset(this), 'm'); 1691 } 1692 } 1693 return this; 1694 } 1695 1696 function setOffsetToParsedOffset() { 1697 if (this._tzm) { 1698 this.utcOffset(this._tzm); 1699 } else if (typeof this._i === 'string') { 1700 this.utcOffset(offsetFromString(this._i)); 1701 } 1702 return this; 1703 } 1704 1705 function hasAlignedHourOffset(input) { 1706 input = input ? local__createLocal(input).utcOffset() : 0; 1707 1708 return (this.utcOffset() - input) % 60 === 0; 1709 } 1710 1711 function isDaylightSavingTime() { 1712 return ( 1713 this.utcOffset() > this.clone().month(0).utcOffset() || this.utcOffset() > this.clone().month(5).utcOffset()); 1714 } 1715 1716 function isDaylightSavingTimeShifted() { 1717 if (typeof this._isDSTShifted !== 'undefined') { 1718 return this._isDSTShifted; 1719 } 1720 1721 var c = {}; 1722 1723 copyConfig(c, this); 1724 c = prepareConfig(c); 1725 1726 if (c._a) { 1727 var other = c._isUTC ? create_utc__createUTC(c._a) : local__createLocal(c._a); 1728 this._isDSTShifted = this.isValid() && compareArrays(c._a, other.toArray()) > 0; 1729 } else { 1730 this._isDSTShifted = false; 1731 } 1732 1733 return this._isDSTShifted; 1734 } 1735 1736 function isLocal() { 1737 return !this._isUTC; 1738 } 1739 1740 function isUtcOffset() { 1741 return this._isUTC; 1742 } 1743 1744 function isUtc() { 1745 return this._isUTC && this._offset === 0; 1746 } 1747 1748 var aspNetRegex = /(\-)?(?:(\d*)\.)?(\d+)\:(\d+)(?:\:(\d+)\.?(\d{3})?)?/; 1749 1750 // from http://docs.closure-library.googlecode.com/git/closure_goog_date_date.js.source.html 1751 // somewhat more in line with 4.4.3.2 2004 spec, but allows decimal anywhere 1752 var create__isoRegex = /^(-)?P(?:(?:([0-9,.]*)Y)?(?:([0-9,.]*)M)?(?:([0-9,.]*)D)?(?:T(?:([0-9,.]*)H)?(?:([0-9,.]*)M)?(?:([0-9,.]*)S)?)?|([0-9,.]*)W)$/; 1753 1754 function create__createDuration(input, key) { 1755 var duration = input, 1756 // matching against regexp is expensive, do it on demand 1757 match = null, 1758 sign, 1759 ret, 1760 diffRes; 1761 1762 if (isDuration(input)) { 1763 duration = { 1764 ms: input._milliseconds, 1765 d: input._days, 1766 M: input._months 1767 }; 1768 } else if (typeof input === 'number') { 1769 duration = {}; 1770 if (key) { 1771 duration[key] = input; 1772 } else { 1773 duration.milliseconds = input; 1774 } 1775 } else if ( !! (match = aspNetRegex.exec(input))) { 1776 sign = (match[1] === '-') ? -1 : 1; 1777 duration = { 1778 y: 0, 1779 d: toInt(match[DATE]) * sign, 1780 h: toInt(match[HOUR]) * sign, 1781 m: toInt(match[MINUTE]) * sign, 1782 s: toInt(match[SECOND]) * sign, 1783 ms: toInt(match[MILLISECOND]) * sign 1784 }; 1785 } else if ( !! (match = create__isoRegex.exec(input))) { 1786 sign = (match[1] === '-') ? -1 : 1; 1787 duration = { 1788 y: parseIso(match[2], sign), 1789 M: parseIso(match[3], sign), 1790 d: parseIso(match[4], sign), 1791 h: parseIso(match[5], sign), 1792 m: parseIso(match[6], sign), 1793 s: parseIso(match[7], sign), 1794 w: parseIso(match[8], sign) 1795 }; 1796 } else if (duration == null) { // checks for null or undefined 1797 duration = {}; 1798 } else if (typeof duration === 'object' && ('from' in duration || 'to' in duration)) { 1799 diffRes = momentsDifference(local__createLocal(duration.from), local__createLocal(duration.to)); 1800 1801 duration = {}; 1802 duration.ms = diffRes.milliseconds; 1803 duration.M = diffRes.months; 1804 } 1805 1806 ret = new Duration(duration); 1807 1808 if (isDuration(input) && hasOwnProp(input, '_locale')) { 1809 ret._locale = input._locale; 1810 } 1811 1812 return ret; 1813 } 1814 1815 create__createDuration.fn = Duration.prototype; 1816 1817 function parseIso(inp, sign) { 1818 // We'd normally use ~~inp for this, but unfortunately it also 1819 // converts floats to ints. 1820 // inp may be undefined, so careful calling replace on it. 1821 var res = inp && parseFloat(inp.replace(',', '.')); 1822 // apply sign while we're at it 1823 return (isNaN(res) ? 0 : res) * sign; 1824 } 1825 1826 function positiveMomentsDifference(base, other) { 1827 var res = { 1828 milliseconds: 0, 1829 months: 0 1830 }; 1831 1832 res.months = other.month() - base.month() + (other.year() - base.year()) * 12; 1833 if (base.clone().add(res.months, 'M').isAfter(other)) { 1834 --res.months; 1835 } 1836 1837 res.milliseconds = +other - +(base.clone().add(res.months, 'M')); 1838 1839 return res; 1840 } 1841 1842 function momentsDifference(base, other) { 1843 var res; 1844 other = cloneWithOffset(other, base); 1845 if (base.isBefore(other)) { 1846 res = positiveMomentsDifference(base, other); 1847 } else { 1848 res = positiveMomentsDifference(other, base); 1849 res.milliseconds = -res.milliseconds; 1850 res.months = -res.months; 1851 } 1852 1853 return res; 1854 } 1855 1856 function createAdder(direction, name) { 1857 return function(val, period) { 1858 var dur, tmp; 1859 //invert the arguments, but complain about it 1860 if (period !== null && !isNaN(+period)) { 1861 deprecateSimple(name, 'moment().' + name + '(period, number) is deprecated. Please use moment().' + name + '(number, period).'); 1862 tmp = val; 1863 val = period; 1864 period = tmp; 1865 } 1866 1867 val = typeof val === 'string' ? +val : val; 1868 dur = create__createDuration(val, period); 1869 add_subtract__addSubtract(this, dur, direction); 1870 return this; 1871 }; 1872 } 1873 1874 function add_subtract__addSubtract(mom, duration, isAdding, updateOffset) { 1875 var milliseconds = duration._milliseconds, 1876 days = duration._days, 1877 months = duration._months; 1878 updateOffset = updateOffset == null ? true : updateOffset; 1879 1880 if (milliseconds) { 1881 mom._d.setTime(+mom._d + milliseconds * isAdding); 1882 } 1883 if (days) { 1884 get_set__set(mom, 'Date', get_set__get(mom, 'Date') + days * isAdding); 1885 } 1886 if (months) { 1887 setMonth(mom, get_set__get(mom, 'Month') + months * isAdding); 1888 } 1889 if (updateOffset) { 1890 utils_hooks__hooks.updateOffset(mom, days || months); 1891 } 1892 } 1893 1894 var add_subtract__add = createAdder(1, 'add'); 1895 var add_subtract__subtract = createAdder(-1, 'subtract'); 1896 1897 function moment_calendar__calendar(time, formats) { 1898 // We want to compare the start of today, vs this. 1899 // Getting start-of-today depends on whether we're local/utc/offset or not. 1900 var now = time || local__createLocal(), 1901 sod = cloneWithOffset(now, this).startOf('day'), 1902 diff = this.diff(sod, 'days', true), 1903 format = diff < -6 ? 'sameElse' : diff < -1 ? 'lastWeek' : diff < 0 ? 'lastDay' : diff < 1 ? 'sameDay' : diff < 2 ? 'nextDay' : diff < 7 ? 'nextWeek' : 'sameElse'; 1904 return this.format(formats && formats[format] || this.localeData().calendar(format, this, local__createLocal(now))); 1905 } 1906 1907 function clone() { 1908 return new Moment(this); 1909 } 1910 1911 function isAfter(input, units) { 1912 var inputMs; 1913 units = normalizeUnits(typeof units !== 'undefined' ? units : 'millisecond'); 1914 if (units === 'millisecond') { 1915 input = isMoment(input) ? input : local__createLocal(input); 1916 return +this > +input; 1917 } else { 1918 inputMs = isMoment(input) ? +input : +local__createLocal(input); 1919 return inputMs < +this.clone().startOf(units); 1920 } 1921 } 1922 1923 function isBefore(input, units) { 1924 var inputMs; 1925 units = normalizeUnits(typeof units !== 'undefined' ? units : 'millisecond'); 1926 if (units === 'millisecond') { 1927 input = isMoment(input) ? input : local__createLocal(input); 1928 return +this < +input; 1929 } else { 1930 inputMs = isMoment(input) ? +input : +local__createLocal(input); 1931 return +this.clone().endOf(units) < inputMs; 1932 } 1933 } 1934 1935 function isBetween(from, to, units) { 1936 return this.isAfter(from, units) && this.isBefore(to, units); 1937 } 1938 1939 function isSame(input, units) { 1940 var inputMs; 1941 units = normalizeUnits(units || 'millisecond'); 1942 if (units === 'millisecond') { 1943 input = isMoment(input) ? input : local__createLocal(input); 1944 return +this === +input; 1945 } else { 1946 inputMs = +local__createLocal(input); 1947 return +(this.clone().startOf(units)) <= inputMs && inputMs <= +(this.clone().endOf(units)); 1948 } 1949 } 1950 1951 function diff(input, units, asFloat) { 1952 var that = cloneWithOffset(input, this), 1953 zoneDelta = (that.utcOffset() - this.utcOffset()) * 6e4, 1954 delta, output; 1955 1956 units = normalizeUnits(units); 1957 1958 if (units === 'year' || units === 'month' || units === 'quarter') { 1959 output = monthDiff(this, that); 1960 if (units === 'quarter') { 1961 output = output / 3; 1962 } else if (units === 'year') { 1963 output = output / 12; 1964 } 1965 } else { 1966 delta = this - that; 1967 output = units === 'second' ? delta / 1e3 : // 1000 1968 units === 'minute' ? delta / 6e4 : // 1000 * 60 1969 units === 'hour' ? delta / 36e5 : // 1000 * 60 * 60 1970 units === 'day' ? (delta - zoneDelta) / 864e5 : // 1000 * 60 * 60 * 24, negate dst 1971 units === 'week' ? (delta - zoneDelta) / 6048e5 : // 1000 * 60 * 60 * 24 * 7, negate dst 1972 delta; 1973 } 1974 return asFloat ? output : absFloor(output); 1975 } 1976 1977 function monthDiff(a, b) { 1978 // difference in months 1979 var wholeMonthDiff = ((b.year() - a.year()) * 12) + (b.month() - a.month()), 1980 // b is in (anchor - 1 month, anchor + 1 month) 1981 anchor = a.clone().add(wholeMonthDiff, 'months'), 1982 anchor2, adjust; 1983 1984 if (b - anchor < 0) { 1985 anchor2 = a.clone().add(wholeMonthDiff - 1, 'months'); 1986 // linear across the month 1987 adjust = (b - anchor) / (anchor - anchor2); 1988 } else { 1989 anchor2 = a.clone().add(wholeMonthDiff + 1, 'months'); 1990 // linear across the month 1991 adjust = (b - anchor) / (anchor2 - anchor); 1992 } 1993 1994 return -(wholeMonthDiff + adjust); 1995 } 1996 1997 utils_hooks__hooks.defaultFormat = 'YYYY-MM-DDTHH:mm:ssZ'; 1998 1999 function toString() { 2000 return this.clone().locale('en').format('ddd MMM DD YYYY HH:mm:ss [GMT]ZZ'); 2001 } 2002 2003 function moment_format__toISOString() { 2004 var m = this.clone().utc(); 2005 if (0 < m.year() && m.year() <= 9999) { 2006 if ('function' === typeof Date.prototype.toISOString) { 2007 // native implementation is ~50x faster, use it when we can 2008 return this.toDate().toISOString(); 2009 } else { 2010 return formatMoment(m, 'YYYY-MM-DD[T]HH:mm:ss.SSS[Z]'); 2011 } 2012 } else { 2013 return formatMoment(m, 'YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]'); 2014 } 2015 } 2016 2017 function format(inputString) { 2018 var output = formatMoment(this, inputString || utils_hooks__hooks.defaultFormat);
2019 return this.localeData().postformat(output); 2020 } 2021 2022 function from(time, withoutSuffix) { 2023 if (!this.isValid()) { 2024 return this.localeData().invalidDate(); 2025 } 2026 return create__createDuration({ 2027 to: this, 2028 from: time 2029 }).locale(this.locale()).humanize(!withoutSuffix); 2030 } 2031 2032 function fromNow(withoutSuffix) { 2033 return this.from(local__createLocal(), withoutSuffix); 2034 } 2035 2036 function to(time, withoutSuffix) { 2037 if (!this.isValid()) { 2038 return this.localeData().invalidDate(); 2039 } 2040 return create__createDuration({ 2041 from: this, 2042 to: time 2043 }).locale(this.locale()).humanize(!withoutSuffix); 2044 } 2045 2046 function toNow(withoutSuffix) { 2047 return this.to(local__createLocal(), withoutSuffix); 2048 } 2049 2050 function locale(key) { 2051 var newLocaleData; 2052 2053 if (key === undefined) { 2054 return this._locale._abbr; 2055 } else { 2056 newLocaleData = locale_locales__getLocale(key); 2057 if (newLocaleData != null) { 2058 this._locale = newLocaleData; 2059 } 2060 return this; 2061 } 2062 } 2063 2064 var lang = deprecate('moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.', 2065 2066 function(key) { 2067 if (key === undefined) { 2068 return this.localeData(); 2069 } else { 2070 return this.locale(key); 2071 } 2072 }); 2073 2074 function localeData() { 2075 return this._locale; 2076 } 2077 2078 function startOf(units) { 2079 units = normalizeUnits(units); 2080 // the following switch intentionally omits break keywords 2081 // to utilize falling through the cases. 2082 switch (units) { 2083 case 'year': 2084 this.month(0); 2085 /* falls through */ 2086 case 'quarter': 2087 case 'month': 2088 this.date(1); 2089 /* falls through */ 2090 case 'week': 2091 case 'isoWeek': 2092 case 'day': 2093 this.hours(0); 2094 /* falls through */ 2095 case 'hour': 2096 this.minutes(0); 2097 /* falls through */ 2098 case 'minute': 2099 this.seconds(0); 2100 /* falls through */ 2101 case 'second': 2102 this.milliseconds(0); 2103 } 2104 2105 // weeks are a special case 2106 if (units === 'week') { 2107 this.weekday(0); 2108 } 2109 if (units === 'isoWeek') { 2110 this.isoWeekday(1); 2111 } 2112 2113 // quarters are also special 2114 if (units === 'quarter') { 2115 this.month(Math.floor(this.month() / 3) * 3); 2116 } 2117 2118 return this; 2119 } 2120 2121 function endOf(units) { 2122 units = normalizeUnits(units); 2123 if (units === undefined || units === 'millisecond') { 2124 return this; 2125 } 2126 return this.startOf(units).add(1, (units === 'isoWeek' ? 'week' : units)).subtract(1, 'ms'); 2127 } 2128 2129 function to_type__valueOf() { 2130 return +this._d - ((this._offset || 0) * 60000); 2131 } 2132 2133 function unix() { 2134 return Math.floor(+this / 1000); 2135 } 2136 2137 function toDate() { 2138 return this._offset ? new Date(+this) : this._d; 2139 } 2140 2141 function toArray() { 2142 var m = this; 2143 return [m.year(), m.month(), m.date(), m.hour(), m.minute(), m.second(), m.millisecond()]; 2144 } 2145 2146 function toObject() { 2147 var m = this; 2148 return { 2149 years: m.year(), 2150 months: m.month(), 2151 date: m.date(), 2152 hours: m.hours(), 2153 minutes: m.minutes(), 2154 seconds: m.seconds(), 2155 milliseconds: m.milliseconds() 2156 }; 2157 } 2158 2159 function moment_valid__isValid() { 2160 return valid__isValid(this); 2161 } 2162 2163 function parsingFlags() { 2164 return extend({}, getParsingFlags(this)); 2165 } 2166
vendor: 30,014 bytes, lines 2167-3103
2167 function invalidAt() { 2168 return getParsingFlags(this).overflow; 2169 } 2170 2171 addFormatToken(0, ['gg', 2], 0, function() { 2172 return this.weekYear() % 100; 2173 }); 2174 2175 addFormatToken(0, ['GG', 2], 0, function() { 2176 return this.isoWeekYear() % 100; 2177 }); 2178 2179 function addWeekYearFormatToken(token, getter) { 2180 addFormatToken(0, [token, token.length], 0, getter); 2181 } 2182 2183 addWeekYearFormatToken('gggg', 'weekYear'); 2184 addWeekYearFormatToken('ggggg', 'weekYear'); 2185 addWeekYearFormatToken('GGGG', 'isoWeekYear'); 2186 addWeekYearFormatToken('GGGGG', 'isoWeekYear'); 2187 2188 // ALIASES 2189 2190 addUnitAlias('weekYear', 'gg'); 2191 addUnitAlias('isoWeekYear', 'GG'); 2192 2193 // PARSING 2194 2195 addRegexToken('G', matchSigned); 2196 addRegexToken('g', matchSigned); 2197 addRegexToken('GG', match1to2, match2); 2198 addRegexToken('gg', match1to2, match2); 2199 addRegexToken('GGGG', match1to4, match4); 2200 addRegexToken('gggg', match1to4, match4); 2201 addRegexToken('GGGGG', match1to6, match6); 2202 addRegexToken('ggggg', match1to6, match6); 2203 2204 addWeekParseToken(['gggg', 'ggggg', 'GGGG', 'GGGGG'], function(input, week, config, token) { 2205 week[token.substr(0, 2)] = toInt(input); 2206 }); 2207 2208 addWeekParseToken(['gg', 'GG'], function(input, week, config, token) { 2209 week[token] = utils_hooks__hooks.parseTwoDigitYear(input); 2210 }); 2211 2212 // HELPERS 2213 2214 function weeksInYear(year, dow, doy) { 2215 return weekOfYear(local__createLocal([year, 11, 31 + dow - doy]), dow, doy).week; 2216 } 2217 2218 // MOMENTS 2219 2220 function getSetWeekYear(input) { 2221 var year = weekOfYear(this, this.localeData()._week.dow, this.localeData()._week.doy).year; 2222 return input == null ? year : this.add((input - year), 'y'); 2223 } 2224 2225 function getSetISOWeekYear(input) { 2226 var year = weekOfYear(this, 1, 4).year; 2227 return input == null ? year : this.add((input - year), 'y'); 2228 } 2229 2230 function getISOWeeksInYear() { 2231 return weeksInYear(this.year(), 1, 4); 2232 } 2233 2234 function getWeeksInYear() { 2235 var weekInfo = this.localeData()._week; 2236 return weeksInYear(this.year(), weekInfo.dow, weekInfo.doy); 2237 } 2238 2239 addFormatToken('Q', 0, 0, 'quarter'); 2240 2241 // ALIASES 2242 2243 addUnitAlias('quarter', 'Q'); 2244 2245 // PARSING 2246 2247 addRegexToken('Q', match1); 2248 addParseToken('Q', function(input, array) { 2249 array[MONTH] = (toInt(input) - 1) * 3; 2250 }); 2251 2252 // MOMENTS 2253 2254 function getSetQuarter(input) { 2255 return input == null ? Math.ceil((this.month() + 1) / 3) : this.month((input - 1) * 3 + this.month() % 3); 2256 } 2257 2258 addFormatToken('D', ['DD', 2], 'Do', 'date'); 2259 2260 // ALIASES 2261 2262 addUnitAlias('date', 'D'); 2263 2264 // PARSING 2265 2266 addRegexToken('D', match1to2); 2267 addRegexToken('DD', match1to2, match2); 2268 addRegexToken('Do', function(isStrict, locale) { 2269 return isStrict ? locale._ordinalParse : locale._ordinalParseLenient; 2270 }); 2271 2272 addParseToken(['D', 'DD'], DATE); 2273 addParseToken('Do', function(input, array) { 2274 array[DATE] = toInt(input.match(match1to2)[0], 10); 2275 }); 2276 2277 // MOMENTS 2278 2279 var getSetDayOfMonth = makeGetSet('Date', true); 2280 2281 addFormatToken('d', 0, 'do', 'day'); 2282 2283 addFormatToken('dd', 0, 0, function(format) { 2284 return this.localeData().weekdaysMin(this, format); 2285 }); 2286 2287 addFormatToken('ddd', 0, 0, function(format) { 2288 return this.localeData().weekdaysShort(this, format); 2289 }); 2290 2291 addFormatToken('dddd', 0, 0, function(format) { 2292 return this.localeData().weekdays(this, format); 2293 }); 2294 2295 addFormatToken('e', 0, 0, 'weekday'); 2296 addFormatToken('E', 0, 0, 'isoWeekday'); 2297 2298 // ALIASES 2299 2300 addUnitAlias('day', 'd'); 2301 addUnitAlias('weekday', 'e'); 2302 addUnitAlias('isoWeekday', 'E'); 2303 2304 // PARSING 2305 2306 addRegexToken('d', match1to2); 2307 addRegexToken('e', match1to2); 2308 addRegexToken('E', match1to2); 2309 addRegexToken('dd', matchWord); 2310 addRegexToken('ddd', matchWord); 2311 addRegexToken('dddd', matchWord); 2312 2313 addWeekParseToken(['dd', 'ddd', 'dddd'], function(input, week, config) { 2314 var weekday = config._locale.weekdaysParse(input); 2315 // if we didn't get a weekday name, mark the date as invalid 2316 if (weekday != null) { 2317 week.d = weekday; 2318 } else { 2319 getParsingFlags(config).invalidWeekday = input; 2320 } 2321 }); 2322 2323 addWeekParseToken(['d', 'e', 'E'], function(input, week, config, token) { 2324 week[token] = toInt(input); 2325 }); 2326 2327 // HELPERS 2328 2329 function parseWeekday(input, locale) { 2330 if (typeof input !== 'string') { 2331 return input; 2332 } 2333 2334 if (!isNaN(input)) { 2335 return parseInt(input, 10); 2336 } 2337 2338 input = locale.weekdaysParse(input); 2339 if (typeof input === 'number') { 2340 return input; 2341 } 2342 2343 return null; 2344 } 2345 2346 // LOCALES 2347 2348 var defaultLocaleWeekdays = 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'); 2349 2350 function localeWeekdays(m) { 2351 return this._weekdays[m.day()]; 2352 } 2353 2354 var defaultLocaleWeekdaysShort = 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'); 2355 2356 function localeWeekdaysShort(m) { 2357 return this._weekdaysShort[m.day()]; 2358 } 2359 2360 var defaultLocaleWeekdaysMin = 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'); 2361 2362 function localeWeekdaysMin(m) { 2363 return this._weekdaysMin[m.day()]; 2364 } 2365 2366 function localeWeekdaysParse(weekdayName) { 2367 var i, mom, regex; 2368 2369 this._weekdaysParse = this._weekdaysParse || []; 2370 2371 for (i = 0; i < 7; i++) { 2372 // make the regex if we don't have it already 2373 if (!this._weekdaysParse[i]) { 2374 mom = local__createLocal([2000, 1]).day(i); 2375 regex = '^' + this.weekdays(mom, '') + '|^' + this.weekdaysShort(mom, '') + '|^' + this.weekdaysMin(mom, ''); 2376 this._weekdaysParse[i] = new RegExp(regex.replace('.', ''), 'i'); 2377 } 2378 // test the regex 2379 if (this._weekdaysParse[i].test(weekdayName)) { 2380 return i; 2381 } 2382 } 2383 } 2384 2385 // MOMENTS 2386 2387 function getSetDayOfWeek(input) { 2388 var day = this._isUTC ? this._d.getUTCDay() : this._d.getDay(); 2389 if (input != null) { 2390 input = parseWeekday(input, this.localeData()); 2391 return this.add(input - day, 'd'); 2392 } else { 2393 return day; 2394 } 2395 } 2396 2397 function getSetLocaleDayOfWeek(input) { 2398 var weekday = (this.day() + 7 - this.localeData()._week.dow) % 7; 2399 return input == null ? weekday : this.add(input - weekday, 'd'); 2400 } 2401 2402 function getSetISODayOfWeek(input) { 2403 // behaves the same as moment#day except 2404 // as a getter, returns 7 instead of 0 (1-7 range instead of 0-6) 2405 // as a setter, sunday should belong to the previous week. 2406 return input == null ? this.day() || 7 : this.day(this.day() % 7 ? input : input - 7); 2407 } 2408 2409 addFormatToken('H', ['HH', 2], 0, 'hour'); 2410 addFormatToken('h', ['hh', 2], 0, function() { 2411 return this.hours() % 12 || 12; 2412 }); 2413 2414 function meridiem(token, lowercase) { 2415 addFormatToken(token, 0, 0, function() { 2416 return this.localeData().meridiem(this.hours(), this.minutes(), lowercase); 2417 }); 2418 } 2419 2420 meridiem('a', true); 2421 meridiem('A', false); 2422 2423 // ALIASES 2424 2425 addUnitAlias('hour', 'h'); 2426 2427 // PARSING 2428 2429 function matchMeridiem(isStrict, locale) { 2430 return locale._meridiemParse; 2431 } 2432 2433 addRegexToken('a', matchMeridiem); 2434 addRegexToken('A', matchMeridiem); 2435 addRegexToken('H', match1to2); 2436 addRegexToken('h', match1to2); 2437 addRegexToken('HH', match1to2, match2); 2438 addRegexToken('hh', match1to2, match2); 2439 2440 addParseToken(['H', 'HH'], HOUR); 2441 addParseToken(['a', 'A'], function(input, array, config) { 2442 config._isPm = config._locale.isPM(input); 2443 config._meridiem = input; 2444 }); 2445 addParseToken(['h', 'hh'], function(input, array, config) { 2446 array[HOUR] = toInt(input); 2447 getParsingFlags(config).bigHour = true; 2448 }); 2449 2450 // LOCALES 2451 2452 function localeIsPM(input) { 2453 // IE8 Quirks Mode & IE7 Standards Mode do not allow accessing strings like arrays 2454 // Using charAt should be more compatible. 2455 return ((input + '').toLowerCase().charAt(0) === 'p'); 2456 } 2457 2458 var defaultLocaleMeridiemParse = /[ap]\.?m?\.?/i; 2459 2460 function localeMeridiem(hours, minutes, isLower) { 2461 if (hours > 11) { 2462 return isLower ? 'pm' : 'PM'; 2463 } else { 2464 return isLower ? 'am' : 'AM'; 2465 } 2466 } 2467 2468 2469 // MOMENTS 2470 2471 // Setting the hour should keep the time, because the user explicitly 2472 // specified which hour he wants. So trying to maintain the same hour (in 2473 // a new timezone) makes sense. Adding/subtracting hours does not follow 2474 // this rule. 2475 var getSetHour = makeGetSet('Hours', true); 2476 2477 addFormatToken('m', ['mm', 2], 0, 'minute'); 2478 2479 // ALIASES 2480 2481 addUnitAlias('minute', 'm'); 2482 2483 // PARSING 2484 2485 addRegexToken('m', match1to2); 2486 addRegexToken('mm', match1to2, match2); 2487 addParseToken(['m', 'mm'], MINUTE); 2488 2489 // MOMENTS 2490 2491 var getSetMinute = makeGetSet('Minutes', false); 2492 2493 addFormatToken('s', ['ss', 2], 0, 'second'); 2494 2495 // ALIASES 2496 2497 addUnitAlias('second', 's'); 2498 2499 // PARSING 2500 2501 addRegexToken('s', match1to2); 2502 addRegexToken('ss', match1to2, match2); 2503 addParseToken(['s', 'ss'], SECOND); 2504 2505 // MOMENTS 2506 2507 var getSetSecond = makeGetSet('Seconds', false); 2508 2509 addFormatToken('S', 0, 0, function() { 2510 return~~ (this.millisecond() / 100); 2511 }); 2512 2513 addFormatToken(0, ['SS', 2], 0, function() { 2514 return~~ (this.millisecond() / 10); 2515 }); 2516 2517 addFormatToken(0, ['SSS', 3], 0, 'millisecond'); 2518 addFormatToken(0, ['SSSS', 4], 0, function() { 2519 return this.millisecond() * 10; 2520 }); 2521 addFormatToken(0, ['SSSSS', 5], 0, function() { 2522 return this.millisecond() * 100; 2523 }); 2524 addFormatToken(0, ['SSSSSS', 6], 0, function() { 2525 return this.millisecond() * 1000; 2526 }); 2527 addFormatToken(0, ['SSSSSSS', 7], 0, function() { 2528 return this.millisecond() * 10000; 2529 }); 2530 addFormatToken(0, ['SSSSSSSS', 8], 0, function() { 2531 return this.millisecond() * 100000; 2532 }); 2533 addFormatToken(0, ['SSSSSSSSS', 9], 0, function() { 2534 return this.millisecond() * 1000000; 2535 }); 2536 2537 2538 // ALIASES 2539 2540 addUnitAlias('millisecond', 'ms'); 2541 2542 // PARSING 2543 2544 addRegexToken('S', match1to3, match1); 2545 addRegexToken('SS', match1to3, match2); 2546 addRegexToken('SSS', match1to3, match3); 2547 2548 var token; 2549 for (token = 'SSSS'; token.length <= 9; token += 'S') { 2550 addRegexToken(token, matchUnsigned); 2551 } 2552 2553 function parseMs(input, array) { 2554 array[MILLISECOND] = toInt(('0.' + input) * 1000); 2555 } 2556 2557 for (token = 'S'; token.length <= 9; token += 'S') { 2558 addParseToken(token, parseMs); 2559 } 2560 // MOMENTS 2561 2562 var getSetMillisecond = makeGetSet('Milliseconds', false); 2563 2564 addFormatToken('z', 0, 0, 'zoneAbbr'); 2565 addFormatToken('zz', 0, 0, 'zoneName'); 2566 2567 // MOMENTS 2568 2569 function getZoneAbbr() { 2570 return this._isUTC ? 'UTC' : ''; 2571 } 2572 2573 function getZoneName() { 2574 return this._isUTC ? 'Coordinated Universal Time' : ''; 2575 } 2576 2577 var momentPrototype__proto = Moment.prototype; 2578 2579 momentPrototype__proto.add = add_subtract__add; 2580 momentPrototype__proto.calendar = moment_calendar__calendar; 2581 momentPrototype__proto.clone = clone; 2582 momentPrototype__proto.diff = diff; 2583 momentPrototype__proto.endOf = endOf; 2584 momentPrototype__proto.format = format; 2585 momentPrototype__proto.from = from; 2586 momentPrototype__proto.fromNow = fromNow; 2587 momentPrototype__proto.to = to; 2588 momentPrototype__proto.toNow = toNow; 2589 momentPrototype__proto.get = getSet; 2590 momentPrototype__proto.invalidAt = invalidAt; 2591 momentPrototype__proto.isAfter = isAfter; 2592 momentPrototype__proto.isBefore = isBefore; 2593 momentPrototype__proto.isBetween = isBetween; 2594 momentPrototype__proto.isSame = isSame; 2595 momentPrototype__proto.isValid = moment_valid__isValid; 2596 momentPrototype__proto.lang = lang; 2597 momentPrototype__proto.locale = locale; 2598 momentPrototype__proto.localeData = localeData; 2599 momentPrototype__proto.max = prototypeMax; 2600 momentPrototype__proto.min = prototypeMin; 2601 momentPrototype__proto.parsingFlags = parsingFlags; 2602 momentPrototype__proto.set = getSet; 2603 momentPrototype__proto.startOf = startOf; 2604 momentPrototype__proto.subtract = add_subtract__subtract; 2605 momentPrototype__proto.toArray = toArray; 2606 momentPrototype__proto.toObject = toObject; 2607 momentPrototype__proto.toDate = toDate; 2608 momentPrototype__proto.toISOString = moment_format__toISOString; 2609 momentPrototype__proto.toJSON = moment_format__toISOString; 2610 momentPrototype__proto.toString = toString; 2611 momentPrototype__proto.unix = unix; 2612 momentPrototype__proto.valueOf = to_type__valueOf; 2613 2614 // Year 2615 momentPrototype__proto.year = getSetYear; 2616 momentPrototype__proto.isLeapYear = getIsLeapYear; 2617 2618 // Week Year 2619 momentPrototype__proto.weekYear = getSetWeekYear; 2620 momentPrototype__proto.isoWeekYear = getSetISOWeekYear; 2621 2622 // Quarter 2623 momentPrototype__proto.quarter = momentPrototype__proto.quarters = getSetQuarter; 2624 2625 // Month 2626 momentPrototype__proto.month = getSetMonth; 2627 momentPrototype__proto.daysInMonth = getDaysInMonth; 2628 2629 // Week 2630 momentPrototype__proto.week = momentPrototype__proto.weeks = getSetWeek; 2631 momentPrototype__proto.isoWeek = momentPrototype__proto.isoWeeks = getSetISOWeek; 2632 momentPrototype__proto.weeksInYear = getWeeksInYear; 2633 momentPrototype__proto.isoWeeksInYear = getISOWeeksInYear; 2634 2635 // Day 2636 momentPrototype__proto.date = getSetDayOfMonth; 2637 momentPrototype__proto.day = momentPrototype__proto.days = getSetDayOfWeek; 2638 momentPrototype__proto.weekday = getSetLocaleDayOfWeek; 2639 momentPrototype__proto.isoWeekday = getSetISODayOfWeek; 2640 momentPrototype__proto.dayOfYear = getSetDayOfYear; 2641 2642 // Hour 2643 momentPrototype__proto.hour = momentPrototype__proto.hours = getSetHour; 2644 2645 // Minute 2646 momentPrototype__proto.minute = momentPrototype__proto.minutes = getSetMinute; 2647 2648 // Second 2649 momentPrototype__proto.second = momentPrototype__proto.seconds = getSetSecond; 2650 2651 // Millisecond 2652 momentPrototype__proto.millisecond = momentPrototype__proto.milliseconds = getSetMillisecond; 2653 2654 // Offset 2655 momentPrototype__proto.utcOffset = getSetOffset; 2656 momentPrototype__proto.utc = setOffsetToUTC; 2657 momentPrototype__proto.local = setOffsetToLocal; 2658 momentPrototype__proto.parseZone = setOffsetToParsedOffset; 2659 momentPrototype__proto.hasAlignedHourOffset = hasAlignedHourOffset; 2660 momentPrototype__proto.isDST = isDaylightSavingTime; 2661 momentPrototype__proto.isDSTShifted = isDaylightSavingTimeShifted; 2662 momentPrototype__proto.isLocal = isLocal; 2663 momentPrototype__proto.isUtcOffset = isUtcOffset; 2664 momentPrototype__proto.isUtc = isUtc; 2665 momentPrototype__proto.isUTC = isUtc; 2666 2667 // Timezone 2668 momentPrototype__proto.zoneAbbr = getZoneAbbr; 2669 momentPrototype__proto.zoneName = getZoneName; 2670 2671 // Deprecations 2672 momentPrototype__proto.dates = deprecate('dates accessor is deprecated. Use date instead.', getSetDayOfMonth); 2673 momentPrototype__proto.months = deprecate('months accessor is deprecated. Use month instead', getSetMonth); 2674 momentPrototype__proto.years = deprecate('years accessor is deprecated. Use year instead', getSetYear); 2675 momentPrototype__proto.zone = deprecate('moment().zone is deprecated, use moment().utcOffset instead. https://github.com/moment/moment/issues/1779', getSetZone); 2676 2677 var momentPrototype = momentPrototype__proto; 2678 2679 function moment__createUnix(input) { 2680 return local__createLocal(input * 1000); 2681 } 2682 2683 function moment__createInZone() { 2684 return local__createLocal.apply(null, arguments).parseZone(); 2685 } 2686 2687 var defaultCalendar = { 2688 sameDay: '[Today at] LT', 2689 nextDay: '[Tomorrow at] LT', 2690 nextWeek: 'dddd [at] LT', 2691 lastDay: '[Yesterday at] LT', 2692 lastWeek: '[Last] dddd [at] LT', 2693 sameElse: 'L' 2694 }; 2695 2696 function locale_calendar__calendar(key, mom, now) { 2697 var output = this._calendar[key]; 2698 return typeof output === 'function' ? output.call(mom, now) : output; 2699 } 2700 2701 var defaultLongDateFormat = { 2702 LTS: 'h:mm:ss A', 2703 LT: 'h:mm A', 2704 L: 'MM/DD/YYYY', 2705 LL: 'MMMM D, YYYY', 2706 LLL: 'MMMM D, YYYY h:mm A', 2707 LLLL: 'dddd, MMMM D, YYYY h:mm A' 2708 }; 2709 2710 function longDateFormat(key) { 2711 var format = this._longDateFormat[key], 2712 formatUpper = this._longDateFormat[key.toUpperCase()]; 2713 2714 if (format || !formatUpper) { 2715 return format; 2716 } 2717 2718 this._longDateFormat[key] = formatUpper.replace(/MMMM|MM|DD|dddd/g, function(val) { 2719 return val.slice(1); 2720 }); 2721 2722 return this._longDateFormat[key]; 2723 } 2724 2725 var defaultInvalidDate = 'Invalid date'; 2726 2727 function invalidDate() { 2728 return this._invalidDate; 2729 } 2730 2731 var defaultOrdinal = '%d'; 2732 var defaultOrdinalParse = /\d{1,2}/; 2733 2734 function ordinal(number) { 2735 return this._ordinal.replace('%d', number); 2736 } 2737 2738 function preParsePostFormat(string) { 2739 return string; 2740 } 2741 2742 var defaultRelativeTime = { 2743 future: 'in %s', 2744 past: '%s ago', 2745 s: 'a few seconds', 2746 m: 'a minute', 2747 mm: '%d minutes', 2748 h: 'an hour', 2749 hh: '%d hours', 2750 d: 'a day', 2751 dd: '%d days', 2752 M: 'a month', 2753 MM: '%d months', 2754 y: 'a year', 2755 yy: '%d years' 2756 }; 2757 2758 function relative__relativeTime(number, withoutSuffix, string, isFuture) { 2759 var output = this._relativeTime[string]; 2760 return (typeof output === 'function') ? output(number, withoutSuffix, string, isFuture) : output.replace(/%d/i, number); 2761 } 2762 2763 function pastFuture(diff, output) { 2764 var format = this._relativeTime[diff > 0 ? 'future' : 'past']; 2765 return typeof format === 'function' ? format(output) : format.replace(/%s/i, output); 2766 } 2767 2768 function locale_set__set(config) { 2769 var prop, i; 2770 for (i in config) { 2771 prop = config[i]; 2772 if (typeof prop === 'function') { 2773 this[i] = prop; 2774 } else { 2775 this['_' + i] = prop; 2776 } 2777 } 2778 // Lenient ordinal parsing accepts just a number in addition to 2779 // number + (possibly) stuff coming from _ordinalParseLenient. 2780 this._ordinalParseLenient = new RegExp(this._ordinalParse.source + '|' + (/\d{1,2}/).source); 2781 } 2782 2783 var prototype__proto = Locale.prototype; 2784 2785 prototype__proto._calendar = defaultCalendar; 2786 prototype__proto.calendar = locale_calendar__calendar; 2787 prototype__proto._longDateFormat = defaultLongDateFormat; 2788 prototype__proto.longDateFormat = longDateFormat; 2789 prototype__proto._invalidDate = defaultInvalidDate; 2790 prototype__proto.invalidDate = invalidDate; 2791 prototype__proto._ordinal = defaultOrdinal; 2792 prototype__proto.ordinal = ordinal; 2793 prototype__proto._ordinalParse = defaultOrdinalParse; 2794 prototype__proto.preparse = preParsePostFormat; 2795 prototype__proto.postformat = preParsePostFormat; 2796 prototype__proto._relativeTime = defaultRelativeTime; 2797 prototype__proto.relativeTime = relative__relativeTime; 2798 prototype__proto.pastFuture = pastFuture; 2799 prototype__proto.set = locale_set__set; 2800 2801 // Month 2802 prototype__proto.months = localeMonths; 2803 prototype__proto._months = defaultLocaleMonths; 2804 prototype__proto.monthsShort = localeMonthsShort; 2805 prototype__proto._monthsShort = defaultLocaleMonthsShort; 2806 prototype__proto.monthsParse = localeMonthsParse; 2807 2808 // Week 2809 prototype__proto.week = localeWeek; 2810 prototype__proto._week = defaultLocaleWeek; 2811 prototype__proto.firstDayOfYear = localeFirstDayOfYear; 2812 prototype__proto.firstDayOfWeek = localeFirstDayOfWeek; 2813 2814 // Day of Week 2815 prototype__proto.weekdays = localeWeekdays; 2816 prototype__proto._weekdays = defaultLocaleWeekdays; 2817 prototype__proto.weekdaysMin = localeWeekdaysMin; 2818 prototype__proto._weekdaysMin = defaultLocaleWeekdaysMin; 2819 prototype__proto.weekdaysShort = localeWeekdaysShort; 2820 prototype__proto._weekdaysShort = defaultLocaleWeekdaysShort; 2821 prototype__proto.weekdaysParse = localeWeekdaysParse; 2822 2823 // Hours 2824 prototype__proto.isPM = localeIsPM; 2825 prototype__proto._meridiemParse = defaultLocaleMeridiemParse; 2826 prototype__proto.meridiem = localeMeridiem; 2827 2828 function lists__get(format, index, field, setter) { 2829 var locale = locale_locales__getLocale(); 2830 var utc = create_utc__createUTC().set(setter, index); 2831 return locale[field](utc, format); 2832 } 2833 2834 function list(format, index, field, count, setter) { 2835 if (typeof format === 'number') { 2836 index = format; 2837 format = undefined; 2838 } 2839 2840 format = format || ''; 2841 2842 if (index != null) { 2843 return lists__get(format, index, field, setter); 2844 } 2845 2846 var i; 2847 var out = []; 2848 for (i = 0; i < count; i++) { 2849 out[i] = lists__get(format, i, field, setter); 2850 } 2851 return out; 2852 } 2853 2854 function lists__listMonths(format, index) { 2855 return list(format, index, 'months', 12, 'month'); 2856 } 2857 2858 function lists__listMonthsShort(format, index) { 2859 return list(format, index, 'monthsShort', 12, 'month'); 2860 } 2861 2862 function lists__listWeekdays(format, index) { 2863 return list(format, index, 'weekdays', 7, 'day'); 2864 } 2865 2866 function lists__listWeekdaysShort(format, index) { 2867 return list(format, index, 'weekdaysShort', 7, 'day'); 2868 } 2869 2870 function lists__listWeekdaysMin(format, index) { 2871 return list(format, index, 'weekdaysMin', 7, 'day'); 2872 } 2873 2874 locale_locales__getSetGlobalLocale('en', { 2875 ordinalParse: /\d{1,2}(th|st|nd|rd)/, 2876 ordinal: function(number) { 2877 var b = number % 10, 2878 output = (toInt(number % 100 / 10) === 1) ? 'th' : (b === 1) ? 'st' : (b === 2) ? 'nd' : (b === 3) ? 'rd' : 'th'; 2879 return number + output; 2880 } 2881 }); 2882 2883 // Side effect imports 2884 utils_hooks__hooks.lang = deprecate('moment.lang is deprecated. Use moment.locale instead.', locale_locales__getSetGlobalLocale); 2885 utils_hooks__hooks.langData = deprecate('moment.langData is deprecated. Use moment.localeData instead.', locale_locales__getLocale); 2886 2887 var mathAbs = Math.abs; 2888 2889 function duration_abs__abs() { 2890 var data = this._data; 2891 2892 this._milliseconds = mathAbs(this._milliseconds); 2893 this._days = mathAbs(this._days); 2894 this._months = mathAbs(this._months); 2895 2896 data.milliseconds = mathAbs(data.milliseconds); 2897 data.seconds = mathAbs(data.seconds); 2898 data.minutes = mathAbs(data.minutes); 2899 data.hours = mathAbs(data.hours); 2900 data.months = mathAbs(data.months); 2901 data.years = mathAbs(data.years); 2902 2903 return this; 2904 } 2905 2906 function duration_add_subtract__addSubtract(duration, input, value, direction) { 2907 var other = create__createDuration(input, value); 2908 2909 duration._milliseconds += direction * other._milliseconds; 2910 duration._days += direction * other._days; 2911 duration._months += direction * other._months; 2912 2913 return duration._bubble(); 2914 } 2915 2916 // supports only 2.0-style add(1, 's') or add(duration) 2917 function duration_add_subtract__add(input, value) { 2918 return duration_add_subtract__addSubtract(this, input, value, 1); 2919 } 2920 2921 // supports only 2.0-style subtract(1, 's') or subtract(duration) 2922 function duration_add_subtract__subtract(input, value) { 2923 return duration_add_subtract__addSubtract(this, input, value, - 1); 2924 } 2925 2926 function absCeil(number) { 2927 if (number < 0) { 2928 return Math.floor(number); 2929 } else { 2930 return Math.ceil(number); 2931 } 2932 } 2933 2934 function bubble() { 2935 var milliseconds = this._milliseconds; 2936 var days = this._days; 2937 var months = this._months; 2938 var data = this._data; 2939 var seconds, minutes, hours, years, monthsFromDays; 2940 2941 // if we have a mix of positive and negative values, bubble down first 2942 // check: https://github.com/moment/moment/issues/2166 2943 if (!((milliseconds >= 0 && days >= 0 && months >= 0) || (milliseconds <= 0 && days <= 0 && months <= 0))) { 2944 milliseconds += absCeil(monthsToDays(months) + days) * 864e5; 2945 days = 0; 2946 months = 0; 2947 } 2948 2949 // The following code bubbles up values, see the tests for 2950 // examples of what that means. 2951 data.milliseconds = milliseconds % 1000; 2952 2953 seconds = absFloor(milliseconds / 1000); 2954 data.seconds = seconds % 60; 2955 2956 minutes = absFloor(seconds / 60); 2957 data.minutes = minutes % 60; 2958 2959 hours = absFloor(minutes / 60); 2960 data.hours = hours % 24; 2961 2962 days += absFloor(hours / 24); 2963 2964 // convert days to months 2965 monthsFromDays = absFloor(daysToMonths(days)); 2966 months += monthsFromDays; 2967 days -= absCeil(monthsToDays(monthsFromDays)); 2968 2969 // 12 months -> 1 year 2970 years = absFloor(months / 12); 2971 months %= 12; 2972 2973 data.days = days; 2974 data.months = months; 2975 data.years = years; 2976 2977 return this; 2978 } 2979 2980 function daysToMonths(days) { 2981 // 400 years have 146097 days (taking into account leap year rules) 2982 // 400 years have 12 months === 4800 2983 return days * 4800 / 146097; 2984 } 2985 2986 function monthsToDays(months) { 2987 // the reverse of daysToMonths 2988 return months * 146097 / 4800; 2989 } 2990 2991 function as(units) { 2992 var days; 2993 var months; 2994 var milliseconds = this._milliseconds; 2995 2996 units = normalizeUnits(units); 2997 2998 if (units === 'month' || units === 'year') { 2999 days = this._days + milliseconds / 864e5; 3000 months = this._months + daysToMonths(days); 3001 return units === 'month' ? months : months / 12; 3002 } else { 3003 // handle milliseconds separately because of floating point math errors (issue #1867) 3004 days = this._days + Math.round(monthsToDays(this._months)); 3005 switch (units) { 3006 case 'week': 3007 return days / 7 + milliseconds / 6048e5; 3008 case 'day': 3009 return days + milliseconds / 864e5; 3010 case 'hour': 3011 return days * 24 + milliseconds / 36e5; 3012 case 'minute': 3013 return days * 1440 + milliseconds / 6e4; 3014 case 'second': 3015 return days * 86400 + milliseconds / 1000; 3016 // Math.floor prevents floating point math errors here 3017 case 'millisecond': 3018 return Math.floor(days * 864e5) + milliseconds; 3019 default: 3020 throw new Error('Unknown unit ' + units); 3021 } 3022 } 3023 } 3024 3025 // TODO: Use this.as('ms')? 3026 function duration_as__valueOf() { 3027 return ( 3028 this._milliseconds + this._days * 864e5 + (this._months % 12) * 2592e6 + toInt(this._months / 12) * 31536e6); 3029 } 3030 3031 function makeAs(alias) { 3032 return function() { 3033 return this.as(alias); 3034 }; 3035 } 3036 3037 var asMilliseconds = makeAs('ms'); 3038 var asSeconds = makeAs('s'); 3039 var asMinutes = makeAs('m'); 3040 var asHours = makeAs('h'); 3041 var asDays = makeAs('d'); 3042 var asWeeks = makeAs('w'); 3043 var asMonths = makeAs('M'); 3044 var asYears = makeAs('y'); 3045 3046 function duration_get__get(units) { 3047 units = normalizeUnits(units); 3048 return this[units + 's'](); 3049 } 3050 3051 function makeGetter(name) { 3052 return function() { 3053 return this._data[name]; 3054 }; 3055 } 3056 3057 var milliseconds = makeGetter('milliseconds'); 3058 var seconds = makeGetter('seconds'); 3059 var minutes = makeGetter('minutes'); 3060 var hours = makeGetter('hours'); 3061 var days = makeGetter('days'); 3062 var months = makeGetter('months'); 3063 var years = makeGetter('years'); 3064 3065 function weeks() { 3066 return absFloor(this.days() / 7); 3067 } 3068 3069 var round = Math.round; 3070 var thresholds = { 3071 s: 45, // seconds to minute 3072 m: 45, // minutes to hour 3073 h: 22, // hours to day 3074 d: 26, // days to month 3075 M: 11 // months to year 3076 }; 3077 3078 // helper function for moment.fn.from, moment.fn.fromNow, and moment.duration.fn.humanize 3079 function substituteTimeAgo(string, number, withoutSuffix, isFuture, locale) { 3080 return locale.relativeTime(number || 1, !! withoutSuffix, string, isFuture); 3081 } 3082 3083 function duration_humanize__relativeTime(posNegDuration, withoutSuffix, locale) { 3084 var duration = create__createDuration(posNegDuration).abs(); 3085 var seconds = round(duration.as('s')); 3086 var minutes = round(duration.as('m')); 3087 var hours = round(duration.as('h')); 3088 var days = round(duration.as('d')); 3089 var months = round(duration.as('M')); 3090 var years = round(duration.as('y')); 3091 3092 var a = seconds < thresholds.s && ['s', seconds] || minutes === 1 && ['m'] || minutes < thresholds.m && ['mm', minutes] || hours === 1 && ['h'] || hours < thresholds.h && ['hh', hours] || days === 1 && ['d'] || days < thresholds.d && ['dd', days] || months === 1 && ['M'] || months < thresholds.M && ['MM', months] || years === 1 && ['y'] || ['yy', years]; 3093 3094 a[2] = withoutSuffix; 3095 a[3] = +posNegDuration > 0; 3096 a[4] = locale; 3097 return substituteTimeAgo.apply(null, a); 3098 } 3099 3100 // This function allows you to set a threshold for relative time strings 3101 function duration_humanize__getSetRelativeTimeThreshold(threshold, limit) { 3102 if (thresholds[threshold] === undefined) { 3103 return false;
3104 } 3105 if (limit === undefined) { 3106 return thresholds[threshold]; 3107 } 3108 thresholds[threshold] = limit; 3109 return true; 3110 } 3111 3112 function humanize(withSuffix) { 3113 var locale = this.localeData(); 3114 var output = duration_humanize__relativeTime(this, !withSuffix, locale); 3115 3116 if (withSuffix) { 3117 output = locale.pastFuture(+this, output); 3118 } 3119 3120 return locale.postformat(output); 3121 } 3122 3123 var iso_string__abs = Math.abs; 3124 3125 function iso_string__toISOString() { 3126 // for ISO strings we do not use the normal bubbling rules: 3127 // * milliseconds bubble up until they become hours 3128 // * days do not bubble at all 3129 // * months bubble up until they become years 3130 // This is because there is no context-free conversion between hours and days 3131 // (think of clock changes) 3132 // and also not between days and months (28-31 days per month) 3133 var seconds = iso_string__abs(this._milliseconds) / 1000; 3134 var days = iso_string__abs(this._days); 3135 var months = iso_string__abs(this._months); 3136 var minutes, hours, years; 3137 3138 // 3600 seconds -> 60 minutes -> 1 hour 3139 minutes = absFloor(seconds / 60); 3140 hours = absFloor(minutes / 60); 3141 seconds %= 60; 3142 minutes %= 60; 3143 3144 // 12 months -> 1 year 3145 years = absFloor(months / 12); 3146 months %= 12; 3147 3148 3149 // inspired by https://github.com/dordille/moment-isoduration/blob/master/moment.isoduration.js 3150 var Y = years; 3151 var M = months; 3152 var D = days; 3153 var h = hours; 3154 var m = minutes; 3155 var s = seconds; 3156 var total = this.asSeconds(); 3157 3158 if (!total) { 3159 // this is the same as C#'s (Noda) and python (isodate)... 3160 // but not other JS (goog.date) 3161 return 'P0D'; 3162 } 3163 3164 return (total < 0 ? '-' : '') + 'P' + (Y ? Y + 'Y' : '') + (M ? M + 'M' : '') + (D ? D + 'D' : '') + ((h || m || s) ? 'T' : '') + (h ? h + 'H' : '') + (m ? m + 'M' : '') + (s ? s + 'S' : ''); 3165 } 3166 3167 var duration_prototype__proto = Duration.prototype; 3168 3169 duration_prototype__proto.abs = duration_abs__abs; 3170 duration_prototype__proto.add = duration_add_subtract__add; 3171 duration_prototype__proto.subtract = duration_add_subtract__subtract; 3172 duration_prototype__proto.as = as; 3173 duration_prototype__proto.asMilliseconds = asMilliseconds; 3174 duration_prototype__proto.asSeconds = asSeconds; 3175 duration_prototype__proto.asMinutes = asMinutes; 3176 duration_prototype__proto.asHours = asHours; 3177 duration_prototype__proto.asDays = asDays; 3178 duration_prototype__proto.asWeeks = asWeeks; 3179 duration_prototype__proto.asMonths = asMonths; 3180 duration_prototype__proto.asYears = asYears; 3181 duration_prototype__proto.valueOf = duration_as__valueOf; 3182 duration_prototype__proto._bubble = bubble; 3183 duration_prototype__proto.get = duration_get__get; 3184 duration_prototype__proto.milliseconds = milliseconds; 3185 duration_prototype__proto.seconds = seconds; 3186 duration_prototype__proto.minutes = minutes; 3187 duration_prototype__proto.hours = hours; 3188 duration_prototype__proto.days = days; 3189 duration_prototype__proto.weeks = weeks; 3190 duration_prototype__proto.months = months; 3191 duration_prototype__proto.years = years; 3192 duration_prototype__proto.humanize = humanize; 3193 duration_prototype__proto.toISOString = iso_string__toISOString; 3194 duration_prototype__proto.toString = iso_string__toISOString; 3195 duration_prototype__proto.toJSON = iso_string__toISOString; 3196 duration_prototype__proto.locale = locale; 3197 duration_prototype__proto.localeData = localeData; 3198 3199 // Deprecations 3200 duration_prototype__proto.toIsoString = deprecate('toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)', iso_string__toISOString); 3201 duration_prototype__proto.lang = lang; 3202 3203 // Side effect imports 3204 3205 addFormatToken('X', 0, 0, 'unix'); 3206 addFormatToken('x', 0, 0, 'valueOf'); 3207 3208 // PARSING 3209 3210 addRegexToken('x', matchSigned); 3211 addRegexToken('X', matchTimestamp); 3212 addParseToken('X', function(input, array, config) { 3213 config._d = new Date(parseFloat(input, 10) * 1000); 3214 }); 3215 addParseToken('x', function(input, array, config) { 3216 config._d = new Date(toInt(input)); 3217 }); 3218 3219 // Side effect imports 3220 3221 3222 utils_hooks__hooks.version = '2.10.6'; 3223 3224 setHookCallback(local__createLocal); 3225 3226 utils_hooks__hooks.fn = momentPrototype; 3227 utils_hooks__hooks.min = min; 3228 utils_hooks__hooks.max = max; 3229 utils_hooks__hooks.utc = create_utc__createUTC; 3230 utils_hooks__hooks.unix = moment__createUnix; 3231 utils_hooks__hooks.months = lists__listMonths; 3232 utils_hooks__hooks.isDate = isDate; 3233 utils_hooks__hooks.locale = locale_locales__getSetGlobalLocale; 3234 utils_hooks__hooks.invalid = valid__createInvalid; 3235 utils_hooks__hooks.duration = create__createDuration; 3236 utils_hooks__hooks.isMoment = isMoment; 3237 utils_hooks__hooks.weekdays = lists__listWeekdays; 3238 utils_hooks__hooks.parseZone = moment__createInZone; 3239 utils_hooks__hooks.localeData = locale_locales__getLocale; 3240 utils_hooks__hooks.isDuration = isDuration; 3241 utils_hooks__hooks.monthsShort = lists__listMonthsShort; 3242 utils_hooks__hooks.weekdaysMin = lists__listWeekdaysMin; 3243 utils_hooks__hooks.defineLocale = defineLocale; 3244 utils_hooks__hooks.weekdaysShort = lists__listWeekdaysShort; 3245 utils_hooks__hooks.normalizeUnits = normalizeUnits; 3246 utils_hooks__hooks.relativeTimeThreshold = duration_humanize__getSetRelativeTimeThreshold; 3247 3248 var _moment = utils_hooks__hooks; 3249 3250 return _moment; 3251 3252})); 3253 3254 3255 3256 3257/** 3258 * jquery.hoverdir.js v1.1.0 3259 * http://www.codrops.com 3260 * 3261 * Licensed under the MIT license. 3262 * http://www.opensource.org/licenses/mit-license.php 3263 * 3264 * Copyright 2012, Codrops 3265 * http://www.codrops.com 3266 */ 3267; 3268(function($, window, undefined) { 3269 'use strict'; 3270 $.HoverDir = function(options, element) { 3271 this.$el = $(element); 3272 this._init(options); 3273 }; 3274 // the options 3275 $.HoverDir.defaults = { 3276 speed: 300, 3277 easing: 'ease', 3278 hoverDelay: 0, 3279 inverse: false 3280 }; 3281 $.HoverDir.prototype = { 3282 _init: function(options) { 3283 // options 3284 this.options = $.extend(true, {}, $.HoverDir.defaults, options); 3285 // transition properties 3286 this.transitionProp = 'all ' + this.options.speed + 'ms ' + this.options.easing; 3287 // support for CSS transitions 3288 this.support = Modernizr.csstransitions; 3289 // load the events 3290 this._loadEvents(); 3291 }, 3292 _loadEvents: function() { 3293 var self = this; 3294 this.$el.on('mouseenter.hoverdir, mouseleave.hoverdir', function(event) { 3295 var $el = $(this), 3296 $hoverElem = $el.find('div'), 3297 direction = self._getDir($el, { 3298 x: event.pageX, 3299 y: event.pageY 3300 }), 3301 styleCSS = self._getStyle(direction); 3302 if (event.type === 'mouseenter') { 3303 $hoverElem.hide().css(styleCSS.from); 3304 clearTimeout(self.tmhover); 3305 self.tmhover = setTimeout(function() { 3306 $hoverElem.show(0, function() { 3307 var $el = $(this); 3308 if (self.support) { 3309 $el.css('transition', self.transitionProp); 3310 } 3311 self._applyAnimation($el, styleCSS.to, self.options.speed); 3312 }); 3313 }, self.options.hoverDelay); 3314 } else { 3315 if (self.support) { 3316 $hoverElem.css('transition', self.transitionProp); 3317 } 3318 clearTimeout(self.tmhover); 3319 self._applyAnimation($hoverElem, styleCSS.from, self.options.speed); 3320 } 3321 }); 3322 }, 3323 // credits : http://stackoverflow.com/a/3647634 3324 _getDir: function($el, coordinates) { 3325 // the width and height of the current div 3326 var w = $el.width(), 3327 h = $el.height(), 3328 // calculate the x and y to get an angle to the center of the div from that x and y. 3329 // gets the x value relative to the center of the DIV and "normalize" it 3330 x = (coordinates.x - $el.offset().left - (w / 2)) * (w > h ? (h / w) : 1), 3331 y = (coordinates.y - $el.offset().top - (h / 2)) * (h > w ? (w / h) : 1), 3332 3333 // the angle and the direction from where the mouse
3333came in/went out clockwise (TRBL=0123); 3334 // first calculate the angle of the point, 3335 // add 180 deg to get rid of the negative values 3336 // divide by 90 to get the quadrant 3337 // add 3 and do a modulo by 4 to shift the quadrants to a proper clockwise TRBL (top/right/bottom/left) **/ 3338 direction = Math.round((((Math.atan2(y, x) * (180 / Math.PI)) + 180) / 90) + 3) % 4; 3339 return direction; 3340 }, 3341 _getStyle: function(direction) { 3342 var fromStyle, toStyle, 3343 slideFromTop = { 3344 left: '0px', 3345 top: '-100%' 3346 }, 3347 slideFromBottom = { 3348 left: '0px', 3349 top: '100%' 3350 }, 3351 slideFromLeft = { 3352 left: '-100%', 3353 top: '0px' 3354 }, 3355 slideFromRight = { 3356 left: '100%', 3357 top: '0px' 3358 }, 3359 slideTop = { 3360 top: '0px' 3361 }, 3362 slideLeft = { 3363 left: '0px' 3364 }; 3365 switch (direction) { 3366 case 0: 3367 // from top 3368 fromStyle = !this.options.inverse ? slideFromTop : slideFromBottom; 3369 toStyle = slideTop; 3370 break; 3371 case 1: 3372 // from right 3373 fromStyle = !this.options.inverse ? slideFromRight : slideFromLeft; 3374 toStyle = slideLeft; 3375 break; 3376 case 2: 3377 // from bottom 3378 fromStyle = !this.options.inverse ? slideFromBottom : slideFromTop; 3379 toStyle = slideTop; 3380 break; 3381 case 3: 3382 // from left 3383 fromStyle = !this.options.inverse ? slideFromLeft : slideFromRight; 3384 toStyle = slideLeft; 3385 break; 3386 }; 3387 return { 3388 from: fromStyle, 3389 to: toStyle 3390 }; 3391 }, 3392 // apply a transition or fallback to jquery animate based on Modernizr.csstransitions support 3393 _applyAnimation: function(el, styleCSS, speed) { 3394 3395 $.fn.applyStyle = this.support ? $.fn.css : $.fn.animate; 3396 el.stop().applyStyle(styleCSS, $.extend(true, [], { 3397 duration: speed + 'ms' 3398 })); 3399 }, 3400 }; 3401 var logError = function(message) { 3402 if (window.console) { 3403 window.console.error(message); 3404 } 3405 }; 3406 $.fn.hoverdir = function(options) { 3407 var instance = $.data(this, 'hoverdir'); 3408 if (typeof options === 'string') { 3409 var args = Array.prototype.slice.call(arguments, 1); 3410 this.each(function() { 3411 if (!instance) { 3412 logError("cannot call methods on hoverdir prior to initialization; " + 3413 "attempted to call method '" + options + "'"); 3414 return; 3415 } 3416 if (!$.isFunction(instance[options]) || options.charAt(0) === "_") { 3417 logError("no such method '" + options + "' for hoverdir instance"); 3418 return; 3419 } 3420 3421 instance[options].apply(instance, args); 3422 }); 3423 } else { 3424 this.each(function() { 3425 if (instance) { 3426 instance._init(); 3427 } else { 3428 instance = $.data(this, 'hoverdir', new $.HoverDir(options, this)); 3429 } 3430 }); 3431 } 3432 return instance; 3433 }; 3434})(jQuery, window); 3435 3436 3437 3438 3439 3440 3441 3442/*! Copyright 2012, Ben Lin (http://dreamerslab.com/) 3443 * Licensed under the MIT License (LICENSE.txt). 3444 * 3445 * Version: 1.0.16 3446 * 3447 * Requires: jQuery >= 1.2.3 3448 */ 3449(function(a){a.fn.addBack=a.fn.addBack||a.fn.andSelf; 3450a.fn.extend({actual:function(b,l){if(!this[b]){throw'$.actual => The jQuery method "'+b+'" you called does not exist';}var f={absolute:false,clone:false,includeMargin:false}; 3451var i=a.extend(f,l);var e=this.eq(0);var h,j;if(i.clone===true){h=function(){var m="position: absolute !important; top: -1000 !important; ";e=e.clone().attr("style",m).appendTo("body"); 3452};j=function(){e.remove();};}else{var g=[];var d="";var c;h=function(){c=e.parents().addBack().filter(":hidden");d+="visibility: hidden !important; display: block !important; "; 3453if(i.absolute===true){d+="position: absolute !important; ";}c.each(function(){var m=a(this);var n=m.attr("style");g.push(n);m.attr("style",n?n+";"+d:d); 3454});};j=function(){c.each(function(m){var o=a(this);var n=g[m];if(n===undefined){o.removeAttr("style");}else{o.attr("style",n);}});};}h();var k=/(outer)/.test(b)?e[b](i.includeMargin):e[b](); 3455j();return k;}});})(jQuery); 3456 3457/* 3458Tipr 1.0.1 3459Copyright (c) 2013 Tipue 3460Tipr is released under the MIT License 3461http://www.tipue.com/tipr 3462 3463Modified by: spacedesgin.pl - Sebastian Duchowicz 3464*/ 3465 3466var isTouch = (('ontouchstart' in window) || (navigator.msMaxTouchPoints > 0)); 3467 3468(function($) { 3469 $.fn.tipr = function(options) { 3470 var set = $.extend({ 3471 "speed": 200, 3472 "mode": "bottom", 3473 "css_style": null 3474 }, options); 3475 return this.each(function() { 3476 var tipr_cont = ".tipr_container_" + set.mode; 3477 3478 // $(this).hover(function() { 3479 // var out = ''; 3480 3481 // if (typeof $(this).attr("data-tipstyle") === 'undefined'){ 3482 // out = '<div class="tipr_container_' + set.mode + '"><div class="tipr_point_' + set.mode + '"><div class="tipr_content">' + $(this).attr("data-tip") + '</div></div></div>'; 3483 // } else { 3484 // if ( $(this).attr("data-tipstyle").length > 2 ){ 3485 // out = '<div class="tipr_container_' + set.mode + ' tipr_style ' + $(this).attr("data-tipstyle") + '"><div class="tipr_point_' + set.mode + '"><div class="tipr_content ' + $(this).attr("data-tipstyle") + '">' + $(this).attr("data-tip") + '</div></div></div>'; 3486 // } else { 3487 // out = '<div class="tipr_container_' + set.mode + '"><div class="tipr_point_' + set.mode + '"><div class="tipr_content">' + $(this).attr("data-tip") + '</div></div></div>'; 3488 // } 3489 // } 3490 // $(this).append(out); 3491 // var w_t = $(tipr_cont).outerWidth(); 3492 // var w_e = $(this).width();
3493 // if (set.mode == 'top' || set.mode == 'bottom'){ 3494 // var m_l = w_e / 2 - w_t / 2; 3495 // } else if (set.mode == 'left') { 3496 // var m_l = - w_t - 10; 3497 // } else if (set.mode == 'right') { 3498 // var m_l = w_e + 10; 3499 // } 3500 // $(tipr_cont).css("margin-left", m_l + "px"); 3501 3502 // if (typeof $(this).attr("data-yoffset") !== 'undefined'){ 3503 // $(tipr_cont).css("margin-top", (parseInt($(this).attr("data-yoffset"))) + "px"); 3504 // } 3505 3506 3507 // $(this).removeAttr("title"); 3508 // $(tipr_cont).fadeIn(set.speed); 3509 // setTimeout(function(){ 3510 // $(tipr_cont).remove(); 3511 // },2000); 3512 // }, function() { 3513 // $(tipr_cont).remove(); 3514 // }); 3515 if (isTouch){ 3516 $(this).on('touchstart',function() { 3517 var out = ''; 3518 3519 if (typeof $(this).attr("data-tipstyle") === 'undefined'){ 3520 out = '<div class="tipr_container_' + set.mode + '"><div class="tipr_point_' + set.mode + '"><div class="tipr_content">' + $(this).attr("data-tip") + '</div></div></div>'; 3521 } else { 3522 if ( $(this).attr("data-tipstyle").length > 2 ){ 3523 out = '<div class="tipr_container_' + set.mode + ' tipr_style ' + $(this).attr("data-tipstyle") + '"><div class="tipr_point_' + set.mode + '"><div class="tipr_content ' + $(this).attr("data-tipstyle") + '">' + $(this).attr("data-tip") + '</div></div></div>'; 3524 } else { 3525 out = '<div class="tipr_container_' + set.mode + '"><div class="tipr_point_' + set.mode + '"><div class="tipr_content">' + $(this).attr("data-tip") + '</div></div></div>'; 3526 } 3527 } 3528 $(this).append(out); 3529 var w_t = $(tipr_cont).outerWidth(); 3530 var w_e = $(this).width(); 3531 if (set.mode == 'top' || set.mode == 'bottom'){ 3532 var m_l = w_e / 2 - w_t / 2; 3533 } else if (set.mode == 'left') { 3534 var m_l = - w_t - 10; 3535 } else if (set.mode == 'right') { 3536 var m_l = w_e + 10; 3537 } 3538 $(tipr_cont).css("margin-left", m_l + "px"); 3539 3540 if (typeof $(this).attr("data-yoffset") !== 'undefined'){ 3541 $(tipr_cont).css("margin-top", (parseInt($(this).attr("data-yoffset"))) + "px"); 3542 } 3543 3544 3545 $(this).removeAttr("title"); 3546 $(tipr_cont).fadeIn(set.speed); 3547 setTimeout(function(){ 3548 $(tipr_cont).remove(); 3549 },2000); 3550 }); 3551 } else { 3552 $(this).hover(function() { 3553 var out = ''; 3554 3555 if (typeof $(this).attr("data-tipstyle") === 'undefined'){ 3556 out = '<div class="tipr_container_' + set.mode + '"><div class="tipr_point_' + set.mode + '"><div class="tipr_content">' + $(this).attr("data-tip") + '</div></div></div>'; 3557 } else { 3558 if ( $(this).attr("data-tipstyle").length > 2 ){ 3559 out = '<div class="tipr_container_' + set.mode + ' tipr_style ' + $(this).attr("data-tipstyle") + '"><div class="tipr_point_' + set.mode + '"><div class="tipr_content ' + $(this).attr("data-tipstyle") + '">' + $(this).attr("data-tip") + '</div></div></div>'; 3560 } else { 3561 out = '<div class="tipr_container_' + set.mode + '"><div class="tipr_point_' + set.mode + '"><div class="tipr_content">' + $(this).attr("data-tip") + '</div></div></div>'; 3562 } 3563 } 3564 $(this).append(out); 3565 var w_t = $(tipr_cont).outerWidth(); 3566 var w_e = $(this).width();
3567 if (set.mode == 'top' || set.mode == 'bottom'){ 3568 var m_l = w_e / 2 - w_t / 2; 3569 } else if (set.mode == 'left') { 3570 var m_l = - w_t - 10; 3571 } else if (set.mode == 'right') { 3572 var m_l = w_e + 10; 3573 } 3574 $(tipr_cont).css("margin-left", m_l + "px"); 3575 3576 if (typeof $(this).attr("data-yoffset") !== 'undefined'){ 3577 $(tipr_cont).css("margin-top", (parseInt($(this).attr("data-yoffset"))) + "px"); 3578 } 3579 3580 3581 $(this).removeAttr("title"); 3582 $(tipr_cont).fadeIn(set.speed); 3583 setTimeout(function(){ 3584 $(tipr_cont).remove(); 3585 },2000); 3586 }, function() { 3587 $(tipr_cont).remove(); 3588 }); 3589 } 3590 }); 3591 } 3592})(jQuery); 3593 3594 3595 3596/* 3597 * jQuery Nivo Slider v3.2 3598 * http://nivo.dev7studios.com 3599 * 3600 * Copyright 2012, Dev7studios 3601 * Free to use and abuse under the MIT license. 3602 * http://www.opensource.org/licenses/mit-license.php 3603 */ 3604 3605(function(e) { 3606 var t = function(t, n) { 3607 var r = e.extend({}, e.fn.nivoSlider.defaults, n); 3608 var i = { 3609 currentSlide: 0, 3610 currentImage: "", 3611 totalSlides: 0, 3612 running: false, 3613 paused: false, 3614 stop: false, 3615 controlNavEl: false 3616 }; 3617 var s = e(t); 3618 s.data("nivo:vars", i).addClass("nivoSlider"); 3619 var o = s.children(); 3620 o.each(function() { 3621 var t = e(this); 3622 var n = ""; 3623 if (!t.is("img")) { 3624 if (t.is("a")) { 3625 t.addClass("nivo-imageLink"); 3626 n = t 3627 } 3628 t = t.find("img:first") 3629 } 3630 var r = r === 0 ? t.attr("width") : t.width(), 3631 s = s === 0 ? t.attr("height") : t.height(); 3632 if (n !== "") { 3633 n.css("display", "none") 3634 } 3635 t.css("display", "none"); 3636 i.totalSlides++ 3637 }); 3638 if (r.randomStart) { 3639 r.startSlide = Math.floor(Math.random() * i.totalSlides) 3640 } 3641 if (r.startSlide > 0) { 3642 if (r.startSlide >= i.totalSlides) { 3643 r.startSlide = i.totalSlides - 1 3644 } 3645 i.currentSlide = r.startSlide 3646 } 3647 if (e(o[i.currentSlide]).is("img")) { 3648 i.currentImage = e(o[i.currentSlide]) 3649 } else { 3650 i.currentImage = e(o[i.currentSlide]).find("img:first") 3651 } if (e(o[i.currentSlide]).is("a")) { 3652 e(o[i.currentSlide]).css("display", "block") 3653 } 3654 var u = e("<img/>").addClass("nivo-main-image"); 3655 u.attr("src", i.currentImage.attr("src")).show(); 3656 s.append(u); 3657 e(window).resize(function() { 3658 s.children("img").width(s.width()); 3659 u.attr("src", i.currentImage.attr("src")); 3660 u.stop().height("auto"); 3661 e(".nivo-slice").remove(); 3662 e(".nivo-box").remove() 3663 }); 3664 s.append(e('<div class="nivo-caption"></div>')); 3665 var a = function(t) { 3666 var n = e(".nivo-caption", s); 3667 if (i.currentImage.attr("title") != "" && i.currentImage.attr("title") != undefined) { 3668 var r = i.currentImage.attr("title"); 3669 if (r.substr(0, 1) == "#") r = e(r).html(); 3670 if (n.css("display") == "block") { 3671 setTimeout(function() { 3672 n.html(r) 3673 }, t.animSpeed) 3674 } else { 3675 n.html(r); 3676 n.stop().fadeIn(t.animSpeed) 3677 } 3678 } else { 3679 n.stop().fadeOut(t.animSpeed) 3680 } 3681 }; 3682 a(r); 3683 var f = 0; 3684 if (!r.manualAdvance && o.length > 1) { 3685 f = setInterval(function() { 3686 d(s, o, r, false) 3687 }, r.pauseTime) 3688 } 3689 if (r.directionNav) { 3690 s.append('<div class="nivo-directionNav"><a class="nivo-prevNav">' + r.prevText + '</a><a class="nivo-nextNav">' + r.nextText + "</a></div>"); 3691 e(s).on("click", "a.nivo-prevNav", function() { 3692 if (i.running) { 3693 return false 3694 } 3695 clearInterval(f); 3696 f = ""; 3697 i.currentSlide -= 2; 3698 d(s, o, r, "prev") 3699 }); 3700 e(s).on("click", "a.nivo-nextNav", function() { 3701 if (i.running) { 3702 return false 3703 } 3704 clearInterval(f); 3705 f = ""; 3706 d(s, o, r, "next") 3707 }) 3708 } 3709 if (r.controlNav) { 3710 i.controlNavEl = e('<div class="nivo-controlNav"></div>'); 3711 s.after(i.controlNavEl); 3712 for (var l = 0; l < o.length; l++) { 3713 if (r.controlNavThumbs) { 3714 i.controlNavEl.addClass("nivo-thumbs-enabled"); 3715 var c = o.eq(l); 3716 if (!c.is("img")) { 3717 c = c.find("img:first") 3718 } 3719 if (c.attr("data-thumb")) i.controlNavEl.append('<a class="nivo-control" rel="' + l + '"><img src="' + c.attr("data-thumb") + '" alt="" /></a>') 3720 } else { 3721 i.controlNavEl.append('<a class="nivo-control" rel="' + l + '">' + (l + 1) + "</a>") 3722 } 3723 } 3724 e("a:eq(" + i.currentSlide + ")", i.controlNavEl).addClass("active");
vendor: 18,476 bytes, lines 3725-4155
3725 e("a", i.controlNavEl).bind("click", function() { 3726 if (i.running) return false; 3727 if (e(this).hasClass("active")) return false; 3728 clearInterval(f); 3729 f = ""; 3730 u.attr("src", i.currentImage.attr("src")); 3731 i.currentSlide = e(this).attr("rel") - 1; 3732 d(s, o, r, "control") 3733 }) 3734 } 3735 if (r.pauseOnHover) { 3736 s.hover(function() { 3737 i.paused = true; 3738 clearInterval(f); 3739 f = "" 3740 }, function() { 3741 i.paused = false; 3742 if (f === "" && !r.manualAdvance) { 3743 f = setInterval(function() { 3744 d(s, o, r, false) 3745 }, r.pauseTime) 3746 } 3747 }) 3748 } 3749 s.bind("nivo:animFinished", function() { 3750 u.attr("src", i.currentImage.attr("src")); 3751 i.running = false; 3752 e(o).each(function() { 3753 if (e(this).is("a")) { 3754 e(this).css("display", "none") 3755 } 3756 }); 3757 if (e(o[i.currentSlide]).is("a")) { 3758 e(o[i.currentSlide]).css("display", "block") 3759 } 3760 if (f === "" && !i.paused && !r.manualAdvance) { 3761 f = setInterval(function() { 3762 d(s, o, r, false) 3763 }, r.pauseTime) 3764 } 3765 r.afterChange.call(this) 3766 }); 3767 var h = function(t, n, r) { 3768 if (e(r.currentImage).parent().is("a")) e(r.currentImage).parent().css("display", "block"); 3769 e('img[src="' + r.currentImage.attr("src") + '"]', t).not(".nivo-main-image,.nivo-control img").width(t.width()).css("visibility", "hidden").show(); 3770 var i = e('img[src="' + r.currentImage.attr("src") + '"]', t).not(".nivo-main-image,.nivo-control img").parent().is("a") ? e('img[src="' + r.currentImage.attr("src") + '"]', t).not(".nivo-main-image,.nivo-control img").parent().height() : e('img[src="' + r.currentImage.attr("src") + '"]', t).not(".nivo-main-image,.nivo-control img").height(); 3771 for (var s = 0; s < n.slices; s++) { 3772 var o = Math.round(t.width() / n.slices); 3773 if (s === n.slices - 1) { 3774 t.append(e('<div class="nivo-slice" name="' + s + '"><img src="' + r.currentImage.attr("src") + '" style="position:absolute; width:' + t.width() + "px; height:auto; display:block !important; top:0; left:-" + (o + s * o - o) + 'px;" /></div>').css({ 3775 left: o * s + "px", 3776 width: t.width() - o * s + "px", 3777 height: i + "px", 3778 opacity: "0", 3779 overflow: "hidden" 3780 })) 3781 } else { 3782 t.append(e('<div class="nivo-slice" name="' + s + '"><img src="' + r.currentImage.attr("src") + '" style="position:absolute; width:' + t.width() + "px; height:auto; display:block !important; top:0; left:-" + (o + s * o - o) + 'px;" /></div>').css({ 3783 left: o * s + "px", 3784 width: o + "px", 3785 height: i + "px", 3786 opacity: "0", 3787 overflow: "hidden" 3788 })) 3789 } 3790 } 3791 e(".nivo-slice", t).height(i); 3792 u.stop().animate({ 3793 height: e(r.currentImage).height() 3794 }, n.animSpeed) 3795 }; 3796 var p = function(t, n, r) { 3797 if (e(r.currentImage).parent().is("a")) e(r.currentImage).parent().css("display", "block"); 3798 e('img[src="' + r.currentImage.attr("src") + '"]', t).not(".nivo-main-image,.nivo-control img").width(t.width()).css("visibility", "hidden").show(); 3799 var i = Math.round(t.width() / n.boxCols), 3800 s = Math.round(e('img[src="' + r.currentImage.attr("src") + '"]', t).not(".nivo-main-image,.nivo-control img").height() / n.boxRows); 3801 for (var o = 0; o < n.boxRows; o++) { 3802 for (var a = 0; a < n.boxCols; a++) { 3803 if (a === n.boxCols - 1) { 3804 t.append(e('<div class="nivo-box" name="' + a + '" rel="' + o + '"><img src="' + r.currentImage.attr("src") + '" style="position:absolute; width:' + t.width() + "px; height:auto; display:block; top:-" + s * o + "px; left:-" + i * a + 'px;" /></div>').css({ 3805 opacity: 0, 3806 left: i * a + "px", 3807 top: s * o + "px", 3808 width: t.width() - i * a + "px" 3809 })); 3810 e('.nivo-box[name="' + a + '"]', t).height(e('.nivo-box[name="' + a + '"] img', t).height() + "px") 3811 } else { 3812 t.append(e('<div class="nivo-box" name="' + a + '" rel="' + o + '"><img src="' + r.currentImage.attr("src") + '" style="position:absolute; width:' + t.width() + "px; height:auto; display:block; top:-" + s * o + "px; left:-" + i * a + 'px;" /></div>').css({ 3813 opacity: 0, 3814 left: i * a + "px", 3815 top: s * o + "px", 3816 width: i + "px" 3817 })); 3818 e('.nivo-box[name="' + a + '"]', t).height(e('.nivo-box[name="' + a + '"] img', t).height() + "px") 3819 } 3820 } 3821 } 3822 u.stop().animate({ 3823 height: e(r.currentImage).height() 3824 }, n.animSpeed) 3825 }; 3826 var d = function(t, n, r, i) { 3827 var s = t.data("nivo:vars"); 3828 if (s && s.currentSlide === s.totalSlides - 1) { 3829 r.lastSlide.call(this) 3830 } 3831 if ((!s || s.stop) && !i) { 3832 return false 3833 } 3834 r.beforeChange.call(this); 3835 if (!i) { 3836 u.attr("src", s.currentImage.attr("src")) 3837 } else { 3838 if (i === "prev") { 3839 u.attr("src", s.currentImage.attr("src")) 3840 } 3841 if (i === "next") { 3842 u.attr("src", s.currentImage.attr("src")) 3843 } 3844 } 3845 s.currentSlide++; 3846 if (s.currentSlide === s.totalSlides) { 3847 s.currentSlide = 0; 3848 r.slideshowEnd.call(this) 3849 } 3850 if (s.currentSlide < 0) { 3851 s.currentSlide = s.totalSlides - 1 3852 } 3853 if (e(n[s.currentSlide]).is("img")) { 3854 s.currentImage = e(n[s.currentSlide]) 3855 } else { 3856 s.currentImage = e(n[s.currentSlide]).find("img:first") 3857 } if (r.controlNav) { 3858 e("a", s.controlNavEl).removeClass("active"); 3859 e("a:eq(" + s.currentSlide + ")", s.controlNavEl).addClass("active") 3860 } 3861 a(r); 3862 e(".nivo-slice", t).remove(); 3863 e(".nivo-box", t).remove(); 3864 var o = r.effect, 3865 f = ""; 3866 if (r.effect === "random") { 3867 f = new Array("sliceDownRight", "sliceDownLeft", "sliceUpRight", "sliceUpLeft", "sliceUpDown", "sliceUpDownLeft", "fold", "fade", "boxRandom", "boxRain", "boxRainReverse", "boxRainGrow", "boxRainGrowReverse"); 3868 o = f[Math.floor(Math.random() * (f.length + 1))]; 3869 if (o === undefined) { 3870 o = "fade" 3871 } 3872 } 3873 if (r.effect.indexOf(",") !== -1) { 3874 f = r.effect.split(","); 3875 o = f[Math.floor(Math.random() * f.length)]; 3876 if (o === undefined) { 3877 o = "fade" 3878 } 3879 } 3880 if (s.currentImage.attr("data-transition")) { 3881 o = s.currentImage.attr("data-transition") 3882 } 3883 s.running = true; 3884 var l = 0, 3885 c = 0, 3886 d = "", 3887 m = "", 3888 g = "", 3889 y = ""; 3890 if (o === "sliceDown" || o === "sliceDownRight" || o === "sliceDownLeft") { 3891 h(t, r, s); 3892 l = 0; 3893 c = 0; 3894 d = e(".nivo-slice", t); 3895 if (o === "sliceDownLeft") { 3896 d = e(".nivo-slice", t)._reverse() 3897 } 3898 d.each(function() { 3899 var n = e(this); 3900 n.css({ 3901 top: "0px" 3902 }); 3903 if (c === r.slices - 1) { 3904 setTimeout(function() { 3905 n.animate({ 3906 opacity: "1.0" 3907 }, r.animSpeed, "", function() { 3908 t.trigger("nivo:animFinished") 3909 }) 3910 }, 100 + l) 3911 } else { 3912 setTimeout(function() { 3913 n.animate({ 3914 opacity: "1.0" 3915 }, r.animSpeed) 3916 }, 100 + l) 3917 } 3918 l += 50; 3919 c++ 3920 }) 3921 } else if (o === "sliceUp" || o === "sliceUpRight" || o === "sliceUpLeft") { 3922 h(t, r, s); 3923 l = 0; 3924 c = 0; 3925 d = e(".nivo-slice", t); 3926 if (o === "sliceUpLeft") { 3927 d = e(".nivo-slice", t)._reverse() 3928 } 3929 d.each(function() { 3930 var n = e(this); 3931 n.css({ 3932 bottom: "0px" 3933 }); 3934 if (c === r.slices - 1) { 3935 setTimeout(function() { 3936 n.animate({ 3937 opacity: "1.0" 3938 }, r.animSpeed, "", function() { 3939 t.trigger("nivo:animFinished") 3940 }) 3941 }, 100 + l) 3942 } else { 3943 setTimeout(function() { 3944 n.animate({ 3945 opacity: "1.0" 3946 }, r.animSpeed) 3947 }, 100 + l) 3948 } 3949 l += 50; 3950 c++ 3951 }) 3952 } else if (o === "sliceUpDown" || o === "sliceUpDownRight" || o === "sliceUpDownLeft") { 3953 h(t, r, s); 3954 l = 0; 3955 c = 0; 3956 var b = 0; 3957 d = e(".nivo-slice", t); 3958 if (o === "sliceUpDownLeft") { 3959 d = e(".nivo-slice", t)._reverse() 3960 } 3961 d.each(function() { 3962 var n = e(this); 3963 if (c === 0) { 3964 n.css("top", "0px"); 3965 c++ 3966 } else { 3967 n.css("bottom", "0px"); 3968 c = 0 3969 } if (b === r.slices - 1) { 3970 setTimeout(function() { 3971 n.animate({ 3972 opacity: "1.0" 3973 }, r.animSpeed, "", function() { 3974 t.trigger("nivo:animFinished") 3975 }) 3976 }, 100 + l) 3977 } else { 3978 setTimeout(function() { 3979 n.animate({ 3980 opacity: "1.0" 3981 }, r.animSpeed) 3982 }, 100 + l) 3983 } 3984 l += 50; 3985 b++ 3986 }) 3987 } else if (o === "fold") { 3988 h(t, r, s); 3989 l = 0; 3990 c = 0; 3991 e(".nivo-slice", t).each(function() { 3992 var n = e(this); 3993 var i = n.width(); 3994 n.css({ 3995 top: "0px", 3996 width: "0px" 3997 }); 3998 if (c === r.slices - 1) { 3999 setTimeout(function() { 4000 n.animate({ 4001 width: i, 4002 opacity: "1.0" 4003 }, r.animSpeed, "", function() { 4004 t.trigger("nivo:animFinished") 4005 }) 4006 }, 100 + l) 4007 } else { 4008 setTimeout(function() { 4009 n.animate({ 4010 width: i, 4011 opacity: "1.0" 4012 }, r.animSpeed) 4013 }, 100 + l) 4014 } 4015 l += 50; 4016 c++ 4017 }) 4018 } else if (o === "fade") { 4019 h(t, r, s); 4020 m = e(".nivo-slice:first", t); 4021 m.css({ 4022 width: t.width() + "px" 4023 }); 4024 m.animate({ 4025 opacity: "1.0" 4026 }, r.animSpeed * 2, "", function() { 4027 t.trigger("nivo:animFinished") 4028 }) 4029 } else if (o === "slideInRight") { 4030 h(t, r, s); 4031 m = e(".nivo-slice:first", t); 4032 m.css({ 4033 width: "0px", 4034 opacity: "1" 4035 }); 4036 m.animate({ 4037 width: t.width() + "px" 4038 }, r.animSpeed * 2, "", function() { 4039 t.trigger("nivo:animFinished") 4040 }) 4041 } else if (o === "slideInLeft") { 4042 h(t, r, s); 4043 m = e(".nivo-slice:first", t); 4044 m.css({ 4045 width: "0px", 4046 opacity: "1", 4047 left: "", 4048 right: "0px" 4049 }); 4050 m.animate({ 4051 width: t.width() + "px" 4052 }, r.animSpeed * 2, "", function() { 4053 m.css({ 4054 left: "0px", 4055 right: "" 4056 }); 4057 t.trigger("nivo:animFinished") 4058 }) 4059 } else if (o === "boxRandom") { 4060 p(t, r, s); 4061 g = r.boxCols * r.boxRows; 4062 c = 0; 4063 l = 0; 4064 y = v(e(".nivo-box", t)); 4065 y.each(function() { 4066 var n = e(this); 4067 if (c === g - 1) { 4068 setTimeout(function() { 4069 n.animate({ 4070 opacity: "1" 4071 }, r.animSpeed, "", function() { 4072 t.trigger("nivo:animFinished") 4073 }) 4074 }, 100 + l) 4075 } else { 4076 setTimeout(function() { 4077 n.animate({ 4078 opacity: "1" 4079 }, r.animSpeed) 4080 }, 100 + l) 4081 } 4082 l += 20; 4083 c++ 4084 }) 4085 } else if (o === "boxRain" || o === "boxRainReverse" || o === "boxRainGrow" || o === "boxRainGrowReverse") { 4086 p(t, r, s); 4087 g = r.boxCols * r.boxRows; 4088 c = 0; 4089 l = 0; 4090 var w = 0; 4091 var E = 0; 4092 var S = []; 4093 S[w] = []; 4094 y = e(".nivo-box", t); 4095 if (o === "boxRainReverse" || o === "boxRainGrowReverse") { 4096 y = e(".nivo-box", t)._reverse() 4097 } 4098 y.each(function() { 4099 S[w][E] = e(this); 4100 E++; 4101 if (E === r.boxCols) { 4102 w++; 4103 E = 0; 4104 S[w] = [] 4105 } 4106 }); 4107 for (var x = 0; x < r.boxCols * 2; x++) { 4108 var T = x; 4109 for (var N = 0; N < r.boxRows; N++) { 4110 if (T >= 0 && T < r.boxCols) { 4111 (function(n, i, s, u, a) { 4112 var f = e(S[n][i]); 4113 var l = f.width(); 4114 var c = f.height(); 4115 if (o === "boxRainGrow" || o === "boxRainGrowReverse") { 4116 f.width(0).height(0) 4117 } 4118 if (u === a - 1) { 4119 setTimeout(function() { 4120 f.animate({ 4121 opacity: "1", 4122 width: l, 4123 height: c 4124 }, r.animSpeed / 1.3, "", function() { 4125 t.trigger("nivo:animFinished") 4126 }) 4127 }, 100 + s) 4128 } else { 4129 setTimeout(function() { 4130 f.animate({ 4131 opacity: "1", 4132 width: l, 4133 height: c 4134 }, r.animSpeed / 1.3) 4135 }, 100 + s) 4136 } 4137 })(N, T, l, c, g); 4138 c++ 4139 } 4140 T-- 4141 } 4142 l += 100 4143 } 4144 } 4145 }; 4146 var v = function(e) { 4147 for (var t, n, r = e.length; r; t = parseInt(Math.random() * r, 10), n = e[--r], e[r] = e[t], e[t] = n); 4148 return e 4149 }; 4150 var m = function(e) { 4151 if (this.console && typeof console.log !== "undefined") { 4152 console.log(e) 4153 } 4154 }; 4155 this.stop = function() {
4156 if (!e(t).data("nivo:vars").stop) { 4157 e(t).data("nivo:vars").stop = true; 4158 m("Stop Slider") 4159 } 4160 }; 4161 this.start = function() { 4162 if (e(t).data("nivo:vars").stop) { 4163 e(t).data("nivo:vars").stop = false; 4164 m("Start Slider") 4165 } 4166 }; 4167 r.afterLoad.call(this); 4168 return this 4169 }; 4170 e.fn.nivoSlider = function(n) { 4171 return this.each(function(r, i) { 4172 var s = e(this); 4173 if (s.data("nivoslider")) { 4174 return s.data("nivoslider") 4175 } 4176 var o = new t(this, n); 4177 s.data("nivoslider", o) 4178 }) 4179 }; 4180 e.fn.nivoSlider.defaults = { 4181 effect: "random", 4182 slices: 15, 4183 boxCols: 8, 4184 boxRows: 4, 4185 animSpeed: 500, 4186 pauseTime: 3e3, 4187 startSlide: 0, 4188 directionNav: true, 4189 controlNav: true, 4190 controlNavThumbs: false, 4191 pauseOnHover: true, 4192 manualAdvance: false, 4193 prevText: "Prev", 4194 nextText: "Next", 4195 randomStart: false, 4196 beforeChange: function() {}, 4197 afterChange: function() {}, 4198 slideshowEnd: function() {}, 4199 lastSlide: function() {}, 4200 afterLoad: function() {} 4201 }; 4202 e.fn._reverse = [].reverse 4203})(jQuery); 4204 4205 4206 4207 4208 4209 4210 4211/** 4212 * Copyright (c) 2005 - 2010, James Auldridge 4213 * All rights reserved. 4214 * 4215 * Licensed under the BSD, MIT, and GPL (your choice!) Licenses: 4216 * http://code.google.com/p/cookies/wiki/License 4217 * 4218 */ 4219var jaaulde = window.jaaulde || {}; 4220jaaulde.utils = jaaulde.utils || {}; 4221jaaulde.utils.cookies = (function() { 4222 var resolveOptions, assembleOptionsString, parseCookies, constructor, defaultOptions = { 4223 expiresAt: null, 4224 path: '/', 4225 domain: null, 4226 secure: false 4227 }; 4228 resolveOptions = function(options) { 4229 var returnValue, expireDate; 4230 if (typeof options !== 'object' || options === null) { 4231 returnValue = defaultOptions; 4232 } else { 4233 returnValue = { 4234 expiresAt: defaultOptions.expiresAt, 4235 path: defaultOptions.path, 4236 domain: defaultOptions.domain, 4237 secure: defaultOptions.secure 4238 }; 4239 if (typeof options.expiresAt === 'object' && options.expiresAt instanceof Date) { 4240 returnValue.expiresAt = options.expiresAt; 4241 } else if (typeof options.hoursToLive === 'number' && options.hoursToLive !== 0) { 4242 expireDate = new Date(); 4243 expireDate.setTime(expireDate.getTime() + (options.hoursToLive * 60 * 60 * 1000)); 4244 returnValue.expiresAt = expireDate; 4245 } 4246 if (typeof options.path === 'string' && options.path !== '') { 4247 returnValue.path = options.path; 4248 } 4249 if (typeof options.domain === 'string' && options.domain !== '') { 4250 returnValue.domain = options.domain; 4251 } 4252 if (options.secure === true) { 4253 returnValue.secure = options.secure; 4254 } 4255 } 4256 return returnValue; 4257 }; 4258 assembleOptionsString = function(options) { 4259 options = resolveOptions(options); 4260 return ((typeof options.expiresAt === 'object' && options.expiresAt instanceof Date ? '; expires=' + options.expiresAt.toGMTString() : '') + '; path=' + options.path + (typeof options.domain === 'string' ? '; domain=' + options.domain : '') + (options.secure === true ? '; secure' : '')); 4261 }; 4262 parseCookies = function() { 4263 var cookies = {}, 4264 i, pair, name, value, separated = document.cookie.split(';'), 4265 unparsedValue; 4266 for (i = 0; i < separated.length; i = i + 1) { 4267 pair = separated[i].split('='); 4268 name = pair[0].replace(/^\s*/, '').replace(/\s*$/, ''); 4269 try { 4270 value = decodeURIComponent(pair[1]); 4271 } catch (e1) { 4272 value = pair[1]; 4273 } 4274 if (typeof JSON === 'object' && JSON !== null && typeof JSON.parse === 'function') { 4275 try { 4276 unparsedValue = value; 4277 value = JSON.parse(value); 4278 } catch (e2) { 4279 value = unparsedValue; 4280 } 4281 } 4282 cookies[name] = value; 4283 } 4284 return cookies; 4285 }; 4286 constructor = function() {}; 4287 constructor.prototype.get = function(cookieName) { 4288 var returnValue, item, cookies = parseCookies(); 4289 if (typeof cookieName === 'string') { 4290 returnValue = (typeof cookies[cookieName] !== 'undefined') ? cookies[cookieName] : null; 4291 } else if (typeof cookieName === 'object' && cookieName !== null) { 4292 returnValue = {}; 4293 for (item in cookieName) { 4294 if (typeof cookies[cookieName[item]] !== 'undefined') { 4295 returnValue[cookieName[item]] = cookies[cookieName[item]]; 4296 } else { 4297 returnValue[cookieName[item]] = null; 4298 } 4299 } 4300 } else { 4301 returnValue = cookies; 4302 } 4303 return returnValue; 4304 }; 4305 constructor.prototype.filter = function(cookieNameRegExp) { 4306 var cookieName, returnValue = {}, 4307 cookies = parseCookies(); 4308 if (typeof cookieNameRegExp === 'string') { 4309 cookieNameRegExp = new RegExp(cookieNameRegExp); 4310 } 4311 for (cookieName in cookies) { 4312 if (cookieName.match(cookieNameRegExp)) { 4313 returnValue[cookieName] = cookies[cookieName]; 4314 } 4315 } 4316 return returnValue; 4317 }; 4318 constructor.prototype.set = function(cookieName, value, options) { 4319 if (typeof options !== 'object' || options === null) { 4320 options = {}; 4321 } 4322 if (typeof value === 'undefined' || value === null) { 4323 value = ''; 4324 options.hoursToLive = -8760; 4325 } else if (typeof value !== 'string') { 4326 if (typeof JSON === 'object' && JSON !== null && typeof JSON.stringify === 'function') { 4327 value = JSON.stringify(value); 4328 } else { 4329 throw new Error('cookies.set() received non-string value and could not serialize.'); 4330 } 4331 } 4332 var optionsString = assembleOptionsString(options); 4333 document.cookie = cookieName + '=' + encodeURIComponent(value) + optionsString; 4334 }; 4335 constructor.prototype.del = function(cookieName, options) { 4336 var allCookies = {}, 4337 name; 4338 if (typeof options !== 'object' || options === null) { 4339 options = {}; 4340 } 4341 if (typeof cookieName === 'boolean' && cookieName === true) { 4342 allCookies = this.get(); 4343 } else if (typeof cookieName === 'string') { 4344 allCookies[cookieName] = true; 4345 } 4346 for (name in allCookies) { 4347 if (typeof name === 'string' && name !== '') { 4348 this.set(name, null, options); 4349 } 4350 } 4351 }; 4352 constructor.prototype.test = function() { 4353 var returnValue = false, 4354 testName = 'cT', 4355 testValue = 'data'; 4356 this.set(testName, testValue); 4357 if (this.get(testName) === testValue) { 4358 this.del(testName); 4359 returnValue = true; 4360 } 4361 return returnValue; 4362 }; 4363 constructor.prototype.setOptions = function(options) { 4364 if (typeof options !== 'object') { 4365 options = null; 4366 } 4367 defaultOptions = resolveOptions(options); 4368 }; 4369 return new constructor(); 4370})(); 4371(function() { 4372 if (window.jQuery) { 4373 (function($) { 4374 $.cookies = jaaulde.utils.cookies; 4375 var extensions = { 4376 cookify: function(options) { 4377 return this.each(function() { 4378 var i, nameAttrs = ['name', 'id'],
4379 name, $this = $(this), 4380 value; 4381 for (i in nameAttrs) { 4382 if (!isNaN(i)) { 4383 name = $this.attr(nameAttrs[i]); 4384 if (typeof name === 'string' && name !== '') { 4385 if ($this.is(':checkbox, :radio')) { 4386 if ($this.attr('checked')) { 4387 value = $this.val(); 4388 } 4389 } else if ($this.is(':input')) { 4390 value = $this.val(); 4391 } else { 4392 value = $this.html(); 4393 } if (typeof value !== 'string' || value === '') { 4394 value = null; 4395 } 4396 $.cookies.set(name, value, options); 4397 break; 4398 } 4399 } 4400 } 4401 }); 4402 }, 4403 cookieFill: function() { 4404 return this.each(function() { 4405 var n, getN, nameAttrs = ['name', 'id'], 4406 name, $this = $(this), 4407 value; 4408 getN = function() { 4409 n = nameAttrs.pop(); 4410 return !!n; 4411 }; 4412 while (getN()) { 4413 name = $this.attr(n); 4414 if (typeof name === 'string' && name !== '') { 4415 value = $.cookies.get(name); 4416 if (value !== null) { 4417 if ($this.is(':checkbox, :radio')) { 4418 if ($this.val() === value) { 4419 $this.attr('checked', 'checked'); 4420 } else { 4421 $this.removeAttr('checked'); 4422 } 4423 } else if ($this.is(':input')) { 4424 $this.val(value); 4425 } else { 4426 $this.html(value); 4427 } 4428 } 4429 break; 4430 } 4431 } 4432 }); 4433 }, 4434 cookieBind: function(options) { 4435 return this.each(function() { 4436 var $this = $(this); 4437 $this.cookieFill().change(function() { 4438 $this.cookify(options); 4439 }); 4440 }); 4441 } 4442 }; 4443 $.each(extensions, function(i) { 4444 $.fn[i] = this; 4445 }); 4446 })(window.jQuery); 4447 } 4448})(); 4449 4450 4451 4452 4453 4454 4455 4456 4457 4458 4459 4460 // onFocus: function() { 4461 // dojo.removeClass("calendarHelp", "wcag-hide"); 4462 // }, 4463 4464 // onBlur: function() { 4465 // dojo.addClass("calendarHelp", "wcag-hide"); 4466 // }, 4467 4468 4469//https://css-tricks.com/snippets/javascript/javascript-keycodes/ 4470 4471//http://stackoverflow.com/questions/5203407/javascript-multiple-keys-pressed-at-once 4472//http://stackoverflow.com/questions/5203407/javascript-multiple-keys-pressed-at-once 4473//http://stackoverflow.com/questions/5203407/javascript-multiple-keys-pressed-at-once 4474 //http://jsfiddle.net/vor0nwe/mkHsU/ 4475 //http://stackoverflow.com/questions/10655202/detect-multiple-keys-on-single-keypress-event-on-jquery 4476 4477///http://stackoverflow.com/questions/4954403/can-jquery-keypress-detect-more-than-one-key-at-the-same-time 4478jQuery.multipress = function (keys, handler) { 4479 'use strict'; 4480 4481 if (keys.length === 0) { 4482 return; 4483 } 4484 4485 var down = {}; 4486 jQuery(document).keydown(function (event) { 4487 event.stopPropagation(); 4488 down[event.keyCode] = true; 4489 }).keyup(function (event) { 4490 event.stopPropagation(); 4491 // Copy keys array, build array of pressed keys
4492 var remaining = keys.slice(0), 4493 pressed = Object.keys(down).map(function (num) { return parseInt(num, 10); }), 4494 indexOfKey; 4495 // Remove pressedKeys from remainingKeys 4496 jQuery.each(pressed, function (i, key) { 4497 if (down[key] === true) { 4498 down[key] = false; 4499 indexOfKey = remaining.indexOf(key); 4500 if (indexOfKey > -1) { 4501 remaining.splice(indexOfKey, 1); 4502 } 4503 } 4504 }); 4505 // If we hit all the keys, fire off handler 4506 if (remaining.length === 0) { 4507 handler(event); 4508 } 4509 }); 4510}; 4511 4512 4513//$(function() { 4514$(document).ready(function(){ 4515 //$("#container_cal").focus(function() { 4516 $("#container_cal").focusin(function(){ 4517 $('#calendarHelp').removeClass('wcag-hide'); 4518 $('#calendarHelp').addClass('ical-focused'); 4519 }); 4520 //$("#container_cal").blur(function() { 4521 $("#container_cal").focusout(function(){ 4522 $('#calendarHelp').removeClass('ical-focused'); 4523 $('#calendarHelp').addClass('wcag-hide'); 4524 });
4525 //#container_cal:focus .calendarHelp 4526}); 4527/* 4528 * First plugin 4529 * 4530 * @author Maarten Hus 4531 */ 4532(function($) { 4533 var eventdates = {}; 4534 var last_focused_obj = null; 4535 4536 $.fn.ical = function(options) { 4537 $.fn.ical.defaults = { 4538 daynames: ['Pon', 'Wt', 'Śr', 'Czw', 'Pi', 'So', 'Ni'], //default short names for the days of the week 4539 monthnames: ['Styczeń', 'Luty', 'Marzec', 'Kwiecień', 'Maj', 'Czerwiec', 'Lipiec', 'Sierpień', 'Wrzesień', 'Październik', 'Listopad', 'Grudzień'], 4540 startdate: new Date(), // The date the calender should take as start point 4541 eventdates: {}, 4542 last_focused_obj: null, 4543 calendarCreated: false, 4544 startOnSunday: false, 4545 beforeDay: function(insdate) {}, 4546 beforeMonth: function(insdate) {}, 4547 beforeYear: function(insdate) {} 4548 }; 4549 4550 options = $.extend({}, $.fn.ical.defaults, options); 4551 4552 return this.each(function() { 4553 var obj = $(this); //get the object 4554 eventdates = options.eventdates; 4555 4556 var insdate = options.startdate; //The date that gets used for calculating the month 4557 4558 createCalendar(obj, insdate); 4559 }); 4560 4561 /** 4562 * Create the calendar 4563 */ 4564 function createCalendar(obj, insdate) { 4565 obj.html(''); 4566 createNavigation(obj, insdate); 4567 createTable(obj); //create table 4568 addDatesToTable(obj, insdate); 4569 codabubble(); 4570 options.calendarCreated = true; 4571 } 4572 4573 /** 4574 * Create the navigation and handle its clicks 4575 */ 4576 function createNavigation(obj, insdate) { 4577 //$(document).off("keydown"); 4578 4579 //obj.prepend("<div id='nav-calendar'><div id='year'><span id='year-left-arrow' class='year-buttons'></span><span id='currentyear'>" + insdate.getFullYear() + "</span><span id='year-right-arrow' class='year-buttons'></span></div>" + "<div id='month'><span id='month-left-arrow'></span><span id='currentmonth'>" + options.monthnames[insdate.getMonth()] + "</span><span id='month-right-arrow'></span></div></div>"); 4580 // var html_top_cal = "<div id='nav-calendar'>" + 4581 // "<div id='year'>" + 4582 // "<a href='#'>" + 4583 // "<span class='wcag-hide'>poprzedni rok</span><i id='year-left-arrow' class='fa fa-angle-double-left'></i>" + 4584 // "</a>" + 4585 // "<span id='currentyear'>" + insdate.getFullYear() + "</span>" + 4586 // "<a href='#'>" + 4587 // "<span class='wcag-hide'>następny rok</span><i id='year-right-arrow' class='fa fa-angle-double-right'></i>" + 4588 // "</a>" + 4589 // "</div>" + 4590 // "<div id='month'>" + 4591 // "<a href='#'>" + 4592 // "<span class='wcag-hide'>poprzedni miesiąc</span><i id='month-left-arrow' class='fa fa-chevron-left'></i>" + 4593 // "</a>" + 4594 // "<span id='currentmonth'>" + options.monthnames[insdate.getMonth()] + "</span>" + 4595 // "<a href='#'>" + 4596 // "<span class='wcag-hide'>następny miesiąc</span><i id='month-right-arrow' class='fa fa-chevron-right'></i>" + 4597 // "</a>" + 4598 // "</div>" + 4599 // "</div>"; 4600 4601 4602 var html_top_cal = "<div id='nav-calendar'>" + 4603 "<div id='year'>" + 4604 "<a id='year-left-arrow' href='' tabindex='0'>" + 4605 "<span class='wcag-hide'>poprzedni rok</span><i class='fa fa-angle-double-left'></i>" + 4606 "</a>" + 4607 "<span id='currentyear'>" + insdate.getFullYear() + "</span>" + 4608 "<a id='year-right-arrow' href='' tabindex='0'>" + 4609 "<span class='wcag-hide'>następny rok</span><i class='fa fa-angle-double-right'></i>" + 4610 "</a>" + 4611 "</div>" + 4612 "<div id='month'>" + 4613 "<a id='month-left-arrow' href='' tabindex='0'>" + 4614 "<span class='wcag-hide'>poprzedni miesiąc</span><i class='fa fa-chevron-left'></i>" + 4615 "</a>" + 4616 "<span id='currentmonth'>" + options.monthnames[insdate.getMonth()] + "</span>" + 4617 "<a id='month-right-arrow' href='' tabindex='0'>" + 4618 "<span class='wcag-hide'>następny miesiąc</span><i class='fa fa-chevron-right'></i>" + 4619 "</a>" + 4620 "</div>" + 4621 "</div>"; 4622 4623 //obj.prepend("<div id='nav-calendar'><div id='year'><a href='#'><span class='wcag-hide'>poprzedni rok</span><i id='year-left-arrow' class='fa fa-angle-double-left'></i></a><span id='currentyear'>" + insdate.getFullYear() + "</span><a href='#'><span class='wcag-hide'>następny rok</span><i id='year-right-arrow' class='fa fa-angle-double-right'></i></a></div>" + "<div id='month'><a href='#'><span class='wcag-hide'>poprzedni miesiąc</span><i id='month-left-arrow' class='fa fa-chevron-left'></i></a><span id='currentmonth'>" + options.monthnames[insdate.getMonth()] + "</span><a href='#'><span class='wcag-hide'>następny miesiąc</span><i id='month-right-arrow' class='fa fa-chevron-right'></i></a></div></div>"); 4624 obj.prepend(html_top_cal);
4625 //obj.prepend("<ul id='calendarHelp' class='calendarHelp wcag-hide'><li class='wcag-hide'>Nawigacja w kalendarzu</li><li>Nawigacja pomiędzy datami: strzałki </li><li>Następny miesiąc: Page-down </li><li>Poprzedni miesiąc: Page-up </li><li>Następny rok: Alt+Page-down </li><li>Poprzedni rok: Alt+Page-up </li><li>Pierwszy dzień miesiąca: Home </li><li>Ostatni dzień miesiąca: End </li><li>Wybór daty: Enter, Spacja </li></ul>"); 4626 4627 //następny rok 4628 $("#year-right-arrow", obj).click(function(e) { 4629 e.preventDefault() 4630 4631 var month = insdate.getMonth() + 12; 4632 var presentMonth = insdate.getMonth(); 4633 var year; 4634 4635 if (month > 11) { 4636 month = presentMonth; 4637 year = insdate.getFullYear() + 1; 4638 options.beforeYear(formatDate(year, month, 1)); 4639 } else { 4640 year = insdate.getFullYear(); 4641 } 4642 4643 options.beforeMonth(formatDate(year, month, 1)); 4644 4645 date = new Date(year, month, 1); 4646 createCalendar(obj, date); 4647 $('#calendarHelp').removeClass('wcag-hide'); 4648 $('#calendarHelp').addClass('ical-focused'); 4649 $( "#year-right-arrow" ).focus(); 4650 last_focused_obj = $( "#year-right-arrow" ); 4651 //alert(last_focused_obj); 4652 //$('#container_cal').focus(); 4653 }); 4654 //https://css-tricks.com/snippets/javascript/javascript-keycodes/ 4655 //$(document).on('keydown', null, 'alt+pagedown', function(){ 4656 4657 4658 jQuery.multipress([18, 34], function () { //alt+pagedown 4659 //if ($("#container_cal").is(":focus")){ 4660 if ($('#calendarHelp').hasClass('ical-focused')){ 4661 //console.log('alt+pagedown'); 4662 var month = insdate.getMonth() + 12; 4663 var presentMonth = insdate.getMonth(); 4664 var year; 4665 4666 if (month > 11) { 4667 month = presentMonth; 4668 year = insdate.getFullYear() + 1; 4669 options.beforeYear(formatDate(year, month, 1)); 4670 } else { 4671 year = insdate.getFullYear(); 4672 } 4673 4674 options.beforeMonth(formatDate(year, month, 1)); 4675 4676 date = new Date(year, month, 1); 4677 createCalendar(obj, date); 4678 $('#calendarHelp').removeClass('wcag-hide'); 4679 $('#calendarHelp').addClass('ical-focused'); 4680 //$('#container_cal').focus(); 4681 //$('#header_cal').focus(); 4682 if (last_focused_obj!==null){ 4683 last_focused_obj.focus(); 4684 } else { 4685 $('#header_cal').focus(); 4686 } 4687 } 4688 }); 4689 4690 4691 //poprzedni rok 4692 $("#year-left-arrow", obj).click(function(e) { 4693 e.preventDefault() 4694 var year; 4695 var month = insdate.getMonth() - 12; 4696 var presentMonth = insdate.getMonth(); 4697 4698 if (month < 0) { 4699 month = presentMonth; 4700 year = insdate.getFullYear() - 1; 4701 options.beforeYear(formatDate(year, month, 1)); 4702 } else { 4703 year = insdate.getFullYear(); 4704 } 4705 4706 options.beforeMonth(formatDate(year, month, 1)); 4707 4708 date = new Date(year, month, 1); 4709 createCalendar(obj, date); 4710 $('#calendarHelp').removeClass('wcag-hide'); 4711 $('#calendarHelp').addClass('ical-focused');
4712 //$('#container_cal').focus(); 4713 $( "#year-left-arrow" ).focus(); 4714 }); 4715 //https://css-tricks.com/snippets/javascript/javascript-keycodes/ 4716 //$(document).on('keydown', null, 'alt+pageup', function(){ 4717 //if ($("#container_cal").is(":focus")){ 4718 jQuery.multipress([18, 33], function () { //alt+pageup 4719 if ($('#calendarHelp').hasClass('ical-focused')){ 4720 //console.log('alt+pageup'); 4721 var year; 4722 var month = insdate.getMonth() - 12; 4723 var presentMonth = insdate.getMonth(); 4724 4725 if (month < 0) { 4726 month = presentMonth; 4727 year = insdate.getFullYear() - 1; 4728 options.beforeYear(formatDate(year, month, 1)); 4729 } else { 4730 year = insdate.getFullYear(); 4731 } 4732 4733 options.beforeMonth(formatDate(year, month, 1)); 4734 4735 date = new Date(year, month, 1); 4736 createCalendar(obj, date); 4737 $('#calendarHelp').removeClass('wcag-hide'); 4738 $('#calendarHelp').addClass('ical-focused'); 4739 //$('#container_cal').focus(); 4740 //$('#header_cal').focus(); 4741 if (last_focused_obj!==null){ 4742 last_focused_obj.focus(); 4743 } else { 4744 $('#header_cal').focus(); 4745 } 4746 } 4747 }); 4748 //} 4749 4750 4751 //następny miesiąc 4752 $("#month-right-arrow", obj).click(function(e) { 4753 e.preventDefault() 4754 var year; 4755 var month = insdate.getMonth() + 1; 4756 4757 if (month > 11) { 4758 month = 0; 4759 year = insdate.getFullYear() + 1; 4760 options.beforeYear(formatDate(year, month, 1)); 4761 } else { 4762 year = insdate.getFullYear(); 4763 } 4764 4765 options.beforeMonth(formatDate(year, month, 1)); 4766 4767 date = new Date(year, month, 1); 4768 createCalendar(obj, date); 4769 $('#calendarHelp').removeClass('wcag-hide'); 4770 $('#calendarHelp').addClass('ical-focused'); 4771 //$('#container_cal').focus(); 4772 $( "#month-right-arrow" ).focus(); 4773 }); 4774 // jQuery.multipress([33], function () { //pageup 4775 // if ($('#calendarHelp').hasClass('ical-focused')){ 4776 // var year; 4777 // var month = insdate.getMonth() + 1; 4778 4779 // if (month > 11) { 4780 // month = 0; 4781 // year = insdate.getFullYear() + 1; 4782 // options.beforeYear(formatDate(year, month, 1)); 4783 // } else { 4784 // year = insdate.getFullYear(); 4785 // } 4786 4787 // options.beforeMonth(formatDate(year, month, 1)); 4788 4789 // date = new Date(year, month, 1); 4790 // createCalendar(obj, date); 4791 // } 4792 // }); 4793 4794 //http://stackoverflow.com/questions/8681162/intercept-pageup-pagedown-keydown-events-in-chrome-browser 4795 //http://jsfiddle.net/CN4UZ/5/ 4796 //if (options.calendarCreated===false){ 4797 4798 4799 //$(document).on('keydown', function(e){ 4800 //$('#container_cal').on('keydown', function(e){ 4801 $('#container_cal').keydown(function(e) { 4802 if ($('#calendarHelp').hasClass('ical-focused')){ 4803 //var target = $(e.currentTarget); 4804 //var debugVar = target.val(); 4805 4806 //console.log('options.calendarCreated :'+options.calendarCreated+' page up'); 4807 switch (e.keyCode) { 4808 case 33://pageup 4809 //target.val('page up'); 4810 e.preventDefault(); 4811 e.stopPropagation(); 4812 // $('#calendarHelp').removeClass('wcag-hide'); 4813 // $('#calendarHelp').addClass('ical-focused'); 4814 var year;
4815 var month = insdate.getMonth() + 1; 4816 4817 if (month > 11) { 4818 month = 0; 4819 year = insdate.getFullYear() + 1; 4820 options.beforeYear(formatDate(year, month, 1)); 4821 } else { 4822 year = insdate.getFullYear(); 4823 } 4824 4825 options.beforeMonth(formatDate(year, month, 1)); 4826 4827 date = new Date(year, month, 1); 4828 createCalendar(obj, date); 4829 $('#calendarHelp').removeClass('wcag-hide'); 4830 $('#calendarHelp').addClass('ical-focused'); 4831 //$('#container_cal').focus(); 4832 //$('#header_cal').focus(); 4833 if (last_focused_obj!==null){ 4834 last_focused_obj.focus(); 4835 } else { 4836 $('#header_cal').focus(); 4837 } 4838 break; 4839 } 4840 } 4841 }); 4842 //} 4843 4844 // $(document).on('keydown', null, 'alt+end', function(){ 4845 // var year; 4846 // var month = insdate.getMonth() + 1; 4847 4848 // if (month > 11) { 4849 // month = 0; 4850 // year = insdate.getFullYear() + 1; 4851 // options.beforeYear(formatDate(year, month, 1)); 4852 // } else { 4853 // year = insdate.getFullYear(); 4854 // } 4855 4856 // options.beforeMonth(formatDate(year, month, 1)); 4857 4858 // date = new Date(year, month, 1); 4859 // createCalendar(obj, date); 4860 // }); 4861 4862 //poprzedni miesiac 4863 $("#month-left-arrow", obj).click(function(e) { 4864 e.preventDefault() 4865 var year; 4866 var month = insdate.getMonth() - 1; 4867 4868 if (month < 0) { 4869 month = 11; 4870 year = insdate.getFullYear() - 1; 4871 options.beforeYear(formatDate(year, month, 1)); 4872 } else { 4873 year = insdate.getFullYear(); 4874 } 4875 4876 options.beforeMonth(formatDate(year, month, 1)); 4877 4878 date = new Date(year, month, 1); 4879 createCalendar(obj, date); 4880 $('#calendarHelp').removeClass('wcag-hide'); 4881 $('#calendarHelp').addClass('ical-focused'); 4882 //$('#container_cal').focus(); 4883 $( "#month-left-arrow" ).focus(); 4884 }); 4885 4886 // jQuery.multipress([34], function () { //pagedown 4887 // if ($('#calendarHelp').hasClass('ical-focused')){ 4888 // var year; 4889 // var month = insdate.getMonth() - 1; 4890 4891 // if (month < 0) { 4892 // month = 11; 4893 // year = insdate.getFullYear() - 1; 4894 // options.beforeYear(formatDate(year, month, 1)); 4895 // } else { 4896 // year = insdate.getFullYear(); 4897 // } 4898 4899 // options.beforeMonth(formatDate(year, month, 1)); 4900 4901 // date = new Date(year, month, 1); 4902 // createCalendar(obj, date); 4903 // } 4904 // }); 4905 4906 //http://stackoverflow.com/questions/8681162/intercept-pageup-pagedown-keydown-events-in-chrome-browser 4907 //http://jsfiddle.net/CN4UZ/5/ 4908 4909 4910 4911 4912 4913 //$(document).on('keydown', function(e){
4914 //$('#container_cal').on('keydown', function(e){ 4915 $('#container_cal').keydown(function(e) { 4916 //document.body.removeEventListener("keydown"); 4917 //document.body.addEventListener("keydown", function(e){ 4918 //console.log('page down'); 4919 if ($('#calendarHelp').hasClass('ical-focused')){ 4920 //var target = $(e.currentTarget); 4921 //var debugVar = target.val(); 4922 4923 switch (e.keyCode) { 4924 case 34://pagedown 4925 //target.val('page down'); 4926 e.preventDefault(); 4927 e.stopPropagation(); 4928 var year; 4929 var month = insdate.getMonth() - 1; 4930 4931 if (month < 0) { 4932 month = 11; 4933 year = insdate.getFullYear() - 1; 4934 options.beforeYear(formatDate(year, month, 1)); 4935 } else { 4936 year = insdate.getFullYear(); 4937 } 4938 4939 options.beforeMonth(formatDate(year, month, 1)); 4940 4941 date = new Date(year, month, 1); 4942 createCalendar(obj, date); 4943 $('#calendarHelp').removeClass('wcag-hide'); 4944 $('#calendarHelp').addClass('ical-focused'); 4945 //$('#container_cal').focus(); 4946 //$('#header_cal').focus(); 4947 //console.log(last_focused_obj); 4948 if (last_focused_obj!==null){ 4949 //console.log('x'); 4950 last_focused_obj.focus(); 4951 } else { 4952 $('#header_cal').focus(); 4953 } 4954 break; 4955 } 4956 } 4957 }); 4958 4959 // $(document).on('keydown', null, 'alt+home', function(){ 4960 // var year; 4961 // var month = insdate.getMonth() - 1; 4962 4963 // if (month < 0) { 4964 // month = 11; 4965 // year = insdate.getFullYear() - 1; 4966 // options.beforeYear(formatDate(year, month, 1)); 4967 // } else { 4968 // year = insdate.getFullYear(); 4969 // } 4970 4971 // options.beforeMonth(formatDate(year, month, 1)); 4972 4973 // date = new Date(year, month, 1); 4974 // createCalendar(obj, date); 4975 // }); 4976 } 4977 4978 4979 // document.body.removeEventListener("keydown"); 4980 // document.body.addEventListener("keydown", function(e){ 4981 // console.log('page down'); 4982 // if ($('#calendarHelp').hasClass('ical-focused')){ 4983 // var target = $(e.currentTarget); 4984 // var debugVar = target.val(); 4985 4986 // switch (e.keyCode) { 4987 // case 34://pagedown 4988 // target.val('page down'); 4989 // e.preventDefault(); 4990 // e.stopPropagation(); 4991 // var year; 4992 // var month = insdate.getMonth() - 1; 4993 4994 // if (month < 0) { 4995 // month = 11; 4996 // year = insdate.getFullYear() - 1; 4997 // options.beforeYear(formatDate(year, month, 1)); 4998 // } else { 4999 // year = insdate.getFullYear(); 5000 // } 5001 5002 // options.beforeMonth(formatDate(year, month, 1)); 5003 5004 // date = new Date(year, month, 1); 5005 // createCalendar(obj, date); 5006 // break; 5007 // } 5008 // } 5009 // }); 5010 5011 5012 5013 5014 5015 5016 5017 5018 5019 // myEventHandler = function(e) { 5020 5021 // var target = $(e.currentTarget); 5022 // var debugVar = target.val(); 5023 5024 // switch (e.keyCode) { 5025 5026 // case 38: 5027 // // on up arrow code 5028 // target.val('up arrow'); 5029 // e.stopPropagation(); 5030 // return false;
5031 // break; 5032 5033 // case 40: 5034 // // on down arrow code 5035 // target.val('down arrow'); 5036 // e.stopPropagation(); 5037 // return false; 5038 // break; 5039 5040 // case 33: 5041 // // on page up code 5042 // target.val('page up'); 5043 // e.stopPropagation(); 5044 // if ($('#calendarHelp').hasClass('ical-focused')){ 5045 // var target = $(e.currentTarget); 5046 // var debugVar = target.val(); 5047 5048 5049 // switch (e.keyCode) { 5050 // case 33://pageup 5051 // target.val('page up'); 5052 // e.preventDefault(); 5053 // e.stopPropagation(); 5054 // var year; 5055 // var month = insdate.getMonth() + 1; 5056 5057 // if (month > 11) { 5058 // month = 0; 5059 // year = insdate.getFullYear() + 1; 5060 // options.beforeYear(formatDate(year, month, 1)); 5061 // } else { 5062 // year = insdate.getFullYear(); 5063 // } 5064 5065 // options.beforeMonth(formatDate(year, month, 1)); 5066 5067 // date = new Date(year, month, 1); 5068 // createCalendar(obj, date); 5069 // break; 5070 // } 5071 // } 5072 // return false; 5073 // break; 5074 5075 // case 34: 5076 // // on page down code 5077 // target.val('page down'); 5078 // e.stopPropagation(); 5079 5080 // console.log('page down'); 5081 // if ($('#calendarHelp').hasClass('ical-focused')){ 5082 // var target = $(e.currentTarget); 5083 // var debugVar = target.val(); 5084 5085 // switch (e.keyCode) { 5086 // case 34://pagedown 5087 // target.val('page down'); 5088 // e.preventDefault(); 5089 // e.stopPropagation(); 5090 // var year; 5091 // var month = insdate.getMonth() - 1; 5092 5093 // if (month < 0) { 5094 // month = 11; 5095 // year = insdate.getFullYear() - 1; 5096 // options.beforeYear(formatDate(year, month, 1)); 5097 // } else { 5098 // year = insdate.getFullYear(); 5099 // } 5100 5101 // options.beforeMonth(formatDate(year, month, 1)); 5102 5103 // date = new Date(year, month, 1); 5104 // createCalendar(obj, date); 5105 // break; 5106 // } 5107 // } 5108 5109 // return false; 5110 // break; 5111 5112 // default: 5113 5114 // return true; 5115 // break; 5116 // }; 5117 // }; 5118 5119 // $(document).on('keydown', function(e) { 5120 // return myEventHandler(e); 5121 // }); 5122 5123 5124 5125 /** 5126 * Create the table for the calendar 5127 */ 5128 function createTable(obj) { 5129 //obj.append("<table class='icaltable'><thead><tr id='week-days'></tr></thead></table>"); //add a table 5130 5131 obj.append("<table class='icaltable'><thead><tr id='week-days'></tr></thead></table>"); //add a table 5132 5133 for (var i = 0; i < options.daynames.length; i++) { 5134 $(".icaltable tr", obj).append("<th>" + options.daynames[i] + "</th>"); //add the day header 5135 } 5136 5137 $(".icaltable", obj).append("<tr class='no_marg'><td colspan='7' id='separator'></td></tr>"); 5138 $(".icaltable", obj).append("<tr class='no_marg'><td colspan='7' id='clear-separator'></td></tr>"); 5139 5140 } 5141 5142 function addDatesToTable(obj, insdate) {
5143 var month = insdate.getMonth(); 5144 var year = insdate.getFullYear(); 5145 5146 var days = getDaysInMonth(year, month); 5147 var first = getFirstDayOfMonth(year, month); // 0 - 6 5148 var last = getLastDayOfMonth(year, month, days); // 0 - 6 5149 5150 var afterpadding = 6 - last; // week minus the last day of the month = afterpadding 5151 5152 var firstrow = true; 5153 5154 var startOnSunday = 0; 5155 5156 if (options.startOnSunday) { 5157 if (first == 6) { 5158 startOnSunday = -6; 5159 } else { 5160 startOnSunday = 1; 5161 } 5162 } 5163 5164 for (var i = 1; i <= days; i++) //each day in month 5165 { 5166 if ((first + i - 1 + startOnSunday) % 7 === 0 || firstrow === true) //add new tr for each new monday our if i is zero 5167 { 5168 $(".icaltable", obj).append("<tr></tr>"); 5169 } 5170 5171 for (var j = 0; j < first + startOnSunday && firstrow; j++) //add pre padding 5172 { 5173 $(".icaltable tr:last", obj).append("<td class = 'padding'></td"); 5174 } 5175 5176 firstrow = false; //no more pre padding 5177 5178 month = getMonthNumber($("#currentmonth", obj).text()); 5179 year = $("#currentyear", obj).text(); 5180 5181 var formatdate = formatDate(year, month, i); 5182 5183 var jsondates = getEventDates(formatdate); 5184 5185 if (jsondates.length === 0) { 5186 options.beforeDay(formatdate); 5187 $(".icaltable tr:last", obj).append("<td id = '" + formatdate + "'><span>" + i + "</span></td");
5187 //add day 5188 } else { 5189 var firstEvent = true; 5190 for (var k = 0; k < jsondates.length; k++) { 5191 var datejson = jsondates[k]; 5192 options.beforeDay(formatdate); 5193 5194 //alert(datejson.title); 5195 5196 var str = "<li><span class='title'>" + datejson.title + "</span><span class='desc'>" + datejson.desc + "</span></li>"; 5197 5198 if (firstEvent) { 5199 //$(".icaltable tr:last", obj).append("<td class='date_has_event " + datejson.className + "' id = '" + formatdate + "'><a href='" + datejson.url + "'>" + i + "</a><div class='events'><ul id ='ul-" + formatdate + "'>" + str + "</ul></div></td>"); //add day 5200 5201 var html = "<td class='date_has_event " + datejson.className + "' id = '" + formatdate + "'>"+ 5202 "<a style='z-index:"+(100-i)+"' class='ical-ev-a' title='Wydarzenia na dzień "+ i +" "+options.monthnames[insdate.getMonth()]+" "+insdate.getFullYear()+"' href='" + datejson.url + "'>" + i + 5203 "<i class='qty'>"+datejson.qty+"</i>" + 5204 "</a>"+ 5205 "</td>"; 5206 $(".icaltable tr:last", obj).append(html); 5207 5208 firstEvent = false; 5209 } else { 5210 //$("#ul-" + formatdate, obj).append(str); 5211 } 5212 } 5213 } 5214 } 5215 5216 5217 5218 if (options.startOnSunday) { 5219 startOnSunday = 1; 5220 } 5221 5222 for (i = 0; i < afterpadding - startOnSunday; i++) //add after padding 5223 { 5224 $(".icaltable tr:last", obj).append("<td class = 'padding'></td"); 5225 } 5226 5227 highlightToday(obj); 5228 } 5229 5230 function getMonthNumber(month) { 5231 for (var i = 0; i < options.monthnames.length; i++) { 5232 if (options.monthnames[i] === month) { 5233 return i; 5234 } 5235 } 5236 } 5237 5238 function getDaysInMonth(year, month) { 5239 return 32 - new Date(year, month, 32).getDate(); 5240 } 5241 5242 function highlightToday(obj) { 5243 var today = new Date(); 5244 today = formatDate(today.getFullYear(), today.getMonth(), today.getDate()); 5245 $("#" + today, obj).addClass("today"); 5246 } 5247 5248 function getEventDates(date) { 5249 5250 var results = []; 5251 5252 for (var i = 0; i < eventdates.length; i++) { 5253 var evaldate = evaluateEventDate(eventdates[i]["date"], date); 5254 if (date === evaldate) { 5255 results.push(eventdates[i]); 5256 } 5257 } 5258 5259 return results; 5260 }; 5261 5262 function evaluateEventDate(eventdate, date) { 5263 var eventdate = eventdate.split('-'); 5264 var date = date.split('-'); 5265 5266 if (eventdate[0] === 'yyyy') { 5267 eventdate[0] = date[0]; 5268 } 5269 5270 if (eventdate[1] === 'mm') { 5271 eventdate[1] = date[1]; 5272 } 5273 5274 if (eventdate[2] === 'dd') { 5275 eventdate[2] = date[2]; 5276 } 5277 5278 return eventdate[0] + '-' + eventdate[1] + '-' + eventdate[2]; 5279 } 5280 5281 function getLastDayOfMonth(year, month, days) { 5282 var date = new Date(year, month, days); 5283 if (date.getDay() === 0) //we start on monday! 5284 { 5285 return 6; 5286 } else { 5287 return date.getDay() - 1; 5288 } 5289 } 5290 5291 function getFirstDayOfMonth(year, month) { 5292 var date = new Date(year, month, 1); 5293 if (date.getDay() === 0) //we start on monday! 5294 { 5295 return 6; 5296 } else { 5297 return date.getDay() - 1; 5298 } 5299 } 5300 5301 function formatDate(year, month, day) { 5302 return year + '-' + formatMonth(month) + '-' + formatDay(day); 5303 } 5304 5305 function formatMonth(month) {
5306 month = month + 1; 5307 5308 if (month < 10) { 5309 month = '0' + month; 5310 } 5311 5312 return month; 5313 } 5314 5315 function formatDay(day) { 5316 if (day < 10) { 5317 day = '0' + day; 5318 } 5319 5320 return day; 5321 } 5322 5323 function codabubble() { //Stefano Verna 5324 $('.date_has_event').each(function() { 5325 // options 5326 var distance = 10; 5327 var time = 250; 5328 var hideDelay = 175; 5329 5330 var hideDelayTimer = null; 5331 5332 // tracker 5333 var beingShown = false; 5334 var shown = false; 5335 5336 var trigger = $(this); 5337 var popup = $('.events ul', this).css('opacity', 0); 5338 5339 // set the mouseover and mouseout on both element 5340 $([trigger.get(0), popup.get(0)]).mouseover(function() { 5341 // stops the hide event if we move from the trigger to the popup element 5342 if (hideDelayTimer) clearTimeout(hideDelayTimer); 5343 5344 // don't trigger the animation again if we're being shown, or already visible 5345 if (beingShown || shown) { 5346 return; 5347 } else { 5348 beingShown = true; 5349 5350 // reset position of popup box 5351 popup.css({ 5352 bottom: 5, 5353 left: -105, 5354 display: 'block' // brings the popup back in to view 5355 }) 5356 5357 // (we're using chaining on the popup) now animate it's opacity and position 5358 .animate({ 5359 bottom: '+=' + distance + 'px', 5360 opacity: 1 5361 }, time, 'swing', function() { 5362 // once the animation is complete, set the tracker variables 5363 beingShown = false; 5364 shown = true; 5365 }); 5366 } 5367 }).mouseout(function() { 5368 // reset the timer if we get fired again - avoids double animations 5369 if (hideDelayTimer) clearTimeout(hideDelayTimer); 5370 5371 // store the timer so that it can be cleared in the mouseover if required 5372 hideDelayTimer = setTimeout(function() { 5373 hideDelayTimer = null; 5374 popup.animate({ 5375 bottom: '-=' + distance + 'px', 5376 opacity: 0 5377 }, time, 'swing', function() { 5378 // once the animate is complete, set the tracker variables 5379 shown = false; 5380 // hide the popup entirely after the effect (opacity alone doesn't do the job) 5381 popup.css('display', 'none'); 5382 }); 5383 }, hideDelay); 5384 }); 5385 }); 5386 } 5387 }; 5388 5389 $.fn.ical.changeEventDates = function(array) { 5390 eventdates = array; 5391 }; 5392 5393})(jQuery); 5394 5395 5396 5397 5398 5399 5400 5401 5402 5403 5404 5405 5406 5407 5408 5409 5410 5411 5412 5413 5414 5415 5416 5417 5418 5419 5420 5421// function showIcalEventsTop(obj){ 5422// var t_event_id = $(obj).attr('data-id'); 5423// alert(t_event_id); 5424 5425 5426// } 5427var last_choosen_id_event = false; 5428function showSepIcalEventsTop(obj){ 5429 var t_event_id = $(obj).attr('data-id'); 5430 5431 if ( $(obj).hasClass('selected')==true ){ 5432 $(this).slideUp(); 5433 } else { 5434 $('.ical-ev-a.selected').each(function() { 5435 $(this).removeClass('selected'); 5436 }); 5437 $(obj).addClass('selected'); 5438 5439 $('.events-list-details').find('.evl-det').each(function() { 5440 $(this).slideUp(); 5441 }); 5442 $('#event_'+t_event_id).slideDown(); 5443 last_choosen_id_event = t_event_id; 5444 } 5445//events-list-details"> 5446//<div id="event_ 5447} 5448function showIcalEventsTop(obj){ 5449 if ( $('body').find('.evl-det-tt').length>0 ){ 5450 //$('body').find('.evl-det-tt').fadeOut('fast',function(){ $(this).remove(); }); 5451 $('body').find('.evl-det-tt').remove(); 5452 5453 setTimeout(function(){ 5454 var t_event_id = $(obj).attr('data-id'); 5455 //alert(t_event_id); 5456 5457 5458 var pos = $(obj).offset(); 5459 5460 var w_t = 100;//$('#event_'+t_event_id).outerWidth(); 5461 //var w_h = $('#event_'+t_event_id).outerHeight(); 5462 5463 $('body').append('<div class="evl-det-tt" style="display:none; left:'+(pos.left-(w_t/2))+'px;"><div class="evl-det"></div></div>'); 5464 $('body').find('.evl-det-tt .evl-det').html( $('#event_'+t_event_id).html() );//.fadeIn(); 5465 5466 var w_h = $('body').find('.evl-det-tt').outerHeight(); 5467 $('body').find('.evl-det-tt').css({'top':(pos.top-w_h+10)+'px'}); 5468 5469 $('body').find('.evl-det-tt').fadeIn(); 5470 $('body').find('.evl-det-tt').mouseleave(function() { 5471 $(this).fadeOut('fast',function(){ $(this).remove(); }); 5472 5473 }); 5474 },10); 5475 } else { 5476 var t_event_id = $(obj).attr('data-id'); 5477 //alert(t_event_id); 5478 5479 5480 var pos = $(obj).offset(); 5481 5482 var w_t = 100;//$('#event_'+t_event_id).outerWidth(); 5483 //var w_h = $('#event_'+t_event_id).outerHeight(); 5484 5485 $('body').append('<div class="evl-det-tt" style="display:none; left:'+(pos.left-(w_t/2))+'px;"><div class="evl-det"></div></div>'); 5486 $('body').find('.evl-det-tt .evl-det').html( $('#event_'+t_event_id).html() );//.fadeIn(); 5487 5488 var w_h = $('body').find('.evl-det-tt').outerHeight(); 5489 $('body').find('.evl-det-tt').css({'top':(pos.top-w_h+10)+'px'}); 5490 5491 $('body').find('.evl-det-tt').fadeIn(); 5492 $('body').find('.evl-det-tt').mouseleave(function() { 5493 $(this).fadeOut('fast',function(){ $(this).remove(); }); 5494 5495 }); 5496 // $(obj).parent().append('<div class="evl-det-tt"></div>'); 5497 //$(obj).parent().find('.evl-det-tt').html( $('#event_'+t_event_id).html() ).fadeIn(); 5498 5499 //$(obj).parent().append('<div class="evl-det-tt"></div>'); 5500 //$(obj).parent().find('.evl-det-tt').html( $('#event_'+t_event_id).html() ).fadeIn(); 5501 5502 5503 5504 5505 // $(this).append(out); 5506 // var w_t = $(tipr_cont).outerWidth(); 5507 // var w_e = $(this).width(); 5508 // var m_l = w_e / 2 - w_t / 2; 5509 // $(tipr_cont).css("margin-left", m_l + "px"); 5510 // $(this).removeAttr("title"); 5511 // $(tipr_cont).fadeIn(set.speed) 5512 } 5513 5514} 5515 5516function showIcalEventsTop22(obj){ 5517 if ( $('body').find('.evl-det-tt').length>0 ){ 5518 $('body').find('.evl-det-tt').remove(); 5519 } 5520 var t_event_id = $(obj).attr('data-id'); 5521 //alert(t_event_id); 5522 5523 5524 var pos = $(obj).offset(); 5525 5526 var w_t = 100;//$('#event_'+t_event_id).outerWidth(); 5527 var w_h = $('#event_'+t_event_id).outerHeight(); 5528 5529 $('body').append('<div class="evl-det-tt" style="display:none; top:'+(pos.top-w_h)+'px; left:'+(pos.left-(w_t/2))+'px;"><div class="evl-det"></div></div>'); 5530 $('body').find('.evl-det-tt .evl-det').html( $('#event_'+t_event_id).html() );//.fadeIn(); 5531 $('body').find('.evl-det-tt').fadeIn(); 5532 // $(obj).parent().append('<div class="evl-det-tt"></div>'); 5533 //$(obj).parent().find('.evl-det-tt').html( $('#event_'+t_event_id).html() ).fadeIn(); 5534 5535 //$(obj).parent().append('<div class="evl-det-tt"></div>'); 5536 //$(obj).parent().find('.evl-det-tt').html( $('#event_'+t_event_id).html() ).fadeIn(); 5537 5538 5539 5540 5541 // $(this).append(out); 5542 // var w_t = $(tipr_cont).outerWidth(); 5543 // var w_e = $(this).width(); 5544 // var m_l = w_e / 2 - w_t / 2; 5545 // $(tipr_cont).css("margin-left", m_l + "px"); 5546 // $(this).removeAttr("title"); 5547 // $(tipr_cont).fadeIn(set.speed) 5548 5549} 5550function hideIcalEventsTop(obj){ 5551 //var t_event_id = $(obj).attr('data-id'); 5552 $('body').find('.evl-det-tt').fadeOut('fast',function(){ $(this).remove(); }); 5553} 5554 5555/* 5556 * First plugin 5557 * 5558 * @author Maarten Hus 5559 */ 5560(function($) { 5561 var eventdates = {}; 5562 5563 $.fn.icalbig = function(options) { 5564 $.fn.icalbig.defaults = { 5565 daynames: ['Pon', 'Wt', 'Śr', 'Czw', 'Pi', 'So', 'Ni'], //default short names for the days of the week 5566 monthnames: ['Styczeń', 'Luty', 'Marzec', 'KwiecieÅ
5566„', 'Maj', 'Czerwiec', 'Lipiec', 'Sierpień', 'Wrzesień', 'Październik', 'Listopad', 'Grudzień'], 5567 startdate: new Date(), // The date the calender should take as start point 5568 eventdates: {}, 5569 startOnSunday: false, 5570 beforeDay: function(insdate) {}, 5571 beforeMonth: function(insdate) {}, 5572 beforeYear: function(insdate) {} 5573 }; 5574 5575 options = $.extend({}, $.fn.icalbig.defaults, options); 5576 5577 return this.each(function() { 5578 var obj = $(this); //get the object 5579 eventdates = options.eventdates; 5580 5581 var insdate = options.startdate; //The date that gets used for calculating the month 5582 5583 createCalendar(obj, insdate); 5584 }); 5585 5586 /** 5587 * Create the calendar 5588 */ 5589 function createCalendar(obj, insdate) { 5590 obj.html(''); 5591 createNavigation(obj, insdate); 5592 createTable(obj); //create table 5593 addDatesToTable(obj, insdate); 5594 codabubble(); 5595 } 5596 5597 /** 5598 * Create the navigation and handle its clicks 5599 */ 5600 function createNavigation(obj, insdate) { 5601 5602 //obj.prepend("<div id='nav-calendar'><div id='year'><span id='year-left-arrow' class='year-buttons'></span><span id='currentyear'>" + insdate.getFullYear() + "</span><span id='year-right-arrow' class='year-buttons'></span></div>" + "<div id='month'><span id='month-left-arrow'></span><span id='currentmonth'>" + options.monthnames[insdate.getMonth()] + "</span><span id='month-right-arrow'></span></div></div>"); 5603 obj.prepend("<div id='nav-calendar'><div id='month'><i id='month-left-arrow' class='fa fa-chevron-left'></i><div class='month-year'><span id='currentmonth'>" + options.monthnames[insdate.getMonth()] + "</span><span id='currentyear'>" + insdate.getFullYear() + "</span></div><i id='month-right-arrow' class='fa fa-chevron-right'></i></div></div>"); 5604 5605 5606 $("#month-right-arrow", obj).click(function() { 5607 var year; 5608 var month = insdate.getMonth() + 1; 5609 5610 if (month > 11) { 5611 month = 0; 5612 year = insdate.getFullYear() + 1; 5613 options.beforeYear(formatDate(year, month, 1)); 5614 } else { 5615 year = insdate.getFullYear(); 5616 } 5617 5618 options.beforeMonth(formatDate(year, month, 1)); 5619 5620 date = new Date(year, month, 1); 5621 createCalendar(obj, date); 5622 }); 5623 5624 $("#month-left-arrow", obj).click(function() { 5625 var year; 5626 var month = insdate.getMonth() - 1; 5627 5628 if (month < 0) { 5629 month = 11; 5630 year = insdate.getFullYear() - 1; 5631 options.beforeYear(formatDate(year, month, 1)); 5632 } else { 5633 year = insdate.getFullYear(); 5634 } 5635 5636 options.beforeMonth(formatDate(year, month, 1)); 5637 5638 date = new Date(year, month, 1); 5639 createCalendar(obj, date); 5640 }); 5641 } 5642 5643 /** 5644 * Create the table for the calendar 5645 */ 5646 function createTable(obj) { 5647 //obj.append("<table class='icaltable'><thead><tr id='week-days'></tr></thead></table>"); //add a table 5648 5649 obj.append("<table class='icaltable'><thead><tr id='week-days'></tr></thead></table>"); //add a table 5650 5651 for (var i = 0; i < options.daynames.length; i++) { 5652 $(".icaltable tr", obj).append("<th>" + options.daynames[i] + "</th>"); //add the day header 5653 } 5654 5655 $(".icaltable", obj).append("<tr class='no_marg'><td colspan='7' id='separator'></td></tr>"); 5656 $(".icaltable", obj).append("<tr class='no_marg'><td colspan='7' id='clear-separator'></td></tr>"); 5657 5658 } 5659 5660 function addDatesToTable(obj, insdate) { 5661 var month = insdate.getMonth(); 5662 var year = insdate.getFullYear(); 5663 5664 var days = getDaysInMonth(year, month); 5665 var first = getFirstDayOfMonth(year, month); // 0 - 6 5666 var last = getLastDayOfMonth(year, month, days); // 0 - 6 5667 5668 var afterpadding = 6 - last; // week minus the last day of the month = afterpadding 5669 5670 var firstrow = true; 5671 5672 var startOnSunday = 0; 5673 5674 if (options.startOnSunday) { 5675 if (first == 6) { 5676 startOnSunday = -6; 5677 } else { 5678 startOnSunday = 1; 5679 } 5680 } 5681 5682 for (var i = 1; i <= days; i++) //each day in month 5683 { 5684 if ((first + i - 1 + startOnSunday) % 7 === 0 || firstrow === true) //add new tr for each new monday our if i is zero 5685 { 5686 $(".icaltable", obj).append("<tr></tr>"); 5687 } 5688 5689 for (var j = 0; j < first + startOnSunday && firstrow; j++) //add pre padding 5690 { 5691 $(".icaltable tr:last", obj).append("<td class = 'padding'></td"); 5692 } 5693 5694 firstrow = false; //no more pre padding 5695
5696 month = getMonthNumber($("#currentmonth", obj).text()); 5697 year = $("#currentyear", obj).text(); 5698 5699 var formatdate = formatDate(year, month, i); 5700 5701 var jsondates = getEventDates(formatdate); 5702 5703 if (jsondates.length === 0) { 5704 options.beforeDay(formatdate); 5705 $(".icaltable tr:last", obj).append("<td id = '" + formatdate + "'><span>" + i + "</span></td"); //add day 5706 } else { 5707 var firstEvent = true; 5708 for (var k = 0; k < jsondates.length; k++) { 5709 var datejson = jsondates[k]; 5710 options.beforeDay(formatdate); 5711 5712 //alert(datejson.title); 5713 5714 // $( "div.enterleave" ) 5715 // .mouseenter(function() { 5716 // $( "p:first", this ).text( "mouse enter" ); 5717 // }) 5718 // .mouseleave(function() { 5719 // $( "p:first", this ).text( "mouse leave" ); 5720 // $( "p:last", this ).text( ++n ); 5721 // }); 5722 5723//event_id 5724 if (firstEvent) { 5725 //onmouseover='showIcalEventsTop(this);' onmouseout='hideIcalEventsTop(this);' 5726 //onmouseleave='hideIcalEventsTop(this);' 5727 var html = "<td class='date_has_event " + datejson.className + "' id = '" + formatdate + "'>"+ 5728 //"<a onmouseenter='showIcalEventsTop(this);' data-id='"+datejson.event_id+"' rel='"+datejson.event_id+"' href='" + datejson.url + "'>" + i + "</a>"+ 5729 "<a class='ical-ev-a' onclick='showSepIcalEventsTop(this);' data-id='"+datejson.event_id+"' rel='"+datejson.event_id+"'>" + i + 5730 "<i class='qty'>"+datejson.qty+"</i>" + 5731 "</a>"+ 5732 "</td>"; 5733 $(".icaltable tr:last", obj).append(html); 5734 firstEvent = false; 5735 } else { 5736 //$("#ul-" + formatdate, obj).append(str); 5737 } 5738 5739 5740 5741 //var str = "<li><span class='title'>" + datejson.title + "</span><span class='desc'>" + datejson.desc + "</span></li>"; 5742 5743 // if (firstEvent) { 5744 // $(".icaltable tr:last", obj).append("<td class='date_has_event " + datejson.className + "' id = '" + formatdate + "'><a href='" + datejson.url + "'>" + i + "</a><div class='events'><ul id ='ul-" + formatdate + "'>" + str + "</ul></div></td>"); //add day 5745 // firstEvent = false; 5746 // } else { 5747 // $("#ul-" + formatdate, obj).append(str); 5748 // } 5749 } 5750 } 5751 } 5752 5753 if (options.startOnSunday) { 5754 startOnSunday = 1; 5755 } 5756 5757 for (i = 0; i < afterpadding - startOnSunday; i++) //add after padding 5758 { 5759 $(".icaltable tr:last", obj).append("<td class = 'padding'></td"); 5760 } 5761 5762 highlightToday(obj); 5763 } 5764 5765 5766 5767 function getMonthNumber(month) { 5768 for (var i = 0; i < options.monthnames.length; i++) { 5769 if (options.monthnames[i] === month) { 5770 return i; 5771 } 5772 } 5773 } 5774 5775 function getDaysInMonth(year, month) { 5776 return 32 - new Date(year, month, 32).getDate(); 5777 } 5778 5779 function highlightToday(obj) { 5780 var today = new Date(); 5781 today = formatDate(today.getFullYear(), today.getMonth(), today.getDate()); 5782 $("#" + today, obj).addClass("today"); 5783 } 5784 5785 function getEventDates(date) { 5786 5787 var results = []; 5788 5789 for (var i = 0; i < eventdates.length; i++) { 5790 var evaldate = evaluateEventDate(eventdates[i]["date"], date); 5791 if (date === evaldate) { 5792 results.push(eventdates[i]); 5793 } 5794 } 5795 5796 return results; 5797 }; 5798 5799 function evaluateEventDate(eventdate, date) { 5800 var eventdate = eventdate.split('-'); 5801 var date = date.split('-'); 5802 5803 if (eventdate[0] === 'yyyy') { 5804 eventdate[0] = date[0]; 5805 } 5806 5807 if (eventdate[1] === 'mm') { 5808 eventdate[1] = date[1]; 5809 } 5810 5811 if (eventdate[2] === 'dd') { 5812 eventdate[2] = date[2]; 5813 } 5814 5815 return eventdate[0] + '-' + eventdate[1] + '-' + eventdate[2]; 5816 } 5817 5818 function getLastDayOfMonth(year, month, days) { 5819 var date = new Date(year, month, days); 5820 if (date.getDay() === 0) //we start on monday! 5821 { 5822 return 6; 5823 } else { 5824 return date.getDay() - 1; 5825 } 5826 } 5827 5828 function getFirstDayOfMonth(year, month) { 5829 var date = new Date(year, month, 1); 5830 if (date.getDay() === 0) //we start on monday! 5831 { 5832 return 6; 5833 } else { 5834 return date.getDay() - 1; 5835 } 5836 } 5837 5838 function formatDate(year, month, day) { 5839 return year + '-' + formatMonth(month) + '-' + formatDay(day); 5840 } 5841 5842 function formatMonth(month) {
5843 month = month + 1; 5844 5845 if (month < 10) { 5846 month = '0' + month; 5847 } 5848 5849 return month; 5850 } 5851 5852 function formatDay(day) { 5853 if (day < 10) { 5854 day = '0' + day; 5855 } 5856 5857 return day; 5858 } 5859 5860 function codabubble() { //Stefano Verna 5861 $('.date_has_event').each(function() { 5862 // options 5863 var distance = 10; 5864 var time = 250; 5865 var hideDelay = 175; 5866 5867 var hideDelayTimer = null; 5868 5869 // tracker 5870 var beingShown = false; 5871 var shown = false; 5872 5873 var trigger = $(this); 5874 var popup = $('.events ul', this).css('opacity', 0); 5875 5876 // set the mouseover and mouseout on both element 5877 $([trigger.get(0), popup.get(0)]).mouseover(function() { 5878 // stops the hide event if we move from the trigger to the popup element 5879 if (hideDelayTimer) clearTimeout(hideDelayTimer); 5880 5881 // don't trigger the animation again if we're being shown, or already visible 5882 if (beingShown || shown) { 5883 return; 5884 } else { 5885 beingShown = true; 5886 5887 // reset position of popup box 5888 popup.css({ 5889 bottom: 5, 5890 left: -105, 5891 display: 'block' // brings the popup back in to view 5892 }) 5893 5894 // (we're using chaining on the popup) now animate it's opacity and position 5895 .animate({ 5896 bottom: '+=' + distance + 'px', 5897 opacity: 1 5898 }, time, 'swing', function() { 5899 // once the animation is complete, set the tracker variables 5900 beingShown = false; 5901 shown = true; 5902 }); 5903 } 5904 }).mouseout(function() { 5905 // reset the timer if we get fired again - avoids double animations 5906 if (hideDelayTimer) clearTimeout(hideDelayTimer); 5907 5908 // store the timer so that it can be cleared in the mouseover if required 5909 hideDelayTimer = setTimeout(function() { 5910 hideDelayTimer = null; 5911 popup.animate({ 5912 bottom: '-=' + distance + 'px', 5913 opacity: 0 5914 }, time, 'swing', function() { 5915 // once the animate is complete, set the tracker variables 5916 shown = false; 5917 // hide the popup entirely after the effect (opacity alone doesn't do the job) 5918 popup.css('display', 'none'); 5919 }); 5920 }, hideDelay); 5921 }); 5922 }); 5923 } 5924 }; 5925 5926 $.fn.icalbig.changeEventDates = function(array) { 5927 eventdates = array; 5928 }; 5929 5930})(jQuery); 5931 5932 5933 5934 5935 5936 5937 5938 5939 5940 5941 5942 5943 5944 5945 5946 5947 5948 5949 5950 5951 5952 5953 5954 5955 5956 5957 5958(function(jQuery) { 5959 jQuery.fn.ellipsis = function(lines, enableUpdating, moreText, lessText) { 5960 return jQuery(this).each(function() { 5961 var el = jQuery(this); 5962 var resetDescription = function(height, originalText) { 5963 el.html(originalText); 5964 el.animate({ 5965 "height": height 5966 }, "normal", null, function() { 5967 el.ellipsis(true, true, moreText, lessText); 5968 }); 5969 }; 5970 5971 if (el.css("overflow") == "hidden") { 5972 5973 var originalText = el.html();
5974 var availWidth = el.width(); 5975 var availHeight = el.height(); 5976 5977 5978 var t = jQuery(this.cloneNode(true)) 5979 .hide() 5980 .css({ 5981 'position': 'absolute', 5982 'overflow': 'visible', 5983 'max-width': 'none', 5984 'max-height': 'none' 5985 }); 5986 if (lines) t.css("height", "auto").width(availWidth); 5987 else t.css("width", "auto"); 5988 el.after(t); 5989 5990 5991 var fullHeight = t.height(); 5992 5993 var avail = (lines) ? availHeight : availWidth; 5994 var test = (lines) ? t.height() : t.width(); 5995 var foundMin = false, 5996 foundMax = false; 5997 if (test > avail) { 5998 //Binary search style trimming of the temp element to find its optimal size 5999 var min = 0; 6000 var max = originalText.length; 6001 while (min <= max) { 6002 var trimLocation = (min + max) / 2; 6003 var text = originalText.substr(0, trimLocation); 6004 t.html(text + "…"); 6005 6006 test = (lines) ? t.height() : t.width(); 6007 if (test > avail) { 6008 if (foundMax) 6009 foundMin = true; 6010 6011 max = trimLocation - 1; 6012 if (min > max) { 6013 //If we would be ending decrement the min and regenerate the text so we don't end with a 6014 //slightly larger text than there is space for 6015 trimLocation = (max + max - 2) / 2; 6016 text = originalText.substr(0, trimLocation); 6017 t.html(text + "…"); 6018 break; 6019 } 6020 } else if (test < avail) { 6021 min = trimLocation + 1; 6022 } else { 6023 if (foundMin && foundMax && ((max - min) / max < .2)) 6024 break; 6025 foundMax = true; 6026 min = trimLocation + 1; 6027 } 6028 } 6029 } 6030 6031 el.html(t.html()); 6032 t.remove(); 6033 6034 6035 6036 if (enableUpdating == true) { 6037 var oldW = el.width(); 6038 var oldH = el.height(); 6039 el.one("resize", function() { 6040 if (el.width() != oldW || (lines && el.height != oldH)) { 6041 el.html(originalText); 6042 el.ellipsis(lines, enableUpdating, moreText, lessText); 6043 } 6044 }); 6045 } 6046 } 6047 6048 }); 6049 }; 6050})(jQuery); 6051 6052 6053 6054 6055 6056 6057 6058 6059 6060/* 6061 * jQuery Easing v1.3 - http://gsgd.co.uk/sandbox/jquery/easing/ 6062 * 6063 * Uses the built in easing capabilities added In jQuery 1.1 6064 * to offer multiple easing options 6065 * 6066 * TERMS OF USE - jQuery Easing 6067 * 6068 * Open source under the BSD License. 6069 * 6070 * Copyright © 2008 George McGinley Smith 6071 * All rights reserved. 6072 * 6073 * Redistribution and use in source and binary forms, with or without modification, 6074 * are permitted provided that the following conditions are met: 6075 * 6076 * Redistributions of source code must retain the above copyright notice, this list of 6077 * conditions and the following disclaimer. 6078 * Redistributions in binary form must reproduce the above copyright notice, this list 6079 * of conditions and the following disclaimer in the documentation and/or other materials 6080 * provided with the distribution. 6081 * 6082 * Neither the name of the author nor the names of contributors may be used to endorse 6083 * or promote products derived from this software without specific prior written permission. 6084 * 6085 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 6086 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 6087 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 6088 * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
vendor: 5,174 bytes, lines 6089-6222
6089 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE 6090 * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 6091 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 6092 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 6093 * OF THE POSSIBILITY OF SUCH DAMAGE. 6094 * 6095 */ 6096 6097// t: current time, b: begInnIng value, c: change In value, d: duration 6098jQuery.easing['jswing'] = jQuery.easing['swing']; 6099 6100jQuery.extend(jQuery.easing, { 6101 def: 'easeOutQuad', 6102 swing: function(x, t, b, c, d) { 6103 //alert(jQuery.easing.default); 6104 return jQuery.easing[jQuery.easing.def](x, t, b, c, d); 6105 }, 6106 easeInQuad: function(x, t, b, c, d) { 6107 return c * (t /= d) * t + b; 6108 }, 6109 easeOutQuad: function(x, t, b, c, d) { 6110 return -c * (t /= d) * (t - 2) + b; 6111 }, 6112 easeInOutQuad: function(x, t, b, c, d) { 6113 if ((t /= d / 2) < 1) return c / 2 * t * t + b; 6114 return -c / 2 * ((--t) * (t - 2) - 1) + b; 6115 }, 6116 easeInCubic: function(x, t, b, c, d) { 6117 return c * (t /= d) * t * t + b; 6118 }, 6119 easeOutCubic: function(x, t, b, c, d) { 6120 return c * ((t = t / d - 1) * t * t + 1) + b; 6121 }, 6122 easeInOutCubic: function(x, t, b, c, d) { 6123 if ((t /= d / 2) < 1) return c / 2 * t * t * t + b; 6124 return c / 2 * ((t -= 2) * t * t + 2) + b; 6125 }, 6126 easeInQuart: function(x, t, b, c, d) { 6127 return c * (t /= d) * t * t * t + b; 6128 }, 6129 easeOutQuart: function(x, t, b, c, d) { 6130 return -c * ((t = t / d - 1) * t * t * t - 1) + b; 6131 }, 6132 easeInOutQuart: function(x, t, b, c, d) { 6133 if ((t /= d / 2) < 1) return c / 2 * t * t * t * t + b; 6134 return -c / 2 * ((t -= 2) * t * t * t - 2) + b; 6135 }, 6136 easeInQuint: function(x, t, b, c, d) { 6137 return c * (t /= d) * t * t * t * t + b; 6138 }, 6139 easeOutQuint: function(x, t, b, c, d) { 6140 return c * ((t = t / d - 1) * t * t * t * t + 1) + b; 6141 }, 6142 easeInOutQuint: function(x, t, b, c, d) { 6143 if ((t /= d / 2) < 1) return c / 2 * t * t * t * t * t + b; 6144 return c / 2 * ((t -= 2) * t * t * t * t + 2) + b; 6145 }, 6146 easeInSine: function(x, t, b, c, d) { 6147 return -c * Math.cos(t / d * (Math.PI / 2)) + c + b; 6148 }, 6149 easeOutSine: function(x, t, b, c, d) { 6150 return c * Math.sin(t / d * (Math.PI / 2)) + b; 6151 }, 6152 easeInOutSine: function(x, t, b, c, d) { 6153 return -c / 2 * (Math.cos(Math.PI * t / d) - 1) + b; 6154 }, 6155 easeInExpo: function(x, t, b, c, d) { 6156 return (t == 0) ? b : c * Math.pow(2, 10 * (t / d - 1)) + b; 6157 }, 6158 easeOutExpo: function(x, t, b, c, d) { 6159 return (t == d) ? b + c : c * (-Math.pow(2, -10 * t / d) + 1) + b; 6160 }, 6161 easeInOutExpo: function(x, t, b, c, d) { 6162 if (t == 0) return b; 6163 if (t == d) return b + c; 6164 if ((t /= d / 2) < 1) return c / 2 * Math.pow(2, 10 * (t - 1)) + b; 6165 return c / 2 * (-Math.pow(2, -10 * --t) + 2) + b; 6166 }, 6167 easeInCirc: function(x, t, b, c, d) { 6168 return -c * (Math.sqrt(1 - (t /= d) * t) - 1) + b; 6169 }, 6170 easeOutCirc: function(x, t, b, c, d) { 6171 return c * Math.sqrt(1 - (t = t / d - 1) * t) + b; 6172 }, 6173 easeInOutCirc: function(x, t, b, c, d) { 6174 if ((t /= d / 2) < 1) return -c / 2 * (Math.sqrt(1 - t * t) - 1) + b; 6175 return c / 2 * (Math.sqrt(1 - (t -= 2) * t) + 1) + b; 6176 }, 6177 easeInElastic: function(x, t, b, c, d) { 6178 var s = 1.70158; 6179 var p = 0; 6180 var a = c; 6181 if (t == 0) return b; 6182 if ((t /= d) == 1) return b + c; 6183 if (!p) p = d * .3; 6184 if (a < Math.abs(c)) { 6185 a = c; 6186 var s = p / 4; 6187 } else var s = p / (2 * Math.PI) * Math.asin(c / a); 6188 return -(a * Math.pow(2, 10 * (t -= 1)) * Math.sin((t * d - s) * (2 * Math.PI) / p)) + b; 6189 }, 6190 easeOutElastic: function(x, t, b, c, d) { 6191 var s = 1.70158; 6192 var p = 0; 6193 var a = c; 6194 if (t == 0) return b; 6195 if ((t /= d) == 1) return b + c; 6196 if (!p) p = d * .3; 6197 if (a < Math.abs(c)) { 6198 a = c; 6199 var s = p / 4; 6200 } else var s = p / (2 * Math.PI) * Math.asin(c / a); 6201 return a * Math.pow(2, -10 * t) * Math.sin((t * d - s) * (2 * Math.PI) / p) + c + b; 6202 }, 6203 easeInOutElastic: function(x, t, b, c, d) { 6204 var s = 1.70158; 6205 var p = 0; 6206 var a = c; 6207 if (t == 0) return b; 6208 if ((t /= d / 2) == 2) return b + c; 6209 if (!p) p = d * (.3 * 1.5); 6210 if (a < Math.abs(c)) { 6211 a = c; 6212 var s = p / 4; 6213 } else var s = p / (2 * Math.PI) * Math.asin(c / a); 6214 if (t < 1) return -.5 * (a * Math.pow(2, 10 * (t -= 1)) * Math.sin((t * d - s) * (2 * Math.PI) / p)) + b; 6215 return a * Math.pow(2, -10 * (t -= 1)) * Math.sin((t * d - s) * (2 * Math.PI) / p) * .5 + c + b; 6216 }, 6217 easeInBack: function(x, t, b, c, d, s) { 6218 if (s == undefined) s = 1.70158; 6219 return c * (t /= d) * t * ((s + 1) * t - s) + b; 6220 }, 6221 easeOutBack: function(x, t, b, c, d, s) { 6222 if (s == undefined) s = 1.70158;
6223 return c * ((t = t / d - 1) * t * ((s + 1) * t + s) + 1) + b; 6224 }, 6225 easeInOutBack: function(x, t, b, c, d, s) { 6226 if (s == undefined) s = 1.70158; 6227 if ((t /= d / 2) < 1) return c / 2 * (t * t * (((s *= (1.525)) + 1) * t - s)) + b; 6228 return c / 2 * ((t -= 2) * t * (((s *= (1.525)) + 1) * t + s) + 2) + b; 6229 }, 6230 easeInBounce: function(x, t, b, c, d) { 6231 return c - jQuery.easing.easeOutBounce(x, d - t, 0, c, d) + b; 6232 }, 6233 easeOutBounce: function(x, t, b, c, d) { 6234 if ((t /= d) < (1 / 2.75)) { 6235 return c * (7.5625 * t * t) + b; 6236 } else if (t < (2 / 2.75)) { 6237 return c * (7.5625 * (t -= (1.5 / 2.75)) * t + .75) + b; 6238 } else if (t < (2.5 / 2.75)) { 6239 return c * (7.5625 * (t -= (2.25 / 2.75)) * t + .9375) + b; 6240 } else { 6241 return c * (7.5625 * (t -= (2.625 / 2.75)) * t + .984375) + b; 6242 } 6243 }, 6244 easeInOutBounce: function(x, t, b, c, d) { 6245 if (t < d / 2) return jQuery.easing.easeInBounce(x, t * 2, 0, c, d) * .5 + b; 6246 return jQuery.easing.easeOutBounce(x, t * 2 - d, 0, c, d) * .5 + c * .5 + b; 6247 } 6248}); 6249 6250 6251 6252/*! 6253 * liScroll 1.0 6254 * Examples and documentation at: 6255 * http://www.gcmingati.net/wordpress/wp-content/lab/jquery/newsticker/jq-liscroll/scrollanimate.html 6256 * 2007-2010 Gian Carlo Mingati 6257 * Version: 1.0.2.1 (22-APRIL-2011) 6258 * Dual licensed under the MIT and GPL licenses: 6259 * http://www.opensource.org/licenses/mit-license.php 6260 * http://www.gnu.org/licenses/gpl.html 6261 * Requires: 6262 * jQuery v1.2.x or later 6263 * 6264 */ 6265 6266 6267jQuery.fn.liScroll = function(settings) { 6268 settings = jQuery.extend({ 6269 travelocity: 0.07 6270 }, settings); 6271 return this.each(function() { 6272 var $strip = jQuery(this); 6273 $strip.addClass("newsticker"); 6274 var stripWidth = 1; 6275 $strip.find("li").each(function(i) { 6276 stripWidth += jQuery(this, i).outerWidth(true); // thanks to Michael Haszprunar and Fabien Volpi 6277 }); 6278 var $mask = $strip.wrap("<div class='mask'></div>"); 6279 var $tickercontainer = $strip.parent().wrap("<div class='tickercontainer'></div>"); 6280 var containerWidth = $strip.parent().parent().width(); //a.k.a. 'mask' width 6281 $strip.width(stripWidth); 6282 var totalTravel = stripWidth + containerWidth; 6283 var defTiming = totalTravel / settings.travelocity; // thanks to Scott Waye 6284 function scrollnews(spazio, tempo) { 6285 $strip.animate({ 6286 left: '-=' + spazio 6287 }, tempo, "linear", function() { 6288 $strip.css("left", containerWidth); 6289 scrollnews(totalTravel, defTiming); 6290 }); 6291 } 6292 scrollnews(totalTravel, defTiming); 6293 $strip.hover(function() { 6294 jQuery(this).stop(); 6295 }, 6296 function() { 6297 var offset = jQuery(this).offset(); 6298 var residualSpace = offset.left + stripWidth; 6299 var residualTime = residualSpace / settings.travelocity; 6300 scrollnews(residualSpace, residualTime); 6301 }); 6302 }); 6303}; 6304 6305 6306 6307 6308 6309 6310/* ------------------------------------------------------------------------ 6311 Class: prettyPhoto 6312 Use: Lightbox clone for jQuery 6313 Author: Stephane Caron (http://www.no-margin-for-errors.com) 6314 Version: 3.1.4 6315------------------------------------------------------------------------- */ 6316 6317(function($) { 6318 $.prettyPhoto = { 6319 version: '3.1.4' 6320 }; 6321 $.fn.prettyPhoto = function(pp_settings) { 6322 pp_settings = jQuery.extend({ 6323 hook: 'rel', 6324 animation_speed: 'fast', 6325 ajaxcallback: function() {}, 6326 slideshow: 5000, 6327 autoplay_slideshow: false, 6328 opacity: 0.80, 6329 show_title: true, 6330 allow_resize: true, 6331 allow_expand: true, 6332 default_width: 500, 6333 default_height: 344, 6334 counter_separator_label: '/', 6335 theme: 'pp_default', 6336 horizontal_padding: 20, 6337 hideflash: false, 6338 wmode: 'opaque', 6339 autoplay: true, 6340 modal: false, 6341 deeplinking: true, 6342 overlay_gallery: true, 6343 overlay_gallery_max: 30, 6344 keyboard_shortcuts: true, 6345 changepicturecallback: function() {}, 6346 callback: function() {}, 6347 ie6_fallback: true, 6348 markup: '<div class="pp_pic_holder"> \ 6349 <div class="ppt"> </div> \ 6350 <div class="pp_top"> \ 6351 <div class="pp_left"></div> \ 6352 <div class="pp_middle"></div> \ 6353 <div class="pp_right"></div> \ 6354 </div> \ 6355 <div class="pp_content_container"> \ 6356 <div class="pp_left"> \ 6357 <div class="pp_right"> \ 6358 <div class="pp_content"> \ 6359 <div class="pp_loaderIcon"></div> \ 6360 <div class="pp_fade"> \ 6361 <a href="#" class="pp_expand" title="Expand the image">Expand</a> \ 6362 <div class="pp_hoverContainer"> \ 6363 <a class="pp_next" href="#">next</a> \ 6364 <a class="pp_previous" href="#">previous</a> \ 6365 </div> \ 6366 <div id="pp_full_res"></div> \ 6367 <div class="pp_details"> \ 6368 <div class="pp_nav"> \ 6369 <a href="#" class="pp_arrow_previous">Previous</a> \ 6370 <p class="currentTextHolder">0/0</p> \ 6371 <a href="#" class="pp_arrow_next">Next</a> \ 6372 </div> \ 6373 <p class="pp_description"></p> \ 6374 <div class="pp_social">{pp_social}</div> \ 6375 <a class="pp_close" href="#">Close</a> \ 6376 </div> \ 6377 </div> \ 6378 </div> \ 6379 </div> \ 6380 </div> \ 6381 </div> \ 6382 <div class="pp_bottom"> \ 6383 <div class="pp_left"></div> \ 6384 <div class="pp_middle"></div> \ 6385 <div class="pp_right"></div> \ 6386 </div> \ 6387 </div> \ 6388 <div class="pp_overlay"></div>', 6389 gallery_markup: '<div class="pp_gallery"> \ 6390 <a href="#" class="pp_arrow_previous">Previous</a> \ 6391 <div> \ 6392 <ul> \ 6393 {gallery} \ 6394 </ul> \ 6395 </div> \ 6396 <a href="#" class="pp_arrow_next">Next</a> \ 6397 </div>', 6398 image_markup: '<img id="fullResImage" src="{path}" />', 6399 flash_markup: '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="{width}" height="{height}"><param name="wmode" value="{wmode}" /><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="{path}" /><embed src="{path}" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="{width}" height="{height}" wmode="{wmode}"></embed></object>', 6400 quicktime_markup: '<object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" codebase="http://www.apple.com/qtactivex/qtplugin.cab" height="{height}" width="{width}"><param name="src" value="{path}"><param name="autoplay" value="{autoplay}"><param name="type" value="video/quicktime"><embed src="{path}" height="{height}" width="{width}" autoplay="{autoplay}" type="video/quicktime" pluginspage="http://www.apple.com/quicktime/download/"></embed></object>', 6401 iframe_markup: '<iframe src ="{path}" width="{width}" height="{height}" frameborder="no"></iframe>', 6402 inline_markup: '<div class="pp_inline">{content}</div>', 6403 custom_markup: '', 6404 social_tools: '<div class="twitter"><a href="http://twitter.com/share" class="twitter-share-button" data-count="none">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script></div><div class="facebook"><iframe src="//www.facebook.com/plugins/like.php?locale=en_US&href={location_href}&layout=button_count&show_faces=true&width=500&action=like&font&colorscheme=light&height=23" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:500px; height:23px;" allowTransparency="true"></iframe></div>' 6405 }, pp_settings); 6406 var matchedObjects = this, 6407 percentBased = false, 6408 pp_dimensions, pp_open, pp_contentHeight, pp_contentWidth, pp_containerHeight, pp_containerWidth, windowHeight = $(window).height(), 6409 windowWidth = $(window).width(), 6410 pp_slideshow; 6411 doresize = true, scroll_pos = _get_scroll(); 6412 $(window).unbind('resize.prettyphoto').bind('resize.prettyphoto', function() { 6413 _center_overlay(); 6414 _resize_overlay(); 6415 }); 6416 if (pp_settings.keyboard_shortcuts) { 6417 $(document).unbind('keydown.prettyphoto').bind('keydown.prettyphoto', function(e) { 6418 if (typeof $pp_pic_holder != 'undefined') { 6419 if ($pp_pic_holder.is(':visible')) { 6420 switch (e.keyCode) { 6421 case 37: 6422 $.prettyPhoto.changePage('previous'); 6423 e.preventDefault(); 6424 break; 6425 case 39: 6426 $.prettyPhoto.changePage('next'); 6427 e.preventDefault(); 6428 break; 6429 case 27: 6430 if (!settings.modal) 6431 $.prettyPhoto.close(); 6432 e.preventDefault(); 6433 break; 6434 }; 6435 }; 6436 }; 6437 }); 6438 }; 6439 $.prettyPhoto.initialize = function() { 6440 settings = pp_settings; 6441 if (settings.theme == 'pp_default') settings.horizontal_padding = 16; 6442 if (settings.ie6_fallback && $.browser.msie && parseInt($.browser.version) == 6) settings.theme = "light_square"; 6443 theRel = $(this).attr(settings.hook); 6444 galleryRegExp = /\[(?:.*)\]/; 6445 isSet = (galleryRegExp.exec(theRel)) ? true : false;
6446 pp_images = (isSet) ? jQuery.map(matchedObjects, function(n, i) { 6447 if ($(n).attr(settings.hook).indexOf(theRel) != -1) return $(n).attr('href'); 6448 }) : $.makeArray($(this).attr('href')); 6449 pp_titles = (isSet) ? jQuery.map(matchedObjects, function(n, i) { 6450 if ($(n).attr(settings.hook).indexOf(theRel) != -1) return ($(n).find('img').attr('alt')) ? $(n).find('img').attr('alt') : ""; 6451 }) : $.makeArray($(this).find('img').attr('alt')); 6452 pp_descriptions = (isSet) ? jQuery.map(matchedObjects, function(n, i) { 6453 if ($(n).attr(settings.hook).indexOf(theRel) != -1) return ($(n).attr('title')) ? $(n).attr('title') : ""; 6454 }) : $.makeArray($(this).attr('title')); 6455 if (pp_images.length > settings.overlay_gallery_max) settings.overlay_gallery = false; 6456 set_position = jQuery.inArray($(this).attr('href'), pp_images); 6457 rel_index = (isSet) ? set_position : $("a[" + settings.hook + "^='" + theRel + "']").index($(this)); 6458 _build_overlay(this); 6459 if (settings.allow_resize) 6460 $(window).bind('scroll.prettyphoto', function() { 6461 _center_overlay(); 6462 }); 6463 $.prettyPhoto.open(); 6464 return false; 6465 } 6466 $.prettyPhoto.open = function(event) { 6467 if (typeof settings == "undefined") { 6468 settings = pp_settings; 6469 if ($.browser.msie && $.browser.version == 6) settings.theme = "light_square"; 6470 pp_images = $.makeArray(arguments[0]); 6471 pp_titles = (arguments[1]) ? $.makeArray(arguments[1]) : $.makeArray(""); 6472 pp_descriptions = (arguments[2]) ? $.makeArray(arguments[2]) : $.makeArray(""); 6473 isSet = (pp_images.length > 1) ? true : false; 6474 set_position = (arguments[3]) ? arguments[3] : 0; 6475 _build_overlay(event.target); 6476 } 6477 if ($.browser.msie && $.browser.version == 6) $('select').css('visibility', 'hidden'); 6478 if (settings.hideflash) $('object,embed,iframe[src*=youtube],iframe[src*=vimeo]').css('visibility', 'hidden'); 6479 _checkPosition($(pp_images).size()); 6480 $('.pp_loaderIcon').show(); 6481 if (settings.deeplinking) 6482 setHashtag(); 6483 if (settings.social_tools) { 6484 facebook_like_link = settings.social_tools.replace('{location_href}', encodeURIComponent(location.href)); 6485 $pp_pic_holder.find('.pp_social').html(facebook_like_link); 6486 } 6487 if ($ppt.is(':hidden')) $ppt.css('opacity', 0).show(); 6488 $pp_overlay.show().fadeTo(settings.animation_speed, settings.opacity); 6489 $pp_pic_holder.find('.currentTextHolder').text((set_position + 1) + settings.counter_separator_label + $(pp_images).size()); 6490 if (typeof pp_descriptions[set_position] != 'undefined' && pp_descriptions[set_position] != "") { 6491 $pp_pic_holder.find('.pp_description').show().html(unescape(pp_descriptions[set_position])); 6492 } else { 6493 $pp_pic_holder.find('.pp_description').hide(); 6494 } 6495 movie_width = (parseFloat(getParam('width', pp_images[set_position]))) ? getParam('width', pp_images[set_position]) : settings.default_width.toString(); 6496 movie_height = (parseFloat(getParam('height', pp_images[set_position]))) ? getParam('height', pp_images[set_position]) : settings.default_height.toString(); 6497 percentBased = false; 6498 if (movie_height.indexOf('%') != -1) { 6499 movie_height = parseFloat(($(window).height() * parseFloat(movie_height) / 100) - 150); 6500 percentBased = true; 6501 } 6502 if (movie_width.indexOf('%') != -1) { 6503 movie_width = parseFloat(($(window).width() * parseFloat(movie_width) / 100) - 150); 6504 percentBased = true; 6505 } 6506 $pp_pic_holder.fadeIn(function() { 6507 (settings.show_title && pp_titles[set_position] != "" && typeof pp_titles[set_position] != "undefined") ? $ppt.html(unescape(pp_titles[set_position])) : $ppt.html(' '); 6508 imgPreloader = ""; 6509 skipInjection = false;
6510 switch (_getFileType(pp_images[set_position])) { 6511 case 'image': 6512 imgPreloader = new Image(); 6513 nextImage = new Image(); 6514 if (isSet && set_position < $(pp_images).size() - 1) nextImage.src = pp_images[set_position + 1]; 6515 prevImage = new Image(); 6516 if (isSet && pp_images[set_position - 1]) prevImage.src = pp_images[set_position - 1]; 6517 $pp_pic_holder.find('#pp_full_res')[0].innerHTML = settings.image_markup.replace(/{path}/g, pp_images[set_position]); 6518 imgPreloader.onload = function() { 6519 pp_dimensions = _fitToViewport(imgPreloader.width, imgPreloader.height); 6520 _showContent(); 6521 }; 6522 imgPreloader.onerror = function() { 6523 alert('Image cannot be loaded. Make sure the path is correct and image exist.'); 6524 $.prettyPhoto.close(); 6525 }; 6526 imgPreloader.src = pp_images[set_position]; 6527 break; 6528 case 'youtube': 6529 pp_dimensions = _fitToViewport(movie_width, movie_height); 6530 movie_id = getParam('v', pp_images[set_position]); 6531 if (movie_id == "") { 6532 movie_id = pp_images[set_position].split('youtu.be/'); 6533 movie_id = movie_id[1]; 6534 if (movie_id.indexOf('?') > 0) 6535 movie_id = movie_id.substr(0, movie_id.indexOf('?')); 6536 if (movie_id.indexOf('&') > 0) 6537 movie_id = movie_id.substr(0, movie_id.indexOf('&')); 6538 } 6539 movie = 'http://www.youtube.com/embed/' + movie_id; 6540 (getParam('rel', pp_images[set_position])) ? movie += "?rel=" + getParam('rel', pp_images[set_position]) : movie += "?rel=1"; 6541 if (settings.autoplay) movie += "&autoplay=1"; 6542 toInject = settings.iframe_markup.replace(/{width}/g, pp_dimensions['width']).replace(/{height}/g, pp_dimensions['height']).replace(/{wmode}/g, settings.wmode).replace(/{path}/g, movie); 6543 break; 6544 case 'vimeo': 6545 pp_dimensions = _fitToViewport(movie_width, movie_height); 6546 movie_id = pp_images[set_position]; 6547 var regExp = /http:\/\/(www\.)?vimeo.com\/(\d+)/; 6548 var match = movie_id.match(regExp); 6549 movie = 'http://player.vimeo.com/video/' + match[2] + '?title=0&byline=0&portrait=0'; 6550 if (settings.autoplay) movie += "&autoplay=1;"; 6551 vimeo_width = pp_dimensions['width'] + '/embed/?moog_width=' + pp_dimensions['width']; 6552 toInject = settings.iframe_markup.replace(/{width}/g, vimeo_width).replace(/{height}/g, pp_dimensions['height']).replace(/{path}/g, movie); 6553 break; 6554 case 'quicktime': 6555 pp_dimensions = _fitToViewport(movie_width, movie_height); 6556 pp_dimensions['height'] += 15; 6557 pp_dimensions['contentHeight'] += 15; 6558 pp_dimensions['containerHeight'] += 15; 6559 toInject = settings.quicktime_markup.replace(/{width}/g, pp_dimensions['width']).replace(/{height}/g, pp_dimensions['height']).replace(/{wmode}/g, settings.wmode).replace(/{path}/g, pp_images[set_position]).replace(/{autoplay}/g, settings.autoplay); 6560 break; 6561 case 'flash': 6562 pp_dimensions = _fitToViewport(movie_width, movie_height); 6563 flash_vars = pp_images[set_position]; 6564 flash_vars = flash_vars.substring(pp_images[set_position].indexOf('flashvars') + 10, pp_images[set_position].length); 6565 filename = pp_images[set_position]; 6566 filename = filename.substring(0, filename.indexOf('?')); 6567 toInject = settings.flash_markup.replace(/{width}/g, pp_dimensions['width']).replace(/{height}/g, pp_dimensions['height']).replace(/{wmode}/g, settings.wmode).replace(/{path}/g, filename + '?' + flash_vars); 6568 break; 6569 case 'iframe': 6570 pp_dimensions = _fitToViewport(movie_width, movie_height); 6571 frame_url = pp_images[set_position]; 6572 frame_url = frame_url.substr(0, frame_url.indexOf('iframe') - 1); 6573 toInject = settings.iframe_markup.replace(/{width}/g, pp_dimensions['width']).replace(/{height}/g, pp_dimensions['height']).replace(/{path}/g, frame_url); 6574 break; 6575 case 'ajax': 6576 doresize = false;
6577 pp_dimensions = _fitToViewport(movie_width, movie_height); 6578 doresize = true; 6579 skipInjection = true; 6580 $.get(pp_images[set_position], function(responseHTML) { 6581 toInject = settings.inline_markup.replace(/{content}/g, responseHTML); 6582 $pp_pic_holder.find('#pp_full_res')[0].innerHTML = toInject; 6583 _showContent(); 6584 }); 6585 break; 6586 case 'custom': 6587 pp_dimensions = _fitToViewport(movie_width, movie_height); 6588 toInject = settings.custom_markup; 6589 break; 6590 case 'inline': 6591 myClone = $(pp_images[set_position]).clone().append('<br clear="all" />').css({ 6592 'width': settings.default_width 6593 }).wrapInner('<div id="pp_full_res"><div class="pp_inline"></div></div>').appendTo($('body')).show(); 6594 doresize = false; 6595 pp_dimensions = _fitToViewport($(myClone).width(), $(myClone).height()); 6596 doresize = true; 6597 $(myClone).remove(); 6598 toInject = settings.inline_markup.replace(/{content}/g, $(pp_images[set_position]).html()); 6599 break; 6600 }; 6601 if (!imgPreloader && !skipInjection) { 6602 $pp_pic_holder.find('#pp_full_res')[0].innerHTML = toInject; 6603 _showContent(); 6604 }; 6605 }); 6606 return false; 6607 }; 6608 $.prettyPhoto.changePage = function(direction) { 6609 currentGalleryPage = 0; 6610 if (direction == 'previous') { 6611 set_position--; 6612 if (set_position < 0) set_position = $(pp_images).size() - 1; 6613 } else if (direction == 'next') { 6614 set_position++; 6615 if (set_position > $(pp_images).size() - 1) set_position = 0; 6616 } else { 6617 set_position = direction; 6618 }; 6619 rel_index = set_position; 6620 if (!doresize) doresize = true; 6621 if (settings.allow_expand) { 6622 $('.pp_contract').removeClass('pp_contract').addClass('pp_expand'); 6623 } 6624 _hideContent(function() { 6625 $.prettyPhoto.open(); 6626 }); 6627 }; 6628 $.prettyPhoto.changeGalleryPage = function(direction) { 6629 if (direction == 'next') { 6630 currentGalleryPage++; 6631 if (currentGalleryPage > totalPage) currentGalleryPage = 0; 6632 } else if (direction == 'previous') { 6633 currentGalleryPage--; 6634 if (currentGalleryPage < 0) currentGalleryPage = totalPage; 6635 } else { 6636 currentGalleryPage = direction; 6637 }; 6638 slide_speed = (direction == 'next' || direction == 'previous') ? settings.animation_speed : 0; 6639 slide_to = currentGalleryPage * (itemsPerPage * itemWidth); 6640 $pp_gallery.find('ul').animate({ 6641 left: -slide_to 6642 }, slide_speed); 6643 }; 6644 $.prettyPhoto.startSlideshow = function() { 6645 if (typeof pp_slideshow == 'undefined') { 6646 $pp_pic_holder.find('.pp_play').unbind('click').removeClass('pp_play').addClass('pp_pause').click(function() { 6647 $.prettyPhoto.stopSlideshow(); 6648 return false; 6649 }); 6650 pp_slideshow = setInterval($.prettyPhoto.startSlideshow, settings.slideshow); 6651 } else { 6652 $.prettyPhoto.changePage('next'); 6653 }; 6654 } 6655 $.prettyPhoto.stopSlideshow = function() { 6656 $pp_pic_holder.find('.pp_pause').unbind('click').removeClass('pp_pause').addClass('pp_play').click(function() { 6657 $.prettyPhoto.startSlideshow(); 6658 return false; 6659 }); 6660 clearInterval(pp_slideshow); 6661 pp_slideshow = undefined; 6662 } 6663 $.prettyPhoto.close = function() { 6664 if ($pp_overlay.is(":animated")) return; 6665 $.prettyPhoto.stopSlideshow(); 6666 $pp_pic_holder.stop().find('object,embed').css('visibility', 'hidden'); 6667 $('div.pp_pic_holder,div.ppt,.pp_fade').fadeOut(settings.animation_speed, function() { 6668 $(this).remove(); 6669 }); 6670 $pp_overlay.fadeOut(settings.animation_speed, function() { 6671 if ($.browser.msie && $.browser.version == 6) $('select').css('visibility', 'visible'); 6672 if (settings.hideflash) $('object,embed,iframe[src*=youtube],iframe[src*=vimeo]').css('visibility', 'visible'); 6673 $(this).remove(); 6674 $(window).unbind('scroll.prettyphoto'); 6675 clearHashtag(); 6676 settings.callback(); 6677 doresize = true; 6678 pp_open = false;
6679 delete settings; 6680 }); 6681 }; 6682 6683 function _showContent() { 6684 $('.pp_loaderIcon').hide(); 6685 projectedTop = scroll_pos['scrollTop'] + ((windowHeight / 2) - (pp_dimensions['containerHeight'] / 2)); 6686 if (projectedTop < 0) projectedTop = 0; 6687 $ppt.fadeTo(settings.animation_speed, 1); 6688 $pp_pic_holder.find('.pp_content').animate({ 6689 height: pp_dimensions['contentHeight'], 6690 width: pp_dimensions['contentWidth'] 6691 }, settings.animation_speed); 6692 $pp_pic_holder.animate({ 6693 'top': projectedTop, 6694 'left': ((windowWidth / 2) - (pp_dimensions['containerWidth'] / 2) < 0) ? 0 : (windowWidth / 2) - (pp_dimensions['containerWidth'] / 2), 6695 width: pp_dimensions['containerWidth'] 6696 }, settings.animation_speed, function() { 6697 $pp_pic_holder.find('.pp_hoverContainer,#fullResImage').height(pp_dimensions['height']).width(pp_dimensions['width']); 6698 $pp_pic_holder.find('.pp_fade').fadeIn(settings.animation_speed); 6699 if (isSet && _getFileType(pp_images[set_position]) == "image") { 6700 $pp_pic_holder.find('.pp_hoverContainer').show(); 6701 } else { 6702 $pp_pic_holder.find('.pp_hoverContainer').hide(); 6703 } 6704 if (settings.allow_expand) { 6705 if (pp_dimensions['resized']) { 6706 $('a.pp_expand,a.pp_contract').show(); 6707 } else { 6708 $('a.pp_expand').hide(); 6709 } 6710 } 6711 if (settings.autoplay_slideshow && !pp_slideshow && !pp_open) $.prettyPhoto.startSlideshow(); 6712 settings.changepicturecallback(); 6713 pp_open = true; 6714 }); 6715 _insert_gallery(); 6716 pp_settings.ajaxcallback(); 6717 }; 6718 6719 function _hideContent(callback) { 6720 $pp_pic_holder.find('#pp_full_res object,#pp_full_res embed').css('visibility', 'hidden'); 6721 $pp_pic_holder.find('.pp_fade').fadeOut(settings.animation_speed, function() { 6722 $('.pp_loaderIcon').show(); 6723 callback(); 6724 }); 6725 }; 6726 6727 function _checkPosition(setCount) { 6728 (setCount > 1) ? $('.pp_nav').show() : $('.pp_nav').hide(); 6729 }; 6730 6731 function _fitToViewport(width, height) { 6732 resized = false; 6733 _getDimensions(width, height); 6734 imageWidth = width, imageHeight = height; 6735 if (((pp_containerWidth > windowWidth) || (pp_containerHeight > windowHeight)) && doresize && settings.allow_resize && !percentBased) { 6736 resized = true, fitting = false; 6737 while (!fitting) { 6738 if ((pp_containerWidth > windowWidth)) { 6739 imageWidth = (windowWidth - 200); 6740 imageHeight = (height / width) * imageWidth; 6741 } else if ((pp_containerHeight > windowHeight)) { 6742 imageHeight = (windowHeight - 200); 6743 imageWidth = (width / height) * imageHeight; 6744 } else { 6745 fitting = true; 6746 }; 6747 pp_containerHeight = imageHeight, pp_containerWidth = imageWidth; 6748 }; 6749 _getDimensions(imageWidth, imageHeight); 6750 if ((pp_containerWidth > windowWidth) || (pp_containerHeight > windowHeight)) { 6751 _fitToViewport(pp_containerWidth, pp_containerHeight) 6752 }; 6753 }; 6754 return { 6755 width: Math.floor(imageWidth), 6756 height: Math.floor(imageHeight), 6757 containerHeight: Math.floor(pp_containerHeight), 6758 containerWidth: Math.floor(pp_containerWidth) + (settings.horizontal_padding * 2), 6759 contentHeight: Math.floor(pp_contentHeight), 6760 contentWidth: Math.floor(pp_contentWidth), 6761 resized: resized 6762 }; 6763 }; 6764 6765 function _getDimensions(width, height) { 6766 width = parseFloat(width); 6767 height = parseFloat(height); 6768 $pp_details = $pp_pic_holder.find('.pp_details'); 6769 $pp_details.width(width); 6770 detailsHeight = parseFloat($pp_details.css('marginTop')) + parseFloat($pp_details.css('marginBottom')); 6771 $pp_details = $pp_details.clone().addClass(settings.theme).width(width).appendTo($('body')).css({ 6772 'position': 'absolute', 6773 'top': -10000 6774 }); 6775 detailsHeight += $pp_details.height(); 6776 detailsHeight = (detailsHeight <= 34) ? 36 : detailsHeight; 6777 if ($.browser.msie && $.browser.version == 7) detailsHeight += 8; 6778 $pp_details.remove(); 6779 $pp_title = $pp_pic_holder.find('.ppt'); 6780 $pp_title.width(width); 6781 titleHeight = parseFloat($pp_title.css('marginTop')) + parseFloat($pp_title.css('marginBottom')); 6782 $pp_title = $pp_title.clone().appendTo($('body')).css({ 6783 'position': 'absolute', 6784 'top': -10000 6785 }); 6786 titleHeight += $pp_title.height(); 6787 $pp_title.remove(); 6788 pp_contentHeight = height + detailsHeight; 6789 pp_contentWidth = width; 6790 pp_containerHeight = pp_contentHeight + titleHeight + $pp_pic_holder.find('.pp_top').height() + $pp_pic_holder.find('.pp_bottom').height(); 6791 pp_containerWidth = width; 6792 } 6793
6794 function _getFileType(itemSrc) { 6795 if (itemSrc.match(/youtube\.com\/watch/i) || itemSrc.match(/youtu\.be/i)) { 6796 return 'youtube'; 6797 } else if (itemSrc.match(/vimeo\.com/i)) { 6798 return 'vimeo'; 6799 } else if (itemSrc.match(/\b.mov\b/i)) { 6800 return 'quicktime'; 6801 } else if (itemSrc.match(/\b.swf\b/i)) { 6802 return 'flash'; 6803 } else if (itemSrc.match(/\biframe=true\b/i)) { 6804 return 'iframe'; 6805 } else if (itemSrc.match(/\bajax=true\b/i)) { 6806 return 'ajax'; 6807 } else if (itemSrc.match(/\bcustom=true\b/i)) { 6808 return 'custom'; 6809 } else if (itemSrc.substr(0, 1) == '#') { 6810 return 'inline'; 6811 } else { 6812 return 'image'; 6813 }; 6814 }; 6815 6816 function _center_overlay() { 6817 if (doresize && typeof $pp_pic_holder != 'undefined') { 6818 scroll_pos = _get_scroll(); 6819 contentHeight = $pp_pic_holder.height(), contentwidth = $pp_pic_holder.width(); 6820 projectedTop = (windowHeight / 2) + scroll_pos['scrollTop'] - (contentHeight / 2); 6821 if (projectedTop < 0) projectedTop = 0; 6822 if (contentHeight > windowHeight) 6823 return; 6824 $pp_pic_holder.css({ 6825 'top': projectedTop, 6826 'left': (windowWidth / 2) + scroll_pos['scrollLeft'] - (contentwidth / 2) 6827 }); 6828 }; 6829 }; 6830 6831 function _get_scroll() { 6832 if (self.pageYOffset) { 6833 return { 6834 scrollTop: self.pageYOffset, 6835 scrollLeft: self.pageXOffset 6836 }; 6837 } else if (document.documentElement && document.documentElement.scrollTop) { 6838 return { 6839 scrollTop: document.documentElement.scrollTop, 6840 scrollLeft: document.documentElement.scrollLeft 6841 }; 6842 } else if (document.body) { 6843 return { 6844 scrollTop: document.body.scrollTop, 6845 scrollLeft: document.body.scrollLeft 6846 }; 6847 }; 6848 }; 6849 6850 function _resize_overlay() { 6851 windowHeight = $(window).height(), windowWidth = $(window).width(); 6852 if (typeof $pp_overlay != "undefined") $pp_overlay.height($(document).height()).width(windowWidth); 6853 }; 6854 6855 function _insert_gallery() { 6856 if (isSet && settings.overlay_gallery && _getFileType(pp_images[set_position]) == "image" && (settings.ie6_fallback && !($.browser.msie && parseInt($.browser.version) == 6))) { 6857 itemWidth = 52 + 5; 6858 navWidth = (settings.theme == "facebook" || settings.theme == "pp_default") ? 50 : 30; 6859 itemsPerPage = Math.floor((pp_dimensions['containerWidth'] - 100 - navWidth) / itemWidth); 6860 itemsPerPage = (itemsPerPage < pp_images.length) ? itemsPerPage : pp_images.length; 6861 totalPage = Math.ceil(pp_images.length / itemsPerPage) - 1; 6862 if (totalPage == 0) { 6863 navWidth = 0; 6864 $pp_gallery.find('.pp_arrow_next,.pp_arrow_previous').hide(); 6865 } else { 6866 $pp_gallery.find('.pp_arrow_next,.pp_arrow_previous').show(); 6867 }; 6868 galleryWidth = itemsPerPage * itemWidth; 6869 fullGalleryWidth = pp_images.length * itemWidth; 6870 $pp_gallery.css('margin-left', -((galleryWidth / 2) + (navWidth / 2))).find('div:first').width(galleryWidth + 5).find('ul').width(fullGalleryWidth).find('li.selected').removeClass('selected'); 6871 goToPage = (Math.floor(set_position / itemsPerPage) < totalPage) ? Math.floor(set_position / itemsPerPage) : totalPage; 6872 $.prettyPhoto.changeGalleryPage(goToPage); 6873 $pp_gallery_li.filter(':eq(' + set_position + ')').addClass('selected'); 6874 } else { 6875 $pp_pic_holder.find('.pp_content').unbind('mouseenter mouseleave'); 6876 } 6877 } 6878 6879 function _build_overlay(caller) { 6880 if (settings.social_tools) 6881 facebook_like_link = settings.social_tools.replace('{location_href}', encodeURIComponent(location.href)); 6882 settings.markup = settings.markup.replace('{pp_social}', ''); 6883 $('body').append(settings.markup); 6884 $pp_pic_holder = $('.pp_pic_holder'), $ppt = $('.ppt'), $pp_overlay
6884= $('div.pp_overlay'); 6885 if (isSet && settings.overlay_gallery) { 6886 currentGalleryPage = 0; 6887 toInject = ""; 6888 for (var i = 0; i < pp_images.length; i++) { 6889 if (!pp_images[i].match(/\b(jpg|jpeg|png|gif)\b/gi)) { 6890 classname = 'default'; 6891 img_src = ''; 6892 } else { 6893 classname = ''; 6894 img_src = pp_images[i]; 6895 } 6896 toInject += "<li class='" + classname + "'><a href='#'><img src='" + img_src + "' width='50' alt='' /></a></li>"; 6897 }; 6898 toInject = settings.gallery_markup.replace(/{gallery}/g, toInject); 6899 $pp_pic_holder.find('#pp_full_res').after(toInject); 6900 $pp_gallery = $('.pp_pic_holder .pp_gallery'), $pp_gallery_li = $pp_gallery.find('li'); 6901 $pp_gallery.find('.pp_arrow_next').click(function() { 6902 $.prettyPhoto.changeGalleryPage('next'); 6903 $.prettyPhoto.stopSlideshow(); 6904 return false; 6905 }); 6906 $pp_gallery.find('.pp_arrow_previous').click(function() { 6907 $.prettyPhoto.changeGalleryPage('previous'); 6908 $.prettyPhoto.stopSlideshow(); 6909 return false; 6910 }); 6911 $pp_pic_holder.find('.pp_content').hover(function() { 6912 $pp_pic_holder.find('.pp_gallery:not(.disabled)').fadeIn(); 6913 }, function() { 6914 $pp_pic_holder.find('.pp_gallery:not(.disabled)').fadeOut(); 6915 }); 6916 itemWidth = 52 + 5; 6917 $pp_gallery_li.each(function(i) { 6918 $(this).find('a').click(function() { 6919 $.prettyPhoto.changePage(i); 6920 $.prettyPhoto.stopSlideshow(); 6921 return false; 6922 }); 6923 }); 6924 }; 6925 if (settings.slideshow) { 6926 $pp_pic_holder.find('.pp_nav').prepend('<a href="#" class="pp_play">Play</a>') 6927 $pp_pic_holder.find('.pp_nav .pp_play').click(function() { 6928 $.prettyPhoto.startSlideshow(); 6929 return false; 6930 }); 6931 } 6932 $pp_pic_holder.attr('class', 'pp_pic_holder ' + settings.theme); 6933 $pp_overlay.css({ 6934 'opacity': 0, 6935 'height': $(document).height(), 6936 'width': $(window).width() 6937 }).bind('click', function() { 6938 if (!settings.modal) $.prettyPhoto.close(); 6939 }); 6940 $('a.pp_close').bind('click', function() { 6941 $.prettyPhoto.close(); 6942 return false; 6943 }); 6944 if (settings.allow_expand) { 6945 $('a.pp_expand').bind('click', function(e) { 6946 if ($(this).hasClass('pp_expand')) { 6947 $(this).removeClass('pp_expand').addClass('pp_contract'); 6948 doresize = false; 6949 } else { 6950 $(this).removeClass('pp_contract').addClass('pp_expand'); 6951 doresize = true; 6952 }; 6953 _hideContent(function() { 6954 $.prettyPhoto.open(); 6955 }); 6956 return false; 6957 }); 6958 } 6959 $pp_pic_holder.find('.pp_previous, .pp_nav .pp_arrow_previous').bind('click', function() { 6960 $.prettyPhoto.changePage('previous'); 6961 $.prettyPhoto.stopSlideshow(); 6962 return false; 6963 }); 6964 $pp_pic_holder.find('.pp_next, .pp_nav .pp_arrow_next').bind('click', function() { 6965 $.prettyPhoto.changePage('next'); 6966 $.prettyPhoto.stopSlideshow(); 6967 return false; 6968 }); 6969 _center_overlay(); 6970 }; 6971 if (!pp_alreadyInitialized && getHashtag()) { 6972 pp_alreadyInitialized = true; 6973 hashIndex = getHashtag(); 6974 hashRel = hashIndex; 6975 hashIndex = hashIndex.substring(hashIndex.indexOf('/') + 1, hashIndex.length - 1); 6976 hashRel = hashRel.substring(0, hashRel.indexOf('/')); 6977 setTimeout(function() { 6978 $("a[" + pp_settings.hook + "^='" + hashRel + "']:eq(" + hashIndex + ")").trigger('click'); 6979 }, 50); 6980 } 6981 6982 return this.unbind('click.prettyphoto').bind('click.prettyphoto', $.prettyPhoto.initialize); 6983 }; 6984 6985 function getHashtag() { 6986 url = location.href; 6987 hashtag = (url.indexOf('#prettyPhoto') !== -1) ? decodeURI(url.substring(url.indexOf('#prettyPhoto') + 1, url.length)) : false;
6988 return hashtag; 6989 }; 6990 6991 function setHashtag() { 6992 if (typeof theRel == 'undefined') return; 6993 location.hash = theRel + '/' + rel_index + '/'; 6994 }; 6995 6996 function clearHashtag() { 6997 if (location.href.indexOf('#prettyPhoto') !== -1) location.hash = "prettyPhoto"; 6998 } 6999 7000 function getParam(name, url) { 7001 name = name.replace(/[\[]/, "\\\[").replace(/[\]]/, "\\\]"); 7002 var regexS = "[\\?&]" + name + "=([^&#]*)"; 7003 var regex = new RegExp(regexS); 7004 var results = regex.exec(url); 7005 return (results == null) ? "" : results[1]; 7006 } 7007})(jQuery); 7008var pp_alreadyInitialized = false; 7009 7010 7011 7012 7013 7014 7015 7016 7017/** 7018 * Owl carousel 7019 * @version 2.0.0 7020 * @author Bartosz Wojciechowski 7021 * @license The MIT License (MIT) 7022 * @todo Lazy Load Icon 7023 * @todo prevent animationend bubling 7024 * @todo itemsScaleUp 7025 * @todo Test Zepto 7026 * @todo stagePadding calculate wrong active classes 7027 */ 7028 7029 7030
vendor: 23,890 bytes, lines 7031-7077
7031"function"!==typeof Object.create&&(Object.create=function(f){function g(){}g.prototype=f;return new g}); 7032(function(f,g,k){var l={init:function(a,b){this.$elem=f(b);this.options=f.extend({},f.fn.owlCarousel.options,this.$elem.data(),a);this.userOptions=a;this.loadContent()},loadContent:function(){function a(a){var d,e="";if("function"===typeof b.options.jsonSuccess)b.options.jsonSuccess.apply(this,[a]);else{for(d in a.owl)a.owl.hasOwnProperty(d)&&(e+=a.owl[d].item);b.$elem.html(e)}b.logIn()}var b=this,e;"function"===typeof b.options.beforeInit&&b.options.beforeInit.apply(this,[b.$elem]);"string"===typeof b.options.jsonPath? 7033(e=b.options.jsonPath,f.getJSON(e,a)):b.logIn()},logIn:function(){this.$elem.data("owl-originalStyles",this.$elem.attr("style"));this.$elem.data("owl-originalClasses",this.$elem.attr("class"));this.$elem.css({opacity:0});this.orignalItems=this.options.items;this.checkBrowser();this.wrapperWidth=0;this.checkVisible=null;this.setVars()},setVars:function(){if(0===this.$elem.children().length)return!1;this.baseClass();this.eventTypes();this.$userItems=this.$elem.children();this.itemsAmount=this.$userItems.length; 7034this.wrapItems();this.$owlItems=this.$elem.find(".owl-item");this.$owlWrapper=this.$elem.find(".owl-wrapper");this.playDirection="next";this.prevItem=0;this.prevArr=[0];this.currentItem=0;this.customEvents();this.onStartup()},onStartup:function(){this.updateItems();this.calculateAll();this.buildControls();this.updateControls();this.response();this.moveEvents();this.stopOnHover();this.owlStatus();!1!==this.options.transitionStyle&&this.transitionTypes(this.options.transitionStyle);!0===this.options.autoPlay&& 7035(this.options.autoPlay=5E3);this.play();this.$elem.find(".owl-wrapper").css("display","block");this.$elem.is(":visible")?this.$elem.css("opacity",1):this.watchVisibility();this.onstartup=!1;this.eachMoveUpdate();"function"===typeof this.options.afterInit&&this.options.afterInit.apply(this,[this.$elem])},eachMoveUpdate:function(){!0===this.options.lazyLoad&&this.lazyLoad();!0===this.options.autoHeight&&this.autoHeight();this.onVisibleItems();"function"===typeof this.options.afterAction&&this.options.afterAction.apply(this, 7036[this.$elem])},updateVars:function(){"function"===typeof this.options.beforeUpdate&&this.options.beforeUpdate.apply(this,[this.$elem]);this.watchVisibility();this.updateItems();this.calculateAll();this.updatePosition();this.updateControls();this.eachMoveUpdate();"function"===typeof this.options.afterUpdate&&this.options.afterUpdate.apply(this,[this.$elem])},reload:function(){var a=this;g.setTimeout(function(){a.updateVars()},0)},watchVisibility:function(){var a=this;if(!1===a.$elem.is(":visible"))a.$elem.css({opacity:0}), 7037g.clearInterval(a.autoPlayInterval),g.clearInterval(a.checkVisible);else return!1;a.checkVisible=g.setInterval(function(){a.$elem.is(":visible")&&(a.reload(),a.$elem.animate({opacity:1},200),g.clearInterval(a.checkVisible))},500)},wrapItems:function(){this.$userItems.wrapAll('<div class="owl-wrapper">').wrap('<div class="owl-item"></div>');this.$elem.find(".owl-wrapper").wrap('<div class="owl-wrapper-outer">');this.wrapperOuter=this.$elem.find(".owl-wrapper-outer");this.$elem.css("display","block")}, 7038baseClass:function(){var a=this.$elem.hasClass(this.options.baseClass),b=this.$elem.hasClass(this.options.theme);a||this.$elem.addClass(this.options.baseClass);b||this.$elem.addClass(this.options.theme)},updateItems:function(){var a,b;if(!1===this.options.responsive)return!1;if(!0===this.options.singleItem)return this.options.items=this.orignalItems=1,this.options.itemsCustom=!1,this.options.itemsDesktop=!1,this.options.itemsDesktopSmall=!1,this.options.itemsTablet=!1,this.options.itemsTabletSmall= 7039!1,this.options.itemsMobile=!1;a=f(this.options.responsiveBaseWidth).width();a>(this.options.itemsDesktop[0]||this.orignalItems)&&(this.options.items=this.orignalItems);if(!1!==this.options.itemsCustom)for(this.options.itemsCustom.sort(function(a,b){return a[0]-b[0]}),b=0;b<this.options.itemsCustom.length;b+=1)this.options.itemsCustom[b][0]<=a&&(this.options.items=this.options.itemsCustom[b][1]);else a<=this.options.itemsDesktop[0]&&!1!==this.options.itemsDesktop&&(this.options.items=this.options.itemsDesktop[1]), 7040a<=this.options.itemsDesktopSmall[0]&&!1!==this.options.itemsDesktopSmall&&(this.options.items=this.options.itemsDesktopSmall[1]),a<=this.options.itemsTablet[0]&&!1!==this.options.itemsTablet&&(this.options.items=this.options.itemsTablet[1]),a<=this.options.itemsTabletSmall[0]&&!1!==this.options.itemsTabletSmall&&(this.options.items=this.options.itemsTabletSmall[1]),a<=this.options.itemsMobile[0]&&!1!==this.options.itemsMobile&&(this.options.items=this.options.itemsMobile[1]);this.options.items>this.itemsAmount&& 7041!0===this.options.itemsScaleUp&&(this.options.items=this.itemsAmount)},response:function(){var a=this,b,e;if(!0!==a.options.responsive)return!1;e=f(g).width();a.resizer=function(){f(g).width()!==e&&(!1!==a.options.autoPlay&&g.clearInterval(a.autoPlayInterval),g.clearTimeout(b),b=g.setTimeout(function(){e=f(g).width();a.updateVars()},a.options.responsiveRefreshRate))};f(g).resize(a.resizer)},updatePosition:function(){this.jumpTo(this.currentItem);!1!==this.options.autoPlay&&this.checkAp()},appendItemsSizes:function(){var a= 7042this,b=0,e=a.itemsAmount-a.options.items;a.$owlItems.each(function(c){var d=f(this);d.css({width:a.itemWidth}).data("owl-item",Number(c));if(0===c%a.options.items||c===e)c>e||(b+=1);d.data("owl-roundPages",b)})},appendWrapperSizes:function(){this.$owlWrapper.css({width:this.$owlItems.length*this.itemWidth*2,left:0});this.appendItemsSizes()},calculateAll:function(){this.calculateWidth();this.appendWrapperSizes();this.loops();this.max()},calculateWidth:function(){this.itemWidth=Math.round(this.$elem.width()/ 7043this.options.items)},max:function(){var a=-1*(this.itemsAmount*this.itemWidth-this.options.items*this.itemWidth);this.options.items>this.itemsAmount?this.maximumPixels=a=this.maximumItem=0:(this.maximumItem=this.itemsAmount-this.options.items,this.maximumPixels=a);return a},min:function(){return 0},loops:function(){var a=0,b=0,e,c;this.positionsInArray=[0];this.pagesInArray=[];for(e=0;e<this.itemsAmount;e+=1)b+=this.itemWidth,this.positionsInArray.push(-b),!0===this.options.scrollPerPage&&(c=f(this.$owlItems[e]), 7044c=c.data("owl-roundPages"),c!==a&&(this.pagesInArray[a]=this.positionsInArray[e],a=c))},buildControls:function(){if(!0===this.options.navigation||!0===this.options.pagination)this.owlControls=f('<div class="owl-controls"/>').toggleClass("clickable",!this.browser.isTouch).appendTo(this.$elem);!0===this.options.pagination&&this.buildPagination();!0===this.options.navigation&&this.buildButtons()},buildButtons:function(){var a=this,b=f('<div class="owl-buttons"/>');a.owlControls.append(b);a.buttonPrev= 7045f("<div/>",{"class":"owl-prev",html:a.options.navigationText[0]||""});a.buttonNext=f("<div/>",{"class":"owl-next",html:a.options.navigationText[1]||""});b.append(a.buttonPrev).append(a.buttonNext);b.on("touchstart.owlControls mousedown.owlControls",'div[class^="owl"]',function(a){a.preventDefault()});b.on("touchend.owlControls mouseup.owlControls",'div[class^="owl"]',function(b){b.preventDefault();f(this).hasClass("owl-next")?a.next():a.prev()})},buildPagination:function(){var a=this;a.paginationWrapper= 7046f('<div class="owl-pagination"/>');a.owlControls.append(a.paginationWrapper);a.paginationWrapper.on("touchend.owlControls mouseup.owlControls",".owl-page",function(b){b.preventDefault();Number(f(this).data("owl-page"))!==a.currentItem&&a.goTo(Number(f(this).data("owl-page")),!0)})},updatePagination:function(){var a,b,e,c,d,g;if(!1===this.options.pagination)return!1;this.paginationWrapper.html("");a=0;b=this.itemsAmount-this.itemsAmount%this.options.items;for(c=0;c<this.itemsAmount;c+=1)0===c%this.options.items&& 7047(a+=1,b===c&&(e=this.itemsAmount-this.options.items),d=f("<div/>",{"class":"owl-page"}),g=f("<span></span>",{text:!0===this.options.paginationNumbers?a:"","class":!0===this.options.paginationNumbers?"owl-numbers":""}),d.append(g),d.data("owl-page",b===c?e:c),d.data("owl-roundPages",a),this.paginationWrapper.append(d));this.checkPagination()},checkPagination:function(){var a=this;if(!1===a.options.pagination)return!1;a.paginationWrapper.find(".owl-page").each(function(){f(this).data("owl-roundPages")=== 7048f(a.$owlItems[a.currentItem]).data("owl-roundPages")&&(a.paginationWrapper.find(".owl-page").removeClass("active"),f(this).addClass("active"))})},checkNavigation:function(){if(!1===this.options.navigation)return!1;!1===this.options.rewindNav&&(0===this.currentItem&&0===this.maximumItem?(this.buttonPrev.addClass("disabled"),this.buttonNext.addClass("disabled")):0===this.currentItem&&0!==this.maximumItem?(this.buttonPrev.addClass("disabled"),this.buttonNext.removeClass("disabled")):this.currentItem=== 7049this.maximumItem?(this.buttonPrev.removeClass("disabled"),this.buttonNext.addClass("disabled")):0!==this.currentItem&&this.currentItem!==this.maximumItem&&(this.buttonPrev.removeClass("disabled"),this.buttonNext.removeClass("disabled")))},updateControls:function(){this.updatePagination();this.checkNavigation();this.owlControls&&(this.options.items>=this.itemsAmount?this.owlControls.hide():this.owlControls.show())},destroyControls:function(){this.owlControls&&this.owlControls.remove()},next:function(a){if(this.isTransition)return!1; 7050this.currentItem+=!0===this.options.scrollPerPage?this.options.items:1;if(this.currentItem>this.maximumItem+(!0===this.options.scrollPerPage?this.options.items-1:0))if(!0===this.options.rewindNav)this.currentItem=0,a="rewind";else return this.currentItem=this.maximumItem,!1;this.goTo(this.currentItem,a)},prev:function(a){if(this.isTransition)return!1;this.currentItem=!0===this.options.scrollPerPage&&0<this.currentItem&&this.currentItem<this.options.items?0:this.currentItem-(!0===this.options.scrollPerPage? 7051this.options.items:1);if(0>this.currentItem)if(!0===this.options.rewindNav)this.currentItem=this.maximumItem,a="rewind";else return this.currentItem=0,!1;this.goTo(this.currentItem,a)},goTo:function(a,b,e){var c=this;if(c.isTransition)return!1;"function"===typeof c.options.beforeMove&&c.options.beforeMove.apply(this,[c.$elem]);a>=c.maximumItem?a=c.maximumItem:0>=a&&(a=0);c.currentItem=c.owl.currentItem=a;if(!1!==c.options.transitionStyle&&"drag"!==e&&1===c.options.items&&!0===c.browser.support3d)return c.swapSpeed(0), 7052!0===c.browser.support3d?c.transition3d(c.positionsInArray[a]):c.css2slide(c.positionsInArray[a],1),c.afterGo(),c.singleItemTransition(),!1;a=c.positionsInArray[a];!0===c.browser.support3d?(c.isCss3Finish=!1,!0===b?(c.swapSpeed("paginationSpeed"),g.setTimeout(function(){c.isCss3Finish=!0},c.options.paginationSpeed)):"rewind"===b?(c.swapSpeed(c.options.rewindSpeed),g.setTimeout(function(){c.isCss3Finish=!0},c.options.rewindSpeed)):(c.swapSpeed("slideSpeed"),g.setTimeout(function(){c.isCss3Finish=!0}, 7053c.options.slideSpeed)),c.transition3d(a)):!0===b?c.css2slide(a,c.options.paginationSpeed):"rewind"===b?c.css2slide(a,c.options.rewindSpeed):c.css2slide(a,c.options.slideSpeed);c.afterGo()},jumpTo:function(a){"function"===typeof this.options.beforeMove&&this.options.beforeMove.apply(this,[this.$elem]);a>=this.maximumItem||-1===a?a=this.maximumItem:0>=a&&(a=0);this.swapSpeed(0);!0===this.browser.support3d?this.transition3d(this.positionsInArray[a]):this.css2slide(this.positionsInArray[a],1);this.currentItem= 7054this.owl.currentItem=a;this.afterGo()},afterGo:function(){this.prevArr.push(this.currentItem);this.prevItem=this.owl.prevItem=this.prevArr[this.prevArr.length-2];this.prevArr.shift(0);this.prevItem!==this.currentItem&&(this.checkPagination(),this.checkNavigation(),this.eachMoveUpdate(),!1!==this.options.autoPlay&&this.checkAp());"function"===typeof this.options.afterMove&&this.prevItem!==this.currentItem&&this.options.afterMove.apply(this,[this.$elem])},stop:function(){this.apStatus="stop";g.clearInterval(this.autoPlayInterval)}, 7055checkAp:function(){"stop"!==this.apStatus&&this.play()},play:function(){var a=this;a.apStatus="play";if(!1===a.options.autoPlay)return!1;g.clearInterval(a.autoPlayInterval);a.autoPlayInterval=g.setInterval(function(){a.next(!0)},a.options.autoPlay)},swapSpeed:function(a){"slideSpeed"===a?this.$owlWrapper.css(this.addCssSpeed(this.options.slideSpeed)):"paginationSpeed"===a?this.$owlWrapper.css(this.addCssSpeed(this.options.paginationSpeed)):"string"!==typeof a&&this.$owlWrapper.css(this.addCssSpeed(a))}, 7056addCssSpeed:function(a){return{"-webkit-transition":"all "+a+"ms ease","-moz-transition":"all "+a+"ms ease","-o-transition":"all "+a+"ms ease",transition:"all "+a+"ms ease"}},removeTransition:function(){return{"-webkit-transition":"","-moz-transition":"","-o-transition":"",transition:""}},doTranslate:function(a){return{"-webkit-transform":"translate3d("+a+"px, 0px, 0px)","-moz-transform":"translate3d("+a+"px, 0px, 0px)","-o-transform":"translate3d("+a+"px, 0px, 0px)","-ms-transform":"translate3d("+ 7057a+"px, 0px, 0px)",transform:"translate3d("+a+"px, 0px,0px)"}},transition3d:function(a){this.$owlWrapper.css(this.doTranslate(a))},css2move:function(a){this.$owlWrapper.css({left:a})},css2slide:function(a,b){var e=this;e.isCssFinish=!1;e.$owlWrapper.stop(!0,!0).animate({left:a},{duration:b||e.options.slideSpeed,complete:function(){e.isCssFinish=!0}})},checkBrowser:function(){var a=k.createElement("div");a.style.cssText=" -moz-transform:translate3d(0px, 0px, 0px); -ms-transform:translate3d(0px, 0px, 0px); -o-transform:translate3d(0px, 0px, 0px); -webkit-transform:translate3d(0px, 0px, 0px); transform:translate3d(0px, 0px, 0px)"; 7058a=a.style.cssText.match(/translate3d\(0px, 0px, 0px\)/g);this.browser={support3d:null!==a&&1===a.length,isTouch:"ontouchstart"in g||g.navigator.msMaxTouchPoints}},moveEvents:function(){if(!1!==this.options.mouseDrag||!1!==this.options.touchDrag)this.gestures(),this.disabledEvents()},eventTypes:function(){var a=["s","e","x"];this.ev_types={};!0===this.options.mouseDrag&&!0===this.options.touchDrag?a=["touchstart.owl mousedown.owl","touchmove.owl mousemove.owl","touchend.owl touchcancel.owl mouseup.owl"]: 7059!1===this.options.mouseDrag&&!0===this.options.touchDrag?a=["touchstart.owl","touchmove.owl","touchend.owl touchcancel.owl"]:!0===this.options.mouseDrag&&!1===this.options.touchDrag&&(a=["mousedown.owl","mousemove.owl","mouseup.owl"]);this.ev_types.start=a[0];this.ev_types.move=a[1];this.ev_types.end=a[2]},disabledEvents:function(){this.$elem.on("dragstart.owl",function(a){a.preventDefault()});this.$elem.on("mousedown.disableTextSelect",function(a){return f(a.target).is("input, textarea, select, option")})}, 7060gestures:function(){function a(a){if(void 0!==a.touches)return{x:a.touches[0].pageX,y:a.touches[0].pageY};if(void 0===a.touches){if(void 0!==a.pageX)return{x:a.pageX,y:a.pageY};if(void 0===a.pageX)return{x:a.clientX,y:a.clientY}}}function b(a){"on"===a?(f(k).on(d.ev_types.move,e),f(k).on(d.ev_types.end,c)):"off"===a&&(f(k).off(d.ev_types.move),f(k).off(d.ev_types.end))}function e(b){b=b.originalEvent||b||g.event;d.newPosX=a(b).x-h.offsetX;d.newPosY=a(b).y-h.offsetY;d.newRelativeX=d.newPosX-h.relativePos; 7061"function"===typeof d.options.startDragging&&!0!==h.dragging&&0!==d.newRelativeX&&(h.dragging=!0,d.options.startDragging.apply(d,[d.$elem]));(8<d.newRelativeX||-8>d.newRelativeX)&&!0===d.browser.isTouch&&(void 0!==b.preventDefault?b.preventDefault():b.returnValue=!1,h.sliding=!0);(10<d.newPosY||-10>d.newPosY)&&!1===h.sliding&&f(k).off("touchmove.owl");d.newPosX=Math.max(Math.min(d.newPosX,d.newRelativeX/5),d.maximumPixels+d.newRelativeX/5);!0===d.browser.support3d?d.transition3d(d.newPosX):d.css2move(d.newPosX)} 7062function c(a){a=a.originalEvent||a||g.event;var c;a.target=a.target||a.srcElement;h.dragging=!1;!0!==d.browser.isTouch&&d.$owlWrapper.removeClass("grabbing");d.dragDirection=0>d.newRelativeX?d.owl.dragDirection="left":d.owl.dragDirection="right";0!==d.newRelativeX&&(c=d.getNewPosition(),d.goTo(c,!1,"drag"),h.targetElement===a.target&&!0!==d.browser.isTouch&&(f(a.target).on("click.disable",function(a){a.stopImmediatePropagation();a.stopPropagation();a.preventDefault();f(a.target).off("click.disable")}), 7063a=f._data(a.target,"events").click,c=a.pop(),a.splice(0,0,c)));b("off")}var d=this,h={offsetX:0,offsetY:0,baseElWidth:0,relativePos:0,position:null,minSwipe:null,maxSwipe:null,sliding:null,dargging:null,targetElement:null};d.isCssFinish=!0;d.$elem.on(d.ev_types.start,".owl-wrapper",function(c){c=c.originalEvent||c||g.event;var e;if(3===c.which)return!1;if(!(d.itemsAmount<=d.options.items)){if(!1===d.isCssFinish&&!d.options.dragBeforeAnimFinish||!1===d.isCss3Finish&&!d.options.dragBeforeAnimFinish)return!1; 7064!1!==d.options.autoPlay&&g.clearInterval(d.autoPlayInterval);!0===d.browser.isTouch||d.$owlWrapper.hasClass("grabbing")||d.$owlWrapper.addClass("grabbing");d.newPosX=0;d.newRelativeX=0;f(this).css(d.removeTransition());e=f(this).position();h.relativePos=e.left;h.offsetX=a(c).x-e.left;h.offsetY=a(c).y-e.top;b("on");h.sliding=!1;h.targetElement=c.target||c.srcElement}})},getNewPosition:function(){var a=this.closestItem();a>this.maximumItem?a=this.currentItem=this.maximumItem:0<=this.newPosX&&(this.currentItem= 7065a=0);return a},closestItem:function(){var a=this,b=!0===a.options.scrollPerPage?a.pagesInArray:a.positionsInArray,e=a.newPosX,c=null;f.each(b,function(d,g){e-a.itemWidth/20>b[d+1]&&e-a.itemWidth/20<g&&"left"===a.moveDirection()?(c=g,a.currentItem=!0===a.options.scrollPerPage?f.inArray(c,a.positionsInArray):d):e+a.itemWidth/20<g&&e+a.itemWidth/20>(b[d+1]||b[d]-a.itemWidth)&&"right"===a.moveDirection()&&(!0===a.options.scrollPerPage?(c=b[d+1]||b[b.length-1],a.currentItem=f.inArray(c,a.positionsInArray)): 7066(c=b[d+1],a.currentItem=d+1))});return a.currentItem},moveDirection:function(){var a;0>this.newRelativeX?(a="right",this.playDirection="next"):(a="left",this.playDirection="prev");return a},customEvents:function(){var a=this;a.$elem.on("owl.next",function(){a.next()});a.$elem.on("owl.prev",function(){a.prev()});a.$elem.on("owl.play",function(b,e){a.options.autoPlay=e;a.play();a.hoverStatus="play"});a.$elem.on("owl.stop",function(){a.stop();a.hoverStatus="stop"});a.$elem.on("owl.goTo",function(b,e){a.goTo(e)}); 7067a.$elem.on("owl.jumpTo",function(b,e){a.jumpTo(e)})},stopOnHover:function(){var a=this;!0===a.options.stopOnHover&&!0!==a.browser.isTouch&&!1!==a.options.autoPlay&&(a.$elem.on("mouseover",function(){a.stop()}),a.$elem.on("mouseout",function(){"stop"!==a.hoverStatus&&a.play()}))},lazyLoad:function(){var a,b,e,c,d;if(!1===this.options.lazyLoad)return!1;for(a=0;a<this.itemsAmount;a+=1)b=f(this.$owlItems[a]),"loaded"!==b.data("owl-loaded")&&(e=b.data("owl-item"),c=b.find(".lazyOwl"),"string"!==typeof c.data("src")? 7068b.data("owl-loaded","loaded"):(void 0===b.data("owl-loaded")&&(c.hide(),b.addClass("loading").data("owl-loaded","checked")),(d=!0===this.options.lazyFollow?e>=this.currentItem:!0)&&e<this.currentItem+this.options.items&&c.length&&this.lazyPreload(b,c)))},lazyPreload:function(a,b){function e(){a.data("owl-loaded","loaded").removeClass("loading");b.removeAttr("data-src");"fade"===d.options.lazyEffect?b.fadeIn(400):b.show();"function"===typeof d.options.afterLazyLoad&&d.options.afterLazyLoad.apply(this, 7069[d.$elem])}function c(){f+=1;d.completeImg(b.get(0))||!0===k?e():100>=f?g.setTimeout(c,100):e()}var d=this,f=0,k;"DIV"===b.prop("tagName")?(b.css("background-image","url("+b.data("src")+")"),k=!0):b[0].src=b.data("src");c()},autoHeight:function(){function a(){var a=f(e.$owlItems[e.currentItem]).height();e.wrapperOuter.css("height",a+"px");e.wrapperOuter.hasClass("autoHeight")||g.setTimeout(function(){e.wrapperOuter.addClass("autoHeight")},0)}function b(){d+=1;e.completeImg(c.get(0))?a():100>=d?g.setTimeout(b, 7070100):e.wrapperOuter.css("height","")}var e=this,c=f(e.$owlItems[e.currentItem]).find("img"),d;void 0!==c.get(0)?(d=0,b()):a()},completeImg:function(a){return!a.complete||"undefined"!==typeof a.naturalWidth&&0===a.naturalWidth?!1:!0},onVisibleItems:function(){var a;!0===this.options.addClassActive&&this.$owlItems.removeClass("active");this.visibleItems=[];for(a=this.currentItem;a<this.currentItem+this.options.items;a+=1)this.visibleItems.push(a),!0===this.options.addClassActive&&f(this.$owlItems[a]).addClass("active"); 7071this.owl.visibleItems=this.visibleItems},transitionTypes:function(a){this.outClass="owl-"+a+"-out";this.inClass="owl-"+a+"-in"},singleItemTransition:function(){var a=this,b=a.outClass,e=a.inClass,c=a.$owlItems.eq(a.currentItem),d=a.$owlItems.eq(a.prevItem),f=Math.abs(a.positionsInArray[a.currentItem])+a.positionsInArray[a.prevItem],g=Math.abs(a.positionsInArray[a.currentItem])+a.itemWidth/2;a.isTransition=!0;a.$owlWrapper.addClass("owl-origin").css({"-webkit-transform-origin":g+"px","-moz-perspective-origin":g+ 7072"px","perspective-origin":g+"px"});d.css({position:"relative",left:f+"px"}).addClass(b).on("webkitAnimationEnd oAnimationEnd MSAnimationEnd animationend",function(){a.endPrev=!0;d.off("webkitAnimationEnd oAnimationEnd MSAnimationEnd animationend");a.clearTransStyle(d,b)});c.addClass(e).on("webkitAnimationEnd oAnimationEnd MSAnimationEnd animationend",function(){a.endCurrent=!0;c.off("webkitAnimationEnd oAnimationEnd MSAnimationEnd animationend");a.clearTransStyle(c,e)})},clearTransStyle:function(a, 7073b){a.css({position:"",left:""}).removeClass(b);this.endPrev&&this.endCurrent&&(this.$owlWrapper.removeClass("owl-origin"),this.isTransition=this.endCurrent=this.endPrev=!1)},owlStatus:function(){this.owl={userOptions:this.userOptions,baseElement:this.$elem,userItems:this.$userItems,owlItems:this.$owlItems,currentItem:this.currentItem,prevItem:this.prevItem,visibleItems:this.visibleItems,isTouch:this.browser.isTouch,browser:this.browser,dragDirection:this.dragDirection}},clearEvents:function(){this.$elem.off(".owl owl mousedown.disableTextSelect"); 7074f(k).off(".owl owl");f(g).off("resize",this.resizer)},unWrap:function(){0!==this.$elem.children().length&&(this.$owlWrapper.unwrap(),this.$userItems.unwrap().unwrap(),this.owlControls&&this.owlControls.remove());this.clearEvents();this.$elem.attr("style",this.$elem.data("owl-originalStyles")||"").attr("class",this.$elem.data("owl-originalClasses"))},destroy:function(){this.stop();g.clearInterval(this.checkVisible);this.unWrap();this.$elem.removeData()},reinit:function(a){a=f.extend({},this.userOptions, 7075a);this.unWrap();this.init(a,this.$elem)},addItem:function(a,b){var e;if(!a)return!1;if(0===this.$elem.children().length)return this.$elem.append(a),this.setVars(),!1;this.unWrap();e=void 0===b||-1===b?-1:b;e>=this.$userItems.length||-1===e?this.$userItems.eq(-1).after(a):this.$userItems.eq(e).before(a);this.setVars()},removeItem:function(a){if(0===this.$elem.children().length)return!1;a=void 0===a||-1===a?-1:a;this.unWrap();this.$userItems.eq(a).remove();this.setVars()}};f.fn.owlCarousel=function(a){return this.each(function(){if(!0=== 7076f(this).data("owl-init"))return!1;f(this).data("owl-init",!0);var b=Object.create(l);b.init(a,this);f.data(this,"owlCarousel",b)})};f.fn.owlCarousel.options={items:5,itemsCustom:!1,itemsDesktop:[1199,4],itemsDesktopSmall:[979,3],itemsTablet:[768,2],itemsTabletSmall:!1,itemsMobile:[479,1],singleItem:!1,itemsScaleUp:!1,slideSpeed:200,paginationSpeed:800,rewindSpeed:1E3,autoPlay:!1,stopOnHover:!1,navigation:!1,navigationText:["prev","next"],rewindNav:!0,scrollPerPage:!1,pagination:!0,paginationNumbers:!1, 7077responsive:!0,responsiveRefreshRate:200,responsiveBaseWidth:g,baseClass:"owl-carousel",theme:"owl-theme",lazyLoad:!1,lazyFollow:!0,lazyEffect:"fade",autoHeight:!1,jsonPath:!1,jsonSuccess:!1,dragBeforeAnimFinish:!0,mouseDrag:!0,touchDrag:!0,addClassActive:!1,transitionStyle:!1,beforeUpdate:!1,afterUpdate:!1,beforeInit:!1,afterInit:!1,beforeMove:!1,afterMove:!1,afterAction:!1,startDragging:!1,afterLazyLoad:!1}})(jQuery,window,document);
7077 7078 7079// ! function(a, b, c, d) { 7080// function e(b, c) { 7081// this.settings = null, this.options = a.extend({}, e.Defaults, c), this.$element = a(b), this.drag = a.extend({}, m), this.state = a.extend({}, n), this.e = a.extend({}, o), this._plugins = {}, this._supress = {}, this._current = null, this._speed = null, this._coordinates = [], this._breakpoint = null, this._width = null, this._items = [], this._clones = [], this._mergers = [], this._invalidated = {}, this._pipe = [], a.each(e.Plugins, a.proxy(function(a, b) { 7082// this._plugins[a[0].toLowerCase() + a.slice(1)] = new b(this) 7083// }, this)), a.each(e.Pipe, a.proxy(function(b, c) { 7084// this._pipe.push({ 7085// filter: c.filter, 7086// run: a.proxy(c.run, this) 7087// }) 7088// }, this)), this.setup(), this.initialize() 7089// } 7090 7091// function f(a) { 7092// if (a.touches !== d) return { 7093// x: a.touches[0].pageX, 7094// y: a.touches[0].pageY 7095// }; 7096// if (a.touches === d) { 7097// if (a.pageX !== d) return { 7098// x: a.pageX, 7099// y: a.pageY 7100// }; 7101// if (a.pageX === d) return { 7102// x: a.clientX, 7103// y: a.clientY 7104// } 7105// } 7106// } 7107 7108// function g(a) { 7109// var b, d, e = c.createElement("div"), 7110// f = a; 7111// for (b in f) 7112// if (d = f[b], "undefined" != typeof e.style[d]) return e = null, [d, b]; 7113// return [!1] 7114// } 7115 7116// function h() { 7117// return g(["transition", "WebkitTransition", "MozTransition", "OTransition"])[1] 7118// } 7119 7120// function i() { 7121// return g(["transform", "WebkitTransform", "MozTransform", "OTransform", "msTransform"])[0] 7122// } 7123 7124// function j() { 7125// return g(["perspective", "webkitPerspective", "MozPerspective", "OPerspective", "MsPerspective"])[0] 7126// } 7127 7128// function k() { 7129// return "ontouchstart" in b || !!navigator.msMaxTouchPoints 7130// } 7131 7132// function l() { 7133// return b.navigator.msPointerEnabled 7134// } 7135// var m, n, o; 7136// m = { 7137// start: 0, 7138// startX: 0, 7139// startY: 0, 7140// current: 0, 7141// currentX: 0, 7142// currentY: 0, 7143// offsetX: 0, 7144// offsetY: 0, 7145// distance: null, 7146// startTime: 0, 7147// endTime: 0, 7148// updatedX: 0, 7149// targetEl: null 7150// }, n = { 7151// isTouch: !1, 7152// isScrolling: !1, 7153// isSwiping: !1, 7154// direction: !1, 7155// inMotion: !1 7156// }, o = { 7157// _onDragStart: null, 7158// _onDragMove: null, 7159// _onDragEnd: null, 7160// _transitionEnd: null, 7161// _resizer: null, 7162// _responsiveCall: null, 7163// _goToLoop: null, 7164// _checkVisibile: null 7165// }, e.Defaults = { 7166// items: 3, 7167// loop: !1, 7168// center: !1, 7169// mouseDrag: !0, 7170// touchDrag: !0, 7171// pullDrag: !0, 7172// freeDrag: !1, 7173// margin: 0, 7174// stagePadding: 0, 7175// merge: !1, 7176// mergeFit: !0, 7177// autoWidth: !1, 7178// startPosition: 0, 7179// rtl: !1, 7180// smartSpeed: 250, 7181// fluidSpeed: !1, 7182// dragEndSpeed: !1, 7183// responsive: {}, 7184// responsiveRefreshRate: 200, 7185// responsiveBaseElement: b, 7186// responsiveClass: !1, 7187// fallbackEasing: "swing", 7188// info: !1, 7189// nestedItemSelector: !1, 7190// itemElement: "div", 7191// stageElement: "div", 7192// themeClass: "owl-theme", 7193// baseClass: "owl-carousel", 7194// itemClass: "owl-item", 7195// centerClass: "center", 7196// activeClass: "active" 7197// }, e.Width = { 7198// Default: "default", 7199// Inner: "inner", 7200// Outer: "outer" 7201// }, e.Plugins = {}, e.Pipe = [{ 7202// filter: ["width", "items", "settings"], 7203// run: function(a) { 7204// a.current = this._items && this._items[this.relative(this._current)] 7205// } 7206// }, { 7207// filter: ["items", "settings"], 7208// run: function() { 7209// var a = this._clones, 7210// b = this.$stage.children(".cloned"); 7211// (b.length !== a.length || !this.settings.loop && a.length > 0) && (this.$stage.children(".cloned").remove(), this._clones = []) 7212// } 7213// }, { 7214// filter: ["items", "settings"], 7215// run: function() { 7216// var a, b, c = this._clones, 7217// d = this._items, 7218// e = this.settings.loop ? c.length - Math.max(2 * this.settings.items, 4) : 0; 7219// for (a = 0, b = Math.abs(e / 2); b > a; a++) e > 0 ? (this.$stage.children().eq(d.length + c.length - 1).remove(), c.pop(), this.$stage.children().eq(0).remove(), c.pop()) : (c.push(c.length / 2), this.$stage.append(d[c[c.length - 1]].clone().addClass("cloned")), c.push(d.length - 1 - (c.length - 1) / 2), this.$stage.prepend(d[c[c.length - 1]].clone().addClass("cloned"))) 7220// } 7221// }, { 7222// filter: ["width", "items", "settings"], 7223// run: function() { 7224// var a, b, c, d = this.settings.rtl ? 1 : -1, 7225// e = (this.width() / this.settings.items).toFixed(3), 7226// f = 0; 7227// for (this._coordinates = [], b = 0, c = this._clones.length + this._items.length; c > b; b++) a = this._mergers[this.relative(b)], a = this.settings.mergeFit && Math.min(a, this.settings.items) || a, f += (this.settings.autoWidth ? this._items[this.relative(b)].width() + this.settings.margin : e * a) * d, this._coordinates.push(f) 7228// } 7229// }, { 7230// filter: ["width", "items", "settings"], 7231// run: function() { 7232// var b, c, d = (this.width() / this.settings.items).toFixed(3), 7233// e = { 7234// width: Math.abs(this._coordinates[this._coordinates.length - 1]) + 2 * this.settings.stagePadding, 7235// "padding-left": this.settings.stagePadding || "", 7236// "padding-right": this.settings.stagePadding || "" 7237// }; 7238// if (this.$stage.css(e), e = { 7239// width: this.settings.autoWidth ? "auto" : d - this.settings.margin 7240// }, e[this.settings.rtl ? "margin-left" : "margin-right"] = this.settings.margin, !this.settings.autoWidth && a.grep(this._mergers, function(a) { 7241// return a > 1 7242// }).length > 0) 7243// for (b = 0, c = this._coordinates.length; c > b; b++) e.width = Math.abs(this._coordinates[b]) - Math.abs(this._coordinates[b - 1] || 0) - this.settings.margin, this.$stage.children().eq(b).css(e); 7244// else this.$stage.children().css(e) 7245// } 7246// }, { 7247// filter: ["width", "items", "settings"], 7248// run: function(a) { 7249// a.current && this.reset(this.$stage.children().index(a.current)) 7250// } 7251// }, { 7252// filter: ["position"], 7253// run: function() { 7254// this.animate(this.coordinates(this._current)) 7255// } 7256// }, { 7257// filter: ["width", "position", "items", "settings"], 7258// run: function() { 7259// var a, b, c, d, e = this.settings.rtl ? 1 : -1, 7260// f = 2 * this.settings.stagePadding, 7261// g = this.coordinates(this.current()) + f, 7262// h = g + this.width() * e, 7263// i = []; 7264// for (c = 0, d = this._coordinates.length; d > c; c++) a = this._coordinates[c - 1] || 0, b = Math.abs(this._coordinates[c]) + f * e, (this.op(a, "<=", g) && this.op(a, ">", h) || this.op(b, "<", g) && this.op(b, ">", h)) && i.push(c); 7265// this.$stage.children("." + this.settings.activeClass).removeClass(this.settings.activeClass), this.$stage.children(":eq(" + i.join("), :eq(") + ")").addClass(this.settings.activeClass), this.settings.center && (this.$stage.children("." + this.settings.centerClass).removeClass(this.settings.centerClass), this.$stage.children().eq(this.current()).addClass(this.settings.centerClass)) 7266// } 7267// }], e.prototype.initialize = function() { 7268// if (this.trigger("initialize"), this.$element.addClass(this.settings.baseClass).addClass(this.settings.themeClass).toggleClass("owl-rtl", this.settings.rtl), this.browserSupport(), this.settings.autoWidth && this.state.imagesLoaded !== !0) { 7269// var b, c, e; 7270// if (b = this.$element.find("img"), c = this.settings.nestedItemSelector ? "." + this.settings.nestedItemSelector : d, e = this.$element.children(c).width(), b.length && 0 >= e) return this.preloadAutoWidthImages(b), !1 7271// } 7272// this.$element.addClass("owl-loading"), this.$stage = a("<" + this.settings.stageElement + ' class="owl-stage"/>').wrap('<div class="owl-stage-outer">'), this.$element.append(this.$stage.parent()), this.replace(this.$element.children().not(this.$stage.parent())), this._width = this.$element.width(), this.refresh(), this.$element.removeClass("owl-loading").addClass("owl-loaded"), this.eventsCall(), this.internalEvents(), this.addTriggerableEvents(), this.trigger("initialized") 7273// }, e.prototype.setup = function() { 7274// var b = this.viewport(), 7275// c = this.options.responsive, 7276// d = -1, 7277// e = null; 7278// c ? (a.each(c, function(a) { 7279// b >= a && a > d && (d = Number(a)) 7280// }), e = a.extend({}, this.options, c[d]), delete e.responsive, e.responsiveClass && this.$element.attr("class", function(a, b) { 7281// return b.replace(/\b owl-responsive-\S+/g, "") 7282// }).addClass("owl-responsive-" + d)) : e = a.extend({}, this.options), (null === this.settings || this._breakpoint !== d) && (this.trigger("change", { 7283// property: { 7284// name: "settings", 7285// value: e 7286// } 7287// }), this._breakpoint = d, this.settings = e, this.invalidate("settings"), this.trigger("changed", { 7288// property: { 7289// name: "settings", 7290// value: this.settings 7291// } 7292// })) 7293// }, e.prototype.optionsLogic = function() { 7294// this.$element.toggleClass("owl-center", this.settings.center), this.settings.loop && this._items.length < this.settings.items && (this.settings.loop = !1), this.settings.autoWidth && (this.settings.stagePadding = !1, this.settings.merge = !1) 7295// }, e.prototype.prepare = function(b) { 7296// var c = this.trigger("prepare", { 7297// content: b 7298// }); 7299// return c.data || (c.data = a("<" + this.settings.itemElement + "/>").addClass(this.settings.itemClass).append(b)), this.trigger("prepared", { 7300// content: c.data 7301// }), c.data 7302// }, e.prototype.update = function() { 7303// for (var b = 0, c = this._pipe.length, d = a.proxy(function(a) { 7304// return this[a] 7305// }, this._invalidated), e = {}; c > b;)(this._invalidated.all || a.grep(this._pipe[b].filter, d).length > 0) && this._pipe[b].run(e), b++; 7306// this._invalidated = {} 7307// }, e.prototype.width = function(a) { 7308// switch (a = a || e.Width.Default) { 7309// case e.Width.Inner: 7310// case e.Width.Outer: 7311// return this._width; 7312// default: 7313// return this._width - 2 * this.settings.stagePadding + this.settings.margin 7314// } 7315// }, e.prototype.refresh = function() { 7316// if (0 === this._items.length) return !1; 7317// (new Date).getTime(); 7318// this.trigger("refresh"), this.setup(), this.optionsLogic(), this.$stage.addClass("owl-refresh"), this.update(), this.$stage.removeClass("owl-refresh"), this.state.orientation = b.orientation, this.watchVisibility(), this.trigger("refreshed") 7319// }, e.prototype.eventsCall = function() { 7320// this.e._onDragStart = a.proxy(function(a) { 7321// this.onDragStart(a) 7322// }, this), this.e._onDragMove = a.proxy(function(a) { 7323// this.onDragMove(a) 7324// }, this), this.e._onDragEnd = a.proxy(function(a) { 7325// this.onDragEnd(a) 7326// }, this), this.e._onResize = a.proxy(function(a) { 7327// this.onResize(a) 7328// }, this), this.e._transitionEnd = a.proxy(function(a) { 7329// this.transitionEnd(a) 7330// }, this), this.e._preventClick = a.proxy(function(a) { 7331// this.preventClick(a) 7332// }, this) 7333// }, e.prototype.onThrottledResize = function() { 7334// b.clearTimeout(this.resizeTimer), this.resizeTimer = b.setTimeout(this.e._onResize, this.settings.responsiveRefreshRate) 7335// }, e.prototype.onResize = function() { 7336// return this._items.length ? this._width === this.$element.width() ? !1 : this.trigger("resize").isDefaultPrevented() ? !1 : (this._width = this.$element.width(), this.invalidate("width"), this.refresh(), void this.trigger("resized")) : !1 7337// }, e.prototype.eventsRouter = function(a) { 7338// var b = a.type;
7339// "mousedown" === b || "touchstart" === b ? this.onDragStart(a) : "mousemove" === b || "touchmove" === b ? this.onDragMove(a) : "mouseup" === b || "touchend" === b ? this.onDragEnd(a) : "touchcancel" === b && this.onDragEnd(a) 7340// }, e.prototype.internalEvents = function() { 7341// var c = (k(), l()); 7342// this.settings.mouseDrag ? (this.$stage.on("mousedown", a.proxy(function(a) { 7343// this.eventsRouter(a) 7344// }, this)), this.$stage.on("dragstart", function() { 7345// return !1 7346// }), this.$stage.get(0).onselectstart = function() { 7347// return !1 7348// }) : this.$element.addClass("owl-text-select-on"), this.settings.touchDrag && !c && this.$stage.on("touchstart touchcancel", a.proxy(function(a) { 7349// this.eventsRouter(a) 7350// }, this)), this.transitionEndVendor && this.on(this.$stage.get(0), this.transitionEndVendor, this.e._transitionEnd, !1), this.settings.responsive !== !1 && this.on(b, "resize", a.proxy(this.onThrottledResize, this)) 7351// }, e.prototype.onDragStart = function(d) { 7352// var e, g, h, i; 7353// if (e = d.originalEvent || d || b.event, 3 === e.which || this.state.isTouch) return !1; 7354// if ("mousedown" === e.type && this.$stage.addClass("owl-grab"), this.trigger("drag"), this.drag.startTime = (new Date).getTime(), this.speed(0), this.state.isTouch = !0, this.state.isScrolling = !1, this.state.isSwiping = !1, this.drag.distance = 0, g = f(e).x, h = f(e).y, this.drag.offsetX = this.$stage.position().left, this.drag.offsetY = this.$stage.position().top, this.settings.rtl && (this.drag.offsetX = this.$stage.position().left + this.$stage.width() - this.width() + this.settings.margin), this.state.inMotion && this.support3d) i = this.getTransformProperty(), this.drag.offsetX = i, this.animate(i), this.state.inMotion = !0; 7355// else if (this.state.inMotion && !this.support3d) return this.state.inMotion = !1, !1; 7356// this.drag.startX = g - this.drag.offsetX, this.drag.startY = h - this.drag.offsetY, this.drag.start = g - this.drag.startX, this.drag.targetEl = e.target || e.srcElement, this.drag.updatedX = this.drag.start, ("IMG" === this.drag.targetEl.tagName || "A" === this.drag.targetEl.tagName) && (this.drag.targetEl.draggable = !1), a(c).on("mousemove.owl.dragEvents mouseup.owl.dragEvents touchmove.owl.dragEvents touchend.owl.dragEvents", a.proxy(function(a) { 7357// this.eventsRouter(a) 7358// }, this)) 7359// }, e.prototype.onDragMove = function(a) { 7360// var c, e, g, h, i, j; 7361// this.state.isTouch && (this.state.isScrolling || (c = a.originalEvent || a || b.event, e = f(c).x, g = f(c).y, this.drag.currentX = e - this.drag.startX, this.drag.currentY = g - this.drag.startY, this.drag.distance = this.drag.currentX - this.drag.offsetX, this.drag.distance < 0 ? this.state.direction = this.settings.rtl ? "right" : "left" : this.drag.distance > 0 && (this.state.direction = this.settings.rtl ? "left" : "right"), this.settings.loop ? this.op(this.drag.currentX, ">", this.coordinates(this.minimum())) && "right" === this.state.direction ? this.drag.currentX -= (this.settings.center && this.coordinates(0)) - this.coordinates(this._items.length) : this.op(this.drag.currentX, "<", this.coordinates(this.maximum())) && "left" === this.state.direction && (this.drag.currentX += (this.settings.center && this.coordinates(0)) - this.coordinates(this._items.length)) : (h = this.coordinates(this.settings.rtl ? this.maximum() : this.minimum()), i = this.coordinates(this.settings.rtl ? this.minimum() : this.maximum()), j = this.settings.pullDrag ? this.drag.distance / 5 : 0, this.drag.currentX = Math.max(Math.min(this.drag.currentX, h + j), i + j)), (this.drag.distance > 8 || this.drag.distance < -8) && (c.preventDefault !== d ? c.preventDefault() : c.returnValue = !1, this.state.isSwiping = !0), this.drag.updatedX = this.drag.currentX, (this.drag.currentY > 16 || this.drag.currentY < -16) && this.state.isSwiping === !1 && (this.state.isScrolling = !0, this.drag.updatedX = this.drag.start), this.animate(this.drag.updatedX))) 7362// }, e.prototype.onDragEnd = function(b) { 7363// var d, e, f; 7364// if (this.state.isTouch) { 7365// if ("mouseup" === b.type && this.$stage.removeClass("owl-grab"), this.trigger("dragged"), this.drag.targetEl.removeAttribute("draggable"), this.state.isTouch = !1, this.state.isScrolling = !1, this.state.isSwiping = !1, 0 === this.drag.distance && this.state.inMotion !== !0) return this.state.inMotion = !1, !1; 7366// this.drag.endTime = (new Date).getTime(), d = this.drag.endTime - this.drag.startTime, e = Math.abs(this.drag.distance), (e > 3 || d > 300) && this.removeClick(this.drag.targetEl), f = this.closest(this.drag.updatedX), this.speed(this.settings.dragEndSpeed || this.settings.smartSpeed), this.current(f), this.invalidate("position"), this.update(), this.settings.pullDrag || this.drag.updatedX !== this.coordinates(f) || this.transitionEnd(), this.drag.distance = 0, a(c).off(".owl.dragEvents") 7367// } 7368// }, e.prototype.removeClick = function(c) { 7369// this.drag.targetEl = c, a(c).on("click.preventClick", this.e._preventClick), b.setTimeout(function() { 7370// a(c).off("click.preventClick") 7371// }, 300) 7372// }, e.prototype.preventClick = function(b) { 7373// b.preventDefault ? b.preventDefault() : b.returnValue = !1, b.stopPropagation && b.stopPropagation(), a(b.target).off("click.preventClick") 7374// }, e.prototype.getTransformProperty = function() { 7375// var a, c; 7376// return a = b.getComputedStyle(this.$stage.get(0), null).getPropertyValue(this.vendorName + "transform"), a = a.replace(/matrix(3d)?\(|\)/g, "").split(","), c = 16 === a.length, c !== !0 ? a[4] : a[12] 7377// }, e.prototype.closest = function(b) { 7378// var c = -1, 7379// d = 30, 7380// e = this.width(), 7381// f = this.coordinates(); 7382// return this.settings.freeDrag || a.each(f, a.proxy(function(a, g) { 7383// return b > g - d && g + d > b ? c = a : this.op(b, "<", g) && this.op(b, ">", f[a + 1] || g - e) && (c = "left" === this.state.direction ? a + 1 : a), -1 === c 7384// }, this)), this.settings.loop || (this.op(b, ">", f[this.minimum()]) ? c = b = this.minimum() : this.op(b, "<", f[this.maximum()]) && (c = b = this.maximum())), c 7385// }, e.prototype.animate = function(b) { 7386// this.trigger("translate"), this.state.inMotion = this.speed() > 0, this.support3d ? this.$stage.css({ 7387// transform: "translate3d(" + b + "px,0px, 0px)", 7388// transition: this.speed() / 1e3 + "s" 7389// }) : this.state.isTouch ? this.$stage.css({ 7390// left: b + "px" 7391// }) : this.$stage.animate({ 7392// left: b 7393// }, this.speed() / 1e3, this.settings.fallbackEasing, a.proxy(function() { 7394// this.state.inMotion && this.transitionEnd() 7395// }, this)) 7396// }, e.prototype.current = function(a) { 7397// if (a === d) return this._current; 7398// if (0 === this._items.length) return d; 7399// if (a = this.normalize(a), this._current !== a) { 7400// var b = this.trigger("change", { 7401// property: { 7402// name: "position", 7403// value: a 7404// } 7405// }); 7406// b.data !== d && (a = this.normalize(b.data)), this._current = a, this.invalidate("position"), this.trigger("changed", { 7407// property: { 7408// name: "position", 7409// value: this._current 7410// } 7411// }) 7412// } 7413// return this._current 7414// }, e.prototype.invalidate = function(a) { 7415// this._invalidated[a] = !0 7416// }, e.prototype.reset = function(a) { 7417// a = this.normalize(a), a !== d && (this._speed = 0, this._current = a, this.suppress(["translate", "translated"]), this.animate(this.coordinates(a)
7417), this.release(["translate", "translated"])) 7418// }, e.prototype.normalize = function(b, c) { 7419// var e = c ? this._items.length : this._items.length + this._clones.length; 7420// return !a.isNumeric(b) || 1 > e ? d : b = this._clones.length ? (b % e + e) % e : Math.max(this.minimum(c), Math.min(this.maximum(c), b)) 7421// }, e.prototype.relative = function(a) { 7422// return a = this.normalize(a), a -= this._clones.length / 2, this.normalize(a, !0) 7423// }, e.prototype.maximum = function(a) { 7424// var b, c, d, e = 0, 7425// f = this.settings; 7426// if (a) return this._items.length - 1; 7427// if (!f.loop && f.center) b = this._items.length - 1; 7428// else if (f.loop || f.center) 7429// if (f.loop || f.center) b = this._items.length + f.items; 7430// else { 7431// if (!f.autoWidth && !f.merge) throw "Can not detect maximum absolute position."; 7432// for (revert = f.rtl ? 1 : -1, c = this.$stage.width() - this.$element.width(); 7433// (d = this.coordinates(e)) && !(d * revert >= c);) b = ++e 7434// } else b = this._items.length - f.items; 7435// return b 7436// }, e.prototype.minimum = function(a) { 7437// return a ? 0 : this._clones.length / 2 7438// }, e.prototype.items = function(a) { 7439// return a === d ? this._items.slice() : (a = this.normalize(a, !0), this._items[a]) 7440// }, e.prototype.mergers = function(a) { 7441// return a === d ? this._mergers.slice() : (a = this.normalize(a, !0), this._mergers[a]) 7442// }, e.prototype.clones = function(b) { 7443// var c = this._clones.length / 2, 7444// e = c + this._items.length, 7445// f = function(a) { 7446// return a % 2 === 0 ? e + a / 2 : c - (a + 1) / 2 7447// }; 7448// return b === d ? a.map(this._clones, function(a, b) { 7449// return f(b) 7450// }) : a.map(this._clones, function(a, c) { 7451// return a === b ? f(c) : null 7452// }) 7453// }, e.prototype.speed = function(a) { 7454// return a !== d && (this._speed = a), this._speed 7455// }, e.prototype.coordinates = function(b) { 7456// var c = null; 7457// return b === d ? a.map(this._coordinates, a.proxy(function(a, b) { 7458// return this.coordinates(b) 7459// }, this)) : (this.settings.center ? (c = this._coordinates[b], c += (this.width() - c + (this._coordinates[b - 1] || 0)) / 2 * (this.settings.rtl ? -1 : 1)) : c = this._coordinates[b - 1] || 0, c) 7460// }, e.prototype.duration = function(a, b, c) { 7461// return Math.min(Math.max(Math.abs(b - a), 1), 6) * Math.abs(c || this.settings.smartSpeed) 7462// }, e.prototype.to = function(c, d) { 7463// if (this.settings.loop) { 7464// var e = c - this.relative(this.current()), 7465// f = this.current(), 7466// g = this.current(), 7467// h = this.current() + e, 7468// i = 0 > g - h ? !0 : !1, 7469// j = this._clones.length + this._items.length; 7470// h < this.settings.items && i === !1 ? (f = g + this._items.length, this.reset(f)) : h >= j - this.settings.items && i === !0 && (f = g - this._items.length, this.reset(f)), b.clearTimeout(this.e._goToLoop), this.e._goToLoop = b.setTimeout(a.proxy(function() { 7471// this.speed(this.duration(this.current(), f + e, d)), this.current(f + e), this.update() 7472// }, this), 30) 7473// } else this.speed(this.duration(this.current(), c, d)), this.current(c), this.update() 7474// }, e.prototype.next = function(a) { 7475// a = a || !1, this.to(this.relative(this.current()) + 1, a) 7476// }, e.prototype.prev = function(a) { 7477// a = a || !1, this.to(this.relative(this.current()) - 1, a) 7478// }, e.prototype.transitionEnd = function(a) { 7479// return a !== d && (a.stopPropagation(), (a.target || a.srcElement || a.originalTarget) !== this.$stage.get(0)) ? !1 : (this.state.inMotion = !1, void this.trigger("translated")) 7480// }, e.prototype.viewport = function() { 7481// var d; 7482// if (this.options.responsiveBaseElement !== b) d = a(this.options.responsiveBaseElement).width(); 7483// else if (b.innerWidth) d = b.innerWidth; 7484// else { 7485// if (!c.documentElement || !c.documentElement.clientWidth) throw "Can not detect viewport width."; 7486// d = c.documentElement.clientWidth 7487// } 7488// return d 7489// }, e.prototype.replace = function(b) { 7490// this.$stage.empty(), this._items = [], b && (b = b instanceof jQuery ? b : a(b)), this.settings.nestedItemSelector && (b = b.find("." + this.settings.nestedItemSelector)), b.filter(function() { 7491// return 1 === this.nodeType 7492// }).each(a.proxy(function(a, b) { 7493// b = this.prepare(b), this.$stage.append(b), this._items.push(b), this._mergers.push(1 * b.find("[data-merge]").andSelf("[data-merge]").attr("data-merge") || 1) 7494// }, this)), this.reset(a.isNumeric(this.settings.startPosition) ? this.settings.startPosition : 0), this.invalidate("items") 7495// }, e.prototype.add = function(a, b) { 7496// b = b === d ? this._items.length : this.normalize(b,
7496!0), this.trigger("add", { 7497// content: a, 7498// position: b 7499// }), 0 === this._items.length || b === this._items.length ? (this.$stage.append(a), this._items.push(a), this._mergers.push(1 * a.find("[data-merge]").andSelf("[data-merge]").attr("data-merge") || 1)) : (this._items[b].before(a), this._items.splice(b, 0, a), this._mergers.splice(b, 0, 1 * a.find("[data-merge]").andSelf("[data-merge]").attr("data-merge") || 1)), this.invalidate("items"), this.trigger("added", { 7500// content: a, 7501// position: b 7502// }) 7503// }, e.prototype.remove = function(a) { 7504// a = this.normalize(a, !0), a !== d && (this.trigger("remove", { 7505// content: this._items[a], 7506// position: a 7507// }), this._items[a].remove(), this._items.splice(a, 1), this._mergers.splice(a, 1), this.invalidate("items"), this.trigger("removed", { 7508// content: null, 7509// position: a 7510// })) 7511// }, e.prototype.addTriggerableEvents = function() { 7512// var b = a.proxy(function(b, c) { 7513// return a.proxy(function(a) { 7514// a.relatedTarget !== this && (this.suppress([c]), b.apply(this, [].slice.call(arguments, 1)), this.release([c])) 7515// }, this) 7516// }, this); 7517// a.each({ 7518// next: this.next, 7519// prev: this.prev, 7520// to: this.to, 7521// destroy: this.destroy, 7522// refresh: this.refresh, 7523// replace: this.replace, 7524// add: this.add, 7525// remove: this.remove 7526// }, a.proxy(function(a, c) { 7527// this.$element.on(a + ".owl.carousel", b(c, a + ".owl.carousel")) 7528// }, this)) 7529// }, e.prototype.watchVisibility = function() { 7530// function c(a) { 7531// return a.offsetWidth > 0 && a.offsetHeight > 0 7532// } 7533 7534// function d() { 7535// c(this.$element.get(0)) && (this.$element.removeClass("owl-hidden"), this.refresh(), b.clearInterval(this.e._checkVisibile)) 7536// } 7537// c(this.$element.get(0)) || (this.$element.addClass("owl-hidden"), b.clearInterval(this.e._checkVisibile), this.e._checkVisibile = b.setInterval(a.proxy(d, this), 500)) 7538// }, e.prototype.preloadAutoWidthImages = function(b) { 7539// var c, d, e, f; 7540// c = 0, d = this, b.each(function(g, h) { 7541// e = a(h), f = new Image, f.onload = function() { 7542// c++, e.attr("src", f.src), e.css("opacity", 1), c >= b.length && (d.state.imagesLoaded = !0, d.initialize()) 7543// }, f.src = e.attr("src") || e.attr("data-src") || e.attr("data-src-retina") 7544// }) 7545// }, e.prototype.destroy = function() { 7546// this.$element.hasClass(this.settings.themeClass) && this.$element.removeClass(this.settings.themeClass), this.settings.responsive !== !1 && a(b).off("resize.owl.carousel"), this.transitionEndVendor && this.off(this.$stage.get(0), this.transitionEndVendor, this.e._transitionEnd); 7547// for (var d in this._plugins) this._plugins[d].destroy(); 7548// (this.settings.mouseDrag || this.settings.touchDrag) && (this.$stage.off("mousedown touchstart touchcancel"), a(c).off(".owl.dragEvents"), this.$stage.get(0).onselectstart = function() {}, this.$stage.off("dragstart", function() { 7549// return !1 7550// })), this.$element.off(".owl"), this.$stage.children(".cloned").remove(), this.e = null, this.$element.removeData("owlCarousel"), this.$stage.children().contents().unwrap(), this.$stage.children().unwrap(), this.$stage.unwrap() 7551// }, e.prototype.op = function(a, b, c) { 7552// var d = this.settings.rtl; 7553// switch (b) { 7554// case "<": 7555// return d ? a > c : c > a; 7556// case ">": 7557// return d ? c > a : a > c; 7558// case ">=": 7559// return d ? c >= a : a >= c; 7560// case "<=": 7561// return d ? a >= c : c >= a 7562// } 7563// }, e.prototype.on = function(a, b, c, d) { 7564// a.addEventListener ? a.addEventListener(b, c, d) : a.attachEvent && a.attachEvent("on" + b, c) 7565// }, e.prototype.off = function(a, b, c, d) { 7566// a.removeEventListener ? a.removeEventListener(b, c, d) : a.detachEvent && a.detachEvent("on" + b, c) 7567// }, e.prototype.trigger = function(b, c, d) { 7568// var e = { 7569// item: { 7570// count: this._items.length, 7571// index: this.current() 7572// } 7573// }, 7574// f = a.camelCase(a.grep(["on", b, d], function(a) { 7575// return a 7576// }).join("-").toLowerCase()), 7577// g = a.Event([b, "owl", d || "carousel"].join(".").toLowerCase(), a.extend({ 7578// relatedTarget: this 7579// }, e, c)); 7580// return this._supress[b] || (a.each(this._plugins, function(a, b) { 7581// b.onTrigger && b.onTrigger(g) 7582// }), this.$element.trigger(g), this.settings && "function" == typeof this.settings[f] && this.settings[f].apply(this, g)), g 7583// }, e.prototype.suppress = function(b) { 7584// a.each(b, a.proxy(function(a, b) { 7585// this._supress[b] = !0 7586// }, this)) 7587// }, e.prototype.release = function(b) { 7588// a.each(b, a.proxy(function(a, b) { 7589// delete this._supress[b] 7590// }, this)) 7591// }, e.prototype.browserSupport = function() { 7592// if (this.support3d = j(), this.support3d) { 7593// this.transformVendor = i(); 7594// var a = ["transitionend", "webkitTransitionEnd", "transitionend", "oTransitionEnd"]; 7595// this.transitionEndVendor = a[h()], this.vendorName = this.transformVendor.replace(/Transform/i, ""), this.vendorName = "" !== this.vendorName ? "-" + this.vendorName.toLowerCase() + "-" : "" 7596// } 7597// this.state.orientation = b.orientation 7598// }, a.fn.owlCarousel = function(b) { 7599// return this.each(function() { 7600// a(this).data("owlCarousel") || a(this).data("owlCarousel", new e(this, b)) 7601// }) 7602// }, a.fn.owlCarousel.Constructor = e 7603// }(window.Zepto || window.jQuery, window, document), 7604// function(a, b) { 7605// var c = function(b) { 7606// this._core = b, this._loaded = [], this._handlers = { 7607// "initialized.owl.carousel change.owl.carousel": a.proxy(function(b) { 7608// if (b.namespace && this._core.settings && this._core.settings.lazyLoad && (b.property && "position" == b.property.name || "initialized" == b.type)) 7609// for (var c = this._core.settings, d = c.center && Math.ceil(c.items / 2) || c.items, e = c.center && -1 * d || 0, f = (b.property && b.property.value || this._core.current()) + e, g = this._core.clones().length, h
7609= a.proxy(function(a, b) { 7610// this.load(b) 7611// }, this); e++ < d;) this.load(g / 2 + this._core.relative(f)), g && a.each(this._core.clones(this._core.relative(f++)), h) 7612// }, this) 7613// }, this._core.options = a.extend({}, c.Defaults, this._core.options), this._core.$element.on(this._handlers) 7614// }; 7615// c.Defaults = { 7616// lazyLoad: !1 7617// }, c.prototype.load = function(c) { 7618// var d = this._core.$stage.children().eq(c), 7619// e = d && d.find(".owl-lazy"); 7620// !e || a.inArray(d.get(0), this._loaded) > -1 || (e.each(a.proxy(function(c, d) { 7621// var e, f = a(d), 7622// g = b.devicePixelRatio > 1 && f.attr("data-src-retina") || f.attr("data-src"); 7623// this._core.trigger("load", { 7624// element: f, 7625// url: g 7626// }, "lazy"), f.is("img") ? f.one("load.owl.lazy", a.proxy(function() { 7627// f.css("opacity", 1), this._core.trigger("loaded", { 7628// element: f, 7629// url: g 7630// }, "lazy") 7631// }, this)).attr("src", g) : (e = new Image, e.onload = a.proxy(function() { 7632// f.css({ 7633// "background-image": "url(" + g + ")", 7634// opacity: "1" 7635// }), this._core.trigger("loaded", { 7636// element: f, 7637// url: g 7638// }, "lazy") 7639// }, this), e.src = g) 7640// }, this)), this._loaded.push(d.get(0))) 7641// }, c.prototype.destroy = function() { 7642// var a, b; 7643// for (a in this.handlers) this._core.$element.off(a, this.handlers[a]); 7644// for (b in Object.getOwnPropertyNames(this)) "function" != typeof this[b] && (this[b] = null) 7645// }, a.fn.owlCarousel.Constructor.Plugins.Lazy = c 7646// }(window.Zepto || window.jQuery, window, document), 7647// function(a) { 7648// var b = function(c) { 7649// this._core = c, this._handlers = { 7650// "initialized.owl.carousel": a.proxy(function() { 7651// this._core.settings.autoHeight && this.update() 7652// }, this), 7653// "changed.owl.carousel": a.proxy(function(a) { 7654// this._core.settings.autoHeight && "position" == a.property.name && this.update() 7655// }, this), 7656// "loaded.owl.lazy": a.proxy(function(a) { 7657// this._core.settings.autoHeight && a.element.closest("." + this._core.settings.itemClass) === this._core.$stage.children().eq(this._core.current()) && this.update() 7658// }, this) 7659// }, this._core.options = a.extend({}, b.Defaults, this._core.options), this._core.$element.on(this._handlers) 7660// }; 7661// b.Defaults = { 7662// autoHeight: !1, 7663// autoHeightClass: "owl-height" 7664// }, b.prototype.update = function() { 7665// this._core.$stage.parent().height(this._core.$stage.children().eq(this._core.current()).height()).addClass(this._core.settings.autoHeightClass) 7666// }, b.prototype.destroy = function() { 7667// var a, b; 7668// for (a in this._handlers) this._core.$element.off(a, this._handlers[a]); 7669// for (b in Object.getOwnPropertyNames(this)) "function" != typeof this[b] && (this[b] = null) 7670// }, a.fn.owlCarousel.Constructor.Plugins.AutoHeight = b 7671// }(window.Zepto || window.jQuery, window, document), 7672// function(a, b, c) { 7673// var d = function(b) { 7674// this._core = b, this._videos = {}, this._playing = null, this._fullscreen = !1, this._handlers = { 7675// "resize.owl.carousel": a.proxy(function(a) { 7676// this._core.settings.video && !this.isInFullScreen() && a.preventDefault() 7677// }, this), 7678// "refresh.owl.carousel changed.owl.carousel": a.proxy(function() { 7679// this._playing && this.stop() 7680// }, this), 7681// "prepared.owl.carousel": a.proxy(function(b) { 7682// var c = a(b.content).find(".owl-video"); 7683// c.length && (c.css("display", "none"), this.fetch(c, a(b.content))) 7684// }, this) 7685// }, this._core.options = a.extend({}, d.Defaults, this._core.options), this._core.$element.on(this._handlers), this._core.$element.on("click.owl.video", ".owl-video-play-icon", a.proxy(function(a) { 7686// this.play(a) 7687// }, this)) 7688// }; 7689// d.Defaults = { 7690// video: !1, 7691// videoHeight: !1, 7692// videoWidth: !1 7693// }, d.prototype.fetch = function(a, b) { 7694// var c = a.attr("data-vimeo-id") ? "vimeo" : "youtube", 7695// d = a.attr("data-vimeo-id") || a.attr("data-youtube-id"), 7696// e = a.attr("data-width") || this._core.settings.videoWidth, 7697// f = a.attr("data-height") || this._core.settings.videoHeight, 7698// g = a.attr("href"); 7699// if (!g) throw new Error("Missing video URL."); 7700// if (d = g.match(/(http:|https:|)\/\/(player.|www.)?(vimeo\.com|youtu(be\.com|\.be|be\.googleapis\.com))\/(video\/|embed\/|watch\?v=|v\/)?([A-Za-z0-9._%-]*)(\&\S+)?/), d[3].indexOf("youtu") > -1) c = "youtube"; 7701// else { 7702// if (!(d[3].indexOf("vimeo") > -1)) throw new Error("Video URL not supported."); 7703// c = "vimeo" 7704// } 7705// d = d[6], this._videos[g] = { 7706// type: c, 7707// id: d, 7708// width: e, 7709// height: f 7710// }, b.attr("data-video", g), this.thumbnail(a, this._videos[g]) 7711// }, d.prototype.thumbnail = function(b, c) { 7712// var d, e, f, g = c.width && c.height ? 'style="width:' + c.width + "px;height:" + c.height + 'px;"' : "", 7713// h = b.find("img"), 7714// i = "src", 7715// j = "", 7716// k = this._core.settings, 7717// l = function(a) { 7718// e = '<div class="owl-video-play-icon"></div>', d = k.lazyLoad ? '<div class="owl-video-tn ' + j + '" ' + i + '="' + a + '"></div>' : '<div class="owl-video-tn" style="opacity:1;background-image:url(' + a + ')"></div>', b.after(d), b.after(e) 7719// }; 7720// return b.wrap('<div class="owl-video-wrapper"' + g + "></div>"), this._core.settings.lazyLoad && (i = "data-src", j = "owl-lazy"), h.length ? (l(h.attr(i)), h.remove(), !1) : void("youtube" === c.type ? (f = "http://img.youtube.com/vi/" + c.id + "/hqdefault.jpg", l(f)) : "vimeo" === c.type && a.aja
7720x({ 7721// type: "GET", 7722// url: "http://vimeo.com/api/v2/video/" + c.id + ".json", 7723// jsonp: "callback", 7724// dataType: "jsonp", 7725// success: function(a) { 7726// f = a[0].thumbnail_large, l(f) 7727// } 7728// })) 7729// }, d.prototype.stop = function() { 7730// this._core.trigger("stop", null, "video"), this._playing.find(".owl-video-frame").remove(), this._playing.removeClass("owl-video-playing"), this._playing = null 7731// }, d.prototype.play = function(b) { 7732// this._core.trigger("play", null, "video"), this._playing && this.stop(); 7733// var c, d, e = a(b.target || b.srcElement), 7734// f = e.closest("." + this._core.settings.itemClass), 7735// g = this._videos[f.attr("data-video")], 7736// h = g.width || "100%", 7737// i = g.height || this._core.$stage.height(); 7738// "youtube" === g.type ? c = '<iframe width="' + h + '" height="' + i + '" src="http://www.youtube.com/embed/' + g.id + "?autoplay=1&v=" + g.id + '" frameborder="0" allowfullscreen></iframe>' : "vimeo" === g.type && (c = '<iframe src="http://player.vimeo.com/video/' + g.id + '?autoplay=1" width="' + h + '" height="' + i + '" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>'), f.addClass("owl-video-playing"), this._playing = f, d = a('<div style="height:' + i + "px; width:" + h + 'px" class="owl-video-frame">' + c + "</div>"), e.after(d) 7739// }, d.prototype.isInFullScreen = function() { 7740// var d = c.fullscreenElement || c.mozFullScreenElement || c.webkitFullscreenElement; 7741// return d && a(d).parent().hasClass("owl-video-frame") && (this._core.speed(0), this._fullscreen = !0), d && this._fullscreen && this._playing ? !1 : this._fullscreen ? (this._fullscreen = !1, !1) : this._playing && this._core.state.orientation !== b.orientation ? (this._core.state.orientation = b.orientation, !1) : !0 7742// }, d.prototype.destroy = function() { 7743// var a, b; 7744// this._core.$element.off("click.owl.video"); 7745// for (a in this._handlers) this._core.$element.off(a, this._handlers[a]); 7746// for (b in Object.getOwnPropertyNames(this)) "function" != typeof this[b] && (this[b] = null) 7747// }, a.fn.owlCarousel.Constructor.Plugins.Video = d 7748// }(window.Zepto || window.jQuery, window, document), 7749// function(a, b, c, d) { 7750// var e = function(b) { 7751// this.core = b, this.core.options = a.extend({}, e.Defaults, this.core.options), this.swapping = !0, this.previous = d, this.next = d, this.handlers = { 7752// "change.owl.carousel": a.proxy(function(a) { 7753// "position" == a.property.name && (this.previous = this.core.current(), this.next = a.property.value) 7754// }, this), 7755// "drag.owl.carousel dragged.owl.carousel translated.owl.carousel": a.proxy(function(a) { 7756// this.swapping = "translated" == a.type 7757// }, this), 7758// "translate.owl.carousel": a.proxy(function() { 7759// this.swapping && (this.core.options.animateOut || this.core.options.animateIn) && this.swap() 7760// }, this) 7761// }, this.core.$element.on(this.handlers) 7762// }; 7763// e.Defaults = { 7764// animateOut: !1, 7765// animateIn: !1 7766// }, e.prototype.swap = function() { 7767// if (1 === this.core.settings.items && this.core.support3d) { 7768// this.core.speed(0); 7769// var b, c = a.proxy(this.clear, this), 7770// d = this.core.$stage.children().eq(this.previous), 7771// e = this.core.$stage.children().eq(this.next), 7772// f = this.core.settings.animateIn, 7773// g = this.core.settings.animateOut; 7774// this.core.current() !== this.previous && (g && (b = this.core.coordinates(this.previous) - this.core.coordinates(this.next), d.css({ 7775// left: b + "px" 7776// }).addClass("animated owl-animated-out").addClass(g).one("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend", c)), f && e.addClass("animated owl-animated-in").addClass(f).one("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend", c)) 7777// } 7778// }, e.prototype.clear = function(b) { 7779// a(b.target).css({ 7780// left: "" 7781// }).removeClass("animated owl-animated-out owl-animated-in").removeClass(this.core.settings.animateIn).removeClass(this.core.settings.animateOut), this.core.transitionEnd() 7782// }, e.prototype.destroy = function() { 7783// var a, b;
7784// for (a in this.handlers) this.core.$element.off(a, this.handlers[a]); 7785// for (b in Object.getOwnPropertyNames(this)) "function" != typeof this[b] && (this[b] = null) 7786// }, a.fn.owlCarousel.Constructor.Plugins.Animate = e 7787// }(window.Zepto || window.jQuery, window, document), 7788// function(a, b, c) { 7789// var d = function(b) { 7790// this.core = b, this.core.options = a.extend({}, d.Defaults, this.core.options), this.handlers = { 7791// "translated.owl.carousel refreshed.owl.carousel": a.proxy(function() { 7792// this.autoplay() 7793// }, this), 7794// "play.owl.autoplay": a.proxy(function(a, b, c) { 7795// this.play(b, c) 7796// }, this), 7797// "stop.owl.autoplay": a.proxy(function() { 7798// this.stop() 7799// }, this), 7800// "mouseover.owl.autoplay": a.proxy(function() { 7801// this.core.settings.autoplayHoverPause && this.pause() 7802// }, this), 7803// "mouseleave.owl.autoplay": a.proxy(function() { 7804// this.core.settings.autoplayHoverPause && this.autoplay() 7805// }, this) 7806// }, this.core.$element.on(this.handlers) 7807// }; 7808// d.Defaults = { 7809// autoplay: !1, 7810// autoplayTimeout: 5e3, 7811// autoplayHoverPause: !1, 7812// autoplaySpeed: !1 7813// }, d.prototype.autoplay = function() { 7814// this.core.settings.autoplay && !this.core.state.videoPlay ? (b.clearInterval(this.interval), this.interval = b.setInterval(a.proxy(function() { 7815// this.play() 7816// }, this), this.core.settings.autoplayTimeout)) : b.clearInterval(this.interval) 7817// }, d.prototype.play = function() { 7818// return c.hidden === !0 || this.core.state.isTouch || this.core.state.isScrolling || this.core.state.isSwiping || this.core.state.inMotion ? void 0 : this.core.settings.autoplay === !1 ? void b.clearInterval(this.interval) : void this.core.next(this.core.settings.autoplaySpeed) 7819// }, d.prototype.stop = function() { 7820// b.clearInterval(this.interval) 7821// }, d.prototype.pause = function() { 7822// b.clearInterval(this.interval) 7823// }, d.prototype.destroy = function() { 7824// var a, c; 7825// b.clearInterval(this.interval); 7826// for (a in this.handlers) this.core.$element.off(a, this.handlers[a]); 7827// for (c in Object.getOwnPropertyNames(this)) "function" != typeof this[c] && (this[c] = null) 7828// }, a.fn.owlCarousel.Constructor.Plugins.autoplay = d 7829// }(window.Zepto || window.jQuery, window, document), 7830// function(a) { 7831// "use strict";
7832// var b = function(c) { 7833// this._core = c, this._initialized = !1, this._pages = [], this._controls = {}, this._templates = [], this.$element = this._core.$element, this._overrides = { 7834// next: this._core.next, 7835// prev: this._core.prev, 7836// to: this._core.to 7837// }, this._handlers = { 7838// "prepared.owl.carousel": a.proxy(function(b) { 7839// this._core.settings.dotsData && this._templates.push(a(b.content).find("[data-dot]").andSelf("[data-dot]").attr("data-dot")) 7840// }, this), 7841// "add.owl.carousel": a.proxy(function(b) { 7842// this._core.settings.dotsData && this._templates.splice(b.position, 0, a(b.content).find("[data-dot]").andSelf("[data-dot]").attr("data-dot")) 7843// }, this), 7844// "remove.owl.carousel prepared.owl.carousel": a.proxy(function(a) { 7845// this._core.settings.dotsData && this._templates.splice(a.position, 1) 7846// }, this), 7847// "change.owl.carousel": a.proxy(function(a) { 7848// if ("position" == a.property.name && !this._core.state.revert && !this._core.settings.loop && this._core.settings.navRewind) { 7849// var b = this._core.current(), 7850// c = this._core.maximum(), 7851// d = this._core.minimum(); 7852// a.data = a.property.value > c ? b >= c ? d : c : a.property.value < d ? c : a.property.value 7853// } 7854// }, this), 7855// "changed.owl.carousel": a.proxy(function(a) { 7856// "position" == a.property.name && this.draw() 7857// }, this), 7858// "refreshed.owl.carousel": a.proxy(function() { 7859// this._initialized || (this.initialize(), this._initialized = !0), this._core.trigger("refresh", null, "navigation"), this.update(), this.draw(), this._core.trigger("refreshed", null, "navigation") 7860// }, this) 7861// }, this._core.options = a.extend({}, b.Defaults, this._core.options), this.$element.on(this._handlers) 7862// }; 7863// b.Defaults = { 7864// nav: !1, 7865// navRewind: !0, 7866// navText: ["prev", "next"], 7867// navSpeed: !1, 7868// navElement: "div", 7869// navContainer: !1, 7870// navContainerClass: "owl-nav", 7871// navClass: ["owl-prev", "owl-next"], 7872// slideBy: 1, 7873// dotClass: "owl-dot", 7874// dotsClass: "owl-dots", 7875// dots: !0, 7876// dotsEach: !1, 7877// dotData: !1, 7878// dotsSpeed: !1, 7879// dotsContainer: !1, 7880// controlsClass: "owl-controls" 7881// }, b.prototype.initialize = function() { 7882// var b, c, d = this._core.settings; 7883// d.dotsData || (this._templates = [a("<div>").addClass(d.dotClass).append(a("<span>")).prop("outerHTML")]), d.navContainer && d.dotsContainer || (this._controls.$container = a("<div>").addClass(d.controlsClass).appendTo(this.$element)), this._controls.$indicators = d.dotsContainer ? a(d.dotsContainer) : a("<div>").hide().addClass(d.dotsClass).appendTo(this._controls.$container), this._controls.$indicators.on("click", "div", a.proxy(function(b) { 7884// var c = a(b.target).parent().is(this._controls.$indicators) ? a(b.target).index() : a(b.target).parent().index(); 7885// b.preventDefault(), this.to(c, d.dotsSpeed) 7886// }, this)), b = d.navContainer ? a(d.navContainer) : a("<div>").addClass(d.navContainerClass).prependTo(this._controls.$container), this._controls.$next = a("<" + d.navElement + ">"), this._controls.$previous = this._controls.$next.clone(), this._controls.$previous.addClass(d.navClass[0]).html(d.navText[0]).hide().prependTo(b).on("click", a.proxy(function() { 7887// this.prev(d.navSpeed) 7888// }, this)), this._controls.$next.addClass(d.navClass[1]).html(d.navText[1]).hide().appendTo(b).on("click", a.proxy(function() { 7889// this.next(d.navSpeed) 7890// }, this)); 7891// for (c in this._overrides) this._core[c] = a.proxy(this[c], this) 7892// }, b.prototype.destroy = function() { 7893// var a, b, c, d; 7894// for (a in this._handlers) this.$element.off(a, this._handlers[a]); 7895// for (b in this._controls) this._controls[b].remove(); 7896// for (d in this.overides) this._core[d] = this._overrides[d]; 7897// for (c in Object.getOwnPropertyNames(this)) "function" != typeof this[c] && (this[c] = null) 7898// }, b.prototype.update = function() { 7899// var a, b, c, d = this._core.settings, 7900// e = this._core.clones().length / 2, 7901// f = e + this._core.items().length, 7902// g = d.center || d.autoWidth || d.dotData ? 1 : d.dotsEach || d.items; 7903// if ("page" !== d.slideBy && (d.slideBy = Math.min(d.slideBy, d.items)), d.dots || "page" == d.slideBy) 7904// for (this._pages = [], a = e, b = 0, c = 0; f > a; a++)(b >= g || 0 === b) && (this._pages.push({ 7905// start: a - e, 7906// end: a - e + g - 1 7907// }), b = 0, ++c), b += this._core.mergers(this._core.relative(a)) 7908// }, b.prototype.draw = function() { 7909// var b, c, d = "", 7910// e = this._core.settings, 7911// f = (this._core.$stage.children(), this._core.relative(this._core.current())); 7912// if (!e.nav || e.loop || e.navRewind || (this._controls.$previous.toggleClass("disabled", 0 >= f), this._controls.$next.toggleClass("disabled", f >= this._core.maximum())), this._controls.$previous.toggle(e.nav), this._controls.$next.toggle(e.nav), e.dots) { 7913// if (b = this._pages.length - this._controls.$indicators.children().length, e.dotData && 0 !== b) { 7914// for (c = 0; c < this._controls.$indicators.children().length; c++) d += this._templates[this._core.relative(c)]; 7915// this._controls.$indicators.html(d) 7916// } else b > 0 ? (d = new Array(b + 1).join(this._templates[0]), this._controls.$indicators.append(d)) : 0 > b && this._controls.$indicators.children().slice(b).remove(); 7917// this._controls.$indicators.find(".active").removeClass("active"), this._controls.$indicators.children().eq(a.inArray(this.current(), this._pages)).addClass("active") 7918// } 7919// this._controls.$indicators.toggle(e.dots) 7920// }, b.prototype.onTrigger = function(b) { 7921// var c = this._core.settings; 7922// b.page = { 7923// index: a.inArray(this.current(), this._pages), 7924// count: this._pages.length, 7925// size: c && (c.center || c.autoWidth || c.dotData ? 1 : c.dotsEach || c.items) 7926// } 7927// }, b.prototype.current = function() { 7928// var b = this._core.relative(this._core.current()); 7929// return a.grep(this._pages, function(a) { 7930// return a.start <= b && a.end >= b 7931// }).pop() 7932// }, b.prototype.getPosition = function(b) { 7933// var c, d, e = this._core.settings; 7934// return "page" == e.slideBy ? (c = a.inArray(this.current(), this._pages), d = this._pages.length, b ? ++c : --c, c = this._pages[(c % d + d) % d].start) : (c = this._core.relative(this._core.current()), d = this._core.items().length, b ? c += e.
7934slideBy : c -= e.slideBy), c 7935// }, b.prototype.next = function(b) { 7936// a.proxy(this._overrides.to, this._core)(this.getPosition(!0), b) 7937// }, b.prototype.prev = function(b) { 7938// a.proxy(this._overrides.to, this._core)(this.getPosition(!1), b) 7939// }, b.prototype.to = function(b, c, d) { 7940// var e; 7941// d ? a.proxy(this._overrides.to, this._core)(b, c) : (e = this._pages.length, a.proxy(this._overrides.to, this._core)(this._pages[(b % e + e) % e].start, c)) 7942// }, a.fn.owlCarousel.Constructor.Plugins.Navigation = b 7943// }(window.Zepto || window.jQuery, window, document), 7944// function(a, b) { 7945// "use strict"; 7946// var c = function(d) { 7947// this._core = d, this._hashes = {}, this.$element = this._core.$element, this._handlers = { 7948// "initialized.owl.carousel": a.proxy(function() { 7949// "URLHash" == this._core.settings.startPosition && a(b).trigger("hashchange.owl.navigation") 7950// }, this), 7951// "prepared.owl.carousel": a.proxy(function(b) { 7952// var c = a(b.content).find("[data-hash]").andSelf("[data-hash]").attr("data-hash"); 7953// this._hashes[c] = b.content 7954// }, this) 7955// }, this._core.options = a.extend({}, c.Defaults, this._core.options), this.$element.on(this._handlers), a(b).on("hashchange.owl.navigation", a.proxy(function() { 7956// var a = b.location.hash.substring(1), 7957// c = this._core.$stage.children(), 7958// d = this._hashes[a] && c.index(this._hashes[a]) || 0; 7959// return a ? void this._core.to(d, !1, !0) : !1 7960// }, this)) 7961// }; 7962// c.Defaults = { 7963// URLhashListener: !1 7964// }, c.prototype.destroy = function() { 7965// var c, d; 7966// a(b).off("hashchange.owl.navigation"); 7967// for (c in this._handlers) this._core.$element.off(c, this._handlers[c]); 7968// for (d in Object.getOwnPropertyNames(this)) "function" != typeof this[d] && (this[d] = null) 7969// }, a.fn.owlCarousel.Constructor.Plugins.Hash = c 7970// }(window.Zepto || window.jQuery, window, document); 7971 7972 7973 7974 7975 7976 7977 7978 7979 7980/* SWFObject v2.2 <http://code.google.com/p/swfobject/> 7981 is released under the MIT License <http://www.opensource.org/licenses/mit-license.php> 7982*/ 7983var swfobject = function() { 7984 var D = "undefined", 7985 r = "object", 7986 S = "Shockwave Flash", 7987 W = "ShockwaveFlash.ShockwaveFlash", 7988 q = "application/x-shockwave-flash", 7989 R = "SWFObjectExprInst", 7990 x = "onreadystatechange", 7991 O = window, 7992 j = document, 7993 t = navigator, 7994 T = false, 7995 U = [h], 7996 o = [], 7997 N = [], 7998 I = [], 7999 l, Q, E, B, J = false, 8000 a = false, 8001 n, G, m = true, 8002 M = function() { 8003 var aa = typeof j.getElementById != D && typeof j.getElementsByTagName != D && typeof j.createElement != D, 8004 ah = t.userAgent.toLowerCase(), 8005 Y = t.platform.toLowerCase(), 8006 ae = Y ? /win/.test(Y) : /win/.test(ah), 8007 ac = Y ? /mac/.test(Y) : /mac/.test(ah), 8008 af = /webkit/.test(ah) ? parseFloat(ah.replace(/^.*webkit\/(\d+(\.\d+)?).*$/, "$1")) : false, 8009 X = !+"\v1", 8010 ag = [0, 0, 0], 8011 ab = null; 8012 if (typeof t.plugins != D && typeof t.plugins[S] == r) { 8013 ab = t.plugins[S].description; 8014 if (ab && !(typeof t.mimeTypes != D && t.mimeTypes[q] && !t.mimeTypes[q].enabledPlugin)) { 8015 T = true; 8016 X = false; 8017 ab = ab.replace(/^.*\s+(\S+\s+\S+$)/, "$1"); 8018 ag[0] = parseInt(ab.replace(/^(.*)\..*$/, "$1"), 10); 8019 ag[1] = parseInt(ab.replace(/^.*\.(.*)\s.*$/, "$1"), 10); 8020 ag[2] = /[a-zA-Z]/.test(ab) ? parseInt(ab.replace(/^.*[a-zA-Z]+(.*)$/, "$1"), 10) : 0; 8021 } 8022 } else { 8023 if (typeof O.ActiveXObject != D) { 8024 try { 8025 var ad = new ActiveXObject(W); 8026 if (ad) { 8027 ab = ad.GetVariable("$version"); 8028 if (ab) { 8029 X = true; 8030 ab = ab.split(" ")[1].split(","); 8031 ag = [parseInt(ab[0], 10), parseInt(ab[1], 10), parseInt(ab[2], 10)]; 8032 } 8033 } 8034 } catch (Z) {} 8035 } 8036 } 8037 return { 8038 w3: aa, 8039 pv: ag, 8040 wk: af, 8041 ie: X, 8042 win: ae, 8043 mac: ac 8044 }; 8045 }(), 8046 k = function() { 8047 if (!M.w3) { 8048 return; 8049 } 8050 if ((typeof j.readyState != D && j.readyState == "complete") || (typeof j.readyState == D && (j.getElementsByTagName("body")[0] || j.body))) { 8051 f(); 8052 } 8053 if (!J) { 8054 if (typeof j.addEventListener != D) { 8055 j.addEventListener("DOMContentLoaded", f, false); 8056 } 8057 if (M.ie && M.win) { 8058 j.attachEvent(x, function() { 8059 if (j.readyState == "complete") { 8060 j.detachEvent(x, arguments.callee); 8061 f(); 8062 } 8063 }); 8064 if (O == top) { 8065 (function() { 8066 if (J) { 8067 return; 8068 } 8069 try { 8070 j.documentElement.doScroll("left"); 8071 } catch (X) { 8072 setTimeout(arguments.callee, 0); 8073 return; 8074 } 8075 f(); 8076 })(); 8077 } 8078 } 8079 if (M.wk) { 8080 (function() { 8081 if (J) { 8082 return; 8083 } 8084 if (!/loaded|complete/.test(j.readyState)) { 8085 setTimeout(arguments.callee, 0); 8086 return; 8087 } 8088 f(); 8089 })(); 8090 } 8091 s(f); 8092 } 8093 }(); 8094 8095 function f() { 8096 if (J) { 8097 return; 8098 } 8099 try { 8100 var Z = j.getElementsByTagName("body")[0].appendChild(C("span")); 8101 Z.parentNode.removeChild(Z); 8102 } catch (aa) { 8103 return; 8104 } 8105 J = true; 8106 var X = U.length; 8107 for (var Y = 0; Y < X; Y++) { 8108 U[Y](); 8109 } 8110 } 8111 8112 function K(X) { 8113 if (J) { 8114 X(); 8115 } else { 8116 U[U.length] = X; 8117 } 8118 } 8119 8120 function s(Y) { 8121 if (typeof O.addEventListener != D) { 8122 O.addEventListener("load", Y, false); 8123 } else { 8124 if (typeof j.addEventListener != D) { 8125 j.addEventListener("load", Y, false); 8126 } else { 8127 if (typeof O.attachEvent != D) { 8128 i(O, "onload", Y); 8129 } else { 8130 if (typeof O.onload == "function") { 8131 var X = O.onload; 8132 O.onload = function() { 8133 X(); 8134 Y(); 8135 }; 8136 } else { 8137 O.onload = Y; 8138 } 8139 } 8140 } 8141 } 8142 } 8143 8144 function h() { 8145 if (T) { 8146 V(); 8147 } else { 8148 H(); 8149 } 8150 } 8151 8152 function V() { 8153 var X = j.getElementsByTagName("body")[0]; 8154 var aa = C(r); 8155 aa.setAttribute("type", q); 8156 var Z = X.appendChild(aa); 8157 if (Z) { 8158 var Y = 0; 8159 (function() { 8160 if (typeof Z.GetVariable != D) { 8161 var ab = Z.GetVariable("$version"); 8162 if (ab) { 8163 ab = ab.split(" ")[1].split(","); 8164 M.pv = [parseInt(ab[0], 10), parseInt(ab[1], 10), parseInt(ab[2], 10)]; 8165 } 8166 } else { 8167 if (Y < 10) { 8168 Y++; 8169 setTimeout(arguments.callee, 10); 8170 return; 8171 } 8172 } 8173 X.removeChild(aa); 8174 Z = null; 8175 H(); 8176 })(); 8177 } else { 8178 H(); 8179 } 8180 } 8181 8182 function H() { 8183 var ag = o.length; 8184 if (ag > 0) { 8185 for (var af = 0; af < ag; af++) { 8186 var Y = o[af].id; 8187 var ab = o[af].callbackFn; 8188 var aa = { 8189 success: false, 8190 id: Y 8191 }; 8192 if (M.pv[0] > 0) { 8193 var ae = c(Y); 8194 if (ae) { 8195 if (F(o[af].swfVersion) && !(M.wk && M.wk < 312)) { 8196 w(Y, true); 8197 if (ab) { 8198 aa.success = true; 8199 aa.ref = z(Y); 8200 ab(aa); 8201 } 8202 } else { 8203 if (o[af].expressInstall && A()) { 8204 var ai = {}; 8205 ai.data = o[af].expressInstall; 8206 ai.width = ae.getAttribute("width") || "0"; 8207 ai.height = ae.getAttribute("height") || "0"; 8208 if (ae.getAttribute("class")) { 8209 ai.styleclass = ae.getAttribute("class"); 8210 } 8211 if (ae.getAttribute("align")) { 8212 ai.align = ae.getAttribute("align"); 8213 } 8214 var ah = {}; 8215 var X = ae.getElementsByTagName("param"); 8216 var ac = X.length; 8217 for (var ad = 0; ad < ac; ad++) { 8218 if (X[ad].getAttribute("name").toLowerCase() != "movie") { 8219 ah[X[ad].getAttribute("name")] = X[ad].getAttribute("value"); 8220 } 8221 } 8222 P(ai, ah, Y, ab); 8223 } else { 8224 p(ae); 8225 if (ab) { 8226 ab(aa); 8227 } 8228 } 8229 } 8230 } 8231 } else { 8232 w(Y, true); 8233 if (ab) { 8234 var Z = z(Y); 8235 if (Z && typeof Z.SetVariable != D) { 8236 aa.success = true; 8237 aa.ref = Z; 8238 } 8239 ab(aa); 8240 } 8241 } 8242 } 8243 } 8244 } 8245 8246 function z(aa) { 8247 var X = null; 8248 var Y = c(aa); 8249 if (Y && Y.nodeName == "OBJECT") { 8250 if (typeof Y.SetVariable != D) { 8251 X = Y; 8252 } else { 8253 var Z = Y.getElementsByTagName(r)[0]; 8254 if (Z) { 8255 X = Z; 8256 } 8257 } 8258 } 8259 return X; 8260 } 8261 8262 function A() { 8263 return !a && F("6.0.65") && (M.win || M.mac) && !(M.wk && M.wk < 312); 8264 } 8265 8266 function P(aa, ab, X, Z) { 8267 a = true; 8268 E = Z || null; 8269 B = { 8270 success: false, 8271 id: X 8272 }; 8273 var ae = c(X); 8274 if (ae) { 8275 if (ae.nodeName == "OBJECT") { 8276 l = g(ae); 8277 Q = null; 8278 } else { 8279 l = ae; 8280 Q = X; 8281 } 8282 aa.id = R; 8283 if (typeof aa.width == D || (!/%$/.test(aa.width) && parseInt(aa.width, 10) < 310)) { 8284 aa.width = "310"; 8285 } 8286 if (typeof aa.height == D || (!/%$/.test(aa.height) && parseInt(aa.height, 10) < 137)) { 8287 aa.height = "137"; 8288 } 8289 j.title = j.title.slice(0, 47) + " - Flash Player Installation"; 8290 var ad = M.ie && M.win ? "ActiveX" : "PlugIn", 8291 ac = "MMredirectURL=" + O.location.toString().replace(/&/g, "%26") + "&MMplayerType=" + ad + "&MMdoctitle=" + j.title; 8292 if (typeof ab.flashvars != D) { 8293 ab.flashvars += "&" + ac; 8294 } else { 8295 ab.flashvars = ac; 8296 } if (M.ie && M.win && ae.readyState != 4) { 8297 var Y = C("div"); 8298 X += "SWFObjectNew"; 8299 Y.setAttribute("id", X); 8300 ae.parentNode.insertBefore(Y, ae); 8301 ae.style.display = "none"; 8302 (function() { 8303 if (ae.readyState == 4) { 8304 ae.parentNode.removeChild(ae); 8305 } else { 8306 setTimeout(arguments.callee, 10); 8307 } 8308 })(); 8309 } 8310 u(aa, ab, X); 8311 } 8312 } 8313 8314 function p(Y) { 8315 if (M.ie && M.win && Y.readyState != 4) { 8316 var X = C("div"); 8317 Y.parentNode.insertBefore(X, Y); 8318 X.parentNode.replaceChild(g(Y), X); 8319 Y.style.display = "none"; 8320 (function() { 8321 if (Y.readyState == 4) { 8322 Y.parentNode.removeChild(Y); 8323 } else { 8324 setTimeout(arguments.callee, 10); 8325 } 8326 })(); 8327 } else { 8328 Y.parentNode.replaceChild(g(Y), Y); 8329 } 8330 } 8331 8332 function g(ab) { 8333 var aa = C("div"); 8334 if (M.win && M.ie) { 8335 aa.innerHTML = ab.innerHTML; 8336 } else { 8337 var Y = ab.getElementsByTagName(r)[0]; 8338 if (Y) { 8339 var ad = Y.childNodes; 8340 if (ad) { 8341 var X = ad.length; 8342 for (var Z = 0; Z < X; Z++) { 8343 if (!(ad[Z].nodeType == 1 && ad[Z].nodeName == "PARAM") && !(ad[Z].nodeType == 8)) { 8344 aa.appendChild(ad[Z].cloneNode(true)); 8345 } 8346 } 8347 } 8348 } 8349 } 8350 return aa; 8351 } 8352 8353 function u(ai, ag, Y) { 8354 var X, aa = c(Y); 8355 if (M.wk && M.wk < 312) { 8356 return X; 8357 } 8358 if (aa) { 8359 if (typeof ai.id == D) { 8360 ai.id = Y; 8361 } 8362 if (M.ie && M.win) { 8363 var ah = ""; 8364 for (var ae in ai) { 8365 if (ai[ae] != Object.prototype[ae]) { 8366 if (ae.toLowerCase() == "data") { 8367 ag.movie = ai[ae]; 8368 } else { 8369 if (ae.toLowerCase() == "styleclass") { 8370 ah += ' class="' + ai[ae] + '"'; 8371 } else { 8372 if (ae.toLowerCase() != "classid") { 8373 ah += " " + ae + '="' + ai[ae] + '"'; 8374 } 8375 } 8376 } 8377 } 8378 } 8379 var af = ""; 8380 for (var ad in ag) { 8381 if (ag[ad] != Object.prototype[ad]) { 8382 af += '<param name="' + ad + '" value="' + ag[ad] + '" />'; 8383 } 8384 } 8385 aa.outerHTML = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"' + ah + ">" + af + "</object>"; 8386 N[N.length] = ai.id; 8387 X = c(ai.id); 8388 } else { 8389 var Z = C(r); 8390 Z.setAttribute("type", q); 8391 for (var ac in ai) { 8392 if (ai[ac] != Object.prototype[ac]) {
8392 8393 if (ac.toLowerCase() == "styleclass") { 8394 Z.setAttribute("class", ai[ac]); 8395 } else { 8396 if (ac.toLowerCase() != "classid") { 8397 Z.setAttribute(ac, ai[ac]); 8398 } 8399 } 8400 } 8401 } 8402 for (var ab in ag) { 8403 if (ag[ab] != Object.prototype[ab] && ab.toLowerCase() != "movie") { 8404 e(Z, ab, ag[ab]); 8405 } 8406 } 8407 aa.parentNode.replaceChild(Z, aa); 8408 X = Z; 8409 } 8410 } 8411 return X; 8412 } 8413 8414 function e(Z, X, Y) { 8415 var aa = C("param"); 8416 aa.setAttribute("name", X); 8417 aa.setAttribute("value", Y); 8418 Z.appendChild(aa); 8419 } 8420 8421 function y(Y) { 8422 var X = c(Y); 8423 if (X && X.nodeName == "OBJECT") { 8424 if (M.ie && M.win) { 8425 X.style.display = "none"; 8426 (function() { 8427 if (X.readyState == 4) { 8428 b(Y); 8429 } else { 8430 setTimeout(arguments.callee, 10); 8431 } 8432 })(); 8433 } else { 8434 X.parentNode.removeChild(X); 8435 } 8436 } 8437 } 8438 8439 function b(Z) { 8440 var Y = c(Z); 8441 if (Y) { 8442 for (var X in Y) { 8443 if (typeof Y[X] == "function") { 8444 Y[X] = null; 8445 } 8446 } 8447 Y.parentNode.removeChild(Y); 8448 } 8449 } 8450 8451 function c(Z) { 8452 var X = null; 8453 try { 8454 X = j.getElementById(Z); 8455 } catch (Y) {} 8456 return X; 8457 } 8458 8459 function C(X) { 8460 return j.createElement(X); 8461 } 8462 8463 function i(Z, X, Y) { 8464 Z.attachEvent(X, Y); 8465 I[I.length] = [Z, X, Y]; 8466 } 8467 8468 function F(Z) { 8469 var Y = M.pv, 8470 X = Z.split("."); 8471 X[0] = parseInt(X[0], 10); 8472 X[1] = parseInt(X[1], 10) || 0; 8473 X[2] = parseInt(X[2], 10) || 0; 8474 return (Y[0] > X[0] || (Y[0] == X[0] && Y[1] > X[1]) || (Y[0] == X[0] && Y[1] == X[1] && Y[2] >= X[2])) ? true : false; 8475 } 8476 8477 function v(ac, Y, ad, ab) { 8478 if (M.ie && M.mac) { 8479 return; 8480 } 8481 var aa = j.getElementsByTagName("head")[0]; 8482 if (!aa) { 8483 return; 8484 } 8485 var X = (ad && typeof ad == "string") ? ad : "screen"; 8486 if (ab) { 8487 n = null; 8488 G = null; 8489 } 8490 if (!n || G != X) { 8491 var Z = C("style"); 8492 Z.setAttribute("type", "text/css"); 8493 Z.setAttribute("media", X); 8494 n = aa.appendChild(Z); 8495 if (M.ie && M.win && typeof j.styleSheets != D && j.styleSheets.length > 0) { 8496 n = j.styleSheets[j.styleSheets.length - 1]; 8497 } 8498 G = X; 8499 } 8500 if (M.ie && M.win) { 8501 if (n && typeof n.addRule == r) { 8502 n.addRule(ac, Y); 8503 } 8504 } else { 8505 if (n && typeof j.createTextNode != D) { 8506 n.appendChild(j.createTextNode(ac + " {" + Y + "}")); 8507 } 8508 } 8509 } 8510 8511 function w(Z, X) { 8512 if (!m) { 8513 return; 8514 } 8515 var Y = X ? "visible" : "hidden"; 8516 if (J && c(Z)) { 8517 c(Z).style.visibility = Y; 8518 } else { 8519 v("#" + Z, "visibility:" + Y); 8520 } 8521 } 8522 8523 function L(Y) { 8524 var Z = /[\\\"<>\.;]/; 8525 var X = Z.exec(Y) !== null; 8526 return X && typeof encodeURIComponent != D ? encodeURIComponent(Y) : Y; 8527 } 8528 var d = function() { 8529 if (M.ie && M.win) { 8530 window.attachEvent("onunload", function() { 8531 var ac = I.length; 8532 for (var ab = 0; ab < ac; ab++) { 8533 I[ab][0].detachEvent(I[ab][1], I[ab][2]); 8534 } 8535 var Z = N.length; 8536 for (var aa = 0; aa < Z; aa++) { 8537 y(N[aa]); 8538 } 8539 for (var Y in M) { 8540 M[Y] = null; 8541 } 8542 M = null; 8543 for (var X in swfobject) { 8544 swfobject[X] = null; 8545 } 8546 swfobject = null; 8547 }); 8548 } 8549 }(); 8550 return { 8551 registerObject: function(ab, X, aa, Z) {
8552 if (M.w3 && ab && X) { 8553 var Y = {}; 8554 Y.id = ab; 8555 Y.swfVersion = X; 8556 Y.expressInstall = aa; 8557 Y.callbackFn = Z; 8558 o[o.length] = Y; 8559 w(ab, false); 8560 } else { 8561 if (Z) { 8562 Z({ 8563 success: false, 8564 id: ab 8565 }); 8566 } 8567 } 8568 }, 8569 getObjectById: function(X) { 8570 if (M.w3) { 8571 return z(X); 8572 } 8573 }, 8574 embedSWF: function(ab, ah, ae, ag, Y, aa, Z, ad, af, ac) { 8575 var X = { 8576 success: false, 8577 id: ah 8578 }; 8579 if (M.w3 && !(M.wk && M.wk < 312) && ab && ah && ae && ag && Y) { 8580 w(ah, false); 8581 K(function() { 8582 ae += ""; 8583 ag += ""; 8584 var aj = {}; 8585 if (af && typeof af === r) { 8586 for (var al in af) { 8587 aj[al] = af[al]; 8588 } 8589 } 8590 aj.data = ab; 8591 aj.width = ae; 8592 aj.height = ag; 8593 var am = {}; 8594 if (ad && typeof ad === r) { 8595 for (var ak in ad) { 8596 am[ak] = ad[ak]; 8597 } 8598 } 8599 if (Z && typeof Z === r) { 8600 for (var ai in Z) { 8601 if (typeof am.flashvars != D) { 8602 am.flashvars += "&" + ai + "=" + Z[ai]; 8603 } else { 8604 am.flashvars = ai + "=" + Z[ai]; 8605 } 8606 } 8607 } 8608 if (F(Y)) { 8609 var an = u(aj, am, ah); 8610 if (aj.id == ah) { 8611 w(ah, true); 8612 } 8613 X.success = true; 8614 X.ref = an; 8615 } else { 8616 if (aa && A()) { 8617 aj.data = aa; 8618 P(aj, am, ah, ac); 8619 return; 8620 } else { 8621 w(ah, true); 8622 } 8623 } if (ac) { 8624 ac(X); 8625 } 8626 }); 8627 } else { 8628 if (ac) { 8629 ac(X); 8630 } 8631 } 8632 }, 8633 switchOffAutoHideShow: function() { 8634 m = false; 8635 }, 8636 ua: M, 8637 getFlashPlayerVersion: function() { 8638 return { 8639 major: M.pv[0], 8640 minor: M.pv[1], 8641 release: M.pv[2] 8642 }; 8643 }, 8644 hasFlashPlayerVersion: F, 8645 createSWF: function(Z, Y, X) { 8646 if (M.w3) { 8647 return u(Z, Y, X); 8648 } else { 8649 return undefined; 8650 } 8651 }, 8652 showExpressInstall: function(Z, aa, X, Y) { 8653 if (M.w3 && A()) { 8654 P(Z, aa, X, Y); 8655 } 8656 }, 8657 removeSWF: function(X) { 8658 if (M.w3) { 8659 y(X); 8660 } 8661 }, 8662 createCSS: function(aa, Z, Y, X) { 8663 if (M.w3) { 8664 v(aa, Z, Y, X); 8665 } 8666 }, 8667 addDomLoadEvent: K, 8668 addLoadEvent: s, 8669 getQueryParamValue: function(aa) { 8670 var Z = j.location.search || j.location.hash; 8671 if (Z) { 8672 if (/\?/.test(Z)) { 8673 Z = Z.split("?")[1]; 8674 } 8675 if (aa === null) { 8676 return L(Z); 8677 } 8678 var Y = Z.split("&"); 8679 for (var X = 0; X < Y.length; X++) { 8680 if (Y[X].substring(0, Y[X].indexOf("=")) == aa) { 8681 return L(Y[X].substring((Y[X].indexOf("=") + 1))); 8682 } 8683 } 8684 } 8685 return ""; 8686 }, 8687 expressInstallCallback: function() { 8688 if (a) { 8689 var X = c(R); 8690 if (X && l) { 8691 X.parentNode.replaceChild(l, X); 8692 if (Q) { 8693 w(Q, true); 8694 if (M.ie && M.win) { 8695 l.style.display = "block"; 8696 } 8697 } 8698 if (E) { 8699 E(B); 8700 } 8701 } 8702 a = false;
8703 } 8704 } 8705 }; 8706}(); 8707 8708 8709/*! jQuery TubePlayer - v1.1.6 - 2013-06-04 8710 * https://github.com/nirvanatikku/jQuery-TubePlayer-Plugin 8711 * Copyright (c) 2013 Nirvana Tikku; Licensed MIT */ 8712(function(e) { 8713 "use strict"; 8714 8715 function t() { 8716 return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(e) { 8717 var t = 0 | 16 * Math.random(), 8718 a = "x" == e ? t : 8 | 3 & t; 8719 return a.toString(16); 8720 }); 8721 } 8722 var a = ".tubeplayer", 8723 r = "jquery-youtube-tubeplayer", 8724 n = "opts" + a, 8725 o = { 8726 inited: !1, 8727 ytplayers: {}, 8728 inits: [], 8729 iframeScriptInited: !1, 8730 State: { 8731 UNSTARTED: -1, 8732 ENDED: 0, 8733 PLAYING: 1, 8734 PAUSED: 2, 8735 BUFFERING: 3, 8736 CUED: 5 8737 }, 8738 Error: { 8739 BAD_INIT: 0, 8740 INVALID_PARAM: 2, 8741 NOT_FOUND: 100, 8742 NOT_EMBEDDABLE: 101, 8743 CANT_PLAY: 150 8744 } 8745 }; 8746 e.tubeplayer = { 8747 events: {}, 8748 TubePlayer: o 8749 }, e.tubeplayer.defaults = { 8750 afterReady: function() {}, 8751 stateChange: function(t) { 8752 var a = this.onPlayer; 8753 return function(r) { 8754 var n = e("#" + t).parent(); 8755 switch ("object" == typeof r && (r = r.data), r) { 8756 case o.State.UNSTARTED: 8757 return a.unstarted[t].call(n); 8758 case o.State.ENDED: 8759 return a.ended[t].call(n); 8760 case o.State.PLAYING: 8761 return a.playing[t].call(n); 8762 case o.State.PAUSED: 8763 return a.paused[t].call(n); 8764 case o.State.BUFFERING: 8765 return a.buffering[t].call(n); 8766 case o.State.CUED: 8767 return a.cued[t].call(n); 8768 default: 8769 return null; 8770 } 8771 }; 8772 }, 8773 onError: function(t) { 8774 var a = this.onErr; 8775 return function(r) { 8776 var n = e("#" + t).parent(); 8777 switch ("object" == typeof r && (r = r.data), r) { 8778 case o.Error.BAD_INIT: 8779 case o.Error.INVALID_PARAM: 8780 return a.invalidParameter[t].call(n); 8781 case o.Error.NOT_FOUND: 8782 return a.notFound[t].call(n); 8783 case o.Error.NOT_EMBEDDABLE: 8784 case o.Error.CANT_PLAY: 8785 return a.notEmbeddable[t].call(n); 8786 default: 8787 return a.defaultError[t].call(n); 8788 } 8789 }; 8790 }, 8791 qualityChange: function(t) { 8792 var a = this; 8793 return function(r) { 8794 var n = e("#" + t).parent(); 8795 return "object" == typeof r && (r = r.data), a.onQualityChange[t].call(n, r); 8796 }; 8797 }, 8798 onQualityChange: {}, 8799 onPlayer: { 8800 unstarted: {}, 8801 ended: {}, 8802 playing: {}, 8803 paused: {}, 8804 buffering: {}, 8805 cued: {} 8806 }, 8807 onErr: { 8808 defaultError: {}, 8809 notFound: {}, 8810 notEmbeddable: {}, 8811 invalidParameter: {} 8812 } 8813 }; 8814 var l = { 8815 width: 425, 8816 height: 355, 8817 allowFullScreen: "true", 8818 initialVideo: "DkoeNLuMbcI", 8819 start: 0, 8820 preferredQuality: "auto", 8821 showControls: !0, 8822 showRelated: !1, 8823 playsinline: !1, 8824 annotations: !0, 8825 autoPlay: !1, 8826 autoHide: !0, 8827 loop: 0, 8828 theme: "dark", 8829 color: "red", 8830 showinfo: !1, 8831 modestbranding: !0, 8832 protocol: "http", 8833 wmode: "transparent", 8834 swfobjectURL: "ajax.googleapis.com/ajax/libs/swfobject/2.2/swfobject.js", 8835 loadSWFObject: !1, 8836 allowScriptAccess: "always", 8837 playerID: "tubeplayer-player-container", 8838 iframed: !0, 8839 onPlay: function() {}, 8840 onPause: function() {}, 8841 onStop: function() {}, 8842 onSeek: function() {}, 8843 onMute: function() {}, 8844 onUnMute: function() {}, 8845 onPlayerUnstarted: function() {}, 8846 onPlayerEnded: function() {}, 8847 onPlayerPlaying: function() {}, 8848 onPlayerPaused: function() {},
8849 onPlayerBuffering: function() {}, 8850 onPlayerCued: function() {}, 8851 onQualityChange: function() {}, 8852 onError: function() {}, 8853 onErrorNotFound: function() {}, 8854 onErrorNotEmbeddable: function() {}, 8855 onErrorInvalidParameter: function() {} 8856 }; 8857 e.fn.tubeplayer = function(t, r) { 8858 var n = e(this), 8859 l = typeof t; 8860 return 0 === arguments.length || "object" === l ? n.each(function() { 8861 o.init(e(this), t); 8862 }) : "string" === l ? n.triggerHandler(t + a, r !== void 0 ? r : null) : void 0; 8863 }; 8864 var i = function(e) { 8865 return function(t, a) { 8866 var r = o.getPkg(t); 8867 if (r.ytplayer) { 8868 var n = e(t, a, r); 8869 return n === void 0 && (n = r.$player), n; 8870 } 8871 return r.$player; 8872 }; 8873 }; 8874 e.tubeplayer.getPlayers = function() { 8875 return o.ytplayers; 8876 }, o.init = function(i, d) { 8877 if (i.hasClass(r)) return i; 8878 var y = e.extend({}, l, d); 8879 y.playerID += "-" + t(), i.addClass(r).data(n, y); 8880 for (var s in u) i.bind(s + a, i, u[s]); 8881 return o.initDefaults(e.tubeplayer.defaults, y), e("<div></div>").attr("id", y.playerID).appendTo(i), o.initPlayer(i, y), i; 8882 }, o.getPkg = function(e) { 8883 var t = e.data, 8884 a = t.data(n), 8885 r = o.ytplayers[a.playerID]; 8886 return { 8887 $player: t, 8888 opts: a, 8889 ytplayer: r 8890 }; 8891 }, o.iframeReady = function(t) { 8892 return o.inits.push(function() { 8893 new YT.Player(t.playerID, { 8894 videoId: t.initialVideo, 8895 width: t.width, 8896 height: t.height, 8897 playerVars: { 8898 autoplay: t.autoPlay ? 1 : 0, 8899 autohide: t.autoHide ? 1 : 0, 8900 controls: t.showControls ? 1 : 0, 8901 loop: t.loop ? 1 : 0, 8902 playlist: t.loop ? t.initialVideo : "", 8903 rel: t.showRelated ? 1 : 0, 8904 fs: t.allowFullScreen ? 1 : 0, 8905 wmode: t.wmode, 8906 showinfo: t.showinfo ? 1 : 0, 8907 modestbranding: t.modestbranding ? 1 : 0, 8908 iv_load_policy: t.annotations ? 1 : 3, 8909 start: t.start, 8910 theme: t.theme, 8911 color: t.color, 8912 playsinline: t.playsinline 8913 }, 8914 events: { 8915 onReady: function(a) { 8916 o.ytplayers[t.playerID] = a.target; 8917 var n = e(a.target.getIframe()).parents("." + r); 8918 e.tubeplayer.defaults.afterReady(n); 8919 }, 8920 onPlaybackQualityChange: e.tubeplayer.defaults.qualityChange(t.playerID), 8921 onStateChange: e.tubeplayer.defaults.stateChange(t.playerID), 8922 onError: e.tubeplayer.defaults.onError(t.playerID) 8923 } 8924 }); 8925 }), o.inits.length >= 1 && !o.inited ? function() { 8926 for (var e = 0; o.inits.length > e; e++) o.inits[e](); 8927 o.inited = !0; 8928 } : (o.inited && o.inits.pop()(), window.onYouTubePlayerAPIReady); 8929 }, o.initDefaults = function(e, t) { 8930 var a = t.playerID, 8931 r = e.onPlayer; 8932 r.unstarted[a] = t.onPlayerUnstarted, r.ended[a] = t.onPlayerEnded, r.playing[a] = t.onPlayerPlaying, r.paused[a] = t.onPlayerPaused, r.buffering[a] = t.onPlayerBuffering, r.cued[a] = t.onPlayerCued, e.onQualityChange[a] = t.onQualityChange; 8933 var n = e.onErr; 8934 n.defaultError[a] = t.onError, n.notFound[a] = t.onErrorNotFound, n.notEmbeddable[a] = t.onErrorNotEmbeddable, n.invalidParameter[a] = t.onErrorInvalidParameter; 8935 }, o.initPlayer = function(e, t) { 8936 t.iframed ? o.initIframePlayer(e, t) : o.initFlashPlayer(e, t); 8937 }, o.initIframePlayer = function(e, t) { 8938 if (!o.iframeScriptInited) { 8939 var a = document.createElement("script"); 8940 a.src = t.protocol + "://www.youtube.com/iframe_api"; 8941 var r = document.getElementsByTagName("script")[0]; 8942 r.parentNode.insertBefore(a, r), o.iframeScriptInited = !0; 8943 } 8944 window.onYouTubePlayerAPIReady = o.iframeReady(t); 8945 }, o.initFlashPlayer = function(t, a) { 8946 a.loadSWFObject ? (a.swfobjectURL = a.swfobjectURL.replace("http://", ""), a.swfobjectURL = a.swfobjectURL.replace("https://", ""), a.swfobjectURL = a.protocol + "://" + a.swfobjectURL, e.getScript(a.swfobjectURL, o.init_flash_player(a))) : o.init_flash_player(a)(); 8947 }, o.init_flash_player = function(t) { 8948 return function() { 8949 if (!window.swfobject) return alert("YouTube Player couldn't be initialized. Please include swfobject."), void 0; 8950 var a = ["//www.youtube.com/v/"]; 8951 a.push(t.initialVideo), a.push("?&enablejsapi=1&version=3"), a.push("&playerapiid=" + t.playerID), a.push("&rel=" + (t.showRelated ? 1 : 0)), a.push("&autoplay=" + (t.autoPlay ? 1 : 0)), a.push("&autohide=" + (t.autoHide ? 1 : 0)), a.push("&loop=" + (t.loop ? 1 : 0)), a.push("&playlist=" + (t.loop ? t.initialVideo : "")), a.push("&c
8951ontrols=" + (t.showControls ? 1 : 0)), a.push("&showinfo=" + (t.showinfo ? 1 : 0)), a.push("&modestbranding=" + (t.modestbranding ? 1 : 0)), a.push("&iv_load_policy=" + (t.annotations ? 1 : 3)), a.push("&start=" + t.start), a.push("&theme=" + t.theme), a.push("&color=" + t.color), a.push("&playsinline=" + t.playsinline), a.push("&fs=" + (t.allowFullScreen ? 1 : 0)), window.swfobject.embedSWF(a.join(""), t.playerID, t.width, t.height, "8", null, null, { 8952 allowScriptAccess: t.allowScriptAccess, 8953 wmode: t.wmode, 8954 allowFullScreen: t.allowFullScreen 8955 }, { 8956 id: t.playerID 8957 }), window.onYouTubePlayerReady = function(t) { 8958 var a = document.getElementById(t), 8959 n = t.replace(/-/g, ""), 8960 l = e.tubeplayer.defaults; 8961 e.tubeplayer.events[n] = { 8962 stateChange: l.stateChange(t), 8963 error: l.onError(t), 8964 qualityChange: l.qualityChange(t) 8965 }, a.addEventListener("onStateChange", "$.tubeplayer.events." + n + ".stateChange"), a.addEventListener("onError", "$.tubeplayer.events." + n + ".error"), a.addEventListener("onPlaybackQualityChange", "$.tubeplayer.events." + n + ".qualityChange"), o.ytplayers[t] = a; 8966 var i = e(a).parents("." + r); 8967 e.tubeplayer.defaults.afterReady(i); 8968 }; 8969 }; 8970 }, o.getVideoIDFromURL = function(e) { 8971 e = e || ""; 8972 var t = e.indexOf("?"), 8973 a = e.substring(t, e.length), 8974 r = a.indexOf("v="); 8975 if (r > -1) { 8976 var n = a.indexOf("&", r); 8977 return -1 === n && (n = a.length), a.substring(r + "v=".length, n); 8978 } 8979 return ""; 8980 }; 8981 var u = { 8982 opts: i(function(e, t, a) { 8983 return a.opts; 8984 }), 8985 cue: i(function(e, t, a) { 8986 a.ytplayer.cueVideoById(t, 0, a.opts.preferredQuality); 8987 }), 8988 play: i(function(e, t, a) { 8989 "object" == typeof t ? a.ytplayer.loadVideoById(t.id, t.time, a.opts.preferredQuality) : t !== void 0 ? a.ytplayer.loadVideoById(t, 0, a.opts.preferredQuality) : a.ytplayer.playVideo(), a.opts.onPlay(t); 8990 }), 8991 pause: i(function(e, t, a) { 8992 a.ytplayer.pauseVideo(), a.opts.onPause(a); 8993 }), 8994 stop: i(function(e, t, a) { 8995 a.ytplayer.stopVideo(), a.opts.onStop(a); 8996 }), 8997 seek: i(function(e, t, a) { 8998 if (/:/.test(t)) { 8999 var r = t.split(":").reverse(); 9000 t = 0; 9001 for (var n = 0; r.length > n; n++) t += Math.pow(60, n) * (0 | r[n]); 9002 } 9003 a.ytplayer.seekTo(t, !0), a.opts.onSeek(t); 9004 }), 9005 mute: i(function(e, t, a) { 9006 a.$player.attr("data-prev-mute-volume", a.ytplayer.getVolume()), a.ytplayer.mute(), a.opts.onMute(a); 9007 }), 9008 unmute: i(function(e, t, a) { 9009 a.ytplayer.unMute(), a.ytplayer.setVolume(a.$player.attr("data-prev-mute-volume") || 50), a.opts.onUnMute(); 9010 }), 9011 isMuted: i(function(e, t, a) { 9012 return a.ytplayer.isMuted(); 9013 }), 9014 volume: i(function(e, t, a) { 9015 return void 0 === t ? a.ytplayer.getVolume() || 0 : (a.ytplayer.setVolume(t), a.$player.attr("data-prev-mute-volume", a.ytplayer.getVolume()), void 0); 9016 }), 9017 quality: i(function(e, t, a) { 9018 return void 0 === t ? a.ytplayer.getPlaybackQuality() : (a.ytplayer.setPlaybackQuality(t), void 0); 9019 }), 9020 playbackRate: i(function(e, t, a) { 9021 return void 0 === t ? a.ytplayer.getPlaybackRate() : (a.ytplayer.setPlaybackRate(t), void 0); 9022 }), 9023 data: i(function(e, t, a) { 9024 var r = {}, 9025 n = a.ytplayer; 9026 return r.videoLoadedFraction = n.getVideoLoadedFraction(), r.bytesLoaded = n.getVideoBytesLoaded(), r.bytesTotal = n.getVideoBytesTotal(), r.startBytes = n.getVideoStartBytes(), r.state = n.getPlayerState(), r.currentTime = n.getCurrentTime(), r.duration = n.getDuration(), r.videoURL = n.getVideoUrl(), r.videoEmbedCode = n.getVideoEmbedCode(), r.videoID = o.getVideoIDFromURL(r.videoURL), r.availableQualityLevels = n.getAvailableQualityLevels(), r.availablePlaybackRates = n.getAvailablePlaybackRates(), r; 9027 }), 9028 videoId: i(function(e, t, a) { 9029 return o.getVideoIDFromURL(a.ytplayer.getVideoUrl()); 9030 }), 9031 size: i(function(t, a, r) { 9032 a !== void 0 && a.width && a.height && (r.ytplayer.setSize(a.width, a.height), e(r.ytplayer).css(a)); 9033 }), 9034 destroy: i(function(t, l, i) { 9035 i.$player.removeClass(r).data(n, null).unbind(a).html(""), delete o.ytplayers[i.opts.playerID]; 9036 var u = e.tubeplayer.defaults, 9037 d = ["unstarted", "ended", "playing", "paused", "buffering", "cued"]; 9038 return e.each(d, function(e, t) { 9039 delete u.onPlayer[t][i.opts.playerID]; 9040 }), d = ["defaultError", "notFound", "notEmbeddable", "invalidParameter"], e.each(d, function(e, t) { 9041 delete u.onErr[t][i.opts.playerID]; 9042 }), delete u.onQualityChange[i.opts.playerID], delete e.tubeplayer.events[i.opts.playerID], "destroy" in i.ytplayer && i.ytplayer.destroy(), e(i.ytplayer).remove(), null; 9043 }), 9044 player: i(function(e, t, a) { 9045 return a.ytplayer; 9046 }) 9047 }; 9048})(jQuery); 9049 9050 9051 9052 9053 9054 9055 9056 9057 9058/*global jQuery */ 9059/*jshint browser:true */ 9060/*! 9061 * FitVids 1.1 9062 *
9063 * Copyright 2013, Chris Coyier - http://css-tricks.com + Dave Rupert - http://daverupert.com 9064 * Credit to Thierry Koblentz - http://www.alistapart.com/articles/creating-intrinsic-ratios-for-video/ 9065 * Released under the WTFPL license - http://sam.zoy.org/wtfpl/ 9066 * 9067 */ 9068 9069(function($) { 9070 9071 "use strict"; 9072 9073 $.fn.fitVids = function(options) { 9074 var settings = { 9075 customSelector: null, 9076 ignore: null 9077 }; 9078 9079 if (!document.getElementById('fit-vids-style')) { 9080 // appendStyles: https://github.com/toddmotto/fluidvids/blob/master/dist/fluidvids.js 9081 var head = document.head || document.getElementsByTagName('head')[0]; 9082 var css = '.fluid-width-video-wrapper{width:100%;position:relative;padding:0;}.fluid-width-video-wrapper iframe,.fluid-width-video-wrapper object,.fluid-width-video-wrapper embed {position:absolute;top:0;left:0;width:100%;height:100%;}'; 9083 var div = document.createElement('div'); 9084 div.innerHTML = '<p>x</p><style id="fit-vids-style">' + css + '</style>'; 9085 head.appendChild(div.childNodes[1]); 9086 } 9087 9088 if (options) { 9089 $.extend(settings, options); 9090 } 9091 9092 return this.each(function() { 9093 var selectors = [ 9094 "iframe[src*='player.vimeo.com']", 9095 "iframe[src*='youtube.com']", 9096 "iframe[src*='youtube-nocookie.com']", 9097 "iframe[src*='kickstarter.com'][src*='video.html']", 9098 "object", 9099 "embed" 9100 ]; 9101 9102 if (settings.customSelector) { 9103 selectors.push(settings.customSelector); 9104 } 9105 9106 var ignoreList = '.fitvidsignore'; 9107 9108 if (settings.ignore) { 9109 ignoreList = ignoreList + ', ' + settings.ignore; 9110 } 9111 9112 var $allVideos = $(this).find(selectors.join(',')); 9113 $allVideos = $allVideos.not("object object"); // SwfObj conflict patch 9114 $allVideos = $allVideos.not(ignoreList); // Disable FitVids on this video. 9115 9116 $allVideos.each(function() { 9117 var $this = $(this); 9118 if ($this.parents(ignoreList).length > 0) { 9119 return; // Disable FitVids on this video. 9120 } 9121 if (this.tagName.toLowerCase() === 'embed' && $this.parent('object').length || $this.parent('.fluid-width-video-wrapper').length) { 9122 return; 9123 } 9124 if ((!$this.css('height') && !$this.css('width')) && (isNaN($this.attr('height')) || isNaN($this.attr('width')))) { 9125 $this.attr('height', 9); 9126 $this.attr('width', 16); 9127 } 9128 var height = (this.tagName.toLowerCase() === 'object' || ($this.attr('height') && !isNaN(parseInt($this.attr('height'), 10)))) ? parseInt($this.attr('height'), 10) : $this.height(), 9129 width = !isNaN(parseInt($this.attr('width'), 10)) ? parseInt($this.attr('width'), 10) : $this.width(), 9130 aspectRatio = height / width; 9131 if (!$this.attr('id')) { 9132 var videoID = 'fitvid' + Math.floor(Math.random() * 999999); 9133 $this.attr('id', videoID); 9134 } 9135 $this.wrap('<div class="fluid-width-video-wrapper"></div>').parent('.fluid-width-video-wrapper').css('padding-top', (aspectRatio * 100) + "%"); 9136 $this.removeAttr('height').removeAttr('width'); 9137 }); 9138 }); 9139 }; 9140 // Works with either jQuery or Zepto 9141})(window.jQuery || window.Zepto); 9142 9143 9144 9145 9146 9147 9148 9149 9150 9151/*! Swipebox v1.2.9 | Constantin Saguin csag.co | MIT License | github.com/brutaldesign/swipebox */ 9152! function(a, b, c, d) { 9153 c.swipebox = function(e, f) { 9154 var g, h, i = { 9155 useCSS: !0, 9156 useSVG: !0, 9157 initialIndexOnArray: 0, 9158 closeBySwipe: !0, 9159 hideBarsOnMobile: !0, 9160 hideBarsDelay: 3e3, 9161 videoMaxWidth: 1140, 9162 vimeoColor: "CCCCCC", 9163 beforeOpen: null, 9164 afterOpen: null, 9165 afterClose: null 9166 }, 9167 j = this, 9168 k = [], 9169 l = e.selector, 9170 m = c(l), 9171 n = navigator.userAgent.match(/(iPad)|(iPhone)|(iPod)|(Android)|(PlayBook)|(BB10)|(BlackBerry)|(Opera Mini)|(IEMobile)|(webOS)|(MeeGo)/i), 9172 o = null !== n || b.createTouch !== d || "ontouchstart" in a || "onmsgesturechange" in a || navigator.msMaxTouchPoints, 9173 p = !!b.createElementNS && !!b.createElementNS("http://www.w3.org/2000/svg", "svg").createSVGRect, 9174 q = a.innerWidth ? a.innerWidth : c(a).width(), 9175 r = a.innerHeight ? a.innerHeight : c(a).height(), 9176 s = '<div id="swipebox-overlay"> <div id="swipebox-slider"></div> <div id="swipebox-caption"></div> <div id="swipebox-action"> <a id="swipebox-close"></a> <a id="swipebox-prev"></a> <a id="swipebox-next"></a> </div> </div>'; 9177 j.settings = {}, j.init = function() { 9178 j.settings = c.extend({}, i, f), c.isArray(e) ? (k = e, g.target = c(a), g.init(j.settings.initialIndexOnArray)) : c(b).on("click", l, function(a) { 9179 if ("slide current" === a.target.parentNode.className) return !1; 9180 c.isArray(e) || (g.destroy(), h = c(l), g.actions()), k = []; 9181 var b, d, f; 9182 f || (d = "data-rel", f = c(this).attr(d)), f || (d = "rel", f = c(this).attr(d)), h = f && "" !== f && "nofollow" !== f ? m.filter("[" + d + '="' + f + '"]') : c(l), h.each(function() { 9183 var a = null, 9184 b = null; 9185 c(this).attr("title") && (a = c(this).attr("title")), c(this).attr("href") && (b = c(this).attr("href")), k.push({ 9186 href: b, 9187 title: a 9188 }) 9189 }), b = h.index(c(this)), a.preventDefault(), a.stopPropagation(), g.target = c(a.target), g.init(b) 9190 }) 9191 }, g = { 9192 init: function(a) { 9193 j.settings.beforeOpen && j.settings.beforeOpen(), this.target.trigger("swipebox-start"), c.swipebox.isOpen = !0, this.build(), this.openSlide(a), this.openMedia(a), this.preloadMedia(a + 1), this.preloadMedia(a - 1), j.settings.afterOpen && j.settings.afterOpen() 9194 }, 9195 build: function() { 9196 var a, b = this;
9197 c("body").append(s), b.doCssTrans() && (c("#swipebox-slider").css({ 9198 "-webkit-transition": "left 0.4s ease", 9199 "-moz-transition": "left 0.4s ease", 9200 "-o-transition": "left 0.4s ease", 9201 "-khtml-transition": "left 0.4s ease", 9202 transition: "left 0.4s ease" 9203 }), c("#swipebox-overlay").css({ 9204 "-webkit-transition": "opacity 1s ease", 9205 "-moz-transition": "opacity 1s ease", 9206 "-o-transition": "opacity 1s ease", 9207 "-khtml-transition": "opacity 1s ease", 9208 transition: "opacity 1s ease" 9209 }), c("#swipebox-action, #swipebox-caption").css({ 9210 "-webkit-transition": "0.5s", 9211 "-moz-transition": "0.5s", 9212 "-o-transition": "0.5s", 9213 "-khtml-transition": "0.5s", 9214 transition: "0.5s" 9215 })), p && j.settings.useSVG === !0 && (a = c("#swipebox-action #swipebox-close").css("background-image"), a = a.replace("png", "svg"), c("#swipebox-action #swipebox-prev,#swipebox-action #swipebox-next,#swipebox-action #swipebox-close").css({ 9216 "background-image": a 9217 })), n && j.settings.hideBarsOnMobile === !0 && c("#swipebox-action, #swipebox-caption").hide(), c.each(k, function() { 9218 c("#swipebox-slider").append('<div class="slide"></div>') 9219 }), b.setDim(), b.actions(), o && b.gesture(), b.keyboard(), b.animBars(), b.resize() 9220 }, 9221 setDim: function() { 9222 var b, d, e = {}; 9223 "onorientationchange" in a ? a.addEventListener("orientationchange", function() { 9224 0 === a.orientation ? (b = q, d = r) : (90 === a.orientation || -90 === a.orientation) && (b = r, d = q) 9225 }, !1) : (b = a.innerWidth ? a.innerWidth : c(a).width(), d = a.innerHeight ? a.innerHeight : c(a).height()), e = { 9226 width: b, 9227 height: d 9228 }, c("#swipebox-overlay").css(e) 9229 }, 9230 resize: function() { 9231 var b = this; 9232 c(a).resize(function() { 9233 b.setDim() 9234 }).resize() 9235 }, 9236 supportTransition: function() { 9237 var a, c = "transition WebkitTransition MozTransition OTransition msTransition KhtmlTransition".split(" "); 9238 for (a = 0; a < c.length; a++) 9239 if (b.createElement("div").style[c[a]] !== d) return c[a]; 9240 return !1 9241 }, 9242 doCssTrans: function() { 9243 return j.settings.useCSS && this.supportTransition() ? !0 : void 0 9244 }, 9245 gesture: function() { 9246 var a = this, 9247 b = null, 9248 d = null, 9249 e = !1, 9250 f = 10, 9251 g = 50, 9252 h = {}, 9253 i = {}, 9254 k = c("#swipebox-caption, #swipebox-action"), 9255 l = c("#swipebox-slider"); 9256 k.addClass("visible-bars"), a.setTimeout(), c("body").bind("touchstart", function(a) { 9257 return c(this).addClass("touching"), i = a.originalEvent.targetTouches[0], h.pageX = a.originalEvent.targetTouches[0].pageX, h.pageY = a.originalEvent.targetTouches[0].pageY, c(".touching").bind("touchmove", function(a) { 9258 if (a.preventDefault(), a.stopPropagation(), i = a.originalEvent.targetTouches[0], j.settings.closeBySwipe && (d = i.pageY - h.pageY, Math.abs(d) >= g || e)) { 9259 var b = .75 - Math.abs(d) / l.height(); 9260 l.css({ 9261 top: d + "px" 9262 }), l.css({ 9263 opacity: b 9264 }), e = !0 9265 } 9266 }), !1 9267 }).bind("touchend", function(g) { 9268 if (g.preventDefault(), g.stopPropagation(), j.settings.closeBySwipe) { 9269 if (l.css("opacity") <= .5) { 9270 var m = d > 0 ? l.height() : -l.height(); 9271 l.animate({ 9272 top: m + "px", 9273 opacity: 0 9274 }, 300, function() { 9275 a.closeSlide() 9276 }) 9277 } else l.animate({ 9278 top: 0, 9279 opacity: 1 9280 }, 300); if (e) return void(e = !1) 9281 } 9282 b = i.pageX - h.pageX, b >= f ? a.getPrev() : -f >= b ? a.getNext() : k.hasClass("visible-bars") ? (a.clearTimeout(), a.hideBars()) : (a.showBars(), a.setTimeout()), c(".touching").off("touchmove").removeClass("touching") 9283 }) 9284 }, 9285 setTimeout: function() { 9286 if (j.settings.hideBarsDelay > 0) { 9287 var b = this; 9288 b.clearTimeout(), b.timeout = a.setTimeout(function() { 9289 b.hideBars() 9290 }, j.settings.hideBarsDelay) 9291 } 9292 }, 9293 clearTimeout: function() { 9294 a.clearTimeout(this.timeout), this.timeout = null 9295 }, 9296 showBars: function() { 9297 var a = c("#swipebox-caption, #swipebox-action"); 9298 this.doCssTrans() ? a.addClass("visible-bars") : (c("#swipebox-caption").animate({ 9299 top: 0 9300 }, 500), c("#swipebox-action").animate({ 9301 bottom: 0 9302 }, 500), setTimeout(function() { 9303 a.addClass("visible-bars") 9304 }, 1e3)) 9305 }, 9306 hideBars: function() { 9307 var a = c("#swipebox-caption, #swipebox-action"); 9308 this.doCssTrans() ? a.removeClass("visible-bars") : (c("#swipebox-caption").animate({ 9309 top: "-50px" 9310 }, 500), c("#swipebox-action").animate({ 9311 bottom: "-50px" 9312 }, 500), setTimeout(function() { 9313 a.removeClass("visible-bars") 9314 }, 1e3)) 9315 }, 9316 animBars: function() { 9317 var a = this, 9318 b = c("#swipebox-caption, #swipebox-action"); 9319 b.addClass("visible-bars"), a.setTimeout(), c("#swipebox-slider").click(function() { 9320 b.hasClass("visible-bars") || (a.showBars(), a.setTimeout()) 9321 }), c("#swipebox-action").hover(function() { 9322 a.showBars(), b.addClass("visible-bars"), a.clearTimeout() 9323 }, function() { 9324 b.removeClass("visible-bars"), a.setTimeout() 9325 }) 9326 }, 9327 keyboard: function() { 9328 var b = this; 9329 c(a).bind("keyup", function(a) { 9330 a.preventDefault(), a.stopPropagation(), 37 === a.keyCode ? b.getPrev() : 39 === a.keyCode ? b.getNext() : 27 === a.keyCode && b.closeSlide() 9331 }) 9332 }, 9333 actions: function() { 9334 var a = this, 9335 b = "touchend click"; 9336 k.length < 2 ? c("#swipebox-prev, #swipebox-next").hide() : (c("#swipebox-prev").bind(b, function(b) { 9337 b.preventDefault(), b.stopPropagation(), a.getPrev(), a.setTimeout() 9338 }), c("#swipebox-next").bind(b, function(b) { 9339 b.preventDefault(), b.stopPropagation(), a.getNext(), a.setTimeout() 9340 })), c("#swipebox-close").bind(b, function() { 9341 a.closeSlide() 9342 }) 9343 }, 9344 setSlide: function(a, b) { 9345 b = b || !1; 9346 var d = c("#swipebox-slider"); 9347 this.doCssTrans() ? d.css({ 9348 left: 100 * -a + "%" 9349 }) : d.animate({ 9350 left: 100 * -a + "%" 9351 }), c("#swipebox-slider .slide").removeClass("current"), c("#swipebox-slider .slide").eq(a).addClass("current"), this.setTitle(a), b && d.fadeIn(), c("#swipebox-prev, #swipebox-next").removeClass("disabled"), 0 === a ? c("#swipebox-prev").addClass("disabled") : a === k.length - 1 && c("#swipebox-next").addClass("disabled") 9352 }, 9353 openSlide: function(b) { 9354 c("html").addClass("swipebox-html"), o && c("html").addClass("swipebox-touch"), c(a).trigger("resize"), this.setSlide(b, !0) 9355 }, 9356 preloadMedia: function(a) { 9357 var b = this, 9358 c = null; 9359 k[a] !== d && (c = k[a].href), b.isVideo(c) ? b.openMedia(a) : setTimeout(function() { 9360 b.openMedia(a) 9361 }, 1e3) 9362 }, 9363 openMedia: function(a) { 9364 var b = this, 9365 e = null; 9366 return k[a] !== d && (e = k[a].href), 0 > a || a >= k.length ? !1 : void(b.isVideo(e) ? c("#swipebox-slider .slide").eq(a).html(b.getVideo(e)) : b.loadMedia(e, function() { 9367 c("#swipebox-slider .slide").eq(a).html(this) 9368 })) 9369 }, 9370 setTitle: function(a) { 9371 var b = null; 9372 c("#swipebox-caption").empty(), k[a] !== d && (b = k[a].title), b && c("#swipebox-caption").append(b) 9373 }, 9374 isVideo: function(a) { 9375 return a && (a.match(/youtube\.com\/watch\?v=([a-zA-Z0-9\-_]+)/) || a.match(/vimeo\.com\/([0-9]*)/) || a.match(/youtu\.be\/([a-zA-Z0-9\-_]+)/)) ? !0 : void 0 9376 }, 9377 getVideo: function(a) { 9378 var b = "", 9379 c = a.match(/watch\?v=([a-zA-Z0-9\-_]+)/), 9380 d = a.match(/youtu\.be\/([a-zA-Z0-9\-_]+)/), 9381 e = a.match(/vimeo\.com\/([0-9]*)/); 9382 return c || d ? (d && (c = d), b = '<iframe width="560" height="315" src="//www.youtube.com/embed/' + c[1] + '" frameborder="0" allowfullscreen></iframe>') : e && (b = '<iframe width="560" height="315" src="//player.vimeo.com/video/' + e[1] + "?byline=0&portrait=0&color=" + j.settings.vimeoColor + '" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>'), '<div class="swipebox-video-container" style="max-width:' + j.settings.videomaxWidth + 'px"><div class="swipebox-video">' + b + "</div></div>" 9383 }, 9384 loadMedia: function(a, b) { 9385 if (!this.isVideo(a)) { 9386 var d = c("<img>").on("load", function() { 9387 b.call(d) 9388 }); 9389 d.attr("src", a) 9390 } 9391 }, 9392 getNext: function() { 9393 var a = this, 9394 b = c("#swipebox-slider .slide").index(c("#swipebox-slider .slide.current")); 9395 b + 1 < k.length ? (b++, a.setSlide(b), a.preloadMedia(b + 1)) : (c("#swipebox-slider").addClass("rightSpring"), setTimeout(function() { 9396 c("#swipebox-slider").removeClass("rightSpring") 9397 }, 500)) 9398 }, 9399 getPrev: function() { 9400 var a = c("#swipebox-slider .slide").index(c("#swipebox-slider .slide.current")); 9401 a > 0 ? (a--, this.setSlide(a), this.preloadMedia(a - 1)) : (c("#swipebox-slider").addClass("leftSpring"), setTimeout(function() { 9402 c("#swipebox-slider").removeClass("leftSpring") 9403 }, 500)) 9404 }, 9405 closeSlide: function() { 9406 c("html").removeClass("swipebox-html"), c("html").removeClass("swipebox-touch"), c(a).trigger("resize"), this.destroy() 9407 }, 9408 destroy: function() {
9409 c(a).unbind("keyup"), c("body").unbind("touchstart"), c("body").unbind("touchmove"), c("body").unbind("touchend"), c("#swipebox-slider").unbind(), c("#swipebox-overlay").remove(), c.isArray(e) || e.removeData("_swipebox"), this.target && this.target.trigger("swipebox-destroy"), c.swipebox.isOpen = !1, j.settings.afterClose && j.settings.afterClose() 9410 } 9411 }, j.init() 9412 }, c.fn.swipebox = function(a) { 9413 if (!c.data(this, "_swipebox")) { 9414 var b = new c.swipebox(this, a); 9415 this.data("_swipebox", b) 9416 } 9417 return this.data("_swipebox") 9418 } 9419}(window, document, jQuery); 9420 9421 9422 9423 9424/* 9425 * Smoothzoom 9426 * http://kthornbloom.com/smoothzoom 9427 * 9428 * Copyright 2014, Kevin Thornbloom 9429 * Free to use and modify under the MIT license. 9430 * http://www.opensource.org/licenses/mit-license.php 9431 */ 9432 9433(function($) { 9434 $.fn.extend({ 9435 smoothZoom: function(options) { 9436 9437 var defaults = { 9438 zoominSpeed: 800, 9439 zoomoutSpeed: 400, 9440 resizeDelay: 400, 9441 zoominEasing: 'easeOutExpo', 9442 zoomoutEasing: 'easeOutExpo' 9443 } 9444 9445 var options = $.extend(defaults, options); 9446 9447 9448 9449 // CLICKING AN IMAGE 9450 9451 // $('img[rel="zoom"]').click(function(event) { 9452 9453 // var link = $(this).attr('src'), 9454 // largeImg = $(this).parent().attr('href'), 9455 // target = $(this).parent().attr('target'), 9456 // offset = $(this).offset(), 9457 // width = $(this).width(), 9458 // height = $(this).height(), 9459 // amountScrolled = $(window).scrollTop(), 9460 // viewportWidth = $(window).width(), 9461 // viewportHeight = $(window).height(); 9462 // if ($(this).attr('data-imgzoom')!=''){ 9463 // link = $(this).attr('data-imgzoom'); 9464 // } 9465 // // IF THERE IS NO ANCHOR WRAP 9466 // if ((!largeImg) || (largeImg == "#")) { 9467 9468 // $('body').append("<div id='lightwrap'><img src=" + link + "></div><div id='lightbg'></div><img id='off-screen' src=" + link + ">"); 9469 // $("#off-screen").load(function() { 9470 // $('#lightwrap img').css({ 9471 // width: width, 9472 // height: height, 9473 // top: (offset.top - amountScrolled), 9474 // left: offset.left 9475 // }); 9476 // fitWidth(); 9477 // $('#lightbg').fadeIn(); 9478 // }); 9479 // $(this).attr('id', 'lightzoomed'); 9480 9481 // // IF THERE IS AN ANCHOR, AND IT'S AN IMAGE 9482 // } else if (largeImg.match("[jpg|png|gif](\\?.*?)?$")) { 9483 // $('body').append("<div id='lightwrap'><img src=" + largeImg + "></div><div id='lightbg'></div><img id='off-screen' src=" + largeImg + ">"); 9484 // $("#off-screen").load(function() { 9485 // $('#lightwrap img').css({ 9486 // width: width, 9487 // height: height, 9488 // top: (offset.top - amountScrolled), 9489 // left: offset.left 9490 // }); 9491 // fitWidth(); 9492 // $('#lightbg').fadeIn(); 9493 // }); 9494 // $(this).attr('id', 'lightzoomed'); 9495 9496 // // IF THERE IS AN ANCHOR, BUT NOT AN IMAGE 9497 // } else { 9498 // // SHOULD IT OPEN IN A NEW WINDOW? 9499 // if (target == '_blank') { 9500 // window.open(largeImg, '_blank'); 9501 // } else { 9502 // window.location = largeImg; 9503 // } 9504 // } 9505 // event.preventDefault(); 9506 // }); 9507 9508 // CLOSE MODAL 9509 9510 $(document.body).on("click", "#lightwrap, #lightbg", function(event) { 9511 var offset = $("#lightzoomed").offset(), 9512 originalWidth = $("#lightzoomed").width(), 9513 originalHeight = $("#lightzoomed").height(), 9514 amountScrolled = $(window).scrollTop(); 9515 $('#lightbg').fadeOut(500); 9516 $('#lightwrap img').animate({ 9517 height: originalHeight, 9518 width: originalWidth, 9519 top: (offset.top - amountScrolled), 9520 left: offset.left, 9521 marginTop: '0', 9522 marginLeft: '0' 9523 }, options.zoomoutSpeed, options.zoomoutEasing, function() { 9524 $('#lightwrap, #lightbg, #off-screen').remove(); 9525 $('#lightzoomed').removeAttr('id'); 9526 9527 }); 9528 }); 9529 9530 // DELAY FUNCTION FOR WINDOW RESIZE
9531 var delay = (function() { 9532 var timer = 0; 9533 return function(callback, ms) { 9534 clearTimeout(timer); 9535 timer = setTimeout(callback, ms); 9536 }; 9537 })(); 9538 9539 // CHECK WINDOW SIZE EVERY _ MS 9540 $(window).resize(function() { 9541 delay(function() { 9542 fitWidth(); 9543 }, options.resizeDelay); 9544 }); 9545 9546 9547 // FIT IMAGE BASED ON HEIGHT 9548 function fitHeight() { 9549 9550 var viewportHeight = $(window).height(), 9551 viewportWidth = $(window).width(), 9552 naturalWidth = $('#off-screen').width(), 9553 naturalHeight = $('#off-screen').height(), 9554 newHeight = (viewportHeight * 0.95), 9555 ratio = (newHeight / naturalHeight), 9556 newWidth = (naturalWidth * ratio); 9557 $('#lightwrap img').show(); 9558 if (newHeight > naturalHeight) { 9559 $('#lightwrap img').animate({ 9560 height: naturalHeight, 9561 width: naturalWidth, 9562 left: '50%', 9563 top: '50%', 9564 marginTop: -(naturalHeight / 2), 9565 marginLeft: -(naturalWidth / 2) 9566 }, options.zoominSpeed, options.zoominEasing); 9567 } else { 9568 if (newWidth > viewportWidth) { 9569 fitWidth(); 9570 } else { 9571 $('#lightwrap img').animate({ 9572 height: newHeight, 9573 width: newWidth, 9574 left: '50%', 9575 top: '2.5%', 9576 marginTop: '0', 9577 marginLeft: -(newWidth / 2) 9578 }, options.zoominSpeed, options.zoominEasing); 9579 } 9580 } 9581 } 9582 9583 // FIT IMAGE BASED ON WIDTH 9584 function fitWidth() { 9585 9586 var naturalWidth = $('#off-screen').width(), 9587 naturalHeight = $('#off-screen').height(), 9588 viewportWidth = $(window).width(), 9589 viewportHeight = $(window).height(), 9590 newWidth = (viewportWidth * 0.95), 9591 ratio = (newWidth / naturalWidth), 9592 newHeight = (naturalHeight * ratio); 9593 $('#lightwrap img').show(); 9594 if (newHeight > naturalHeight) { 9595 if (naturalHeight > viewportHeight) { 9596 fitHeight(); 9597 } else { 9598 $('#lightwrap img').animate({ 9599 height: naturalHeight, 9600 width: naturalWidth, 9601 top: '50%', 9602 left: '50%', 9603 marginTop: -(naturalHeight / 2), 9604 marginLeft: -(naturalWidth / 2) 9605 }, options.zoominSpeed, options.zoominEasing); 9606 } 9607 } else { 9608 if (newHeight > viewportHeight) { 9609 fitHeight(); 9610 } else { 9611 $('#lightwrap img').animate({ 9612 height: newHeight, 9613 width: newWidth, 9614 top: '50%', 9615 left: '2.5%', 9616 marginTop: -(newHeight / 2), 9617 marginLeft: '0' 9618 }, options.zoominSpeed, options.zoominEasing); 9619 } 9620 } 9621 } 9622 9623 9624 } 9625 }); 9626})(jQuery); 9627 9628 9629 9630 9631 9632 9633/** ========================================================== 9634 9635* jquery lightGallery.js v1.1.2 9636* http://sachinchoolur.github.io/lightGallery/ 9637* Released under the Apache License - http://opensource.org/licenses/Apache-2.0 ---- FREE ---- 9638 9639=========================================================/**/ 9640 9641// ; 9642// (function ($) { 9643// "use strict";
9644// $.fn.lightGallery = function (options) { 9645// var defaults = { 9646// mode: 'slide', 9647// useCSS: true, 9648// easing: 'ease', //'cubic-bezier(0.25, 0, 0.25, 1)',// 9649// speed: 1000, 9650// closable: true, 9651// loop: false, 9652// auto: false, 9653// pause: 4000, 9654// preload:1,//number of preload slides. will exicute only after the current slide is fully loaded. ex:// you clicked on 4th image and if preload = 1 then 3rd slide and 5th slide will be loaded in the background after the 4th slide is fully loaded.. if preload is 2 then 2nd 3rd 5th 6th slides will be preloaded.. ... ... 9655// escKey: true, 9656// rel: false, 9657// lang: { 9658// allPhotos: 'All photos' 9659// }, 9660// exThumbImage: false, 9661// index: false, 9662// thumbnail: true, 9663// caption: false, 9664// captionLink: false, 9665// desc: false, 9666// counter: false, 9667// controls: true, 9668// hideControlOnEnd: false, 9669// mobileSrc: false, 9670// mobileSrcMaxWidth: 640, 9671// //touch 9672// swipeThreshold: 50, 9673// vimeoColor: 'CCCCCC', 9674// videoAutoplay: true, 9675// videoMaxWidth: 855, 9676// dynamic: false, 9677// //callbacks 9678// dynamicEl: [], 9679// onOpen: function () {}, 9680// onSlideBefore: function () {}, 9681// onSlideAfter: function () {}, 9682// onSlideNext: function () {}, 9683// onSlidePrev: function () {}, 9684// onBeforeClose: function () {}, 9685// onCloseAfter: function () {} 9686// }, 9687// el = $(this), 9688// $children, 9689// index, 9690// lightGalleryOn = false, 9691// html = '<div id="lightGallery-outer"><div id="lightGallery-Gallery"><div id="lightGallery-slider"></div><a id="lightGallery-close" class="close"></a></div></div>', 9692// isTouch = document.createTouch !== undefined || ('ontouchstart' in window) || ('onmsgesturechange' in window) || navigator.msMaxTouchPoints, 9693// $gallery, $galleryCont, $slider, $slide, $prev, $next, prevIndex, $thumb_cont, $thumb, windowWidth, interval, usingThumb = false, 9694// aTiming = false, 9695// aSpeed = false; 9696// var settings = $.extend(true, {}, defaults, options); 9697// var lightGallery = { 9698// init: function () { 9699// el.each(function () { 9700// var $this = $(this); 9701// if (settings.dynamic == true) { 9702// $children = settings.dynamicEl; 9703// index = 0; 9704// prevIndex = index; 9705// setUp.init(index); 9706// } else { 9707// $children = $(this).children(); 9708// $children.click(function (e) { 9709// if (settings.rel == true && $this.data('rel')) { 9710// var rel = $this.data('rel'); 9711// $children = $('[data-rel="' + rel + '"]').children(); 9712// } else { 9713// $children = $this.children(); 9714// } 9715// e.preventDefault(); 9716// e.stopPropagation(); 9717// index = $children.index(this); 9718// prevIndex = index; 9719// setUp.init(index); 9720// }); 9721// } 9722// }); 9723// }, 9724// }; 9725// var setUp = { 9726// init: function () { 9727// this.start(); 9728// this.build(); 9729// }, 9730// start: function () { 9731// this.structure(); 9732// this.getWidth(); 9733// this.closeSlide(); 9734// }, 9735// build: function () { 9736// this.autoStart(); 9737// this.addCaption(); 9738// this.addDesc(); //description 9739// this.counter(); 9740// this.slideTo(); 9741// this.buildThumbnail(); 9742// this.keyPress(); 9743// if(settings.index) { 9744// this.slide(settings.index); 9745// } 9746// else { 9747// this.slide(index); 9748// } 9749// this.touch(); 9750// this.enableTouch(); 9751 9752// setTimeout(function () { 9753// $gallery.addClass('opacity'); 9754// }, 50); 9755// }, 9756// structure: function () { 9757// $('body').append(html).addClass('lightGallery'); 9758// $galleryCont = $('#lightGallery-outer'); 9759// $gallery = $('#lightGallery-Gallery'); 9760// $slider = $gallery.find('#lightGallery-slider'); 9761// var slideList = ''; 9762// if (settings.dynamic == true) { 9763// for (var i = 0; i < settings.dynamicEl.length; i++) { 9764// slideList += '<div class="lightGallery-slide"></div>'; 9765// } 9766// } else { 9767// $children.each(function () { 9768// slideList += '<div class="lightGallery-slide"></div>'; 9769// }); 9770// } 9771// $slider.append(slideList); 9772// $slide = $gallery.find('.lightGallery-slide'); 9773// }, 9774// closeSlide: function () { 9775// var $this = this; 9776// if(settings.closable) { 9777// $('.lightGallery-slide') 9778// .on('click', function(event) { 9779// console.log(event.target); 9780// if($(event.target).is('.lightGallery-slide')) { 9781// $this.destroy(); 9782// } 9783// }) 9784// ; 9785// } 9786// $('#lightGallery-close').bind('click touchend', function () { 9787// $this.destroy(); 9788// }); 9789// }, 9790// getWidth: function () { 9791// var resizeWindow = function () { 9792// windowWidth = $(window).width(); 9793// }; 9794// $(window).bind('resize.lightGallery', resizeWindow()); 9795// }, 9796// doCss: function () { 9797// var support = function () { 9798// var transition = ['transition', 'MozTransition', 'WebkitTransition', 'OTransition', 'msTransition', 'KhtmlTransition']; 9799// var root = document.documentElement; 9800// for (var i = 0; i < transition.length; i++) { 9801// if (transition[i] in root.style) { 9802// //cssPrefix = transition[i].replace('Transition', '').toLowerCase(); 9803// //cssPrefix == 'transition' ? cssPrefix = 'transition' : cssPrefix = ('-'+cssPrefix+'-transition'); 9804// return true; 9805// } 9806// } 9807// }; 9808// if (settings.useCSS && support()) { 9809// return true; 9810// } 9811// return false;
9812// }, 9813// enableTouch: function () { 9814// var $this = this; 9815// if (isTouch){ 9816// var startCoords = {}, 9817// endCoords = {}; 9818// $('body').on('touchstart.lightGallery', function(e) { 9819// endCoords = e.originalEvent.targetTouches[0]; 9820// startCoords.pageX = e.originalEvent.targetTouches[0].pageX; 9821// startCoords.pageY = e.originalEvent.targetTouches[0].pageY; 9822// }); 9823// $('body').on('touchmove.lightGallery', function(e) { 9824// var orig = e.originalEvent; 9825// endCoords = orig.targetTouches[0]; 9826// e.preventDefault(); 9827// }); 9828// $('body').on('touchend.lightGallery', function(e) { 9829// var distance = endCoords.pageX - startCoords.pageX, 9830// swipeThreshold = settings.swipeThreshold; 9831// if( distance >= swipeThreshold ){ 9832// $this.prevSlide(); 9833// clearInterval(interval); 9834// } 9835// else if( distance <= - swipeThreshold ){ 9836// $this.nextSlide(); 9837// clearInterval(interval); 9838// } 9839// }); 9840// } 9841// }, 9842// touch: function () { 9843// var xStart, xEnd; 9844// var $this = this; 9845// $('.lightGallery').bind('mousedown', function (e) { 9846// e.stopPropagation(); 9847// e.preventDefault(); 9848// xStart = e.pageX; 9849// }); 9850// $('.lightGallery').bind('mouseup', function (e) { 9851// e.stopPropagation(); 9852// e.preventDefault(); 9853// xEnd = e.pageX; 9854// if (xEnd - xStart > 20) { 9855// $this.prevSlide(); 9856// } else if (xStart - xEnd > 20) { 9857// $this.nextSlide(); 9858// } 9859// }); 9860// }, 9861// isVideo: function (src) { 9862// var youtube = src.match(/\/\/(?:www\.)?youtu(?:\.be|be\.com)\/(?:watch\?v=|embed\/)?([a-z0-9_\-]+)/i); 9863// var vimeo = src.match(/\/\/(?:www\.)?vimeo.com\/([0-9a-z\-_]+)/i); 9864// if (youtube || vimeo) { 9865// return true; 9866// } 9867// }, 9868// loadVideo: function (src, _id) { 9869// var youtube = src.match(/\/\/(?:www\.)?youtu(?:\.be|be\.com)\/(?:watch\?v=|embed\/)?([a-z0-9_\-]+)/i); 9870// var vimeo = src.match(/\/\/(?:www\.)?vimeo.com\/([0-9a-z\-_]+)/i); 9871// var video = ''; 9872// var a =''; 9873// if (youtube) { 9874// if (settings.videoAutoplay === true && lightGalleryOn === false) { 9875// a = '?autoplay=1&rel=0&wmode=opaque';
9876// } else { 9877// a = '?wmode=opaque'; 9878// } 9879// video = '<iframe id="video' + _id + '" width="560" height="315" src="//www.youtube.com/embed/' + youtube[1] + a + '" frameborder="0" allowfullscreen></iframe>'; 9880// } else if (vimeo) { 9881// if (settings.videoAutoplay === true && lightGalleryOn === false) { 9882// a = 'autoplay=1&'; 9883// } else { 9884// a = ''; 9885// } 9886// video = '<iframe id="video' + _id + '" width="560" height="315" src="http://player.vimeo.com/video/' + vimeo[1] + '?' + a + 'byline=0&portrait=0&color=' + settings.vimeoColor + '" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>'; 9887// } 9888// return '<div class="video_cont" style="max-width:' + settings.videoMaxWidth + 'px !important;"><div class="video">' + video + '</div></div>'; 9889// }, 9890// loadContent: function (index,rec) { 9891// var $this = this; 9892// var i, j, l = $children.length - index; 9893// var src; 9894// if(settings.preload>$children.length){ 9895// settings.preload = $children.length; 9896// } 9897// if (settings.mobileSrc === true && windowWidth <= settings.mobileSrcMaxWidth) { 9898// if (settings.dynamic == true) { 9899// src = settings.dynamicEl[index]['mobileSrc']; 9900// } else { 9901// src = $children.eq(index).attr('data-responsive-src'); 9902// } 9903// } else { 9904// if (settings.dynamic == true) { 9905// src = settings.dynamicEl[index]['src']; 9906// } else { 9907// src = $children.eq(index).attr('data-src'); 9908// } 9909// } 9910// if (!$this.isVideo(src)) { 9911// if(!$slide.eq(index).hasClass('loaded')){ 9912// $slide.eq(index).prepend('<img src="' + src + '" />'); 9913// $slide.eq(index).addClass('loaded'); 9914// } 9915// if(rec===false){ 9916// var complete = false; 9917// if ($slide.eq(index).find('img')[0].complete){ 9918// complete = true; 9919// } 9920// if(!complete){ 9921// $slide.eq(index).find('img').on('load error',function(){ 9922// var newIndex = index; 9923// for(var k =0;k<=settings.preload;k++){ 9924// if(k>=$children.length-index){ 9925// break; 9926// } 9927// $this.loadContent(newIndex+k,true); 9928// } 9929// for(var h =0;h<=settings.preload;h++){ 9930// if(newIndex-h<0){ 9931// break; 9932// } 9933// $this.loadContent(newIndex-h,true); 9934// } 9935// }); 9936// }else{ 9937// var newIndex = index; 9938// for(var k =0;k<=settings.preload;k++){ 9939// if(k>=$children.length-index){ 9940// break; 9941// } 9942// $this.loadContent(newIndex+k,true); 9943// } 9944// for(var h =0;h<=settings.preload;h++){ 9945// if(newIndex-h<0){ 9946// break; 9947// } 9948// $this.loadContent(newIndex-h,true); 9949// } 9950// } 9951// } 9952// } else { 9953// if(!$slide.eq(index).hasClass('loaded')){ 9954// if(rec===false && lightGalleryOn === true && settings.preload===0){ 9955// setTimeout(function () { 9956// $slide.eq(index).prepend($this.loadVideo(src, index)); 9957// }, settings.speed); 9958// }else{ 9959// $slide.eq(index).prepend($this.loadVideo(src, index)); 9960// } 9961// $slide.eq(index).addClass('loaded'); 9962 9963// if (settings.auto && settings.videoAutoplay === true) { 9964// clearInterval(interval); 9965// } 9966// } 9967 9968// if(rec===false){ 9969// var complete = false;
9970// if ($slide.eq(index).find('iframe')[0].complete){ 9971// complete = true; 9972// } 9973// if(!complete){ 9974// $slide.eq(index).find('iframe').on('load error',function(){ 9975// var newIndex = index; 9976// for(var k =0;k<=settings.preload;k++){ 9977// if(k>=$children.length-index){ 9978// break; 9979// } 9980// $this.loadContent(newIndex+k,true); 9981// } 9982// for(var h =0;h<=settings.preload;h++){ 9983// $this.loadContent(newIndex-h,true); 9984// } 9985// }); 9986// }else{ 9987// var newIndex = index; 9988// for(var k =0;k<=settings.preload;k++){ 9989// $this.loadContent(newIndex+k,true); 9990// } 9991// for(var h =0;h<=settings.preload;h++){ 9992// $this.loadContent(newIndex-h,true); 9993// } 9994// } 9995// } 9996 9997 9998// } 9999// }, 10000// addCaption: function () { 10001// if (settings.caption === true) { 10002// var i, title = false; 10003// for (i = 0; i < $children.length; i++) { 10004// if (settings.dynamic == true) { 10005// title = settings.dynamicEl[i]['caption']; 10006// } else { 10007// title = $children.eq(i).attr('data-title'); 10008// } 10009// if (typeof title == 'undefined' || title == null) { 10010// title = 'image ' + i + ''; 10011// } 10012// if (settings.captionLink === true) { 10013// var link = $children.eq(i).attr('data-link'); 10014// if (typeof link !== 'undefined' && link !== '') { 10015// link = link 10016// } else { 10017// link = '#' 10018// } 10019// $slide.eq(i).append('<div class="info group"><a href="' + link + '" class="title">' + title + '</a></div>'); 10020// } else { 10021// $slide.eq(i).append('<div class="info group"><span class="title">' + title + '</span></div>'); 10022// } 10023// } 10024// } 10025// }, 10026// addDesc: function () { 10027// if (settings.desc === true) { 10028// var i, description = false; 10029// for (i = 0; i < $children.length; i++) { 10030// if (settings.dynamic == true) { 10031// description = settings.dynamicEl[i]['desc']; 10032// } else { 10033// description = $children.eq(i).attr('data-desc');; 10034// } 10035// if (typeof description == 'undefined' || description == null) { 10036// description = 'image ' + i + ''; 10037// } 10038// if (settings.caption === false) { 10039// $slide.eq(i).append('<div class="info group"><span class="desc">' + description + '</span></div>'); 10040// } else { 10041// $slide.eq(i).find('.info').append('<span class="desc">' + description + '</span>'); 10042// } 10043// } 10044// } 10045// }, 10046// counter: function() { 10047// if (settings.counter === true) { 10048// var slideCount = $("#lightGallery-slider > div").length; 10049// $gallery.append("<div id='lightGallery_counter'><span id='lightGallery_counter_current'></span> / <span id='lightGallery_counter_all'>"+slideCount+"</span></div>"); 10050// } 10051// }, 10052// buildThumbnail: function () { 10053// if (settings.thumbnail === true && $children.length > 1) { 10054// var $this = this; 10055// $gallery.append('<div class="thumb_cont"><div class="thumb_info"><span class="close ib"><i class="bUi-iCn-rMv-16" aria-hidden="true"></i></span></div><div class="thumb_inner"></div></div>'); 10056// $thumb_cont = $gallery.find('.thumb_cont'); 10057// $prev.after('<a class="cLthumb"></a>'); 10058// $gallery.find('.cLthumb').bind('click touchend', function () { 10059// $thumb_cont.addClass('open'); 10060// if ($this.doCss() && settings.mode === 'slide') { 10061// $slide.eq(index).prevAll().removeClass('nextSlide').addClass('prevSlide'); 10062// $slide.eq(index).nextAll().removeClass('prevSlide').addClass('nextSlide'); 10063// } 10064// }); 10065// $gallery.find('.close').bind('click touchend', function () { 10066// $thumb_cont.removeClass('open'); 10067// }); 10068// var thumbInfo = $gallery.find('.thumb_info'); 10069// var $thumb_inner = $gallery.find('.thumb_inner'); 10070// var thumbList = ''; 10071// var thumbImg; 10072// if (settings.dynamic == true) { 10073// for (var i = 0; i < settings.dynamicEl.length; i++) { 10074// thumbImg = settings.dynamicEl[i]['thumb']; 10075// thumbList += '<div class="thumb"><img src="' + thumbImg + '" /></div>'; 10076// } 10077// } else { 10078// $children.each(function () { 10079// if (settings.exThumbImage === false || typeof $(this).attr(settings.exThumbImage) == 'undefined' || $(this).attr(settings.exThumbImage) == null) { 10080// thumbImg = $(this).find('img').attr('src'); 10081// } else { 10082// thumbImg = $(this).attr(settings.exThumbImage); 10083// } 10084// thumbList += '<div class="thumb"><img src="' + thumbImg + '" /></div>'; 10085// }); 10086// } 10087// $thumb_inner.append(thumbList); 10088// $thumb = $thumb_inner.find('.thumb'); 10089// $thumb.bind('click touchend', function () { 10090// usingThumb = true; 10091// var index = $(this).index(); 10092// $thumb.removeClass('active'); 10093// $(this).addClass('active'); 10094// $this.slide(index); 10095// clearInterval(interval); 10096// }); 10097// thumbInfo.prepend('<span class="ib count">' + settings.lang.allPhotos + ' (' + $thumb.length + ')</span>'); 10098// } 10099// }, 10100// slideTo: function () { 10101// var $this = this; 10102// if (settings.controls === true && $children.length > 1) { 10103// $gallery.append('<div id="lightGallery-action"><a id="lightGallery-prev"></a><a id="lightGallery-next"></a></div>'); 10104// $prev = $gallery.find('#lightGallery-prev'); 10105// $next = $gallery.find('#lightGallery-next'); 10106// $prev.bind('click', function () { 10107// $this.prevSlide(); 10108// clearInterval(interval); 10109// }); 10110// $next.bind('click', function () { 10111// $this.nextSlide(); 10112// clearInterval(interval); 10113// }); 10114// } 10115// }, 10116// autoStart: function () { 10117// var $this = this; 10118// if (settings.auto === true) { 10119// interval = setInterval(function () { 10120// if (index + 1 < $children.length) { 10121// index = index; 10122// } else { 10123// index = -1; 10124// } 10125// index++; 10126// $this.slide(index); 10127// }, settings.pause); 10128// } 10129// }, 10130// keyPress: function () { 10131// var $this = this; 10132// $(window).bind('keyup.lightGallery', function (e) { 10133// e.preventDefault(); 10134// e.stopPropagation(); 10135// if (e.keyCode === 37) { 10136// $this.prevSlide(); 10137// clearInterval(interval); 10138// } 10139// if (e.keyCode === 38 && settings.thumbnail === true) { 10140// if (!$thumb_cont.hasClass('open')) { 10141// if ($this.doCss() && settings.mode === 'slide') { 10142// $slide.eq(index).prevAll().removeClass('nextSlide').addClass('prevSlide'); 10143// $slide.eq(index).nextAll().removeClass('prevSlide').addClass('nextSlide'); 10144// } 10145// $thumb_cont.addClass('open'); 10146// } 10147// } else if (e.keyCode === 39) { 10148// $this.nextSlide(); 10149// clearInterval(interval); 10150// } 10151// if (e.keyCode === 40 && settings.thumbnail === true) { 10152// if ($thumb_cont.hasClass('open')) { 10153// $thumb_cont.removeClass('open'); 10154// } 10155// } else if (settings.escKey === true && e.keyCode === 27) { 10156// if (settings.thumbnail === true && $thumb_cont.hasClass('open')) { 10157// $thumb_cont.removeClass('open'); 10158// } else { 10159// $this.destroy(); 10160// } 10161// } 10162// }); 10163// }, 10164// nextSlide: function () { 10165// var $this = this; 10166// index = $slide.index($slide.eq(prevIndex)); 10167// if (index + 1 < $children.length) { 10168// index++; 10169// $this.slide(index); 10170// } else { 10171// if (settings.loop) { 10172// index = 0; 10173// $this.slide(index); 10174// } else if (settings.mode === 'fade' && settings.thumbnail === true && $children.length > 1) { 10175// $thumb_cont.addClass('open'); 10176// } 10177// } 10178// settings.onSlideNext.call(this); 10179// }, 10180// prevSlide: function () { 10181// var $this = this; 10182// index = $slide.index($slide.eq(prevIndex)); 10183// if (index > 0) { 10184// index--; 10185// $this.slide(index); 10186// } else { 10187// if (settings.loop) { 10188// index = $children.length - 1; 10189// $this.slide(index); 10190// } else if (settings.mode === 'fade' && settings.thumbnail === true && $children.length > 1) { 10191// $thumb_cont.addClass('open'); 10192// } 10193// } 10194// settings.onSlidePrev.call(this); 10195// }, 10196// slide: function (index) { 10197// this.loadContent(index,false); 10198// if (lightGalleryOn) { 10199// if (!$slider.hasClass('on')) { 10200// $slider.addClass('on'); 10201// } 10202// if (this.doCss() && settings.speed !== '') { 10203// if (!$slider.hasClass('speed')) { 10204// $slider.addClass('speed'); 10205// } 10206// if (aSpeed === false) { 10207// $slider.css('transition-duration', settings.speed + 'ms'); 10208// aSpeed = true; 10209// } 10210// } 10211// if (this.doCss() && settings.easing !== '') { 10212// if (!$slider.hasClass('timing')) { 10213// $slider.addClass('timing'); 10214// } 10215// if (aTiming === false) { 10216// $slider.css('transition-timing-function', settings.easing); 10217// aTiming = true; 10218// } 10219// } 10220// settings.onSlideBefore.call(this); 10221// } 10222// if (settings.mode === 'slide') { 10223// var isiPad = navigator.userAgent.match(/iPad/i) != null; 10224// if (this.doCss() && !$slider.hasClass('slide') && !isiPad) { 10225// $slider.addClass('slide'); 10226// }else if(this.doCss() && !$slider.hasClass('useLeft') &&isiPad){ 10227// $slider.addClass('useLeft'); 10228// } 10229// /* if(this.doCss()){ 10230// $slider.css({ 'transform' : 'translate3d('+(-index*100)+'%, 0px, 0px)' }); 10231// }*/ 10232// if (!this.doCss() && !lightGalleryOn) { 10233// $slider.css({ 10234// left: (-index * 100) + '%' 10235// }); 10236// //$slide.eq(index).css('transition','none'); 10237// } else if (!this.doCss() && lightGalleryOn) { 10238// $slider.animate({ 10239// left: (-index * 100) + '%' 10240// }, settings.speed, settings.easing); 10241// } 10242// } else if (settings.mode === 'fade') { 10243// if (this.doCss() && !$slider.hasClass('fadeM')) { 10244// $slider.addClass('fadeM'); 10245// } else if (!this.doCss() && !$slider.hasClass('animate')) { 10246// $slider.addClass('animate'); 10247// } 10248// if (!this.doCss() && !lightGalleryOn) { 10249// $slide.fadeOut(100); 10250// $slide.eq(index).fadeIn(100); 10251// } else if (!this.doCss() && lightGalleryOn) { 10252// $slide.eq(prevIndex).fadeOut(settings.speed, settings.easing); 10253// $slide.eq(index).fadeIn(settings.speed, settings.easing); 10254// } 10255// } 10256// if (index + 1 >= $children.length && settings.auto && settings.loop === false) { 10257// clearInterval(interval); 10258// } 10259// $slide.eq(prevIndex).removeClass('current'); 10260// $slide.eq(index).addClass('current'); 10261// if (this.doCss() && settings.mode === 'slide') { 10262// if (usingThumb === false) { 10263// $('.prevSlide').removeClass('prevSlide'); 10264// $('.nextSlide').removeClass('nextSlide'); 10265// $slide.eq(index - 1).addClass('prevSlide'); 10266// $slide.eq(index + 1).addClass('nextSlide'); 10267// } else { 10268// $slide.eq(index).prevAll().removeClass('nextSlide').addClass('prevSlide'); 10269// $slide.eq(index).nextAll().removeClass('prevSlide').addClass('nextSlide'); 10270// } 10271// } 10272// if (settings.thumbnail === true && $children.length > 1) { 10273//
10273 $thumb.removeClass('active'); 10274// $thumb.eq(index).addClass('active'); 10275// } 10276// if (settings.controls && settings.hideControlOnEnd && settings.loop === false && $children.length > 1) { 10277// var l = $children.length; 10278// l = parseInt(l)-1; 10279// if (index === 0) { 10280// $prev.addClass('disabled'); 10281// $next.removeClass('disabled'); 10282// } else if (index === l) { 10283// $prev.removeClass('disabled'); 10284// $next.addClass('disabled'); 10285// } else { 10286// $prev.add($next).removeClass('disabled'); 10287// } 10288// } 10289// prevIndex = index; 10290// lightGalleryOn === false ? settings.onOpen.call(this) : settings.onSlideAfter.call(this); 10291// lightGalleryOn = true; 10292// usingThumb = false; 10293// if (settings.counter) { 10294// $("#lightGallery_counter_current").text(index+1); 10295// } 10296// }, 10297// destroy: function () { 10298// settings.onBeforeClose.call(this); 10299// lightGalleryOn = false; 10300// aTiming = false; 10301// aSpeed = false; 10302// usingThumb = false; 10303// clearInterval(interval); 10304// $('.lightGallery').off('mousedown mouseup'); 10305// $('body').off('touchstart.lightGallery touchmove.lightGallery touchend.lightGallery'); 10306// $(window).off('resize.lightGallery keyup.lightGallery'); 10307// $gallery.addClass('fadeM'); 10308// setTimeout(function () { 10309// $galleryCont.remove(); 10310// $('body').removeClass('lightGallery'); 10311// }, 500); 10312// settings.onCloseAfter.call(this); 10313// } 10314// }; 10315// lightGallery.init(); 10316// return this; 10317// }; 10318// }(jQuery)); 10319 10320 10321 10322 10323 10324 10325 10326 10327 10328 10329 10330 10331 10332 10333/*! 10334 * 10335 * jQuery collagePlus Plugin v0.3.3 10336 * https://github.com/ed-lea/jquery-collagePlus 10337 * 10338 * Copyright 2012, Ed Lea twitter.com/ed_lea 10339 * 10340 * built for http://qiip.me 10341 * 10342 * Dual licensed under the MIT or GPL Version 2 licenses. 10343 * http://www.opensource.org/licenses/mit-license.php 10344 * http://www.opensource.org/licenses/GPL-2.0 10345 * 10346 */ 10347// ;(function(e){e.fn.collagePlus=function(t){function n(t,n,i,s){var o=i.padding*(t.length-1)+t.length*t[0][3],u=i.albumWidth-o,a=u/(n-o),f=o,l=n<i.albumWidth?true:false;for(var c=0;c<t.length;c++){var h=e(t[c][0]),p=Math.floor(t[c][1]*a),d=Math.floor(t[c][2]*a),v=!!(c<t.length-1);if(i.allowPartialLastRow===true&&l===true){p=t[c][1];d=t[c][2]}f+=p;if(!v&&f<i.albumWidth){if(i.allowPartialLastRow===true&&l===true){p=p}else{p=p+(i.albumWidth-f)}}p--;var m=h.is("img")?h:h.find("img");m.width(p);if(!h.is("img")){h.width(p+t[c][3])}m.height(d);if(!h.is("img")){h.height(d+t[c][4])}r(h,v,i);m.one("load",function(e){return function(){if(i.effect=="default"){e.animate({opacity:"1"},{duration:i.fadeSpeed})}else{if(i.direction=="vertical"){var t=s<=10?s:10}else{var t=c<=9?c+1:10}e.removeClass(function(e,t){return(t.match(/\beffect-\S+/g)||[]).join(" ")});e.addClass(i.effect);e.addClass("effect-duration-"+t)}}}(h)).each(function(){if(this.complete)e(this).trigger("load")})}}function r(e,t,n){var r={"margin-bottom":n.padding+"px","margin-right":t?n.padding+"px":"0px",display:n.display,"vertical-align":"bottom",overflow:"hidden"};return e.css(r)}function i(t){$img=e(t);var n=new Array;n["w"]=parseFloat($img.css("border-left-width"))+parseFloat($img.css("border-right-width"));n["h"]=parseFloat($img.css("border-top-width"))+parseFloat($img.css("border-bottom-width"));return n}return this.each(function(){var r=0,s=[],o=1,u=e(this);e.fn.collagePlus.defaults.albumWidth=u.width();e.fn.collagePlus.defaults.padding=parseFloat(u.css("padding-left"));e.fn.collagePlus.defaults.images=u.children();var a=e.extend({},e.fn.collagePlus.defaults,t);a.images.each(function(t){var u=e(this),f=u.is("img")?u:e(this).find("img");var l=typeof f.data("width")!="undefined"?f.data("width"):f.width(),c=typeof f.data("height")!="undefined"?f.data("height"):f.height();var h=i(f);f.data("width",l);f.data("height",c);var p=Math.ceil(l/c*a.targetHeight),d=Math.ceil(a.targetHeight);s.push([this,p,d,h["w"],h["h"]]);r+=p+h["w"]+a.padding;if(r>a.albumWidth&&s.length!=0){n(s,r-a.padding,a,o);delete r;delete s;r=0;s=[];o+=1}if(a.images.length-1==t&&s.length!=0){n(s,r,a,o);delete r;delete s;r=0;s=[];o+=1}})})};e.fn.collagePlus.defaults={targetHeight:400,fadeSpeed:"fast",display:"inline-block",effect:"default",direction:"vertical",allowPartialLastRow:false}})(jQuery); 10348 10349 10350/*! 10351 * 10352 * jQuery collagePlus Plugin v0.3.3 10353 * https://github.com/ed-lea/jquery-collagePlus 10354 * 10355 * Copyright 2012, Ed Lea twitter.com/ed_lea 10356 * 10357 * built for http://qiip.me 10358 * 10359 * Dual licensed under the MIT or GPL Version 2 licenses. 10360 * http://www.opensource.org/licenses/mit-license.php 10361 * http://www.opensource.org/licenses/GPL-2.0 10362 * 10363 */ 10364 10365 10366 10367 10368 10369// ;(function( $ ) { 10370 10371 10372// $.fn.collagePlus = function( options ) { 10373 10374// return this.each(function() { 10375 10376// /* 10377// * 10378// * set up vars 10379// * 10380// */ 10381 10382// // track row width by adding images, padding and css borders etc 10383// var row = 0, 10384// // collect elements to be re-sized in current row 10385// elements = [], 10386// // track the number of rows generated 10387// rownum = 1, 10388// // needed for creating some additional defaults that are actually obtained 10389// // from the dom, which maybe doesn't make them defaults ?! 10390// $this = $(this); 10391 10392 10393// // width of the area the collage will be in 10394// $.fn.collagePlus.defaults.albumWidth = $this.width(); 10395// // padding between the images. Using padding left as we assume padding is even all the way round 10396// $.fn.collagePlus.defaults.padding = parseFloat( $this.css('padding-left') ); 10397// // object that contains the images to collage 10398// $.fn.collagePlus.defaults.images = $this.children(); 10399 10400// var settings = $.extend({}, $.fn.collagePlus.defaults, options); 10401 10402// settings.images.each( 10403// function(index){ 10404 10405// /* 10406// * 10407// * Cache selector
10408// * Even if first child is not an image the whole sizing is based on images 10409// * so where we take measurements, we take them on the images 10410// * 10411// */ 10412// var $this = $(this), 10413// $img = ($this.is("img")) ? $this : $(this).find("img"); 10414 10415 10416 10417// /* 10418// * 10419// * get the current image size. Get image size in this order 10420// * 10421// * 1. from <img> tag 10422// * 2. from data set from initial calculation 10423// * 3. after loading the image and checking it's actual size 10424// * 10425// */ 10426// var w = (typeof $img.data("width") != 'undefined') ? $img.data("width") : $img.width(), 10427// h = (typeof $img.data("height") != 'undefined') ? $img.data("height") : $img.height(); 10428 10429 10430 10431// /* 10432// * 10433// * Get any current additional properties that may affect the width or height 10434// * like css borders for example 10435// * 10436// */ 10437// var imgParams = getImgProperty($img); 10438 10439 10440// /* 10441// * 10442// * store the original size for resize events 10443// * 10444// */ 10445// $img.data("width", w); 10446// $img.data("height", h); 10447 10448 10449 10450// /* 10451// * 10452// * calculate the w/h based on target height 10453// * this is our ideal size, but later we'll resize to make it fit 10454// * 10455// */ 10456// var nw = Math.ceil(w/h*settings.targetHeight), 10457// nh = Math.ceil(settings.targetHeight); 10458 10459// /* 10460// * 10461// * Keep track of which images are in our row so far 10462// * 10463// */ 10464// elements.push([this, nw, nh, imgParams['w'], imgParams['h']]); 10465 10466// /* 10467// * 10468// * calculate the width of the element including extra properties 10469// * like css borders 10470// * 10471// */ 10472// row += nw + imgParams['w'] + settings.padding; 10473 10474// /* 10475// * 10476// * if the current row width is wider than the parent container 10477// * it's time to make a row out of our images 10478// * 10479// */ 10480// if( row > settings.albumWidth && elements.length != 0 ){ 10481 10482// // call the method that calculates the final image sizes 10483// // remove one set of padding as it's not needed for the last image in the row 10484// resizeRow(elements, (row - settings.padding), settings, rownum); 10485 10486// // reset our row 10487// delete row; 10488// delete elements; 10489// row = 0; 10490// elements = []; 10491// rownum += 1; 10492// } 10493 10494 10495// /* 10496// * 10497// * if the images left are not enough to make a row 10498// * then we'll force them to make one anyway 10499// * 10500// */ 10501// if ( settings.images.length-1 == index && elements.length != 0){ 10502// resizeRow(elements, row, settings, rownum); 10503 10504// // reset our row 10505// delete row; 10506// delete elements; 10507// row = 0; 10508// elements = []; 10509// rownum += 1; 10510// } 10511// } 10512// ); 10513 10514// }); 10515 10516// function resizeRow( obj, row, settings, rownum) { 10517 10518// /* 10519// *
10520// * How much bigger is this row than the available space? 10521// * At this point we have adjusted the images height to fit our target height 10522// * so the image size will already be different from the original. 10523// * The resizing we're doing here is to adjust it to the album width. 10524// * 10525// * We also need to change the album width (basically available space) by 10526// * the amount of padding and css borders for the images otherwise 10527// * this will skew the result. 10528// * 10529// * This is because padding and borders remain at a fixed size and we only 10530// * need to scale the images. 10531// * 10532// */ 10533// var imageExtras = (settings.padding * (obj.length - 1)) + (obj.length * obj[0][3]), 10534// albumWidthAdjusted = settings.albumWidth - imageExtras, 10535// overPercent = albumWidthAdjusted / (row - imageExtras), 10536// // start tracking our width with know values that will make up the total width 10537// // like borders and padding 10538// trackWidth = imageExtras, 10539// // guess whether this is the last row in a set by checking if the width is less 10540// // than the parent width. 10541// lastRow = (row < settings.albumWidth ? true : false); 10542 10543 10544 10545 10546 10547// /* 10548// * Resize the images by the above % so that they'll fit in the album space 10549// */ 10550// for (var i = 0; i < obj.length; i++) { 10551 10552 10553 10554// var $obj = $(obj[i][0]), 10555// fw = Math.floor(obj[i][1] * overPercent), 10556// fh = Math.floor(obj[i][2] * overPercent), 10557// // if the element is the last in the row, 10558// // don't apply right hand padding (this is our flag for later) 10559// isNotLast = !!(( i < obj.length - 1 )); 10560 10561 10562// * Checking if the user wants to not stretch the images of the last row to fit the 10563// * parent element size 10564 10565// if(settings.allowPartialLastRow === true && lastRow === true){ 10566// fw = obj[i][1]; 10567// fh = obj[i][2]; 10568// } 10569 10570 10571// /* 10572// * 10573// * Because we use % to calculate the widths, it's possible that they are 10574// * a few pixels out in which case we need to track this and adjust the 10575// * last image accordingly 10576// * 10577// */ 10578// trackWidth += fw; 10579 10580 10581// /* 10582// * 10583// * here we check if the combined images are exactly the width 10584// * of the parent. If not then we add a few pixels on to make 10585// * up the difference. 10586// * 10587// * This will alter the aspect ratio of the image slightly, but 10588// * by a noticable amount. 10589// * 10590// * If the user doesn't want full width last row, we check for that here 10591// * 10592// */ 10593// if(!isNotLast && trackWidth < settings.albumWidth){ 10594// if(settings.allowPartialLastRow === true && lastRow === true){ 10595// fw = fw; 10596// }else{ 10597// fw = fw + (settings.albumWidth - trackWidth); 10598// } 10599// } 10600 10601// fw--; 10602 10603// /* 10604// * 10605// * We'll be doing a few things to the image so here we cache the image selector 10606// * 10607// * 10608// */ 10609// var $img = ( $obj.is("img") ) ? $obj : $obj.find("img"); 10610 10611// /* 10612// * 10613// * Set the width of the image and parent element 10614// * if the resized element is not an image, we apply it to the child image also 10615// * 10616// * We need to check if it's an image as the css borders are only measured on 10617// * images. If the parent is a div, we need make the contained image smaller 10618// * to accommodate the css image borders. 10619// * 10620// */ 10621// $img.width(fw); 10622// if( !$obj.is("img") ){ 10623// $obj.width(fw + obj[i][3]); 10624// } 10625 10626 10627// /* 10628// * 10629// * Set the height of the image 10630// * if the resized element is not an image, we apply it to the child image also 10631// * 10632// */
10633// $img.height(fh); 10634// if( !$obj.is("img") ){ 10635// $obj.height(fh + obj[i][4]); 10636// } 10637 10638 10639// /* 10640// * 10641// * Apply the css extras like padding 10642// * 10643// */ 10644// applyModifications($obj, isNotLast, settings); 10645 10646 10647// /* 10648// * 10649// * Assign the effect to show the image 10650// * Default effect is using jquery and not CSS3 to support more browsers 10651// * Wait until the image is loaded to do this 10652// * 10653// */ 10654 10655// $img 10656// .one('load', function (target) { 10657// return function(){ 10658// if( settings.effect == 'default'){ 10659// target.animate({opacity: '1'},{duration: settings.fadeSpeed}); 10660// } else { 10661// if(settings.direction == 'vertical'){ 10662// var sequence = (rownum <= 10 ? rownum : 10); 10663// } else { 10664// var sequence = (i <= 9 ? i+1 : 10); 10665// } 10666// /* Remove old classes with the "effect-" name */ 10667// target.removeClass(function (index, css) { 10668// return (css.match(/\beffect-\S+/g) || []).join(' '); 10669// }); 10670// target.addClass(settings.effect); 10671// target.addClass("effect-duration-" + sequence); 10672// } 10673// } 10674// }($obj)) 10675// /* 10676// * fix for cached or loaded images 10677// * For example if images are loaded in a "window.load" call we need to trigger 10678// * the load call again 10679// */ 10680// .each(function() { 10681// if(this.complete) $(this).trigger('load'); 10682// }); 10683 10684// } 10685 10686 10687 10688 10689 10690// } 10691 10692// /* 10693// * 10694// * This private function applies the required css to space the image gallery 10695// * It applies it to the parent element so if an image is wrapped in a <div> then 10696// * the css is applied to the <div> 10697// * 10698// */ 10699// function applyModifications($obj, isNotLast, settings) { 10700// var css = { 10701// // Applying padding to element for the grid gap effect 10702// 'margin-bottom' : settings.padding + "px", 10703// 'margin-right' : (isNotLast) ? settings.padding + "px" : "0px", 10704// // Set it to an inline-block by default so that it doesn't break the row 10705// 'display' : settings.display, 10706// // Set vertical alignment otherwise you get 4px extra padding 10707// 'vertical-align' : "bottom", 10708// // Hide the overflow to hide the caption 10709// 'overflow' : "hidden" 10710// }; 10711 10712// return $obj.css(css); 10713// } 10714 10715 10716// /* 10717// * 10718// * This private function calculates any extras like padding, border associated 10719// * with the image that will impact on the width calculations 10720// * 10721// */ 10722// function getImgProperty( img ) 10723// { 10724// $img = $(img); 10725// var params = new Array(); 10726// params["w"] = (parseFloat($img.css("border-left-width")) + parseFloat($img.css("border-right-width"))); 10727// params["h"] = (parseFloat($img.css("border-top-width")) + parseFloat($img.css("border-bottom-width"))); 10728// return params; 10729// } 10730 10731// }; 10732 10733// $.fn.collagePlus.defaults = { 10734// // the ideal height you want your images to be 10735// 'targetHeight' : 400, 10736// // how quickly you want images to fade in once ready can be in ms, "slow" or "fast" 10737// 'fadeSpeed' : "fast", 10738// // how the resized block should be displayed. inline-block by default so that it doesn't break the row 10739// 'display' : "inline-block", 10740// // which effect you want to use for revealing the images (note CSS3 browsers only), 10741// 'effect' : 'default', 10742// // effect delays can either be applied per row to give the impression of descending appearance 10743// // or horizontally, so more like a flock of birds changing direction 10744// 'direction' : 'vertical', 10745// // Sometimes there is just one image on the last row and it gets blown up to a huge size to fit the 10746// // parent div width. To stop this behaviour, set this to true 10747// 'allowPartialLastRow' : false 10748// }; 10749 10750// })( jQuery ); 10751 10752// /*! 10753// * 10754// * jquery.removeWhitespace.js 10755// * 10756// */ 10757// ;(function(a){a.fn.removeWhitespace=function(){this.contents().filter(function(){return this.nodeType==3&&!/\S/.test(this.nodeValue)}).remove();return this}})(jQuery); 10758 10759 10760/*! 10761 * 10762 * jQuery collageCaption Plugin v0.1.1
10763 * extra for collagePlus plugin 10764 * https://github.com/ed-lea/jquery-collagePlus 10765 * 10766 * Copyright 2012, Ed Lea twitter.com/ed_lea 10767 * 10768 * built for http://qiip.me 10769 * 10770 * Dual licensed under the MIT or GPL Version 2 licenses. 10771 * http://www.opensource.org/licenses/mit-license.php 10772 * http://www.opensource.org/licenses/GPL-2.0 10773 * 10774 */ 10775// ;(function(e){e.fn.collageCaption=function(t){var n={images:e(this).children(),background:"black",opacity:"0.5",speed:100,cssClass:"Caption"};var r=e.extend({},n,t);return this.each(function(){var t=0,n=[];r.images.each(function(t){var n=e(this);if(typeof n.data("caption")=="undefined"){return}var i='<div class="'+r.cssClass+'" style="position:relative;"><div class="Caption_Background" style="background-color:'+r.background+";opacity:"+r.opacity+';position:relative;top:0;"></div><div class="Caption_Content" style="position:relative;">'+n.data("caption")+"</div></div>";n.append(i);var s=n.find("."+r.cssClass),o=n.find(".Caption_Background"),u=n.find(".Caption_Content");var a=s.height();o.height(a);u.css("top","-"+a+"px");n.bind({mouseenter:function(e){s.animate({top:-1*a},{duration:r.speed,queue:false})},mouseleave:function(e){s.animate({top:0},{duration:r.speed,queue:false})}})});return this})}})(jQuery); 10776 10777 10778 10779/*! 10780 * 10781 * jQuery collageCaption Plugin v0.1.1 10782 * extra for collagePlus plugin 10783 * https://github.com/ed-lea/jquery-collagePlus 10784 * 10785 * Copyright 2012, Ed Lea twitter.com/ed_lea 10786 * 10787 * built for http://qiip.me 10788 * 10789 * Dual licensed under the MIT or GPL Version 2 licenses. 10790 * http://www.opensource.org/licenses/mit-license.php 10791 * http://www.opensource.org/licenses/GPL-2.0 10792 * 10793 */ 10794 10795 10796 10797 10798 10799// ;(function( $ ) { 10800// $.fn.collageCaption = function( options ) { 10801// // Defaults 10802// var defaults = { 10803// 'images' : $(this).children(), 10804// 'background' : "black", 10805// 'opacity' : "0.5", 10806// 'speed' : 100, 10807// 'cssClass' : "Caption" 10808// }; 10809// var settings = $.extend({}, defaults, options); 10810// return this.each(function() { 10811// var row = 0, 10812// elements = []; 10813 10814// settings.images.each( 10815// function(index){ 10816// var $this = $(this); 10817// if (typeof $this.data("caption") == 'undefined'){ 10818// return; 10819// } 10820// var html = '<div class="' + settings.cssClass + '" style="position:relative;"><div class="Caption_Background" style="background-color:' + 10821// settings.background + ';opacity:' + 10822// settings.opacity + ';position:relative;top:0;"></div><div class="Caption_Content" style="position:relative;">' + 10823// $this.data("caption") + '</div></div>'; 10824// $this.append(html); 10825// var $cap = $this.find("." + settings.cssClass), 10826// $capbg = $this.find(".Caption_Background"), 10827// $captxt = $this.find(".Caption_Content"); 10828// var h = $cap.height(); 10829 10830// $capbg.height(h); 10831// $captxt.css("top", "-" + h + "px"); 10832// $this.bind( 10833// { 10834// mouseenter: function(e) { 10835// $cap.animate({ top: (-1 * h) }, { duration: settings.speed, queue: false }); 10836// }, 10837// mouseleave: function(e) { 10838// $cap.animate({ top: 0 }, { duration: settings.speed, queue: false }); 10839// } 10840// } 10841// ); 10842// } 10843// ); 10844// return this; 10845// }); 10846// }; 10847// })( jQuery );; 10848 10849 10850 10851 10852 10853 10854 10855 10856 10857 10858 10859 10860 10861 10862 10863 10864 10865 10866 10867/*! 10868 10869Name: Reading Time 10870Dependencies: jQuery 10871Author: Michael Lynch 10872Author URL: http://michaelynch.com 10873Date Created: August 14, 2013 10874Date Updated: June 10, 2014 10875Licensed under the MIT license 10876 10877*/ 10878 10879;(function($) { 10880 10881 $.fn.readingTime = function(options) { 10882 10883 //return if no element was bound 10884 //so chained events can continue 10885 if(!this.length) { 10886 return this; 10887 } 10888 10889 //define default parameters 10890 var defaults = { 10891 readingTimeTarget: '.eta', 10892 wordCountTarget: null, 10893 wordsPerMinute: 270, 10894 round: true, 10895 lang: 'en', 10896 lessThanAMinuteString: '', 10897 prependTimeString: '', 10898 prependWordString: '', 10899 remotePath: null, 10900 remoteTarget: null 10901 } 10902 10903 //define plugin 10904 var plugin = this; 10905 10906 //define element 10907 var el = $(this); 10908 10909 //merge defaults and options 10910 plugin.settings = $.extend({}, defaults, options); 10911 10912 //define vars 10913 var readingTimeTarget = plugin.settings.readingTimeTarget; 10914 var wordCountTarget = plugin.settings.wordCountTarget; 10915 var wordsPerMinute = plugin.settings.wordsPerMinute; 10916 var round = plugin.settings.round; 10917 var lang = plugin.settings.lang; 10918 var lessThanAMinuteString = plugin.settings.lessThanAMinuteString; 10919 var prependTimeString = plugin.settings.prependTimeString; 10920 var prependWordString = plugin.settings.prependWordString; 10921 var remotePath = plugin.settings.remotePath; 10922 var remoteTarget = plugin.settings.remoteTarget; 10923 10924 10925 //if lang is set to polish 10926 if(lang == 'pl') { 10927 10928 var lessThanAMinute = lessThanAMinuteString || "Mniej niż minutę"; 10929 10930 var minShortForm = 'min'; 10931 10932 //if lang is set to italian 10933 } else if(lang == 'it') { 10934 10935 var lessThanAMinute = lessThanAMinuteString || "Meno di un minuto"; 10936 10937 var minShortForm = 'min'; 10938 10939 //if lang is set to french 10940 } else if(lang == 'fr') { 10941 10942 var lessThanAMinute = lessThanAMinuteString || "Moins d'une minute"; 10943 10944 var minShortForm = 'min'; 10945 10946 //if lang is set to german 10947 } else if(lang == 'de') { 10948 10949 var lessThanAMinute = lessThanAMinuteString || "Weniger als eine Minute"; 10950 10951 var minShortForm = 'min'; 10952 10953 //if lang is set to spanish 10954 } else if(lang == 'es') { 10955 10956 var lessThanAMinute = lessThanAMinuteString || "Menos de un minuto"; 10957 10958 var minShortForm = 'min'; 10959 10960 //if lang is set to dutch 10961 } else if(lang == 'nl') { 10962 10963 var lessThanAMinute = lessThanAMinuteString || "Minder dan een minuut"; 10964 10965 var minShortForm = 'min'; 10966 10967 //default lang is english 10968 } else { 10969 10970 var lessThanAMinute = lessThanAMinuteString || 'Less than a minute'; 10971 10972 var minShortForm = 'min'; 10973 10974 } 10975 10976 var setTime = function(text) { 10977 10978 //split text by spaces to define total words 10979 var totalWords = text.trim().split(/\s+/g).length; 10980 10981 //define words per second based on words per minute (wordsPerMinute) 10982 var wordsPerSecond = wordsPerMinute / 60; 10983 10984 //define total reading time in seconds 10985 var totalReadingTimeSeconds = totalWords / wordsPerSecond; 10986 10987 //define reading time in minutes 10988 //if round is set to true 10989 if(round === true) { 10990 10991 var readingTimeMinutes = Math.round(totalReadingTimeSeconds / 60); 10992 10993 //if round is set to false 10994 } else { 10995 10996 var readingTimeMinutes = Math.floor(totalReadingTimeSeconds / 60); 10997 10998 } 10999 11000 //define remaining reading time seconds 11001 var readingTimeSeconds = Math.round(totalReadingTimeSeconds - readingTimeMinutes * 60); 11002 11003 //if round is set to true 11004 if(round === true) { 11005 11006 //if minutes are greater than 0 11007 if(readingTimeMinutes > 0) { 11008 11009 //set reading time by the minute 11010 $(readingTimeTarget).text(prependTimeString + readingTimeMinutes + ' ' + minShortForm); 11011 11012 } else { 11013 11014 //set reading time as less than a minute 11015 $(readingTimeTarget).text(prependTimeString + lessThanAMinute); 11016 11017 } 11018 11019 //if round is set to false 11020 } else { 11021 11022 //format reading time 11023 var readingTime = readingTimeMinutes + ':' + readingTimeSeconds; 11024 11025 //set reading time in minutes and seconds 11026 $(readingTimeTarget).text(prependTimeString + readingTime); 11027 11028 } 11029 11030 //if word count container isn't blank or undefined 11031 if(wordCountTarget !== '' && wordCountTarget !== undefined) { 11032 11033 //set word count 11034 $(wordCountTarget).text(prependWordString + totalWords); 11035 11036 } 11037 11038 }; 11039 11040 //for each element 11041 el.each(function() { 11042 11043 //if remotePath and remoteTarget aren't null 11044 if(remotePath != null && remoteTarget != null) { 11045 11046 //get contents of remote file 11047 $.get(remotePath, function(data) { 11048 11049 //set time using the remote target found in the remote file 11050 setTime($('<div>').html(data).find(remoteTarget).text()); 11051 11052 }); 11053 11054 } else { 11055 11056 //set time using the targeted element 11057 setTime(el.text()); 11058 11059 } 11060 11061 }); 11062 11063 } 11064 11065})(jQuery); 11066 11067 11068 11069 11070 11071 11072 11073 11074 11075 11076 11077 11078 11079 11080 11081 11082 11083 11084 11085 11086 11087 11088 11089 11090 11091/* 11092 * jQuery Shorten plugin 1.1.0 11093 * 11094 * https://github.com/viralpatel/jquery.shorten 11095 * Copyright (c) 2014 Viral Patel 11096 * http://viralpatel.net 11097 * 11098 * Licensed under the MIT license: 11099 * http://www.opensource.org/licenses/mit-license.php 11100 */ 11101 11102(function($) { 11103 $.fn.shorten = function(settings) { 11104 "use strict"; 11105 11106 var config = { 11107 showChars: 100, 11108 ellipsesText: "...", 11109 moreText: "more", 11110 lessText: "less", 11111 errMsg: null, 11112 force: false 11113 }; 11114 11115 if (settings) { 11116 $.extend(config, settings); 11117 } 11118 11119 if ($(this).data('jquery.shorten') && !config.force) { 11120 return false;
11121 } 11122 $(this).data('jquery.shorten', true); 11123 11124 return this.each(function() { 11125 var $this = $(this); 11126 11127 var content = $this.html(); 11128 var contentlen = $this.text().length; 11129 if (contentlen > config.showChars) { 11130 var c = content.substr(0, config.showChars); 11131 if (c.indexOf('<') >= 0){ 11132 var inTag = false; 11133 var bag = ''; 11134 var countChars = 0; 11135 var openTags = []; 11136 var tagName = null; 11137 11138 for (var i = 0, r = 0; r <= config.showChars; i++) { 11139 if (content[i] == '<' && !inTag) { 11140 inTag = true; 11141 11142 tagName = content.substring(i + 1, content.indexOf('>', i)); 11143 11144 if (tagName[0] == '/') { 11145 11146 11147 if (tagName != '/' + openTags[0]) { 11148 config.errMsg = 'ERROR en HTML: the top of the stack should be the tag that closes'; 11149 } else { 11150 openTags.shift(); 11151 } 11152 11153 } else { 11154 if (tagName.toLowerCase() != 'br') { 11155 openTags.unshift(tagName); 11156 } 11157 } 11158 } 11159 if (inTag && content[i] == '>') { 11160 inTag = false; 11161 } 11162 11163 if (inTag) { bag += content.charAt(i); } 11164 else { 11165 r++; 11166 if (countChars <= config.showChars) { 11167 bag += content.charAt(i); 11168 countChars++; 11169 } else 11170 { 11171 if (openTags.length > 0) 11172 { 11173 for (j = 0; j < openTags.length; j++) { 11174 bag += '</' + openTags[j] + '>'; 11175 } 11176 break; 11177 } 11178 } 11179 } 11180 } 11181 c = $('<div/>').html(bag + '<span class="ellip">' + config.ellipsesText + '</span>').html(); 11182 }else{ 11183 c+=config.ellipsesText; 11184 } 11185 11186 var html = '<div class="shortcontent">' + c +'</div>'; 11187 11188 $this.html(html); 11189 $this.find(".allcontent").hide(); 11190 $('.shortcontent p:last', $this).css('margin-bottom', 0); 11191 } 11192 }); 11193 11194 }; 11195 11196})(jQuery); 11197 11198 11199 11200 11201 11202 11203 11204 11205 11206 11207 11208 11209 11210 11211 11212 11213 11214 11215 11216 11217 11218 11219 11220 11221 11222;(function ($) { 11223 'use strict'; 11224 11225 var pluginName = 'selectric', 11226 classList = 'Input Items Open Disabled TempShow HideSelect Wrapper Hover Responsive Above', 11227 bindSufix = '.sl', 11228 defaults = { 11229 onOpen: $.noop, 11230 onClose: $.noop, 11231 onRefresh: $.noop, 11232 onChange: function(elm) { $(elm).change(); }, 11233 maxHeight: 300, 11234 keySearchTimeout: 500, 11235 arrowButtonMarkup: '<b class="button">▾</b>', 11236 disableOnMobile: true, 11237 openOnHover: false, 11238 expandToItemText: false, 11239 responsive: false, 11240 preventWindowScroll: true, 11241 inheritOriginalWidth: false, 11242 customClass: { 11243 prefix: pluginName, 11244 postfixes: classList, 11245 camelCase: true 11246 }, 11247 optionsItemBuilder: '{text}' // function(itemData, element, index) 11248 }, 11249 _utils = { 11250 // Replace diacritics 11251 replaceDiacritics: function(s) { 11252 // /[\340-\346]/g, // a 11253 // /[\350-\353]/g, // e 11254 // /[\354-\357]/g, // i 11255 // /[\362-\370]/g, // o 11256 // /[\371-\374]/g, // u 11257 // /[\361]/g, // n 11258 // /[\347]/g, // c 11259 // /[\377]/g // y 11260 var d = '40-46 50-53 54-57 62-70 71-74 61 47 77'.replace(/\d+/g, '\\3$&').split(' '), 11261 k = d.length; 11262 11263 while (k--) 11264 s = s.toLowerCase().replace(RegExp('[' + d[k] + ']', 'g'), 'aeiouncy'.charAt(k)); 11265 11266 return s; 11267 }, 11268 // https://gist.github.com/atesgoral/984375 11269 format: function(f) {var a=arguments;return(""+f).replace(/{(\d+|(\w+))}/g,function(s,i,p){return p&&a[1]?a[1][p]:a[i]})}, 11270 nextEnabledItem: function(selectItems, selected) { 11271 while ( selectItems[ selected = (selected + 1) % selectItems.length ].disabled ){} 11272 return selected; 11273 }, 11274 previousEnabledItem: function(selectItems, selected) { 11275 while ( selectItems[ selected = (selected > 0 ? selected : selectItems.length) - 1 ].disabled ){} 11276 return selected; 11277 } 11278 }, 11279 $doc = $(document), 11280 $win = $(window), 11281 Selectric = function(element, opts) { 11282 var _this = this, 11283 $original = $(element), 11284 $input, $items, $wrapper, $label, $outerWrapper, $li, 11285 isOpen = false, 11286 isEnabled = false, 11287 selected, 11288 currValue, 11289 itemsHeight,
11290 itemsInnerHeight, 11291 finalWidth, 11292 optionsLength, 11293 eventTriggers, 11294 isMobile = /android|ip(hone|od|ad)/i.test(navigator.userAgent); 11295 11296 function _init(opts) { 11297 _this.options = $.extend(true, {}, defaults, _this.options, opts); 11298 _this.classes = {}; 11299 11300 // Disable on mobile browsers 11301 if ( _this.options.disableOnMobile && isMobile ){ 11302 _this.disableOnMobile = true; 11303 return; 11304 } 11305 11306 // Preserve data 11307 _destroy(true); 11308 11309 // Generate classNames for elements 11310 var customClass = _this.options.customClass, 11311 postfixes = customClass.postfixes.split(' '), 11312 originalWidth = $original.width(); 11313 11314 $.each(classList.split(' '), function(i, elm){ 11315 var c = customClass.prefix + postfixes[i]; 11316 _this.classes[elm.toLowerCase()] = customClass.camelCase ? c : c.replace(/([A-Z])/g, "-$&").toLowerCase(); 11317 }); 11318 11319 $input = $('<input class="' + _this.classes.input + '"/>').prop('readonly', isMobile); 11320 $items = $('<div class="' + _this.classes.items + '" tabindex="-1"></div>'); 11321 $wrapper = $('<div class="' + customClass.prefix + '">' + _this.options.arrowButtonMarkup + '</div>'); 11322 $label = $('<p class="label"/>'); 11323 $outerWrapper = $original.wrap('<div>').parent().append($wrapper.prepend($label), $items, $input); 11324 11325 eventTriggers = { 11326 open : _open, 11327 close : _close, 11328 destroy : _destroy, 11329 refresh : _refresh, 11330 init : _init 11331 }; 11332 11333 $original.on(eventTriggers).wrap('<div class="' + _this.classes.hideselect + '">'); 11334 $.extend(_this, eventTriggers); 11335 11336 if ( _this.options.inheritOriginalWidth && originalWidth > 0 ) { 11337 $outerWrapper.width(originalWidth); 11338 } 11339 11340 isEnabled = true; 11341 11342 _populate(); 11343 } 11344 11345 // Generate options markup and event binds 11346 function _populate() { 11347 _this.items = []; 11348 11349 var $options = $original.children(), 11350 _$li = '<ul>', 11351 selectedIndex = $options.filter('.selected').index(); 11352 11353 currValue = (selected = ~selectedIndex ? selectedIndex : 0); 11354 11355 if ( optionsLength = $options.length ) { 11356 // Build options markup 11357 $options.each(function(i){ 11358 var $elm = $(this), 11359 optionText = $elm.html(), 11360 selectDisabled = $elm.prop('disabled'), 11361 itemBuilder = _this.options.optionsItemBuilder; 11362 11363 _this.items[i] = { 11364 value : $elm.val(), 11365 text : optionText, 11366 slug : _utils.replaceDiacritics(optionText), 11367 disabled : selectDisabled 11368 }; 11369 11370 _$li += _utils.format('<li class="{1}">{2}</li>', 11371 $.trim([i == currValue ? 'selected' : '', i == optionsLength - 1 ? 'last' : '', selectDisabled ? 'disabled' : ''].join(' ')), 11372 $.isFunction(itemBuilder) ? itemBuilder(_this.items[i], $elm, i) : _utils.format(itemBuilder, _this.items[i]) 11373 ); 11374 }); 11375 11376 $items.html(_$li + '</ul>'); 11377 11378 $label.html(_this.items[currValue].text); 11379 } 11380 11381 $wrapper.add($original).off(bindSufix); 11382 11383 $outerWrapper.prop('class', [_this.classes.disabled, _this.classes.wrapper, $original.prop('class').replace(/\S+/g, pluginName + '-$&'), _this.options.responsive ? _this.classes.responsive : ''].join(' ')); 11384 11385 if ( !$original.prop('disabled') ){ 11386 // Not disabled, so... Removing disabled class and bind hover 11387 $outerWrapper.removeClass(_this.classes.disabled).hover(function(){ 11388 $(this).toggleClass(_this.classes.hover); 11389 }); 11390 11391 // Click on label and :focus on original select will open the options box 11392 _this.options.openOnHover && $wrapper.on('mouseenter' + bindSufix, _open); 11393 11394 // Toggle open/close
11395 $wrapper.on('click' + bindSufix, function(e){ 11396 isOpen ? _close() : _open(e); 11397 }); 11398 11399 $input.prop('disabled', false).off().on({ 11400 keypress: _handleSystemKeys, 11401 keydown: function(e){ 11402 _handleSystemKeys(e); 11403 11404 // Clear search 11405 clearTimeout(_this.resetStr); 11406 _this.resetStr = setTimeout(function(){ 11407 $input.val(''); 11408 }, _this.options.keySearchTimeout); 11409 11410 var key = e.keyCode || e.which; 11411 11412 // If it's a directional key 11413 // 37 => Left 11414 // 38 => Up 11415 // 39 => Right 11416 // 40 => Down 11417 if ( key > 36 && key < 41 ) 11418 _select(_utils[(key < 39 ? 'previous' : 'next') + 'EnabledItem'](_this.items, selected)); 11419 }, 11420 focusin: function(e){ 11421 // Stupid, but necessary... Prevent the flicker when 11422 // focusing out and back again in the browser window 11423 $input.one('blur', function(){ 11424 $input.blur(); 11425 }); 11426 11427 isOpen || _open(e); 11428 } 11429 }).on('oninput' in $input[0] ? 'input' : 'keyup', function(){ 11430 if ( $input.val().length ){ 11431 // Search in select options 11432 $.each(_this.items, function(i, elm){ 11433 if ( RegExp('^' + $input.val(), 'i').test(elm.slug) && !elm.disabled ){ 11434 _select(i); 11435 return false; 11436 } 11437 }); 11438 } 11439 }); 11440 11441 // Remove styles from items box 11442 // Fix incorrect height when refreshed is triggered with fewer options 11443 $li = $('li', $items.removeAttr('style')).click(function(){ 11444 // The second parameter is to close the box after click 11445 _select($(this).index(), true); 11446 11447 // Chrome doesn't close options box if select is wrapped with a label 11448 // We need to 'return false' to avoid that 11449 return false; 11450 }); 11451 } else 11452 $input.prop('disabled', true); 11453 } 11454 11455 function _refresh() { 11456 _this.options.onRefresh(element); 11457 _populate(); 11458 } 11459 11460 // Behavior when system keys is pressed 11461 function _handleSystemKeys(e) { 11462 var key = e.keyCode || e.which; 11463 11464 if ( key == 13 ) 11465 e.preventDefault(); 11466 11467 // Tab / Enter / ESC 11468 if ( /^(9|13|27)$/.test(key) ) { 11469 e.stopPropagation(); 11470 _select(selected, true); 11471 } 11472 } 11473 11474 // Set options box width/height 11475 function _calculateOptionsDimensions() { 11476 var visibleParent = $items.closest(':visible').children(':hidden'), 11477 maxHeight = _this.options.maxHeight; 11478 11479 // Calculate options box height 11480 // Set a temporary class on the hidden parent of the element 11481 visibleParent.addClass(_this.classes.tempshow); 11482 11483 var itemsWidth = $items.outerWidth(), 11484 wrapperWidth = $wrapper.outerWidth() - (itemsWidth - $items.width()); 11485 11486 // Set the dimensions, minimum is wrapper width, expand for long items if option is true 11487 if ( !_this.options.expandToItemText || wrapperWidth > itemsWidth ) 11488 finalWidth = wrapperWidth; 11489 else { 11490 // Make sure the scrollbar width is included 11491 $items.css('overflow', 'scroll'); 11492 11493 // Set a really long width for $outerWrapper 11494 $outerWrapper.width(9e4); 11495 finalWidth = $items.width(); 11496 // Set scroll bar to auto 11497 $items.css('overflow', ''); 11498 $outerWrapper.width(''); 11499 } 11500 11501 $items.width(finalWidth).height() > maxHeight && $items.height(maxHeight); 11502 11503 // Remove the temporary class 11504 visibleParent.removeClass(_this.classes.tempshow); 11505 } 11506 11507 // Open the select options box 11508 function _open(e) { 11509 if (e){ 11510 e.preventDefault(); 11511 e.stopPropagation(); 11512 } 11513 11514 if (isEnabled){ 11515 _calculateOptionsDimensions(); 11516 11517 // Find any other opened instances of select and close it 11518 $('.' + _this.classes.open).removeClass(_this.classes.open); 11519 11520 isOpen = true; 11521 itemsHeight = $items.outerHeight(),
11522 itemsInnerHeight = $items.height(); 11523 11524 // Give dummy input focus 11525 $input.val('').is(':focus') || $input.focus(); 11526 11527 $doc.on('click' + bindSufix, _close).on('scroll' + bindSufix, _isInViewport); 11528 _isInViewport(); 11529 11530 // Prevent window scroll when using mouse wheel inside items box 11531 if ( _this.options.preventWindowScroll ){ 11532 $doc.on('mousewheel' + bindSufix + ' DOMMouseScroll' + bindSufix, '.' + _this.classes.items, function(e){ 11533 var orgEvent = e.originalEvent, 11534 scrollTop = $items.scrollTop(), 11535 deltaY = 0; 11536 11537 if ( 'detail' in orgEvent ) { deltaY = orgEvent.detail * -1; } 11538 if ( 'wheelDelta' in orgEvent ) { deltaY = orgEvent.wheelDelta; } 11539 if ( 'wheelDeltaY' in orgEvent ) { deltaY = orgEvent.wheelDeltaY; } 11540 if ( 'deltaY' in orgEvent ) { deltaY = orgEvent.deltaY * -1; } 11541 11542 if ( scrollTop == (this.scrollHeight - itemsInnerHeight) && deltaY < 0 || scrollTop == 0 && deltaY > 0 ) 11543 e.preventDefault(); 11544 }); 11545 } 11546 11547 // Delay close effect when openOnHover is true 11548 if ( _this.options.openOnHover ){ 11549 clearTimeout(_this.closeTimer); 11550 $outerWrapper.one('mouseleave' + bindSufix, function(){ 11551 _this.closeTimer = setTimeout(_close, 500); 11552 }); 11553 } 11554 11555 // Toggle options box visibility 11556 $outerWrapper.addClass(_this.classes.open); 11557 _detectItemVisibility(selected); 11558 11559 _this.options.onOpen(element); 11560 } 11561 } 11562 11563 // Detect is the options box is inside the window 11564 function _isInViewport() { 11565 _calculateOptionsDimensions(); 11566 $outerWrapper.toggleClass(_this.classes.above, $outerWrapper.offset().top + $outerWrapper.outerHeight() + itemsHeight > $win.scrollTop() + $win.height()); 11567 } 11568 11569 // Close the select options box 11570 function _close(e) { 11571 if ( !e && currValue != selected ){ 11572 var text = _this.items[selected].text; 11573 11574 // Apply changed value to original select 11575 $original 11576 .prop('selectedIndex', currValue = selected) 11577 .data('value', text); 11578 11579 _this.options.onChange(element); 11580 11581 // Change label text 11582 $label.html(text); 11583 } 11584 11585 // Remove click on document 11586 $doc.off(bindSufix); 11587 11588 // Remove visible class to hide options box 11589 $outerWrapper.removeClass(_this.classes.open); 11590 11591 isOpen = false; 11592 11593 _this.options.onClose(element); 11594 } 11595 11596 // Select option 11597 function _select(index, close) { 11598 // If element is disabled, can't select it 11599 if ( !_this.items[selected = index].disabled ){ 11600 // If 'close' is false (default), the options box won't close after 11601 // each selected item, this is necessary for keyboard navigation 11602 $li.removeClass('selected').eq(index).addClass('selected'); 11603 _detectItemVisibility(index); 11604 close && _close(); 11605 } 11606 } 11607 11608 // Detect if currently selected option is visible and scroll the options box to show it 11609 function _detectItemVisibility(index) { 11610 var liHeight = $li.eq(index).outerHeight(), 11611 liTop = $li[index].offsetTop, 11612 itemsScrollTop = $items.scrollTop(), 11613 scrollT = liTop + liHeight * 2; 11614 11615 $items.scrollTop( 11616 scrollT > itemsScrollTop + itemsHeight ? scrollT - itemsHeight : 11617 liTop - liHeight < itemsScrollTop ? liTop - liHeight : 11618 itemsScrollTop 11619 ); 11620 } 11621 11622 // Unbind and remove 11623 function _destroy(preserveData) { 11624 if ( isEnabled ){ 11625 $items.add($wrapper).add($input).remove(); 11626 !preserveData && $original.removeData(pluginName).removeData('value'); 11627 $original.off(bindSufix).off(eventTriggers).unwrap().unwrap(); 11628 isEnabled = false;
11629 } 11630 } 11631 11632 _init(opts); 11633 }; 11634 11635 // A really lightweight plugin wrapper around the constructor, 11636 // preventing against multiple instantiations 11637 $.fn[pluginName] = function(args) { 11638 return this.each(function() { 11639 var data = $.data(this, pluginName); 11640 11641 if ( data && !data.disableOnMobile ) 11642 (''+args === args && data[args]) ? data[args]() : data.init(args); 11643 else 11644 $.data(this, pluginName, new Selectric(this, args)); 11645 }); 11646 }; 11647}(jQuery)); 11648 11649 11650 11651 11652 11653 11654 11655 11656 11657 11658 11659 11660 11661 11662 11663 11664 11665 11666 11667 11668 11669$(function() { 11670 $(".tabs-to-dropdown").each(function() { 11671 var resizeTimeout = 20; 11672 11673 var tabBar = $(this).children(".tab-bar"); 11674 var tabList = tabBar.children("ul"); 11675 var tabListItem = tabList.children("li"); 11676 11677 var dropdown = $(this).children(".dropdown"); 11678 var dropdownToggle = dropdown.children(".dropdown-toggle"); 11679 var dropdownList = dropdown.children("ul"); 11680 11681 var clickHandler = ("ontouchstart" in document.documentElement ? "touchstart": "click"); 11682 11683 var tabsToDropdown = function() { 11684 var tabBarWidth = tabBar.width(); 11685 tabListItem.each(function(index) { 11686 var dropdownListItem = dropdownList.children("li").eq(index); 11687 var tabListItemOffset = $(this).position().left + $(this).outerWidth(); 11688 11689 if (tabListItemOffset >= tabBarWidth) { 11690 $(this).addClass("ttd-hide"); dropdownListItem.addClass("ttd-show"); 11691 } else { 11692 $(this).removeClass("ttd-hide"); dropdownListItem.removeClass("ttd-show"); 11693 } 11694 }); 11695 11696 tabList.children(".ttd-hide").length > 0 ? dropdown.addClass("ttd-show"): dropdown.removeClass("ttd-show"); 11697 }; 11698 11699 tabListItem.clone().appendTo(dropdownList); 11700 11701 tabsToDropdown(); 11702 $(window).bind("resize", function(){ 11703 if(typeof sizeWait != "undefined") { clearTimeout(sizeWait); } 11704 sizeWait = setTimeout(function(){ 11705 tabsToDropdown(); 11706 },resizeTimeout); 11707 }); 11708 11709 dropdown.bind(clickHandler, function(e) { e.stopPropagation(); }); 11710 $(document).bind(clickHandler, function() { dropdown.removeClass("ttd-open"); }); 11711 dropdownToggle.bind(clickHandler, function(e) { dropdown.toggleClass("ttd-open"); e.stopPropagation(); }); 11712 }); 11713}); 11714 11715 11716 11717 11718 11719// leanModal v1.1 by Ray Stone - http://finelysliced.com.au 11720// Dual licensed under the MIT and GPL 11721// Modified by Sebastian Duchowicz 11722(function ($) { 11723 $.fn.extend({ 11724 leanModal: function (options) { 11725 var defaults = { 11726 id: '', 11727 top: 100, 11728 overlay: 0.5, 11729 bg_color: '#000', 11730 closeButton: null 11731 }; 11732 var overlay = $("<div id='lean_overlay'></div>"); 11733 $("body").append(overlay); 11734 options = $.extend(defaults, options); 11735 return this.each(function () { 11736 var o = options; 11737 $(this).click(function (e) { 11738 var modal_id = $(this).attr("href"); 11739 11740//alert($(this).attr("id")); 11741//alert(o.id); 11742 11743 //var modal_id = $(this).attr("id"); 11744 //modal_id = o.id; 11745 11746 $('#lean_overlay').css('background-color',o.bg_color); 11747 $("#lean_overlay").click(function () { 11748 close_modal(modal_id) 11749 }); 11750 $(o.closeButton).click(function () { 11751 close_modal(modal_id) 11752 }); 11753 var modal_height = $(modal_id).outerHeight(); 11754 var modal_width = $(modal_id).outerWidth(); 11755 $("#lean_overlay").css({ 11756 "display": "block", 11757 opacity: 0 11758 }); 11759 $("#lean_overlay").fadeTo(200, o.overlay); 11760 // $(modal_id).css({ 11761 // "display": "block", 11762 // "position": "fixed", 11763 // "opacity": 0, 11764 // "z-index": 11000, 11765 // "left": 50 + "%", 11766 // "margin-left": -(modal_width / 2) + "px", 11767 // "top": o.top + "px" 11768 // }); 11769 $(modal_id).css({ 11770 "display": "block", 11771 "position": "fixed", 11772 "opacity": 0, 11773 "z-index": 11000, 11774 "left": 0, 11775 "right":0, 11776 "bottom":0, 11777 "top": o.top + "px" 11778 }); 11779 $(modal_id).fadeTo(200, 1); 11780 e.preventDefault() 11781 }) 11782 }); 11783 11784 function close_modal(modal_id) { 11785 $("#lean_overlay").fadeOut(200); 11786 $(modal_id).css({ 11787 "display": "none" 11788 }) 11789 } 11790 } 11791 }) 11792})(jQuery); 11793 11794// leanModal v1.1 by Ray Stone - http://finelysliced.com.au 11795// Dual licensed under the MIT and GPL 11796// Modified by Sebastian Duchowicz 11797(function ($) { 11798 $.fn.extend({ 11799 leanModalWth: function (options) { 11800 var defaults = { 11801 top: 100,
11802 bg_color: '#000', 11803 //bg_image: null, 11804 bg_class_name: null, 11805 //bg_class_name_sec: null, 11806 overlay: 0.95, 11807 closeButton: null 11808 }; 11809 options = $.extend(defaults, options); 11810 11811 var overlay = $("<div id='lean_overlay'></div>"); 11812 $("body").append(overlay); 11813 $('#lean_overlay').addClass('weather-modal-bg'); 11814 11815 11816 return this.each(function () { 11817 var o = options; 11818 $(this).click(function (e) { 11819 var modal_id = $(this).attr("href"); 11820 var data_weather = $(this).attr("data-wheather"); 11821 11822 ajaxRequest = $.ajax({ 11823 type: "post", 11824 //url: SITEpath + "/ajax/ajax_weather.php", 11825 url: SITEpath + "/pl/277/0/pogoda.html", 11826 data: { 11827 action: 'forecast', 11828 weather_type: data_weather 11829 }, 11830 dataType: "html", 11831 success: function(data) { 11832 data = JSON.parse('' + data + ''); 11833 if (data.status == 'error'){ 11834 alert(data.msg); 11835 } else if (data.status == 'success'){ 11836 $("body").append(data.html); 11837 11838 $('#lean_overlay').css('background-color',o.bg_color); 11839 11840 if (data_weather!=''){ 11841 $(modal_id).addClass('weather-modal-bg'); 11842 $(modal_id).addClass(data_weather); 11843 } 11844 11845 11846 $("#lean_overlay").click(function () { 11847 close_modal(modal_id) 11848 }); 11849 $(o.closeButton).click(function () { 11850 close_modal(modal_id) 11851 }); 11852 var modal_height = $(modal_id).outerHeight(); 11853 var modal_width = $(modal_id).outerWidth(); 11854 $("#lean_overlay").css({ 11855 "display": "block", 11856 opacity: 0 11857 }); 11858 $("#lean_overlay").fadeTo(200, o.overlay); 11859 $(modal_id).css({ 11860 "display": "block", 11861 "position": "fixed", 11862 "opacity": 0, 11863 "z-index": 11000, 11864 "left": 0, 11865 "right":0, 11866 "bottom":0, 11867 "top": o.top + "px" 11868 }); 11869 $(modal_id).fadeTo(200, 1); 11870 if (!oldIE){ 11871 var skycons = new Skycons({"resizeClear": true,"color":"white"}); 11872 skycons.set("skyicon-weather-vbig", $('#skyicon-weather-vbig').attr('data-weather')); 11873 skycons.play(); 11874 speakAlound('uq-prognoza','Prognoza pogody dla Krynicy-Zdrój.',true,false,'pl'); 11875 } 11876 11877 } 11878 }, 11879 complete: function() { 11880 ajaxRequest = null; 11881 } 11882 }); 11883 11884 11885 e.preventDefault(); 11886 }) 11887 }); 11888 11889 function close_modal(modal_id) { 11890 $("#lean_overlay").fadeOut(500, function(){ 11891 $(modal_id).css({ 11892 "display": "none" 11893 }); 11894 }); 11895 } 11896 } 11897 }) 11898})(jQuery); 11899 11900 11901 11902 11903 11904 11905 11906 11907 11908 11909 11910/* Modernizr 2.8.3 (Custom Build) | MIT & BSD 11911 * Build: http://modernizr.com/download/#-fontface-backgroundsize-borderimage-borderradiu
vendor: 1,031 bytes, lines 11911-11913
11911s-boxshadow-flexbox-hsla-multiplebgs-opacity-rgba-textshadow-cssanimations-csscolumns-generatedcontent-cssgradients-cssreflections-csstransforms-csstransforms3d-csstransitions-applicationcache-canvas-canvastext-draganddrop-hashchange-history-audio-video-indexeddb-input-inputtypes-localstorage-postmessage-sessionstorage-websockets-websqldatabase-webworkers-geolocation-inlinesvg-smil-svg-svgclippaths-touch-webgl-shiv-mq-cssclasses-addtest-prefixed-teststyles-testprop-testallprops-hasevent-prefixes-domprefixes-load 11912 */ 11913;window.Modernizr=function(a,b,c){function D(a){j.cssText=a}function E(a,b){return D(n.join(a+";")+(b||""))}function F(a,b){return typeof a===b}function G(a,b){return!!~(""+a).indexOf(b)}function H(a,b){for(var d in a){var e=a[d];if(!G(e,"-")&&j[e]!==c)return b=="pfx"?e:!0}return!1}function I(a,b,d){for(var e in a){var f=b[a[e]];if(f!==c)return d===!1?a[e]:F(f,"function")?f.bind(d||b):f}return!1}function J(a,b,c){var d=a.charAt(0).toUpperCase()+a.slice(1),e=(a+" "+p.join(d+" ")+d).split(" ");return F(b,"
11913string")||F(b,"undefined")?H(e,b):(e=(a+" "+q.join(d+" ")+d).split(" "),I(e,b,c))}function K(){e.input=function(c){for(var d=0,e=c.length;d<e;d++)u[c[d]]=c[d]in k;return u.list&&(u.list=!!b.createElement("datalist")&&!!a.HTMLDataListElement),u}("autocomplete autofocus list placeholder max min multiple pattern required step".split(" ")),e.inputtypes=function(a){for(var d=0,e,f,h,i=a.length;d<i;d++)k.setAttribute("type",f=a[d]),e=k.type!=="text",e&&(k.value=l,k.style.cssText="position:absolute;visibility:hidden;",/^range$/.test(f)&&k.style.WebkitAppearance!==c?(g.appendChild(k),h=b.defaultView,e=h.getComputedStyle&&h.getComputedStyle(k,null).WebkitAppearance!=="textfield"&&k.offsetHeight!==0,g.removeChild(k)):/^(search|tel)$/.test(f)||(/^(url|email)$/.test(f)?e=k.checkValidity&&k.checkValidity()===!1:e=k.value!=l)),t[a[d]]=!!e;return t}("search tel url email datetime date month week time datetime-local number range color".split(" "))}var d="2.8.3",e={},f=!0,g=b.documentElement,h="modernizr",i=b.createElement(h),j=i.style,k=b.createElement("input"),l=":)",m={}.toString,n=" -webkit- -moz- -o- -ms- ".split(" "),o="Webkit Moz O ms",p=o.split(" "),q=o.toLowerCase().split(" "),r={svg:"http://www.w3.org/2000/svg"},s={},t={},u={},v=[],w=v.slice,x,y=function(a,c,d,e){var f,i,j,k,l=b.createElement("div"),m=b.body,n=m||b.createElement("body");if(parseInt(d,10))while(d--)j=b.createElement("div"),j.id=e?e[d]:h+(d+1),l.appendChild(j);return f=["­",'<style id="s',h,'">',a,"</style>"].join(""),l.id=h,(m?l:n).innerHTML+=f,n.appendChild(l),m||(n.style.background="",n.style.overflow="hidden",k=g.style.overflow,g.style.overflow="hidden",g.appendChild(n)),i=c(l,a),m?l.parentNode.removeChild(l):(n.parentNode.removeChild(n),g.style.overflow=k),!!i},z=function(b){var c=a.matchMedia||a.msMatchMedia;if(c)return c(b)&&c(b).matches||!1;var d;return y("@media "+b+" { #"+h+" { position: absolute; } }",function(b){d=(a.getComputedStyle?getComputedStyle(b,null):b.currentStyle)["position"]=="absolute"}),d},A=function(){function d(d,e){e=e||b.createElement(a[d]||"div"),d="on"+d;var f=d in e;return f||(e.setAttribute||(e=b.createElement("div")),e.setAttribute&&e.removeAttribute&&(e.setAttribute(d,""),f=F(e[d],"function"),F(e[d],"undefined")||(e[d]=c),e.removeAttribute(d))),e=null,f}var a={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"};return d}(),B={}.hasOwnProperty,C;!F(B,"undefined")&&!F(B.call,"undefined")?C=function(a,b){return B.call(a,b)}:C=function(a,b){return b in a&&F(a.constructor.prototype[b],"undefined")},Function.prototype.bind||(Function.prototype.bind=function(b){var c=this;if(typeof c!="function")throw new TypeError;var d=w.call(arguments,1),e=function(){if(this instanceof e){var a=function(){};a.prototype=c.prototype;var f=new a,g=c.apply(f,d.concat(w.call(arguments)));return Object(g)===g?g:f}return c.apply(b,d.concat(w.call(arguments)))};return e}),s.flexbox=function(){return J("flexWrap")},s.canvas=function(){var a=b.createElement("canvas");return!!a.getContext&&!!a.getContext("2d")},s.canvastext=function(){return!!e.canvas&&!!F(b.createElement("canvas").getContext("2d").fillText,"function")},s.webgl=function(){return!!a.WebGLRenderingContext},s.touch=function(){var c;return"ontouchstart"in a||a.DocumentTouch&&b instanceof DocumentTouch?c=!0:y(["@media (",n.join("touch-enabled),("),h,")","{#modernizr{top:9px;position:absolute}}"].join(""),function(a){c=a.offsetTop===9}),c},s.geolocation=function(){return"geolocation"in navigator},s.postmessage=function(){return!!a.postMessage},s.websqldatabase=function(){return!!a.openDatabase},s.indexedDB=function(){return!!J("indexedDB",a)},s.hashchange=function(){return A("hashchange",a)&&(b.documentMode===c||b.documentMode>7)},s.history=function(){return!!a.history&&!!history.pushState},s.draganddrop=function(){var a=b.createElement("div");return"draggable"in a||"ondragstart"in a&&"ondrop"in a},s.websockets=function(){return"WebSocket"in a||"MozWebSocket"in a},s.rgba=function(){return D("background-color:rgba(150,255,150,.5)"),G(j.backgroundColor,"rgba")},s.hsla=function(){return D("background-color:hsla(120,40%,100%,.5)"),G(j.backgroundColor,"rgba")||G(j.backgroundColor,"hsla")},s.multiplebgs=function(){return D("background:url(https://),url(https://),red url(https://)"),/(url\s*\(.*?){3}/.test(j.background)},s.backgroundsize=function(){return J("backgroundSize")},s.borderimage=function(){return J("borderImage")}
vendor: 4,714 bytes, line 11913
11913,s.borderradius=function(){return J("borderRadius")},s.boxshadow=function(){return J("boxShadow")},s.textshadow=function(){return b.createElement("div").style.textShadow===""},s.opacity=function(){return E("opacity:.55"),/^0.55$/.test(j.opacity)},s.cssanimations=function(){return J("animationName")},s.csscolumns=function(){return J("columnCount")},s.cssgradients=function(){var a="background-image:",b="gradient(linear,left top,right bottom,from(#9f9),to(white));",c="linear-gradient(left top,#9f9, white);";return D((a+"-webkit- ".split(" ").join(b+a)+n.join(c+a)).slice(0,-a.length)),G(j.backgroundImage,"gradient")},s.cssreflections=function(){return J("boxReflect")},s.csstransforms=function(){return!!J("transform")},s.csstransforms3d=function(){var a=!!J("perspective");return a&&"webkitPerspective"in g.style&&y("@media (transform-3d),(-webkit-transform-3d){#modernizr{left:9px;position:absolute;height:3px;}}",function(b,c){a=b.offsetLeft===9&&b.offsetHeight===3}),a},s.csstransitions=function(){return J("transition")},s.fontface=function(){var a;return y('@font-face {font-family:"font";src:url("https://")}',function(c,d){var e=b.getElementById("smodernizr"),f=e.sheet||e.styleSheet,g=f?f.cssRules&&f.cssRules[0]?f.cssRules[0].cssText:f.cssText||"":"";a=/src/i.test(g)&&g.indexOf(d.split(" ")[0])===0}),a},s.generatedcontent=function(){var a;return y(["#",h,"{font:0/0 a}#",h,':after{content:"',l,'";visibility:hidden;font:3px/1 a}'].join(""),function(b){a=b.offsetHeight>=3}),a},s.video=function(){var a=b.createElement("video"),c=!1;try{if(c=!!a.canPlayType)c=new Boolean(c),c.ogg=a.canPlayType('video/ogg; codecs="theora"').replace(/^no$/,""),c.h264=a.canPlayType('video/mp4; codecs="avc1.42E01E"').replace(/^no$/,""),c.webm=a.canPlayType('video/webm; codecs="vp8, vorbis"').replace(/^no$/,"")}catch(d){}return c},s.audio=function(){var a=b.createElement("audio"),c=!1;try{if(c=!!a.canPlayType)c=new Boolean(c),c.ogg=a.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,""),c.mp3=a.canPlayType("audio/mpeg;").replace(/^no$/,""),c.wav=a.canPlayType('audio/wav; codecs="1"').replace(/^no$/,""),c.m4a=(a.canPlayType("audio/x-m4a;")||a.canPlayType("audio/aac;")).replace(/^no$/,"")}catch(d){}return c},s.localstorage=function(){try{return localStorage.setItem(h,h),localStorage.removeItem(h),!0}catch(a){return!1}},s.sessionstorage=function(){try{return sessionStorage.setItem(h,h),sessionStorage.removeItem(h),!0}catch(a){return!1}},s.webworkers=function(){return!!a.Worker},s.applicationcache=function(){return!!a.applicationCache},s.svg=function(){return!!b.createElementNS&&!!b.createElementNS(r.svg,"svg").createSVGRect},s.inlinesvg=function(){var a=b.createElement("div");return a.innerHTML="<svg/>",(a.firstChild&&a.firstChild.namespaceURI)==r.svg},s.smil=function(){return!!b.createElementNS&&/SVGAnimate/.test(m.call(b.createElementNS(r.svg,"animate")))},s.svgclippaths=function(){return!!b.createElementNS&&/SVGClipPath/.test(m.call(b.createElementNS(r.svg,"clipPath")))};for(var L in s)C(s,L)&&(x=L.toLowerCase(),e[x]=s[L](),v.push((e[x]?"":"no-")+x));return e.input||K(),e.addTest=function(a,b){if(typeof a=="object")for(var d in a)C(a,d)&&e.addTest(d,a[d]);else{a=a.toLowerCase();if(e[a]!==c)return e;b=typeof b=="function"?b():b,typeof f!="undefined"&&f&&(g.className+=" "+(b?"":"no-")+a),e[a]=b}return e},D(""),i=k=null,function(a,b){function l(a,b){var c=a.createElement("p"),d=a.getElementsByTagName("head")[0]||a.documentElement;return c.innerHTML="x<style>"+b+"</style>",d.insertBefore(c.lastChild,d.firstChild)}function m(){var a=s.elements;return typeof a=="string"?a.split(" "):a}function n(a){var b=j[a[h]];return b||(b={},i++,a[h]=i,j[i]=b),b}function o(a,c,d){c||(c=b);if(k)return c.createElement(a);d||(d=n(c));var g;return d.cache[a]?g=d.cache[a].cloneNode():f.test(a)?g=(d.cache[a]=d.createElem(a)).cloneNode():g=d.createElem(a),g.canHaveChildren&&!e.test(a)&&!g.tagUrn?d.frag.appendChild(g):g}function p(a,c){a||(a=b);if(k)return a.createDocumentFragment();c=c||n(a);var d=c.frag.cloneNode(),e=0,f=m(),g=f.length;for(;e<g;e++)d.createElement(f[e]);return d}function q(a,b){b.cache||(b.cache={},b.createElem=a.createElement,b.createFrag=a.createDocumentFragment,b.frag=b.createFrag()),a.createElement=function(c){return s.shivMethods?o(c,a,b):b.createElem(c)},a.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+m().join().replace(/[\w\-]+/g,function(a){return b.createElem(a),b.frag.createElement(a),'c("'+a+'")'})+");return n}")(s,b.frag)}function r(a){a||(a=b);var c=n(a);return s.shivCSS&&!g&&!c.hasCSS&&(c.hasCSS=!!l(a,"article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{dis
vendor: 8,867 bytes, lines 11913-11987
11913play:block}mark{background:#FF0;color:#000}template{display:none}")),k||q(a,c),a}var c="3.7.0",d=a.html5||{},e=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,f=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,g,h="_html5shiv",i=0,j={},k;(function(){try{var a=b.createElement("a");a.innerHTML="<xyz></xyz>",g="hidden"in a,k=a.childNodes.length==1||function(){b.createElement("a");var a=b.createDocumentFragment();return typeof a.cloneNode=="undefined"||typeof a.createDocumentFragment=="undefined"||typeof a.createElement=="undefined"}()}catch(c){g=!0,k=!0}})();var s={elements:d.elements||"abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output progress section summary template time video",version:c,shivCSS:d.shivCSS!==!1,supportsUnknownElements:k,shivMethods:d.shivMethods!==!1,type:"default",shivDocument:r,createElement:o,createDocumentFragment:p};a.html5=s,r(b)}(this,b),e._version=d,e._prefixes=n,e._domPrefixes=q,e._cssomPrefixes=p,e.mq=z,e.hasEvent=A,e.testProp=function(a){return H([a])},e.testAllProps=J,e.testStyles=y,e.prefixed=function(a,b,c){return b?J(a,b,c):J(a,"pfx")},g.className=g.className.replace(/(^|\s)no-js(\s|$)/,"$1$2")+(f?" js "+v.join(" "):""),e}(this,this.document),function(a,b,c){function d(a){return"[object Function]"==o.call(a)}function e(a){return"string"==typeof a}function f(){}function g(a){return!a||"loaded"==a||"complete"==a||"uninitialized"==a}function h(){var a=p.shift();q=1,a?a.t?m(function(){("c"==a.t?B.injectCss:B.injectJs)(a.s,0,a.a,a.x,a.e,1)},0):(a(),h()):q=0}function i(a,c,d,e,f,i,j){function k(b){if(!o&&g(l.readyState)&&(u.r=o=1,!q&&h(),l.onload=l.onreadystatechange=null,b)){"img"!=a&&m(function(){t.removeChild(l)},50);for(var d in y[c])y[c].hasOwnProperty(d)&&y[c][d].onload()}}var j=j||B.errorTimeout,l=b.createElement(a),o=0,r=0,u={t:d,s:c,e:f,a:i,x:j};1===y[c]&&(r=1,y[c]=[]),"object"==a?l.data=c:(l.src=c,l.type=a),l.width=l.height="0",l.onerror=l.onload=l.onreadystatechange=function(){k.call(this,r)},p.splice(e,0,u),"img"!=a&&(r||2===y[c]?(t.insertBefore(l,s?null:n),m(k,j)):y[c].push(l))}function j(a,b,c,d,f){return q=0,b=b||"j",e(a)?i("c"==b?v:u,a,b,this.i++,c,d,f):(p.splice(this.i++,0,a),1==p.length&&h()),this}function k(){var a=B;return a.loader={load:j,i:0},a}var l=b.documentElement,m=a.setTimeout,n=b.getElementsByTagName("script")[0],o={}.toString,p=[],q=0,r="MozAppearance"in l.style,s=r&&!!b.createRange().compareNode,t=s?l:n.parentNode,l=a.opera&&"[object Opera]"==o.call(a.opera),l=!!b.attachEvent&&!l,u=r?"object":l?"script":"img",v=l?"script":u,w=Array.isArray||function(a){return"[object Array]"==o.call(a)},x=[],y={},z={timeout:function(a,b){return b.length&&(a.timeout=b[0]),a}},A,B;B=function(a){function b(a){var a=a.split("!"),b=x.length,c=a.pop(),d=a.length,c={url:c,origUrl:c,prefixes:a},e,f,g;for(f=0;f<d;f++)g=a[f].split("="),(e=z[g.shift()])&&(c=e(c,g));for(f=0;f<b;f++)c=x[f](c);return c}function g(a,e,f,g,h){var i=b(a),j=i.autoCallback;i.url.split(".").pop().split("?").shift(),i.bypass||(e&&(e=d(e)?e:e[a]||e[g]||e[a.split("/").pop().split("?")[0]]),i.instead?i.instead(a,e,f,g,h):(y[i.url]?i.noexec=!0:y[i.url]=1,f.load(i.url,i.forceCSS||!i.forceJS&&"css"==i.url.split(".").pop().split("?").shift()?"c":c,i.noexec,i.attrs,i.timeout),(d(e)||d(j))&&f.load(function(){k(),e&&e(i.origUrl,h,g),j&&j(i.origUrl,h,g),y[i.url]=2})))}function h(a,b){function c(a,c){if(a){if(e(a))c||(j=function(){var a=[].slice.call(arguments);k.apply(this,a),l()}),g(a,j,b,0,h);else if(Object(a)===a)for(n in m=function(){var b=0,c;for(c in a)a.hasOwnProperty(c)&&b++;return b}(),a)a.hasOwnProperty(n)&&(!c&&!--m&&(d(j)?j=function(){var a=[].slice.call(arguments);k.apply(this,a),l()}:j[n]=function(a){return function(){var b=[].slice.call(arguments);a&&a.apply(this,b),l()}}(k[n])),g(a[n],j,b,n,h))}else!c&&l()}var h=!!a.test,i=a.load||a.both,j=a.callback||f,k=j,l=a.complete||f,m,n;c(h?a.yep:a.nope,!!i),i&&c(i)}var i,j,l=this.yepnope.loader;if(e(a))g(a,0,l,0);else if(w(a))for(i=0;i<a.length;i++)j=a[i],e(j)?g(j,0,l,0):w(j)?B(j):Object(j)===j&&h(j,l);else Object(a)===a&&h(a,l)},B.addPrefix=function(a,b){z[a]=b},B.addFilter=function(a){x.push(a)},B.errorTimeout=1e4,null==b.readyState&&b.addEventListener&&(b.readyState="loading",b.addEventListener("DOMContentLoaded",A=function(){b.removeEventListener("DOMContentLoaded",A,0),b.readyState="complete"},0)),a.yepnope=k(),a.yepnope.executeStack=h,a.yepnope.injectJs=function(a,c,d,e,i,j){var k=b.createElement("script"),l,o,e=e||B.errorTimeout;k.src=a;for(o in d)k.setAttribute(o,d[o]);c=j?h:c||f,k.onreadystatechange=k.onload=function(){!l&&g(k.readyState)&&(l=1,c(),k.onload=k.onreadystatechange=null)},m(function(){l||(l=1,c(1))},e),i?k.onload():n.parentNode.insertBefore(k,n)},a.yepnope.injectCss=function(a,c,d,e,g,i){var e=b.createElement("link"),j,c=i?h:c||f;e.href=a,e.rel="stylesheet",e.type="text/css";for(j in d)e.setAttribute(j,d[j]);g||(n.parentNode.insertBefore(e,n),m(c,0))}}(this,document),Modernizr.load=function(){yepnope.apply(window,[].slice.call(arguments,0))}; 11914 11915 11916 11917 11918 11919 11920 11921 11922 11923//#################################################################################################################################################################################### 11924//#################################################################################################################################################################################### 11925//#################################################################################################################################################################################### 11926//#################################################################################################################################################################################### 11927//#################################################################################################################################################################################### 11928//#################################################################################################################################################################################### 11929//#################################################################################################################################################################################### 11930//#################################################################################################################################################################################### 11931//#################################################################################################################################################################################### 11932//#################################################################################################################################################################################### 11933//#################################################################################################################################################################################### 11934//#################################################################################################################################################################################### 11935//####### INTRO 11936/** 11937 * Intro.js v0.9.0 11938 * https://github.com/usablica/intro.js 11939 * MIT licensed 11940 * 11941 * Copyright (C) 2013 usabli.ca - A weekend project by Afshin Mehrabani (@afshinmeh) 11942 */ 11943 11944(function (root, factory) { 11945 if (typeof exports === 'object') { 11946 // CommonJS 11947 factory(exports); 11948 } else if (typeof define === 'function' && define.amd) { 11949 // AMD. Register as an anonymous module. 11950 define(['exports'], factory); 11951 } else { 11952 // Browser globals 11953 factory(root); 11954 } 11955} (this, function (exports) { 11956 //Default config/variables 11957 var VERSION = '0.9.0'; 11958 11959 /** 11960 * IntroJs main class 11961 * 11962 * @class IntroJs 11963 */ 11964 function IntroJs(obj) { 11965 this._targetElement = obj; 11966 11967 this._options = { 11968 /* Next button label in tooltip box */ 11969 nextLabel: 'Next →', 11970 /* Previous button label in tooltip box */ 11971 prevLabel: '← Back', 11972 /* Skip button label in tooltip box */ 11973 skipLabel: 'Skip', 11974 /* Done button label in tooltip box */ 11975 doneLabel: 'Done', 11976 /* Default tooltip box position */ 11977 tooltipPosition: 'bottom', 11978 /* Next CSS class for tooltip boxes */ 11979 tooltipClass: '', 11980 /* Close introduction when pressing Escape button? */ 11981 exitOnEsc: true, 11982 /* Close introduction when clicking on overlay layer? */ 11983 exitOnOverlayClick: true, 11984 /* Show step numbers in introduction? */ 11985 showStepNumbers: true, 11986 /* Let user use keyboard to navigate the tour? */ 11987 keyboardNavigation: true,
11988 /* Show tour control buttons? */ 11989 showButtons: true, 11990 /* Show tour bullets? */ 11991 showBullets: true, 11992 /* Scroll to highlighted element? */ 11993 scrollToElement: true, 11994 /* Set the overlay opacity */ 11995 overlayOpacity: 0.8 11996 }; 11997 } 11998 11999 /** 12000 * Initiate a new introduction/guide from an element in the page 12001 * 12002 * @api private 12003 * @method _introForElement 12004 * @param {Object} targetElm 12005 * @returns {Boolean} Success or not? 12006 */ 12007 function _introForElement(targetElm) { 12008 var introItems = [], 12009 self = this; 12010 12011 if (this._options.steps) { 12012 //use steps passed programmatically 12013 var allIntroSteps = []; 12014 12015 for (var i = 0, stepsLength = this._options.steps.length; i < stepsLength; i++) { 12016 var currentItem = _cloneObject(this._options.steps[i]); 12017 //set the step 12018 currentItem.step = introItems.length + 1; 12019 //use querySelector function only when developer used CSS selector 12020 if (typeof(currentItem.element) === 'string') { 12021 //grab the element with given selector from the page 12022 currentItem.element = document.querySelector(currentItem.element); 12023 } 12024 12025 //intro without element 12026 if (typeof(currentItem.element) === 'undefined' || currentItem.element == null) { 12027 var floatingElementQuery = document.querySelector(".introjsFloatingElement"); 12028 12029 if (floatingElementQuery == null) { 12030 floatingElementQuery = document.createElement('div'); 12031 floatingElementQuery.className = 'introjsFloatingElement'; 12032 12033 document.body.appendChild(floatingElementQuery); 12034 } 12035 12036 currentItem.element = floatingElementQuery; 12037 currentItem.position = 'floating'; 12038 } 12039 12040 if (currentItem.element != null) { 12041 introItems.push(currentItem); 12042 } 12043 } 12044 12045 } else { 12046 //use steps from data-* annotations 12047 var allIntroSteps = targetElm.querySelectorAll('*[data-intro]'); 12048 //if there's no element to intro 12049 if (allIntroSteps.length < 1) { 12050 return false; 12051 } 12052 12053 //first add intro items with data-step 12054 for (var i = 0, elmsLength = allIntroSteps.length; i < elmsLength; i++) { 12055 var currentElement = allIntroSteps[i]; 12056 var step = parseInt(currentElement.getAttribute('data-step'), 10); 12057 12058 if (step > 0) { 12059 introItems[step - 1] = { 12060 element: currentElement, 12061 intro: currentElement.getAttribute('data-intro'), 12062 step: parseInt(currentElement.getAttribute('data-step'), 10), 12063 tooltipClass: currentElement.getAttribute('data-tooltipClass'), 12064 position: currentElement.getAttribute('data-position') || this._options.tooltipPosition 12065 }; 12066 } 12067 } 12068 12069 //next add intro items without data-step 12070 //todo: we need a cleanup here, two loops are redundant 12071 var nextStep = 0; 12072 for (var i = 0, elmsLength = allIntroSteps.length; i < elmsLength; i++) { 12073 var currentElement = allIntroSteps[i]; 12074 12075 if (currentElement.getAttribute('data-step') == null) { 12076 12077 while (true) { 12078 if (typeof introItems[nextStep] == 'undefined') { 12079 break; 12080 } else { 12081 nextStep++; 12082 } 12083 } 12084 12085 introItems[nextStep] = { 12086 element: currentElement, 12087 intro: currentElement.getAttribute('data-intro'), 12088 step: nextStep + 1, 12089 tooltipClass: currentElement.getAttribute('data-tooltipClass'), 12090 position: currentElement.getAttribute('data-position') || this._options.tooltipPosition 12091 }; 12092 } 12093 } 12094 } 12095 12096 //removing undefined/null elements 12097 var tempIntroItems = []; 12098 for (var z = 0; z < introItems.length; z++) { 12099 introItems[z] && tempIntroItems.push(introItems[z]); // copy non-empty values to the end of the array 12100 } 12101 12102 introItems = tempIntroItems; 12103 12104 //Ok, sort all items with given steps 12105 introItems.sort(function (a, b) { 12106 return a.step - b.step; 12107 }); 12108 12109 //set it to the introJs object 12110 self._introItems = introItems; 12111 12112 //add overlay layer to the page 12113 if(_addOverlayLayer.call(self, targetElm)) { 12114 //then, start the show 12115 _nextStep.call(self); 12116 12117 var skipButton = targetElm.querySelector('.introjs-skipbutton'), 12118 nextStepButton = targetElm.querySelector('.introjs-nextbutton'); 12119 12120 self._onKeyDown = function(e) { 12121 if (e.keyCode === 27 && self._options.exitOnEsc == true) { 12122 //escape key pressed, exit the intro 12123 _exitIntro.call(self, targetElm); 12124 //check if any callback is defined 12125 if (self._introExitCallback != undefined) { 12126 self._introExitCallback.call(self); 12127 } 12128 } else if(e.keyCode === 37) { 12129 //left arrow 12130 _previousStep.call(self); 12131 } else if (e.keyCode === 39 || e.keyCode === 13) { 12132 //right arrow or enter 12133 _nextStep.call(self); 12134 //prevent default behaviour on hitting Enter, to prevent steps being skipped in some browsers 12135 if(e.preventDefault) { 12136 e.preventDefault(); 12137 } else { 12138 e.returnValue = false;
12139 } 12140 } 12141 }; 12142 12143 self._onResize = function(e) { 12144 _setHelperLayerPosition.call(self, document.querySelector('.introjs-helperLayer')); 12145 }; 12146 12147 if (window.addEventListener) { 12148 if (this._options.keyboardNavigation) { 12149 window.addEventListener('keydown', self._onKeyDown, true); 12150 } 12151 //for window resize 12152 window.addEventListener("resize", self._onResize, true); 12153 } else if (document.attachEvent) { //IE 12154 if (this._options.keyboardNavigation) { 12155 document.attachEvent('onkeydown', self._onKeyDown); 12156 } 12157 //for window resize 12158 document.attachEvent("onresize", self._onResize); 12159 } 12160 } 12161 return false; 12162 } 12163 12164 /* 12165 * makes a copy of the object 12166 * @api private 12167 * @method _cloneObject 12168 */ 12169 function _cloneObject(object) { 12170 if (object == null || typeof (object) != 'object' || typeof (object.nodeType) != 'undefined') { 12171 return object; 12172 } 12173 var temp = {}; 12174 for (var key in object) { 12175 temp[key] = _cloneObject(object[key]); 12176 } 12177 return temp; 12178 } 12179 /** 12180 * Go to specific step of introduction 12181 * 12182 * @api private 12183 * @method _goToStep 12184 */ 12185 function _goToStep(step) { 12186 //because steps starts with zero 12187 this._currentStep = step - 2; 12188 if (typeof (this._introItems) !== 'undefined') { 12189 _nextStep.call(this); 12190 } 12191 } 12192 12193 /** 12194 * Go to next step on intro 12195 * 12196 * @api private 12197 * @method _nextStep 12198 */ 12199 function _nextStep() { 12200 this._direction = 'forward'; 12201 12202 if (typeof (this._currentStep) === 'undefined') { 12203 this._currentStep = 0; 12204 } else { 12205 ++this._currentStep; 12206 } 12207 12208 if ((this._introItems.length) <= this._currentStep) { 12209 //end of the intro 12210 //check if any callback is defined 12211 if (typeof (this._introCompleteCallback) === 'function') { 12212 this._introCompleteCallback.call(this); 12213 } 12214 _exitIntro.call(this, this._targetElement); 12215 return; 12216 } 12217 12218 var nextStep = this._introItems[this._currentStep]; 12219 if (typeof (this._introBeforeChangeCallback) !== 'undefined') { 12220 this._introBeforeChangeCallback.call(this, nextStep.element); 12221 } 12222 12223 _showElement.call(this, nextStep); 12224 } 12225 12226 /** 12227 * Go to previous step on intro 12228 * 12229 * @api private 12230 * @method _nextStep 12231 */ 12232 function _previousStep() { 12233 this._direction = 'backward'; 12234 12235 if (this._currentStep === 0) { 12236 return false; 12237 } 12238 12239 var nextStep = this._introItems[--this._currentStep]; 12240 if (typeof (this._introBeforeChangeCallback) !== 'undefined') { 12241 this._introBeforeChangeCallback.call(this, nextStep.element); 12242 } 12243 12244 _showElement.call(this, nextStep); 12245 } 12246 12247 /** 12248 * Exit from intro 12249 * 12250 * @api private 12251 * @method _exitIntro 12252 * @param {Object} targetElement 12253 */ 12254 function _exitIntro(targetElement) { 12255 //remove overlay layer from the page 12256 var overlayLayer = targetElement.querySelector('.introjs-overlay'); 12257 12258 //return if intro already completed or skipped 12259 if (overlayLayer == null) { 12260 return; 12261 } 12262 12263 //for fade-out animation 12264 overlayLayer.style.opacity = 0; 12265 setTimeout(function () { 12266 if (overlayLayer.parentNode) { 12267 overlayLayer.parentNode.removeChild(overlayLayer); 12268 } 12269 }, 500); 12270 12271 //remove all helper layers 12272 var helperLayer = targetElement.querySelector('.introjs-helperLayer'); 12273 if (helperLayer) { 12274 helperLayer.parentNode.removeChild(helperLayer); 12275 } 12276 12277 //remove intro floating element 12278 var floatingElement = document.querySelector('.introjsFloatingElement'); 12279 if (floatingElement) { 12280 floatingElement.parentNode.removeChild(floatingElement); 12281 } 12282 12283 //remove `introjs-showElement` class from the element 12284 var showElement = document.querySelector('.introjs-showElement'); 12285 if (showElement) { 12286 showElement.className = showElement.className.replace(/introjs-[a-zA-Z]+/g, '').replace(/^\s+|\s+$/g, ''); // This is a manual trim. 12287 } 12288 12289 //remove `introjs-fixParent` class from the elements 12290 var fixParents = document.querySelectorAll('.introjs-fixParent'); 12291 if (fixParents && fixParents.length > 0) { 12292 for (var i = fixParents.length - 1; i >= 0; i--) { 12293 fixParents[i].className = fixParents[i].className.replace(/introjs-fixParent/g, '').replace(/^\s+|\s+$/g, ''); 12294 }; 12295 } 12296 12297 //clean listeners 12298 if (window.removeEventListener) { 12299 window.removeEventListener('keydown', this._onKeyDown, true); 12300 } else if (document.detachEvent) { //IE 12301 document.detachEvent('onkeydown', this._onKeyDown); 12302 } 12303 12304 //set the step to zero 12305 this._currentStep = undefined; 12306 } 12307 12308 /** 12309 * Render tooltip box in the page 12310 * 12311 * @api private 12312 * @method _placeTooltip 12313 * @param {Object} targetElement 12314 * @param {Object} tooltipLayer 12315 * @param {Object} arrowLayer 12316 */ 12317 function _placeTooltip(targetElement, tooltipLayer, arrowLayer, helperNumberLayer) { 12318 var tooltipCssClass = '', 12319 currentStepObj, 12320 tooltipOffset, 12321 targetElementOffset; 12322 12323 //reset the old style 12324 tooltipLayer.style.top = null; 12325 tooltipLayer.style.right = null; 12326 tooltipLayer.style.bottom = null; 12327 tooltipLayer.style.left = null; 12328 tooltipLayer.style.marginLeft = null; 12329 tooltipLayer.style.marginTop = null; 12330 12331 arrowLayer.style.display = 'inherit'; 12332 12333 if (typeof(helperNumberLayer) != 'undefined' && helperNumberLayer != null) { 12334 helperNumberLayer.style.top = null; 12335 helperNumberLayer.style.left = null; 12336 } 12337 12338 //prevent error when `this._currentStep` is undefined 12339 if (!this._introItems[this._currentStep]) return; 12340 12341 //if we have a custom css class for each step 12342 currentStepObj = this._introItems[this._currentStep]; 12343 if (typeof (currentStepObj.tooltipClass) === 'string') { 12344 tooltipCssClass = currentStepObj.tooltipClass; 12345 } else { 12346 tooltipCssClass = this._options.tooltipClass; 12347 } 12348 12349 tooltipLayer.className = ('introjs-tooltip ' + tooltipCssClass).replace(/^\s+|\s+$/g, ''); 12350 12351 //custom css class for tooltip boxes 12352 var tooltipCssClass = this._options.tooltipClass; 12353 12354 currentTooltipPosition = this._introItems[this._currentStep].position; 12355 switch (currentTooltipPosition) { 12356 case 'top': 12357 tooltipLayer.style.left = '15px'; 12358 tooltipLayer.style.top = '-' + (_getOffset(tooltipLayer).height + 10) + 'px'; 12359 arrowLayer.className = 'introjs-arrow bottom'; 12360 break; 12361 case 'right': 12362 tooltipLayer.style.left = (_getOffset(targetElement).width + 20) + 'px'; 12363 arrowLayer.className = 'introjs-arrow left'; 12364 break; 12365 case 'left': 12366 if (this._options.showStepNumbers == true) { 12367 tooltipLayer.style.top = '15px'; 12368 } 12369 tooltipLayer.style.right = (_getOffset(targetElement).width + 20) + 'px'; 12370 arrowLayer.className = 'introjs-arrow right'; 12371 break; 12372 case 'floating': 12373 arrowLayer.style.display = 'none'; 12374 12375 //we have to adjust the top and left of layer manually for intro items without element 12376 tooltipOffset = _getOffset(tooltipLayer); 12377 12378 tooltipLayer.style.left = '50%'; 12379 tooltipLayer.style.top = '50%'; 12380 tooltipLayer.style.marginLeft = '-' + (tooltipOffset.width / 2) + 'px'; 12381 tooltipLayer.style.marginTop = '-' + (tooltipOffset.height / 2) + 'px'; 12382 12383 if (typeof(helperNumberLayer) != 'undefined' && helperNumberLayer != null) { 12384 helperNumberLayer.style.left = '-' + ((tooltipOffset.width / 2) + 18) + 'px'; 12385 helperNumberLayer.style.top = '-' + ((tooltipOffset.height / 2) + 18) + 'px'; 12386 } 12387 12388 break; 12389 case 'bottom-right-aligned': 12390 arrowLayer.className = 'introjs-arrow top-right'; 12391 tooltipLayer.style.right = '0px'; 12392 tooltipLayer.style.bottom = '-' + (_getOffset(tooltipLayer).height + 10) + 'px'; 12393 break; 12394 case 'bottom-middle-aligned': 12395 targetElementOffset = _getOffset(targetElement); 12396 tooltipOffset = _getOffset(tooltipLayer); 12397 12398 arrowLayer.className = 'introjs-arrow top-middle'; 12399 tooltipLayer.style.left = (targetElementOffset.width / 2 - tooltipOffset.width / 2) + 'px'; 12400 tooltipLayer.style.bottom = '-' + (tooltipOffset.height + 10) + 'px'; 12401 break; 12402 case 'bottom-left-aligned': 12403 // Bottom-left-aligned is the same as the default bottom 12404 case 'bottom': 12405 // Bottom going to follow the default behavior 12406 default: 12407 tooltipLayer.style.bottom = '-' + (_getOffset(tooltipLayer).height + 10) + 'px'; 12408 arrowLayer.className = 'introjs-arrow top'; 12409 break; 12410 } 12411 } 12412 12413 /** 12414 * Update the position of the helper layer on the screen 12415 * 12416 * @api private 12417 * @method _setHelperLayerPosition 12418 * @param {Object} helperLayer 12419 */ 12420 function _setHelperLayerPosition(helperLayer) {
12421 if (helperLayer) { 12422 //prevent error when `this._currentStep` in undefined 12423 if (!this._introItems[this._currentStep]) return; 12424 12425 var currentElement = this._introItems[this._currentStep], 12426 elementPosition = _getOffset(currentElement.element), 12427 widthHeightPadding = 10; 12428 12429 if (currentElement.position == 'floating') { 12430 widthHeightPadding = 0; 12431 } 12432 12433 //set new position to helper layer 12434 helperLayer.setAttribute('style', 'width: ' + (elementPosition.width + widthHeightPadding) + 'px; ' + 12435 'height:' + (elementPosition.height + widthHeightPadding) + 'px; ' + 12436 'top:' + (elementPosition.top - 5) + 'px;' + 12437 'left: ' + (elementPosition.left - 5) + 'px;'); 12438 } 12439 } 12440 12441 /** 12442 * Show an element on the page 12443 * 12444 * @api private 12445 * @method _showElement 12446 * @param {Object} targetElement 12447 */ 12448 function _showElement(targetElement) { 12449 12450 if (typeof (this._introChangeCallback) !== 'undefined') { 12451 this._introChangeCallback.call(this, targetElement.element); 12452 } 12453 12454 var self = this, 12455 oldHelperLayer = document.querySelector('.introjs-helperLayer'), 12456 elementPosition = _getOffset(targetElement.element); 12457 12458 if (oldHelperLayer != null) { 12459 var oldHelperNumberLayer = oldHelperLayer.querySelector('.introjs-helperNumberLayer'), 12460 oldtooltipLayer = oldHelperLayer.querySelector('.introjs-tooltiptext'), 12461 oldArrowLayer = oldHelperLayer.querySelector('.introjs-arrow'), 12462 oldtooltipContainer = oldHelperLayer.querySelector('.introjs-tooltip'), 12463 skipTooltipButton = oldHelperLayer.querySelector('.introjs-skipbutton'), 12464 prevTooltipButton = oldHelperLayer.querySelector('.introjs-prevbutton'), 12465 nextTooltipButton = oldHelperLayer.querySelector('.introjs-nextbutton'); 12466 12467 //hide the tooltip 12468 oldtooltipContainer.style.opacity = 0; 12469 12470 if (oldHelperNumberLayer != null) { 12471 var lastIntroItem = this._introItems[(targetElement.step - 2 >= 0 ? targetElement.step - 2 : 0)]; 12472 12473 if (lastIntroItem != null && (this._direction == 'forward' && lastIntroItem.position == 'floating') || (this._direction == 'backward' && targetElement.position == 'floating')) { 12474 oldHelperNumberLayer.style.opacity = 0; 12475 } 12476 } 12477 12478 //set new position to helper layer 12479 _setHelperLayerPosition.call(self, oldHelperLayer); 12480 12481 //remove `introjs-fixParent` class from the elements 12482 var fixParents = document.querySelectorAll('.introjs-fixParent'); 12483 if (fixParents && fixParents.length > 0) { 12484 for (var i = fixParents.length - 1; i >= 0; i--) { 12485 fixParents[i].className = fixParents[i].className.replace(/introjs-fixParent/g, '').replace(/^\s+|\s+$/g, ''); 12486 }; 12487 } 12488 12489 //remove old classes 12490 var oldShowElement = document.querySelector('.introjs-showElement'); 12491 oldShowElement.className = oldShowElement.className.replace(/introjs-[a-zA-Z]+/g, '').replace(/^\s+|\s+$/g, ''); 12492 //we should wait until the CSS3 transition is competed (it's 0.3 sec) to prevent incorrect `height` and `width` calculation 12493 if (self._lastShowElementTimer) { 12494 clearTimeout(self._lastShowElementTimer); 12495 } 12496 self._lastShowElementTimer = setTimeout(function() { 12497 //set current step to the label 12498 if (oldHelperNumberLayer != null) { 12499 oldHelperNumberLayer.innerHTML = targetElement.step; 12500 } 12501 //set current tooltip text 12502 oldtooltipLayer.innerHTML = targetElement.intro; 12503 //set the tooltip position 12504 _placeTooltip.call(self, targetElement.element, oldtooltipContainer, oldArrowLayer, oldHelperNumberLayer); 12505 12506 //change active bullet 12507 oldHelperLayer.querySelector('.introjs-bullets li > a.active').className = ''; 12508 oldHelperLayer.querySelector('.introjs-bullets li > a[data-stepnumber="' + targetElement.step + '"]').className = 'active'; 12509 12510 //show the tooltip 12511 oldtooltipContainer.style.opacity = 1;
12512 if (oldHelperNumberLayer) oldHelperNumberLayer.style.opacity = 1; 12513 }, 350); 12514 12515 } else { 12516 var helperLayer = document.createElement('div'), 12517 arrowLayer = document.createElement('div'), 12518 tooltipLayer = document.createElement('div'), 12519 tooltipTextLayer = document.createElement('div'), 12520 bulletsLayer = document.createElement('div'), 12521 buttonsLayer = document.createElement('div'); 12522 12523 helperLayer.className = 'introjs-helperLayer'; 12524 12525 //set new position to helper layer 12526 _setHelperLayerPosition.call(self, helperLayer); 12527 12528 //add helper layer to target element 12529 this._targetElement.appendChild(helperLayer); 12530 12531 arrowLayer.className = 'introjs-arrow'; 12532 12533 tooltipTextLayer.className = 'introjs-tooltiptext'; 12534 tooltipTextLayer.innerHTML = targetElement.intro; 12535 12536 bulletsLayer.className = 'introjs-bullets'; 12537 12538 if (this._options.showBullets === false) { 12539 bulletsLayer.style.display = 'none'; 12540 } 12541 12542 var ulContainer = document.createElement('ul'); 12543 12544 for (var i = 0, stepsLength = this._introItems.length; i < stepsLength; i++) { 12545 var innerLi = document.createElement('li'); 12546 var anchorLink = document.createElement('a'); 12547 12548 anchorLink.onclick = function() { 12549 self.goToStep(this.getAttribute('data-stepnumber')); 12550 }; 12551 12552 if (i === 0) anchorLink.className = "active"; 12553 12554 anchorLink.href = 'javascript:void(0);'; 12555 anchorLink.innerHTML = " "; 12556 anchorLink.setAttribute('data-stepnumber', this._introItems[i].step); 12557 12558 innerLi.appendChild(anchorLink); 12559 ulContainer.appendChild(innerLi); 12560 } 12561 12562 bulletsLayer.appendChild(ulContainer); 12563 12564 buttonsLayer.className = 'introjs-tooltipbuttons'; 12565 if (this._options.showButtons === false) { 12566 buttonsLayer.style.display = 'none'; 12567 } 12568 12569 tooltipLayer.className = 'introjs-tooltip'; 12570 tooltipLayer.appendChild(tooltipTextLayer); 12571 tooltipLayer.appendChild(bulletsLayer); 12572 12573 //add helper layer number 12574 if (this._options.showStepNumbers == true) { 12575 var helperNumberLayer = document.createElement('span'); 12576 helperNumberLayer.className = 'introjs-helperNumberLayer'; 12577 helperNumberLayer.innerHTML = targetElement.step; 12578 helperLayer.appendChild(helperNumberLayer); 12579 } 12580 tooltipLayer.appendChild(arrowLayer); 12581 helperLayer.appendChild(tooltipLayer); 12582 12583 //next button 12584 var nextTooltipButton = document.createElement('a'); 12585 12586 nextTooltipButton.onclick = function() { 12587 if (self._introItems.length - 1 != self._currentStep) { 12588 _nextStep.call(self); 12589 } 12590 }; 12591 12592 nextTooltipButton.href = 'javascript:void(0);'; 12593 nextTooltipButton.innerHTML = this._options.nextLabel; 12594 12595 //previous button 12596 var prevTooltipButton = document.createElement('a'); 12597 12598 prevTooltipButton.onclick = function() { 12599 if (self._currentStep != 0) { 12600 _previousStep.call(self); 12601 } 12602 }; 12603 12604 prevTooltipButton.href = 'javascript:void(0);'; 12605 prevTooltipButton.innerHTML = this._options.prevLabel; 12606 12607 //skip button 12608 var skipTooltipButton = document.createElement('a'); 12609 skipTooltipButton.className = 'introjs-button introjs-skipbutton'; 12610 skipTooltipButton.href = 'javascript:void(0);'; 12611 skipTooltipButton.innerHTML = this._options.skipLabel; 12612 12613 skipTooltipButton.onclick = function() { 12614 if (self._introItems.length - 1 == self._currentStep && typeof (self._introCompleteCallback) === 'function') { 12615 self._introCompleteCallback.call(self); 12616 } 12617 12618 if (self._introItems.length - 1 != self._currentStep && typeof (self._introExitCallback) === 'function') { 12619 self._introExitCallback.call(self); 12620 } 12621 12622 _exitIntro.call(self, self._targetElement); 12623 }; 12624 12625 buttonsLayer.appendChild(skipTooltipButton); 12626 12627 //in order to prevent displaying next/previous button always 12628 if (this._introItems.length > 1) { 12629 buttonsLayer.appendChild(prevTooltipButton); 12630 buttonsLayer.appendChild(nextTooltipButton); 12631 } 12632 12633 tooltipLayer.appendChild(buttonsLayer); 12634 12635 //set proper position 12636 _placeTooltip.call(self, targetElement.element, tooltipLayer, arrowLayer, helperNumberLayer); 12637 } 12638 12639 if (this._currentStep == 0 && this._introItems.length > 1) { 12640 prevTooltipButton.className = 'introjs-button introjs-prevbutton introjs-disabled'; 12641 nextTooltipButton.className = 'introjs-button introjs-nextbutton'; 12642 skipTooltipButton.innerHTML = this._options.skipLabel; 12643 } else if (this._introItems.length - 1 == this._currentStep || this._introItems.length == 1) { 12644 skipTooltipButton.innerHTML = this._options.doneLabel; 12645 prevTooltipButton.className = 'introjs-button introjs-prevbutton'; 12646 nextTooltipButton.className = 'introjs-button introjs-nextbutton introjs-disabled'; 12647 } else { 12648 prevTooltipButton.className = 'introjs-button introjs-prevbutton'; 12649 nextTooltipButton.className = 'introjs-button introjs-nextbutton'; 12650 skipTooltipButton.innerHTML = this._options.skipLabel; 12651 } 12652 12653 //Set focus on "next" button, so that hitting Enter always moves you onto the next step 12654 nextTooltipButton.focus(); 12655 12656 //add target element position style 12657 targetElement.element.className += ' introjs-showElement'; 12658 12659 var currentElementPosition = _getPropValue(targetElement.element, 'position'); 12660 if (currentElementPosition !== 'absolute' && 12661 currentElementPosition !== 'relative') { 12662 //change to new intro item 12663 targetElement.element.className += ' introjs-relativePosition'; 12664 } 12665 12666 var parentElm = targetElement.element.parentNode; 12667 while (parentElm != null) { 12668 if (parentElm.tagName.toLowerCase() === 'body') break; 12669 12670 //fix The Stacking Contenxt problem. 12671 //More detail: https://developer.mozilla.org/en-US/docs/Web/Guide/CSS/Understanding_z_index/The_stacking_context 12672 var zIndex = _getPropValue(parentElm, 'z-index'); 12673 var opacity = parseFloat(_getPropValue(parentElm, 'opacity')); 12674 if (/[0-9]+/.test(zIndex) || opacity < 1) { 12675 parentElm.className += ' introjs-fixParent'; 12676 } 12677 12678 parentElm = parentElm.parentNode; 12679 } 12680 12681 if (!_elementInViewport(targetElement.element) && this._options.scrollToElement === true) { 12682 var rect = targetElement.element.getBoundingClientRect(), 12683 winHeight=_getWinSize().height, 12684 top = rect.bottom - (rect.bottom - rect.top), 12685 bottom = rect.bottom - winHeight; 12686 12687 //Scroll up 12688 if (top < 0 || targetElement.element.clientHeight > winHeight) { 12689 window.scrollBy(0, top - 30); // 30px padding from edge to look nice 12690 12691 //Scroll down 12692 } else { 12693 window.scrollBy(0, bottom + 100); // 70px + 30px padding from edge to look nice 12694 } 12695 } 12696 12697 if (typeof (this._introAfterChangeCallback) !== 'undefined') { 12698 this._introAfterChangeCallback.call(this, targetElement.element); 12699 } 12700 } 12701 12702 /** 12703 * Get an element CSS property on the page 12704 * Thanks to JavaScript Kit: http://www.javascriptkit.com/dhtmltutors/dhtmlcascade4.shtml 12705 * 12706 * @api private 12707 * @method _getPropValue 12708 * @param {Object} element 12709 * @param {String} propName 12710 * @returns Element's property value 12711 */ 12712 function _getPropValue (element, propName) { 12713 var propValue = ''; 12714 if (element.currentStyle) { //IE 12715 propValue = element.currentStyle[propName]; 12716 } else if (document.defaultView && document.defaultView.getComputedStyle) { //Others 12717 propValue = document.defaultView.getComputedStyle(element, null).getPropertyValue(propName); 12718 } 12719 12720 //Prevent exception in IE 12721 if (propValue && propValue.toLowerCase) { 12722 return propValue.toLowerCase(); 12723 } else { 12724 return propValue; 12725 } 12726 } 12727 12728 /** 12729 * Provides a cross-browser way to get the screen dimensions 12730 * via: http://stackoverflow.com/questions/5864467/internet-explorer-innerheight 12731 * 12732 * @api private 12733 * @method _getWinSize 12734 * @returns {Object} width and height attributes 12735 */ 12736 function _getWinSize() { 12737 if (window.innerWidth != undefined) { 12738 return { width: window.innerWidth, height: window.innerHeight }; 12739 } else { 12740 var D = document.documentElement; 12741 return { width: D.clientWidth, height: D.clientHeight }; 12742 } 12743 } 12744 12745 /** 12746 * Add overlay layer to the page 12747 * http://stackoverflow.com/questions/123999/how-to-tell-if-a-dom-element-is-visible-in-the-current-viewport 12748 * 12749 * @api private 12750 * @method _elementInViewport 12751 * @param {Object} el 12752 */ 12753 function _elementInViewport(el) { 12754 var rect = el.getBoundingClientRect(); 12755 12756 return ( 12757 rect.top >= 0 && 12758 rect.left >= 0 && 12759 (rect.bottom+80) <= window.innerHeight && // add 80 to get the text right 12760 rect.right <= window.innerWidth 12761 ); 12762 } 12763 12764 /** 12765 * Add overlay layer to the page 12766 * 12767 * @api private 12768 * @method _addOverlayLayer 12769 * @param {Object} targetElm 12770 */ 12771 function _addOverlayLayer(targetElm) { 12772 var overlayLayer = document.createElement('div'), 12773 styleText = '', 12774 self = this; 12775 12776 //set css class name 12777 overlayLayer.className = 'introjs-overlay'; 12778 12779 //check if the target element is body, we should calculate the size of overlay layer in a better way 12780 if (targetElm.tagName.toLowerCase() === 'body') { 12781 styleText += 'top: 0;bottom: 0; left: 0;right: 0;position: fixed;'; 12782 overlayLayer.setAttribute('style', styleText); 12783 } else { 12784 //set overlay layer position 12785 var elementPosition = _getOffset(targetElm); 12786 if (elementPosition) { 12787 styleText += 'width: ' + elementPosition.width + 'px; height:' + elementPosition.height + 'px;
12787 top:' + elementPosition.top + 'px;left: ' + elementPosition.left + 'px;'; 12788 overlayLayer.setAttribute('style', styleText); 12789 } 12790 } 12791 12792 targetElm.appendChild(overlayLayer); 12793 12794 overlayLayer.onclick = function() { 12795 if (self._options.exitOnOverlayClick == true) { 12796 _exitIntro.call(self, targetElm); 12797 12798 //check if any callback is defined 12799 if (self._introExitCallback != undefined) { 12800 self._introExitCallback.call(self); 12801 } 12802 } 12803 }; 12804 12805 setTimeout(function() { 12806 styleText += 'opacity: ' + self._options.overlayOpacity.toString() + ';'; 12807 overlayLayer.setAttribute('style', styleText); 12808 }, 10); 12809 12810 return true; 12811 } 12812 12813 /** 12814 * Get an element position on the page 12815 * Thanks to `meouw`: http://stackoverflow.com/a/442474/375966 12816 * 12817 * @api private 12818 * @method _getOffset 12819 * @param {Object} element 12820 * @returns Element's position info 12821 */ 12822 function _getOffset(element) { 12823 var elementPosition = {}; 12824 12825 //set width 12826 elementPosition.width = element.offsetWidth; 12827 12828 //set height 12829 elementPosition.height = element.offsetHeight; 12830 12831 //calculate element top and left 12832 var _x = 0; 12833 var _y = 0; 12834 while (element && !isNaN(element.offsetLeft) && !isNaN(element.offsetTop)) { 12835 _x += element.offsetLeft; 12836 _y += element.offsetTop; 12837 element = element.offsetParent; 12838 } 12839 //set top 12840 elementPosition.top = _y; 12841 //set left 12842 elementPosition.left = _x; 12843 12844 return elementPosition; 12845 } 12846 12847 /** 12848 * Overwrites obj1's values with obj2's and adds obj2's if non existent in obj1 12849 * via: http://stackoverflow.com/questions/171251/how-can-i-merge-properties-of-two-javascript-objects-dynamically 12850 * 12851 * @param obj1 12852 * @param obj2 12853 * @returns obj3 a new object based on obj1 and obj2 12854 */ 12855 function _mergeOptions(obj1,obj2) { 12856 var obj3 = {}; 12857 for (var attrname in obj1) { obj3[attrname] = obj1[attrname]; } 12858 for (var attrname in obj2) { obj3[attrname] = obj2[attrname]; } 12859 return obj3; 12860 } 12861 12862 var introJs = function (targetElm) { 12863 if (typeof (targetElm) === 'object') { 12864 //Ok, create a new instance 12865 return new IntroJs(targetElm); 12866 12867 } else if (typeof (targetElm) === 'string') { 12868 //select the target element with query selector 12869 var targetElement = document.querySelector(targetElm); 12870 12871 if (targetElement) { 12872 return new IntroJs(targetElement); 12873 } else { 12874 throw new Error('There is no element with given selector.'); 12875 } 12876 } else { 12877 return new IntroJs(document.body); 12878 } 12879 }; 12880 12881 /** 12882 * Current IntroJs version 12883 * 12884 * @property version
12885 * @type String 12886 */ 12887 introJs.version = VERSION; 12888 12889 //Prototype 12890 introJs.fn = IntroJs.prototype = { 12891 clone: function () { 12892 return new IntroJs(this); 12893 }, 12894 setOption: function(option, value) { 12895 this._options[option] = value; 12896 return this; 12897 }, 12898 setOptions: function(options) { 12899 this._options = _mergeOptions(this._options, options); 12900 return this; 12901 }, 12902 start: function () { 12903 _introForElement.call(this, this._targetElement); 12904 return this; 12905 }, 12906 goToStep: function(step) { 12907 _goToStep.call(this, step); 12908 return this; 12909 }, 12910 nextStep: function() { 12911 _nextStep.call(this); 12912 return this; 12913 }, 12914 previousStep: function() { 12915 _previousStep.call(this); 12916 return this; 12917 }, 12918 exit: function() { 12919 _exitIntro.call(this, this._targetElement); 12920 }, 12921 refresh: function() { 12922 _setHelperLayerPosition.call(this, document.querySelector('.introjs-helperLayer')); 12923 return this; 12924 }, 12925 onbeforechange: function(providedCallback) { 12926 if (typeof (providedCallback) === 'function') { 12927 this._introBeforeChangeCallback = providedCallback; 12928 } else { 12929 throw new Error('Provided callback for onbeforechange was not a function'); 12930 } 12931 return this; 12932 }, 12933 onchange: function(providedCallback) { 12934 if (typeof (providedCallback) === 'function') { 12935 this._introChangeCallback = providedCallback; 12936 } else { 12937 throw new Error('Provided callback for onchange was not a function.'); 12938 } 12939 return this; 12940 }, 12941 onafterchange: function(providedCallback) { 12942 if (typeof (providedCallback) === 'function') { 12943 this._introAfterChangeCallback = providedCallback; 12944 } else { 12945 throw new Error('Provided callback for onafterchange was not a function'); 12946 } 12947 return this; 12948 }, 12949 oncomplete: function(providedCallback) { 12950 if (typeof (providedCallback) === 'function') { 12951 this._introCompleteCallback = providedCallback; 12952 } else { 12953 throw new Error('Provided callback for oncomplete was not a function.'); 12954 } 12955 return this; 12956 }, 12957 onexit: function(providedCallback) { 12958 if (typeof (providedCallback) === 'function') { 12959 this._introExitCallback = providedCallback; 12960 } else { 12961 throw new Error('Provided callback for onexit was not a function.'); 12962 } 12963 return this; 12964 } 12965 }; 12966 12967 exports.introJs = introJs; 12968 return introJs; 12969})); 12970 12971 12972 12973 12974 12975 12976 12977 12978 12979 12980 12981 12982 12983 12984 12985 12986 12987 12988 12989 12990 12991 12992 12993 12994 12995 12996 12997 12998 12999 13000 13001 13002//#################################################################################################################################################################################### 13003//#################################################################################################################################################################################### 13004//#################################################################################################################################################################################### 13005//#################################################################################################################################################################################### 13006//#################################################################################################################################################################################### 13007//#################################################################################################################################################################################### 13008//#################################################################################################################################################################################### 13009//#################################################################################################################################################################################### 13010//#################################################################################################################################################################################### 13011//#################################################################################################################################################################################### 13012//#################################################################################################################################################################################### 13013//#################################################################################################################################################################################### 13014//####### POLL 13015 13016/* 13017 * jQuery Hotkeys Plugin 13018 * Copyright 2010, John Resig 13019 * Dual licensed under the MIT or GPL Version 2 licenses. 13020 * 13021 * Based upon the plugin by Tzury Bar Yochay: 13022 * http://github.com/tzuryby/hotkeys 13023 * 13024 * Original idea by: 13025 * Binny V A, http://www.openjs.com/scripts/events/keyboard_shortcuts/ 13026 */ 13027
vendor: 4,713 bytes, lines 13028-13188
13028/* 13029 * One small change is: now keys are passed by object { keys: '...' } 13030 * Might be useful, when you want to pass some other data to your handler 13031 */ 13032 13033(function(jQuery) { 13034 13035 jQuery.hotkeys = { 13036 version: "0.8", 13037 13038 specialKeys: { 13039 8: "backspace", 13040 9: "tab", 13041 10: "return", 13042 13: "return", 13043 16: "shift", 13044 17: "ctrl", 13045 18: "alt", 13046 19: "pause", 13047 20: "capslock", 13048 27: "esc", 13049 32: "space", 13050 33: "pageup", 13051 34: "pagedown", 13052 35: "end", 13053 36: "home", 13054 37: "left", 13055 38: "up", 13056 39: "right", 13057 40: "down", 13058 45: "insert", 13059 46: "del", 13060 59: ";", 13061 61: "=", 13062 96: "0", 13063 97: "1", 13064 98: "2", 13065 99: "3", 13066 100: "4", 13067 101: "5", 13068 102: "6", 13069 103: "7", 13070 104: "8", 13071 105: "9", 13072 106: "*", 13073 107: "+", 13074 109: "-", 13075 110: ".", 13076 111: "/", 13077 112: "f1", 13078 113: "f2", 13079 114: "f3", 13080 115: "f4", 13081 116: "f5", 13082 117: "f6", 13083 118: "f7", 13084 119: "f8", 13085 120: "f9", 13086 121: "f10", 13087 122: "f11", 13088 123: "f12", 13089 144: "numlock", 13090 145: "scroll", 13091 173: "-", 13092 186: ";", 13093 187: "=", 13094 188: ",", 13095 189: "-", 13096 190: ".", 13097 191: "/", 13098 192: "`", 13099 219: "[", 13100 220: "\\", 13101 221: "]", 13102 222: "'" 13103 }, 13104 13105 shiftNums: { 13106 "`": "~", 13107 "1": "!", 13108 "2": "@", 13109 "3": "#", 13110 "4": "$", 13111 "5": "%", 13112 "6": "^", 13113 "7": "&", 13114 "8": "*", 13115 "9": "(", 13116 "0": ")", 13117 "-": "_", 13118 "=": "+", 13119 ";": ": ", 13120 "'": "\"", 13121 ",": "<", 13122 ".": ">", 13123 "/": "?", 13124 "\\": "|" 13125 }, 13126 13127 // excludes: button, checkbox, file, hidden, image, password, radio, reset, search, submit, url 13128 textAcceptingInputTypes: ["text", "password", "number", "email", "url", "range", "date", "month", "week", "time", "datetime", "datetime-local", "search", "color", "tel"], 13129 13130 options: { 13131 filterTextInputs: true 13132 } 13133 }; 13134 13135 function keyHandler(handleObj) { 13136 if (typeof handleObj.data === "string") { 13137 handleObj.data = { 13138 keys: handleObj.data 13139 }; 13140 } 13141 13142 // Only care when a possible input has been specified 13143 if (!handleObj.data || !handleObj.data.keys || typeof handleObj.data.keys !== "string") { 13144 return; 13145 } 13146 13147 var origHandler = handleObj.handler, 13148 keys = handleObj.data.keys.toLowerCase().split(" "); 13149 13150 handleObj.handler = function(event) { 13151 // Don't fire in text-accepting inputs that we didn't directly bind to 13152 if (this !== event.target && (/textarea|select/i.test(event.target.nodeName) || (jQuery.hotkeys.options.filterTextInputs && jQuery.inArray(event.target.type, jQuery.hotkeys.textAcceptingInputTypes) > -1))) { 13153 return; 13154 } 13155 13156 var special = event.type !== "keypress" && jQuery.hotkeys.specialKeys[event.which], 13157 character = String.fromCharCode(event.which).toLowerCase(), 13158 modif = "", 13159 possible = {}; 13160 13161 jQuery.each(["alt", "ctrl", "shift"], function(index, specialKey) { 13162 13163 if (event[specialKey + 'Key'] && special !== specialKey) { 13164 modif += specialKey + '+'; 13165 } 13166 }); 13167 13168 // metaKey is triggered off ctrlKey erronously 13169 if (event.metaKey && !event.ctrlKey && special !== "meta") { 13170 modif += "meta+"; 13171 } 13172 13173 if (event.metaKey && special !== "meta" && modif.indexOf("alt+ctrl+shift+") > -1) { 13174 modif = modif.replace("alt+ctrl+shift+", "hyper+"); 13175 } 13176 13177 if (special) { 13178 possible[modif + special] = true; 13179 } else { 13180 possible[modif + character] = true; 13181 possible[modif + jQuery.hotkeys.shiftNums[character]] = true; 13182 13183 // "$" can be triggered as "Shift+4" or "Shift+$" or just "$" 13184 if (modif === "shift+") { 13185 possible[jQuery.hotkeys.shiftNums[character]] = true; 13186 } 13187 } 13188
13189 for (var i = 0, l = keys.length; i < l; i++) { 13190 if (possible[keys[i]]) { 13191 return origHandler.apply(this, arguments); 13192 } 13193 } 13194 }; 13195 } 13196 13197 jQuery.each(["keydown", "keyup", "keypress"], function() { 13198 jQuery.event.special[this] = { 13199 add: keyHandler 13200 }; 13201 }); 13202 13203})(this.jQuery); 13204 13205 13206 13207//#################################################################################################################################################################################### 13208//#################################################################################################################################################################################### 13209//#################################################################################################################################################################################### 13210//#################################################################################################################################################################################### 13211//#################################################################################################################################################################################### 13212//#################################################################################################################################################################################### 13213//#################################################################################################################################################################################### 13214//#################################################################################################################################################################################### 13215//#################################################################################################################################################################################### 13216//#################################################################################################################################################################################### 13217//#################################################################################################################################################################################### 13218//#################################################################################################################################################################################### 13219//####### POLL 13220 13221 13222 13223 13224 13225 13226 13227 13228 13229 13230 13231 13232 13233 13234 13235 13236 13237 13238 13239 13240 13241/** 13242 * cbpGridGallery.js v1.0.0 13243 * http://www.codrops.com 13244 * 13245 * Licensed under the MIT license. 13246 * http://www.opensource.org/licenses/mit-license.php 13247 * 13248 * Copyright 2014, Codrops 13249 * http://www.codrops.com 13250 */ 13251;( function( window ) { 13252 13253 'use strict'; 13254 13255 var docElem = window.document.documentElement, 13256 transEndEventNames = { 13257 'WebkitTransition': 'webkitTransitionEnd', 13258 'MozTransition': 'transitionend', 13259 'OTransition': 'oTransitionEnd', 13260 'msTransition': 'MSTransitionEnd', 13261 'transition': 'transitionend' 13262 }, 13263 transEndEventName = transEndEventNames[ Modernizr.prefixed( 'transition' ) ], 13264 support = { 13265 transitions : Modernizr.csstransitions, 13266 support3d : Modernizr.csstransforms3d 13267 }; 13268 13269 function setTransform( el, transformStr ) { 13270 el.style.WebkitTransform = transformStr; 13271 el.style.msTransform = transformStr; 13272 el.style.transform = transformStr; 13273 } 13274 13275 // from http://responsejs.com/labs/dimensions/ 13276 function getViewportW() { 13277 var client = docElem['clientWidth'], 13278 inner = window['innerWidth']; 13279 13280 if( client < inner ) 13281 return inner; 13282 else 13283 return client; 13284 } 13285 13286 function extend( a, b ) { 13287 for( var key in b ) { 13288 if( b.hasOwnProperty( key ) ) { 13289 a[key] = b[key]; 13290 } 13291 } 13292 return a; 13293 } 13294 13295 function CBPGridGallery( el, options ) { 13296 this.el = el; 13297 this.options = extend( {}, this.options ); 13298 extend( this.options, options ); 13299 this._init(); 13300 } 13301 13302 CBPGridGallery.prototype.options = { 13303 }; 13304 13305 CBPGridGallery.prototype._init = function() { 13306 // main grid 13307 this.grid = this.el.querySelector( 'section.grid-wrap > ul.grid' ); 13308 // main grid items 13309 this.gridItems = [].slice.call( this.grid.querySelectorAll( 'li:not(.grid-sizer)' ) ); 13310 // items total 13311 this.itemsCount = this.gridItems.length; 13312 // slideshow grid 13313 this.slideshow = this.el.querySelector( 'section.slideshow > ul' ); 13314 // slideshow grid items 13315 this.slideshowItems = [].slice.call( this.slideshow.children ); 13316 // index of current slideshow item 13317 this.current = -1; 13318 // slideshow control buttons 13319 this.ctrlPrev = this.el.querySelector( 'section.slideshow > nav > span.nav-prev' ); 13320 this.ctrlNext = this.el.querySelector( 'section.slideshow > nav > span.nav-next' ); 13321 this.ctrlClose = this.el.querySelector( 'section.slideshow > nav > span.nav-close' ); 13322 // init masonry grid 13323 this._initMasonry(); 13324 // init events 13325 this._initEvents(); 13326 }; 13327 13328 CBPGridGallery.prototype._initMasonry = function() { 13329 var grid = this.grid; 13330 imagesLoaded( grid, function() { 13331 new Masonry( grid, { 13332 itemSelector: 'li', 13333 columnWidth: grid.querySelector( '.grid-sizer' ) 13334 }); 13335 }); 13336 }; 13337 13338 CBPGridGallery.prototype._initEvents = function() { 13339 var self = this; 13340 13341 // open the slideshow when clicking on the main grid items
13342 this.gridItems.forEach( function( item, idx ) { 13343 item.addEventListener( 'click', function() { 13344 self._openSlideshow( idx ); 13345 } ); 13346 } ); 13347 13348 // slideshow controls 13349 this.ctrlPrev.addEventListener( 'click', function() { self._navigate( 'prev' ); } ); 13350 this.ctrlNext.addEventListener( 'click', function() { self._navigate( 'next' ); } ); 13351 this.ctrlClose.addEventListener( 'click', function() { self._closeSlideshow(); } ); 13352 13353 // window resize 13354 window.addEventListener( 'resize', function() { self._resizeHandler(); } ); 13355 13356 // keyboard navigation events 13357 document.addEventListener( 'keydown', function( ev ) { 13358 if ( self.isSlideshowVisible ) { 13359 var keyCode = ev.keyCode || ev.which; 13360 13361 switch (keyCode) { 13362 case 37: 13363 self._navigate( 'prev' ); 13364 break; 13365 case 39: 13366 self._navigate( 'next' ); 13367 break; 13368 case 27: 13369 self._closeSlideshow(); 13370 break; 13371 } 13372 } 13373 } ); 13374 13375 // trick to prevent scrolling when slideshow is visible 13376 window.addEventListener( 'scroll', function() { 13377 if ( self.isSlideshowVisible ) { 13378 window.scrollTo( self.scrollPosition ? self.scrollPosition.x : 0, self.scrollPosition ? self.scrollPosition.y : 0 ); 13379 } 13380 else { 13381 self.scrollPosition = { x : window.pageXOffset || docElem.scrollLeft, y : window.pageYOffset || docElem.scrollTop }; 13382 } 13383 }); 13384 }; 13385 13386 CBPGridGallery.prototype._openSlideshow = function( pos ) { 13387 this.isSlideshowVisible = true; 13388 this.current = pos; 13389 13390 classie.addClass( this.el, 'slideshow-open' ); 13391 13392 /* position slideshow items */ 13393 13394 // set viewport items (current, next and previous) 13395 this._setViewportItems(); 13396 13397 // add class "current" and "show" to currentItem 13398 classie.addClass( this.currentItem, 'current' ); 13399 classie.addClass( this.currentItem, 'show' ); 13400 13401 // add class show to next and previous items 13402 // position previous item on the left side and the next item on the right side 13403 if( this.prevItem ) { 13404 classie.addClass( this.prevItem, 'show' ); 13405 var translateVal = Number( -1 * ( getViewportW() / 2 + this.prevItem.offsetWidth / 2 ) ); 13406 setTransform( this.prevItem, support.support3d ? 'translate3d(' + translateVal + 'px, 0, -150px)' : 'translate(' + translateVal + 'px)' ); 13407 } 13408 if( this.nextItem ) { 13409 classie.addClass( this.nextItem, 'show' ); 13410 var translateVal = Number( getViewportW() / 2 + this.nextItem.offsetWidth / 2 ); 13411 setTransform( this.nextItem, support.support3d ? 'translate3d(' + translateVal + 'px, 0, -150px)' : 'translate(' + translateVal + 'px)' ); 13412 } 13413 }; 13414 13415 CBPGridGallery.prototype._navigate = function( dir ) { 13416 if( this.isAnimating ) return; 13417 if( dir === 'next' && this.current === this.itemsCount - 1 || dir === 'prev' && this.current === 0 ) { 13418 this._closeSlideshow(); 13419 return; 13420 } 13421 13422 this.isAnimating = true; 13423 13424 // reset viewport items 13425 this._setViewportItems(); 13426 13427 var self = this, 13428 itemWidth = this.currentItem.offsetWidth, 13429 // positions for the centered/current item, both the side items and the incoming ones 13430 transformLeftStr = support.support3d ? 'translate3d(-' + Number( getViewportW() / 2 + itemWidth / 2 ) + 'px, 0, -150px)' : 'translate(-' + Number( getViewportW() / 2 + itemWidth / 2 ) + 'px)', 13431 transformRightStr = support.support3d ? 'translate3d(' + Number( getViewportW() / 2 + itemWidth / 2 ) + 'px, 0, -150px)' : 'translate(' + Number( getViewportW() / 2 + itemWidth / 2 ) + 'px)', 13432 transformCenterStr = '', transformOutStr, transformIncomingStr, 13433 // incoming item 13434 incomingItem; 13435 13436 if( dir === 'next' ) {
13437 transformOutStr = support.support3d ? 'translate3d( -' + Number( (getViewportW() * 2) / 2 + itemWidth / 2 ) + 'px, 0, -150px )' : 'translate(-' + Number( (getViewportW() * 2) / 2 + itemWidth / 2 ) + 'px)'; 13438 transformIncomingStr = support.support3d ? 'translate3d( ' + Number( (getViewportW() * 2) / 2 + itemWidth / 2 ) + 'px, 0, -150px )' : 'translate(' + Number( (getViewportW() * 2) / 2 + itemWidth / 2 ) + 'px)'; 13439 } 13440 else { 13441 transformOutStr = support.support3d ? 'translate3d( ' + Number( (getViewportW() * 2) / 2 + itemWidth / 2 ) + 'px, 0, -150px )' : 'translate(' + Number( (getViewportW() * 2) / 2 + itemWidth / 2 ) + 'px)'; 13442 transformIncomingStr = support.support3d ? 'translate3d( -' + Number( (getViewportW() * 2) / 2 + itemWidth / 2 ) + 'px, 0, -150px )' : 'translate(-' + Number( (getViewportW() * 2) / 2 + itemWidth / 2 ) + 'px)'; 13443 } 13444 13445 // remove class animatable from the slideshow grid (if it has already) 13446 classie.removeClass( self.slideshow, 'animatable' ); 13447 13448 if( dir === 'next' && this.current < this.itemsCount - 2 || dir === 'prev' && this.current > 1 ) { 13449 // we have an incoming item! 13450 incomingItem = this.slideshowItems[ dir === 'next' ? this.current + 2 : this.current - 2 ]; 13451 setTransform( incomingItem, transformIncomingStr ); 13452 classie.addClass( incomingItem, 'show' ); 13453 } 13454 13455 var slide = function() { 13456 // add class animatable to the slideshow grid 13457 classie.addClass( self.slideshow, 'animatable' ); 13458 13459 // overlays: 13460 classie.removeClass( self.currentItem, 'current' ); 13461 var nextCurrent = dir === 'next' ? self.nextItem : self.prevItem; 13462 classie.addClass( nextCurrent, 'current' ); 13463 13464 setTransform( self.currentItem, dir === 'next' ? transformLeftStr : transformRightStr ); 13465 13466 if( self.nextItem ) { 13467 setTransform( self.nextItem, dir === 'next' ? transformCenterStr : transformOutStr ); 13468 } 13469 13470 if( self.prevItem ) { 13471 setTransform( self.prevItem, dir === 'next' ? transformOutStr : transformCenterStr ); 13472 } 13473 13474 if( incomingItem ) { 13475 setTransform( incomingItem, dir === 'next' ? transformRightStr : transformLeftStr ); 13476 } 13477 13478 var onEndTransitionFn = function( ev ) { 13479 if( support.transitions ) { 13480 if( ev.propertyName.indexOf( 'transform' ) === -1 ) return false; 13481 this.removeEventListener( transEndEventName, onEndTransitionFn ); 13482 } 13483 13484 if( self.prevItem && dir === 'next' ) { 13485 classie.removeClass( self.prevItem, 'show' ); 13486 } 13487 else if( self.nextItem && dir === 'prev' ) { 13488 classie.removeClass( self.nextItem, 'show' ); 13489 } 13490 13491 if( dir === 'next' ) { 13492 self.prevItem = self.currentItem; 13493 self.currentItem = self.nextItem; 13494 if( incomingItem ) { 13495 self.nextItem = incomingItem; 13496 } 13497 } 13498 else { 13499 self.nextItem = self.currentItem; 13500 self.currentItem = self.prevItem; 13501 if( incomingItem ) { 13502 self.prevItem = incomingItem; 13503 } 13504 } 13505 13506 self.current = dir === 'next' ? self.current + 1 : self.current - 1; 13507 self.isAnimating = false; 13508 }; 13509 13510 if( support.transitions ) { 13511 self.currentItem.addEventListener( transEndEventName, onEndTransitionFn ); 13512 } 13513 else { 13514 onEndTransitionFn(); 13515 } 13516 }; 13517 13518 setTimeout( slide, 25 ); 13519 } 13520 13521 CBPGridGallery.prototype._closeSlideshow = function( pos ) { 13522 // remove class slideshow-open from the grid gallery elem 13523 classie.removeClass( this.el, 'slideshow-open' ); 13524 // remove class animatable from the slideshow grid 13525 classie.removeClass( this.slideshow, 'animatable' ); 13526 13527 var self = this, 13528 onEndTransitionFn = function( ev ) { 13529 if( support.transitions ) { 13530 if( ev.target.tagName.toLowerCase() !== 'ul' ) return; 13531 this.removeEventListener( transEndEventName, onEndTransitionFn ); 13532 } 13533 // remove classes show and current from the slideshow items 13534 classie.removeClass( self.currentItem, 'current' ); 13535 classie.removeClass( self.currentItem, 'show' ); 13536 13537 if( self.prevItem ) { 13538 classie.removeClass( self.prevItem, 'show' ); 13539 } 13540 if( self.nextItem ) { 13541 classie.removeClass( self.nextItem, 'show' ); 13542 } 13543 13544 // also reset any transforms for all the items
13545 self.slideshowItems.forEach( function( item ) { setTransform( item, '' ); } ); 13546 13547 self.isSlideshowVisible = false; 13548 }; 13549 13550 if( support.transitions ) { 13551 this.el.addEventListener( transEndEventName, onEndTransitionFn ); 13552 } 13553 else { 13554 onEndTransitionFn(); 13555 } 13556 }; 13557 13558 CBPGridGallery.prototype._setViewportItems = function() { 13559 this.currentItem = null; 13560 this.prevItem = null; 13561 this.nextItem = null; 13562 13563 if( this.current > 0 ) { 13564 this.prevItem = this.slideshowItems[ this.current - 1 ]; 13565 } 13566 if( this.current < this.itemsCount - 1 ) { 13567 this.nextItem = this.slideshowItems[ this.current + 1 ]; 13568 } 13569 this.currentItem = this.slideshowItems[ this.current ]; 13570 } 13571 13572 // taken from https://github.com/desandro/vanilla-masonry/blob/master/masonry.js by David DeSandro 13573 // original debounce by John Hann 13574 // http://unscriptable.com/index.php/2009/03/20/debouncing-javascript-methods/ 13575 CBPGridGallery.prototype._resizeHandler = function() { 13576 var self = this; 13577 function delayed() { 13578 self._resize(); 13579 self._resizeTimeout = null; 13580 } 13581 if ( this._resizeTimeout ) { 13582 clearTimeout( this._resizeTimeout ); 13583 } 13584 this._resizeTimeout = setTimeout( delayed, 50 ); 13585 } 13586 13587 CBPGridGallery.prototype._resize = function() { 13588 if ( this.isSlideshowVisible ) { 13589 // update width value 13590 if( this.prevItem ) { 13591 var translateVal = Number( -1 * ( getViewportW() / 2 + this.prevItem.offsetWidth / 2 ) ); 13592 setTransform( this.prevItem, support.support3d ? 'translate3d(' + translateVal + 'px, 0, -150px)' : 'translate(' + translateVal + 'px)' ); 13593 } 13594 if( this.nextItem ) { 13595 var translateVal = Number( getViewportW() / 2 + this.nextItem.offsetWidth / 2 ); 13596 setTransform( this.nextItem, support.support3d ? 'translate3d(' + translateVal + 'px, 0, -150px)' : 'translate(' + translateVal + 'px)' ); 13597 } 13598 } 13599 } 13600 13601 // add to global namespace 13602 window.CBPGridGallery = CBPGridGallery; 13603 13604})( window ); 13605 13606 13607 13608 13609 13610 13611 13612 13613 13614/*! 13615 * classie - class helper functions 13616 * from bonzo https://github.com/ded/bonzo 13617 * 13618 * classie.has( elem, 'my-class' ) -> true/false 13619 * classie.add( elem, 'my-new-class' ) 13620 * classie.remove( elem, 'my-unwanted-class' ) 13621 * classie.toggle( elem, 'my-class' ) 13622 */ 13623 13624/*jshint browser: true, strict: true, undef: true */ 13625/*global define: false */ 13626 13627( function( window ) { 13628 13629'use strict'; 13630 13631// class helper functions from bonzo https://github.com/ded/bonzo 13632 13633function classReg( className ) { 13634 return new RegExp("(^|\\s+)" + className + "(\\s+|$)"); 13635} 13636 13637// classList support for class management 13638// altho to be fair, the api sucks because it won't accept multiple classes at once 13639var hasClass, addClass, removeClass; 13640 13641if ( 'classList' in document.documentElement ) { 13642 hasClass = function( elem, c ) { 13643 return elem.classList.contains( c ); 13644 }; 13645 addClass = function( elem, c ) { 13646 elem.classList.add( c ); 13647 }; 13648 removeClass = function( elem, c ) { 13649 elem.classList.remove( c ); 13650 }; 13651} 13652else { 13653 hasClass = function( elem, c ) { 13654 return classReg( c ).test( elem.className ); 13655 }; 13656 addClass = function( elem, c ) { 13657 if ( !hasClass( elem, c ) ) { 13658 elem.className = elem.className + ' ' + c; 13659 } 13660 }; 13661 removeClass = function( elem, c ) { 13662 elem.className = elem.className.replace( classReg( c ), ' ' ); 13663 }; 13664} 13665 13666function toggleClass( elem, c ) { 13667 var fn = hasClass( elem, c ) ? removeClass : addClass; 13668 fn( elem, c ); 13669} 13670 13671var classie = { 13672 // full names 13673 hasClass: hasClass, 13674 addClass: addClass, 13675 removeClass: removeClass, 13676 toggleClass: toggleClass, 13677 // short names 13678 has: hasClass, 13679 add: addClass, 13680 remove: removeClass, 13681 toggle: toggleClass 13682}; 13683 13684// transport 13685if ( typeof define === 'function' && define.amd ) { 13686 // AMD 13687 define( classie ); 13688} else { 13689 // browser global 13690 window.classie = classie; 13691} 13692 13693})( window ); 13694 13695 13696 13697 13698 13699 13700/* 13701//https://github.com/claudiosmweb/ultimate-modal 13702//ULTIMATE MODAL 13703! function(a) { 13704 "function" == typeof define && define.amd ? define(["jquery"], a) : a(jQuery) 13705}(function(a) { 13706 function b(a) { 13707 return a 13708 } 13709 function c(a) { 13710 return decodeURIComponent(a.replace(e, " ")) 13711 } 13712 function d(a) { 13713 0 === a.indexOf('"') && (a = a.slice(1, - 1).replace(/\\"/g, '"').replace(/\\\\/g, "\\")); 13714 try { 13715 return f.json ? JSON.parse(a) : a 13716 } catch (b) {} 13717 } 13718 var e = /\+/g, 13719 f = a.cookie = function(e, g, h) { 13720 if (void 0 !== g) { 13721 if (h = a.extend({}, f.defaults, h), "number" == typeof h.expires) { 13722 var i = h.expires, 13723 j = h.expires = new Date; 13724 j.setDate(j.getDate() + i) 13725 } 13726 return g = f.json ? JSON.stringify(g) : String(g), document.cookie = [f.raw ? e : encodeURIComponent(e), "=", f.raw ? g : encodeURIComponent(g), h.expires ? "; expires=" + h.expires.toUTCString() : "", h.path ? "; path=" + h.path : "", h.domain ? "; domain=" + h.domain : "", h.secure ? "; secure" : ""].join("") 13727 } 13728 for (var k = f.raw ? b : c, l = document.cookie.split("; "), m = e ? void 0 : {}, n = 0, o = l.length; o > n; n++) { 13729 var p = l[n].split("="), 13730 q = k(p.shift()), 13731 r = k(p.join("=")); 13732 if (e && e === q) { 13733 m = d(r); 13734 break 13735 } 13736 e || (m[q] = d(r)) 13737 } 13738 return m 13739 }; 13740 f.defaults = {}, a.removeCookie = function(b, c) { 13741 return void 0 !== a.cookie(b) ? (a.cookie(b, "", a.extend({}, c, { 13742 expires: -1 13743 })), !0) : !1 13744 } 13745}), 13746function(a) { 13747 "use strict"; 13748 a(function() { 13749 var b = a(".ultimate-modal"); 13750 "active" !== a.cookie(ultimatemodal_params.cookie_name) && (b.delay(parseInt(ultimatemodal_params.delay, 10)).fadeIn(700), a(" #ultimate-modal-close").click(function() { 13751 b.stop().fadeOut(700).remove() 13752 })), a.cookie(ultimatemodal_params.cookie_name, "active", { 13753 path: "/", 13754 expires: parseInt(ultimatemodal_params.time, 10) 13755 }) 13756 }) 13757}(jQuery); 13758 13759*/ 13760 13761 13762 13763 13764 13765 13766 13767 13768 13769 13770 13771 13772 13773 13774 13775 13776 13777 13778 13779 13780 13781 13782 13783 13784 13785 13786 13787 13788 13789 13790 13791 13792 13793 13794 13795 13796 13797 13798 13799 13800 13801 13802 13803(function($){ 13804 13805 $.fn.twentytwenty = function(options) { 13806 var options = $.extend({default_offset_pct: 0.5, orientation: 'horizontal'}, options); 13807 return this.each(function() { 13808 13809 var sliderPct = options.default_offset_pct; 13810 var container = $(this); 13811 var sliderOrientation = options.orientation; 13812 var beforeDirection = (sliderOrientation === 'vertical') ? 'down' : 'left'; 13813 var afterDirection = (sliderOrientation === 'vertical') ? 'up' : 'right'; 13814 13815 13816 container.wrap("<div class='twentytwenty-wrapper twentytwenty-" + sliderOrientation + "'></div>"); 13817 container.append("<div class='twentytwenty-overlay'></div>"); 13818 var beforeImg = container.find("img:first"); 13819 var afterImg = container.find("img:last"); 13820 container.append("<div class='twentytwenty-handle'></div>"); 13821 var slider = container.find(".twentytwenty-handle"); 13822 slider.append("<span class='twentytwenty-" + beforeDirection + "-arrow'></span>"); 13823 slider.append("<span class='twentytwenty-" + afterDirection + "-arrow'></span>"); 13824 container.addClass("twentytwenty-container"); 13825 beforeImg.addClass("twentytwenty-before"); 13826 afterImg.addClass("twentytwenty-after"); 13827
13828 var overlay = container.find(".twentytwenty-overlay"); 13829 overlay.append("<div class='twentytwenty-before-label'></div>"); 13830 overlay.append("<div class='twentytwenty-after-label'></div>"); 13831 13832 var calcOffset = function(dimensionPct) { 13833 var w = beforeImg.width(); 13834 var h = beforeImg.height(); 13835 return { 13836 w: w+"px", 13837 h: h+"px", 13838 cw: (dimensionPct*w)+"px", 13839 ch: (dimensionPct*h)+"px" 13840 }; 13841 }; 13842 13843 var adjustContainer = function(offset) { 13844 if (sliderOrientation === 'vertical') { 13845 beforeImg.css("clip", "rect(0,"+offset.w+","+offset.ch+",0)"); 13846 } 13847 else { 13848 beforeImg.css("clip", "rect(0,"+offset.cw+","+offset.h+",0)"); 13849 } 13850 container.css("height", offset.h); 13851 }; 13852 13853 var adjustSlider = function(pct) { 13854 var offset = calcOffset(pct); 13855 slider.css((sliderOrientation==="vertical") ? "top" : "left", (sliderOrientation==="vertical") ? offset.ch : offset.cw); 13856 adjustContainer(offset); 13857 } 13858 13859 $(window).on("resize.twentytwenty", function(e) { 13860 adjustSlider(sliderPct); 13861 }); 13862 13863 var offsetX = 0; 13864 var imgWidth = 0; 13865 13866 slider.on("movestart", function(e) { 13867 if (((e.distX > e.distY && e.distX < -e.distY) || (e.distX < e.distY && e.distX > -e.distY)) && sliderOrientation !== 'vertical') { 13868 e.preventDefault(); 13869 } 13870 else if (((e.distX < e.distY && e.distX < -e.distY) || (e.distX > e.distY && e.distX > -e.distY)) && sliderOrientation === 'vertical') { 13871 e.preventDefault(); 13872 } 13873 container.addClass("active"); 13874 offsetX = container.offset().left; 13875 offsetY = container.offset().top; 13876 imgWidth = beforeImg.width(); 13877 imgHeight = beforeImg.height(); 13878 }); 13879 13880 slider.on("moveend", function(e) { 13881 container.removeClass("active"); 13882 }); 13883 13884 slider.on("move", function(e) { 13885 if (container.hasClass("active")) { 13886 sliderPct = (sliderOrientation === 'vertical') ? (e.pageY-offsetY)/imgHeight : (e.pageX-offsetX)/imgWidth; 13887 if (sliderPct < 0) { 13888 sliderPct = 0; 13889 } 13890 if (sliderPct > 1) { 13891 sliderPct = 1; 13892 } 13893 adjustSlider(sliderPct); 13894 } 13895 }); 13896 13897 container.find("img").on("mousedown", function(event) { 13898 event.preventDefault(); 13899 }); 13900 13901 $(window).trigger("resize.twentytwenty"); 13902 }); 13903 }; 13904 13905})(jQuery); 13906 13907 13908 13909 13910 13911 13912 13913 13914// jquery.event.move 13915// 13916// 1.3.6 13917// 13918// Stephen Band 13919// 13920// Triggers 'movestart', 'move' and 'moveend' events after 13921// mousemoves following a mousedown cross a distance threshold, 13922// similar to the native 'dragstart', 'drag' and 'dragend' events. 13923// Move events are throttled to animation frames. Move event objects 13924// have the properties: 13925// 13926// pageX: 13927// pageY: Page coordinates of pointer. 13928// startX: 13929// startY: Page coordinates of pointer at movestart. 13930// distX: 13931// distY: Distance the pointer has moved since movestart. 13932// deltaX: 13933// deltaY: Distance the finger has moved since last event. 13934// velocityX: 13935// velocityY: Average velocity over last few events. 13936 13937 13938(function (module) { 13939 if (typeof define === 'function' && define.amd) { 13940 // AMD. Register as an anonymous module. 13941 define(['jquery'], module); 13942 } else { 13943 // Browser globals 13944 module(jQuery); 13945 } 13946})(function(jQuery, undefined){ 13947 13948 var // Number of pixels a pressed pointer travels before movestart 13949 // event is fired. 13950 threshold = 6, 13951 13952 add = jQuery.event.add, 13953 13954 remove = jQuery.event.remove, 13955 13956 // Just sugar, so we can have arguments in the same order as 13957 // add and remove. 13958 trigger = function(node, type, data) { 13959 jQuery.event.trigger(type, data, node); 13960 }, 13961 13962 // Shim for requestAnimationFrame, falling back to timer. See: 13963 // see http://paulirish.com/2011/requestanimationframe-for-smart-animating/ 13964 requestFrame = (function(){ 13965 return ( 13966 window.requestAnimationFrame || 13967 window.webkitRequestAnimationFrame || 13968 window.mozRequestAnimationFrame || 13969 window.oRequestAnimationFrame || 13970 window.msRequestAnimationFrame || 13971 function(fn, element){ 13972 return window.setTimeout(function(){ 13973 fn(); 13974 }, 25); 13975 } 13976 ); 13977 })(), 13978 13979 ignoreTags = { 13980 textarea: true, 13981 input: true, 13982 select: true, 13983 button: true 13984 }, 13985 13986 mouseevents = { 13987 move: 'mousemove', 13988 cancel: 'mouseup dragstart', 13989 end: 'mouseup' 13990 }, 13991 13992 touchevents = { 13993 move: 'touchmove', 13994 cancel: 'touchend', 13995 end: 'touchend' 13996 }; 13997 13998 13999 // Constructors 14000 14001 function Timer(fn){ 14002 var callback = fn, 14003 active = false, 14004 running = false;
14005 14006 function trigger(time) { 14007 if (active){ 14008 callback(); 14009 requestFrame(trigger); 14010 running = true; 14011 active = false; 14012 } 14013 else { 14014 running = false; 14015 } 14016 } 14017 14018 this.kick = function(fn) { 14019 active = true; 14020 if (!running) { trigger(); } 14021 }; 14022 14023 this.end = function(fn) { 14024 var cb = callback; 14025 14026 if (!fn) { return; } 14027 14028 // If the timer is not running, simply call the end callback. 14029 if (!running) { 14030 fn(); 14031 } 14032 // If the timer is running, and has been kicked lately, then 14033 // queue up the current callback and the end callback, otherwise 14034 // just the end callback. 14035 else { 14036 callback = active ? 14037 function(){ cb(); fn(); } : 14038 fn ; 14039 14040 active = true; 14041 } 14042 }; 14043 } 14044 14045 14046 // Functions 14047 14048 function returnTrue() { 14049 return true; 14050 } 14051 14052 function returnFalse() { 14053 return false; 14054 } 14055 14056 function preventDefault(e) { 14057 e.preventDefault(); 14058 } 14059 14060 function preventIgnoreTags(e) { 14061 // Don't prevent interaction with form elements. 14062 if (ignoreTags[ e.target.tagName.toLowerCase() ]) { return; } 14063 14064 e.preventDefault(); 14065 } 14066 14067 function isLeftButton(e) { 14068 // Ignore mousedowns on any button other than the left (or primary) 14069 // mouse button, or when a modifier key is pressed. 14070 return (e.which === 1 && !e.ctrlKey && !e.altKey); 14071 } 14072 14073 function identifiedTouch(touchList, id) { 14074 var i, l; 14075 14076 if (touchList.identifiedTouch) { 14077 return touchList.identifiedTouch(id); 14078 } 14079 14080 // touchList.identifiedTouch() does not exist in 14081 // webkit yet… we must do the search ourselves... 14082 14083 i = -1; 14084 l = touchList.length; 14085 14086 while (++i < l) { 14087 if (touchList[i].identifier === id) { 14088 return touchList[i]; 14089 } 14090 } 14091 } 14092 14093 function changedTouch(e, event) { 14094 var touch = identifiedTouch(e.changedTouches, event.identifier); 14095 14096 // This isn't the touch you're looking for. 14097 if (!touch) { return; } 14098 14099 // Chrome Android (at least) includes touches that have not 14100 // changed in e.changedTouches. That's a bit annoying. Check 14101 // that this touch has changed. 14102 if (touch.pageX === event.pageX && touch.pageY === event.pageY) { return; } 14103 14104 return touch; 14105 } 14106 14107 14108 // Handlers that decide when the first movestart is triggered 14109 14110 function mousedown(e){ 14111 var data; 14112 14113 if (!isLeftButton(e)) { return; } 14114 14115 data = { 14116 target: e.target, 14117 startX: e.pageX, 14118 startY: e.pageY, 14119 timeStamp: e.timeStamp 14120 }; 14121 14122 add(document, mouseevents.move, mousemove, data); 14123 add(document, mouseevents.cancel, mouseend, data); 14124 } 14125 14126 function mousemove(e){ 14127 var data = e.data; 14128 14129 checkThreshold(e, data, e, removeMouse); 14130 } 14131 14132 function mouseend(e) { 14133 removeMouse(); 14134 } 14135 14136 function removeMouse() { 14137 remove(document, mouseevents.move, mousemove); 14138 remove(document, mouseevents.cancel, mouseend); 14139 } 14140 14141 function touchstart(e) { 14142 var touch, template; 14143 14144 // Don't get in the way of interaction with form elements. 14145 if (ignoreTags[ e.target.tagName.toLowerCase() ]) { return; } 14146 14147 touch = e.changedTouches[0]; 14148 14149 // iOS live updates the touch objects whereas Android gives us copies. 14150 // That means we can't trust the touchstart object to stay the same, 14151 // so we must copy the data. This object acts as a template for 14152 // movestart, move and moveend event objects. 14153 template = { 14154 target: touch.target, 14155 startX: touch.pageX, 14156 startY: touch.pageY, 14157 timeStamp: e.timeStamp, 14158 identifier: touch.identifier 14159 }; 14160 14161 // Use the touch identifier as a namespace, so that we can later 14162 // remove handlers pertaining only to this touch. 14163 add(document, touchevents.move + '.' + touch.identifier, touchmove, template); 14164 add(document, touchevents.cancel + '.' + touch.identifier, touchend, template); 14165 } 14166 14167 function touchmove(e){ 14168 var data = e.data, 14169 touch = changedTouch(e, data); 14170 14171 if (!touch) { return; } 14172 14173 checkThreshold(e, data, touch, removeTouch); 14174 } 14175 14176 function touchend(e) { 14177 var template = e.data, 14178 touch = identifiedTouch(e.changedTouches, template.identifier); 14179 14180 if (!touch) { return; } 14181 14182 removeTouch(template.identifier); 14183 } 14184 14185 function removeTouch(identifier) { 14186 remove(document, '.' + identifier, touchmove); 14187 remove(document, '.' + identifier, touchend); 14188 } 14189 14190 14191 // Logic for deciding when to trigger a movestart. 14192 14193 function checkThreshold(e, template, touch, fn) { 14194 var distX = touch.pageX - template.startX, 14195 distY = touch.pageY - template.startY; 14196
14197 // Do nothing if the threshold has not been crossed. 14198 if ((distX * distX) + (distY * distY) < (threshold * threshold)) { return; } 14199 14200 triggerStart(e, template, touch, distX, distY, fn); 14201 } 14202 14203 function handled() { 14204 // this._handled should return false once, and after return true. 14205 this._handled = returnTrue; 14206 return false; 14207 } 14208 14209 function flagAsHandled(e) { 14210 e._handled(); 14211 } 14212 14213 function triggerStart(e, template, touch, distX, distY, fn) { 14214 var node = template.target, 14215 touches, time; 14216 14217 touches = e.targetTouches; 14218 time = e.timeStamp - template.timeStamp; 14219 14220 // Create a movestart object with some special properties that 14221 // are passed only to the movestart handlers. 14222 template.type = 'movestart'; 14223 template.distX = distX; 14224 template.distY = distY; 14225 template.deltaX = distX; 14226 template.deltaY = distY; 14227 template.pageX = touch.pageX; 14228 template.pageY = touch.pageY; 14229 template.velocityX = distX / time; 14230 template.velocityY = distY / time; 14231 template.targetTouches = touches; 14232 template.finger = touches ? 14233 touches.length : 14234 1 ; 14235 14236 // The _handled method is fired to tell the default movestart 14237 // handler that one of the move events is bound. 14238 template._handled = handled; 14239 14240 // Pass the touchmove event so it can be prevented if or when 14241 // movestart is handled. 14242 template._preventTouchmoveDefault = function() { 14243 e.preventDefault(); 14244 }; 14245 14246 // Trigger the movestart event. 14247 trigger(template.target, template); 14248 14249 // Unbind handlers that tracked the touch or mouse up till now. 14250 fn(template.identifier); 14251 } 14252 14253 14254 // Handlers that control what happens following a movestart 14255 14256 function activeMousemove(e) { 14257 var timer = e.data.timer; 14258 14259 e.data.touch = e; 14260 e.data.timeStamp = e.timeStamp; 14261 timer.kick(); 14262 } 14263 14264 function activeMouseend(e) { 14265 var event = e.data.event, 14266 timer = e.data.timer; 14267 14268 removeActiveMouse(); 14269 14270 endEvent(event, timer, function() { 14271 // Unbind the click suppressor, waiting until after mouseup 14272 // has been handled. 14273 setTimeout(function(){ 14274 remove(event.target, 'click', returnFalse); 14275 }, 0); 14276 }); 14277 } 14278 14279 function removeActiveMouse(event) { 14280 remove(document, mouseevents.move, activeMousemove); 14281 remove(document, mouseevents.end, activeMouseend); 14282 } 14283 14284 function activeTouchmove(e) { 14285 var event = e.data.event, 14286 timer = e.data.timer, 14287 touch = changedTouch(e, event); 14288 14289 if (!touch) { return; } 14290 14291 // Stop the interface from gesturing 14292 e.preventDefault(); 14293 14294 event.targetTouches = e.targetTouches; 14295 e.data.touch = touch; 14296 e.data.timeStamp = e.timeStamp; 14297 timer.kick(); 14298 } 14299 14300 function activeTouchend(e) { 14301 var event = e.data.event, 14302 timer = e.data.timer, 14303 touch = identifiedTouch(e.changedTouches, event.identifier); 14304 14305 // This isn't the touch you're looking for. 14306 if (!touch) { return; } 14307 14308 removeActiveTouch(event); 14309 endEvent(event, timer); 14310 } 14311 14312 function removeActiveTouch(event) { 14313 remove(document, '.' + event.identifier, activeTouchmove); 14314 remove(document, '.' + event.identifier, activeTouchend); 14315 } 14316 14317 14318 // Logic for triggering move and moveend events 14319 14320 function updateEvent(event, touch, timeStamp, timer) { 14321 var time = timeStamp - event.timeStamp; 14322 14323 event.type = 'move'; 14324 event.distX = touch.pageX - event.startX; 14325 event.distY = touch.pageY - event.startY; 14326 event.deltaX = touch.pageX - event.pageX; 14327 event.deltaY = touch.pageY - event.pageY; 14328 14329 // Average the velocity of the last few events using a decay 14330 // curve to even out spurious jumps in values. 14331 event.velocityX = 0.3 * event.velocityX + 0.7 * event.deltaX / time; 14332 event.velocityY = 0.3 * event.velocityY + 0.7 * event.deltaY / time; 14333 event.pageX = touch.pageX; 14334 event.pageY = touch.pageY; 14335 } 14336 14337 function endEvent(event, timer, fn) { 14338 timer.end(function(){ 14339 event.type = 'moveend'; 14340 14341 trigger(event.target, event); 14342 14343 return fn && fn(); 14344 }); 14345 } 14346 14347 14348 // jQuery special event definition 14349 14350 function setup(data, namespaces, eventHandle) { 14351 // Stop the node from being dragged 14352 //add(this, 'dragstart.move drag.move', preventDefault); 14353 14354 // Prevent text selection and touch interface scrolling 14355 //add(this, 'mousedown.move', preventIgnoreTags); 14356 14357 // Tell movestart default handler that we've handled this 14358 add(this, 'movestart.move', flagAsHandled); 14359 14360 // Don't bind to the DOM. For speed. 14361 return true; 14362 } 14363 14364 function teardown(namespaces) { 14365 remove(this, 'dragstart drag', preventDefault); 14366 remove(this, 'mousedown touchstart', preventIgnoreTags); 14367 remove(this, 'movestart', flagAsHandled); 14368 14369 // Don't bind to the DOM. For speed. 14370 return true; 14371 } 14372 14373 function addMethod(handleObj) { 14374 // We're not interested in preventing defaults for handlers that 14375 // come from internal move or moveend bindings 14376 if (handleObj.namespace === "move" || handleObj.namespace === "moveend") { 14377 return; 14378 } 14379 14380 // Stop the node from being dragged 14381 add(this, 'dragstart.' + handleObj.guid + ' drag.' + handleObj.guid, preventDefault, undefined, handleObj.selector); 14382 14383 // Prevent text selection and touch interface scrolling 14384 add(this, 'mousedown.' + handleObj.guid, preventIgnoreTags, undefined, handleObj.selector); 14385 } 14386 14387 function removeMethod(handleObj) { 14388 if (handleObj.namespace === "move" || handleObj.namespace === "moveend") { 14389 return; 14390 } 14391 14392 remove(this, 'dragstart.' + handleObj.guid + ' drag.' + handleObj.guid); 14393 remove(this, 'mousedown.' + handleObj.guid); 14394 } 14395 14396 jQuery.event.special.movestart = { 14397 setup: setup, 14398 teardown: teardown, 14399 add: addMethod, 14400 remove: removeMethod, 14401 14402 _default: function(e) { 14403 var event, data; 14404 14405 // If no move events were bound to any ancestors of this 14406 // target, high tail it out of here. 14407 if (!e._handled()) { return; } 14408 14409 function update(time) { 14410 updateEvent(event, data.touch, data.timeStamp); 14411 trigger(e.target, event); 14412 } 14413 14414 event = { 14415 target: e.target, 14416 startX: e.startX, 14417 startY: e.startY, 14418 pageX: e.pageX, 14419 pageY: e.pageY, 14420 distX: e.distX, 14421 distY: e.distY, 14422 deltaX: e.deltaX, 14423 deltaY: e.deltaY, 14424 velocityX: e.velocityX, 14425 velocityY: e.velocityY, 14426 timeStamp: e.timeStamp, 14427 identifier: e.identifier, 14428 targetTouches: e.targetTouches, 14429 finger: e.finger 14430 }; 14431 14432 data = { 14433 event: event, 14434 timer: new Timer(update), 14435 touch: undefined, 14436 timeStamp: undefined 14437 }; 14438 14439 if (e.identifier === undefined) { 14440 // We're dealing with a mouse 14441 // Stop clicks from propagating during a move 14442 add(e.target, 'click', returnFalse); 14443 add(document, mouseevents.move, activeMousemove, data); 14444 add(document, mouseevents.end, activeMouseend, data); 14445 } 14446 else { 14447 // We're dealing with a touch. Stop touchmove doing 14448 // anything defaulty. 14449 e._preventTouchmoveDefault(); 14450 add(document, touchevents.move + '.' + e.identifier, activeTouchmove, data); 14451 add(document, touchevents.end + '.' + e.identifier, activeTouchend, data); 14452 } 14453 } 14454 }; 14455 14456 jQuery.event.special.move = { 14457 setup: function() { 14458 // Bind a noop to movestart. Why? It's the movestart 14459 // setup that decides whether other move events are fired. 14460 add(this, 'movestart.move', jQuery.noop); 14461 }, 14462 14463 teardown: function() { 14464 remove(this, 'movestart.move', jQuery.noop); 14465 } 14466 }; 14467 14468 jQuery.event.special.moveend = { 14469 setup: function() { 14470 // Bind a noop to movestart. Why? It's the movestart 14471 // setup that decides whether other move events are fired. 14472 add(this, 'movestart.moveend', jQuery.noop); 14473 }, 14474 14475 teardown: function() { 14476 remove(this, 'movestart.moveend', jQuery.noop); 14477 } 14478 }; 14479 14480 add(document, 'mousedown.move', mousedown); 14481 add(document, 'touchstart.move', touchstart); 14482 14483 // Make jQuery copy touch event properties over to the jQuery event 14484 // object, if they are not already listed. But only do the ones we 14485 // really need. IE7/8 do not have Array#indexOf(), but nor do they 14486 // have touch events, so let's assume we can ignore them. 14487 if (typeof Array.prototype.indexOf === 'function') { 14488 (function(jQuery, undefined){ 14489 var props = ["changedTouches", "targetTouches"], 14490 l = props.length; 14491 14492 while (l--) { 14493 if (jQuery.event.props.indexOf(props[l]) === -1) { 14494 jQuery.event.props.push(props[l]); 14495 } 14496 } 14497 })(jQuery); 14498 }; 14499}); 14500 14501 14502 14503 14504 14505 14506 14507 14508 14509 14510 14511 14512 14513 14514 14515 14516 14517/*! Copyright (c) 2013 Brandon Aaron (http://brandon.aaron.sh) 14518 * Licensed under the MIT License (LICENSE.txt). 14519 * 14520 * Version: 3.1.11 14521 * 14522 * Requires: jQuery 1.2.2+ 14523 */ 14524!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof exports?module.exports=a:a(jQuery)}(function(a){function b(b){var g=b||window.event,h=i.call(arguments,1
14524),j=0,l=0,m=0,n=0,o=0,p=0;if(b=a.event.fix(g),b.type="mousewheel","detail"in g&&(m=-1*g.detail),"wheelDelta"in g&&(m=g.wheelDelta),"wheelDeltaY"in g&&(m=g.wheelDeltaY),"wheelDeltaX"in g&&(l=-1*g.wheelDeltaX),"axis"in g&&g.axis===g.HORIZONTAL_AXIS&&(l=-1*m,m=0),j=0===m?l:m,"deltaY"in g&&(m=-1*g.deltaY,j=m),"deltaX"in g&&(l=g.deltaX,0===m&&(j=-1*l)),0!==m||0!==l){if(1===g.deltaMode){var q=a.data(this,"mousewheel-line-height");j*=q,m*=q,l*=q}else if(2===g.deltaMode){var r=a.data(this,"mousewheel-page-height");j*=r,m*=r,l*=r}if(n=Math.max(Math.abs(m),Math.abs(l)),(!f||f>n)&&(f=n,d(g,n)&&(f/=40)),d(g,n)&&(j/=40,l/=40,m/=40),j=Math[j>=1?"floor":"ceil"](j/f),l=Math[l>=1?"floor":"ceil"](l/f),m=Math[m>=1?"floor":"ceil"](m/f),k.settings.normalizeOffset&&this.getBoundingClientRect){var s=this.getBoundingClientRect();o=b.clientX-s.left,p=b.clientY-s.top}return b.deltaX=l,b.deltaY=m,b.deltaFactor=f,b.offsetX=o,b.offsetY=p,b.deltaMode=0,h.unshift(b,j,l,m),e&&clearTimeout(e),e=setTimeout(c,200),(a.event.dispatch||a.event.handle).apply(this,h)}}function c(){f=null}function d(a,b){return k.settings.adjustOldDeltas&&"mousewheel"===a.type&&b%120===0}var e,f,g=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],h="onwheel"in document||document.documentMode>=9?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],i=Array.prototype.slice;if(a.event.fixHooks)for(var j=g.length;j;)a.event.fixHooks[g[--j]]=a.event.mouseHooks;var k=a.event.special.mousewheel={version:"3.1.11",setup:function(){if(this.addEventListener)for(var c=h.length;c;)this.addEventListener(h[--c],b,!1);else this.onmousewheel=b;a.data(this,"mousewheel-line-height",k.getLineHeight(this)),a.data(this,"mousewheel-page-height",k.getPageHeight(this))},teardown:function(){if(this.removeEventListener)for(var c=h.length;c;)this.removeEventListener(h[--c],b,!1);else this.onmousewheel=null;a.removeData(this,"mousewheel-line-height"),a.removeData(this,"mousewheel-page-height")},getLineHeight:function(b){var c=a(b)["offsetParent"in a.fn?"offsetParent":"parent"]();return c.length||(c=a("body")),parseInt(c.css("fontSize"),10)},getPageHeight:function(b){return a(b).height()},settings:{adjustOldDeltas:!0,normalizeOffset:!0}};a.fn.extend({mousewheel:function(a){return a?this.bind("mousewheel",a):this.trigger("mousewheel")},unmousewheel:function(a){return this.unbind("mousewheel",a)}})}); 14525 14526 14527 14528 14529 14530 14531/* == malihu jquery custom scrollbar plugin == Version: 3.0.3, License: MIT License (MIT) */ 14532(function(b,a,c){(function(d){if(typeof define==="function"&&define.amd){define(["jquery","jquery-mousewheel"],d)}else{d(jQuery)}}(function(j){var g="mCustomScrollbar",d="mCS",m=".mCustomScrollbar",h={setWidth:false,setHeight:false,setTop:0,setLeft:0,axis:"y",scrollbarPosition:"inside",scrollInertia:950,autoDraggerLength:true,autoHideScrollbar:false,autoExpandScrollbar:false,alwaysShowScrollbar:0,snapAmount:null,snapOffset:0,mouseWheel:{enable:true,scrollAmount:"auto",axis:"y",preventDefault:false,deltaFactor:"auto",normalizeDelta:false,invert:false,disableOver:["select","option","keygen","datalist","textarea"]},scrollButtons:{enable:false,scrollType:"stepless",scrollAmount:"auto"},keyboard:{enable:true,scrollType:"stepless",scrollAmount:"auto"},contentTouchScroll:25,advanced:{autoExpandHorizontalScroll:false,autoScrollOnFocus:"input,textarea,select,button,datalist,keygen,a[tabindex],area,object,[contenteditable='true']",updateOnContentResize:true,updateOnImageLoad:true,updateOnSelectorChange:false},theme:"light",callbacks:{onScrollStart:false,onScroll:false,onTotalScroll:false,onTotalScrollBack:false,whileScrolling:false,onTotalScrollOffset:0,onTotalScrollBackOffset:0,alwaysTriggerOffsets:true},live:false,liveSelector:null},l=0,o={},f=function(p){if(o[p]){clearTimeout(o[p]);i._delete.call(null,o[p])}},k=(b.attachEvent&&!b.addEventListener)?1:0,n=false,e={init:function(q){var q=j.extend(true,{},h,q),p=i._selector.call(this);if(q.live){var s=q.liveSelector||this.selector||m,r=j(s);if(q.live==="off"){f(s);return}o[s]=setTimeout(function(){r.mCustomScrollbar(q);if(q.live==="once"&&r.length){f(s)}},500)}else{f(s)}q.setWidth=(q.set_width)?q.set_width:q.setWidth;q.setHeight=(q.set_height)?q.set_height:q.setHeight;q.axis=(q.horizontalScroll)?"x":i._findAxis.call(null,q.axis);q.scrollInertia=q.scrollInertia<17?17:q.scrollInertia;if(typeof q.mouseWheel!=="object"&&q.mouseWheel==true){q.mouseWheel={enable:true,scrollAmount:"auto",axis:"y",preventDefault:false,deltaFactor:"auto",normalizeDelta:false,invert:false}}q.mouseWheel.scrollAmount=!q.mouseWheelPixels?q.mouseWheel.scrollAmount:q.mouseWheelPixels;q.mouseWheel.normalizeDelta=!q.advanced.normalizeMouseWheelDelta?q.mouseWheel.normalizeDelta:q.advanced.normalizeMouseWheelDelta;q.scrollButtons.scrollType=i._findScrollButtonsType.call(null,q.scrollButtons.scrollType);i._theme.call(null,q);return j(p).each(function(){var u=j(this);if(!u.data(d)){u.data(d,{idx:++l,opt:q,scrollRatio:{y:null,x:null},overflowed:null,bindEvents:false,tweenRunning:false,sequential:{},langDir:u.css("direction"),cbOffsets:null,trigger:null});var w=u.data(d).opt,v=u.data("mcs-axis"),t=u.data("mcs-scrollbar-position"),x=u.data("mcs-theme");if(v){w.axis=v}if(t){w.scrollbarPosition=t}if(x){w.theme=x;i._theme.call(null,w)}i._pluginMarkup.call(this);e.update.call(null,u)}})},update:function(q){var p=q||i._selector.call(this);return j(p).each(function(){var t=j(this);if(t.data(d)){var v=t.data(d),u=v.opt,r=j("#mCSB_"+v.idx+"_container"),s=[j("#mCSB_"+v.idx+"_dragger_vertical"),j("#mCSB_"+v.idx+"_dragger_horizontal")];if(!r.length){return}if(v.tweenRunning){i._stop.call(null,t)}if(t.hasClass("mCS_disabled")){t.removeClass("mCS_disabled")}if(t.hasClass("mCS_destroyed")){t.removeClass("mCS_destroyed")}i._maxHeight.call(this);i._expandContentHorizontally.call(this);if(u.axis!=="y"&&!u.advanced.autoExpandHorizontalScroll){r.css("width",i._contentWidth(r.children()))}v.overflowed=i._overflowed.call(this);i._scrollbarVisibility.call(this);if(u.autoDraggerLength){i._setDraggerLength.call(this)}i._scrollRatio.call(this);i._bindEvents.call(this);var w=[Math.abs(r[0].offsetTop),Math.abs(r[0].offsetLeft)];if(u.axis!=="x"){if(!v.overflowed[0]){i._resetContentPosition.call(this);if(u.axis==="y"){i._unbindEvents.call(this)}else{if(u.axis==="yx"&&v.overflowed[1]){i._scrollTo.call(this,t,w[1].toString(),{dir:"x",dur:0,overwrite:"none"})}}}else{if(s[0].height()>s[0].parent().height()){i._resetContentPosition.call(this)}else{i._scrollTo.call(this,t,w[0].toString(),{dir:"y",dur:0,overwrite:"none"})}}}if(u.axis!=="y"){if(!v.overflowed[1]){i._resetContentPosition.call(this);if(u.axis==="x"){i._unbindEvents.call(this)}else{if(u.axis==="yx"&&v.overflowed[0]){i._scrollTo.call(this,t,w[0].toString(),{dir:"y",dur:0,overwrite:"none"})}}}else{if(s[1].width()>s[1].parent().width()){i._resetContentPosition.call(this)}else{i._scrollTo.call(this,t,w[1].toString(),{dir:"x",dur:0,overwrite:"none"})}}}i._autoUpdate.call(this)}})},scrollTo:function(r,q){if(typeof r=="undefined"||r==null){return}var p=i._selector.call(this);return j(p).each(function(){var u=j(this);if(u.data(d)){var x=u.data(d),w=x.opt,v={trigger:"external",scrollInertia:w.scrollInertia,scrollEasing:"mcsEaseInOut",moveDragger:false,callbacks:true,onStart:true,onUpdate:true,onComplete:true},s=j.extend(true,{},v,q),y=i._arr.call(this,r),t=s.scrollInertia<17?17:s.scrollInertia;y[0]=i._to.call(this,y[0],"y");y[1]=i._to.call(this,y[1],"x");if(s.moveDragger){y[0]*=x.scrollRatio.y;y[1]*=x.scrollRatio.x}s.dur=t;setTimeout(function(){if(y[0]!==null&&typeof y[0]!=="undefined"&&w.axis!=="x"&&x.overflowed[0]){s.dir="y";s.overwrite="all";i._scrollTo.call(this,u,y[0].toString(),s)}if(y[1]!==null&&typeof y[1]!=="undefined"&&w.axis!=="y"&&x.overflowed[1]){s.dir="x";s.overwrite="none";i._scrollTo.call(this,u,y[1].toString(),s)}},60)}})},stop:function(){var p=i._selector.call(this);return j(p).each(function(){var q=j(this);if(q.data(d)){i._stop.call(null,q)}})},disable:function(q){var p=i._selector.call(this);return j(p).each(function(){var r=j(this);if(r.data(d)){var t=r.data(d),s=t.opt;i._autoUpdate.call(this,"remove");i._unbindEvents.call(this);if(q){i._resetContentPosition.call(this)}i._scrollbarVisibility.call(this,true);r.addClass("mCS_disabled")}})},destroy:function(){var p=i._selector.call(this);return j(p).each(function(){var s=j(this);if(s.data(d)){var u=s.data(d),t=u.opt,q=j("#mCSB_"+u.idx),r=j("#mCSB_"+u.idx+"_container"),v=j(".mCSB_"+u.idx+"_scrollbar");
14532if(t.live){f(p)}i._autoUpdate.call(this,"remove");i._unbindEvents.call(this);i._resetContentPosition.call(this);s.removeData(d);i._delete.call(null,this.mcs);v.remove();q.replaceWith(r.contents());s.removeClass(g+" _"+d+"_"+u.idx+" mCS-autoHide mCS-dir-rtl mCS_no_scrollbar mCS_disabled").addClass("mCS_destroyed")}})}},i={_selector:function(){return(typeof j(this)!=="object"||j(this).length<1)?m:this},_theme:function(s){var r=["rounded","rounded-dark","rounded-dots","rounded-dots-dark"],q=["rounded-dots","rounded-dots-dark","3d","3d-dark","3d-thick","3d-thick-dark","inset","inset-dark","inset-2","inset-2-dark","inset-3","inset-3-dark"],p=["minimal","minimal-dark"],u=["minimal","minimal-dark"],t=["minimal","minimal-dark"];s.autoDraggerLength=j.inArray(s.theme,r)>-1?false:s.autoDraggerLength;s.autoExpandScrollbar=j.inArray(s.theme,q)>-1?false:s.autoExpandScrollbar;s.scrollButtons.enable=j.inArray(s.theme,p)>-1?false:s.scrollButtons.enable;s.autoHideScrollbar=j.inArray(s.theme,u)>-1?true:s.autoHideScrollbar;s.scrollbarPosition=j.inArray(s.theme,t)>-1?"outside":s.scrollbarPosition},_findAxis:function(p){return(p==="yx"||p==="xy"||p==="auto")?"yx":(p==="x"||p==="horizontal")?"x":"y"},_findScrollButtonsType:function(p){return(p==="stepped"||p==="pixels"||p==="step"||p==="click")?"stepped":"stepless"},_pluginMarkup:function(){var y=j(this),x=y.data(d),r=x.opt,t=r.autoExpandScrollbar?" mCSB_scrollTools_onDrag_expand":"",B=["<div id='mCSB_"+x.idx+"_scrollbar_vertical' class='mCSB_scrollTools mCSB_"+x.idx+"_scrollbar mCS-"+r.theme+" mCSB_scrollTools_vertical"+t+"'><div class='mCSB_draggerContainer'><div id='mCSB_"+x.idx+"_dragger_vertical' class='mCSB_dragger' style='position:absolute;' oncontextmenu='return false;'><div class='mCSB_dragger_bar' /></div><div class='mCSB_draggerRail' /></div></div>","<div id='mCSB_"+x.idx+"_scrollbar_horizontal' class='mCSB_scrollTools mCSB_"+x.idx+"_scrollbar mCS-"+r.theme+" mCSB_scrollTools_horizontal"+t+"'><div class='mCSB_draggerContainer'><div id='mCSB_"+x.idx+"_dragger_horizontal' class='mCSB_dragger' style='position:absolute;' oncontextmenu='return false;'><div class='mCSB_dragger_bar' /></div><div class='mCSB_draggerRail' /></div></div>"],u=r.axis==="yx"?"mCSB_vertical_horizontal":r.axis==="x"?"mCSB_horizontal":"mCSB_vertical",w=r.axis==="yx"?B[0]+B[1]:r.axis==="x"?B[1]:B[0],v=r.axis==="yx"?"<div id='mCSB_"+x.idx+"_container_wrapper' class='mCSB_container_wrapper' />":"",s=r.autoHideScrollbar?" mCS-autoHide":"",p=(r.axis!=="x"&&x.langDir==="rtl")?" mCS-dir-rtl":"";if(r.setWidth){y.css("width",r.setWidth)}if(r.setHeight){y.css("height",r.setHeight)}r.setLeft=(r.axis!=="y"&&x.langDir==="rtl")?"989999px":r.setLeft;y.addClass(g+" _"+d+"_"+x.idx+s+p).wrapInner("<div id='mCSB_"+x.idx+"' class='mCustomScrollBox mCS-"+r.theme+" "+u+"'><div id='mCSB_"+x.idx+"_container' class='mCSB_container' style='position:relative; top:"+r.setTop+"; left:"+r.setLeft+";' dir="+x.langDir+" /></div>");var q=j("#mCSB_"+x.idx),z=j("#mCSB_"+x.idx+"_container");if(r.axis!=="y"&&!r.advanced.autoExpandHorizontalScroll){z.css("width",i._contentWidth(z.children()))}if(r.scrollbarPosition==="outside"){if(y.css("position")==="static"){y.css("position","relative")}y.css("overflow","visible");q.addClass("mCSB_outside").after(w)}else{q.addClass("mCSB_inside").append(w);z.wrap(v)}i._scrollButtons.call(this);var A=[j("#mCSB_"+x.idx+"_dragger_vertical"),j("#mCSB_"+x.idx+"_dragger_horizontal")];A[0].css("min-height",A[0].height());A[1].css("min-width",A[1].width())},_contentWidth:function(p){return Math.max.apply(Math,p.map(function(){return j(this).outerWidth(true)}).get())},_expandContentHorizontally:function(){var q=j(this),s=q.data(d),r=s.opt,p=j("#mCSB_"+s.idx+"_container");if(r.advanced.autoExpandHorizontalScroll&&r.axis!=="y"){p.css({position:"absolute",width:"auto"}).wrap("<div class='mCSB_h_wrapper' style='position:relative; left:0; width:999999px;' />").css({width:(Math.ceil(p[0].getBoundingClientRect().right+0.4)-Math.floor(p[0].getBoundingClientRect().left)),position:"relative"}).unwrap()}},_scrollButtons:function(){var s=j(this),u=s.data(d),t=u.opt,q=j(".mCSB_"+u.idx+"_scrollbar:first"),r=["<a href='#' class='mCSB_buttonUp' oncontextmenu='return false;' />","<a href='#' class='mCSB_buttonDown' oncontextmenu='return false;' />","<a href='#' class='mCSB_buttonLeft' oncontextmenu='return false;' />","<a href='#' class='mCSB_buttonRight' oncontextmenu='return false;' />"],p=[(t.axis==="x"?r[2]:r[0]),(t.axis==="x"?r[3]:r[1]),r[2],r[3]
14532];if(t.scrollButtons.enable){q.prepend(p[0]).append(p[1]).next(".mCSB_scrollTools").prepend(p[2]).append(p[3])}},_maxHeight:function(){var t=j(this),w=t.data(d),v=w.opt,r=j("#mCSB_"+w.idx),q=t.css("max-height"),s=q.indexOf("%")!==-1,p=t.css("box-sizing");if(q!=="none"){var u=s?t.parent().height()*parseInt(q)/100:parseInt(q);if(p==="border-box"){u-=((t.innerHeight()-t.height())+(t.outerHeight()-t.innerHeight()))}r.css("max-height",Math.round(u))}},_setDraggerLength:function(){var u=j(this),s=u.data(d),p=j("#mCSB_"+s.idx),v=j("#mCSB_"+s.idx+"_container"),y=[j("#mCSB_"+s.idx+"_dragger_vertical"),j("#mCSB_"+s.idx+"_dragger_horizontal")],t=[p.height()/v.outerHeight(false),p.width()/v.outerWidth(false)],q=[parseInt(y[0].css("min-height")),Math.round(t[0]*y[0].parent().height()),parseInt(y[1].css("min-width")),Math.round(t[1]*y[1].parent().width())],r=k&&(q[1]<q[0])?q[0]:q[1],x=k&&(q[3]<q[2])?q[2]:q[3];y[0].css({height:r,"max-height":(y[0].parent().height()-10)}).find(".mCSB_dragger_bar").css({"line-height":q[0]+"px"});y[1].css({width:x,"max-width":(y[1].parent().width()-10)})},_scrollRatio:function(){var t=j(this),v=t.data(d),q=j("#mCSB_"+v.idx),r=j("#mCSB_"+v.idx+"_container"),s=[j("#mCSB_"+v.idx+"_dragger_vertical"),j("#mCSB_"+v.idx+"_dragger_horizontal")],u=[r.outerHeight(false)-q.height(),r.outerWidth(false)-q.width()],p=[u[0]/(s[0].parent().height()-s[0].height()),u[1]/(s[1].parent().width()-s[1].width())];v.scrollRatio={y:p[0],x:p[1]}},_onDragClasses:function(r,t,q){var s=q?"mCSB_dragger_onDrag_expanded":"",p=["mCSB_dragger_onDrag","mCSB_scrollTools_onDrag"],u=r.closest(".mCSB_scrollTools");if(t==="active"){r.toggleClass(p[0]+" "+s);u.toggleClass(p[1]);r[0]._draggable=r[0]._draggable?0:1}else{if(!r[0]._draggable){if(t==="hide"){r.removeClass(p[0]);u.removeClass(p[1])}else{r.addClass(p[0]);u.addClass(p[1])}}}},_overflowed:function(){var t=j(this),u=t.data(d),q=j("#mCSB_"+u.idx),s=j("#mCSB_"+u.idx+"_container"),r=u.overflowed==null?s.height():s.outerHeight(false),p=u.overflowed==null?s.width():s.outerWidth(false);return[r>q.height(),p>q.width()]},_resetContentPosition:function(){var t=j(this),v=t.data(d),u=v.opt,q=j("#mCSB_"+v.idx),r=j("#mCSB_"+v.idx+"_container"),s=[j("#mCSB_"+v.idx+"_dragger_vertical"),j("#mCSB_"+v.idx+"_dragger_horizontal")];i._stop(t);if((u.axis!=="x"&&!v.overflowed[0])||(u.axis==="y"&&v.overflowed[0])){s[0].add(r).css("top",0)}if((u.axis!=="y"&&!v.overflowed[1])||(u.axis==="x"&&v.overflowed[1])){var p=dx=0;if(v.langDir==="rtl"){p=q.width()-r.outerWidth(false);dx=Math.abs(p/v.scrollRatio.x)}r.css("left",p);s[1].css("left",dx)}},_bindEvents:function(){var r=j(this),t=r.data(d),s=t.opt;if(!t.bindEvents){i._draggable.call(this);if(s.contentTouchScroll){i._contentDraggable.call(this)}if(s.mouseWheel.enable){function q(){p=setTimeout(function(){if(!j.event.special.mousewheel){q()}else{clearTimeout(p);i._mousewheel.call(r[0])}},1000)}var p;q()}i._draggerRail.call(this);i._wrapperScroll.call(this);if(s.advanced.autoScrollOnFocus){i._focus.call(this)}if(s.scrollButtons.enable){i._buttons.call(this)}if(s.keyboard.enable){i._keyboard.call(this)}t.bindEvents=true}},_unbindEvents:function(){var s=j(this),t=s.data(d),p=d+"_"+t.idx,u=".mCSB_"+t.idx+"_scrollbar",r=j("#mCSB_"+t.idx+",#mCSB_"+t.idx+"_container,#mCSB_"+t.idx+"_container_wrapper,"+u+" .mCSB_draggerContainer,#mCSB_"+t.idx+"_dragger_vertical,#mCSB_"+t.idx+"_dragger_horizontal,"+u+">a"),q=j("#mCSB_"+t.idx+"_container");if(t.bindEvents){j(a).unbind("."+p);r.each(function(){j(this).unbind("."+p)});clearTimeout(s[0]._focusTimeout);i._delete.call(null,s[0]._focusTimeout);clearTimeout(t.sequential.step);i._delete.call(null,t.sequential.step);clearTimeout(q[0].onCompleteTimeout);i._delete.call(null,q[0].onCompleteTimeout);t.bindEvents=false}},_scrollbarVisibility:function(q){var t=j(this),v=t.data(d),u=v.opt,p=j("#mCSB_"+v.idx+"_container_wrapper"),r=p.length?p:j("#mCSB_"+v.idx+"_container"),w=[j("#mCSB_"+v.idx+"_scrollbar_vertical"),j("#mCSB_"+v.idx+"_scrollbar_horizontal")],s=[w[0].find(".mCSB_dragger"),w[1].find(".mCSB_dragger")];if(u.axis!=="x"){if(v.overflowed[0]&&!q){w[0].add(s[0]).add(w[0].children("a")).css("display","block");r.removeClass("mCS_no_scrollbar_y mCS_y_hidden")}else{if(u.alwaysShowScrollbar){if(u.alwaysShowScrollbar!==2){s[0].add(w[0].children("a")).css("display","none")}r.removeClass("mCS_y_hidden")}else{w[0].css("display","none");r.addClass("mCS_y_hidden")}r.addClass("mCS_no_scrollbar_y")}}if(u.axis!=="y"){if(v.overflowed[1]&&!q){w[1].add(s[1]).add(w[1].children("a")).css("display","block");r.removeClass("mCS_no_scrollbar_x mCS_x_hidden")}else{if(u.alwaysShowScrollbar){if(u.alwaysShowScrollbar!==2){s[1].add(w[1].children("a")).css("display","none")}r.removeClass("mCS_x_hidden")}else{w[1].css("display","none");r.addClass("mCS_x_hidden")}r.addClass("mCS_no_scrollbar_x")}}if(!v.overflowed[0]&&!v.overflowed[1]){t.addClass("mCS_no_scrollbar")}else{t.removeClass("mCS_no_scrollbar")}},_coordinates:function(q){var p=q.type;switch(p){case"pointerdown":case"MSPointerDown":case"pointermove":case"MSPointerMove":case"pointerup":case"MSPointerUp":return[q.originalEvent.pageY,q.originalEvent.pageX];break;
14532case"touchstart":case"touchmove":case"touchend":var r=q.originalEvent.touches[0]||q.originalEvent.changedTouches[0];return[r.pageY,r.pageX];break;default:return[q.pageY,q.pageX]}},_draggable:function(){var u=j(this),s=u.data(d),p=s.opt,r=d+"_"+s.idx,t=["mCSB_"+s.idx+"_dragger_vertical","mCSB_"+s.idx+"_dragger_horizontal"],v=j("#mCSB_"+s.idx+"_container"),w=j("#"+t[0]+",#"+t[1]),A,y,z;w.bind("mousedown."+r+" touchstart."+r+" pointerdown."+r+" MSPointerDown."+r,function(E){E.stopImmediatePropagation();E.preventDefault();if(!i._mouseBtnLeft(E)){return}n=true;if(k){a.onselectstart=function(){return false}}x(false);i._stop(u);A=j(this);var F=A.offset(),G=i._coordinates(E)[0]-F.top,B=i._coordinates(E)[1]-F.left,D=A.height()+F.top,C=A.width()+F.left;if(G<D&&G>0&&B<C&&B>0){y=G;z=B}i._onDragClasses(A,"active",p.autoExpandScrollbar)}).bind("touchmove."+r,function(C){C.stopImmediatePropagation();C.preventDefault();var D=A.offset(),E=i._coordinates(C)[0]-D.top,B=i._coordinates(C)[1]-D.left;q(y,z,E,B)});j(a).bind("mousemove."+r+" pointermove."+r+" MSPointerMove."+r,function(C){if(A){var D=A.offset(),E=i._coordinates(C)[0]-D.top,B=i._coordinates(C)[1]-D.left;if(y===E){return}q(y,z,E,B)}}).add(w).bind("mouseup."+r+" touchend."+r+" pointerup."+r+" MSPointerUp."+r,function(B){if(A){i._onDragClasses(A,"active",p.autoExpandScrollbar);A=null}n=false;if(k){a.onselectstart=null}x(true)});function x(B){var C=v.find("iframe");if(!C.length){return}var D=!B?"none":"auto";C.css("pointer-events",D)}function q(D,E,G,B){v[0].idleTimer=p.scrollInertia<233?250:0;if(A.attr("id")===t[1]){var C="x",F=((A[0].offsetLeft-E)+B)*s.scrollRatio.x}else{var C="y",F=((A[0].offsetTop-D)+G)*s.scrollRatio.y}i._scrollTo(u,F.toString(),{dir:C,drag:true})}},_contentDraggable:function(){var y=j(this),K=y.data(d),I=K.opt,F=d+"_"+K.idx,v=j("#mCSB_"+K.idx),z=j("#mCSB_"+K.idx+"_container"),w=[j("#mCSB_"+K.idx+"_dragger_vertical"),j("#mCSB_"+K.idx+"_dragger_horizontal")],E,G,L,M,C=[],D=[],H,A,u,t,J,x,r=0,q,s=I.axis==="yx"?"none":"all";z.bind("touchstart."+F+" pointerdown."+F+" MSPointerDown."+F,function(N){if(!i._pointerTouch(N)||n){return}var O=z.offset();E=i._coordinates(N)[0]-O.top;G=i._coordinates(N)[1]-O.left}).bind("touchmove."+F+" pointermove."+F+" MSPointerMove."+F,function(Q){if(!i._pointerTouch(Q)||n){return}Q.stopImmediatePropagation();A=i._getTime();var P=v.offset(),S=i._coordinates(Q)[0]-P.top,U=i._coordinates(Q)[1]-P.left,R="mcsLinearOut";C.push(S);D.push(U);if(K.overflowed[0]){var O=w[0].parent().height()-w[0].height(),T=((E-S)>0&&(S-E)>-(O*K.scrollRatio.y))}if(K.overflowed[1]){var N=w[1].parent().width()-w[1].width(),V=((G-U)>0&&(U-G)>-(N*K.scrollRatio.x))}if(T||V){Q.preventDefault()}x=I.axis==="yx"?[(E-S),(G-U)]:I.axis==="x"?[null,(G-U)]:[(E-S),null];z[0].idleTimer=250;if(K.overflowed[0]){B(x[0],r,R,"y","all",true)}if(K.overflowed[1]){B(x[1],r,R,"x",s,true)}});v.bind("touchstart."+F+" pointerdown."+F+" MSPointerDown."+F,function(N){if(!i._pointerTouch(N)||n){return}N.stopImmediatePropagation();i._stop(y);H=i._getTime();var O=v.offset();L=i._coordinates(N)[0]-O.top;M=i._coordinates(N)[1]-O.left;C=[];D=[]}).bind("touchend."+F+" pointerup."+F+" MSPointerUp."+F,function(P){if(!i._pointerTouch(P)||n){return}P.stopImmediatePropagation();u=i._getTime();var N=v.offset(),T=i._coordinates(P)[0]-N.top,V=i._coordinates(P)[1]-N.left;if((u-A)>30){return}J=1000/(u-H);var Q="mcsEaseOut",R=J<2.5,W=R?[C[C.length-2],D[D.length-2]]:[0,0];t=R?[(T-W[0]),(V-W[1])]:[T-L,V-M];var O=[Math.abs(t[0]),Math.abs(t[1])];J=R?[Math.abs(t[0]/4),Math.abs(t[1]/4)]:[J,J];var U=[Math.abs(z[0].offsetTop)-(t[0]*p((O[0]/J[0]),J[0])),Math.abs(z[0].offsetLeft)-(t[1]*p((O[1]/J[1]),J[1]))];x=I.axis==="yx"?[U[0],U[1]]:I.axis==="x"?[null,U[1]]:[U[0],null];q=[(O[0]*4)+I.scrollInertia,(O[1]*4)+I.scrollInertia];var S=parseInt(I.contentTouchScroll)||0;x[0]=O[0]>S?x[0]:0;x[1]=O[1]>S?x[1]:0;if(K.overflowed[0]){B(x[0],q[0],Q,"y",s,false)}if(K.overflowed[1]){B(x[1],q[1],Q,"x",s,false)}});function p(P,N){var O=[N*1.5,N*2,N/1.5,N/2];if(P>90){return N>4?O[0]:O[3]}else{if(P>60){return N>3?O[3]:O[2]}else{if(P>30){return N>8?O[1]:N>6?O[0]:N>4?N:O[2]}else{return N>8?N:O[3]}}}}function B(P,R,S,O,N,Q){if(!P){return}i._scrollTo(y,P.toString(),{dur:R,scrollEasing:S,dir:O,overwrite:N,drag:Q})}},_mousewheel:function(){var s=j(this),u=s.data(d);if(u){var t=u.opt,q=d+"_"+u.idx,p=j("#mCSB_"+u.idx),r=[j("#mCSB_"+u.idx+"_dragger_vertical"),j("#mCSB_"+u.idx+"_dragger_horizontal")];p.bind("mousewheel."+q,function(z,D){i._stop(s);if(i._disableMousewheel(s,z.target)){return}var B=t.mouseWheel.deltaFactor!=="auto"?parseInt(t.mouseWheel.deltaFactor):(k&&z.deltaFactor<100)?100:z.deltaFactor<40?40:z.deltaFactor||100;
14532if(t.axis==="x"||t.mouseWheel.axis==="x"){var w="x",C=[Math.round(B*u.scrollRatio.x),parseInt(t.mouseWheel.scrollAmount)],y=t.mouseWheel.scrollAmount!=="auto"?C[1]:C[0]>=p.width()?p.width()*0.9:C[0],E=Math.abs(j("#mCSB_"+u.idx+"_container")[0].offsetLeft),A=r[1][0].offsetLeft,x=r[1].parent().width()-r[1].width(),v=z.deltaX||z.deltaY||D}else{var w="y",C=[Math.round(B*u.scrollRatio.y),parseInt(t.mouseWheel.scrollAmount)],y=t.mouseWheel.scrollAmount!=="auto"?C[1]:C[0]>=p.height()?p.height()*0.9:C[0],E=Math.abs(j("#mCSB_"+u.idx+"_container")[0].offsetTop),A=r[0][0].offsetTop,x=r[0].parent().height()-r[0].height(),v=z.deltaY||D}if((w==="y"&&!u.overflowed[0])||(w==="x"&&!u.overflowed[1])){return}if(t.mouseWheel.invert){v=-v}if(t.mouseWheel.normalizeDelta){v=v<0?-1:1}if((v>0&&A!==0)||(v<0&&A!==x)||t.mouseWheel.preventDefault){z.stopImmediatePropagation();z.preventDefault()}i._scrollTo(s,(E-(v*y)).toString(),{dir:w})})}},_disableMousewheel:function(r,t){var p=t.nodeName.toLowerCase(),q=r.data(d).opt.mouseWheel.disableOver,s=["select","textarea"];return j.inArray(p,q)>-1&&!(j.inArray(p,s)>-1&&!j(t).is(":focus"))},_draggerRail:function(){var s=j(this),t=s.data(d),q=d+"_"+t.idx,r=j("#mCSB_"+t.idx+"_container"),u=r.parent(),p=j(".mCSB_"+t.idx+"_scrollbar .mCSB_draggerContainer");p.bind("touchstart."+q+" pointerdown."+q+" MSPointerDown."+q,function(v){n=true}).bind("touchend."+q+" pointerup."+q+" MSPointerUp."+q,function(v){n=false}).bind("click."+q,function(z){if(j(z.target).hasClass("mCSB_draggerContainer")||j(z.target).hasClass("mCSB_draggerRail")){i._stop(s);var w=j(this),y=w.find(".mCSB_dragger");if(w.parent(".mCSB_scrollTools_horizontal").length>0){if(!t.overflowed[1]){return}var v="x",x=z.pageX>y.offset().left?-1:1,A=Math.abs(r[0].offsetLeft)-(x*(u.width()*0.9))}else{if(!t.overflowed[0]){return}var v="y",x=z.pageY>y.offset().top?-1:1,A=Math.abs(r[0].offsetTop)-(x*(u.height()*0.9))}i._scrollTo(s,A.toString(),{dir:v,scrollEasing:"mcsEaseInOut"})}})},_focus:function(){var r=j(this),t=r.data(d),s=t.opt,p=d+"_"+t.idx,q=j("#mCSB_"+t.idx+"_container"),u=q.parent();q.bind("focusin."+p,function(x){var w=j(a.activeElement),y=q.find(".mCustomScrollBox").length,v=0;if(!w.is(s.advanced.autoScrollOnFocus)){return}i._stop(r);clearTimeout(r[0]._focusTimeout);r[0]._focusTimer=y?(v+17)*y:0;r[0]._focusTimeout=setTimeout(function(){var C=[w.offset().top-q.offset().top,w.offset().left-q.offset().left],B=[q[0].offsetTop,q[0].offsetLeft],z=[(B[0]+C[0]>=0&&B[0]+C[0]<u.height()-w.outerHeight(false)),(B[1]+C[1]>=0&&B[0]+C[1]<u.width()-w.outerWidth(false))],A=(s.axis==="yx"&&!z[0]&&!z[1])?"none":"all";if(s.axis!=="x"&&!z[0]){i._scrollTo(r,C[0].toString(),{dir:"y",scrollEasing:"mcsEaseInOut",overwrite:A,dur:v})}if(s.axis!=="y"&&!z[1]){i._scrollTo(r,C[1].toString(),{dir:"x",scrollEasing:"mcsEaseInOut",overwrite:A,dur:v})}},r[0]._focusTimer)})},_wrapperScroll:function(){var q=j(this),r=q.data(d),p=d+"_"+r.idx,s=j("#mCSB_"+r.idx+"_container").parent();s.bind("scroll."+p,function(t){s.scrollTop(0).scrollLeft(0)})},_buttons:function(){var u=j(this),w=u.data(d),v=w.opt,p=w.sequential,r=d+"_"+w.idx,t=j("#mCSB_"+w.idx+"_container"),s=".mCSB_"+w.idx+"_scrollbar",q=j(s+">a");q.bind("mousedown."+r+" touchstart."+r+" pointerdown."+r+" MSPointerDown."+r+" mouseup."+r+" touchend."+r+" pointerup."+r+" MSPointerUp."+r+" mouseout."+r+" pointerout."+r+" MSPointerOut."+r+" click."+r,function(z){z.preventDefault();if(!i._mouseBtnLeft(z)){return}var y=j(this).attr("class");p.type=v.scrollButtons.scrollType;switch(z.type){case"mousedown":case"touchstart":case"pointerdown":case"MSPointerDown":if(p.type==="stepped"){return}n=true;w.tweenRunning=false;x("on",y);break;case"mouseup":case"touchend":case"pointerup":case"MSPointerUp":case"mouseout":case"pointerout":case"MSPointerOut":if(p.type==="stepped"){return}n=false;if(p.dir){x("off",y)}break;case"click":if(p.type!=="stepped"||w.tweenRunning){return}x("on",y);break}function x(A,B){p.scrollAmount=v.snapAmount||v.scrollButtons.scrollAmount;i._sequentialScroll.call(this,u,A,B)}})},_keyboard:function(){var u=j(this),t=u.data(d),q=t.opt,x=t.sequential,s=d+"_"+t.idx,r=j("#mCSB_"+t.idx),w=j("#mCSB_"+t.idx+"_container"),p=w.parent(),v="input,textarea,select,datalist,keygen,[contenteditable='true']";r.attr("tabindex","0").bind("blur."+s+" keydown."+s+" keyup."+s,function(D){switch(D.type){case"blur":if(t.tweenRunning&&x.dir){y("off",null)}break;case"keydown":case"keyup":var A=D.keyCode?D.keyCode:D.which,B="on";if((q.axis!=="x"&&(A===38||A===40))||(q.axis!=="y"&&(A===37||A===39))){if(((A===38||A===40)&&!t.overflowed[0])||((A===37||A===39)&&!t.overflowed[1])){return}
14532if(D.type==="keyup"){B="off"}if(!j(a.activeElement).is(v)){D.preventDefault();D.stopImmediatePropagation();y(B,A)}}else{if(A===33||A===34){if(t.overflowed[0]||t.overflowed[1]){D.preventDefault();D.stopImmediatePropagation()}if(D.type==="keyup"){i._stop(u);var C=A===34?-1:1;if(q.axis==="x"||(q.axis==="yx"&&t.overflowed[1]&&!t.overflowed[0])){var z="x",E=Math.abs(w[0].offsetLeft)-(C*(p.width()*0.9))}else{var z="y",E=Math.abs(w[0].offsetTop)-(C*(p.height()*0.9))}i._scrollTo(u,E.toString(),{dir:z,scrollEasing:"mcsEaseInOut"})}}else{if(A===35||A===36){if(!j(a.activeElement).is(v)){if(t.overflowed[0]||t.overflowed[1]){D.preventDefault();D.stopImmediatePropagation()}if(D.type==="keyup"){if(q.axis==="x"||(q.axis==="yx"&&t.overflowed[1]&&!t.overflowed[0])){var z="x",E=A===35?Math.abs(p.width()-w.outerWidth(false)):0}else{var z="y",E=A===35?Math.abs(p.height()-w.outerHeight(false)):0}i._scrollTo(u,E.toString(),{dir:z,scrollEasing:"mcsEaseInOut"})}}}}}break}function y(F,G){x.type=q.keyboard.scrollType;x.scrollAmount=q.snapAmount||q.keyboard.scrollAmount;if(x.type==="stepped"&&t.tweenRunning){return}i._sequentialScroll.call(this,u,F,G)}})},_sequentialScroll:function(r,u,s){var w=r.data(d),q=w.opt,y=w.sequential,x=j("#mCSB_"+w.idx+"_container"),p=y.type==="stepped"?true:false;switch(u){case"on":y.dir=[(s==="mCSB_buttonRight"||s==="mCSB_buttonLeft"||s===39||s===37?"x":"y"),(s==="mCSB_buttonUp"||s==="mCSB_buttonLeft"||s===38||s===37?-1:1)];i._stop(r);if(i._isNumeric(s)&&y.type==="stepped"){return}t(p);break;case"off":v();if(p||(w.tweenRunning&&y.dir)){t(true)}break}function t(z){var F=y.type!=="stepped",J=!z?1000/60:F?q.scrollInertia/1.5:q.scrollInertia,B=!z?2.5:F?7.5:40,I=[Math.abs(x[0].offsetTop),Math.abs(x[0].offsetLeft)],E=[w.scrollRatio.y>10?10:w.scrollRatio.y,w.scrollRatio.x>10?10:w.scrollRatio.x],C=y.dir[0]==="x"?I[1]+(y.dir[1]*(E[1]*B)):I[0]+(y.dir[1]*(E[0]*B)),H=y.dir[0]==="x"?I[1]+(y.dir[1]*parseInt(y.scrollAmount)):I[0]+(y.dir[1]*parseInt(y.scrollAmount)),G=y.scrollAmount!=="auto"?H:C,D=!z?"mcsLinear":F?"mcsLinearOut":"mcsEaseInOut",A=!z?false:true;if(z&&J<17){G=y.dir[0]==="x"?I[1]:I[0]}i._scrollTo(r,G.toString(),{dir:y.dir[0],scrollEasing:D,dur:J,onComplete:A});if(z){y.dir=false;return}clearTimeout(y.step);y.step=setTimeout(function(){t()},J)}function v(){clearTimeout(y.step);i._stop(r)}},_arr:function(r){var q=j(this).data(d).opt,p=[];if(typeof r==="function"){r=r()}if(!(r instanceof Array)){p[0]=r.y?r.y:r.x||q.axis==="x"?null:r;p[1]=r.x?r.x:r.y||q.axis==="y"?null:r}else{p=r.length>1?[r[0],r[1]]:q.axis==="x"?[null,r[0]]:[r[0],null]}if(typeof p[0]==="function"){p[0]=p[0]()}if(typeof p[1]==="function"){p[1]=p[1]()}return p},_to:function(v,w){if(v==null||typeof v=="undefined"){return}var C=j(this),B=C.data(d),u=B.opt,D=j("#mCSB_"+B.idx+"_container"),r=D.parent(),F=typeof v;if(!w){w=u.axis==="x"?"x":"y"}var q=w==="x"?D.outerWidth(false):D.outerHeight(false),x=w==="x"?D.offset().left:D.offset().top,E=w==="x"?D[0].offsetLeft:D[0].offsetTop,z=w==="x"?"left":"top";switch(F){case"function":return v();break;case"object":if(v.nodeType){var A=w==="x"?j(v).offset().left:j(v).offset().top}else{if(v.jquery){if(!v.length){return}var A=w==="x"?v.offset().left:v.offset().top}}return A-x;break;case"string":case"number":if(i._isNumeric.call(null,v)){return Math.abs(v)}else{if(v.indexOf("%")!==-1){return Math.abs(q*parseInt(v)/100)}else{if(v.indexOf("-=")!==-1){return Math.abs(E-parseInt(v.split("-=")[1]))}else{if(v.indexOf("+=")!==-1){var s=(E+parseInt(v.split("+=")[1]));return s>=0?0:Math.abs(s)}else{if(v.indexOf("px")!==-1&&i._isNumeric.call(null,v.split("px")[0])){return Math.abs(v.split("px")[0])}else{if(v==="top"||v==="left"){return 0}else{if(v==="bottom"){return Math.abs(r.height()-D.outerHeight(false))}else{if(v==="right"){return Math.abs(r.width()-D.outerWidth(false))}else{if(v==="first"||v==="last"){var y=D.find(":"+v),A=w==="x"?j(y).offset().left:j(y).offset().top;return A-x}else{if(j(v).length){var A=w==="x"?j(v).offset().left:j(v).offset().top;return A-x}else{D.css(z,v);e.update.call(null,C[0]);return}}}}}}}}}}break}},_autoUpdate:function(q){var t=j(this),F=t.data(d),z=F.opt,v=j("#mCSB_"+F.idx+"_container");if(q){clearTimeout(v[0].autoUpdate);i._delete.call(null,v[0].autoUpdate);return}var s=v.parent(),p=[j("#mCSB_"+F.idx+"_scrollbar_vertical"),j("#mCSB_"+F.idx+"_scrollbar_horizontal")],D=function(){return[p[0].is(":visible")?p[0].outerHeight(true):0,p[1].is(":visible")?p[1].outerWidth(true):0]},E=y(),x,u=[v.outerHeight(false),v.outerWidth(false),s.height(),s.width(),D()[0],D()[1]],H,B=G(),w;C();function C(){clearTimeout(v[0].autoUpdate);v[0].autoUpdate=setTimeout(function(){if(z.advanced.updateOnSelectorChange){x=y();if(x!==E){r();E=x;return}}if(z.advanced.updateOnContentResize){H=[v.outerHeight(false),v.outerWidth(false),s.height(),s.width(),D()[0],D()[1]];if(H[0]!==u[0]||H[1]!==u[1]||H[2]!==u[2]||H[3]!==u[3]||H[4]!==u[4]||H[5]!==u[5]){r();u=H}}if(z.advanced.updateOnImageLoad){w=G();if(w!==B){v.find("img").each(function(){A(this.src)});B=w}}if(z.advanced.updateOnSelectorChange||z.advanced.updateOnContentResize||z.advanced.updateOnImageLoad){C()}},60)}function G(){var I=0;if(z.advanced.updateOnImageLoad){I=v.find("img").length}return I}function A(L){var I=new Image();function K(M,N){return function(){return N.apply(M,arguments)}}function J(){this.onload=null;r()}I.onload=K(I,J);I.src=L}function y(){if(z.advanced.updateOnSelectorChange===true){z.advanced.updateOnSelectorChange="*"}var I=0,J=v.find(z.advanced.updateOnSelectorChange);
14532if(z.advanced.updateOnSelectorChange&&J.length>0){J.each(function(){I+=j(this).height()+j(this).width()})}return I}function r(){clearTimeout(v[0].autoUpdate);e.update.call(null,t[0])}},_snapAmount:function(r,p,q){return(Math.round(r/p)*p-q)},_stop:function(p){var r=p.data(d),q=j("#mCSB_"+r.idx+"_container,#mCSB_"+r.idx+"_container_wrapper,#mCSB_"+r.idx+"_dragger_vertical,#mCSB_"+r.idx+"_dragger_horizontal");q.each(function(){i._stopTween.call(this)})},_scrollTo:function(q,s,u){var I=q.data(d),E=I.opt,D={trigger:"internal",dir:"y",scrollEasing:"mcsEaseOut",drag:false,dur:E.scrollInertia,overwrite:"all",callbacks:true,onStart:true,onUpdate:true,onComplete:true},u=j.extend(D,u),G=[u.dur,(u.drag?0:u.dur)],v=j("#mCSB_"+I.idx),B=j("#mCSB_"+I.idx+"_container"),K=E.callbacks.onTotalScrollOffset?i._arr.call(q,E.callbacks.onTotalScrollOffset):[0,0],p=E.callbacks.onTotalScrollBackOffset?i._arr.call(q,E.callbacks.onTotalScrollBackOffset):[0,0];I.trigger=u.trigger;if(E.snapAmount){s=i._snapAmount(s,E.snapAmount,E.snapOffset)}switch(u.dir){case"x":var x=j("#mCSB_"+I.idx+"_dragger_horizontal"),z="left",C=B[0].offsetLeft,H=[v.width()-B.outerWidth(false),x.parent().width()-x.width()],r=[s,(s/I.scrollRatio.x)],L=K[1],J=p[1],A=L>0?L/I.scrollRatio.x:0,w=J>0?J/I.scrollRatio.x:0;break;case"y":var x=j("#mCSB_"+I.idx+"_dragger_vertical"),z="top",C=B[0].offsetTop,H=[v.height()-B.outerHeight(false),x.parent().height()-x.height()],r=[s,(s/I.scrollRatio.y)],L=K[0],J=p[0],A=L>0?L/I.scrollRatio.y:0,w=J>0?J/I.scrollRatio.y:0;break}if(r[1]<0){r=[0,0]}else{if(r[1]>=H[1]){r=[H[0],H[1]]}else{r[0]=-r[0]}}clearTimeout(B[0].onCompleteTimeout);if(!I.tweenRunning&&((C===0&&r[0]>=0)||(C===H[0]&&r[0]<=H[0]))){return}i._tweenTo.call(null,x[0],z,Math.round(r[1]),G[1],u.scrollEasing);i._tweenTo.call(null,B[0],z,Math.round(r[0]),G[0],u.scrollEasing,u.overwrite,{onStart:function(){if(u.callbacks&&u.onStart&&!I.tweenRunning){if(t("onScrollStart")){F();E.callbacks.onScrollStart.call(q[0])}I.tweenRunning=true;i._onDragClasses(x);I.cbOffsets=y()}},onUpdate:function(){if(u.callbacks&&u.onUpdate){if(t("whileScrolling")){F();E.callbacks.whileScrolling.call(q[0])}}},onComplete:function(){if(u.callbacks&&u.onComplete){if(E.axis==="yx"){clearTimeout(B[0].onCompleteTimeout)}var M=B[0].idleTimer||0;B[0].onCompleteTimeout=setTimeout(function(){if(t("onScroll")){F();E.callbacks.onScroll.call(q[0])}if(t("onTotalScroll")&&r[1]>=H[1]-A&&I.cbOffsets[0]){F();E.callbacks.onTotalScroll.call(q[0])}if(t("onTotalScrollBack")&&r[1]<=w&&I.cbOffsets[1]){F();E.callbacks.onTotalScrollBack.call(q[0])}I.tweenRunning=false;B[0].idleTimer=0;i._onDragClasses(x,"hide")},M)}}});function t(M){return I&&E.callbacks[M]&&typeof E.callbacks[M]==="function"}function y(){return[E.callbacks.alwaysTriggerOffsets||C>=H[0]+L,E.callbacks.alwaysTriggerOffsets||C<=-J]}function F(){var O=[B[0].offsetTop,B[0].offsetLeft],P=[x[0].offsetTop,x[0].offsetLeft],M=[B.outerHeight(false),B.outerWidth(false)],N=[v.height(),v.width()];q[0].mcs={content:B,top:O[0],left:O[1],draggerTop:P[0],draggerLeft:P[1],topPct:Math.round((100*Math.abs(O[0]))/(Math.abs(M[0])-N[0])),leftPct:Math.round((100*Math.abs(O[1]))/(Math.abs(M[1])-N[1])),direction:u.dir}}},_tweenTo:function(r,u,s,q,A,t,J){var J=J||{},G=J.onStart||function(){},B=J.onUpdate||function(){},H=J.onComplete||function(){},z=i._getTime(),x,v=0,D=r.offsetTop,E=r.style;if(u==="left"){D=r.offsetLeft}var y=s-D;r._mcsstop=0;if(t!=="none"){C()}p();function I(){if(r._mcsstop){return}if(!v){G.call()}v=i._getTime()-z;F();if(v>=r._mcstime){r._mcstime=(v>r._mcstime)?v+x-(v-r._mcstime):v+x-1;if(r._mcstime<v+1){r._mcstime=v+1}}if(r._mcstime<q){r._mcsid=_request(I)}else{H.call()}}function F(){if(q>0){r._mcscurrVal=w(r._mcstime,D,y,q,A);E[u]=Math.round(r._mcscurrVal)+"px"}else{E[u]=s+"px"}B.call()}function p(){x=1000/60;r._mcstime=v+x;_request=(!b.requestAnimationFrame)?function(K){F();return setTimeout(K,0.01)}:b.requestAnimationFrame;r._mcsid=_request(I)}function C(){if(r._mcsid==null){return}if(!b.requestAnimationFrame){clearTimeout(r._mcsid)}else{b.cancelAnimationFrame(r._mcsid)}r._mcsid=null}function w(M,L,Q,P,N){switch(N){case"linear":case"mcsLinear":return Q*M/P+L;break;case"mcsLinearOut":M/=P;M--;return Q*Math.sqrt(1-M*M)+L;break;case"easeInOutSmooth":M/=P/2;if(M<1){return Q/2*M*M+L}M--;return -Q/2*(M*(M-2)-1)+L;break;case"easeInOutStrong":M/=P/2;if(M<1){return Q/2*Math.pow(2,10*(M-1))+L}M--;return Q/2*(-Math.pow(2,-10*M)+2)+L;break;case"easeInOut":case"mcsEaseInOut":M/=P/2;if(M<1){return Q/2*M*M*M+L}M-=2;return Q/2*(M*M*M+2)+L;break;case"easeOutSmooth":M/=P;M--;return -Q*(M*M*M*M-1)+L;break;case"easeOutStrong":return Q*(-Math.pow(2,-10*M/P)+1)+L;break;case"easeOut":case"mcsEaseOut":default:var O=(M/=P)*M,K=O*M;return L+Q*(0.499999999999997*K*O+-2.5*O*O+5.5*K+-6.5*O+4*M)}}},_getTime:function(){if(b.performance&&b.performance.now){return b.performance.now()}else{if(b.performance&&b.performance.webkitNow){return b.performance.webkitNow()}else{if(Date.now){return Date.now()}else{return new Date().getTime()}}}},_stopTween:function(){var p=this;if(p._mcsid==null){return}if(!b.requestAnimationFrame){clearTimeout(p._mcsid)}else{b.cancelAnimationFrame(p._mcsid)}p._mcsid=null;p._mcsstop=1},_delete:function(r){try{delete r}catch(q){r=null}},_mouseBtnLeft:function(p){return !(p.which&&p.which!==1)},_pointerTouch:function(q){var p=q.originalEvent.pointerType;return !(p&&p!=="touch"&&p!==2)},_isNumeric:function(p){return !isNaN(parseFloat(p))&&isFinite(p)}};j.fn[g]=function(p){if(e[p]){return e[p].apply(this,Array.prototype.slice.call(arguments,1
14532))}else{if(typeof p==="object"||!p){return e.init.apply(this,arguments)}else{j.error("Method "+p+" does not exist")}}};j[g]=function(p){if(e[p]){return e[p].apply(this,Array.prototype.slice.call(arguments,1))}else{if(typeof p==="object"||!p){return e.init.apply(this,arguments)}else{j.error("Method "+p+" does not exist")}}};j[g].defaults=h;b[g]=true;j(b).load(function(){j(m)[g]()})}))}(window,document)); 14533 14534 14535 14536 14537 14538 14539 14540 14541 14542 14543 14544 14545 14546 14547 14548 14549 14550 14551 14552 14553/* 14554 * Selecter v3.1.5 - 2014-07-29 14555 * A jQuery plugin for replacing default select elements. Part of the Formstone Library. 14556 * http://formstone.it/selecter/ 14557 * 14558 * Copyright 2014 Ben Plum; MIT Licensed 14559 */ 14560 14561!function(a,b){"use strict";function c(b){b=a.extend({},F,b||{}),null===E&&(E=a("body"));for(var c=a(this),e=0,f=c.length;f>e;e++)d(c.eq(e),b);return c}function d(b,c){if(!b.hasClass("selecter-element")){c=a.extend({},c,b.data("selecter-options")),c.multiple=b.prop("multiple"),c.disabled=b.is(":disabled"),c.external&&(c.links=!0);var d=b.find("[selected]");!c.multiple&&""!==c.label&&d.length<1?b.prepend('<option value="" class="selecter-placeholder" selected>'+c.label+"</option>"):c.label="";var g=b.find("option, optgroup"),h=g.filter("option");d=h.filter(":selected");var j=d.length>0?h.index(d):0,k=""!==c.label?c.label:d.text(),q="div";c.tabIndex=b[0].tabIndex,b[0].tabIndex=-1;var s="",t="";t+="<"+q+' class="selecter '+c.customClass,C?t+=" mobile":c.cover&&(t+=" cover"),t+=c.multiple?" multiple":" closed",c.disabled&&(t+=" disabled"),t+='" tabindex="'+c.tabIndex+'">',t+="</"+q+">",c.multiple||(s+='<span class="selecter-selected">',s+=a("<span></span>").text(v(k,c.trim)).html(),s+="</span>"),s+='<div class="selecter-options">',s+="</div>",b.addClass("selecter-element").wrap(t).after(s);var u=b.parent(".selecter"),w=a.extend({$select:b,$allOptions:g,$options:h,$selecter:u,$selected:u.find(".selecter-selected"),$itemsWrapper:u.find(".selecter-options"),index:-1,guid:z++},c);e(w),w.multiple||r(j,w),void 0!==a.fn.scroller&&w.$itemsWrapper.scroller(),w.$selecter.on("touchstart.selecter",".selecter-selected",w,f).on("click.selecter",".selecter-selected",w,i).on("click.selecter",".selecter-item",w,m).on("close.selecter",w,l).data("selecter",w),w.$select.on("change.selecter",w,n),C||(w.$selecter.on("focus.selecter",w,o).on("blur.selecter",w,p),w.$select.on("focus.selecter",w,function(a){a.data.$selecter.trigger("focus")}))}}function e(b){for(var c="",d=b.links?"a":"span",e=0,f=0,g=b.$allOptions.length;g>f;f++){var h=b.$allOptions.eq(f);if("OPTGROUP"===h[0].tagName)c+='<span class="selecter-group',h.is(":disabled")&&(c+=" disabled"),c+='">'+h.attr("label")+"</span>";else{var i=h.val();h.attr("value")||h.attr("value",i),c+="<"+d+' class="selecter-item',h.hasClass("selecter-placeholder")&&(c+=" placeholder"),h.is(":selected")&&(c+=" selected"),h.is(":disabled")&&(c+=" disabled"),c+='" ',c+=b.links?'href="'+i+'"':'data-value="'+i+'"',c+=">"+a("<span></span>").text(v(h.text(),b.trim)).html()+"</"+d+">",e++}}b.$itemsWrapper.html(c),b.$items=b.$selecter.find(".selecter-item")}function f(a){a.stopPropagation();var b=a.data,c=a.originalEvent;y(b.timer),b.touchStartX=c.touches[0].clientX,b.touchStartY=c.touches[0].clientY,b.$selecter.on("touchmove.selecter",".selecter-selected",b,g).on("touchend.selecter",".selecter-selected",b,h)}function g(a){var b=a.data,c=a.originalEvent;(Math.abs(c.touches[0].clientX-b.touchStartX)>10||Math.abs(c.touches[0].clientY-b.touchStartY)>10)&&b.$selecter.off("touchmove.selecter touchend.selecter")}function h(a){var b=a.data;b.$selecter.off("touchmove.selecter touchend.selecter click.selecter"),b.timer=x(b.timer,1e3,function(){b.$selecter.on("click.selecter",".selecter-selected",b,i).on("click.selecter",".selecter-item",b,m)}),i(a)}function i(c){c.preventDefault(),c.stopPropagation();var d=c.data;if(!d.$select.is(":disabled"))if(a(".selecter").not(d.$selecter).trigger("close.selecter",[d]),d.mobile||!C||D)d.$selecter.hasClass("closed")?j(c):d.$selecter.hasClass("open")&&l(c);else{var e=d.$select[0];if(b.document.createEvent){var f=b.document.createEvent("MouseEvents");
14561f.initMouseEvent("mousedown",!1,!0,b,0,0,0,0,0,!1,!1,!1,!1,0,null),e.dispatchEvent(f)}else e.fireEvent&&e.fireEvent("onmousedown")}}function j(a){a.preventDefault(),a.stopPropagation();var b=a.data;if(!b.$selecter.hasClass("open")){{var c=b.$selecter.offset(),d=E.outerHeight(),e=b.$itemsWrapper.outerHeight(!0);b.index>=0?b.$items.eq(b.index).position():{left:0,top:0}}c.top+e>d&&b.$selecter.addClass("bottom"),b.$itemsWrapper.show(),b.$selecter.removeClass("closed").addClass("open"),E.on("click.selecter-"+b.guid,":not(.selecter-options)",b,k),s(b)}}function k(b){b.preventDefault(),b.stopPropagation(),0===a(b.currentTarget).parents(".selecter").length&&l(b)}function l(a){a.preventDefault(),a.stopPropagation();var b=a.data;b.$selecter.hasClass("open")&&(b.$itemsWrapper.hide(),b.$selecter.removeClass("open bottom").addClass("closed"),E.off(".selecter-"+b.guid))}function m(b){b.preventDefault(),b.stopPropagation();var c=a(this),d=b.data;if(!d.$select.is(":disabled")){if(d.$itemsWrapper.is(":visible")){var e=d.$items.index(c);e!==d.index&&(r(e,d),t(d))}d.multiple||l(b)}}function n(b,c){var d=a(this),e=b.data;if(!c&&!e.multiple){var f=e.$options.index(e.$options.filter("[value='"+w(d.val())+"']"));r(f,e),t(e)}}function o(b){b.preventDefault(),b.stopPropagation();var c=b.data;c.$select.is(":disabled")||c.multiple||(c.$selecter.addClass("focus").on("keydown.selecter-"+c.guid,c,q),a(".selecter").not(c.$selecter).trigger("close.selecter",[c]))}function p(b){b.preventDefault(),b.stopPropagation();var c=b.data;c.$selecter.removeClass("focus").off("keydown.selecter-"+c.guid),a(".selecter").not(c.$selecter).trigger("close.selecter",[c])}function q(b){var c=b.data;if(13===b.keyCode)c.$selecter.hasClass("open")&&(l(b),r(c.index,c)),t(c);else if(!(9===b.keyCode||b.metaKey||b.altKey||b.ctrlKey||b.shiftKey)){b.preventDefault(),b.stopPropagation();var d=c.$items.length-1,e=c.index<0?0:c.index;if(a.inArray(b.keyCode,B?[38,40,37,39]:[38,40])>-1)e+=38===b.keyCode||B&&37===b.keyCode?-1:1,0>e&&(e=0),e>d&&(e=d);else{var f,g,h=String.fromCharCode(b.keyCode).toUpperCase();for(g=c.index+1;d>=g;g++)if(f=c.$options.eq(g).text().charAt(0).toUpperCase(),f===h){e=g;break}if(0>e||e===c.index)for(g=0;d>=g;g++)if(f=c.$options.eq(g).text().charAt(0).toUpperCase(),f===h){e=g;break}}e>=0&&(r(e,c),s(c))}}function r(a,b){var c=b.$items.eq(a),d=c.hasClass("selected"),e=c.hasClass("disabled");if(!e){if(-1===a&&""!==b.label)b.$selected.html(b.label);else if(d)b.multiple&&(b.$options.eq(a).prop("selected",null),c.removeClass("selected"));else{{var f=c.html();c.data("value")}b.multiple?b.$options.eq(a).prop("selected",!0):(b.$selected.html(f).removeClass("placeholder"),b.$items.filter(".selected").removeClass("selected"),b.$select[0].selectedIndex=a),c.addClass("selected")}b.multiple||(b.index=a)}}function s(b){var c=b.$items.eq(b.index),d=b.index>=0&&!c.hasClass("placeholder")?c.position():{left:0,top:0};void 0!==a.fn.scroller?b.$itemsWrapper.scroller("scroll",b.$itemsWrapper.find(".scroller-content").scrollTop()+d.top,0).scroller("reset"):b.$itemsWrapper.scrollTop(b.$itemsWrapper.scrollTop()+d.top)}function t(a){a.links?u(a):(a.callback.call(a.$selecter,a.$select.val(),a.index),a.$select.trigger("change",[!0]))}function u(a){var c=a.$select.val();a.external?b.open(c):b.location.href=c}function v(a,b){return 0===b?a:a.length>b?a.substring(0,b)+"...":a}function w(a){return"string"==typeof a?a.replace(/([;&,\.\+\*\~':"\!\^#$%@\[\]\(\)=>\|])/g,"\\$1"):a}function x(a,b,c,d){return y(a,d),d===!0?setInterval(c,b):setTimeout(c,b)}function y(a){null!==a&&(clearInterval(a),a=null)}var z=0,A=b.navigator.userAgent||b.navigator.vendor||b.opera,B=/Firefox/i.test(A),C=/Android|webOS|iPhone|iPad|iPod|BlackBerry/i.test(A),D=B&&C,E=null,F={callback:a.noop,cover:!1,customClass:"",label:"",external:!1,links:!1,mobile:!1,trim:0},G={defaults:function(b){return F=a.extend(F,b||{}),a(this)},disable:function(b){return a(this).each(function(c,d){var e=a(d).parent(".selecter").data("selecter");if(e)if("undefined"!=typeof b){var f=e.$items.index(e.$items.filter("[data-value="+b+"]"));e.$items.eq(f).addClass("disabled"),e.$options.eq(f).prop("disabled",!0)}else e.$selecter.hasClass("open")&&e.$selecter.find(".selecter-selected").trigger("click.selecter"),e.$selecter.addClass("disabled"),e.$select.prop("disabled",!0)})},destroy:function(){return a(this).each(function(b,c){var d=a(c).parent(".selecter").data("selecter");d&&(d.$selecter.hasClass("open")&&d.$selecter.find(".selecter-selected").trigger("click.selecter"),void 0!==a.fn.scroller&&d.$selecter.find(".selecter-options").scroller("destroy"),d.$select[0].tabIndex=d.tabIndex,d.$select.find(".selecter-placeholder").remove(),d.$selected.remove(),d.$itemsWrapper.remove(),d.$selecter.off(".selecter"),d.$select.off(".selecter").removeClass("selecter-element").show().unwrap())})},enable:function(b){return a(this).each(function(c,d){var e=a(d).parent(".selecter").data("selecter");if(e)if("undefined"!=typeof b){var f=e.$items.index(e.$items.filter("[data-value="+b+"]"));e.$items.eq(f).removeClass("disabled"),e.$options.eq(f).prop("disabled",!1)}else e.$selecter.removeClass("disabled"),e.$select.prop("disabled",!1)})},refresh:function(){return a(this).each(function(b,c){var d=a(c).parent(".selecter").data("selecter");if(d){var f=d.index;d.$allOptions=d.$select.find("option, optgroup"),d.$options=d.$allOptions.filter("option"),d.index=-1,f=d.$options.index(d.$options.filter(":selected")),e(d),d.multiple||r(f,d)}})}};a.fn.selecter=function(a){return G[a]?G[a].apply(this,Array.prototype.slice.call(arguments,1
14561)):"object"!=typeof a&&a?this:c.apply(this,arguments)},a.selecter=function(a){"defaults"===a&&G.defaults.apply(this,Array.prototype.slice.call(arguments,1))}}(jQuery,window); 14562 14563 14564 14565 14566 14567 14568 14569 14570 14571/*! jQRangeSlider 5.7.0 - 2014-03-18 - Copyright (C) Guillaume Gautreau 2012 - MIT and GPLv3 licenses.*/!function(a){"use strict";a.widget("ui.rangeSliderMouseTouch",a.ui.mouse,{enabled:!0,_mouseInit:function(){var b=this;a.ui.mouse.prototype._mouseInit.apply(this),this._mouseDownEvent=!1,this.element.bind("touchstart."+this.widgetName,function(a){return b._touchStart(a)})},_mouseDestroy:function(){a(document).unbind("touchmove."+this.widgetName,this._touchMoveDelegate).unbind("touchend."+this.widgetName,this._touchEndDelegate),a.ui.mouse.prototype._mouseDestroy.apply(this)},enable:function(){this.enabled=!0},disable:function(){this.enabled=!1},destroy:function(){this._mouseDestroy(),a.ui.mouse.prototype.destroy.apply(this),this._mouseInit=null},_touchStart:function(b){if(!this.enabled)return!1;b.which=1,b.preventDefault(),this._fillTouchEvent(b);var c=this,d=this._mouseDownEvent;this._mouseDown(b),d!==this._mouseDownEvent&&(this._touchEndDelegate=function(a){c._touchEnd(a)},this._touchMoveDelegate=function(a){c._touchMove(a)},a(document).bind("touchmove."+this.widgetName,this._touchMoveDelegate).bind("touchend."+this.widgetName,this._touchEndDelegate))},_mouseDown:function(b){return this.enabled?a.ui.mouse.prototype._mouseDown.apply(this,[b]):!1},_touchEnd:function(b){this._fillTouchEvent(b),this._mouseUp(b),a(document).unbind("touchmove."+this.widgetName,this._touchMoveDelegate).unbind("touchend."+this.widgetName,this._touchEndDelegate),this._mouseDownEvent=!1,a(document).trigger("mouseup")},_touchMove:function(a){return a.preventDefault(),this._fillTouchEvent(a),this._mouseMove(a)},_fillTouchEvent:function(a){var b;b="undefined"==typeof a.targetTouches&&"undefined"==typeof a.changedTouches?a.originalEvent.targetTouches[0]||a.originalEvent.changedTouches[0]:a.targetTouches[0]||a.changedTouches[0],a.pageX=b.pageX,a.pageY=b.pageY}})}(jQuery),function(a){"use strict";a.widget("ui.rangeSliderDraggable",a.ui.rangeSliderMouseTouch,{cache:null,options:{containment:null},_create:function(){a.ui.rangeSliderMouseTouch.prototype._create.apply(this),setTimeout(a.proxy(this._initElementIfNotDestroyed,this),10)},destroy:function(){this.cache=null,a.ui.rangeSliderMouseTouch.prototype.destroy.apply(this)},_initElementIfNotDestroyed:function(){this._mouseInit&&this._initElement()},_initElement:function(){this._mouseInit(),this._cache()},_setOption:function(b,c){"containment"===b&&(this.options.containment=null===c||0===a(c).length?null:a(c))},_mouseStart:function(a){return this._cache(),this.cache.click={left:a.pageX,top:a.pageY},this.cache.initialOffset=this.element.offset(),this._triggerMouseEvent("mousestart"),!0},_mouseDrag:function(a){var b=a.pageX-this.cache.click.left;return b=this._constraintPosition(b+this.cache.initialOffset.left),this._applyPosition(b),this._triggerMouseEvent("sliderDrag"),!1},_mouseStop:function(){this._triggerMouseEvent("stop")},_constraintPosition:function(a){return 0!==this.element.parent().length&&null!==this.cache.parent.offset&&(a=Math.min(a,this.cache.parent.offset.left+this.cache.parent.width-this.cache.width.outer),a=Math.max(a,this.cache.parent.offset.left)),a},_applyPosition:function(a){var b={top:this.cache.offset.top,left:a};this.element.offset({left:a}),this.cache.offset=b},_cacheIfNecessary:function(){null===this.cache&&this._cache()},_cache:function(){this.cache={},this._cacheMargins(),this._cacheParent(),this._cacheDimensions(),this.cache.offset=this.element.offset()},_cacheMargins:function(){this.cache.margin={left:this._parsePixels(this.element,"marginLeft"),right:this._parsePixels(this.element,"marginRight"),top:this._parsePixels(this.element,"marginTop"),bottom:this._parsePixels(this.element,"marginBottom")}},_cacheParent:function(){if(null!==this.options.parent){var a=this.element.parent();this.cache.parent={offset:a.offset(),width:a.width()}}else this.cache.parent=null},_cacheDimensions:function(){this.cache.width={outer:this.element.outerWidth(),inner:this.element.width()}},_parsePixels:function(a,b){return parseInt(a.css(b),10)||0},_triggerMouseEvent:function(a){var b=this._prepareEventData();this.element.trigger(a,b)},_prepareEventData:function(){return{element:this.element,offset:this.cache.offset||null}}})}(jQuery),function(a,b){"use strict";a.widget("ui.rangeSlider",{options:{bounds:{min:0,max:100},defaultValues:{min:20,max:50},wheelMode:null,wheelSpeed:4,arrows:!0,valueLabels:"show",formatter:null,durationIn:0,durationOut:400,delayOut:200,range:{min:!1,max:!1},step:!1,scales:!1,enabled:!0,symmetricPositionning:!1},_values:null,_valuesChanged:!1,_initialized:!1,bar:null,leftHandle:null,rightHandle:null,innerBar:null,container:null,arrows:null,labels:null,changing:{min:!1,max:!1},changed:{min:!1,max:!1},ruler:null,_create:function(){this._setDefaultValues(),this.labels={left:null,right:null,leftDisplayed:!0,rightDisplayed:!0},this.arrows={left:null,right:null},this.changing={min:!1,max:!1},this.changed={min:!1,max:!1},this._createElements(),this._bindResize(),setTimeout(a.proxy(this.resize,this),1),setTimeout(a.proxy(this._initValues,this),1)},_setDefaultValues:function(){this._values={min:this.options.defaultValues.min,max:this.options.defaultValues.max}},_bindResize:function(){var b=this;this._resizeProxy=function(a){b.resize(a)},a(window).resize(this._resizeProxy)},_initWidth:function(){this.container.css("width",this.element.width()-this.container.outerWidth(!0)+this.container.width()),this.innerBar.css("width",this.container.width()-this.innerBar.outerWidth(!0)+this.innerBar.width())},_initValues:function(){this._initialized=!0,this.values(this._values.min,this._values.max)},_setOption:function(a,b){this._setWheelOption(a,b),this._setArrowsOption(a,b),this._setLabelsOption(a,b),this._setLabelsDurations(a,b),this._setFormatterOption(a,b),this._setBoundsOption(a,b),this._setRangeOption(a,b),this._setStepOption(a,b),this._setScalesOption(a,b),this._setEnabledOption(a,b),this._setPositionningOption(a,b)},_validProperty:function(a,b,c){return null===a||"undefined"==typeof a[b]?c:a[b]},_setStepOption:function(a,b){"step"===a&&(this.options.step=b,this._leftHandle("option","step",b),this._rightHandle("option","step",b),this._changed(!0))},_setScalesOption:function(a,b){"scales"===a&&(b===!1||null===b?(this.options.scales=!1,this._destroyRuler()):b instanceof Array&&(this.options.scales=b,this._updateRuler()))},_setRangeOption:function(a,b){"range"===a&&(this._bar("option","range",b),this.options.range=this._bar("option","range"),this._changed(!0))},_setBoundsOption:function(a,b){"bounds"===a&&"undefined"!=typeof b.min&&"undefined"!=typeof b.max&&this.bounds(b.min,b.max)},_setWheelOption:function(a,b){("wheelMode"===a||"wheelSpeed"===a)&&(this._bar("option",a,b),this.options[a]=this._bar("option",a))},_setLabelsOption:function(a,b){if("valueLabels"===a){if("hide"!==b&&"show"!==b&&"change"!==b)return;this.options.valueLabels=b,"hide"!==b?(this._createLabels(),this._leftLabel("update"),this._rightLabel("update")):this._destroyLabels()}},_setFormatterOption:function(a,b){"formatter"===a&&null!==b&&"function"==typeof b&&"hide"!==this.options.valueLabels&&(this._leftLabel("option","formatter",b),this.options.formatter=this._rightLabel("option","formatter",b))},_setArrowsOption:function(a,b){"arrows"!==a||b!==!0&&b!==!1||b===this.options.arrows||(b===!0?(this.element.removeClass("ui-rangeSlider-noArrow").addClass("ui-rangeSlider-withArrows"),this.arrows.left.css("display","block"),this.arrows.right.css("display","block"),this.options.arrows=!0):b===!1&&(this.element.addClass("ui-rangeSlider-noArrow").removeClass("ui-rangeSlider-withArrows"),this.arrows.left.css("display","none"),this.arrows.right.css("display","none"),this.options.arrows=!1),this._initWidth())},_setLabelsDurations:function(a,b){if("durationIn"===a||"durationOut"===a||"delayOut"===a){if(parseInt(b,10)!==b)return;null!==this.labels.left&&this._leftLabel("option",a,b),null!==this.labels.right&&this._rightLabel("option",a,b),this.options[a]=b}},_setEnabledOption:function(a,b){"enabled"===a&&this.toggle(b)},_setPositionningOption:function(a,b){"symmetricPositionning"===a&&(this._rightHandle("option",a,b),this.options[a]=this._leftHandle("option",a,b))},_createElements:function(){"absolute"!==this.element.css("position")&&this.element.css("position","relative"),this.element.addClass("ui-rangeSlider"),this.container=a("<div class='ui-rangeSlider-container' />").css("position","absolute").appendTo(this.element),this.innerBar=a("<div class='ui-rangeSlider-innerBar' />").css("position","absolute").css("top",0).css("left",0),this._createHandles(),this._createBar(),this.container.prepend(this.innerBar),this._createArrows(),"hide"!==this.options.valueLabels?this._createLabels():this._destroyLabels(),this._updateRuler(),this.options.enabled||this._toggle(this.options.enabled)},_createHandle:function(b){return a("<div />")[this._handleType()](b).bind("sliderDrag",a.proxy(this._changing,this)).bind("stop",a.proxy(this._changed,this))},_createHandles:function(){this.leftHandle=this._createHandle({isLeft:!0,bounds:this.options.bounds,value:this._values.min,step:this.options.step,symmetricPositionning:this.options.symmetricPositionning}).appendTo(this.container),this.rightHandle=this._createHandle({isLeft:!1,bounds:this.options.bounds,value:this._values.max,step:this.options.step,symmetricPositionning:this.options.symmetricPositionning}).appendTo(this.container)},_createBar:function(){this.bar=a("<div />").prependTo(this.container).bind("sliderDrag scroll zoom",a.proxy(this._changing,this)).bind("stop",a.proxy(this._changed,this)),this._bar({leftHandle:this.leftHandle,rightHandle:this.rightHandle,values:{min:this._values.min,max:this._values.max},type:this._handleType(),range:this.options.range,wheelMode:this.options.wheelMode,wheelSpeed:this.options.wheelSpeed}),this.options.range=this._bar("option","range"),this.options.wheelMode=this._bar("option","wheelMode"),this.options.wheelSpeed=this._bar("option","wheelSpeed")},_createArrows:function(){this.arrows.left=this._createArrow("left"),this.arrows.right=this._createArrow("right"),this.options.arrows?this.element.addClass("ui-rangeSlider-withArrows"):(this.arrows.left.css("display","none"),this.arrows.right.css("display","none"),this.element.addClass("ui-rangeSlider-noArrow"))},_createArrow:function(b){var c,d=a("<div class='ui-rangeSlider-arrow' />").append("<div class='ui-rangeSlider-arrow-inner' />").addClass("ui-rangeSlider-"+b+"Arrow").css("position","absolute").css(b,0).appendTo(this.element);return c="right"===b?a.proxy(this._scrollRightClick,this):a.proxy(this._scrollLeftClick,this),d.bind("mousedown touchstart",c),d},_proxy:function(a,b,c){var d=Array.prototype.slice.call(c);return a&&a[b]?a[b].apply(a,d):null},_handleType:function(){return"rangeSliderHandle"},_barType:function(){return"rangeSliderBar"},_bar:function(){return this._proxy(this.bar,this._barType(),arguments)},_labelType:function(){return"rangeSliderLabel"},_leftLabel:function(){return this._proxy(this.labels.left,this._labelType(),arguments)},_rightLabel:function(){return this._proxy(this.labels.right,this._labelType(),arguments)},_leftHandle:function(){return this._proxy(this.leftHandle,this._handleType(),arguments)},_rightHandle:function(){return this._proxy(this.rightHandle,this._handleType(),arguments)},_getValue:function(a,b){return b===this.rightHandle&&(a-=b.outerWidth()),a*(this.options.bounds.max-this.options.bounds.min)/(this.container.innerWidth()-b.outerWidth(!0))+this.options.bounds.min},_trigger:function(a){var b=this;setTimeout(function(){b.element.trigger(a,{label:b.element,values:b.values()})},1)}
14571,_changing:function(){this._updateValues()&&(this._trigger("valuesChanging"),this._valuesChanged=!0)},_deactivateLabels:function(){"change"===this.options.valueLabels&&(this._leftLabel("option","show","hide"),this._rightLabel("option","show","hide"))},_reactivateLabels:function(){"change"===this.options.valueLabels&&(this._leftLabel("option","show","change"),this._rightLabel("option","show","change"))},_changed:function(a){a===!0&&this._deactivateLabels(),(this._updateValues()||this._valuesChanged)&&(this._trigger("valuesChanged"),a!==!0&&this._trigger("userValuesChanged"),this._valuesChanged=!1),a===!0&&this._reactivateLabels()},_updateValues:function(){var a=this._leftHandle("value"),b=this._rightHandle("value"),c=this._min(a,b),d=this._max(a,b),e=c!==this._values.min||d!==this._values.max;return this._values.min=this._min(a,b),this._values.max=this._max(a,b),e},_min:function(a,b){return Math.min(a,b)},_max:function(a,b){return Math.max(a,b)},_createLabel:function(b,c){var d;return null===b?(d=this._getLabelConstructorParameters(b,c),b=a("<div />").appendTo(this.element)[this._labelType()](d)):(d=this._getLabelRefreshParameters(b,c),b[this._labelType()](d)),b},_getLabelConstructorParameters:function(a,b){return{handle:b,handleType:this._handleType(),formatter:this._getFormatter(),show:this.options.valueLabels,durationIn:this.options.durationIn,durationOut:this.options.durationOut,delayOut:this.options.delayOut}},_getLabelRefreshParameters:function(){return{formatter:this._getFormatter(),show:this.options.valueLabels,durationIn:this.options.durationIn,durationOut:this.options.durationOut,delayOut:this.options.delayOut}},_getFormatter:function(){return this.options.formatter===!1||null===this.options.formatter?this._defaultFormatter:this.options.formatter},_defaultFormatter:function(a){return Math.round(a)},_destroyLabel:function(a){return null!==a&&(a[this._labelType()]("destroy"),a.remove(),a=null),a},_createLabels:function(){this.labels.left=this._createLabel(this.labels.left,this.leftHandle),this.labels.right=this._createLabel(this.labels.right,this.rightHandle),this._leftLabel("pair",this.labels.right)},_destroyLabels:function(){this.labels.left=this._destroyLabel(this.labels.left),this.labels.right=this._destroyLabel(this.labels.right)},_stepRatio:function(){return this._leftHandle("stepRatio")},_scrollRightClick:function(a){return this.options.enabled?(a.preventDefault(),this._bar("startScroll"),this._bindStopScroll(),this._continueScrolling("scrollRight",4*this._stepRatio(),1),void 0):!1},_continueScrolling:function(a,b,c,d){if(!this.options.enabled)return!1;this._bar(a,c),d=d||5,d--;var e=this,f=16,g=Math.max(1,4/this._stepRatio());this._scrollTimeout=setTimeout(function(){0===d&&(b>f?b=Math.max(f,b/1.5):c=Math.min(g,2*c),d=5),e._continueScrolling(a,b,c,d)},b)},_scrollLeftClick:function(a){return this.options.enabled?(a.preventDefault(),this._bar("startScroll"),this._bindStopScroll(),this._continueScrolling("scrollLeft",4*this._stepRatio(),1),void 0):!1},_bindStopScroll:function(){var b=this;this._stopScrollHandle=function(a){a.preventDefault(),b._stopScroll()},a(document).bind("mouseup touchend",this._stopScrollHandle)},_stopScroll:function(){a(document).unbind("mouseup touchend",this._stopScrollHandle),this._stopScrollHandle=null,this._bar("stopScroll"),clearTimeout(this._scrollTimeout)},_createRuler:function(){this.ruler=a("<div class='ui-rangeSlider-ruler' />").appendTo(this.innerBar)},_setRulerParameters:function(){this.ruler.ruler({min:this.options.bounds.min,max:this.options.bounds.max,scales:this.options.scales})},_destroyRuler:function(){null!==this.ruler&&a.fn.ruler&&(this.ruler.ruler("destroy"),this.ruler.remove(),this.ruler=null)},_updateRuler:function(){this._destroyRuler(),this.options.scales!==!1&&a.fn.ruler&&(this._createRuler(),this._setRulerParameters())},values:function(a,b){var c;if("undefined"!=typeof a&&"undefined"!=typeof b){if(!this._initialized)return this._values.min=a,this._values.max=b,this._values;this._deactivateLabels(),c=this._bar("values",a,b),this._changed(!0),this._reactivateLabels()}else c=this._bar("values",a,b);return c},min:function(a){return this._values.min=this.values(a,this._values.max).min,this._values.min},max:function(a){return this._values.max=this.values(this._values.min,a).max,this._values.max},bounds:function(a,b){return this._isValidValue(a)&&this._isValidValue(b)&&b>a&&(this._setBounds(a,b),this._updateRuler(),this._changed(!0)),this.options.bounds},_isValidValue:function(a){return"undefined"!=typeof a&&parseFloat(a)===a},_setBounds:function(a,b){this.options.bounds={min:a,max:b},this._leftHandle("option","bounds",this.options.bounds),this._rightHandle("option","bounds",this.options.bounds),this._bar("option","bounds",this.options.bounds)},zoomIn:function(a){this._bar("zoomIn",a)},zoomOut:function(a){this._bar("zoomOut",a)},scrollLeft:function(a){this._bar("startScroll"),this._bar("scrollLeft",a),this._bar("stopScroll")},scrollRight:function(a){this._bar("startScroll"),this._bar("scrollRight",a),this._bar("stopScroll")},resize:function(){this._initWidth(),this._leftHandle("update"),this._rightHandle("update"),this._bar("update")},enable:function(){this.toggle(!0)},disable:function(){this.toggle(!1)},toggle:function(a){a===b&&(a=!this.options.enabled),this.options.enabled!==a&&this._toggle(a)},_toggle:function(a){this.options.enabled=a,this.element.toggleClass("ui-rangeSlider-
14571disabled",!a);var b=a?"enable":"disable";this._bar(b),this._leftHandle(b),this._rightHandle(b),this._leftLabel(b),this._rightLabel(b)},destroy:function(){this.element.removeClass("ui-rangeSlider-withArrows ui-rangeSlider-noArrow ui-rangeSlider-disabled"),this._destroyWidgets(),this._destroyElements(),this.element.removeClass("ui-rangeSlider"),this.options=null,a(window).unbind("resize",this._resizeProxy),this._resizeProxy=null,this._bindResize=null,a.Widget.prototype.destroy.apply(this,arguments)},_destroyWidget:function(a){this["_"+a]("destroy"),this[a].remove(),this[a]=null},_destroyWidgets:function(){this._destroyWidget("bar"),this._destroyWidget("leftHandle"),this._destroyWidget("rightHandle"),this._destroyRuler(),this._destroyLabels()},_destroyElements:function(){this.container.remove(),this.container=null,this.innerBar.remove(),this.innerBar=null,this.arrows.left.remove(),this.arrows.right.remove(),this.arrows=null}})}(jQuery),function(a){"use strict";a.widget("ui.rangeSliderHandle",a.ui.rangeSliderDraggable,{currentMove:null,margin:0,parentElement:null,options:{isLeft:!0,bounds:{min:0,max:100},range:!1,value:0,step:!1},_value:0,_left:0,_create:function(){a.ui.rangeSliderDraggable.prototype._create.apply(this),this.element.css("position","absolute").css("top",0).addClass("ui-rangeSlider-handle").toggleClass("ui-rangeSlider-leftHandle",this.options.isLeft).toggleClass("ui-rangeSlider-rightHandle",!this.options.isLeft),this.element.append("<div class='ui-rangeSlider-handle-inner' />"),this._value=this._constraintValue(this.options.value)},destroy:function(){this.element.empty(),a.ui.rangeSliderDraggable.prototype.destroy.apply(this)},_setOption:function(b,c){"isLeft"!==b||c!==!0&&c!==!1||c===this.options.isLeft?"step"===b&&this._checkStep(c)?(this.options.step=c,this.update()):"bounds"===b?(this.options.bounds=c,this.update()):"range"===b&&this._checkRange(c)?(this.options.range=c,this.update()):"symmetricPositionning"===b&&(this.options.symmetricPositionning=c===!0,this.update()):(this.options.isLeft=c,this.element.toggleClass("ui-rangeSlider-leftHandle",this.options.isLeft).toggleClass("ui-rangeSlider-rightHandle",!this.options.isLeft),this._position(this._value),this.element.trigger("switch",this.options.isLeft)),a.ui.rangeSliderDraggable.prototype._setOption.apply(this,[b,c])},_checkRange:function(a){return a===!1||!this._isValidValue(a.min)&&!this._isValidValue(a.max)},_isValidValue:function(a){return"undefined"!=typeof a&&a!==!1&&parseFloat(a)!==a},_checkStep:function(a){return a===!1||parseFloat(a)===a},_initElement:function(){a.ui.rangeSliderDraggable.prototype._initElement.apply(this),0===this.cache.parent.width||null===this.cache.parent.width?setTimeout(a.proxy(this._initElementIfNotDestroyed,this),500):(this._position(this._value),this._triggerMouseEvent("initialize"))},_bounds:function(){return this.options.bounds},_cache:function(){a.ui.rangeSliderDraggable.prototype._cache.apply(this),this._cacheParent()},_cacheParent:function(){var a=this.element.parent();this.cache.parent={element:a,offset:a.offset(),padding:{left:this._parsePixels(a,"paddingLeft")},width:a.width()}},_position:function(a){var b=this._getPositionForValue(a);this._applyPosition(b)},_constraintPosition:function(a){var b=this._getValueForPosition(a);return this._getPositionForValue(b)},_applyPosition:function(b){a.ui.rangeSliderDraggable.prototype._applyPosition.apply(this,[b]),this._left=b,this._setValue(this._getValueForPosition(b)),this._triggerMouseEvent("moving")},_prepareEventData:function(){var b=a.ui.rangeSliderDraggable.prototype._prepareEventData.apply(this);return b.value=this._value,b},_setValue:function(a){a!==this._value&&(this._value=a)},_constraintValue:function(a){if(a=Math.min(a,this._bounds().max),a=Math.max(a,this._bounds().min),a=this._round(a),this.options.range!==!1){var b=this.options.range.min||!1,c=this.options.range.max||!1;b!==!1&&(a=Math.max(a,this._round(b))),c!==!1&&(a=Math.min(a,this._round(c))),a=Math.min(a,this._bounds().max),a=Math.max(a,this._bounds().min)}return a},_round:function(a){return this.options.step!==!1&&this.options.step>0?Math.round(a/this.options.step)*this.options.step:a}
14571,_getPositionForValue:function(a){if(!this.cache||!this.cache.parent||null===this.cache.parent.offset)return 0;a=this._constraintValue(a);var b=(a-this.options.bounds.min)/(this.options.bounds.max-this.options.bounds.min),c=this.cache.parent.width,d=this.cache.parent.offset.left,e=this.options.isLeft?0:this.cache.width.outer;return this.options.symmetricPositionning?b*(c-2*this.cache.width.outer)+d+e:b*c+d-e},_getValueForPosition:function(a){var b=this._getRawValueForPositionAndBounds(a,this.options.bounds.min,this.options.bounds.max);return this._constraintValue(b)},_getRawValueForPositionAndBounds:function(a,b,c){var d,e,f=null===this.cache.parent.offset?0:this.cache.parent.offset.left;return this.options.symmetricPositionning?(a-=this.options.isLeft?0:this.cache.width.outer,d=this.cache.parent.width-2*this.cache.width.outer):(a+=this.options.isLeft?0:this.cache.width.outer,d=this.cache.parent.width),0===d?this._value:(e=(a-f)/d,e*(c-b)+b)},value:function(a){return"undefined"!=typeof a&&(this._cache(),a=this._constraintValue(a),this._position(a)),this._value},update:function(){this._cache();var a=this._constraintValue(this._value),b=this._getPositionForValue(a);a!==this._value?(this._triggerMouseEvent("updating"),this._position(a),this._triggerMouseEvent("update")):b!==this.cache.offset.left&&(this._triggerMouseEvent("updating"),this._position(a),this._triggerMouseEvent("update"))},position:function(a){return"undefined"!=typeof a&&(this._cache(),a=this._constraintPosition(a),this._applyPosition(a)),this._left},add:function(a,b){return a+b},substract:function(a,b){return a-b},stepsBetween:function(a,b){return this.options.step===!1?b-a:(b-a)/this.options.step},multiplyStep:function(a,b){return a*b},moveRight:function(a){var b;return this.options.step===!1?(b=this._left,this.position(this._left+a),this._left-b):(b=this._value,this.value(this.add(b,this.multiplyStep(this.options.step,a))),this.stepsBetween(b,this._value))},moveLeft:function(a){return-this.moveRight(-a)},stepRatio:function(){if(this.options.step===!1)return 1;var a=(this.options.bounds.max-this.options.bounds.min)/this.options.step;return this.cache.parent.width/a}})}(jQuery),function(a){"use strict";function b(a,b){return"undefined"==typeof a?b||!1:a}a.widget("ui.rangeSliderBar",a.ui.rangeSliderDraggable,{options:{leftHandle:null,rightHandle:null,bounds:{min:0,max:100},type:"rangeSliderHandle",range:!1,drag:function(){},stop:function(){},values:{min:0,max:20},wheelSpeed:4,wheelMode:null},_values:{min:0,max:20},_waitingToInit:2,_wheelTimeout:!1,_create:function(){a.ui.rangeSliderDraggable.prototype._create.apply(this),this.element.css("position","absolute").css("top",0).addClass("ui-rangeSlider-bar"),this.options.leftHandle.bind("initialize",a.proxy(this._onInitialized,this)).bind("mousestart",a.proxy(this._cache,this)).bind("stop",a.proxy(this._onHandleStop,this)),this.options.rightHandle.bind("initialize",a.proxy(this._onInitialized,this)).bind("mousestart",a.proxy(this._cache,this)).bind("stop",a.proxy(this._onHandleStop,this)),this._bindHandles(),this._values=this.options.values,this._setWheelModeOption(this.options.wheelMode)},destroy:function(){this.options.leftHandle.unbind(".bar"),this.options.rightHandle.unbind(".bar"),this.options=null,a.ui.rangeSliderDraggable.prototype.destroy.apply(this)},_setOption:function(a,b){"range"===a?this._setRangeOption(b):"wheelSpeed"===a?this._setWheelSpeedOption(b):"wheelMode"===a&&this._setWheelModeOption(b)},_setRangeOption:function(a){if(("object"!=typeof a||null===a)&&(a=!1),a!==!1||this.options.range!==!1){if(a!==!1){var c=b(a.min,this.options.range.min),d=b(a.max,this.options.range.max);this.options.range={min:c,max:d}}else this.options.range=!1;this._setLeftRange(),this._setRightRange()}},_setWheelSpeedOption:function(a){"number"==typeof a&&a>0&&(this.options.wheelSpeed=a)},_setWheelModeOption:function(a){(null===a||a===!1||"zoom"===a||"scroll"===a)&&(this.options.wheelMode!==a&&this.element.parent().unbind("mousewheel.bar"),this._bindMouseWheel(a),this.options.wheelMode=a)},_bindMouseWheel:function(b){"zoom"===b?this.element.parent().bind("mousewheel.bar",a.proxy(this._mouseWheelZoom,this)):"scroll"===b&&this.element.parent().bind("mousewheel.bar",a.proxy(this._mouseWheelScroll,this))},_setLeftRange:function(){if(this.options.range===!1)return!1;var a=this._values.max,b={min:!1,max:!1};b.max="undefined"!=typeof this.options.range.min&&this.options.range.min!==!1?this._leftHandle("substract",a,this.options.range.min):!1,b.min="undefined"!=typeof this.options.range.max&&this.options.range.max!==!1?this._leftHandle("substract",a,this.options.range.max):!1,this._leftHandle("option","range",b)},_setRightRange:function(){var a=this._values.min,b={min:!1,max:!1};b.min="undefined"!=typeof this.options.range.min&&this.options.range.min!==!1?this._rightHandle("add",a,this.options.range.min):!1,b.max="undefined"!=typeof this.options.range.max&&this.options.range.max!==!1?this._rightHandle("add",a,this.options.range.max):!1,this._rightHandle("option","range",b)},_deactivateRange:function(){this._leftHandle("option","range",!1),this._rightHandle("option","range",!1)},_reactivateRange:function(){this._setRangeOption(this.options.range)},_onInitialized:function(){this._waitingToInit--,0===this._waitingToInit&&this._initMe()},_initMe:function(){this._cache(),this.min(this._values.min),this.max(this._values.max);var a=this._leftHandle("position"),b=this._rightHandle("position")+this.options.rightHandle.width();this.element.offset({left:a}),this.element.css("width",b-a)},_leftHandle:function(){return this._handleProxy(this.options.leftHandle,arguments)},_rightHandle:function(){return this._handleProxy(this.options.rightHandle,arguments)},_handleProxy:function(a,b){var c=Array.prototype.slice.call(b);return a[this.options.type].apply(a,c)},_cache:function(){a.ui.rangeSliderDraggable.prototype._cache.apply(this),this._cacheHandles()},_cacheHandles:function(){this.cache.rightHandle={},this.cache.rightHandle.width=this.options.rightHandle.width(),this.cache.rightHandle.offset=this.options.rightHandle.offset(),this.cache.leftHandle={},this.cache.leftHandle.offset=this.options.leftHandle.offset()},_mouseStart:function(b){a.ui.rangeSliderDraggable.prototype._mouseStart.apply(this,[b]),this._deactivateRange()},_mouseStop:function(b){a.ui.rangeSliderDraggable.prototype._mouseStop.apply(this,[b]),this._cacheHandles(),this._values.min=this._leftHandle("value"),this._values.max=this._rightHandle("value"),this._reactivateRange(),this._leftHandle().trigger("stop"),this._rightHandle().trigger("stop")},_onDragLeftHandle:function(a,b){if(this._cacheIfNecessary(),b.element[0]===this.options.leftHandle[0]){if(this._switchedValues())return this._switchHandles(),this._onDragRightHandle(a,b),void 0;this._values.min=b.value,this.cache.offset.left=b.offset.left,this.cache.leftHandle.offset=b.offset,this._positionBar()}},_onDragRightHandle:function(a,b){if(this._cacheIfNecessary(),b.element[0]===this.options.rightHandle[0]){if(this._switchedValues())return this._switchHandles(),this._onDragLeftHandle(a,b),void 0;this._values.max=b.value,this.cache.rightHandle.offset=b.offset,this._positionBar()}},_positionBar:function(){var a=this.cache.rightHandle.offset.left+this.cache.rightHandle.width-this.cache.leftHandle.offset.left;
14571this.cache.width.inner=a,this.element.css("width",a).offset({left:this.cache.leftHandle.offset.left})},_onHandleStop:function(){this._setLeftRange(),this._setRightRange()},_switchedValues:function(){if(this.min()>this.max()){var a=this._values.min;return this._values.min=this._values.max,this._values.max=a,!0}return!1},_switchHandles:function(){var a=this.options.leftHandle;this.options.leftHandle=this.options.rightHandle,this.options.rightHandle=a,this._leftHandle("option","isLeft",!0),this._rightHandle("option","isLeft",!1),this._bindHandles(),this._cacheHandles()},_bindHandles:function(){this.options.leftHandle.unbind(".bar").bind("sliderDrag.bar update.bar moving.bar",a.proxy(this._onDragLeftHandle,this)),this.options.rightHandle.unbind(".bar").bind("sliderDrag.bar update.bar moving.bar",a.proxy(this._onDragRightHandle,this))},_constraintPosition:function(b){var c,d={};return d.left=a.ui.rangeSliderDraggable.prototype._constraintPosition.apply(this,[b]),d.left=this._leftHandle("position",d.left),c=this._rightHandle("position",d.left+this.cache.width.outer-this.cache.rightHandle.width),d.width=c-d.left+this.cache.rightHandle.width,d},_applyPosition:function(b){a.ui.rangeSliderDraggable.prototype._applyPosition.apply(this,[b.left]),this.element.width(b.width)},_mouseWheelZoom:function(b,c,d,e){if(!this.enabled)return!1;var f=this._values.min+(this._values.max-this._values.min)/2,g={},h={};return this.options.range===!1||this.options.range.min===!1?(g.max=f,h.min=f):(g.max=f-this.options.range.min/2,h.min=f+this.options.range.min/2),this.options.range!==!1&&this.options.range.max!==!1&&(g.min=f-this.options.range.max/2,h.max=f+this.options.range.max/2),this._leftHandle("option","range",g),this._rightHandle("option","range",h),clearTimeout(this._wheelTimeout),this._wheelTimeout=setTimeout(a.proxy(this._wheelStop,this),200),this.zoomIn(e*this.options.wheelSpeed),!1},_mouseWheelScroll:function(b,c,d,e){return this.enabled?(this._wheelTimeout===!1?this.startScroll():clearTimeout(this._wheelTimeout),this._wheelTimeout=setTimeout(a.proxy(this._wheelStop,this),200),this.scrollLeft(e*this.options.wheelSpeed),!1):!1},_wheelStop:function(){this.stopScroll(),this._wheelTimeout=!1},min:function(a){return this._leftHandle("value",a)},max:function(a){return this._rightHandle("value",a)},startScroll:function(){this._deactivateRange()},stopScroll:function(){this._reactivateRange(),this._triggerMouseEvent("stop"),this._leftHandle().trigger("stop"),this._rightHandle().trigger("stop")},scrollLeft:function(a){return a=a||1,0>a?this.scrollRight(-a):(a=this._leftHandle("moveLeft",a),this._rightHandle("moveLeft",a),this.update(),this._triggerMouseEvent("scroll"),void 0)},scrollRight:function(a){return a=a||1,0>a?this.scrollLeft(-a):(a=this._rightHandle("moveRight",a),this._leftHandle("moveRight",a),this.update(),this._triggerMouseEvent("scroll"),void 0)},zoomIn:function(a){if(a=a||1,0>a)return this.zoomOut(-a);var b=this._rightHandle("moveLeft",a);a>b&&(b/=2,this._rightHandle("moveRight",b)),this._leftHandle("moveRight",b),this.update(),this._triggerMouseEvent("zoom")},zoomOut:function(a){if(a=a||1,0>a)return this.zoomIn(-a);var b=this._rightHandle("moveRight",a);a>b&&(b/=2,this._rightHandle("moveLeft",b)),this._leftHandle("moveLeft",b),this.update(),this._triggerMouseEvent("zoom")},values:function(a,b){if("undefined"!=typeof a&&"undefined"!=typeof b){var c=Math.min(a,b),d=Math.max(a,b);this._deactivateRange(),this.options.leftHandle.unbind(".bar"),this.options.rightHandle.unbind(".bar"),this._values.min=this._leftHandle("value",c),this._values.max=this._rightHandle("value",d),this._bindHandles(),this._reactivateRange(),this.update() 14572}return{min:this._values.min,max:this._values.max}},update:function(){this._values.min=this.min(),this._values.max=this.max(),this._cache(),this._positionBar()}})}(jQuery),function(a){"use strict";function b(b,c,d,e){this.label1=b,this.label2=c,this.type=d,this.options=e,this.handle1=this.label1[this.type]("option","handle"),this.handle2=this.label2[this.type]("option","handle"),this.cache=null,this.left=b,this.right=c,this.moving=!1,this.initialized=!1,this.updating=!1,this.Init=function(){this.BindHandle(this.handle1),this.BindHandle(this.handle2),"show"===this.options.show?(setTimeout(a.proxy(this.PositionLabels,this),1),this.initialized=!0):setTimeout(a.proxy(this.AfterInit,this),1e3),this._resizeProxy=a.proxy(this.onWindowResize,this),a(window).resize(this._resizeProxy)},this.Destroy=function(){this._resizeProxy&&(a(window).unbind("resize",this._resizeProxy),this._resizeProxy=null,this.handle1.unbind(".positionner"),this.handle1=null,this.handle2.unbind(".positionner"),this.handle2=null,this.label1=null,this.label2=null,this.left=null,this.right=null),this.cache=null},this.AfterInit=function(){this.initialized=!0},this.Cache=function(){"none"!==this.label1.css("display")&&(this.cache={},this.cache.label1={},this.cache.label2={},this.cache.handle1={},this.cache.handle2={},this.cache.offsetParent={},this.CacheElement(this.label1,this.cache.label1),this.CacheElement(this.label2,this.cache.label2),this.CacheElement(this.handle1,this.cache.handle1),this.CacheElement(this.handle2,this.cache.handle2),this.CacheElement(this.label1.offsetParent(),this.cache.offsetParent))},this.CacheIfNecessary=function(){null===this.cache?this.Cache():(this.CacheWidth(this.label1,this.cache.label1),this.CacheWidth(this.label2,this.cache.label2),this.CacheHeight(this.label1,this.cache.label1),this.CacheHeight(this.label2,this.cache.label2),this.CacheWidth(this.label1.offsetParent(),this.cache.offsetParent))},this.CacheElement=function(a,b){this.CacheWidth(a,b),this.CacheHeight(a,b),b.offset=a.offset(),b.margin={left:this.ParsePixels("marginLeft",a),right:this.ParsePixels("marginRight",a)},b.border={left:this.ParsePixels("borderLeftWidth",a),right:this.ParsePixels("borderRightWidth",a)}},this.CacheWidth=function(a,b){b.width=a.width(),b.outerWidth=a.outerWidth()},this.CacheHeight=function(a,b){b.outerHeightMargin=a.outerHeight(!0)},this.ParsePixels=function(a,b){return parseInt(b.css(a),10)||0},this.BindHandle=function(b){b.bind("updating.positionner",a.proxy(this.onHandleUpdating,this)),b.bind("update.positionner",a.proxy(this.onHandleUpdated,this)),b.bind("moving.positionner",a.proxy(this.onHandleMoving,this)),b.bind("stop.positionner",a.proxy(this.onHandleStop,this))},this.PositionLabels=function(){if(this.CacheIfNecessary(),null!==this.cache){var a=this.GetRawPosition(this.cache.label1,this.cache.handle1),b=this.GetRawPosition(this.cache.label2,this.cache.handle2);this.label1[d]("option","isLeft")?this.ConstraintPositions(a,b):this.ConstraintPositions(b,a),this.PositionLabel(this.label1,a.left,this.cache.label1),this.PositionLabel(this.label2,b.left,this.cache.label2)}},this.PositionLabel=function(a,b,c){var d,e,f,g=this.cache.offsetParent.offset.left+this.cache.offsetParent.border.left;g-b>=0?(a.css("right",""),a.offset({left:b})):(d=g+this.cache.offsetParent.width,e=b+c.margin.left+c.outerWidth+c.margin.right,f=d-e,a.css("left",""),a.css("right",f))},this.ConstraintPositions=function(a,b){(a.center<b.center&&a.outerRight>b.outerLeft||a.center>b.center&&b.outerRight>a.outerLeft)&&(a=this.getLeftPosition(a,b),b=this.getRightPosition(a,b))},this.getLeftPosition=function(a,b){var c=(b.center+a.center)/2,d=c-a.cache.outerWidth-a.cache.margin.right+a.c
14572ache.border.left;return a.left=d,a},this.getRightPosition=function(a,b){var c=(b.center+a.center)/2;return b.left=c+b.cache.margin.left+b.cache.border.left,b},this.ShowIfNecessary=function(){"show"===this.options.show||this.moving||!this.initialized||this.updating||(this.label1.stop(!0,!0).fadeIn(this.options.durationIn||0),this.label2.stop(!0,!0).fadeIn(this.options.durationIn||0),this.moving=!0)},this.HideIfNeeded=function(){this.moving===!0&&(this.label1.stop(!0,!0).delay(this.options.delayOut||0).fadeOut(this.options.durationOut||0),this.label2.stop(!0,!0).delay(this.options.delayOut||0).fadeOut(this.options.durationOut||0),this.moving=!1)},this.onHandleMoving=function(a,b){this.ShowIfNecessary(),this.CacheIfNecessary(),this.UpdateHandlePosition(b),this.PositionLabels()},this.onHandleUpdating=function(){this.updating=!0},this.onHandleUpdated=function(){this.updating=!1,this.cache=null},this.onHandleStop=function(){this.HideIfNeeded()},this.onWindowResize=function(){this.cache=null},this.UpdateHandlePosition=function(a){null!==this.cache&&(a.element[0]===this.handle1[0]?this.UpdatePosition(a,this.cache.handle1):this.UpdatePosition(a,this.cache.handle2))},this.UpdatePosition=function(a,b){b.offset=a.offset,b.value=a.value},this.GetRawPosition=function(a,b){var c=b.offset.left+b.outerWidth/2,d=c-a.outerWidth/2,e=d+a.outerWidth-a.border.left-a.border.right,f=d-a.margin.left-a.border.left,g=b.offset.top-a.outerHeightMargin;return{left:d,outerLeft:f,top:g,right:e,outerRight:f+a.outerWidth+a.margin.left+a.margin.right,cache:a,center:c}},this.Init()}a.widget("ui.rangeSliderLabel",a.ui.rangeSliderMouseTouch,{options:{handle:null,formatter:!1,handleType:"rangeSliderHandle",show:"show",durationIn:0,durationOut:500,delayOut:500,isLeft:!1},cache:null,_positionner:null,_valueContainer:null,_innerElement:null,_value:null,_create:function(){this.options.isLeft=this._handle("option","isLeft"),this.element.addClass("ui-rangeSlider-label").css("position","absolute").css("display","block"),this._createElements(),this._toggleClass(),this.options.handle.bind("moving.label",a.proxy(this._onMoving,this)).bind("update.label",a.proxy(this._onUpdate,this)).bind("switch.label",a.proxy(this._onSwitch,this)),"show"!==this.options.show&&this.element.hide(),this._mouseInit()},destroy:function(){this.options.handle.unbind(".label"),this.options.handle=null,this._valueContainer=null,this._innerElement=null,this.element.empty(),this._positionner&&(this._positionner.Destroy(),this._positionner=null),a.ui.rangeSliderMouseTouch.prototype.destroy.apply(this)},_createElements:function(){this._valueContainer=a("<div class='ui-rangeSlider-label-value' />").appendTo(this.element),this._innerElement=a("<div class='ui-rangeSlider-label-inner' />").appendTo(this.element)},_handle:function(){var a=Array.prototype.slice.apply(arguments);return this.options.handle[this.options.handleType].apply(this.options.handle,a)},_setOption:function(a,b){"show"===a?this._updateShowOption(b):("durationIn"===a||"durationOut"===a||"delayOut"===a)&&this._updateDurations(a,b),this._setFormatterOption(a,b)},_setFormatterOption:function(a,b){"formatter"===a&&("function"==typeof b||b===!1)&&(this.options.formatter=b,this._display(this._value))},_updateShowOption:function(a){this.options.show=a,"show"!==this.options.show?(this.element.hide(),this._positionner.moving=!1):(this.element.show(),this._display(this.options.handle[this.options.handleType]("value")),this._positionner.PositionLabels()),this._positionner.options.show=this.options.show}
14572,_updateDurations:function(a,b){parseInt(b,10)===b&&(this._positionner.options[a]=b,this.options[a]=b)},_display:function(a){this.options.formatter===!1?this._displayText(Math.round(a)):this._displayText(this.options.formatter(a)),this._value=a},_displayText:function(a){this._valueContainer.text(a)},_toggleClass:function(){this.element.toggleClass("ui-rangeSlider-leftLabel",this.options.isLeft).toggleClass("ui-rangeSlider-rightLabel",!this.options.isLeft)},_positionLabels:function(){this._positionner.PositionLabels()},_mouseDown:function(a){this.options.handle.trigger(a)},_mouseUp:function(a){this.options.handle.trigger(a)},_mouseMove:function(a){this.options.handle.trigger(a)},_onMoving:function(a,b){this._display(b.value)},_onUpdate:function(){"show"===this.options.show&&this.update()},_onSwitch:function(a,b){this.options.isLeft=b,this._toggleClass(),this._positionLabels()},pair:function(a){null===this._positionner&&(this._positionner=new b(this.element,a,this.widgetName,{show:this.options.show,durationIn:this.options.durationIn,durationOut:this.options.durationOut,delayOut:this.options.delayOut}),a[this.widgetName]("positionner",this._positionner))},positionner:function(a){return"undefined"!=typeof a&&(this._positionner=a),this._positionner},update:function(){this._positionner.cache=null,this._display(this._handle("value")),"show"===this.options.show&&this._positionLabels()}})}(jQuery),function(a){"use strict";a.widget("ui.dateRangeSlider",a.ui.rangeSlider,{options:{bounds:{min:new Date(2010,0,1).valueOf(),max:new Date(2012,0,1).valueOf()},defaultValues:{min:new Date(2010,1,11).valueOf(),max:new Date(2011,1,11).valueOf()}},_create:function(){a.ui.rangeSlider.prototype._create.apply(this),this.element.addClass("ui-dateRangeSlider")},destroy:function(){this.element.removeClass("ui-dateRangeSlider"),a.ui.rangeSlider.prototype.destroy.apply(this)},_setDefaultValues:function(){this._values={min:this.options.defaultValues.min.valueOf(),max:this.options.defaultValues.max.valueOf()}},_setRulerParameters:function(){this.ruler.ruler({min:new Date(this.options.bounds.min),max:new Date(this.options.bounds.max),scales:this.options.scales})},_setOption:function(b,c){("defaultValues"===b||"bounds"===b)&&"undefined"!=typeof c&&null!==c&&this._isValidDate(c.min)&&this._isValidDate(c.max)?a.ui.rangeSlider.prototype._setOption.apply(this,[b,{min:c.min.valueOf(),max:c.max.valueOf()}]):a.ui.rangeSlider.prototype._setOption.apply(this,this._toArray(arguments))},_handleType:function(){return"dateRangeSliderHandle"},option:function(b){if("bounds"===b||"defaultValues"===b){var c=a.ui.rangeSlider.prototype.option.apply(this,arguments);return{min:new Date(c.min),max:new Date(c.max)}}return a.ui.rangeSlider.prototype.option.apply(this,this._toArray(arguments))},_defaultFormatter:function(a){var b=a.getMonth()+1,c=a.getDate();return""+a.getFullYear()+"-"+(10>b?"0"+b:b)+"-"+(10>c?"0"+c:c)},_getFormatter:function(){var a=this.options.formatter;return(this.options.formatter===!1||null===this.options.formatter)&&(a=this._defaultFormatter),function(a){return function(b){return a(new Date(b))}}(a)},values:function(b,c){var d=null;return d=this._isValidDate(b)&&this._isValidDate(c)?a.ui.rangeSlider.prototype.values.apply(this,[b.valueOf(),c.valueOf()]):a.ui.rangeSlider.prototype.values.apply(this,this._toArray(arguments)),{min:new Date(d.min),max:new Date(d.max)}},min:function(b){return this._isValidDate(b)?new Date(a.ui.rangeSlider.prototype.min.apply(this,[b.valueOf()])):new Date(a.ui.rangeSlider.prototype.min.apply(this))},max:function(b){return this._isValidDate(b)?new Date(a.ui.rangeSlider.prototype.max.apply(this,[b.valueOf()])):new Date(a.ui.rangeSlider.prototype.max.apply(this))},bounds:function(b,c){var d;return d=this._isValidDate(b)&&this._isValidDate(c)?a.ui.rangeSlider.prototype.bounds.apply(this,[b.valueOf(),c.valueOf()]):a.ui.rangeSlider.prototype.bounds.apply(this,this._toArray(arguments)),{min:new Date(d.min),max:new Date(d.max)}},_isValidDate:function(a){return"undefined"!=typeof a&&a instanceof Date},_toArray:function(a){return Array.prototype.slice.call(a)}})}(jQuery),function(a){"use strict";a.widget("ui.dateRangeSliderHandle",a.ui.rangeSliderHandle,{_steps:!1,_boundsValues:{},_create:function(){this._createBoundsValues(),a.ui.rangeSliderHandle.prototype._create.apply(this)},_getValueForPosition:function(a){var b=this._getRawValueForPositionAndBounds(a,this.options.bounds.min.valueOf(),this.options.bounds.max.valueOf());return this._constraintValue(new Date(b))},_setOption:function(b,c){return"step"===b?(this.options.step=c,this._createSteps(),this.update(),void 0):(a.ui.rangeSliderHandle.prototype._setOption.apply(this,[b,c]),"bounds"===b&&this._createBoundsValues(),void 0)},_createBoundsValues:function(){this._boundsValues={min:this.options.bounds.min.valueOf(),max:this.options.bounds.max.valueOf()}},_bounds:function(){return this._boundsValues},_createSteps:function(){if(this.options.step===!1||!this._isValidStep())return this._steps=!1,void 0;var a=new Date(this.options.bounds.min),b=new Date(this.options.bounds.max),c=a,d=0,e=new Date;for(this._steps=[];b>=c&&(1===d||e.valueOf()!==c.valueOf());)e=c,this._steps.push(c.valueOf()),c=this._addStep(a,d,this.options.step),d++;e.valueOf()===c.valueOf()&&(this._steps=!1)},_isValidStep:function(){return"object"==typeof this.options.step},_addStep:function(a,b,c){var d=new Date(a.valueOf());return d=this._addThing(d,"FullYear",b,c.years),d=this._addThing(d,"Month",b,c.months),d=this._addThing(d,"Date",b,7*c.weeks),d=this._addThing(d,"Date",b,c.days),d=this._addThing(d,"Hours",b,c.hours),d=this._addThing(d,"Minutes",b,c.minutes),d=this._addThing(d,"Seconds",b,c.seconds)},_addThing:function(a,b,c,d){return 0===c||0===(d||0)?a:(a["set"+b](a["get"+b]()+c*(d||0)),a)}
14572,_round:function(a){if(this._steps===!1)return a;for(var b,c,d=this.options.bounds.max.valueOf(),e=this.options.bounds.min.valueOf(),f=Math.max(0,(a-e)/(d-e)),g=Math.floor(this._steps.length*f);this._steps[g]>a;)g--;for(;g+1<this._steps.length&&this._steps[g+1]<=a;)g++;return g>=this._steps.length-1?this._steps[this._steps.length-1]:0===g?this._steps[0]:(b=this._steps[g],c=this._steps[g+1],c-a>a-b?b:c)},update:function(){this._createBoundsValues(),this._createSteps(),a.ui.rangeSliderHandle.prototype.update.apply(this)},add:function(a,b){return this._addStep(new Date(a),1,b).valueOf()},substract:function(a,b){return this._addStep(new Date(a),-1,b).valueOf()},stepsBetween:function(a,b){if(this.options.step===!1)return b-a;var c=Math.min(a,b),d=Math.max(a,b),e=0,f=!1,g=a>b;for(this.add(c,this.options.step)-c<0&&(f=!0);d>c;)f?d=this.add(d,this.options.step):c=this.add(c,this.options.step),e++;return g?-e:e},multiplyStep:function(a,b){var c={};for(var d in a)a.hasOwnProperty(d)&&(c[d]=a[d]*b);return c},stepRatio:function(){if(this.options.step===!1)return 1;var a=this._steps.length;return this.cache.parent.width/a}})}(jQuery),function(a){"use strict";var b={first:function(a){return a},next:function(a){return a+1},format:function(){},label:function(a){return Math.round(a)},stop:function(){return!1}};a.widget("ui.ruler",{options:{min:0,max:100,scales:[]},_create:function(){this.element.addClass("ui-ruler"),this._createScales()},destroy:function(){this.element.removeClass("ui-ruler"),this.element.empty()},_regenerate:function(){this.element.empty(),this._createScales()},_setOption:function(a,b){return"min"===a||"max"===a&&b!==this.options[a]?(this.options[a]=b,this._regenerate(),void 0):"scales"===a&&b instanceof Array?(this.options.scales=b,this._regenerate(),void 0):void 0},_createScales:function(){if(this.options.max!==this.options.min)for(var a=0;a<this.options.scales.length;a++)this._createScale(this.options.scales[a],a)},_createScale:function(c,d){var e=a.extend({},b,c),f=a("<div class='ui-ruler-scale' />").appendTo(this.element);f.addClass("ui-ruler-scale"+d),this._createTicks(f,e)},_createTicks:function(a,b){var c,d,e,f=b.first(this.options.min,this.options.max),g=this.options.max-this.options.min,h=!0;do c=f,f=b.next(c),d=(Math.min(f,this.options.max)-Math.max(c,this.options.min))/g,e=this._createTick(c,f,b),a.append(e),e.css("width",100*d+"%"),h&&c>this.options.min&&e.css("margin-left",100*(c-this.options.min)/g+"%"),h=!1;while(!this._stop(b,f))},_stop:function(a,b){return a.stop(b)||b>=this.options.max},_createTick:function(b,c,d){var e=a("<div class='ui-ruler-tick' style='display:inline-block' />"),f=a("<div class='ui-ruler-tick-inner' />").appendTo(e),g=a("<span class='ui-ruler-tick-label' />").appendTo(f);return g.text(d.label(b,c)),d.format(e,b,c),e}})}(jQuery); 14573 14574 14575 14576 14577 14578 14579 14580 14581 14582 14583 14584 14585 14586 14587/*! 14588 * imagesLoaded PACKAGED v3.1.4 14589 * JavaScript is all like "You images are done yet or what?" 14590 * MIT License 14591 */ 14592 14593(function(){function e(){}function t(e,t){for(var n=e.length;n--;)if(e[n].listener===t)return n;return-1}function n(e){return function(){return this[e].apply(this,arguments)}}var i=e.prototype,r=this,o=r.EventEmitter;i.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},i.flattenListeners=function(e){var t,n=[];for(t=0;e.length>t;t+=1)n.push(e[t].listener);return n},i.getListenersAsObject=function(e){var t,n=this.getListeners(e);return n instanceof Array&&(t={},t[e]=n),t||n},i.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},i.on=n("addListener"),i.addOnceListener=function(e,t){return this.addListener(e,{listener:t,once:!0})},i.once=n("addOnceListener"),i.defineEvent=function(e){return this.getListeners(e),this},i.defineEvents=function(e){for(var t=0;e.length>t;t+=1)this.defineEvent(e[t]);return this},i.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},i.off=n("removeListener"),i.addListeners=function(e,t){return this.manipulateListeners(!1,e,t)},i.removeListeners=function(e,t){return this.manipulateListeners(!0,e,t)},i.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},i.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},i.removeAllListeners=n("removeEvent"),i.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],n.once===!0&&this.removeListener(e,n.listener),o=n.listener.apply(this,t||[]),o===this._getOnceReturnValue()&&this.removeListener(e,n.listener);return this},i.trigger=n("emitEvent"),i.emit=function(e){var t=Array.prototype.slice.call(arguments,1
14593);return this.emitEvent(e,t)},i.setOnceReturnValue=function(e){return this._onceReturnValue=e,this},i._getOnceReturnValue=function(){return this.hasOwnProperty("_onceReturnValue")?this._onceReturnValue:!0},i._getEvents=function(){return this._events||(this._events={})},e.noConflict=function(){return r.EventEmitter=o,e},"function"==typeof define&&define.amd?define("eventEmitter/EventEmitter",[],function(){return e}):"object"==typeof module&&module.exports?module.exports=e:this.EventEmitter=e}).call(this),function(e){function t(t){var n=e.event;return n.target=n.target||n.srcElement||t,n}var n=document.documentElement,i=function(){};n.addEventListener?i=function(e,t,n){e.addEventListener(t,n,!1)}:n.attachEvent&&(i=function(e,n,i){e[n+i]=i.handleEvent?function(){var n=t(e);i.handleEvent.call(i,n)}:function(){var n=t(e);i.call(e,n)},e.attachEvent("on"+n,e[n+i])});var r=function(){};n.removeEventListener?r=function(e,t,n){e.removeEventListener(t,n,!1)}:n.detachEvent&&(r=function(e,t,n){e.detachEvent("on"+t,e[t+n]);try{delete e[t+n]}catch(i){e[t+n]=void 0}});var o={bind:i,unbind:r};"function"==typeof define&&define.amd?define("eventie/eventie",o):e.eventie=o}(this),function(e,t){"function"==typeof define&&define.amd?define(["eventEmitter/EventEmitter","eventie/eventie"],function(n,i){return t(e,n,i)}):"object"==typeof exports?module.exports=t(e,require("eventEmitter"),require("eventie")):e.imagesLoaded=t(e,e.EventEmitter,e.eventie)}(this,function(e,t,n){function i(e,t){for(var n in t)e[n]=t[n];return e}function r(e){return"[object Array]"===d.call(e)}function o(e){var t=[];if(r(e))t=e;else if("number"==typeof e.length)for(var n=0,i=e.length;i>n;n++)t.push(e[n]);else t.push(e);return t}function s(e,t,n){if(!(this instanceof s))return new s(e,t);"string"==typeof e&&(e=document.querySelectorAll(e)),this.elements=o(e),this.options=i({},this.options),"function"==typeof t?n=t:i(this.options,t),n&&this.on("always",n),this.getImages(),a&&(this.jqDeferred=new a.Deferred);var r=this;setTimeout(function(){r.check()})}function c(e){this.img=e}function f(e){this.src=e,v[e]=this}var a=e.jQuery,u=e.console,h=u!==void 0,d=Object.prototype.toString;s.prototype=new t,s.prototype.options={},s.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)}}},s.prototype.addImage=function(e){var t=new c(e);this.images.push(t)},s.prototype.check=function(){function e(e,r){return t.options.debug&&h&&u.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()}},s.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.jqDeferred.notify(t,e)})},s.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)}})},a&&(a.fn.imagesLoaded=function(e,t){var n=new s(this,e,t);return n.jqDeferred.promise(a(this))}),c.prototype=new t,c.prototype.check=function(){var e=v[this.img.src]||new f(this.img.src);if(e.isConfirmed)return this.confirm(e.isLoaded,"cached was confirmed"),void 0;if(this.img.complete&&void 0!==this.img.naturalWidth)return this.confirm(0!==this.img.naturalWidth,"naturalWidth"),void 0;var t=this;e.on("confirm",function(e,n){return t.confirm(e.isLoaded,n),!0}),e.check()},c.prototype.confirm=function(e,t){this.isLoaded=e,this.emit("confirm",this,t)};var v={};return f.prototype=new t,f.prototype.check=function(){if(!this.isChecked){var e=new Image;n.bind(e,"load",this),n.bind(e,"error",this),e.src=this.src,this.isChecked=!0}},f.prototype.handleEvent=function(e){var t="on"+e.type;this[t]&&this[t](e)},f.prototype.onload=function(e){this.confirm(!0,"onload"),this.unbindProxyEvents(e)},f.prototype.onerror=function(e){this.confirm(!1,"onerror"),this.unbindProxyEvents(e)},f.prototype.confirm=function(e,t){this.isConfirmed=!0,this.isLoaded=e,this.emit
14593("confirm",this,t)},f.prototype.unbindProxyEvents=function(e){n.unbind(e.target,"load",this),n.unbind(e.target,"error",this)},s}); 14594 14595 14596 14597 14598 14599 14600 14601 14602/*! 14603 * Masonry PACKAGED v3.1.5 14604 * Cascading grid layout library 14605 * http://masonry.desandro.com 14606 * MIT License 14607 * by David DeSandro 14608 */ 14609 14610!function(a){function b(){}function c(a){function c(b){b.prototype.option||(b.prototype.option=function(b){a.isPlainObject(b)&&(this.options=a.extend(!0,this.options,b))})}function e(b,c){a.fn[b]=function(e){if("string"==typeof e){for(var g=d.call(arguments,1),h=0,i=this.length;i>h;h++){var j=this[h],k=a.data(j,b);if(k)if(a.isFunction(k[e])&&"_"!==e.charAt(0)){var l=k[e].apply(k,g);if(void 0!==l)return l}else f("no such method '"+e+"' for "+b+" instance");else f("cannot call methods on "+b+" prior to initialization; attempted to call '"+e+"'")}return this}return this.each(function(){var d=a.data(this,b);d?(d.option(e),d._init()):(d=new c(this,e),a.data(this,b,d))})}}if(a){var f="undefined"==typeof console?b:function(a){console.error(a)};return a.bridget=function(a,b){c(b),e(a,b)},a.bridget}}var d=Array.prototype.slice;"function"==typeof define&&define.amd?define("jquery-bridget/jquery.bridget",["jquery"],c):c(a.jQuery)}(window),function(a){function b(b){var c=a.event;return c.target=c.target||c.srcElement||b,c}var c=document.documentElement,d=function(){};c.addEventListener?d=function(a,b,c){a.addEventListener(b,c,!1)}:c.attachEvent&&(d=function(a,c,d){a[c+d]=d.handleEvent?function(){var c=b(a);d.handleEvent.call(d,c)}:function(){var c=b(a);d.call(a,c)},a.attachEvent("on"+c,a[c+d])});var e=function(){};c.removeEventListener?e=function(a,b,c){a.removeEventListener(b,c,!1)}:c.detachEvent&&(e=function(a,b,c){a.detachEvent("on"+b,a[b+c]);try{delete a[b+c]}catch(d){a[b+c]=void 0}});var f={bind:d,unbind:e};"function"==typeof define&&define.amd?define("eventie/eventie",f):"object"==typeof exports?module.exports=f:a.eventie=f}(this),function(a){function b(a){"function"==typeof a&&(b.isReady?a():f.push(a))}function c(a){var c="readystatechange"===a.type&&"complete"!==e.readyState;if(!b.isReady&&!c){b.isReady=!0;for(var d=0,g=f.length;g>d;d++){var h=f[d];h()}}}function d(d){return d.bind(e,"DOMContentLoaded",c),d.bind(e,"readystatechange",c),d.bind(a,"load",c),b}var e=a.document,f=[];b.isReady=!1,"function"==typeof define&&define.amd?(b.isReady="function"==typeof requirejs,define("doc-ready/doc-ready",["eventie/eventie"],d)):a.docReady=d(a.eventie)}(this),function(){function a(){}function b(a,b){for(var c=a.length;c--;)if(a[c].listener===b)return c;return-1}function c(a){return function(){return this[a].apply(this,arguments)}}var d=a.prototype,e=this,f=e.EventEmitter;d.getListeners=function(a){var b,c,d=this._getEvents();if(a instanceof RegExp){b={};for(c in d)d.hasOwnProperty(c)&&a.test(c)&&(b[c]=d[c])}else b=d[a]||(d[a]=[]);return b},d.flattenListeners=function(a){var b,c=[];for(b=0;b<a.length;b+=1)c.push(a[b].listener);return c},d.getListenersAsObject=function(a){var b,c=this.getListeners(a);return c instanceof Array&&(b={},b[a]=c),b||c},d.addListener=function(a,c){var d,e=this.getListenersAsObject(a),f="object"==typeof c;for(d in e)e.hasOwnProperty(d)&&-1===b(e[d],c)&&e[d].push(f?c:{listener:c,once:!1});return this},d.on=c("addListener"),d.addOnceListener=function(a,b){return this.addListener(a,{listener:b,once:!0})},d.once=c("addOnceListener"),d.defineEvent=function(a){return this.getListeners(a),this},d.defineEvents=function(a){for(var b=0;b<a.length;b+=1)this.defineEvent(a[b]);return this},d.removeListener=function(a,c){var d,e,f=this.getListenersAsObject(a);for(e in f)f.hasOwnProperty(e)&&(d=b(f[e],c),-1!==d&&f[e].splice(d,1));return this},d.off=c("removeListener"),d.addListeners=function(a,b){return this.manipulateListeners(!1,a,b)},d.removeListeners=function(a,b){return this.manipulateListeners(!0,a,b)},d.manipulateListeners=function(a,b,c){var d,e,f=a?this.removeListener:this.addListener,g=a?this.removeListeners:this.addListeners;if("object"!=typeof b||b instanceof RegExp)for(d=c.length;d--;)f.call(this,b,c[d]);
14610else for(d in b)b.hasOwnProperty(d)&&(e=b[d])&&("function"==typeof e?f.call(this,d,e):g.call(this,d,e));return this},d.removeEvent=function(a){var b,c=typeof a,d=this._getEvents();if("string"===c)delete d[a];else if(a instanceof RegExp)for(b in d)d.hasOwnProperty(b)&&a.test(b)&&delete d[b];else delete this._events;return this},d.removeAllListeners=c("removeEvent"),d.emitEvent=function(a,b){var c,d,e,f,g=this.getListenersAsObject(a);for(e in g)if(g.hasOwnProperty(e))for(d=g[e].length;d--;)c=g[e][d],c.once===!0&&this.removeListener(a,c.listener),f=c.listener.apply(this,b||[]),f===this._getOnceReturnValue()&&this.removeListener(a,c.listener);return this},d.trigger=c("emitEvent"),d.emit=function(a){var b=Array.prototype.slice.call(arguments,1);return this.emitEvent(a,b)},d.setOnceReturnValue=function(a){return this._onceReturnValue=a,this},d._getOnceReturnValue=function(){return this.hasOwnProperty("_onceReturnValue")?this._onceReturnValue:!0},d._getEvents=function(){return this._events||(this._events={})},a.noConflict=function(){return e.EventEmitter=f,a},"function"==typeof define&&define.amd?define("eventEmitter/EventEmitter",[],function(){return a}):"object"==typeof module&&module.exports?module.exports=a:this.EventEmitter=a}.call(this),function(a){function b(a){if(a){if("string"==typeof d[a])return a;a=a.charAt(0).toUpperCase()+a.slice(1);for(var b,e=0,f=c.length;f>e;e++)if(b=c[e]+a,"string"==typeof d[b])return b}}var c="Webkit Moz ms Ms O".split(" "),d=document.documentElement.style;"function"==typeof define&&define.amd?define("get-style-property/get-style-property",[],function(){return b}):"object"==typeof exports?module.exports=b:a.getStyleProperty=b}(window),function(a){function b(a){var b=parseFloat(a),c=-1===a.indexOf("%")&&!isNaN(b);return c&&b}function c(){for(var a={width:0,height:0,innerWidth:0,innerHeight:0,outerWidth:0,outerHeight:0},b=0,c=g.length;c>b;b++){var d=g[b];a[d]=0}return a}function d(a){function d(a){if("string"==typeof a&&(a=document.querySelector(a)),a&&"object"==typeof a&&a.nodeType){var d=f(a);if("none"===d.display)return c();var e={};e.width=a.offsetWidth,e.height=a.offsetHeight;for(var k=e.isBorderBox=!(!j||!d[j]||"border-box"!==d[j]),l=0,m=g.length;m>l;l++){var n=g[l],o=d[n];o=h(a,o);var p=parseFloat(o);e[n]=isNaN(p)?0:p}var q=e.paddingLeft+e.paddingRight,r=e.paddingTop+e.paddingBottom,s=e.marginLeft+e.marginRight,t=e.marginTop+e.marginBottom,u=e.borderLeftWidth+e.borderRightWidth,v=e.borderTopWidth+e.borderBottomWidth,w=k&&i,x=b(d.width);x!==!1&&(e.width=x+(w?0:q+u));var y=b(d.height);return y!==!1&&(e.height=y+(w?0:r+v)),e.innerWidth=e.width-(q+u),e.innerHeight=e.height-(r+v),e.outerWidth=e.width+s,e.outerHeight=e.height+t,e}}function h(a,b){if(e||-1===b.indexOf("%"))return b;var c=a.style,d=c.left,f=a.runtimeStyle,g=f&&f.left;return g&&(f.left=a.currentStyle.left),c.left=b,b=c.pixelLeft,c.left=d,g&&(f.left=g),b}var i,j=a("boxSizing");return function(){if(j){var a=document.createElement("div");a.style.width="200px",a.style.padding="1px 2px 3px 4px",a.style.borderStyle="solid",a.style.borderWidth="1px 2px 3px 4px",a.style[j]="border-box";var c=document.body||document.documentElement;c.appendChild(a);var d=f(a);i=200===b(d.width),c.removeChild(a)}}(),d}var e=a.getComputedStyle,f=e?function(a){return e(a,null)}:function(a){return a.currentStyle},g=["paddingLeft","paddingRight","paddingTop","paddingBottom","marginLeft","marginRight","marginTop","marginBottom","borderLeftWidth","borderRightWidth","borderTopWidth","borderBottomWidth"];"function"==typeof define&&define.amd?define("get-size/get-size",["get-style-property/get-style-property"],d):"object"==typeof exports?module.exports=d(require("get-style-property")):a.getSize=d(a.getStyleProperty)}(window),function(a,b){function c(a,b){return a[h](b)}function d(a){if(!a.parentNode){var b=document.createDocumentFragment();b.appendChild(a)}}function e(a,b){d(a);for(var c=a.parentNode.querySelectorAll(b),e=0,f=c.length;f>e;e++)if(c[e]===a)return!0;return!1}function f(a,b){return d(a),c(a,b)}var g,h=function(){if(b.matchesSelector)return"matchesSelector";for(var a=["webkit","moz","ms","o"],c=0,d=a.length;d>c;c++){var e=a[c],f=e+"MatchesSelector";if(b[f])return f}}();if(h){var i=document.createElement("div"),j=c(i,"div");g=j?c:f}else g=e;"function"==typeof define&&define.amd?define("matches-selector/matches-selector",[],function(){return g}):window.matchesSelector=g}(this,Element.prototype),function(a){function b(a,b){for(var c in b)a[c]=b[c];return a}function c(a){for(var b in a)return!1;return b=null,!0}function d(a){return a.replace(/([A-Z])/g,function(a){return"-"+a.toLowerCase()})}function e(a,e,f){function h(a,b){a&&(this.element=a,this.layout=b,this.position={x:0,y:0},this._create())}var i=f("transition"),j=f("transform"),k=i&&j,l=!!f("perspective"),m={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"otransitionend",transition:"transitionend"}[i],n=["transform","transition","transitionDuration","transitionProperty"],o=function(){for(var a={},b=0,c=n.length;c>b;b++){var d=n[b],e=f(d);e&&e!==d&&(a[d]=e)}return a}();b(h.prototype,a.prototype),h.prototype._create=function(){this._transn={ingProperties:{},clean:{},onEnd:{}},this.css({position:"absolute"})},h.prototype.handleEvent=function(a){var b="on"+a.type;this[b]&&this[b](a)},h.prototype.getSize=function(){this.size=e(this.element)},h.prototype.css=function(a){var b=this.element.style;for(var c in a){var d=o[c]||c;b[d]=a[c]}},h.prototype.getPosition=function(){var a=g(this.element),b=this.layout.options,c=b.isOriginLeft,d=b.isOriginTop,e=parseInt(a[c?"left":"right"],10),f=parseInt(a[d?"top":"bottom"],10);e=isNaN(e)?0:e,f=isNaN(f)?0:f;var h=this.layout.size;e-=c?h.paddingLeft:h.paddingRight,f-=d?h.paddingTop:h.paddingBottom,this.position.x=e,this.position.y=f},h.prototype.layoutPosition=function(){var a=this.layout.size,b=this.layout.options,c={};b.isOriginLeft?(c.left=this.position.x+a.paddingLeft+"px",c.right=""):(c.right=this.position.x+a.paddingRight+"px",c.left=""),b.isOriginTop?(c.top=this.position.y+a.paddingTop+"px",c.bottom=""):(c.bottom=this.position.y+a.paddingBottom+"px",c.top=""),this.css(c),this.emitEvent("layout",[this])};var p=l?function(a,b){return"translate3d("+a+"px, "+b+"px, 0)"}:function(a,b){return"translate("+a+"px, "+b+"px)"};h.prototype._transitionTo=function(a,b){this.getPosition();var c=this.position.x,d=this.position.y,e=parseInt(a,10),f=parseInt(b,10),g=e===this.position.x&&f===this.position.y;if(this.setPosition(a,b),g&&!this.isTransitioning)return void this.layoutPosition();var h=a-c,i=b-d,j={},k=this.layout.options;h=k.isOriginLeft?h:-h,i=k.isOriginTop?i:-i,j.transform=p(h,i),this.transition({to:j,onTransitionEnd:{transform:this.layoutPosition},isCleaning:!0})},h.prototype.goTo=function(a,b){this.setPosition(a,b),this.layoutPosition()}
14610,h.prototype.moveTo=k?h.prototype._transitionTo:h.prototype.goTo,h.prototype.setPosition=function(a,b){this.position.x=parseInt(a,10),this.position.y=parseInt(b,10)},h.prototype._nonTransition=function(a){this.css(a.to),a.isCleaning&&this._removeStyles(a.to);for(var b in a.onTransitionEnd)a.onTransitionEnd[b].call(this)},h.prototype._transition=function(a){if(!parseFloat(this.layout.options.transitionDuration))return void this._nonTransition(a);var b=this._transn;for(var c in a.onTransitionEnd)b.onEnd[c]=a.onTransitionEnd[c];for(c in a.to)b.ingProperties[c]=!0,a.isCleaning&&(b.clean[c]=!0);if(a.from){this.css(a.from);var d=this.element.offsetHeight;d=null}this.enableTransition(a.to),this.css(a.to),this.isTransitioning=!0};var q=j&&d(j)+",opacity";h.prototype.enableTransition=function(){this.isTransitioning||(this.css({transitionProperty:q,transitionDuration:this.layout.options.transitionDuration}),this.element.addEventListener(m,this,!1))},h.prototype.transition=h.prototype[i?"_transition":"_nonTransition"],h.prototype.onwebkitTransitionEnd=function(a){this.ontransitionend(a)},h.prototype.onotransitionend=function(a){this.ontransitionend(a)};var r={"-webkit-transform":"transform","-moz-transform":"transform","-o-transform":"transform"};h.prototype.ontransitionend=function(a){if(a.target===this.element){var b=this._transn,d=r[a.propertyName]||a.propertyName;if(delete b.ingProperties[d],c(b.ingProperties)&&this.disableTransition(),d in b.clean&&(this.element.style[a.propertyName]="",delete b.clean[d]),d in b.onEnd){var e=b.onEnd[d];e.call(this),delete b.onEnd[d]}this.emitEvent("transitionEnd",[this])}},h.prototype.disableTransition=function(){this.removeTransitionStyles(),this.element.removeEventListener(m,this,!1),this.isTransitioning=!1},h.prototype._removeStyles=function(a){var b={};for(var c in a)b[c]="";this.css(b)};var s={transitionProperty:"",transitionDuration:""};return h.prototype.removeTransitionStyles=function(){this.css(s)},h.prototype.removeElem=function(){this.element.parentNode.removeChild(this.element),this.emitEvent("remove",[this])},h.prototype.remove=function(){if(!i||!parseFloat(this.layout.options.transitionDuration))return void this.removeElem();var a=this;this.on("transitionEnd",function(){return a.removeElem(),!0}),this.hide()},h.prototype.reveal=function(){delete this.isHidden,this.css({display:""});var a=this.layout.options;this.transition({from:a.hiddenStyle,to:a.visibleStyle,isCleaning:!0})},h.prototype.hide=function(){this.isHidden=!0,this.css({display:""});var a=this.layout.options;this.transition({from:a.visibleStyle,to:a.hiddenStyle,isCleaning:!0,onTransitionEnd:{opacity:function(){this.isHidden&&this.css({display:"none"})}}})},h.prototype.destroy=function(){this.css({position:"",left:"",right:"",top:"",bottom:"",transition:"",transform:""})},h}var f=a.getComputedStyle,g=f?function(a){return f(a,null)}:function(a){return a.currentStyle};"function"==typeof define&&define.amd?define("outlayer/item",["eventEmitter/EventEmitter","get-size/get-size","get-style-property/get-style-property"],e):(a.Outlayer={},a.Outlayer.Item=e(a.EventEmitter,a.getSize,a.getStyleProperty))}(window),function(a){function b(a,b){for(var c in b)a[c]=b[c];return a}function c(a){return"[object Array]"===l.call(a)}function d(a){var b=[];if(c(a))b=a;else if(a&&"number"==typeof a.length)for(var d=0,e=a.length;e>d;d++)b.push(a[d]);else b.push(a);return b}function e(a,b){var c=n(b,a);-1!==c&&b.splice(c,1)}function f(a){return a.replace(/(.)([A-Z])/g,function(a,b,c){return b+"-"+c}).toLowerCase()}function g(c,g,l,n,o,p){function q(a,c){if("string"==typeof a&&(a=h.querySelector(a)),!a||!m(a))return void(i&&i.error("Bad "+this.constructor.namespace+" element: "+a));this.element=a,this.options=b({},this.constructor.defaults),this.option(c);var d=++r;this.element.outlayerGUID=d,s[d]=this,this._create(),this.options.isInitLayout&&this.layout()}var r=0,s={};return q.namespace="outlayer",q.Item=p,q.defaults={containerStyle:{position:"relative"},isInitLayout:!0,isOriginLeft:!0,isOriginTop:!0,isResizeBound:!0,isResizingContainer:!0,transitionDuration:"0.4s",hiddenStyle:{opacity:0,transform:"scale(0.001)"},visibleStyle:{opacity:1,transform:"scale(1)"}},b(q.prototype,l.prototype),q.prototype.option=function(a){b(this.options,a)},q.prototype._create=function(){this.reloadItems(),this.stamps=[],this.stamp(this.options.stamp),b(this.element.style,this.options.containerStyle),this.options.isResizeBound&&this.bindResize()},q.prototype.reloadItems=function(){this.items=this._itemize(this.element.children)},q.prototype._itemize=function(a){for(var b=this._filterFindItemElements(a),c=this.constructor.Item,d=[],e=0,f=b.length;f>e;e++){var g=b[e],h=new c(g,this);d.push(h)}return d},q.prototype._filterFindItemElements=function(a){a=d(a);for(var b=this.options.itemSelector,c=[],e=0,f=a.length;f>e;e++){var g=a[e];if(m(g))if(b){o(g,b)&&c.push(g);for(var h=g.querySelectorAll(b),i=0,j=h.length;j>i;i++)c.push(h[i])}else c.push(g)}return c},q.prototype.getItemElements=function(){for(var a=[],b=0,c=this.items.length;c>b;b++)a.push(this.items[b].element);return a},q.prototype.layout=function(){this._resetLayout(),this._manageStamps();var a=void 0!==this.options.isLayoutInstant?this.options.isLayoutInstant:!this._isLayoutInited;this.layoutItems(this.items,a),this._isLayoutInited=!0},q.prototype._init=q.prototype.layout,q.prototype._resetLayout=function(){this.get
14610Size()},q.prototype.getSize=function(){this.size=n(this.element)},q.prototype._getMeasurement=function(a,b){var c,d=this.options[a];d?("string"==typeof d?c=this.element.querySelector(d):m(d)&&(c=d),this[a]=c?n(c)[b]:d):this[a]=0},q.prototype.layoutItems=function(a,b){a=this._getItemsForLayout(a),this._layoutItems(a,b),this._postLayout()},q.prototype._getItemsForLayout=function(a){for(var b=[],c=0,d=a.length;d>c;c++){var e=a[c];e.isIgnored||b.push(e)}return b},q.prototype._layoutItems=function(a,b){function c(){d.emitEvent("layoutComplete",[d,a])}var d=this;if(!a||!a.length)return void c();this._itemsOn(a,"layout",c);for(var e=[],f=0,g=a.length;g>f;f++){var h=a[f],i=this._getItemLayoutPosition(h);i.item=h,i.isInstant=b||h.isLayoutInstant,e.push(i)}this._processLayoutQueue(e)},q.prototype._getItemLayoutPosition=function(){return{x:0,y:0}},q.prototype._processLayoutQueue=function(a){for(var b=0,c=a.length;c>b;b++){var d=a[b];this._positionItem(d.item,d.x,d.y,d.isInstant)}},q.prototype._positionItem=function(a,b,c,d){d?a.goTo(b,c):a.moveTo(b,c)},q.prototype._postLayout=function(){this.resizeContainer()},q.prototype.resizeContainer=function(){if(this.options.isResizingContainer){var a=this._getContainerSize();a&&(this._setContainerMeasure(a.width,!0),this._setContainerMeasure(a.height,!1))}},q.prototype._getContainerSize=k,q.prototype._setContainerMeasure=function(a,b){if(void 0!==a){var c=this.size;c.isBorderBox&&(a+=b?c.paddingLeft+c.paddingRight+c.borderLeftWidth+c.borderRightWidth:c.paddingBottom+c.paddingTop+c.borderTopWidth+c.borderBottomWidth),a=Math.max(a,0),this.element.style[b?"width":"height"]=a+"px"}},q.prototype._itemsOn=function(a,b,c){function d(){return e++,e===f&&c.call(g),!0}for(var e=0,f=a.length,g=this,h=0,i=a.length;i>h;h++){var j=a[h];j.on(b,d)}},q.prototype.ignore=function(a){var b=this.getItem(a);b&&(b.isIgnored=!0)},q.prototype.unignore=function(a){var b=this.getItem(a);b&&delete b.isIgnored},q.prototype.stamp=function(a){if(a=this._find(a)){this.stamps=this.stamps.concat(a);for(var b=0,c=a.length;c>b;b++){var d=a[b];this.ignore(d)}}},q.prototype.unstamp=function(a){if(a=this._find(a))for(var b=0,c=a.length;c>b;b++){var d=a[b];e(d,this.stamps),this.unignore(d)}},q.prototype._find=function(a){return a?("string"==typeof a&&(a=this.element.querySelectorAll(a)),a=d(a)):void 0},q.prototype._manageStamps=function(){if(this.stamps&&this.stamps.length){this._getBoundingRect();for(var a=0,b=this.stamps.length;b>a;a++){var c=this.stamps[a];this._manageStamp(c)}}},q.prototype._getBoundingRect=function(){var a=this.element.getBoundingClientRect(),b=this.size;this._boundingRect={left:a.left+b.paddingLeft+b.borderLeftWidth,top:a.top+b.paddingTop+b.borderTopWidth,right:a.right-(b.paddingRight+b.borderRightWidth),bottom:a.bottom-(b.paddingBottom+b.borderBottomWidth)}},q.prototype._manageStamp=k,q.prototype._getElementOffset=function(a){var b=a.getBoundingClientRect(),c=this._boundingRect,d=n(a),e={left:b.left-c.left-d.marginLeft,top:b.top-c.top-d.marginTop,right:c.right-b.right-d.marginRight,bottom:c.bottom-b.bottom-d.marginBottom};return e},q.prototype.handleEvent=function(a){var b="on"+a.type;this[b]&&this[b](a)},q.prototype.bindResize=function(){this.isResizeBound||(c.bind(a,"resize",this),this.isResizeBound=!0)},q.prototype.unbindResize=function(){this.isResizeBound&&c.unbind(a,"resize",this),this.isResizeBound=!1},q.prototype.onresize=function(){function a(){b.resize(),delete b.resizeTimeout}this.resizeTimeout&&clearTimeout(this.resizeTimeout);var b=this;this.resizeTimeout=setTimeout(a,100)},q.prototype.resize=function(){this.isResizeBound&&this.needsResizeLayout()&&this.layout()},q.prototype.needsResizeLayout=function(){var a=n(this.element),b=this.size&&a;return b&&a.innerWidth!==this.size.innerWidth},q.prototype.addItems=function(a){var b=this._itemize(a);return b.length&&(this.items=this.items.concat(b)),b},q.prototype.appended=function(a){var b=this.addItems(a);b.length&&(this.layoutItems(b,!0),this.reveal(b))},q.prototype.prepended=function(a){var b=this._itemize(a);if(b.length){var c=this.items.slice(0);this.items=b.concat(c),this._resetLayout(),this._manageStamps(),this.layoutItems(b,!0),this.reveal(b),this.layoutItems(c)}},q.prototype.reveal=function(a){var b=a&&a.length;if(b)for(var c=0;b>c;c++){var d=a[c];d.reveal()}},q.prototype.hide=function(a){var b=a&&a.length;if(b)for(var c=0;b>c;c++){var d=a[c];d.hide()}},q.prototype.getItem=function(a){for(var b=0,c=this.items.length;c>b;b++){var d=this.items[b];if(d.element===a)return d}}
14610,q.prototype.getItems=function(a){if(a&&a.length){for(var b=[],c=0,d=a.length;d>c;c++){var e=a[c],f=this.getItem(e);f&&b.push(f)}return b}},q.prototype.remove=function(a){a=d(a);var b=this.getItems(a);if(b&&b.length){this._itemsOn(b,"remove",function(){this.emitEvent("removeComplete",[this,b])});for(var c=0,f=b.length;f>c;c++){var g=b[c];g.remove(),e(g,this.items)}}},q.prototype.destroy=function(){var a=this.element.style;a.height="",a.position="",a.width="";for(var b=0,c=this.items.length;c>b;b++){var d=this.items[b];d.destroy()}this.unbindResize(),delete this.element.outlayerGUID,j&&j.removeData(this.element,this.constructor.namespace)},q.data=function(a){var b=a&&a.outlayerGUID;return b&&s[b]},q.create=function(a,c){function d(){q.apply(this,arguments)}return Object.create?d.prototype=Object.create(q.prototype):b(d.prototype,q.prototype),d.prototype.constructor=d,d.defaults=b({},q.defaults),b(d.defaults,c),d.prototype.settings={},d.namespace=a,d.data=q.data,d.Item=function(){p.apply(this,arguments)},d.Item.prototype=new p,g(function(){for(var b=f(a),c=h.querySelectorAll(".js-"+b),e="data-"+b+"-options",g=0,k=c.length;k>g;g++){var l,m=c[g],n=m.getAttribute(e);try{l=n&&JSON.parse(n)}catch(o){i&&i.error("Error parsing "+e+" on "+m.nodeName.toLowerCase()+(m.id?"#"+m.id:"")+": "+o);continue}var p=new d(m,l);j&&j.data(m,a,p)}}),j&&j.bridget&&j.bridget(a,d),d},q.Item=p,q}var h=a.document,i=a.console,j=a.jQuery,k=function(){},l=Object.prototype.toString,m="object"==typeof HTMLElement?function(a){return a instanceof HTMLElement}:function(a){return a&&"object"==typeof a&&1===a.nodeType&&"string"==typeof a.nodeName},n=Array.prototype.indexOf?function(a,b){return a.indexOf(b)}:function(a,b){for(var c=0,d=a.length;d>c;c++)if(a[c]===b)return c;return-1};"function"==typeof define&&define.amd?define("outlayer/outlayer",["eventie/eventie","doc-ready/doc-ready","eventEmitter/EventEmitter","get-size/get-size","matches-selector/matches-selector","./item"],g):a.Outlayer=g(a.eventie,a.docReady,a.EventEmitter,a.getSize,a.matchesSelector,a.Outlayer.Item)}(window),function(a){function b(a,b){var d=a.create("masonry");return d.prototype._resetLayout=function(){this.getSize(),this._getMeasurement("columnWidth","outerWidth"),this._getMeasurement("gutter","outerWidth"),this.measureColumns();var a=this.cols;for(this.colYs=[];a--;)this.colYs.push(0);this.maxY=0},d.prototype.measureColumns=function(){if(this.getContainerWidth(),!this.columnWidth){var a=this.items[0],c=a&&a.element;this.columnWidth=c&&b(c).outerWidth||this.containerWidth}this.columnWidth+=this.gutter,this.cols=Math.floor((this.containerWidth+this.gutter)/this.columnWidth),this.cols=Math.max(this.cols,1)},d.prototype.getContainerWidth=function(){var a=this.options.isFitWidth?this.element.parentNode:this.element,c=b(a);this.containerWidth=c&&c.innerWidth},d.prototype._getItemLayoutPosition=function(a){a.getSize();var b=a.size.outerWidth%this.columnWidth,d=b&&1>b?"round":"ceil",e=Math[d](a.size.outerWidth/this.columnWidth);e=Math.min(e,this.cols);for(var f=this._getColGroup(e),g=Math.min.apply(Math,f),h=c(f,g),i={x:this.columnWidth*h,y:g},j=g+a.size.outerHeight,k=this.cols+1-f.length,l=0;k>l;l++)this.colYs[h+l]=j;return i},d.prototype._getColGroup=function(a){if(2>a)return this.colYs;for(var b=[],c=this.cols+1-a,d=0;c>d;d++){var e=this.colYs.slice(d,d+a);b[d]=Math.max.apply(Math,e)}return b},d.prototype._manageStamp=function(a){var c=b(a),d=this._getElementOffset(a),e=this.options.isOriginLeft?d.left:d.right,f=e+c.outerWidth,g=Math.floor(e/this.columnWidth);g=Math.max(0,g);var h=Math.floor(f/this.columnWidth);h-=f%this.columnWidth?0:1,h=Math.min(this.cols-1,h);for(var i=(this.options.isOriginTop?d.top:d.bottom)+c.outerHeight,j=g;h>=j;j++)this.colYs[j]=Math.max(i,this.colYs[j])},d.prototype._getContainerSize=function(){this.maxY=Math.max.apply(Math,this.colYs);var a={height:this.maxY};return this.options.isFitWidth&&(a.width=this._getContainerFitWidth()),a},d.prototype._getContainerFitWidth=function(){for(var a=0,b=this.cols;--b&&0===this.colYs[b];)a++;return(this.cols-a)*this.columnWidth-this.gutter},d.prototype.needsResizeLayout=function(){var a=this.containerWidth;return this.getContainerWidth(),a!==this.containerWidth},d}var c=Array.prototype.indexOf?function(a,b){return a.indexOf(b)}:function(a,b){for(var c=0,d=a.length;d>c;c++){var e=a[c];if(e===b)return c}return-1};"function"==typeof define&&define.amd?define(["outlayer/outlayer","get-size/get-size"],b):a.Masonry=b(a.Outlayer,a.getSize)}(window); 14611 14612 14613 14614 14615 14616 14617 14618 14619 14620 14621 14622 14623 14624 14625 14626 14627 14628 14629 14630 14631 14632 14633 14634 14635 14636 14637 14638 14639 14640 14641 14642 14643 14644 14645 14646 14647 14648 14649 14650 14651 14652 14653 14654 14655 14656 14657 14658 14659 14660 14661 14662 14663 14664/*! iCheck v1.0.2 by Damir Sultanov, http://git.io/arlzeA, MIT Licensed */ 14665(function(f){function A(a,b,d){var c=a[0],g=/er/.test(d)?_indeterminate:/bl/.test(d)?n:k,e=d==_update?{checked:c[k],disabled:c[n],indeterminate:"true"==a.attr(_indeterminate)||"false"==a.attr(_determinate)}:c[g];if(/^(ch|di|in)/.test(d)&&!e)x(a,g);else if(/^(un|en|de)/.test(d)&&e)q(a,g);else if(d==_update)for(var f in e)e[f]?x(a,f,!0):q(a,f,!0);else if(!b||"toggle"==d){if(!b)a[_callback]("ifClicked");e?c[_type]!==r&&q(a,g):x(a,g)}}function x(a,b,d){var c=a[0],g=a.parent(),e=b==k,u=b==_indeterminate, 14666v=b==n,s=u?_determinate:e?y:"enabled",F=l(a,s+t(c[_type])),B=l(a,b+t
vendor: 5,391 bytes, lines 14666-14696
14666(c[_type]));if(!0!==c[b]){if(!d&&b==k&&c[_type]==r&&c.name){var w=a.closest("form"),p='input[name="'+c.name+'"]',p=w.length?w.find(p):f(p);p.each(function(){this!==c&&f(this).data(m)&&q(f(this),b)})}u?(c[b]=!0,c[k]&&q(a,k,"force")):(d||(c[b]=!0),e&&c[_indeterminate]&&q(a,_indeterminate,!1));D(a,e,b,d)}c[n]&&l(a,_cursor,!0)&&g.find("."+C).css(_cursor,"default");g[_add](B||l(a,b)||"");g.attr("role")&&!u&&g.attr("aria-"+(v?n:k),"true"); 14667g[_remove](F||l(a,s)||"")}function q(a,b,d){var c=a[0],g=a.parent(),e=b==k,f=b==_indeterminate,m=b==n,s=f?_determinate:e?y:"enabled",q=l(a,s+t(c[_type])),r=l(a,b+t(c[_type]));if(!1!==c[b]){if(f||!d||"force"==d)c[b]=!1;D(a,e,s,d)}!c[n]&&l(a,_cursor,!0)&&g.find("."+C).css(_cursor,"pointer");g[_remove](r||l(a,b)||"");g.attr("role")&&!f&&g.attr("aria-"+(m?n:k),"false");g[_add](q||l(a,s)||"")}function E(a,b){if(a.data(m)){a.parent().html(a.attr("style",a.data(m).s||""));if(b)a[_callback](b);a.off(".i").unwrap(); 14668f(_label+'[for="'+a[0].id+'"]').add(a.closest(_label)).off(".i")}}function l(a,b,f){if(a.data(m))return a.data(m).o[b+(f?"":"Class")]}function t(a){return a.charAt(0).toUpperCase()+a.slice(1)}function D(a,b,f,c){if(!c){if(b)a[_callback]("ifToggled");a[_callback]("ifChanged")[_callback]("if"+t(f))}}var m="iCheck",C=m+"-helper",r="radio",k="checked",y="un"+k,n="disabled";_determinate="determinate";_indeterminate="in"+_determinate;_update="update";_type="type";_click="click";_touch="touchbegin.i touchend.i"; 14669_add="addClass";_remove="removeClass";_callback="trigger";_label="label";_cursor="cursor";_mobile=/ipad|iphone|ipod|android|blackberry|windows phone|opera mini|silk/i.test(navigator.userAgent);f.fn[m]=function(a,b){var d='input[type="checkbox"], input[type="'+r+'"]',c=f(),g=function(a){a.each(function(){var a=f(this);c=a.is(d)?c.add(a):c.add(a.find(d))})};if(/^(check|uncheck|toggle|indeterminate|determinate|disable|enable|update|destroy)$/i.test(a))return a=a.toLowerCase(),g(this),c.each(function(){var c= 14670f(this);"destroy"==a?E(c,"ifDestroyed"):A(c,!0,a);f.isFunction(b)&&b()});if("object"!=typeof a&&a)return this;var e=f.extend({checkedClass:k,disabledClass:n,indeterminateClass:_indeterminate,labelHover:!0},a),l=e.handle,v=e.hoverClass||"hover",s=e.focusClass||"focus",t=e.activeClass||"active",B=!!e.labelHover,w=e.labelHoverClass||"hover",p=(""+e.increaseArea).replace("%","")|0;if("checkbox"==l||l==r)d='input[type="'+l+'"]';-50>p&&(p=-50);g(this);return c.each(function(){var a=f(this);E(a);var c=this, 14671b=c.id,g=-p+"%",d=100+2*p+"%",d={position:"absolute",top:g,left:g,display:"block",width:d,height:d,margin:0,padding:0,background:"#fff",border:0,opacity:0},g=_mobile?{position:"absolute",visibility:"hidden"}:p?d:{position:"absolute",opacity:0},l="checkbox"==c[_type]?e.checkboxClass||"icheckbox":e.radioClass||"i"+r,z=f(_label+'[for="'+b+'"]').add(a.closest(_label)),u=!!e.aria,y=m+"-"+Math.random().toString(36).substr(2,6),h='<div class="'+l+'" '+(u?'role="'+c[_type]+'" ':"");u&&z.each(function(){h+= 14672'aria-labelledby="';this.id?h+=this.id:(this.id=y,h+=y);h+='"'});h=a.wrap(h+"/>")[_callback]("ifCreated").parent().append(e.insert);d=f('<ins class="'+C+'"/>').css(d).appendTo(h);a.data(m,{o:e,s:a.attr("style")}).css(g);e.inheritClass&&h[_add](c.className||"");e.inheritID&&b&&h.attr("id",m+"-"+b);"static"==h.css("position")&&h.css("position","relative");A(a,!0,_update);if(z.length)z.on(_click+".i mouseover.i mouseout.i "+_touch,function(b){var d=b[_type],e=f(this);if(!c[n]){if(d==_click){if(f(b.target).is("a"))return; 14673A(a,!1,!0)}else B&&(/ut|nd/.test(d)?(h[_remove](v),e[_remove](w)):(h[_add](v),e[_add](w)));if(_mobile)b.stopPropagation();else return!1}});a.on(_click+".i focus.i blur.i keyup.i keydown.i keypress.i",function(b){var d=b[_type];b=b.keyCode;if(d==_click)return!1;if("keydown"==d&&32==b)return c[_type]==r&&c[k]||(c[k]?q(a,k):x(a,k)),!1;if("keyup"==d&&c[_type]==r)!c[k]&&x(a,k);else if(/us|ur/.test(d))h["blur"==d?_remove:_add](s)});d.on(_click+" mousedown mouseup mouseover mouseout "+_touch,function(b){var d= 14674b[_type],e=/wn|up/.test(d)?t:v;if(!c[n]){if(d==_click)A(a,!1,!0);else{if(/wn|er|in/.test(d))h[_add](e);else h[_remove](e+" "+t);if(z.length&&B&&e==v)z[/ut|nd/.test(d)?_remove:_add](w)}if(_mobile)b.stopPropagation();else return!1}})})}})(window.jQuery||window.Zepto); 14675 14676 14677 14678 14679 14680 14681 14682 14683 14684 14685 14686 14687/** 14688 * BxSlider v4.1.2 - Fully loaded, responsive content slider 14689 * http://bxslider.com 14690 * 14691 * Copyright 2014, Steven Wanderski - http://stevenwanderski.com - http://bxcreative.com 14692 * Written while drinking Belgian ales and listening to jazz 14693 * 14694 * Released under the MIT license - http://opensource.org/licenses/MIT 14695 */ 14696!function(t){var e={},s={mode:"horizontal",slideSelector:"",infiniteLoop:!0,hideControlOnEnd:!1,speed:500,easing:null,slideMargin:0,startSlide:0,randomStart:!1,captions:!1,ticker:!1,tickerHover:!1,adaptiveHeight:!1,adaptiveHeightSpeed:500,video:!1,useCSS:!0,preloadImages:"visible",responsive:!0,slideZIndex:50,touchEnabled:!0,swipeThreshold:50,oneToOneTouch:!0,preventDefaultSwipeX:!0,preventDefaultSwipeY:!1,pager:!0,pagerType:"full",pagerShortSeparator:" / ",pagerSelector:null,buildPager:null,pagerCustom:null,controls:!0,nextText:"Next",prevText:"Prev",nextSelector:null,prevSelector:null,autoControls:!1,startText:"Start",stopText:"Stop",autoControlsCombine:!1,autoControlsSelector:null,auto:!1,pause:4e3,autoStart:!0,autoDirection:"next",autoHover:!1,autoDelay:0,minSli
14696des:1,maxSlides:1,moveSlides:0,slideWidth:0,onSliderLoad:function(){},onSlideBefore:function(){},onSlideAfter:function(){},onSlideNext:function(){},onSlidePrev:function(){},onSliderResize:function(){}};t.fn.bxSlider=function(n){if(0==this.length)return this;if(this.length>1)return this.each(function(){t(this).bxSlider(n)}),this;var o={},r=this;e.el=this;var a=t(window).width(),l=t(window).height(),d=function(){o.settings=t.extend({},s,n),o.settings.slideWidth=parseInt(o.settings.slideWidth),o.children=r.children(o.settings.slideSelector),o.children.length<o.settings.minSlides&&(o.settings.minSlides=o.children.length),o.children.length<o.settings.maxSlides&&(o.settings.maxSlides=o.children.length),o.settings.randomStart&&(o.settings.startSlide=Math.floor(Math.random()*o.children.length)),o.active={index:o.settings.startSlide},o.carousel=o.settings.minSlides>1||o.settings.maxSlides>1,o.carousel&&(o.settings.preloadImages="all"),o.minThreshold=o.settings.minSlides*o.settings.slideWidth+(o.settings.minSlides-1)*o.settings.slideMargin,o.maxThreshold=o.settings.maxSlides*o.settings.slideWidth+(o.settings.maxSlides-1)*o.settings.slideMargin,o.working=!1,o.controls={},o.interval=null,o.animProp="vertical"==o.settings.mode?"top":"left",o.usingCSS=o.settings.useCSS&&"fade"!=o.settings.mode&&function(){var t=document.createElement("div"),e=["WebkitPerspective","MozPerspective","OPerspective","msPerspective"];for(var i in e)if(void 0!==t.style[e[i]])return o.cssPrefix=e[i].replace("Perspective","").toLowerCase(),o.animProp="-"+o.cssPrefix+"-transform",!0;return!1}(),"vertical"==o.settings.mode&&(o.settings.maxSlides=o.settings.minSlides),r.data("origStyle",r.attr("style")),r.children(o.settings.slideSelector).each(function(){t(this).data("origStyle",t(this).attr("style"))}),c()},c=function(){r.wrap('<div class="bx-wrapper"><div class="bx-viewport"></div></div>'),o.viewport=r.parent(),o.loader=t('<div class="bx-loading" />'),o.viewport.prepend(o.loader),r.css({width:"horizontal"==o.settings.mode?100*o.children.length+215+"%":"auto",position:"relative"}),o.usingCSS&&o.settings.easing?r.css("-"+o.cssPrefix+"-transition-timing-function",o.settings.easing):o.settings.easing||(o.settings.easing="swing"),f(),o.viewport.css({width:"100%",overflow:"hidden",position:"relative"}),o.viewport.parent().css({maxWidth:p()}),o.settings.pager||o.viewport.parent().css({margin:"0 auto 0px"}),o.children.css({"float":"horizontal"==o.settings.mode?"left":"none",listStyle:"none",position:"relative"}),o.children.css("width",u()),"horizontal"==o.settings.mode&&o.settings.slideMargin>0&&o.children.css("marginRight",o.settings.slideMargin),"vertical"==o.settings.mode&&o.settings.slideMargin>0&&o.children.css("marginBottom",o.settings.slideMargin),"fade"==o.settings.mode&&(o.children.css({position:"absolute",zIndex:0,display:"none"}),o.children.eq(o.settings.startSlide).css({zIndex:o.settings.slideZIndex,display:"block"})),o.controls.el=t('<div class="bx-controls" />'),o.settings.captions&&P(),o.active.last=o.settings.startSlide==x()-1,o.settings.video&&r.fitVids();var e=o.children.eq(o.settings.startSlide);"all"==o.settings.preloadImages&&(e=o.children),o.settings.ticker?o.settings.pager=!1:(o.settings.pager&&T(),o.settings.controls&&C(),o.settings.auto&&o.settings.autoControls&&E(),(o.settings.controls||o.settings.autoControls||o.settings.pager)&&o.viewport.after(o.controls.el)),g(e,h)},g=function(e,i){var s=e.find("img, iframe").length;if(0==s)return i(),void 0;var n=0;e.find("img, iframe").each(function(){t(this).one("load",function(){++n==s&&i()}).each(function(){this.complete&&t(this).load()})})},h=function(){if(o.settings.infiniteLoop&&"fade"!=o.settings.mode&&!o.settings.ticker){var e="vertical"==o.settings.mode?o.settings.minSlides:o.settings.maxSlides,i=o.children.slice(0,e).clone().addClass("bx-clone"),s=o.children.slice(-e).clone().addClass("bx-clone");r.append(i).prepend(s)}o.loader.remove(),S(),"vertical"==o.settings.mode&&(o.settings.adaptiveHeight=!0),o.viewport.height(v()),r.redrawSlider(),o.settings.onSliderLoad(o.active.index),o.initialized=!0,o.settings.responsive&&t(window).bind("resize",Z),o.settings.auto&&o.settings.autoStart&&H(),o.settings.ticker&&L(),o.settings.pager&&q(o.settings.startSlide),o.settings.controls&&W(),o.settings.touchEnabled&&!o.settings.ticker&&O()},v=function(){var e=0,s=t();if("vertical"==o.settings.mode||o.settings.adaptiveHeight)if(o.carousel){var n=1==o.settings.moveSlides?o.active.index:o.active.index*m();for(s=o.children.eq(n),i=1;i<=o.settings.maxSlides-1;i++)s=n+i>=o.children.length?s.add(o.children.eq(i-1)):s.add(o.children.eq(n+i))}else s=o.children.eq(o.active.index);else s=o.children;return"vertical"==o.settings.mode?(s.each(function(){e+=t(this).outerHeight()}),o.settings.slideMargin>0&&(e+=o.settings.slideMargin*(o.settings.minSlides-1))):e=Math.max.apply(Math,s.map(function(){return t(this).outerHeight(!1)}).get()),e},p=function(){var t="100%";return o.settings.slideWidth>0&&(t="horizontal"==o.settings.mode?o.settings.maxSlides*o.settings.slideWidth+(o.settings.maxSlides-1)*o.settings.slideMargin:o.settings.slideWidth),t},u=function(){var t=o.settings.slideWidth,e=o.viewport.width();return 0==o.settings.slideWidth||o.settings.slideWidth>e&&!o.carousel||"vertical"==o.settings.mode?t=e:o.settings.maxSlides>1&&"horizontal"==o.settings.mode&&(e>o.maxThreshold||e<o.minThreshold&&(t=(e-o.settings.slideMargin*(o.settings.minSlides-1))/o.settings.minSlides)),t},f=function(){var t=1;if("horizontal"==o.settings.mode&&o.settings.slideWidth>0)if(o.viewport.width()<o.minThreshold)t=o.settings.minSlides;else if(o.viewport.width()>o.maxThreshold)t=o.settings.maxSlides;else{var e=o.children.first().width();t=Math.floor(o.viewport.width()/e)}else"vertical"==o.settings.mode&&(t=o.settings.minSlides);return t},x=function(){var t=0;if(o.settings.moveSlides>0)if(o.settings.infiniteLoop)t=o.children.length/m();else for(var e=0,i=0;e<o.children.length;)++t,e=i+f(),i+=o.settings.moveSlides<=f()?o.settings.moveSlides:f();else t=Math.ceil(o.children.length/f());return t},m=function(){return o.settings.moveSlides>0&&o.settings.moveSlides<=f()?o.settings.moveSlides:f()},S=function(){if(o.children.length>o.settings.maxSlides&&o.active.last&&!o.settings.infiniteLoop){if("horizontal"==o.settings.mode){var t=o.children.last(
14696),e=t.position();b(-(e.left-(o.viewport.width()-t.width())),"reset",0)}else if("vertical"==o.settings.mode){var i=o.children.length-o.settings.minSlides,e=o.children.eq(i).position();b(-e.top,"reset",0)}}else{var e=o.children.eq(o.active.index*m()).position();o.active.index==x()-1&&(o.active.last=!0),void 0!=e&&("horizontal"==o.settings.mode?b(-e.left,"reset",0):"vertical"==o.settings.mode&&b(-e.top,"reset",0))}},b=function(t,e,i,s){if(o.usingCSS){var n="vertical"==o.settings.mode?"translate3d(0, "+t+"px, 0)":"translate3d("+t+"px, 0, 0)";r.css("-"+o.cssPrefix+"-transition-duration",i/1e3+"s"),"slide"==e?(r.css(o.animProp,n),r.bind("transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd",function(){r.unbind("transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd"),D()})):"reset"==e?r.css(o.animProp,n):"ticker"==e&&(r.css("-"+o.cssPrefix+"-transition-timing-function","linear"),r.css(o.animProp,n),r.bind("transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd",function(){r.unbind("transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd"),b(s.resetValue,"reset",0),N()}))}else{var a={};a[o.animProp]=t,"slide"==e?r.animate(a,i,o.settings.easing,function(){D()}):"reset"==e?r.css(o.animProp,t):"ticker"==e&&r.animate(a,speed,"linear",function(){b(s.resetValue,"reset",0),N()})}},w=function(){for(var e="",i=x(),s=0;i>s;s++){var n="";o.settings.buildPager&&t.isFunction(o.settings.buildPager)?(n=o.settings.buildPager(s),o.pagerEl.addClass("bx-custom-pager")):(n=s+1,o.pagerEl.addClass("bx-default-pager")),e+='<div class="bx-pager-item"><a href="" data-slide-index="'+s+'" class="bx-pager-link">'+n+"</a></div>"}o.pagerEl.html(e)},T=function(){o.settings.pagerCustom?o.pagerEl=t(o.settings.pagerCustom):(o.pagerEl=t('<div class="bx-pager" />'),o.settings.pagerSelector?t(o.settings.pagerSelector).html(o.pagerEl):o.controls.el.addClass("bx-has-pager").append(o.pagerEl),w()),o.pagerEl.on("click","a",I)},C=function(){o.controls.next=t('<a class="bx-next" href="">'+o.settings.nextText+"</a>"),o.controls.prev=t('<a class="bx-prev" href="">'+o.settings.prevText+"</a>"),o.controls.next.bind("click",y),o.controls.prev.bind("click",z),o.settings.nextSelector&&t(o.settings.nextSelector).append(o.controls.next),o.settings.prevSelector&&t(o.settings.prevSelector).append(o.controls.prev),o.settings.nextSelector||o.settings.prevSelector||(o.controls.directionEl=t('<div class="bx-controls-direction" />'),o.controls.directionEl.append(o.controls.prev).append(o.controls.next),o.controls.el.addClass("bx-has-controls-direction").append(o.controls.directionEl))},E=function(){o.controls.start=t('<div class="bx-controls-auto-item"><a class="bx-start" href="">'+o.settings.startText+"</a></div>"),o.controls.stop=t('<div class="bx-controls-auto-item"><a class="bx-stop" href="">'+o.settings.stopText+"</a></div>"),o.controls.autoEl=t('<div class="bx-controls-auto" />'),o.controls.autoEl.on("click",".bx-start",k),o.controls.autoEl.on("click",".bx-stop",M),o.settings.autoControlsCombine?o.controls.autoEl.append(o.controls.start):o.controls.autoEl.append(o.controls.start).append(o.controls.stop),o.settings.autoControlsSelector?t(o.settings.autoControlsSelector).html(o.controls.autoEl):o.controls.el.addClass("bx-has-controls-auto").append(o.controls.autoEl),A(o.settings.autoStart?"stop":"start")},P=function(){o.children.each(function(){var e=t(this).find("img:first").attr("title");void 0!=e&&(""+e).length&&t(this).append('<div class="bx-caption"><span>'+e+"</span></div>")})},y=function(t){o.settings.auto&&r.stopAuto(),r.goToNextSlide(),t.preventDefault()},z=function(t){o.settings.auto&&r.stopAuto(),r.goToPrevSlide(),t.preventDefault()},k=function(t){r.startAuto(),t.preventDefault()},M=function(t){r.stopAuto(),t.preventDefault()},I=function(e){o.settings.auto&&r.stopAuto();var i=t(e.currentTarget),s=parseInt(i.attr("data-slide-index"));s!=o.active.index&&r.goToSlide(s),e.preventDefault()},q=function(e){var i=o.children.length;return"short"==o.settings.pagerType?(o.settings.maxSlides>1&&(i=Math.ceil(o.children.length/o.settings.maxSlides)),o.pagerEl.html(e+1+o.settings.pagerShortSeparator+i),void 0):(o.pagerEl.find("a").removeClass("active"),o.pagerEl.each(function(i,s){t(s).find("a").eq(e).addClass("active")}),void 0)},D=function(){if(o.settings.infiniteLoop){var t="";0==o.active.index?t=o.children.eq(0).position():o.active.index==x()-1&&o.carousel?t=o.children.eq((x()-1)*m()).position():o.active.index==o.children.length-1&&(t=o.children.eq(o.children.length-1).position()),t&&("horizontal"==o.settings.mode?b(-t.left,"reset",0):"vertical"==o.settings.mode&&b(-t.top,"reset",0))}o.working=!1,o.settings.onSlideAfter(o.children.eq(o.active.index),o.oldIndex,o.active.index)},A=function(t){o.settings.autoControlsCombine?o.controls.autoEl.html(o.controls[t]):(o.controls.autoEl.find("a").removeClass("active"),o.controls.autoEl.find("a:not(.bx-"+t+")").addClass("active"))},W=function(){1==x()?(o.controls.prev.addClass("disabled"),o.controls.next.addClass("disabled")):!o.settings.infiniteLoop&&o.settings.hideControlOnEnd&&(0==o.active.index?(o.controls.prev.addClass("disabled"),o.controls.next.removeClass("disabled")):o.active.index==x()-1?(o.controls.next.addClass("disabled"),o.controls.prev.removeClass("disabled")):(o.controls.prev.removeClass("disabled"),o.controls.next.removeClass("disabled")))},H=function(){o.settings.autoDelay>0?setTimeout(r.startAuto,o.settings.autoDelay):r.startAuto(),o.settings.autoHover&&r.hover(function(){o.interval&&(r.stopAuto(!0),o.autoPaused=!0)},function(){o.autoPaused&&(r.startAuto(!0),o.autoPaused=null)})},L=function(){var e=0;if("next"==o.settings.autoDirection)r.append(o.children.clone().addClass("bx-clone"));else{r.prepend(o.children.clone().addClass("bx-clone"));var i=o.children.first().position();e="horizontal"==o.settings.mode?-i.left:-i.top}b(e,"reset",0),o.settings.pager=!1,o.settings.controls=!1,o.settings.autoControls=!1,o.settings.tickerHover&&!o.usingCSS&&o.viewport.hover(function(){r.stop()},function(){var e=0;o.children.each(function(){e+="horizontal"==o.settings.mode?t(this).outerWidth(!0):t(this).outerHeight(!0)});
14696var i=o.settings.speed/e,s="horizontal"==o.settings.mode?"left":"top",n=i*(e-Math.abs(parseInt(r.css(s))));N(n)}),N()},N=function(t){speed=t?t:o.settings.speed;var e={left:0,top:0},i={left:0,top:0};"next"==o.settings.autoDirection?e=r.find(".bx-clone").first().position():i=o.children.first().position();var s="horizontal"==o.settings.mode?-e.left:-e.top,n="horizontal"==o.settings.mode?-i.left:-i.top,a={resetValue:n};b(s,"ticker",speed,a)},O=function(){o.touch={start:{x:0,y:0},end:{x:0,y:0}},o.viewport.bind("touchstart",X)},X=function(t){if(o.working)t.preventDefault();else{o.touch.originalPos=r.position();var e=t.originalEvent;o.touch.start.x=e.changedTouches[0].pageX,o.touch.start.y=e.changedTouches[0].pageY,o.viewport.bind("touchmove",Y),o.viewport.bind("touchend",V)}},Y=function(t){var e=t.originalEvent,i=Math.abs(e.changedTouches[0].pageX-o.touch.start.x),s=Math.abs(e.changedTouches[0].pageY-o.touch.start.y);if(3*i>s&&o.settings.preventDefaultSwipeX?t.preventDefault():3*s>i&&o.settings.preventDefaultSwipeY&&t.preventDefault(),"fade"!=o.settings.mode&&o.settings.oneToOneTouch){var n=0;if("horizontal"==o.settings.mode){var r=e.changedTouches[0].pageX-o.touch.start.x;n=o.touch.originalPos.left+r}else{var r=e.changedTouches[0].pageY-o.touch.start.y;n=o.touch.originalPos.top+r}b(n,"reset",0)}},V=function(t){o.viewport.unbind("touchmove",Y);var e=t.originalEvent,i=0;if(o.touch.end.x=e.changedTouches[0].pageX,o.touch.end.y=e.changedTouches[0].pageY,"fade"==o.settings.mode){var s=Math.abs(o.touch.start.x-o.touch.end.x);s>=o.settings.swipeThreshold&&(o.touch.start.x>o.touch.end.x?r.goToNextSlide():r.goToPrevSlide(),r.stopAuto())}else{var s=0;"horizontal"==o.settings.mode?(s=o.touch.end.x-o.touch.start.x,i=o.touch.originalPos.left):(s=o.touch.end.y-o.touch.start.y,i=o.touch.originalPos.top),!o.settings.infiniteLoop&&(0==o.active.index&&s>0||o.active.last&&0>s)?b(i,"reset",200):Math.abs(s)>=o.settings.swipeThreshold?(0>s?r.goToNextSlide():r.goToPrevSlide(),r.stopAuto()):b(i,"reset",200)}o.viewport.unbind("touchend",V)},Z=function(){var e=t(window).width(),i=t(window).height();(a!=e||l!=i)&&(a=e,l=i,r.redrawSlider(),o.settings.onSliderResize.call(r,o.active.index))};return r.goToSlide=function(e,i){if(!o.working&&o.active.index!=e)if(o.working=!0,o.oldIndex=o.active.index,o.active.index=0>e?x()-1:e>=x()?0:e,o.settings.onSlideBefore(o.children.eq(o.active.index),o.oldIndex,o.active.index),"next"==i?o.settings.onSlideNext(o.children.eq(o.active.index),o.oldIndex,o.active.index):"prev"==i&&o.settings.onSlidePrev(o.children.eq(o.active.index),o.oldIndex,o.active.index),o.active.last=o.active.index>=x()-1,o.settings.pager&&q(o.active.index),o.settings.controls&&W(),"fade"==o.settings.mode)o.settings.adaptiveHeight&&o.viewport.height()!=v()&&o.viewport.animate({height:v()},o.settings.adaptiveHeightSpeed),o.children.filter(":visible").fadeOut(o.settings.speed).css({zIndex:0}),o.children.eq(o.active.index).css("zIndex",o.settings.slideZIndex+1).fadeIn(o.settings.speed,function(){t(this).css("zIndex",o.settings.slideZIndex),D()});else{o.settings.adaptiveHeight&&o.viewport.height()!=v()&&o.viewport.animate({height:v()},o.settings.adaptiveHeightSpeed);var s=0,n={left:0,top:0};if(!o.settings.infiniteLoop&&o.carousel&&o.active.last)if("horizontal"==o.settings.mode){var a=o.children.eq(o.children.length-1);n=a.position(),s=o.viewport.width()-a.outerWidth()}else{var l=o.children.length-o.settings.minSlides;n=o.children.eq(l).position()}else if(o.carousel&&o.active.last&&"prev"==i){var d=1==o.settings.moveSlides?o.settings.maxSlides-m():(x()-1)*m()-(o.children.length-o.settings.maxSlides),a=r.children(".bx-clone").eq(d);n=a.position()}else if("next"==i&&0==o.active.index)n=r.find("> .bx-clone").eq(o.settings.maxSlides).position(),o.active.last=!1;else if(e>=0){var c=e*m();n=o.children.eq(c).position()}if("undefined"!=typeof n){var g="horizontal"==o.settings.mode?-(n.left-s):-n.top;b(g,"slide",o.settings.speed)}}},r.goToNextSlide=function(){if(o.settings.infiniteLoop||!o.active.last){var t=parseInt(o.active.index)+1;r.goToSlide(t,"next")}},r.goToPrevSlide=function(){if(o.settings.infiniteLoop||0!=o.active.index){var t=parseInt(o.active.index)-1;r.goToSlide(t,"prev")}},r.startAuto=function(t){o.interval||(o.interval=setInterval(function(){"next"==o.settings.autoDirection?r.goToNextSlide():r.goToPrevSlide()},o.settings.pause),o.settings.autoControls&&1!=t&&A("stop"))},r.stopAuto=function(t){o.interval&&(clearInterval(o.interval),o.interval=null,o.settings.autoControls&&1!=t&&A("start"))},r.getCurrentSlide=function(){return o.active.index},r.getCurrentSlideElement=function(){return o.children.eq(o.active.index)},r.getSlideCount=function(){return o.children.length},r.redrawSlider=function(){o.children.add(r.find(".bx-clone")).outerWidth(u()),o.viewport.css("height",v()),o.settings.ticker||S(),o.active.last&&(o.active.index=x()-1),o.active.index>=x()&&(o.active.last=!0),o.settings.pager&&!o.settings.pagerCustom&&(w(),q(o.active.index))},r.destroySlider=function(){o.initialized&&(o.initialized=!1,t(".bx-clone",this).remove(),o.children.each(function(){void 0!=t(this).data("origStyle")?t(this).attr("style",t(this).data("origStyle")):t(this).removeAttr("style")}),void 0!=t(this).data("origStyle")?this.attr("style",t(this).data("origStyle")):t(this).removeAttr("style"),t(this).unwrap().unwrap(),o.controls.el&&o.controls.el.remove(),o.controls.next&&o.controls.next.remove(),o.controls.prev&&o.controls.prev.remove(),o.pagerEl&&o.settings.controls&&o.pagerEl.remove(),t(".bx-caption",this).remove(),o.controls.autoEl&&o.controls.autoEl.remove(),clearInterval(o.interval),o.settings.responsive&&t(window).unbind("resize",Z))},r.reloadSlider=function(t){void 0!=t&&(n=t),r.destroySlider(),d()},d(),this}}(jQuery); 14697 14698 14699 14700 14701 14702 14703 14704/* 14705 * jQuery dotdotdot 1.6.16 14706 * 14707 * Copyright (c) Fred Heusschen 14708 * www.frebsite.nl 14709 * 14710 * Plugin website: 14711 * dotdotdot.frebsite.nl 14712 * 14713 * Dual licensed under the MIT and GPL licenses. 14714 * http://en.wikipedia.org/wiki/MIT_License 14715 * http://en.wikipedia.org/wiki/GNU_General_Public_License 14716 */ 14717!function(t,e){function n(t,e,n){var r=t.children(),o=!1;t.empty();for(var i=0,d=r.length;d>i;i++){var l=r.eq(i);if(t.append(l),n&&t.append(n),a(t,e)){l.remove(),o=!0;break}n&&n.detach()}return o}function r(e,n,i,d,l){var s=!1,c="table, thead, tbody, tfoot, tr, col, colgroup, object, embed, param, ol, ul, dl, blockquote, select, optgroup, option, textarea, script, style",u="script, .dotdotdot-keep";return e.contents().detach().each(function(){var f=this,h=t(f);if("undefined"==typeof f||3==f.nodeType&&0==t.trim(f.data).length)return!0;
vendor: 5,899 bytes, lines 14717-14741
14717if(h.is(u))e.append(h);else{if(s)return!0;e.append(h),l&&e[e.is(c)?"after":"append"](l),a(i,d)&&(s=3==f.nodeType?o(h,n,i,d,l):r(h,n,i,d,l),s||(h.detach(),s=!0)),s||l&&l.detach()}}),s}function o(e,n,r,o,d){var c=e[0];if(!c)return!1;var f=s(c),h=-1!==f.indexOf(" ")?" ":" ",p="letter"==o.wrap?"":h,g=f.split(p),v=-1,w=-1,b=0,y=g.length-1;for(o.fallbackToLetter&&0==b&&0==y&&(p="",g=f.split(p),y=g.length-1);y>=b&&(0!=b||0!=y);){var m=Math.floor((b+y)/2);if(m==w)break;w=m,l(c,g.slice(0,w+1).join(p)+o.ellipsis),a(r,o)?(y=w,o.fallbackToLetter&&0==b&&0==y&&(p="",g=g[0].split(p),v=-1,w=-1,b=0,y=g.length-1)):(v=w,b=w)}if(-1==v||1==g.length&&0==g[0].length){var x=e.parent();e.detach();var T=d&&d.closest(x).length?d.length:0;x.contents().length>T?c=u(x.contents().eq(-1-T),n):(c=u(x,n,!0),T||x.detach()),c&&(f=i(s(c),o),l(c,f),T&&d&&t(c).parent().append(d))}else f=i(g.slice(0,v+1).join(p),o),l(c,f);return!0}function a(t,e){return t.innerHeight()>e.maxHeight}function i(e,n){for(;t.inArray(e.slice(-1),n.lastCharacter.remove)>-1;)e=e.slice(0,-1);return t.inArray(e.slice(-1),n.lastCharacter.noEllipsis)<0&&(e+=n.ellipsis),e}function d(t){return{width:t.innerWidth(),height:t.innerHeight()}}function l(t,e){t.innerText?t.innerText=e:t.nodeValue?t.nodeValue=e:t.textContent&&(t.textContent=e)}function s(t){return t.innerText?t.innerText:t.nodeValue?t.nodeValue:t.textContent?t.textContent:""}function c(t){do t=t.previousSibling;while(t&&1!==t.nodeType&&3!==t.nodeType);return t}function u(e,n,r){var o,a=e&&e[0];if(a){if(!r){if(3===a.nodeType)return a;if(t.trim(e.text()))return u(e.contents().last(),n)}for(o=c(a);!o;){if(e=e.parent(),e.is(n)||!e.length)return!1;o=c(e[0])}if(o)return u(t(o),n)}return!1}function f(e,n){return e?"string"==typeof e?(e=t(e,n),e.length?e:!1):e.jquery?e:!1:!1}function h(t){for(var e=t.innerHeight(),n=["paddingTop","paddingBottom"],r=0,o=n.length;o>r;r++){var a=parseInt(t.css(n[r]),10);isNaN(a)&&(a=0),e-=a}return e}if(!t.fn.dotdotdot){t.fn.dotdotdot=function(e){if(0==this.length)return t.fn.dotdotdot.debug('No element found for "'+this.selector+'".'),this;if(this.length>1)return this.each(function(){t(this).dotdotdot(e)});var o=this;o.data("dotdotdot")&&o.trigger("destroy.dot"),o.data("dotdotdot-style",o.attr("style")||""),o.css("word-wrap","break-word"),"nowrap"===o.css("white-space")&&o.css("white-space","normal"),o.bind_events=function(){return o.bind("update.dot",function(e,d){e.preventDefault(),e.stopPropagation(),l.maxHeight="number"==typeof l.height?l.height:h(o),l.maxHeight+=l.tolerance,"undefined"!=typeof d&&(("string"==typeof d||d instanceof HTMLElement)&&(d=t("<div />").append(d).contents()),d instanceof t&&(i=d)),g=o.wrapInner('<div class="dotdotdot" />').children(),g.contents().detach().end().append(i.clone(!0)).find("br").replaceWith(" <br /> ").end().css({height:"auto",width:"auto",border:"none",padding:0,margin:0});var c=!1,u=!1;return s.afterElement&&(c=s.afterElement.clone(!0),c.show(),s.afterElement.detach()),a(g,l)&&(u="children"==l.wrap?n(g,l,c):r(g,o,g,l,c)),g.replaceWith(g.contents()),g=null,t.isFunction(l.callback)&&l.callback.call(o[0],u,i),s.isTruncated=u,u}).bind("isTruncated.dot",function(t,e){return t.preventDefault(),t.stopPropagation(),"function"==typeof e&&e.call(o[0],s.isTruncated),s.isTruncated}).bind("originalContent.dot",function(t,e){return t.preventDefault(),t.stopPropagation(),"function"==typeof e&&e.call(o[0],i),i}).bind("destroy.dot",function(t){t.preventDefault(),t.stopPropagation(),o.unwatch().unbind_events().contents().detach().end().append(i).attr("style",o.data("dotdotdot-style")||"").data("dotdotdot",!1)}),o},o.unbind_events=function(){return o.unbind(".dot"),o},o.watch=function(){if(o.unwatch(),"window"==l.watch){var e=t(window),n=e.width(),r=e.height();e.bind("resize.dot"+s.dotId,function(){n==e.width()&&r==e.height()&&l.windowResizeFix||(n=e.width(),r=e.height(),u&&clearInterval(u),u=setTimeout(function(){o.trigger("update.dot")},100))})}else c=d(o),u=setInterval(function(){if(o.is(":visible")){var t=d(o);(c.width!=t.width||c.height!=t.height)&&(o.trigger("update.dot"),c=t)}},500);return o},o.unwatch=function(){return t(window).unbind("resize.dot"+s.dotId),u&&clearInterval(u),o};var i=o.contents(),l=t.extend(!0,{},t.fn.dotdotdot.defaults,e),s={},c={},u=null,g=null;return l.lastCharacter.remove instanceof Array||(l.lastCharacter.remove=t.fn.dotdotdot.defaultArrays.lastCharacter.remove),l.lastCharacter.noEllipsis instanceof Array||(l.lastCharacter.noEllipsis=t.fn.dotdotdot.defaultArrays.lastCharacter.noEllipsis),s.afterElement=f(l.after,o),s.isTruncated=!1,s.dotId=p++,o.data("dotdotdot",!0).bind_events().trigger("update.dot"),l.watch&&o.watch(),o},t.fn.dotdotdot.defaults={ellipsis:"... ",wrap:"word",fallbackToLetter:!0,lastCharacter:{},tolerance:0,callback:null,after:null,height:null,watch:!1,windowResizeFix:!0},t.fn.dotdotdot.defaultArrays={lastCharacter:{remove:[" "," ",",",";",".","!","?"],noEllipsis:[]}},t.fn.dotdotdot.debug=function(){};var p=1,g=t.fn.html;t.fn.html=function(n){return n!=e&&!t.isFunction(n)&&this.data("dotdotdot")?this.trigger("update",[n]):g.apply(this,arguments)};var v=t.fn.text;t.fn.text=function(n){return n!=e&&!t.isFunction(n)&&this.data("dotdotdot")?(n=t("<div />").text(n).html(),this.trigger("update",[n])):v.apply(this,arguments)}}}(jQuery); 14718 14719 14720 14721 14722 14723 14724 14725 14726 14727 14728 14729 14730 14731 14732 14733 14734/*!-------------------------------------------------------------------- 14735JAVASCRIPT "Outdated Browser" 14736Version: 1.1.0 - 2014 14737author: Burocratik 14738website: http://www.burocratik.com 14739* @preserve 14740-----------------------------------------------------------------------*/ 14741// var outdatedBrowser=function(t){function o(t){s.style.opacity=t/100,s.style.filter="alpha(opacity="+t+")"}function e(t){o(t),1==t&&(s.style.display="block"),100==t&&(u=!0)}function r(){var t=document.getElementById("btnCloseUpdateBrowser"),o=document.getElementById("btnUpdateBrowser");
14741s.style.backgroundColor=bkgColor,s.style.color=txtColor,s.children[0].style.color=txtColor,s.children[1].style.color=txtColor,o.style.color=txtColor,o.style.borderColor=txtColor,t.style.color=txtColor,t.onmousedown=function(){return s.style.display="none",!1},o.onmouseover=function(){this.style.color=bkgColor,this.style.backgroundColor=txtColor},o.onmouseout=function(){this.style.color=txtColor,this.style.backgroundColor=bkgColor}}function l(){var t=!1;if(window.XMLHttpRequest)t=new XMLHttpRequest;else if(window.ActiveXObject)try{t=new ActiveXObject("Msxml2.XMLHTTP")}catch(o){try{t=new ActiveXObject("Microsoft.XMLHTTP")}catch(o){t=!1}}return t}function a(t){var o=l();return o&&(o.onreadystatechange=function(){n(o)},o.open("GET",t,!0),o.send(null)),!1}function n(t){var o=document.getElementById("outdated");return 4==t.readyState&&(o.innerHTML=200==t.status||304==t.status?t.responseText:d,r()),!1}var s=document.getElementById("outdated");this.defaultOpts={bgColor:"#f25648",color:"#ffffff",lowerThan:"transform",languagePath:"../outdatedbrowser/lang/pl.html"},t?("IE8"==t.lowerThan||"borderSpacing"==t.lowerThan?t.lowerThan="borderSpacing":"IE9"==t.lowerThan||"boxShadow"==t.lowerThan?t.lowerThan="boxShadow":"IE10"==t.lowerThan||"transform"==t.lowerThan||""==t.lowerThan||"undefined"==typeof t.lowerThan?t.lowerThan="transform":("IE11"==t.lowerThan||"borderImage"==t.lowerThan)&&(t.lowerThan="borderImage"),this.defaultOpts.bgColor=t.bgColor,this.defaultOpts.color=t.color,this.defaultOpts.lowerThan=t.lowerThan,this.defaultOpts.languagePath=t.languagePath,bkgColor=this.defaultOpts.bgColor,txtColor=this.defaultOpts.color,cssProp=this.defaultOpts.lowerThan,languagePath=this.defaultOpts.languagePath):(bkgColor=this.defaultOpts.bgColor,txtColor=this.defaultOpts.color,cssProp=this.defaultOpts.lowerThan,languagePath=this.defaultOpts.languagePath);var u=!0,i=function(){var t=document.createElement("div"),o="Khtml Ms O Moz Webkit".split(" "),e=o.length;return function(r){if(r in t.style)return!0;for(r=r.replace(/^[a-z]/,function(t){return t.toUpperCase()});e--;)if(o[e]+r in t.style)return!0;return!1}}();if(!i(""+cssProp)&&u&&"1"!==s.style.opacity){u=!1;for(var c=1;100>=c;c++)setTimeout(function(t){return function(){e(t)}}(c),8*c)}" "===languagePath||0==languagePath.length?r():a(languagePath);var d='<h6>Your browser is out-of-date!</h6><p>Update your browser to view this website correctly. <a id="btnUpdateBrowser" href="http://outdatedbrowser.com/">Update my browser now </a></p><p class="last"><a href="#" id="btnCloseUpdateBrowser" title="Close">×</a></p>'}; 14742 14743 14744 14745 14746 14747 14748 14749 14750 14751 14752 14753 14754 14755 14756 14757 14758 14759 14760 14761 14762 14763 14764 14765 14766 14767 14768 14769/*global jQuery */ 14770/*jshint browser:true */ 14771/*! 14772* FitVids 1.1 14773* 14774* Copyright 2013, Chris Coyier - http://css-tricks.com + Dave Rupert - http://daverupert.com 14775* Credit to Thierry Koblentz - http://www.alistapart.com/articles/creating-intrinsic-ratios-for-video/ 14776* Released under the WTFPL license - http://sam.zoy.org/wtfpl/ 14777* 14778*/ 14779 14780(function( $ ){ 14781 14782 "use strict"; 14783 14784 $.fn.fitVids = function( options ) { 14785 var settings = { 14786 customSelector: null 14787 }; 14788 14789 if(!document.getElementById('fit-vids-style')) { 14790 // appendStyles: https://github.com/toddmotto/fluidvids/blob/master/dist/fluidvids.js 14791 var head = document.head || document.getElementsByTagName('head')[0]; 14792 var css = '.fluid-width-video-wrapper{width:100%;position:relative;padding:0;}.fluid-width-video-wrapper iframe,.fluid-width-video-wrapper object,.fluid-width-video-wrapper embed {position:absolute;top:0;left:0;width:100%;height:100%;}'; 14793 var div = document.createElement('div'); 14794 div.innerHTML = '<p>x</p><style id="fit-vids-style">' + css + '</style>'; 14795 head.appendChild(div.childNodes[1]); 14796 } 14797 14798 if ( options ) { 14799 $.extend( settings, options ); 14800 } 14801 14802 return this.each(function(){ 14803 var selectors = [ 14804 "iframe[src*='player.vimeo.com']", 14805 "iframe[src*='youtube.com']", 14806 "iframe[src*='youtube-nocookie.com']", 14807 "iframe[src*='kickstarter.com'][src*='video.html']", 14808 "object", 14809 "embed" 14810 ]; 14811 14812 if (settings.customSelector) { 14813 selectors.push(settings.customSelector); 14814 } 14815 14816 var $allVideos = $(this).find(selectors.join(',')); 14817 $allVideos = $allVideos.not("object object"); // SwfObj conflict patch 14818 14819 $allVideos.each(function(){ 14820 var $this = $(this); 14821 if (this.tagName.toLowerCase() === 'embed' && $this.parent('object').length || $this.parent('.fluid-width-video-wrapper').length) { return; } 14822 var height = ( this.tagName.toLowerCase() === 'object' || ($this.attr('height') && !isNaN(parseInt($this.attr('height'), 10))) ) ? parseInt($this.attr('height'), 10) : $this.height(), 14823 width = !isNaN(parseInt($this.attr('width'), 10)) ? parseInt($this.attr('width'), 10) : $this.width(), 14824 aspectRatio = height / width; 14825 if(!$this.attr('id')){ 14826 var videoID = 'fitvid' + Math.floor(Math.random()*999999); 14827 $this.attr('id', videoID); 14828 } 14829 $this.wrap('<div class="fluid-width-video-wrapper"></div>').parent('.fluid-width-video-wrapper').css('padding-top', (aspectRatio * 100)+"%"); 14830 $this.removeAttr('height').removeAttr('width'); 14831 }); 14832 }); 14833 }; 14834// Works with either jQuery or Zepto 14835})( window.jQuery || window.Zepto ); 14836 14837 14838 14839 14840 14841 14842 14843 14844 14845 14846 14847 14848 14849 14850/* 14851 * jQuery FlexSlider v2.2.2 14852 * Copyright 2012 WooThemes 14853 * Contributing Author: Tyler Smith 14854 */ 14855!function(a){a.flexslider=function(b,c){var d=a(b);d.vars=a.extend({},a.flexslider.defaults,c);var j,e=d.vars.namespace,f=window.navigator&&window.navigator.msPointerEnabled&&window.MSGesture,g=("ontouchstart"in window||f||window.DocumentTouch&&document instanceof DocumentTouch)&&d.vars.touch,h="click touchend MSPointerUp",i="",k="vertical"===d.vars.direction,l=d.vars.reverse,m=d.vars.itemWidth>0,n="fade"===d.vars.animation,o=""!==d.vars.asNavFor,p={},q=!0;a.data(b,"flexslider",d),p={init:function(){d.animating=!1,d.currentSlide=parseInt(d.vars.startAt?d.vars.startAt:0,10),isNaN(d.currentSlide)&&(d.currentSlide=0),d.animatingTo=d.currentSlide,d.atEnd=0===d.currentSlide||d.currentSlide===d.last,d.containerSelector=d.vars.selector.substr(0,d.vars.selector.search(" ")),d.slides=a(d.vars.selector,d),d.container=a(d.containerSelector,d),d.count=d.slides.length,d.syncExists=a(d.vars.sync).length>0,"slide"===d.vars.animation&&(d.vars.animation="swing"),d.prop=k?"top":"marginLeft",d.args={},d.manualPause=!1,d.stopped=!1,d.started=!1,d.startTimeout=null,d.transitions=!d.vars.video&&!n&&d.vars.useCSS&&function(){var a=document.createElement("div"),b=["perspectiveProperty","WebkitPerspective","MozPerspective","OPerspective","msPerspective"];for(var c in b)if(void 0!==a.style[b[c]])return d.pfx=b[c].replace("Perspective","").toLowerCase(),d.prop="-"+d.pfx+"-transform",!0;return!1}(),d.ensureAnimationEnd="",""!==d.vars.controlsContainer&&(d.controlsContainer=a(d.vars.controlsContainer).length>0&&a(d.vars.controlsContainer)),""!==d.vars.manualControls&&(d.manualControls=a(d.vars.manualControls).length>0&&a(d.vars.manualControls)),d.vars.randomize&&(d.slides.sort(function(){return Math.round(Math.random())-.5}),d.container.empty().append(d.slides)),d.doMath(),d.setup("init"),d.vars.c
14855ontrolNav&&p.controlNav.setup(),d.vars.directionNav&&p.directionNav.setup(),d.vars.keyboard&&(1===a(d.containerSelector).length||d.vars.multipleKeyboard)&&a(document).bind("keyup",function(a){var b=a.keyCode;if(!d.animating&&(39===b||37===b)){var c=39===b?d.getTarget("next"):37===b?d.getTarget("prev"):!1;d.flexAnimate(c,d.vars.pauseOnAction)}}),d.vars.mousewheel&&d.bind("mousewheel",function(a,b){a.preventDefault();var f=0>b?d.getTarget("next"):d.getTarget("prev");d.flexAnimate(f,d.vars.pauseOnAction)}),d.vars.pausePlay&&p.pausePlay.setup(),d.vars.slideshow&&d.vars.pauseInvisible&&p.pauseInvisible.init(),d.vars.slideshow&&(d.vars.pauseOnHover&&d.hover(function(){d.manualPlay||d.manualPause||d.pause()},function(){d.manualPause||d.manualPlay||d.stopped||d.play()}),d.vars.pauseInvisible&&p.pauseInvisible.isHidden()||(d.vars.initDelay>0?d.startTimeout=setTimeout(d.play,d.vars.initDelay):d.play())),o&&p.asNav.setup(),g&&d.vars.touch&&p.touch(),(!n||n&&d.vars.smoothHeight)&&a(window).bind("resize orientationchange focus",p.resize),d.find("img").attr("draggable","false"),setTimeout(function(){d.vars.start(d)},200)},asNav:{setup:function(){d.asNav=!0,d.animatingTo=Math.floor(d.currentSlide/d.move),d.currentItem=d.currentSlide,d.slides.removeClass(e+"active-slide").eq(d.currentItem).addClass(e+"active-slide"),f?(b._slider=d,d.slides.each(function(){var b=this;b._gesture=new MSGesture,b._gesture.target=b,b.addEventListener("MSPointerDown",function(a){a.preventDefault(),a.currentTarget._gesture&&a.currentTarget._gesture.addPointer(a.pointerId)},!1),b.addEventListener("MSGestureTap",function(b){b.preventDefault();var c=a(this),e=c.index();a(d.vars.asNavFor).data("flexslider").animating||c.hasClass("active")||(d.direction=d.currentItem<e?"next":"prev",d.flexAnimate(e,d.vars.pauseOnAction,!1,!0,!0))})})):d.slides.on(h,function(b){b.preventDefault();var c=a(this),f=c.index(),g=c.offset().left-a(d).scrollLeft();0>=g&&c.hasClass(e+"active-slide")?d.flexAnimate(d.getTarget("prev"),!0):a(d.vars.asNavFor).data("flexslider").animating||c.hasClass(e+"active-slide")||(d.direction=d.currentItem<f?"next":"prev",d.flexAnimate(f,d.vars.pauseOnAction,!1,!0,!0))})}},controlNav:{setup:function(){d.manualControls?p.controlNav.setupManual():p.controlNav.setupPaging()},setupPaging:function(){var f,g,b="thumbnails"===d.vars.controlNav?"control-thumbs":"control-paging",c=1;if(d.controlNavScaffold=a('<ol class="'+e+"control-nav "+e+b+'"></ol>'),d.pagingCount>1)for(var j=0;j<d.pagingCount;j++){if(g=d.slides.eq(j),f="thumbnails"===d.vars.controlNav?'<img src="'+g.attr("data-thumb")+'"/>':"<a>"+c+"</a>","thumbnails"===d.vars.controlNav&&!0===d.vars.thumbCaptions){var k=g.attr("data-thumbcaption");""!=k&&void 0!=k&&(f+='<span class="'+e+'caption">'+k+"</span>")}d.controlNavScaffold.append("<li>"+f+"</li>"),c++}d.controlsContainer?a(d.controlsContainer).append(d.controlNavScaffold):d.append(d.controlNavScaffold),p.controlNav.set(),p.controlNav.active(),d.controlNavScaffold.delegate("a, img",h,function(b){if(b.preventDefault(),""===i||i===b.type){var c=a(this),f=d.controlNav.index(c);c.hasClass(e+"active")||(d.direction=f>d.currentSlide?"next":"prev",d.flexAnimate(f,d.vars.pauseOnAction))}""===i&&(i=b.type),p.setToClearWatchedEvent()})},setupManual:function(){d.controlNav=d.manualControls,p.controlNav.active(),d.controlNav.bind(h,function(b){if(b.preventDefault(),""===i||i===b.type){var c=a(this),f=d.controlNav.index(c);c.hasClass(e+"active")||(d.direction=f>d.currentSlide?"next":"prev",d.flexAnimate(f,d.vars.pauseOnAction))}""===i&&(i=b.type),p.setToClearWatchedEvent()})},set:function(){var b="thumbnails"===d.vars.controlNav?"img":"a";d.controlNav=a("."+e+"control-nav li "+b,d.controlsContainer?d.controlsContainer:d)},active:function(){d.controlNav.removeClass(e+"active").eq(d.animatingTo).addClass(e+"active")},update:function(b,c){d.pagingCount>1&&"add"===b?d.controlNavScaffold.append(a("<li><a>"+d.count+"</a></li>")):1===d.pagingCount?d.controlNavScaffold.find("li").remove():d.controlNav.eq(c).closest("li").remove(),p.controlNav.set(),d.pagingCount>1&&d.pagingCount!==d.controlNav.length?d.update(c,b):p.controlNav.active()}},directionNav:{setup:function(){var b=a('<ul class="'+e+'direction-nav"><li><a class="'+e+'prev" href="#">'+d.vars.prevText+'</a></li><li><a class="'+e+'next" href="#">'+d.vars.nextText+"</a></li></ul>");d.controlsContainer?(a(d.controlsContainer).append(b),d.directionNav=a("."+e+"direction-nav li a",d.controlsContainer)):(d.append(b),d.directionNav=a("."+e+"direction-nav li a",d)),p.directionNav.update(
14855),d.directionNav.bind(h,function(b){b.preventDefault();var c;(""===i||i===b.type)&&(c=a(this).hasClass(e+"next")?d.getTarget("next"):d.getTarget("prev"),d.flexAnimate(c,d.vars.pauseOnAction)),""===i&&(i=b.type),p.setToClearWatchedEvent()})},update:function(){var a=e+"disabled";1===d.pagingCount?d.directionNav.addClass(a).attr("tabindex","-1"):d.vars.animationLoop?d.directionNav.removeClass(a).removeAttr("tabindex"):0===d.animatingTo?d.directionNav.removeClass(a).filter("."+e+"prev").addClass(a).attr("tabindex","-1"):d.animatingTo===d.last?d.directionNav.removeClass(a).filter("."+e+"next").addClass(a).attr("tabindex","-1"):d.directionNav.removeClass(a).removeAttr("tabindex")}},pausePlay:{setup:function(){var b=a('<div class="'+e+'pauseplay"><a></a></div>');d.controlsContainer?(d.controlsContainer.append(b),d.pausePlay=a("."+e+"pauseplay a",d.controlsContainer)):(d.append(b),d.pausePlay=a("."+e+"pauseplay a",d)),p.pausePlay.update(d.vars.slideshow?e+"pause":e+"play"),d.pausePlay.bind(h,function(b){b.preventDefault(),(""===i||i===b.type)&&(a(this).hasClass(e+"pause")?(d.manualPause=!0,d.manualPlay=!1,d.pause()):(d.manualPause=!1,d.manualPlay=!0,d.play())),""===i&&(i=b.type),p.setToClearWatchedEvent()})},update:function(a){"play"===a?d.pausePlay.removeClass(e+"pause").addClass(e+"play").html(d.vars.playText):d.pausePlay.removeClass(e+"play").addClass(e+"pause").html(d.vars.pauseText)}},touch:function(){function r(f){d.animating?f.preventDefault():(window.navigator.msPointerEnabled||1===f.touches.length)&&(d.pause(),g=k?d.h:d.w,i=Number(new Date),o=f.touches[0].pageX,p=f.touches[0].pageY,e=m&&l&&d.animatingTo===d.last?0:m&&l?d.limit-(d.itemW+d.vars.itemMargin)*d.move*d.animatingTo:m&&d.currentSlide===d.last?d.limit:m?(d.itemW+d.vars.itemMargin)*d.move*d.currentSlide:l?(d.last-d.currentSlide+d.cloneOffset)*g:(d.currentSlide+d.cloneOffset)*g,a=k?p:o,c=k?o:p,b.addEventListener("touchmove",s,!1),b.addEventListener("touchend",t,!1))}function s(b){o=b.touches[0].pageX,p=b.touches[0].pageY,h=k?a-p:a-o,j=k?Math.abs(h)<Math.abs(o-c):Math.abs(h)<Math.abs(p-c);var f=500;(!j||Number(new Date)-i>f)&&(b.preventDefault(),!n&&d.transitions&&(d.vars.animationLoop||(h/=0===d.currentSlide&&0>h||d.currentSlide===d.last&&h>0?Math.abs(h)/g+2:1),d.setProps(e+h,"setTouch")))}function t(){if(b.removeEventListener("touchmove",s,!1),d.animatingTo===d.currentSlide&&!j&&null!==h){var k=l?-h:h,m=k>0?d.getTarget("next"):d.getTarget("prev");d.canAdvance(m)&&(Number(new Date)-i<550&&Math.abs(k)>50||Math.abs(k)>g/2)?d.flexAnimate(m,d.vars.pauseOnAction):n||d.flexAnimate(d.currentSlide,d.vars.pauseOnAction,!0)}b.removeEventListener("touchend",t,!1),a=null,c=null,h=null,e=null}function u(a){a.stopPropagation(),d.animating?a.preventDefault():(d.pause(),b._gesture.addPointer(a.pointerId),q=0,g=k?d.h:d.w,i=Number(new Date),e=m&&l&&d.animatingTo===d.last?0:m&&l?d.limit-(d.itemW+d.vars.itemMargin)*d.move*d.animatingTo:m&&d.currentSlide===d.last?d.limit:m?(d.itemW+d.vars.itemMargin)*d.move*d.currentSlide:l?(d.last-d.currentSlide+d.cloneOffset)*g:(d.currentSlide+d.cloneOffset)*g)}function v(a){a.stopPropagation();var c=a.target._slider;if(c){var d=-a.translationX,f=-a.translationY;return q+=k?f:d,h=q,j=k?Math.abs(q)<Math.abs(-d):Math.abs(q)<Math.abs(-f),a.detail===a.MSGESTURE_FLAG_INERTIA?(setImmediate(function(){b._gesture.stop()}),void 0):((!j||Number(new Date)-i>500)&&(a.preventDefault(),!n&&c.transitions&&(c.vars.animationLoop||(h=q/(0===c.currentSlide&&0>q||c.currentSlide===c.last&&q>0?Math.abs(q)/g+2:1)),c.setProps(e+h,"setTouch"))),void 0)}}function w(b){b.stopPropagation();var d=b.target._slider;if(d){if(d.animatingTo===d.currentSlide&&!j&&null!==h){var f=l?-h:h,k=f>0?d.getTarget("next"):d.getTarget("prev");d.canAdvance(k)&&(Number(new Date)-i<550&&Math.abs(f)>50||Math.abs(f)>g/2)?d.flexAnimate(k,d.vars.pauseOnAction):n||d.flexAnimate(d.currentSlide,d.vars.pauseOnAction,!0)}a=null,c=null,h=null,e=null,q=0}}var a,c,e,g,h,i,j=!1,o=0,p=0,q=0;f?(b.style.msTouchAction="none",b._gesture=new MSGesture,b._gesture.target=b,b.addEventListener("MSPointerDown",u,!1),b._slider=d,b.addEventListener("MSGestureChange",v,!1),b.addEventListener("MSGestureEnd",w,!1)):b.addEventListener("touchstart",r,!1)},resize:function(){!d.animating&&d.is(":visible")&&(m||d.doMath(),n?p.smoothHeight():m?(d.slides.width(d.computedW),d.update(d.pagingCount),d.setProps()):k?(d.viewport.height(d.h),d.setProps(d.h,"setTotal")):(d.vars.smoothHeight&&p.smoothHeight(),d.newSlides.width(d.computedW),d.setProps(d.computedW,"setTotal")))}
vendor: 8,289 bytes, line 14855
14855,smoothHeight:function(a){if(!k||n){var b=n?d:d.viewport;a?b.animate({height:d.slides.eq(d.animatingTo).height()},a):b.height(d.slides.eq(d.animatingTo).height())}},sync:function(b){var c=a(d.vars.sync).data("flexslider"),e=d.animatingTo;switch(b){case"animate":c.flexAnimate(e,d.vars.pauseOnAction,!1,!0);break;case"play":c.playing||c.asNav||c.play();break;case"pause":c.pause()}},uniqueID:function(b){return b.find("[id]").each(function(){var b=a(this);b.attr("id",b.attr("id")+"_clone")}),b},pauseInvisible:{visProp:null,init:function(){var a=["webkit","moz","ms","o"];if("hidden"in document)return"hidden";for(var b=0;b<a.length;b++)a[b]+"Hidden"in document&&(p.pauseInvisible.visProp=a[b]+"Hidden");if(p.pauseInvisible.visProp){var c=p.pauseInvisible.visProp.replace(/[H|h]idden/,"")+"visibilitychange";document.addEventListener(c,function(){p.pauseInvisible.isHidden()?d.startTimeout?clearTimeout(d.startTimeout):d.pause():d.started?d.play():d.vars.initDelay>0?setTimeout(d.play,d.vars.initDelay):d.play()})}},isHidden:function(){return document[p.pauseInvisible.visProp]||!1}},setToClearWatchedEvent:function(){clearTimeout(j),j=setTimeout(function(){i=""},3e3)}},d.flexAnimate=function(b,c,f,h,i){if(d.vars.animationLoop||b===d.currentSlide||(d.direction=b>d.currentSlide?"next":"prev"),o&&1===d.pagingCount&&(d.direction=d.currentItem<b?"next":"prev"),!d.animating&&(d.canAdvance(b,i)||f)&&d.is(":visible")){if(o&&h){var j=a(d.vars.asNavFor).data("flexslider");if(d.atEnd=0===b||b===d.count-1,j.flexAnimate(b,!0,!1,!0,i),d.direction=d.currentItem<b?"next":"prev",j.direction=d.direction,Math.ceil((b+1)/d.visible)-1===d.currentSlide||0===b)return d.currentItem=b,d.slides.removeClass(e+"active-slide").eq(b).addClass(e+"active-slide"),!1;d.currentItem=b,d.slides.removeClass(e+"active-slide").eq(b).addClass(e+"active-slide"),b=Math.floor(b/d.visible)}if(d.animating=!0,d.animatingTo=b,c&&d.pause(),d.vars.before(d),d.syncExists&&!i&&p.sync("animate"),d.vars.controlNav&&p.controlNav.active(),m||d.slides.removeClass(e+"active-slide").eq(b).addClass(e+"active-slide"),d.atEnd=0===b||b===d.last,d.vars.directionNav&&p.directionNav.update(),b===d.last&&(d.vars.end(d),d.vars.animationLoop||d.pause()),n)g?(d.slides.eq(d.currentSlide).css({opacity:0,zIndex:1}),d.slides.eq(b).css({opacity:1,zIndex:2}),d.wrapup(q)):(d.slides.eq(d.currentSlide).css({zIndex:1}).animate({opacity:0},d.vars.animationSpeed,d.vars.easing),d.slides.eq(b).css({zIndex:2}).animate({opacity:1},d.vars.animationSpeed,d.vars.easing,d.wrapup));else{var r,s,t,q=k?d.slides.filter(":first").height():d.computedW;m?(r=d.vars.itemMargin,t=(d.itemW+r)*d.move*d.animatingTo,s=t>d.limit&&1!==d.visible?d.limit:t):s=0===d.currentSlide&&b===d.count-1&&d.vars.animationLoop&&"next"!==d.direction?l?(d.count+d.cloneOffset)*q:0:d.currentSlide===d.last&&0===b&&d.vars.animationLoop&&"prev"!==d.direction?l?0:(d.count+1)*q:l?(d.count-1-b+d.cloneOffset)*q:(b+d.cloneOffset)*q,d.setProps(s,"",d.vars.animationSpeed),d.transitions?(d.vars.animationLoop&&d.atEnd||(d.animating=!1,d.currentSlide=d.animatingTo),d.container.unbind("webkitTransitionEnd transitionend"),d.container.bind("webkitTransitionEnd transitionend",function(){clearTimeout(d.ensureAnimationEnd),d.wrapup(q)}),clearTimeout(d.ensureAnimationEnd),d.ensureAnimationEnd=setTimeout(function(){d.wrapup(q)},d.vars.animationSpeed+100)):d.container.animate(d.args,d.vars.animationSpeed,d.vars.easing,function(){d.wrapup(q)})}d.vars.smoothHeight&&p.smoothHeight(d.vars.animationSpeed)}},d.wrapup=function(a){n||m||(0===d.currentSlide&&d.animatingTo===d.last&&d.vars.animationLoop?d.setProps(a,"jumpEnd"):d.currentSlide===d.last&&0===d.animatingTo&&d.vars.animationLoop&&d.setProps(a,"jumpStart")),d.animating=!1,d.currentSlide=d.animatingTo,d.vars.after(d)},d.animateSlides=function(){!d.animating&&q&&d.flexAnimate(d.getTarget("next"))},d.pause=function(){clearInterval(d.animatedSlides),d.animatedSlides=null,d.playing=!1,d.vars.pausePlay&&p.pausePlay.update("play"),d.syncExists&&p.sync("pause")},d.play=function(){d.playing&&clearInterval(d.animatedSlides),d.animatedSlides=d.animatedSlides||setInterval(d.animateSlides,d.vars.slideshowSpeed),d.started=d.playing=!0,d.vars.pausePlay&&p.pausePlay.update("pause"),d.syncExists&&p.sync("play")},d.stop=function(){d.pause(),d.stopped=!0},d.canAdvance=function(a,b){var c=o?d.pagingCount-1:d.last;return b?!0:o&&d.currentItem===d.count-1&&0===a&&"prev"===d.direction?!0:o&&0===d.currentItem&&a===d.pagingCount-1&&"next"!==d.direction?!1:a!==d.currentSlide||o?d.vars.animationLoop?!0:d.atEnd&&0===d.currentSlide&&a===c&&"next"!==d.direction?!1:d.atEnd&&d.currentSlide===c&&0===a&&"next"===d.direction?!1:!0:!1},d.getTarget=function(a){return d.direction=a,"next"===a?d.currentSlide===d.last?0:d.currentSlide+1:0===d.currentSlide?d.last:d.currentSlide-1},d.setProps=function(a,b,c){var e=function(){var c=a?a:(d.itemW+d.vars.itemMargin)*d.move*d.animatingTo,e=function(){if(m)return"setTouch"===b?a:l&&d.animatingTo===d.last?0:l?d.limit-(d.itemW+d.vars.itemMargin)*d.move*d.animatingTo:d.animatingTo===d.last?d.limit:c;switch(b){case"setTotal":return l?(d.count-1-d.currentSlide+d.cloneOffset)*a:(d.currentSlide+d.cloneOffset)*a;case"setTouch":return l?a:a;case"jumpEnd":return l?a:d.count*a;case"jumpStart":return l?d.count*a:a;default:return a}}();return-1*e+"px"}();d.transitions&&(e=k?"translate3d(0,"+e+",0)":"translate3d("+e+",0,0)",c=void 0!==c?c/1e3+"s":"0s",d.container.css("-"+d.pfx+"-transition-duration",c),d.container.css("transition-duration",c)),d.args[d.prop]=e,(d.transitions||void 0===c)&&d.container.css(d.args),d.container.css("transform",e)},d.setup=function(b){if(n)d.slides.css({width:"100%","float":"left",marginRight:"-100%",position:"relative"}),"init"===b&&(g?d.slides.css({opacity:0,display:"block",webkitTransition:"opacity "+d.vars.animationSpeed/1e3+"s ease",zIndex:1}).eq(d.currentSlide).css({opacity:1,zIndex:2}):d.slides.css({opacity:0,display:"block",zIndex:1}).eq(d.currentSlide).css({zIndex:2}).animate({opacity:1},d.vars.animationSpeed,d.vars.easing)),d.vars.smoothHeight&&p.smoothHeight();else{var c,f;"init"===b&&(d.viewport=a('<div class="'+e+'viewport"></div>').css({overflow:"hidden",position:"relative"}).appendTo(d).append(d.container),d.cloneCount=0,d.cloneOffset=0,l&&(f=a.makeArray(d.slides).reverse(),d.slides=a(f),d.container.empty().append(d.slides))),d.vars.animationLoop&&!m&&(d.cloneCount=2,d.cloneOffset=1,"init"!==b&&d.container.find(".clone").remove(),p.uniqueID(d.slides.first().clone().addClass("clone").attr("aria-hidden","true")).appendTo(d.container),p.uniqueID(d.slides.last().clone().addClass("clone").attr("aria-hidden","true")).prependTo(d.container)),d.newSlides=a(d.vars.selector,d),c=l?d.count-1-d.currentSlide+d.cloneOffset:d.currentSlide+d.cloneOffset,k&&!m?(d.container.height(200*(d.count+d.cloneCount)+"%").css("position","absolute").width("100%"),setTimeout(function(){d.newSlides.css({display:"block"}),d.doMath(),d.viewport.height(d.h),d.setProps(c*d.h,"init")},"init"===b?100:0)):(d.container.width(200*(d.count+d.cloneCount)+"%"),d.setProps(c*d.computedW,"init"),setTimeout(function(){d.doMath(),d.newSlides.css({width:d.computedW,"float":"left",display:"block"}),d.vars.smoothHeight&&p.smoothHeight()},"init"===b?100:0))}m||d.slides.removeClass(e+"active-slide").eq(d.currentSlide).addClass(e+"active-slide"),d.vars.init(d)},d.doMath=function(){var a=d.slides.first(),b=d.vars.itemMargin,c=d.vars.minItems,e=d.vars.maxItems;d.w=void 0===d.viewport?d.width():d.viewport.width(),d.h=a.height(),d.boxPadding=a.outerWidth()-a.width(),m?(d.itemT=d.vars.itemWidth+b,d.minW=c?c*d.itemT:d.w,d.maxW=e?e*d.itemT-b:d.w,d.itemW=d.minW>d.w?(d.w-b*(c-1))/c:d.maxW<d.w?(d.w-b*(e-1))/e:d.vars.itemWidth>d.w?d.w:d.vars.itemWidth,d.visible=Math.floor(d.w/d.itemW),d.move=d.vars.move>0&&d.vars.move<d.visible?d.vars.move:d.visible,d.pagingCount=Math.ceil((d.count-d.visible)/d.move+1),d.last=d.pagingCount-1,d.limit=1===d.pagingCount?0:d.vars.itemWidth>d.w?d.itemW*(d.count-1)+b*(d.count-1):(d.itemW+b)*d.count-d.w-b):(d.itemW=d.w,d.pagingCount=d.count,d.last=d.count-1),d.computedW=d.itemW-d.boxPadding},d.update=function(a,b){d.doMath(),m||(a<d.currentSlide?d.currentSlide+=1:a<=d.currentSlide&&0!==a&&(d.currentSlide-=1),d.animatingTo=d.currentSlide),d.vars.c
14855ontrolNav&&!d.manualControls&&("add"===b&&!m||d.pagingCount>d.controlNav.length?p.controlNav.update("add"):("remove"===b&&!m||d.pagingCount<d.controlNav.length)&&(m&&d.currentSlide>d.last&&(d.currentSlide-=1,d.animatingTo-=1),p.controlNav.update("remove",d.last))),d.vars.directionNav&&p.directionNav.update()},d.addSlide=function(b,c){var e=a(b);d.count+=1,d.last=d.count-1,k&&l?void 0!==c?d.slides.eq(d.count-c).after(e):d.container.prepend(e):void 0!==c?d.slides.eq(c).before(e):d.container.append(e),d.update(c,"add"),d.slides=a(d.vars.selector+":not(.clone)",d),d.setup(),d.vars.added(d)},d.removeSlide=function(b){var c=isNaN(b)?d.slides.index(a(b)):b;d.count-=1,d.last=d.count-1,isNaN(b)?a(b,d.slides).remove():k&&l?d.slides.eq(d.last).remove():d.slides.eq(b).remove(),d.doMath(),d.update(c,"remove"),d.slides=a(d.vars.selector+":not(.clone)",d),d.setup(),d.vars.removed(d)},p.init()},a(window).blur(function(){focused=!1}).focus(function(){focused=!0}),a.flexslider.defaults={namespace:"flex-",selector:".slides > li",animation:"fade",easing:"swing",direction:"horizontal",reverse:!1,animationLoop:!0,smoothHeight:!1,startAt:0,slideshow:!0,slideshowSpeed:7e3,animationSpeed:600,initDelay:0,randomize:!1,thumbCaptions:!1,pauseOnAction:!0,pauseOnHover:!1,pauseInvisible:!0,useCSS:!0,touch:!0,video:!1,controlNav:!0,directionNav:!0,prevText:"Previous",nextText:"Next",keyboard:!0,multipleKeyboard:!1,mousewheel:!1,pausePlay:!1,pauseText:"Pause",playText:"Play",controlsContainer:"",manualControls:"",sync:"",asNavFor:"",itemWidth:0,itemMargin:0,minItems:1,maxItems:0,move:0,allowOneSlide:!0,start:function(){},before:function(){},after:function(){},end:function(){},added:function(){},removed:function(){},init:function(){}},a.fn.flexslider=function(b){if(void 0===b&&(b={}),"object"==typeof b)return this.each(function(){var c=a(this),d=b.selector?b.selector:".slides > li",e=c.find(d);1===e.length&&b.allowOneSlide===!0||0===e.length?(e.fadeIn(400),b.start&&b.start(c)):void 0===c.data("flexslider")&&new a.flexslider(this,b)});var c=a(this).data("flexslider");switch(b){case"play":c.play();break;case"pause":c.pause();break;case"stop":c.stop();break;case"next":c.flexAnimate(c.getTarget("next"),!0);break;case"prev":case"previous":c.flexAnimate(c.getTarget("prev"),!0);break;default:"number"==typeof b&&c.flexAnimate(b,!0)}}}(jQuery); 14856 14857 14858 14859 14860 14861 14862 14863 14864 14865 14866 14867 14868 14869 14870 14871 14872 14873 14874 14875 14876 14877 14878 14879 14880 14881 14882 14883 14884 14885 14886 14887 14888/*! VelocityJS.org (0.11.7). (C) 2014 Julian Shapiro. MIT @license: en.wikipedia.org/wiki/MIT_License */ 14889!function(e){"object"==typeof module&&"object"==typeof module.exports?module.exports=e(window.Velocity?window.jQuery:require("jquery")):"function"==typeof define&&define.amd?window.Velocity?define("velocity",e):define("velocity",["jquery"],e):e(window.jQuery)}(function(e){return function(t,r,a,o){function i(e){for(var t=-1,r=e?e.length:0,a=[];++t<r;){var o=e[t];o&&a.push(o)}return a}function n(e){return v.isNode(e)?[e]:e}function s(e){var t=$.data(e,f);return null===t?o:t}function l(e){return function(t){return Math.round(t*e)*(1/e)}}function u(e,t){var r=e;return v.isString(e)?S.Easings[e]||(r=!1):r=v.isArray(e)&&1===e.length?l.apply(null,e):v.isArray(e)&&2===e.length?b.apply(null,e.concat([t])):v.isArray(e)&&4===e.length?x.apply(null,e):!1,r===!1&&(r=S.Easings[S.defaults.easing]?S.defaults.easing:g),r}function c(e){if(e)for(var t=(new Date).getTime(),r=0,a=S.State.calls.length;a>r;r++)if(S.State.calls[r]){var i=S.State.calls[r],n=i[0],l=i[2],u=i[3];u||(u=S.State.calls[r][3]=t-16);for(var f=Math.min((t-u)/l.duration,1),d=0,g=n.length;g>d;d++){var m=n[d],y=m.element;if(s(y)){var x=!1;l.display&&"none"!==l.display&&V.setPropertyValue(y,"display",l.display),l.visibility&&"hidden"!==l.visibility&&V.setPropertyValue(y,"visibility",l.visibility);for(var b in m)if("element"!==b){var P=m[b],w,C=v.isString(P.easing)?S.Easings[P.easing]:P.easing;if(w=1===f?P.endValue:P.startValue+(P.endValue-P.startValue)*C(f),P.currentValue=w,V.Hooks.registered[b]){var T=V.Hooks.getRoot(b),k=s(y).rootPropertyValueCache[T];k&&(P.rootPropertyValue=k)}var E=V.setPropertyValue(y,b,P.currentValue+(0===parseFloat(w)?"":P.unitType),P.rootPropertyValue,P.scrollData);V.Hooks.registered[b]&&(s(y).rootPropertyValueCache[T]=V.Normalizations.registered[T]?V.Normalizations.registered[T]("extract",null,E[1]):E[1]),"transform"===E[0]&&(x=!0)}l.mobileHA&&s(y).transformCache.translate3d===o&&(s(y).transformCache.translate3d="(0px, 0px, 0px)",x=!0),x&&V.flushTransformCache(y)}}l.display&&"none"!==l.display&&(S.State.calls[r][2].display=!1),l.visibility&&"hidden"
14889!==l.visibility&&(S.State.calls[r][2].visibility=!1),l.progress&&l.progress.call(i[1],i[1],f,Math.max(0,u+l.duration-t),u),1===f&&p(r)}S.State.isTicking&&h(c)}function p(e,t){if(!S.State.calls[e])return!1;for(var r=S.State.calls[e][0],a=S.State.calls[e][1],i=S.State.calls[e][2],n=S.State.calls[e][4],l=!1,u=0,c=r.length;c>u;u++){var p=r[u].element;if(t||i.loop||("none"===i.display&&V.setPropertyValue(p,"display",i.display),"hidden"===i.visibility&&V.setPropertyValue(p,"visibility",i.visibility)),($.queue(p)[1]===o||!/\.velocityQueueEntryFlag/i.test($.queue(p)[1]))&&s(p)){s(p).isAnimating=!1,s(p).rootPropertyValueCache={};var f=!1;$.each(V.Lists.transforms3D,function(e,t){var r=/^scale/.test(t)?1:0,a=s(p).transformCache[t];s(p).transformCache[t]!==o&&new RegExp("^\\("+r+"[^.]").test(a)&&(f=!0,delete s(p).transformCache[t])}),i.mobileHA&&(f=!0,delete s(p).transformCache.translate3d),f&&V.flushTransformCache(p),V.Values.removeClass(p,"velocity-animating")}if(!t&&i.complete&&!i.loop&&u===c-1)try{i.complete.call(a,a)}catch(d){setTimeout(function(){throw d},1)}n&&i.loop!==!0&&n(a),i.loop!==!0||t||S(p,"reverse",{loop:!0,delay:i.delay}),i.queue!==!1&&$.dequeue(p,i.queue)}S.State.calls[e]=!1;for(var g=0,m=S.State.calls.length;m>g;g++)if(S.State.calls[g]!==!1){l=!0;break}l===!1&&(S.State.isTicking=!1,delete S.State.calls,S.State.calls=[])}var f="velocity",d=400,g="swing",m=function(){if(a.documentMode)return a.documentMode;for(var e=7;e>4;e--){var t=a.createElement("div");if(t.innerHTML="<!--[if IE "+e+"]><span></span><![endif]-->",t.getElementsByTagName("span").length)return t=null,e}return o}(),y=function(){var e=0;return r.webkitRequestAnimationFrame||r.mozRequestAnimationFrame||function(t){var r=(new Date).getTime(),a;return a=Math.max(0,16-(r-e)),e=r+a,setTimeout(function(){t(r+a)},a)}}(),h=r.requestAnimationFrame||y,v={isString:function(e){return"string"==typeof e},isArray:Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},isFunction:function(e){return"[object Function]"===Object.prototype.toString.call(e)},isNode:function(e){return e&&e.nodeType},isNodeList:function(e){return"object"==typeof e&&/^\[object (HTMLCollection|NodeList|Object)\]$/.test(Object.prototype.toString.call(e))&&e.length!==o&&(0===e.length||"object"==typeof e[0]&&e[0].nodeType>0)},isWrapped:function(e){return e&&(e.jquery||r.Zepto&&r.Zepto.zepto.isZ(e))},isSVG:function(e){return r.SVGElement&&e instanceof SVGElement},isEmptyObject:function(e){var t;for(t in e)return!1;return!0}},$;if(e&&e.fn!==o?$=e:r.Velocity&&r.Velocity.Utilities&&($=r.Velocity.Utilities),!$)throw new Error("Velocity: Either jQuery or Velocity's jQuery shim must first be loaded.");if(t.Velocity!==o&&t.Velocity.Utilities==o)throw new Error("Velocity: Namespace is occupied.");if(7>=m){if(e)return void(e.fn.velocity=e.fn.animate);throw new Error("Velocity: In IE<=7, Velocity falls back to jQuery, which must first be loaded.")}if(8===m&&!e)throw new Error("Velocity: In IE8, Velocity requires jQuery proper to be loaded; Velocity's jQuery shim does not work with IE8.");var S={State:{isMobile:/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent),isAndroid:/Android/i.test(navigator.userAgent),isGingerbread:/Android 2\.3\.[3-7]/i.test(navigator.userAgent),isChrome:r.chrome,isFirefox:/Firefox/i.test(navigator.userAgent),prefixElement:a.createElement("div"),prefixMatches:{},scrollAnchor:null,scrollPropertyLeft:null,scrollPropertyTop:null,isTicking:!1,calls:[]},CSS:{},Utilities:$,Sequences:{},Easings:{},Promise:r.Promise,defaults:{queue:"",duration:d,easing:g,begin:null,complete:null,progress:null,display:null,loop:!1,delay:!1,mobileHA:!0,_cacheValues:!0},init:function(e){$.data(e,f,{isSVG:v.isSVG(e),isAnimating:!1,computedStyle:null,tweensContainer:null,rootPropertyValueCache:{},transformCache:{}})},animate:null,hook:function(e,t,r){var a=o;return v.isWrapped(e)&&(e=[].slice.call(e)),$.each(n(e),function(e,i){if(s(i)===o&&S.init(i),r===o)a===o&&(a=S.CSS.getPropertyValue(i,t));else{var n=S.CSS.setPropertyValue(i,t,r);"transform"===n[0]&&S.CSS.flushTransformCache(i),a=n}}),a},mock:!1,version:{major:0,minor:11,patch:7},debug:!1};r.pageYOffset!==o?(S.State.scrollAnchor=r,S.State.scrollPropertyLeft="pageXOffset",S.State.scrollPropertyTop="pageYOffset"):(S.State.scrollAnchor=a.documentElement||a.body.parentNode||a.body,S.State.scrollPropertyLeft="scrollLeft",S.State.scrollPropertyTop="scrollTop");var x=function(){function e(e,t){return 1-3*t+3*e}function t(e,t){return 3*t-6*e}function r(e){return 3*e}function a(a,o,i){return((e(o,i)*a+t(o,i))*a+r(o))*a}
14889function o(a,o,i){return 3*e(o,i)*a*a+2*t(o,i)*a+r(o)}return function(e,t,r,i){function n(t){for(var i=t,n=0;8>n;++n){var s=o(i,e,r);if(0===s)return i;var l=a(i,e,r)-t;i-=l/s}return i}if(4!==arguments.length)return!1;for(var s=0;4>s;++s)if("number"!=typeof arguments[s]||isNaN(arguments[s])||!isFinite(arguments[s]))return!1;return e=Math.min(e,1),r=Math.min(r,1),e=Math.max(e,0),r=Math.max(r,0),function(o){return e===t&&r===i?o:a(n(o),t,i)}}}(),b=function(){function e(e){return-e.tension*e.x-e.friction*e.v}function t(t,r,a){var o={x:t.x+a.dx*r,v:t.v+a.dv*r,tension:t.tension,friction:t.friction};return{dx:o.v,dv:e(o)}}function r(r,a){var o={dx:r.v,dv:e(r)},i=t(r,.5*a,o),n=t(r,.5*a,i),s=t(r,a,n),l=1/6*(o.dx+2*(i.dx+n.dx)+s.dx),u=1/6*(o.dv+2*(i.dv+n.dv)+s.dv);return r.x=r.x+l*a,r.v=r.v+u*a,r}return function a(e,t,o){var i={x:-1,v:0,tension:null,friction:null},n=[0],s=0,l=1e-4,u=.016,c,p,f;for(e=parseFloat(e)||500,t=parseFloat(t)||20,o=o||null,i.tension=e,i.friction=t,c=null!==o,c?(s=a(e,t),p=s/o*u):p=u;;)if(f=r(f||i,p),n.push(1+f.x),s+=16,!(Math.abs(f.x)>l&&Math.abs(f.v)>l))break;return c?function(e){return n[e*(n.length-1)|0]}:s}}();!function(){S.Easings.linear=function(e){return e},S.Easings.swing=function(e){return.5-Math.cos(e*Math.PI)/2},S.Easings.spring=function(e){return 1-Math.cos(4.5*e*Math.PI)*Math.exp(6*-e)},S.Easings.ease=x(.25,.1,.25,1),S.Easings["ease-in"]=x(.42,0,1,1),S.Easings["ease-out"]=x(0,0,.58,1),S.Easings["ease-in-out"]=x(.42,0,.58,1);var e={};$.each(["Quad","Cubic","Quart","Quint","Expo"],function(t,r){e[r]=function(e){return Math.pow(e,t+2)}}),$.extend(e,{Sine:function(e){return 1-Math.cos(e*Math.PI/2)},Circ:function(e){return 1-Math.sqrt(1-e*e)},Elastic:function(e){return 0===e||1===e?e:-Math.pow(2,8*(e-1))*Math.sin((80*(e-1)-7.5)*Math.PI/15)},Back:function(e){return e*e*(3*e-2)},Bounce:function(e){for(var t,r=4;e<((t=Math.pow(2,--r))-1)/11;);return 1/Math.pow(4,3-r)-7.5625*Math.pow((3*t-2)/22-e,2)}}),$.each(e,function(e,t){S.Easings["easeIn"+e]=t,S.Easings["easeOut"+e]=function(e){return 1-t(1-e)},S.Easings["easeInOut"+e]=function(e){return.5>e?t(2*e)/2:1-t(-2*e+2)/2}})}();var V=S.CSS={RegEx:{isHex:/^#([A-f\d]{3}){1,2}$/i,valueUnwrap:/^[A-z]+\((.*)\)$/i,wrappedValueAlreadyExtracted:/[0-9.]+ [0-9.]+ [0-9.]+( [0-9.]+)?/,valueSplit:/([A-z]+\(.+\))|(([A-z0-9#-.]+?)(?=\s|$))/gi},Lists:{colors:["fill","stroke","stopColor","color","backgroundColor","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor","outlineColor"],transformsBase:["translateX","translateY","scale","scaleX","scaleY","skewX","skewY","rotateZ"],transforms3D:["transformPerspective","translateZ","scaleZ","rotateX","rotateY"]},Hooks:{templates:{textShadow:["Color X Y Blur","black 0px 0px 0px"],boxShadow:["Color X Y Blur Spread","black 0px 0px 0px 0px"],clip:["Top Right Bottom Left","0px 0px 0px 0px"],backgroundPosition:["X Y","0% 0%"],transformOrigin:["X Y Z","50% 50% 0px"],perspectiveOrigin:["X Y","50% 50%"]},registered:{},register:function(){for(var e=0;e<V.Lists.colors.length;e++)V.Hooks.templates[V.Lists.colors[e]]=["Red Green Blue Alpha","255 255 255 1"];var t,r,a;if(m)for(t in V.Hooks.templates){r=V.Hooks.templates[t],a=r[0].split(" ");var o=r[1].match(V.RegEx.valueSplit);"Color"===a[0]&&(a.push(a.shift()),o.push(o.shift()),V.Hooks.templates[t]=[a.join(" "),o.join(" ")])}for(t in V.Hooks.templates){r=V.Hooks.templates[t],a=r[0].split(" ");for(var e in a){var i=t+a[e],n=e;V.Hooks.registered[i]=[t,n]}}},getRoot:function(e){var t=V.Hooks.registered[e];return t?t[0]:e},cleanRootPropertyValue:function(e,t){return V.RegEx.valueUnwrap.test(t)&&(t=t.match(V.Hooks.RegEx.valueUnwrap)[1]),V.Values.isCSSNullValue(t)&&(t=V.Hooks.templates[e][1]),t},extractValue:function(e,t){var r=V.Hooks.registered[e];if(r){var a=r[0],o=r[1];return t=V.Hooks.cleanRootPropertyValue(a,t),t.toString().match(V.RegEx.valueSplit)[o]}return t},injectValue:function(e,t,r){var a=V.Hooks.registered[e];if(a){var o=a[0],i=a[1],n,s;return r=V.Hooks.cleanRootPropertyValue(o,r),n=r.toString().match(V.RegEx.valueSplit),n[i]=t,s=n.join(" ")}return r}},Normalizations:{registered:{clip:function(e,t,r){switch(e){case"name":return"clip";case"extract":var a;return V.RegEx.wrappedValueAlreadyExtracted.test(r)?a=r:(a=r.toString().match(V.RegEx.valueUnwrap
vendor: 14,838 bytes, line 14889
14889),a=a?a[1].replace(/,(\s+)?/g," "):r),a;case"inject":return"rect("+r+")"}},opacity:function(e,t,r){if(8>=m)switch(e){case"name":return"filter";case"extract":var a=r.toString().match(/alpha\(opacity=(.*)\)/i);return r=a?a[1]/100:1;case"inject":return t.style.zoom=1,parseFloat(r)>=1?"":"alpha(opacity="+parseInt(100*parseFloat(r),10)+")"}else switch(e){case"name":return"opacity";case"extract":return r;case"inject":return r}}},register:function(){9>=m||S.State.isGingerbread||(V.Lists.transformsBase=V.Lists.transformsBase.concat(V.Lists.transforms3D));for(var e=0;e<V.Lists.transformsBase.length;e++)!function(){var t=V.Lists.transformsBase[e];V.Normalizations.registered[t]=function(e,r,a){switch(e){case"name":return"transform";case"extract":return s(r)===o||s(r).transformCache[t]===o?/^scale/i.test(t)?1:0:s(r).transformCache[t].replace(/[()]/g,"");case"inject":var i=!1;switch(t.substr(0,t.length-1)){case"translate":i=!/(%|px|em|rem|vw|vh|\d)$/i.test(a);break;case"scal":case"scale":S.State.isAndroid&&s(r).transformCache[t]===o&&1>a&&(a=1),i=!/(\d)$/i.test(a);break;case"skew":i=!/(deg|\d)$/i.test(a);break;case"rotate":i=!/(deg|\d)$/i.test(a)}return i||(s(r).transformCache[t]="("+a+")"),s(r).transformCache[t]}}}();for(var e=0;e<V.Lists.colors.length;e++)!function(){var t=V.Lists.colors[e];V.Normalizations.registered[t]=function(e,r,a){switch(e){case"name":return t;case"extract":var i;if(V.RegEx.wrappedValueAlreadyExtracted.test(a))i=a;else{var n,s={black:"rgb(0, 0, 0)",blue:"rgb(0, 0, 255)",gray:"rgb(128, 128, 128)",green:"rgb(0, 128, 0)",red:"rgb(255, 0, 0)",white:"rgb(255, 255, 255)"};/^[A-z]+$/i.test(a)?n=s[a]!==o?s[a]:s.black:V.RegEx.isHex.test(a)?n="rgb("+V.Values.hexToRgb(a).join(" ")+")":/^rgba?\(/i.test(a)||(n=s.black),i=(n||a).toString().match(V.RegEx.valueUnwrap)[1].replace(/,(\s+)?/g," ")}return 8>=m||3!==i.split(" ").length||(i+=" 1"),i;case"inject":return 8>=m?4===a.split(" ").length&&(a=a.split(/\s+/).slice(0,3).join(" ")):3===a.split(" ").length&&(a+=" 1"),(8>=m?"rgb":"rgba")+"("+a.replace(/\s+/g,",").replace(/\.(\d)+(?=,)/g,"")+")"}}}()}},Names:{camelCase:function(e){return e.replace(/-(\w)/g,function(e,t){return t.toUpperCase()})},SVGAttribute:function(e){var t="width|height|x|y|cx|cy|r|rx|ry|x1|x2|y1|y2";return(m||S.State.isAndroid&&!S.State.isChrome)&&(t+="|transform"),new RegExp("^("+t+")$","i").test(e)},prefixCheck:function(e){if(S.State.prefixMatches[e])return[S.State.prefixMatches[e],!0];for(var t=["","Webkit","Moz","ms","O"],r=0,a=t.length;a>r;r++){var o;if(o=0===r?e:t[r]+e.replace(/^\w/,function(e){return e.toUpperCase()}),v.isString(S.State.prefixElement.style[o]))return S.State.prefixMatches[e]=o,[o,!0]}return[e,!1]}},Values:{hexToRgb:function(e){var t=/^#?([a-f\d])([a-f\d])([a-f\d])$/i,r=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,a;return e=e.replace(t,function(e,t,r,a){return t+t+r+r+a+a}),a=r.exec(e),a?[parseInt(a[1],16),parseInt(a[2],16),parseInt(a[3],16)]:[0,0,0]},isCSSNullValue:function(e){return 0==e||/^(none|auto|transparent|(rgba\(0, ?0, ?0, ?0\)))$/i.test(e)},getUnitType:function(e){return/^(rotate|skew)/i.test(e)?"deg":/(^(scale|scaleX|scaleY|scaleZ|alpha|flexGrow|flexHeight|zIndex|fontWeight)$)|((opacity|red|green|blue|alpha)$)/i.test(e)?"":"px"},getDisplayType:function(e){var t=e.tagName.toString().toLowerCase();return/^(b|big|i|small|tt|abbr|acronym|cite|code|dfn|em|kbd|strong|samp|var|a|bdo|br|img|map|object|q|script|span|sub|sup|button|input|label|select|textarea)$/i.test(t)?"inline":/^(li)$/i.test(t)?"list-item":/^(tr)$/i.test(t)?"table-row":"block"},addClass:function(e,t){e.classList?e.classList.add(t):e.className+=(e.className.length?" ":"")+t},removeClass:function(e,t){e.classList?e.classList.remove(t):e.className=e.className.toString().replace(new RegExp("(^|\\s)"+t.split(" ").join("|")+"(\\s|$)","gi")," ")}},getPropertyValue:function(e,t,a,i){function n(e,t){function a(){u&&V.setPropertyValue(e,"display","none")}var l=0;if(8>=m)l=$.css(e,t);else{var u=!1;if(/^(width|height)$/.test(t)&&0===V.getPropertyValue(e,"display")&&(u=!0,V.setPropertyValue(e,"display",V.Values.getDisplayType(e))),!i){if("height"===t&&"border-box"!==V.getPropertyValue(e,"boxSizing").toString().toLowerCase()){var c=e.offsetHeight-(parseFloat(V.getPropertyValue(e,"borderTopWidth"))||0)-(parseFloat(V.getPropertyValue(e,"borderBottomWidth"))||0)-(parseFloat(V.getPropertyValue(e,"paddingTop"))||0)-(parseFloat(V.getPropertyValue(e,"paddingBottom"))||0);return a(),c}if("width"===t&&"border-box"!==V.getPropertyValue(e,"boxSizing").toString().toLowerCase()){var p=e.offsetWidth-(parseFloat(V.getPropertyValue(e,"borderLeftWidth"))||0)-(parseFloat(V.getPropertyValue(e,"borderRightWidth"))||0)-(parseFloat(V.getPropertyValue(e,"paddingLeft"))||0)-(parseFloat(V.getPropertyValue(e,"paddingRight"))||0);return a(),p}}var f;f=s(e)===o?r.getComputedStyle(e,null):s(e).computedStyle?s(e).computedStyle:s(e).computedStyle=r.getComputedStyle(e,null),(m||S.State.isFirefox)&&"borderColor"===t&&(t="borderTopColor"),l=9===m&&"filter"===t?f.getPropertyValue(t):f[t],(""===l||null===l)&&(l=e.style[t]),a()}if("auto"===l&&/^(top|right|bottom|left)$/i.test(t)){var d=n(e,"position");("fixed"===d||"absolute"===d&&/top|left/i.test(t))&&(l=$(e).position()[t]+"px")}return l}var l;if(V.Hooks.registered[t]){var u=t,c=V.Hooks.getRoot(u);a===o&&(a=V.getPropertyValue(e,V.Names.prefixCheck(c)[0])),V.Normalizations.registered[c]&&(a=V.Normalizations.registered[c]("extract",e,a)),l=V.Hooks.extractValue(u,a)}else if(V.Normalizations.registered[t]){var p,f;p=V.Normalizations.registered[t]("name",e),"transform"!==p&&(f=n(e,V.Names.prefixCheck(p)[0]),V.Values.isCSSNullValue(f)&&V.Hooks.templates[t]&&(f=V.Hooks.templates[t][1])),l=V.Normalizations.registered[t]("extract",e,f)}return/^[\d-]/.test(l)||(l=s(e)&&s(e).isSVG&&V.Names.SVGAttribute(t)?/^(height|width)$/i.test(t)?e.getBBox()[t]:e.getAttribute(t):n(e,V.Names.prefixCheck(t)[0])),V.Values.isCSSNullValue(l)&&(l=0),S.debug>=2&&console.log("Get "+t+": "+l),l},setPropertyValue:function(e,t,a,o,i){var n=t;if("scroll"===t)i.container?i.container["scroll"+i.direction]=a:"Left"===i.direction?r.scrollTo(a,i.alternateValue):r.scrollTo(i.alternateValue,a);else if(V.Normalizations.registered[t]&&"transform"===V.Normalizations.registered[t]("name",e))V.Normalizations.registered[t]("inject",e,a),n="transform",a=s(e).transformCache[t];else{if(V.Hooks.registered[t]){var l=t,u=V.Hooks.getRoot(t);o=o||V.getPropertyValue(e,u),a=V.Hooks.injectValue(l,a,o),t=u}if(V.Normalizations.registered[t]&&(a=V.Normalizations.registered[t]("inject",e,a),t=V.Normalizations.registered[t]("name",e)),n=V.Names.prefixCheck(t)[0],8>=m)try{e.style[n]=a}catch(c){S.debug&&console.log("Browser does not support ["+a+"] for ["+n+"]")}else s(e)&&s(e).isSVG&&V.Names.SVGAttribute(t)?e.setAttribute(t,a):e.style[n]=a;S.debug>=2&&console.log("Set "+t+" ("+n+"): "+a)}return[n,a]},flushTransformCache:function(e){function t(t){return parseFloat(V.getPropertyValue(e,t))}var r="";if((m||S.State.isAndroid&&!S.State.isChrome)&&s(e).isSVG){var a={translate:[t("translateX"),t("translateY")],skewX:[t("skewX")],skewY:[t("skewY")],scale:1!==t("scale")?[t("scale"),t("scale")]:[t("scaleX"),t("scaleY")],rotate:[t("rotateZ"),0,0]};$.each(s(e).transformCache,function(e){/^translate/i.test(e)?e="translate":/^scale/i.test(e)?e="scale":/^rotate/i.test(e)&&(e="rotate"),a[e]&&(r+=e+"("+a[e].join(" ")+") ",delete a[e])})}else{var o,i;$.each(s(e).transformCache,function(t){return o=s(e).transformCache[t],"transformPerspective"===t?(i=o,!0):(9===m&&"rotateZ"===t&&(t="rotate"),void(r+=t+o+" "))}),i&&(r="perspective"+i+" "+r)}V.setPropertyValue(e,"transform",r)}};V.Hooks.register(),V.Normalizations.register();var P=function(){function e(){return f?T.promise||null:g}function t(){function e(e){function f(e,r){var a=o,i=o,s=o;return v.isArray(e)?(a=e[0],!v.isArray(e[1])&&/^[\d-]/.test(e[1])||v.isFunction(e[1])||V.RegEx.isHex.test(e[1])?s=e[1]:(v.isString(e[1])&&!V.RegEx.isHex.test(e[1])||v.isArray(e[1]))&&(i=r?e[1]:u(e[1],n.duration),e[2]!==o&&(s=e[2]))):a=e,r||(i=i||n.easing),v.isFunction(a)&&(a=a.call(t,P,b)),v.isFunction(s)&&(s=s.call(t,P,b)),[a||0,i,s]}function d(e,t){var r,a;return a=(t||0).toString().toLowerCase().replace(/[%A-z]+$/,function(e){return r=e,""}),r||(r=V.Values.getUnitType(e)),[a,r]}function g(){var e={myParent:t.parentNode||a.body,position:V.getPropertyValue(t,"position"),fontSize:V.getPropertyValue(t,"fontSize")},o=e.position===N.lastPosition&&e.myParent===N.lastParent,i=e.fontSize===N.lastFontSize;N.lastParent=e.myParent,N.lastPosition=e.position,N.lastFontSize=e.fontSize;var n=100,l={};if(i&&o)l.emToPx=N.lastEmToPx,l.percentToPxWidth=N.lastPercentToPxWidth,l.percentToPxHeight=N.lastPercentToPxHeight;else{var u=s(t).isSVG?a.createElementNS("http://www.w3.org/2000/svg","rect"):a.createElement("div");S.init(u),e.myParent.appendChild(u),S.CSS.setPropertyValue(u,"position",e.position),S.CSS.setPropertyValue(u,"fontSize",e.fontSize),S.CSS.setPropertyValue(u,"overflow","hidden"),S.CSS.setPropertyValue(u,"overflowX","hidden"),S.CSS.setPropertyValue(u,"overflowY","hidden"),S.CSS.setPropertyValue(u,"boxSizing","content-box"),S.CSS.setPropertyValue(u,"paddingLeft",n+"em"),S.CSS.setPropertyValue(u,"minWidth",n+"%"),S.CSS.setPropertyValue(u,"maxWidth",n+"%"),S.CSS.setPropertyValue(u,"width",n+"%"),S.CSS.setPropertyValue(u,"minHeight",n+"%"),S.CSS.setPropertyValue(u,"maxHeight",n+"%"),S.CSS.setPropertyValue(u,"height",n+"%"),l.percentToPxWidth=N.lastPercentToPxWidth=(parseFloat(V.getPropertyValue(u,"width",null,!0))||1)/n,l.percentToPxHeight=N.lastPercentToPxHeight=(parseFloat(V.getPropertyValue(u,"height",null,!0))||1)/n,l.emToPx=N.lastEmToPx=(parseFloat(V.getPropertyValue(u,"paddingLeft"))||1)/n,e.myParent.removeChild(u)}return null===N.remToPx&&(N.remToPx=parseFloat(V.getPropertyValue(a.body,"fontSize"))||16),null===N.vwToPx&&(N.vwToPx=parseFloat(r.innerWidth)/100,N.vhToPx=parseFloat(r.innerHeight)/100),l.remToPx=N.remToPx,l.vwToPx=N.vwToPx,l.vhToPx=N.vhToPx,S.debug>=1&&console.log("Unit ratios: "+JSON.stringify(l),t),l}if(n.begin&&0===P)try{n.begin.call(y,y)}catch(m){setTimeout(function(){throw m},1)}if("scroll"===k){var w=/^x$/i.test(n.axis)?"Left":"Top",C=parseFloat(n.offset)||0,E,F,A;n.container?v.isWrapped(n.container)||v.isNode(n.container)?(n.container=n.container[0]||n.container,E=n.container["scroll"+w],A=E+$(t).position()[w.toLowerCase()]+C):n.container=null:(E=S.State.scrollAnchor[S.State["scrollProperty"+w]],F=S.State.scrollAnchor[S.State["scrollProperty"+("Left"===w?"Top":"Left")]],A=$(t).offset()[w.toLowerCase()]+C),l={scroll:{rootPropertyValue:!1,startValue:E,currentValue:E,endValue:A,unitType:"",easing:n.easing,scrollData:{container:n.container,direction:w,alternateValue:F}},element:t},S.debug&&console.log("tweensContainer (scroll): ",l.scroll,t)}else if("reverse"===k){if(!s(t).tweensContainer)return void $.dequeue(t,n.queue);"none"===s(t).opts.display&&(s(t).opts.display="block"),"hidden"===s(t).opts.visibility&&(s(t).opts.visibility="visible"),s(t).opts.loop=!1,s(t).opts.begin=null,s(t).opts.complete=null,x.easing||delete n.easing,x.duration||delete n.duration,n=$.extend({},s(t).opts,n);var H=$.extend(!0,{},s(t).tweensContainer);for(var L in H)if("element"!==L){var z=H[L].startValue;H[L].startValue=H[L].currentValue=H[L].endValue,H[L].endValue=z,v.isEmptyObject(x)||(H[L].easing=n.easing),S.debug&&console.log("reverse tweensContainer ("+L+"): "+JSON.stringify(H[L]),t)}l=H}else if("start"===k){var H;s(t).tweensContainer&&s(t).isAnimating===!0&&(H=s(t).tweensContainer),$.each(h,function(e,t){if(RegExp("^"+V.Lists.colors.join("$|^")+"$").test(e)){var r=f(t,!0),a=r[0],i=r[1],n=r[2];if(V.RegEx.isHex.test(a)){for(var s=["Red","Green","Blue"],l=V.Values.hexToRgb(a),u=n?V.Values.hexToRgb(n):o,c=0;c<s.length;c++)h[e+s[c]]=[l[c],i,u?u[c]:u];delete h[e]}}});for(var M in h){var R=f(h[M]),q=R[0],B=R[1],O=R[2];M=V.Names.camelCase(M);var W=V.Hooks.getRoot(M),I=!1;if(s(t).isSVG||V.Names.prefixCheck(W)[1]!==!1||V.Normalizations.registered[W]!==o){(n.display&&"none"!==n.display||n.visibility&&"hidden"!==n.visibility)&&/opacity|filter/.test(M)&&!O&&0!==q&&(O=0),n._cacheValues&&H&&H[M]?(O===o&&(O=H[M].endValue+H[M].unitType),I=s(t).rootPropertyValueCache[W]):V.Hooks.registered[M]?O===o?(I=V.getPropertyValue(t,W),O=V.getPropertyValue(t,M,I)):I=V.Hooks.templates[W][1]:O===o&&(O=V.getPropertyValue(t,M));var X,Y,G,U=!1;if(X=d(M,O),O=X[0],G=X[1],X=d(M,q),q=X[0].replace(/^([+-\/*])=/,function(e,t){return U=t,""}),Y=X[1],O=parseFloat(O)||0,q=parseFloat(q)||0,"%"===Y&&(/^(fontSize|lineHeight)$/.test(M)?(q/=100,Y="em"):/^scale/.test(M)?(q/=100,Y=""):/(Red|Green|Blue)$/i.test(M)&&(q=q/100*255,Y="")),/[\/*]/.test(U))Y=G;else if(G!==Y&&0!==O)if(0===q)Y=G;else{p=p||g();var D=/margin|padding|left|right|width|text|word|letter/i.test(M)||/X$/.test(M)?"x":"y";switch(G){case"%":O*="x"===D?p.percentToPxWidth:p.percentToPxHeight;break;case"px":break;default:O*=p[G+"ToPx"]}switch(Y){case"%":O*=1/("x"===D?p.percentToPxWidth:p.percentToPxHeight);break;case"px":break;default:O*=1/p[Y+"ToPx"]}}switch(U){case"+":q=O+q;break;case"-":q=O-q;break;case"*":q=O*q;break;case"/":q=O/q}l[M]={rootPropertyValue:I,startValue:O,currentValue:O,endValue:q,unitType:Y,easing:B},S.debug&&console.log("tweensContainer ("+M+"): "+JSON.stringify(l[M]),t)}else S.debug&&console.log("Skipping ["+W+"] due to a lack of browser support.")}l.element=t}l.element&&(V.Values.addClass(t,"velocity-animating"),j.push(l),n.queue!==!1&&(s(t).tweensContainer=l),s(t).opts=n,s(t).isAnimating=!0,P===b-1?(S.State.calls.length>1e4&&(S.State.calls=i(S.State.calls)),S.State.calls.push([j,y,n,null,T.resolver]),S.State.isTicking===!1&&(S.State.isTicking=!0,c())):P++)}var t=this,n=$.extend({},S.defaults,x),l={},p;if(s(t)===o&&S.init(t),parseFloat(n.delay)&&n.queue!==!1&&$.queue(t,n.queue,function(e){S.velocityQueueEntryFlag=!0,s(t).delayTimer={setTimeout:setTimeout(e,parseFloat(n.delay)),next:e}}),S.mock===!0)n.duration=1;else switch(n.duration.toString().toLowerCase()){case"fast":n.duration=200;break;case"normal":n.duration=d;break;case"slow":n.duration=600;break;default:n.duration=parseFloat(n.duration)||1}n.easing=u(n.easing,n.duration),n.begin&&!v.isFunction(n.begin)&&(n.begin=null),n.progress&&!v.isFunction(n.progress)&&(n.progress=null),n.complete&&!v.isFunction(n.complete)&&(n.complete=null),n.display&&(n.display=n.display.toString().toLowerCase(),"auto"===n.display&&(n.display=S.CSS.Values.getDisplayType(t))),n.visibility&&(n.visibility=n.visibility.toString().toLowerCase()),n.mobileHA=n.mobileHA&&S.State.isMobile&&!S.State.isGingerbread,n.queue===!1?n.delay?setTimeout(e,n.delay):e():$.queue(t,n.queue,function(t,r){return r===!0?(T.promise&&T.resolver(y),!0):(S.velocityQueueEntryFlag=!0,void e(t))}),""!==n.queue&&"fx"!==n.queue||"inprogress"===$.queue(t)[0]||$.dequeue(t)}
14889var l=arguments[0]&&($.isPlainObject(arguments[0].properties)&&!arguments[0].properties.names||v.isString(arguments[0].properties)),f,g,m,y,h,x;if(v.isWrapped(this)?(f=!1,m=0,y=this,g=this):(f=!0,m=1,y=l?arguments[0].elements:arguments[0]),y=v.isWrapped(y)?[].slice.call(y):y){l?(h=arguments[0].properties,x=arguments[0].options):(h=arguments[m],x=arguments[m+1]);var b=v.isArray(y)||v.isNodeList(y)?y.length:1,P=0;if("stop"!==h&&!$.isPlainObject(x)){var w=m+1;x={};for(var C=w;C<arguments.length;C++)!v.isArray(arguments[C])&&/^\d/.test(arguments[C])?x.duration=parseFloat(arguments[C]):v.isString(arguments[C])||v.isArray(arguments[C])?x.easing=arguments[C]:v.isFunction(arguments[C])&&(x.complete=arguments[C])}var T={promise:null,resolver:null,rejecter:null};f&&S.Promise&&(T.promise=new S.Promise(function(e,t){T.resolver=e,T.rejecter=t}));var k;switch(h){case"scroll":k="scroll";break;case"reverse":k="reverse";break;case"stop":$.each(n(y),function(e,t){s(t)&&s(t).delayTimer&&(clearTimeout(s(t).delayTimer.setTimeout),s(t).delayTimer.next&&s(t).delayTimer.next(),delete s(t).delayTimer)});var E=[];return $.each(S.State.calls,function(e,t){t&&$.each(n(t[1]),function(t,r){$.each(n(y),function(t,a){if(a===r){if(s(a)&&$.each(s(a).tweensContainer,function(e,t){t.endValue=t.currentValue}),x===!0||v.isString(x)){var o=v.isString(x)?x:"";$.each($.queue(a,o),function(e,t){v.isFunction(t)&&t(null,!0)}),$.queue(a,o,[])}E.push(e)}})})}),$.each(E,function(e,t){p(t,!0)}),T.promise&&T.resolver(y),e();default:if(!$.isPlainObject(h)||v.isEmptyObject(h)){if(v.isString(h)&&S.Sequences[h]){var F=x.duration,A=x.delay||0;return x.backwards===!0&&(y=(v.isWrapped(y)?[].slice.call(y):y).reverse()),$.each(n(y),function(e,t){parseFloat(x.stagger)?x.delay=A+parseFloat(x.stagger)*e:v.isFunction(x.stagger)&&(x.delay=A+x.stagger.call(t,e,b)),x.drag&&(x.duration=parseFloat(F)||(/^(callout|transition)/.test(h)?1e3:d),x.duration=Math.max(x.duration*(x.backwards?1-e/b:(e+1)/b),.75*x.duration,200)),S.Sequences[h].call(t,t,x||{},e,b,y,T.promise?T:o)}),e()}var H="Velocity: First argument ("+h+") was not a property map, a known action, or a registered sequence. Aborting.";return T.promise?T.rejecter(new Error(H)):console.log(H),e()}k="start"}var N={lastParent:null,lastPosition:null,lastFontSize:null,lastPercentToPxWidth:null,lastPercentToPxHeight:null,lastEmToPx:null,remToPx:null,vwToPx:null,vhToPx:null},j=[];$.each(n(y),function(e,r){v.isNode(r)&&t.call(r)});var L=$.extend({},S.defaults,x),z;if(L.loop=parseInt(L.loop),z=2*L.loop-1,L.loop)for(var M=0;z>M;M++){var R={delay:L.delay};M===z-1&&(R.display=L.display,R.visibility=L.visibility,R.complete=L.complete),S(y,"reverse",R)}return e()}};S=$.extend(P,S),S.animate=P,S.State.isMobile||a.hidden===o||a.addEventListener("visibilitychange",function(){a.hidden?(h=function(e){return setTimeout(function(){e(!0)},16)},c()):h=r.requestAnimationFrame||y});var w;return e&&e.fn!==o?w=e:r.Zepto&&(w=r.Zepto),(w||r).Velocity=S,w&&(w.fn.velocity=P,w.fn.velocity.defaults=S.defaults),$.each(["Down","Up"],function(e,t){S.Sequences["slide"+t]=function(e,r,a,o,i,n){var s=$.extend({},r),l={height:null,marginTop:null,marginBottom:null,paddingTop:null,paddingBottom:null,overflow:null,overflowX:null,overflowY:null},u=s.begin,c=s.complete,p=!1;null!==s.display&&(s.display="Down"===t?s.display||"auto":s.display||"none"),s.begin=function(){function r(){l.height=parseFloat(S.CSS.getPropertyValue(e,"height")),e.style.height="auto",parseFloat(S.CSS.getPropertyValue(e,"height"))===l.height&&(p=!0),S.CSS.setPropertyValue(e,"height",l.height+"px")}if("Down"===t){l.overflow=[S.CSS.getPropertyValue(e,"overflow"),0],l.overflowX=[S.CSS.getPropertyValue(e,"overflowX"),0],l.overflowY=[S.CSS.getPropertyValue(e,"overflowY"),0],e.style.overflow="hidden",e.style.overflowX="visible",e.style.overflowY="hidden",r();for(var a in l)if(!/^overflow/.test(a)){var o=S.CSS.getPropertyValue(e,a);"height"===a&&(o=parseFloat(o)),l[a]=[o,0]}}else{r();for(var a in l){var o=S.CSS.getPropertyValue(e,a);"height"===a&&(o=parseFloat(o)),l[a]=[0,o]}e.style.overflow="hidden",e.style.overflowX="visible",e.style.overflowY="hidden"}u&&u.call(e,e)},s.complete=function(e){var r="Down"===t?0:1;p===!0?l.height[r]="auto":l.height[r]+="px";for(var a in l)e.style[a]=l[a][r];
14889c&&c.call(e,e),n&&n.resolver(i||e)},S(e,l,s)}}),$.each(["In","Out"],function(e,t){S.Sequences["fade"+t]=function(e,r,a,o,i,n){var s=$.extend({},r),l={opacity:"In"===t?1:0};if(a!==o-1)s.complete=s.begin=null;else{var u=s.complete;s.complete=function(){u&&u.call(e,e),n&&n.resolver(i||e)}}null!==s.display&&(s.display=s.display||("In"===t?"auto":"none")),S(this,l,s)}}),S}(e||window,window,document)});
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.