Mingdao JS webpro

From 2014hs.igem.org

Revision as of 13:45, 16 June 2014 by F91445122 (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

/*

Copyright (c) 2012. Adobe Systems Incorporated.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
Neither the name of Adobe Systems Incorporated nor the names of its
contributors may be used to endorse or promote products derived from this
software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
  • /

(function(a,b){function c(){}var d={version:0.1,inherit:function(a,b){var c=function(){};c.prototype=b.prototype;a.prototype=new c;a.prototype.constructor=a;a.prototype._super=b},ensureArray:function(){var b=[],c=arguments.length;c>0&&(b=c>1||!a.isArray(arguments[0])?a.makeArray(arguments):arguments[0]);return b},scopedFind:function(b,c,d,g){for(var d=" "+d+" ",j=[],b=a(b).find(c),c=b.length,g=a(g)[0],i=0;i<c;i++)for(var m=b[i],l=m;l;){if(l.className&&(" "+l.className+" ").indexOf(d)!==-1){l===g&& j.push(m);break}l=l.parentNode}return a(j)}};a.extend(c.prototype,{bind:function(b,c,d){return a(this).bind(b,c,d)},unbind:function(b,c){return a(this).unbind(b,c)},trigger:function(b,c){var d=a.Event(b);a(this).trigger(d,c);return d}});d.EventDispatcher=c;b.WebPro=d})(jQuery,window,document); (function(a,b){var c=1;b.ImageLoader=function(c){b.EventDispatcher.call();var f=this;this.options=a.extend({},this.defaultOptions,c);this._currentEntry=null;this._queue=[];this._isRunning=this._needsSort=!1;this._loader=new Image;this._loadFunc=function(){f._handleLoad()};this._loadErrorFunc=function(){f._handleError()};this._timeoutFunc=function(){f.trigger("wp-image-loader-timeout",this._currentEntry);f._loadNext()}};b.inherit(b.ImageLoader,b.EventDispatcher);a.extend(b.ImageLoader.prototype,{defaultOptions:{timeoutInterval:1E3}, add:function(d,f){if(d){urls=b.ensureArray(d);for(var h=0;h<urls.length;h++){var k=a.extend({reqId:c++,src:urls[h],width:0,height:0,priority:50,callback:null,data:null},f);this._queue.push(k);this._needsSort=!0;this.trigger("wp-image-loader-add",k)}this._isRunning&&!this._currentEntry&&this._loadNext()}},reprioritize:function(a,b){if(!(this._currentEntry&&this._currentEntry.src==a)){var c;for(c=0;c<this._queue.length;++c)if(this._queue[c].src==a)break;if(c!=0&&c<this._queue.length)this._queue=this._queue.splice(c, b?this._queue.length-c:1).concat(this._queue)}},start:function(){if(!this._isRunning)this._isRunning=!0,this._loadNext(),this.trigger("wp-image-loader-start")},stop:function(){if(this._isRunning)this._currentEntry&&this._queue.unshift(this._currentEntry),this._resetLoader(),this._isRunning=!1,this.trigger("wp-image-loader-stop")},clearQueue:function(){var a=this._isRunning;this.stop();this._queue.length=0;a&&this.start()},isQueueEmpty:function(){return this._queue.length==0},_loadNext:function(){var d; this._resetLoader();var a=this._queue;if(a.length){if(this._needsSort)d=this._queue=a.sort(function(a,b){var c=a.priority-b.priority;return c?c:a.reqId-b.reqId}),a=d,this._needsSort=!1;this._currentEntry=a=a.shift();var b=this._loader;b.onload=this._loadFunc;b.onerror=this._loadErrorFunc;b.src=a.src}},_resetLoader:function(){var a=this._loader;a.onload=null;a.onerror=null;this._currentEntry=a.src=null;if(this._timeoutTimerId)clearTimeout(this._timeoutTimerId),this._timeoutTimerId=0},_handleLoad:function(){var a= this._loader,b=this._currentEntry;b.width=a.width;b.height=a.height;b.callback&&b.callback(b.src,b.width,b.height,b.data);this.trigger("wp-image-loader-load-success",b);this._loadNext()},_handleError:function(){this.trigger("wp-image-loader-load-error",this._currentEntry);this._loadNext()}})})(jQuery,WebPro,window,document); (function(a,b){function c(){b.EventDispatcher.call(this);this._initialize.apply(this,arguments)}b.inherit(c,b.EventDispatcher);a.extend(c.prototype,{defaultOptions:{},_widgetName:"Widget",_initialize:function(){var b;this.plugins=[];var c=this.trigger("before-setup");c.isDefaultPrevented()||(b=this._setUp.apply(this,arguments),this.trigger("setup"));c=this.trigger("before-init-plugins");c.isDefaultPrevented()||(this._initializePlugins(b),this.trigger("init-plugins"));this.options=a.extend({},this.defaultOptions, b);c=this.trigger("before-extract-data");c.isDefaultPrevented()||(this._extractData(),this.trigger("extract-data"));c=this.trigger("before-transform-markup");c.isDefaultPrevented()||(this._transformMarkup(),this.trigger("transform-markup"));c=this.trigger("before-attach-behavior");c.isDefaultPrevented()||(this._attachBehavior(),this.trigger("attach-behavior"));c=this.trigger("before-ready");c.isDefaultPrevented()||(this._ready(),this.trigger("ready"))},_setUp:function(b,c){this.$element=a(b);return c}, _initializePlugins:function(a){for(var a=a||{},b=((typeof a.useDefaultPlugins==="undefined"||a.useDefaultPlugins)&&this.defaultPlugins?this.defaultPlugins:[]).concat(a.plugins||[]),b=b.sort(function(a,b){a=typeof a.priority==="number"?a.priority:50;b=typeof b.priority==="number"?b.priority:50;return a-b}),c=0;c1&&h[0]||"Widget";c=h[g-1];b[namespace][c]=f}})(jQuery,WebPro,window,document); (function(a,b){b.widget("Widget.Button",b.Widget,{defaultOptions:{hoverClass:"wp-button-hover",activeClass:"wp-button-down",disabledClass:"wp-button-disabled",disabled:!1,callback:null},_attachBehavior:function(){var b=this,d=function(f){b.mouseDown=!1;b.$element.removeClass(b.options.activeClass);!b.options.disabled&&b.options.callback&&b.options.callback.call(this,f);a(b.$element).off("mouseup",d)};this.mouseDown=!1;this.$element.on("mouseover",function(){b.options.disabled||b.$element.addClass(b.options.hoverClass+ (b.mouseDown?" "+b.options.activeClass:""))}).on("mouseleave",function(){b.$element.removeClass(b.options.hoverClass+" "+b.options.activeClass);a(b.$element).off("mouseup",d)}).on("mousedown",function(){if(!b.options.disabled)b.mouseDown=!0,b.$element.addClass(b.options.activeClass),a(b.$element).on("mouseup",d)});this.disabled(this.options.disabled)},disabled:function(a){if(typeof a==="boolean")this.options.disabled=a,this.$element[a?"addClass":"removeClass"](this.options.disabledClass);return this.options.disabled}}); a.fn.wpButton=function(a){this.each(function(){new b.Widget.Button(this,a)});return this}})(jQuery,WebPro,window,document); (function(a,b){b.widget("Widget.RadioGroup",b.Widget,{_widgetName:"radio-group",defaultOptions:{defaultIndex:0,hoverClass:"wp-radio-hover",downClass:"wp-radio-down",disabledClass:"wp-radio-disabled",checkedClass:"wp-radio-checked",disabled:!1,toggleStateEnabled:!1},_attachBehavior:function(){var a=this;this.buttons=[];this.activeElement=null;this.activeIndex=-1;this.$element.each(function(){a.buttons.push(a._addButtonBehavior(this))});this.disabled(this.options.disabled)},_addButtonBehavior:function(a){var d= this,f=new b.Widget.Button(a,{hoverClass:this.options.hoverClass,downClass:this.options.downClass,disabledClass:this.options.disabledClass,callback:function(b){return d._handleClick(b,f,a)}});return f},_handleClick:function(a,b,f){this.options.disabled||this.checkButton(f)},_getElementIndex:function(b){return b?a.inArray(b,this.$element.get()):-1},_getElementByIndex:function(a){return a>=0?this.$element.eq(a)[0]:null},_getElement:function(a){return typeof a==="number"?this._getElementByIndex(a):a}, checkButton:function(b){var b=this._getElement(b),d=this.activeElement,f=this.options.checkedClass;b!==d?(d&&a(d).removeClass(f),b&&a(b).addClass(f)):this.options.toggleStateEnabled&&b&&(a(b).removeClass(f),b=null);this.activeElement=b;this.activeIndex=this._getElementIndex(b)},disabled:function(b){if(typeof b==="boolean")this.disabled=b,a.each(this.buttons,function(){this.disabled(b)});return this.options.disabled}});a.fn.wpRadioGroup=function(a){new b.Widget.RadioGroup(this,a);return this}})(jQuery, WebPro,window,document); (function(a,b){b.widget("Widget.TabGroup",b.Widget.RadioGroup,{defaultOptions:{defaultIndex:0,hoverClass:"wp-tab-hover",downClass:"wp-tab-down",disabledClass:"wp-tab-disabled",checkedClass:"wp-tab-active",disabled:!1,toggleStateEnabled:!1},selectTab:function(a){this.checkButton(a)},checkButton:function(a){var b=this._getElement(a),f=this._getElementIndex(b),b={tab:b,tabIndex:f};this.trigger("wp-tab-before-select",b);this._super.prototype.checkButton.apply(this,arguments);this.trigger("wp-tab-select",b)}}); a.fn.wpTabGroup=function(a){new b.Widget.TabGroup(this,a);return this}})(jQuery,WebPro,window,document); (function(a,b){b.widget("Widget.PanelGroup",b.Widget,{_widgetName:"panel-group",defaultOptions:{defaultIndex:0,panelClass:"wp-panel",activeClass:"wp-panel-active",toggleStateEnabled:!1,tabGroups:null},_setUp:function(){var a=this;this.tabGroups=[];this._tabCallback=function(b,f){a._handleTabSelect(b,f)};this.showLock=0;this.tabDriver=null;return this._super.prototype._setUp.apply(this,arguments)},_attachBehavior:function(){this.activeElement=null;this.activeIndex=-1;this.$element.addClass(this.options.panelClass); var a=this.options.defaultIndex;typeof a==="number"&&a>=0&&this.showPanel(a);this.addTabGroup(this.options.tabGroups)},_getElementIndex:function(b){return b?a.inArray(b,this.$element.get()):-1},_getElementByIndex:function(a){return this.$element.eq(a)[0]},_getElement:function(a){return typeof a==="number"?this._getElementByIndex(a):a},showPanel:function(b){if(!this.showLock){++this.showLock;var d=this._getElement(b),f=this.activeElement,h=this.options.activeClass;if(d)if(d!==f){b={panel:d,panelIndex:this._getElementIndex(d)}; this.trigger("wp-panel-before-show",b);f&&this.hidePanel(f);a(d).addClass(h);this.activeElement=d;this.activeIndex=this._getElementIndex(d);d=this.tabGroups;for(f=0;f<d.length;f++)h=d[f],h!==this.tabDriver&&h.selectTab(this.activeIndex);this.trigger("wp-panel-show",b)}else this.options.toggleStateEnabled&&this.hidePanel(d);--this.showLock}},hidePanel:function(b){if(b=typeof b==="number"?this.$element.eq(b)[0]:b){var d={panel:b,panelIndex:this._getElementIndex(b)};this.trigger("wp-panel-before-hide", d);a(b).removeClass(this.options.activeClass);if(b===this.activeElement)this.activeElement=null,this.activeIndex=-1;this.trigger("wp-panel-hide",d)}},_handleTabSelect:function(a,b){if(!this.showLock)this.tabDriver=a.target,this.showPanel(b.tabIndex),this.tabDriver=null},addTabGroup:function(c){if(c)for(var c=b.ensureArray(c),d=c.length,f=0;f<d;f++){var h=c[f];a.inArray(this.tabGroups,h)===-1&&(this.tabGroups.push(h),h.selectTab(this.activeIndex),h.bind("wp-tab-select",this._tabCallback))}},removeTabGroup:function(c){for(var c= b.ensureArray(c),d=c.length,f=0;f<d;f++){var h=c[f];sets=this.tabGroups;loc=a.inArray(sets,h);loc!==-1&&sets.splice(loc,1)}}});a.fn.wpPanelGroup=function(a){new b.Widget.PanelGroup(this,a);return this}})(jQuery,WebPro,window,document); (function(a,b){b.widget("Widget.Disclosure",b.Widget,{defaultOptions:{widgetClassName:"wp-disclosure-panels",tabClassName:"wp-disclosure-panels-tab",tabHoverClassName:"wp-disclosure-panels-tab-hover",tabDownClassName:"wp-disclosure-panels-tab-down",panelClassName:"wp-disclosure-panels-panel",tabActiveClassName:"wp-disclosure-panels-tab-active",panelActiveClassName:"wp-disclosure-panels-panel-active",defaultIndex:0,toggleStateEnabled:!1},_attachBehavior:function(){var a=this.$element[0],d=this.options.widgetClassName, f=b.scopedFind(a,"."+this.options.tabClassName,d,a),a=b.scopedFind(a,"."+this.options.panelClassName,d,a);this.tabs=new b.Widget.TabGroup(f,{hoverClass:this.options.tabHoverClassName,downClass:this.options.tabDownClassName,checkedClass:this.options.tabActiveClassName,toggleStateEnabled:this.options.toggleStateEnabled});this.panels=new b.Widget.PanelGroup(a,{panelClass:this.options.panelClassName,activeClass:this.options.panelActiveClassName,defaultIndex:this.options.defaultIndex,toggleStateEnabled:this.options.toggleStateEnabled}); this.panels.addTabGroup(this.tabs)}});b.widget("Widget.TabbedPanels",b.Widget.Disclosure,{defaultOptions:{widgetClassName:"wp-tabbed-panels-panels",tabClassName:"wp-tabbed-panels-panels-tab",tabHoverClassName:"wp-tabbed-panels-panels-tab-hover",tabDownClassName:"wp-tabbed-panels-panels-tab-down",tabActiveClassName:"wp-tabbed-panels-panels-tab-active",panelClassName:"wp-tabbed-panels-panels-panel",panelActiveClassName:"wp-tabbed-panels-panels-panel-active",toggleStateEnabled:!1}});b.widget("Widget.Accordion", b.Widget.Disclosure,{defaultOptions:{widgetClassName:"wp-accordion",tabClassName:"wp-accordion-tab",tabHoverClassName:"wp-accordion-tab-hover",tabDownClassName:"wp-accordion-tab-down",tabActiveClassName:"wp-accordion-tab-active",panelClassName:"wp-accordion-panel",panelActiveClassName:"wp-accordion-panel-active",toggleStateEnabled:!1}})})(jQuery,WebPro,window,document); (function(a,b){b.Widget.Disclosure.DisplayPropertyTransitionPlugin={defaultOptions:{},initialize:function(b,d){var f=this;a.extend(d,a.extend({},f.defaultOptions,d));b.bind("attach-behavior",function(){f._attachBehavior(b)})},_attachBehavior:function(a){var a=a.panels,b=a.$element,f=a.activeIndex;a.bind("wp-panel-show",function(a,b){b.panel.style.display="block"});a.bind("wp-panel-hide",function(a,b){b.panel.style.display="none"});b.each(function(a){this.style.display=a!==f?"none":"block"})}};b.Widget.Disclosure.AccordionTransitionPlugin= {defaultOptions:{transitionDirection:"vertical",transitionDuration:500,dispatchTransitionEvents:!0},initialize:function(b,d){var f=this;a.extend(d,a.extend({},f.defaultOptions,d));b.bind("attach-behavior",function(){f._attachBehavior(b)})},_attachBehavior:function(b){var d=this,f=b.panels,h=f.$element,k=f.activeIndex,g=b.options.transitionDirection,j=b.options.widgetClassName==="AccordionWidget"?a(h[0]).closest("*[data-rotate]"):null;if(j&&j.length>0)b.options.marginBottom=Muse.Utils.getCSSIntValue(j, "margin-bottom"),b.options.originalHeight=j[0].scrollHeight;b.options.rotatedAccordion=j;f.bind("wp-panel-show",function(a,h){d._showPanel(b,h)});f.bind("wp-panel-hide",function(a,h){d._hidePanel(b,h)});h.each(function(b){if(b!==k){a(this).css("overflow","hidden");if(g==="vertical"||g==="both")this.style.height="0";if(g==="horizontal"||g==="both")this.style.width="0"}})},_transitionPanel:function(b,d,f){a("body").trigger("wp-page-height-change","undefined"===typeof b?0:d-b);var h=f.options.rotatedAccordion; if(h&&h.length>0){if(f.options.originalHeight==0&&"undefined"!==typeof d)f.options.marginBottom=Muse.Utils.getCSSIntValue(h,"margin-bottom"),f.options.originalHeight=h[0].scrollHeight;"undefined"!==typeof b&&h&&h.length>0&&(b=Muse.Utils.getCSSIntValue(h,"margin-bottom")+(b-d),h.css("margin-bottom",b+"px"))}},_showPanel:function(b,d){var f=b.options,h=f.transitionDirection,k=a(d.panel),g={},j=f.dispatchTransitionEvents,i=this,m,l=function(a){i._transitionPanel(m,a,b);m=a};if(h==="vertical"||h==="both")g.height= k[0].scrollHeight+"px";if(h==="horizontal"||h==="both")g.width=k[0].scrollWidth+"px";k.stop(!0,!0).animate(g,{duration:f.transitionDuration,step:j?l:null,complete:function(){var a={overflow:""};if(h==="vertical"||h==="both")a.height="auto";if(h==="horizontal"||h==="both")a.width="auto";k.css(a);(a=b.options.rotatedAccordion)&&a.length>0&&a.css("margin-bottom",Math.round(b.options.marginBottom+(b.options.originalHeight-a[0].scrollHeight))+"px")}})},_hidePanel:function(b,d){var f=b.options,h=f.transitionDirection, k=a(d.panel),g={},j=f.dispatchTransitionEvents,i=this,m,l=function(a){i._transitionPanel(m,a,b);m=a};if(h==="vertical"||h==="both")g.height="0";if(h==="horizontal"||h==="both")g.width="0";k.stop(!0,!0).animate(g,{duration:f.transitionDuration,step:j?l:null,complete:function(){k.css("overflow","hidden");var a=b.options.rotatedAccordion;a&&a.length>0&&a.css("margin-bottom",Math.round(b.options.marginBottom+(b.options.originalHeight-a[0].scrollHeight))+"px")}})}}})(jQuery,WebPro,window,document); (function(a,b){b.widget("Widget.SlideShowBase",b.Widget,{_widgetName:"slideshow-base",defaultOptions:{displayInterval:6E3,autoPlay:!1},_setUp:function(){var a=this;this._ssTimer=0;this._ssTimerTriggered=!1;this._ssTimerCallback=function(){a._ssTimerTriggered=!0;a.next();a._ssTimerTriggered=!1};return b.Widget.prototype._setUp.apply(this,arguments)},_ready:function(){this.options.autoPlay&&this.play()},play:function(){e=this.trigger("wp-slideshow-before-play");e.isDefaultPrevented()||(this._startTimer(!1), this.trigger("wp-slideshow-play"))},stop:function(){e=this.trigger("wp-slideshow-before-stop");e.isDefaultPrevented()||(this._stopTimer(),this.trigger("wp-slideshow-stop"))},isPlaying:function(){return this._ssTimer!==0},_startTimer:function(a){this._stopTimer();var b=this.options.displayInterval;a&&(b+=this.options.transitionDuration);this._ssTimer=setTimeout(this._ssTimerCallback,b)},_stopTimer:function(){this._ssTimer&&clearTimeout(this._ssTimer);this._ssTimer=0},_executeCall:function(a,b){e=this.trigger("wp-slideshow-before-"+ a);e.isDefaultPrevented()||(this["_"+a].apply(this,b)&&this.stop(),this.isPlaying()&&this._startTimer(!0),this.trigger("wp-slideshow-"+a))},first:function(){return this._executeCall("first",arguments)},last:function(){return this._executeCall("last",arguments)},previous:function(){return this._executeCall("previous",arguments)},next:function(){return this._executeCall("next",arguments)},goTo:function(){return this._executeCall("goTo",arguments)},close:function(){return this._executeCall("close",arguments)}, _first:function(){},_last:function(){},_previous:function(){},_next:function(){},_goTo:function(){},_close:function(){}})})(jQuery,WebPro,window,document); (function(a,b){b.widget("Widget.ContentSlideShow",b.Widget.SlideShowBase,{_widgetName:"content-slideshow",defaultOptions:{slideshowClassName:"wp-slideshow",clipClassName:"wp-slideshow-clip",viewClassName:"wp-slideshow-view",slideClassName:"wp-slideshow-slide",slideLinkClassName:"wp-slideshow-slide-link",firstBtnClassName:"wp-slideshow-first-btn",lastBtnClassName:"wp-slideshow-last-btn",prevBtnClassName:"wp-slideshow-prev-btn",nextBtnClassName:"wp-slideshow-next-btn",playBtnClassName:"wp-slideshow-play-btn", stopBtnClassName:"wp-slideshow-stop-btn",closeBtnClassName:"wp-slideshow-close-btn",playingClassName:"wp-slideshow-playing"},_findWidgetElements:function(a){var d=this.$element[0];return b.scopedFind(d,a,this.options.slideshowClassName,d)},_attachBtnHandler:function(a,b){var f=this;this["$"+b+"Btn"]=this._findWidgetElements("."+a).bind("click",function(a){f[b]();a.preventDefault()})},_reprioritizeImageLoadingIfRequired:function(b){!this._isLoaded(b)&&this._cssilLoader&&!this._cssilLoader.isQueueEmpty()&& (b=a(this.slides.$element[b]),this._cssilLoader.reprioritize((b.is("img")?b:b.find("img")).data("src"),this.isPlaying()))},_attachBehavior:function(){var a=this,d=this.options;this._super.prototype._attachBehavior.call(this);this._panelShowCallback=function(){a._ssTimerTriggered||a.isPlaying()&&a._startTimer(!1)};this.$element.addClass(d.slideshowClassName);var f=this._findWidgetElements("."+d.slideClassName),h=this._findWidgetElements("."+d.slideLinkClassName),k=d.event==="click"&&d.deactivationEvent=== "mouseout_click";this.slides=new b.Widget.PanelGroup(f,{defaultIndex:d.defaultIndex||0,toggleStateEnabled:k});this.slides.bind("wp-panel-show",this._panelShowCallback);this.tabs=null;if(h.length)this.tabs=new b.Widget.TabGroup(h,{defaultIndex:d.defaultIndex||0,toggleStateEnabled:k}),this.slides.addTabGroup(this.tabs);this.slides.bind("wp-panel-before-show",function(b,h){a._reprioritizeImageLoadingIfRequired(h.panelIndex)});this._attachBtnHandler(d.firstBtnClassName,"first");this._attachBtnHandler(d.lastBtnClassName, "last");this._attachBtnHandler(d.prevBtnClassName,"previous");this._attachBtnHandler(d.nextBtnClassName,"next");this._attachBtnHandler(d.playBtnClassName,"play");this._attachBtnHandler(d.stopBtnClassName,"stop");this._attachBtnHandler(d.closeBtnClassName,"close");this.bind("wp-slideshow-play",function(){this.$element.addClass(d.playingClassName)});this.bind("wp-slideshow-stop",function(){this.$element.removeClass(d.playingClassName)})},_first:function(){this.slides.showPanel(0)},_last:function(){var a= this.slides;a.showPanel(a.$element.length-1)},_previous:function(){var a=this.slides,b=a.activeIndex;a.showPanel((b<1?a.$element.length:b)-1)},_next:function(){var a=this.slides,b=a.activeIndex,f=(b+1)%a.$element.length;(!this.isPlaying()||this._isLoaded(b)&&this._isLoaded(f))&&a.showPanel(f)},_goTo:function(){var a=this.slides;a.showPanel.apply(a,arguments)},_close:function(){var a=this.slides;a.hidePanel(a.activeElement)},_isLoaded:function(b){if(this._csspIsImageSlideShow&&(b=a(this.slides.$element[b]), b=b.is("img")?b:b.find("img"),b.length>0&&(b.hasClass(this.options.imageIncludeClassName)||!b[0].complete)))return!1;return!0}})})(jQuery,WebPro,window,document); (function(a,b,c,d,f){b.Widget.ContentSlideShow.fadingTransitionPlugin={defaultOptions:{transitionDuration:500},initialize:function(b,c){var d=this;a.extend(c,a.extend({},d.defaultOptions,c));b.bind("attach-behavior",function(){d.attachBehavior(b)})},attachBehavior:function(b){var c=this,d=b.slides,f=d.$element,i=d.activeIndex;d.bind("wp-panel-show",function(d,g){c._showElement(b,a(g.panel));b.options.contentLayout_runtime==="stack"&&c._showElement(b,b.$closeBtn)}).bind("wp-panel-hide",function(d, g){c._hideElement(b,a(g.panel))});b.options.contentLayout_runtime==="stack"&&b.bind("wp-slideshow-close",function(){c._hideElement(b,b.$closeBtn)});for(d=0;d<f.length;d++)if(d!==i)f[d].style.display="none";i===-1&&b.options.contentLayout_runtime==="stack"&&b.$closeBtn.hide();if(Muse.Browser.Features.Touch&&Muse.Browser.Features.Touch.Start=="touchstart"&&b.options.enableSwipe===!0){var m=b.options.transitionDuration;b._ftpSwipeNoInterrupt=!1;f.each(function(){var d=a(this);d.data("opacity",d.css("opacity")); var g=Muse.Utils.getCanvasDirection(d,"horizontal"),i=g.dir==="horizontal",o=g.reverse;d.swipe({triggerOnTouchEnd:!0,allowPageScroll:i?"vertical":"horizontal",threshold:75,swipeStatus:function(a,d,g,l){b.stop();if(d=="move"&&(i&&(g=="left"||g=="right")||!i&&(g=="up"||g=="down")))c._scrollTo(b,-1,l*(!o&&(g=="left"||g=="up")||o&&(g=="right"||g=="down")?1:-1),0);else if(d=="cancel")c._scrollTo(b,b.slides.activeIndex,0,m);else if(d=="end"){a=b.slides.activeIndex;d=-1;if(i&&(g=="right"&&!o||g=="left"&& o)||!i&&(g=="down"&&!o||g=="up"&&o))d=a-1<0?f.length-1:a-1;else if(i&&(g=="left"&&!o||g=="right"&&o)||!i&&(g=="up"&&!o||g=="down"&&o))d=a+1>f.length-1?0:a+1;d!=-1&&c._scrollTo(b,d,0,m)}}})})}},_showElement:function(a,b){var c=!1,d=function(){c||(c=!0,b.show().css("opacity",""))},f=setTimeout(d,a.options.transitionDuration+10);b.stop(!1,!0).fadeIn(a.options.transitionDuration,function(){clearTimeout(f);d()})},_hideElement:function(a,b){var c=!1,d=function(){c||(c=!0,b.hide().css("opacity",""))},f= setTimeout(d,a.options.transitionDuration+10);b.stop(!1,!0).fadeOut(a.options.transitionDuration,function(){clearTimeout(f);d()})},_scrollTo:function(b,c,d,f){if(!b._ftpSwipeNoInterrupt){var i=b.slides.$element,m=b.slides.activeIndex,l=c==-1;c==-1&&(c=d<0?m-1<0?i.length-1:m-1:m+1>i.length-1?0:m+1);var p=a(i[m]),q=a(i[c]);if(!l&&d==0||m==c){b._ftpSwipeNoInterrupt=!0;var o=0,n=!1,s=function(){if(!n&&(n=!0,q.show().css("opacity",""),c!=m&&b.slides.showPanel(c),++o==i.length))b._ftpSwipeNoInterrupt=!1}; if(q.css("opacity")!=q.data("opacity")){var t=setTimeout(s,f+10);q.stop(!1,!0).animate({opacity:q.data("opacity")},f,function(){clearTimeout(t);s()})}else s();i.each(function(d){var g=a(this),l=!1,p=function(){if(!l&&(l=!0,g.hide().css("opacity",""),++o==i.length))b._ftpSwipeNoInterrupt=!1},m;d!=c&&(g.css("display")!="none"&&g.css("opacity")!=0?(m=setTimeout(p,f+10),g.stop(!1,!0).animate({opacity:0},f,function(){clearTimeout(m);p()})):p())})}else d=Math.abs(d),l=p.width(),d>l&&(d=l),d=q.data("opacity")* (d/l),l=p.data("opacity")*(1-d),p.stop(!1,!0).animate({opacity:l},f),q.stop(!1,!0).show().animate({opacity:d},f)}}};b.Widget.ContentSlideShow.filmstripTransitionPlugin={defaultOptions:{transitionDuration:500,transitionStyle:"horizontal"},initialize:function(b,c){var d=this;a.extend(c,a.extend({},d.defaultOptions,c));b.bind("attach-behavior",function(){d.attachBehavior(b)})},attachBehavior:function(b){var d=this,g=b.options,j=g.transitionStyle==="horizontal",i=b.slides,m=i.$element,l=b._findWidgetElements("."+ g.clipClassName),p=b._findWidgetElements("."+g.viewClassName),q=l.width(),o=l.height(),n={top:"0",left:"0"},s=a(c),t=l.css("position");t!=="absolute"&&t!=="fixed"&&!g.fullScreen&&l.css("position","relative");p.css("position")!=="absolute"&&(n.position="relative");b._fstp$Clip=l;b._fstp$View=p;b._fstpStyleProp=j?"left":"top";b._fstpStylePropZero=j?"top":"left";i.bind("wp-panel-show",function(a,c){d._goToSlide(b,c.panel,g.transitionDuration);b.options.contentLayout_runtime==="stack"&&b.$closeBtn.stop(!0).fadeIn(g.transitionDuration)}); b.options.contentLayout_runtime==="stack"&&b.bind("wp-slideshow-close",function(){l.css({opacity:0.99}).stop(!0).animate({opacity:0},{queue:!1,duration:g.transitionDuration,complete:function(){n[b._fstpStyleProp]=(j?l.width():l.height())+"px";n[b._fstpStylePropZero]="0";p.css(n);l.css({opacity:""})}});b.$closeBtn.stop(!0).fadeOut(g.transitionDuration)});b._fstpRequestType=null;b.bind("wp-slideshow-before-previous wp-slideshow-before-next",function(a){b._fstpRequestType=a.type.replace(/.*-/,"");b._fstpOldActiveIndex= b.slides.activeIndex}).bind("wp-slideshow-previous wp-slideshow-next",function(){b._fstpRequestType=null;b._fstpOldActiveIndex=-1});var t=function(a,c){if(a===f||c===f)a=l.width(),c=l.height();for(var g=0,p=j?a:c,q=b._fstpStyleProp,o=b._fstpStylePropZero,n=0;n<m.length;n++){var s=m[n].style;s[o]="0";s[q]=g+"px";s.margin="0";s.position="absolute";g+=p}d._goToSlide(b,i.activeElement,0);return g},y=t();if(g.fullScreen)if(g.contentLayout_runtime==="lightbox")b._fstpPositionSlides=t;else s.on("orientationchange resize", t);else n[j?"width":"height"]=y+"px",n[j?"height":"width"]=(j?o:q)+"px";i.activeElement||(n[b._fstpStyleProp]=(j?q:o)+"px",n[b._fstpStylePropZero]="0",b.options.contentLayout_runtime==="stack"&&b.$closeBtn.hide());n.overflow="visible";p.css(n);d._goToSlide(b,i.activeElement,g.transitionDuration)},_goToSlide:function(b,c,d){if(b){var f=a(c),i=b._fstp$View,m=b._fstpStyleProp,l=m==="left"?"offsetLeft":"offsetTop",p=m==="left"?"offsetWidth":"offsetHeight",q=c?-c[l]:b._fstp$Clip[0][p],o={};o[m]=q+"px"; var n=b._fstpRequestType,s=b._fstpOldActiveIndex;if(n&&s!==-1){var t=b.slides.activeIndex,y=b.slides.$element.length-1;if(t!==s){var v=0;n==="previous"&&s===0&&t===y?v=-c[p]:n==="next"&&s===y&&t===0&&(b=b.slides.$element[s],v=b[l]+b[p]);v&&(o[m]=-v+"px",f.css(m,v+"px"))}}i.stop(!1,!0).animate(o,d,function(){v&&(f.css(m,-q+"px"),i.css(m,q+"px"))})}}};b.Widget.ContentSlideShow.swipeTransitionPlugin={defaultOptions:{transitionDuration:500,transitionStyle:"horizontal"},initialize:function(b,c){var d= this;a.extend(c,a.extend({},d.defaultOptions,c));b.bind("attach-behavior",function(){d.attachBehavior(b)})},attachBehavior:function(b){var d=this,g=b.options,j=g.transitionStyle==="horizontal",i=b.slides,m=i.$element,l=b._findWidgetElements("."+g.clipClassName),p=b._findWidgetElements("."+g.viewClassName),q=l.width(),o=l.height(),n=function(a,b){if(a===f||b===f)a=l.width(),b=l.height();return j?a:b},s=n();viewProps={top:"0",left:"0"};$window=a(c);l.css("position")!=="absolute"&&!g.fullScreen&&l.css("position", "relative");p.css("position")!=="absolute"&&(viewProps.position="relative");b._fstp$Clip=l;b._fstp$View=p;b._fstpStyleProp=j?"left":"top";b._fstpStylePropZero=j?"top":"left";i.bind("wp-panel-show",function(){var a=b.slides.activeIndex*n(),c=b.options.transitionDuration;a==0&&b.slides.activeIndex==0&&!g.shuffle&&b.isPlaying()&&(c=0);d._scrollTo(b,a,c);b.options.contentLayout_runtime==="stack"&&b.$closeBtn.stop(!0).fadeIn(c)});b.options.contentLayout_runtime==="stack"&&b.bind("wp-slideshow-close",function(){l.css({opacity:0.99}).stop(!0).animate({opacity:0}, {queue:!1,duration:g.transitionDuration,complete:function(){d._scrollTo(b,-n(),0);l.css({opacity:""})}});b.$closeBtn.stop(!0).fadeOut(b.options.transitionDuration)});b._fstpRequestType=null;b.bind("wp-slideshow-before-previous wp-slideshow-before-next",function(a){b._fstpRequestType=a.type.replace(/.*-/,"");b._fstpOldActiveIndex=b.slides.activeIndex}).bind("wp-slideshow-previous wp-slideshow-next",function(){b._fstpRequestType=null;b._fstpOldActiveIndex=-1});var t=function(a,c){for(var g=0,f=n(a, c),l=b._fstpStyleProp,j=b._fstpStylePropZero,q=0;q<m.length;q++){var o=m[q].style;o[j]="0";o[l]=g+"px";o.margin="0";o.position="absolute";g+=f}p.css("width",g);d._scrollTo(b,i.activeIndex*f,0);return g},y=t();if(g.fullScreen)if(g.lightboxEnabled_runtime)b._fstpPositionSlides=t;else $window.on("orientationchange resize",t);else viewProps[j?"width":"height"]=y+"px",viewProps[j?"height":"width"]=(j?o:q)+"px";viewProps.overflow="visible";p.css(viewProps);var q=Muse.Utils.getCanvasDirection(p,g.transitionStyle), v=q.dir==="horizontal",x=q.reverse,u=b.options.transitionDuration;p.swipe({triggerOnTouchEnd:!0,allowPageScroll:v?"vertical":"horizontal",threshold:75,swipeStatus:function(a,c,g,f){b.stop();s=n();if(c=="move"&&(v&&(g=="left"||g=="right")||!v&&(g=="up"||g=="down")))g=s*b.slides.activeIndex+f*(!x&&(g=="left"||g=="up")||x&&(g=="right"||g=="down")?1:-1),d._scrollTo(b,g,0);else if(c=="cancel")g=s*b.slides.activeIndex,d._scrollTo(b,g,u);else if(c=="end"){a=-1;if(v&&(g=="right"&&!x||g=="left"&&x)||!v&&(g== "down"&&!x||g=="up"&&x))a=Math.max(b.slides.activeIndex-1,0);else if(v&&(g=="left"&&!x||g=="right"&&x)||!v&&(g=="up"&&!x||g=="down"&&x))a=Math.min(b.slides.activeIndex+1,p.children().length-1);a!=-1&&(g=s*a,d._scrollTo(b,g,u),a!=b.slides.activeIndex&&b.slides.showPanel(a))}}});i.activeElement?(q=i.activeIndex*s,d._scrollTo(b,q,0)):(d._scrollTo(b,-s,0),b.options.contentLayout_runtime==="stack"&&b.$closeBtn.hide())},_scrollTo:function(a,b,c){var g;var d=Muse.Browser.Features.checkCSSFeature("transition-duration"), f=Muse.Browser.Features.checkCSSFeature("transform");if(!(d===!1||f===!1)){var m=a._fstp$View.get(0);m.style[(d===!0?"":"-"+d.toLowerCase()+"-")+"transition-duration"]=(c/1E3).toFixed(1)+"s";b=-b;g=(c=a.options.transitionStyle==="horizontal")?b:0,a=g;b=c?0:b;f=(f===!0?"":"-"+f.toLowerCase()+"-")+"transform";c="translate3d("+a+"px, "+b+"px, 0px)";d=m.style[f];m.style[f]=c;m.style[f]===d&&d!==c&&(m.style[f]="translate("+a+"px, "+b+"px)")}}};b.Widget.ContentSlideShow.slideImageIncludePlugin={defaultOptions:{imageIncludeClassName:"wp-slideshow-slide-image-include", slideLoadingClassName:"wp-slideshow-slide-loading"},initialize:function(c,d){var g=this;a.extend(d,a.extend({},g.defaultOptions,d));c._cssilLoader=new b.ImageLoader;c.bind("attach-behavior",function(){g._attachBehavior(c)})},_attachBehavior:function(a){for(var b=this,c=a._cssilLoader,d=a._findWidgetElements("."+a.options.slideClassName),f=d.length,m="."+a.options.imageIncludeClassName,l=a.options.slideLoadingClassName,p=function(c,d,g,f){b._handleImageLoad(a,c,d,g,f)},q=0;q<f;q++){var o=d.eq(a._shuffleArray? a._shuffleArray[q]:q),n=o.is("img")?o:o.find(m);if(ele=n[0]){var s=n.data("src")||ele.href;if(s)n={width:n.data("width"),height:n.data("height"),$ele:n,$slide:o},ele.style.visibility="hidden",c.add(s,{callback:p,data:n}),o.addClass(l)}}a._cssilLoader.start()},_handleImageLoad:function(a,b,c,d,f){var m=f.$ele,l=m[0];l.src=b;a.options.fullScreen?(m.data("imageWidth",c),m.data("imageHeight",d),a._csspPositionImage(l,a.options.heroFitting,a.options.fullScreen,c,d)):(l.width=f.width||c,l.height=f.height|| d);l.style.visibility="";m.removeClass(a.options.imageIncludeClassName);f.$slide.removeClass(a.options.slideLoadingClassName);a.isPlaying()&&a.slides.$element[a.slides.activeIndex]==f.$slide[0]&&a._startTimer(!1)}};b.Widget.ContentSlideShow.shufflePlayPlugin={defaultOptions:{randomDefaultIndex:!0},initialize:function(b,c){var d=this;a.extend(c,a.extend({},d.defaultOptions,c));b._shuffleArray=[];b._shuffleNextDict={};b._realNext=b._next;b._next=function(){d._handleNext(b)};b._shufflePlayCount=0;b.bind("before-attach-behavior", function(){d._reshuffle(b);if(c.randomDefaultIndex&&typeof c.defaultIndex==="undefined")b.options.defaultIndex=b._shuffleArray[0]})},_fisherYatesArrayShuffle:function(a){if(a&&a.length)for(var b=a.length;--b;){var c=Math.floor(Math.random()*(b+1)),d=a[c];a[c]=a[b];a[b]=d}},_reshuffle:function(a){var b=a._shuffleArray,c={},d=a.slides?a.slides.$element.length:a._findWidgetElements("."+a.options.slideClassName).length;if(b.length!==d)for(var f=b.length=0;f<d;f++)b[f]=f;this._fisherYatesArrayShuffle(b); for(f=0;f<d;f++)c[b[f]]=b[(f+1)%d];a._shuffleNextDict=c;a._shufflePlayCount=0},_handleNext:function(a){if(a.isPlaying()){var b=a.slides.activeIndex,c=a._shuffleNextDict[b]||0;a._isLoaded(b)&&a._isLoaded(c)&&(a._goTo(c),++a._shufflePlayCount>=a.slides.$element.length&&this._reshuffle(a))}else a._realNext()}}})(jQuery,WebPro,window,document); (function(a,b,c){b.widget("Widget.Form",b.Widget,{_widgetName:"form",defaultOptions:{validationEvent:"blur",errorStateSensitivity:"low",ajaxSubmit:!0,fieldWrapperClass:"field",formErrorClass:"form-error",formSubmittedClass:"form-submitted",formDeliveredClass:"form-delivered",focusClass:"focus",notEmptyClass:"not-empty",emptyClass:"empty",validClass:"valid",invalidClass:"invalid",requiredClass:"required"},validationTypes:{"always-valid":/.*/,email:/^[a-z0-9!#$%&'*+\/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+\/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i, alpha:/^[A-z\s]+$/,numeric:/^[0-9]+$/,phone:/^([0-9])?(\s)?(\([0-9]{3}\)|[0-9]{3}(\-)?)(\s)?[0-9]{3}(\s|\-)?[0-9]{4}(\s|\sext|\sx)?(\s)?[0-9]*$/,captcha:function(a){return a.data("captchaValid")},time:function(a){var a=a.find("input, textarea"),b=a.val().replace(/[^0-9:APM]/g,"");if(b.indexOf(":")!=-1&&b.match(/:/).length==1){var c=b.split(":"),k=parseInt(c[0]),c=parseInt(c[1]);if(k<0||k>24)return!0;if(c<0||c>59)return!0}else return!1;a.val(b);return!0}},_transformMarkup:function(){var b=this;b.hasCAPTCHA= !1;this.$element.find("."+this.options.fieldWrapperClass).each(function(){var c=a(this);if(c.attr("data-type")=="captcha")b.hasCAPTCHA=!0,c.find('input[name="CaptchaV2"]').remove(),c.find('input[name="muse_CaptchaV2"]').attr("name","CaptchaV2")})},_extractData:function(){this.event=this.options.validationEvent;this.errorSensitivity=this.options.errorStateSensitivity;this.classNames={focus:this.options.focusClass,blur:this.options.emptyClass,keydown:this.options.notEmptyClass}},_attachBehavior:function(){var b= this;this.$element.find("input, textarea").each(function(){var c=a(this);c.val()!=""&&c.removeClass(b.options.emptyClass)});this.$element.find("."+this.options.fieldWrapperClass).each(function(){var c=a(this);c.attr("data-type")=="captcha"&&(c.data("captchaValid",!1),c.find('input[name="CaptchaV2"]').keyup(function(){var h=a(this).val(),k=c.find('input[name="CaptchaHV2"]').val();b._validateCaptcha(k,h,function(a){c.data("captchaValid",a);c.data("error-state")&&b.errorSensitivity=="high"&&b._validate(c)})})); c.find("input, textarea").val()!=""&&c.addClass(b.classNames.keydown)});this.$element.find("input, textarea").bind("focus blur keydown change propertychange",function(c){var h=b.classNames[c.type],k=b.classNames.focus,g=b.classNames.keydown,j=b.classNames.blur,i=a(this),m=i.closest("."+b.options.fieldWrapperClass);switch(c.type){case "focus":m.addClass(h).removeClass(j);break;case "blur":m.removeClass(k);i.val()==""&&m.addClass(h).removeClass(g);break;case "keydown":m.addClass(h).removeClass(j);break; case "change":case "propertychange":i.val()!=""?m.addClass(g).removeClass(j):m.addClass(j).removeClass(g)}});switch(this.event){case "blur":case "keyup":this.$element.find("."+this.options.fieldWrapperClass+" input, ."+this.options.fieldWrapperClass+" textarea").bind(this.event,function(){b._validate(a(this).closest("."+b.options.fieldWrapperClass))});case "submit":this.$element.submit(function(c){var h=!0,k=b.$element.find("."+b.options.fieldWrapperClass).length-1;b.$element.find("."+b.options.fieldWrapperClass).each(function(g){if((h= b._validate(a(this))?h:!1)&&g==k&&b.options.ajaxSubmit)c.preventDefault(),b._submitForm();h||c.preventDefault()})})}},_validateCaptcha:function(b,c,h){c.length!=6?h(!1):a.get("/ValidateCaptcha.ashx",{key:b,answer:c},function(a){h(a=="true")})},_submitForm:function(){var b=this,f=this.options.formSubmittedClass,h=this.options.formDeliveredClass,k=this.options.formErrorClass,g=f+" "+h+" "+k,j=this.$element.find("input[type=submit], button");a.ajax({url:this.$element.attr("action"),type:"post",data:this.$element.serialize(), beforeSend:function(){b.$element.removeClass(g);b.$element.addClass(f);b.$element.find("."+b.options.fieldWrapperClass).removeClass(b.options.focusClass);j.attr("disabled","disabled")},complete:function(g){g&&(g.status>=400||g.responseText&&g.responseText.indexOf("<?php")>=0)&&alert("Form PHP script is missing from web server, or PHP is not configured correctly on your web hosting provider. Check if the form PHP script has been uploaded correctly, then contact your hosting provider about PHP configuration."); if(g&&g.responseText&&g.responseText.indexOf('"success": true')>0&&g.responseText.indexOf("<?php")<0)if(b.$element.addClass(h).removeClass(f),g.responseText.indexOf('"redirect":')>0){g=jQuery.parseJSON(g.responseText);c.location.href=g.FormResponse.redirect;return}else b.$element.find("input:not([type=submit]), textarea").each(function(){var c=a(this);c.val("");b.hasCAPTCHA&&c.attr("disabled","disabled")});else b.$element.addClass(k).removeClass(f);b.hasCAPTCHA||j.removeAttr("disabled")}})},_validate:function(a){var b= a.attr("data-type")||"always-valid",c=a.find("input, textarea"),k=this.validationTypes[b],b=a.attr("data-required")==="true",g=c.val()=="",c=k instanceof RegExp?Boolean(c.val().match(k)):k(a);if(b&&g)return this._switchState("required",a);if(!c)return this._switchState("invalid",a);return this._switchState("valid",a)},_switchState:function(a,b){function c(){i._validate(b)}var k=this.options.validClass,g=this.options.invalidClass,j=this.options.requiredClass;b.removeClass(k+" "+g+" "+j);if(a=="required"|| a=="invalid"){a=="invalid"?b.addClass(g):b.addClass(j);if(this.errorSensitivity!="low"){var i=this,k=this.errorSensitivity=="high"?"keyup":"blur";b.data("error-state")||(b.data("error-state",!0),b.find("input, textarea").bind(k,c))}return!1}b.data("error-state")&&(this.errorSensitivity=="high"?this.event!="keyup"&&b.data("error-state",!1).find("input, textarea").unbind("keyup",c):this.errorSensitivity=="medium"&&this.event!="blur"&&b.data("error-state",!1).find("input, textarea").unbind("blur",c)); b.addClass(k);return!0}});a.fn.wpForm=function(a){new b.Widget.Form(this,a);return this}})(jQuery,WebPro,window,document);