").append(m.parseHTML(a)).find(d):a)}).complete(c&&function(a,b){g.each(c,e||[a.responseText,b,a])}),this},m.expr.filters.animated=function(a){return m.grep(m.timers,function(b){return a===b.elem}).length};var cd=a.document.documentElement;function dd(a){return m.isWindow(a)?a:9===a.nodeType?a.defaultView||a.parentWindow:!1}m.offset={setOffset:function(a,b,c){var d,e,f,g,h,i,j,k=m.css(a,"position"),l=m(a),n={};"static"===k&&(a.style.position="relative"),h=l.offset(),f=m.css(a,"top"),i=m.css(a,"left"),j=("absolute"===k||"fixed"===k)&&m.inArray("auto",[f,i])>-1,j?(d=l.position(),g=d.top,e=d.left):(g=parseFloat(f)||0,e=parseFloat(i)||0),m.isFunction(b)&&(b=b.call(a,c,h)),null!=b.top&&(n.top=b.top-h.top+g),null!=b.left&&(n.left=b.left-h.left+e),"using"in b?b.using.call(a,n):l.css(n)}},m.fn.extend({offset:function(a){if(arguments.length)return void 0===a?this:this.each(function(b){m.offset.setOffset(this,a,b)});var b,c,d={top:0,left:0},e=this[0],f=e&&e.ownerDocument;if(f)return b=f.documentElement,m.contains(b,e)?(typeof e.getBoundingClientRect!==K&&(d=e.getBoundingClientRect()),c=dd(f),{top:d.top+(c.pageYOffset||b.scrollTop)-(b.clientTop||0),left:d.left+(c.pageXOffset||b.scrollLeft)-(b.clientLeft||0)}):d},position:function(){if(this[0]){var a,b,c={top:0,left:0},d=this[0];return"fixed"===m.css(d,"position")?b=d.getBoundingClientRect():(a=this.offsetParent(),b=this.offset(),m.nodeName(a[0],"html")||(c=a.offset()),c.top+=m.css(a[0],"borderTopWidth",!0),c.left+=m.css(a[0],"borderLeftWidth",!0)),{top:b.top-c.top-m.css(d,"marginTop",!0),left:b.left-c.left-m.css(d,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||cd;while(a&&!m.nodeName(a,"html")&&"static"===m.css(a,"position"))a=a.offsetParent;return a||cd})}}),m.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(a,b){var c=/Y/.test(b);m.fn[a]=function(d){return V(this,function(a,d,e){var f=dd(a);return void 0===e?f?b in f?f[b]:f.document.documentElement[d]:a[d]:void(f?f.scrollTo(c?m(f).scrollLeft():e,c?e:m(f).scrollTop()):a[d]=e)},a,d,arguments.length,null)}}),m.each(["top","left"],function(a,b){m.cssHooks[b]=Lb(k.pixelPosition,function(a,c){return c?(c=Jb(a,b),Hb.test(c)?m(a).position()[b]+"px":c):void 0})}),m.each({Height:"height",Width:"width"},function(a,b){m.each({padding:"inner"+a,content:b,"":"outer"+a},function(c,d){m.fn[d]=function(d,e){var f=arguments.length&&(c||"boolean"!=typeof d),g=c||(d===!0||e===!0?"margin":"border");return V(this,function(b,c,d){var e;return m.isWindow(b)?b.document.documentElement["client"+a]:9===b.nodeType?(e=b.documentElement,Math.max(b.body["scroll"+a],e["scroll"+a],b.body["offset"+a],e["offset"+a],e["client"+a])):void 0===d?m.css(b,c,g):m.style(b,c,d,g)},b,f?d:void 0,f,null)}})}),m.fn.size=function(){return this.length},m.fn.andSelf=m.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],function(){return m});var ed=a.jQuery,fd=a.$;return m.noConflict=function(b){return a.$===m&&(a.$=fd),b&&a.jQuery===m&&(a.jQuery=ed),m},typeof b===K&&(a.jQuery=a.$=m),m});
diff --git a/app/culture/view/szwjs/public/js/jquery.page.js b/app/culture/view/szwjs/public/js/jquery.page.js
new file mode 100644
index 0000000..12c573e
--- /dev/null
+++ b/app/culture/view/szwjs/public/js/jquery.page.js
@@ -0,0 +1,95 @@
+(function($){
+ var ms = {
+ init:function(obj,args){
+ return (function(){
+ ms.fillHtml(obj,args);
+ ms.bindEvent(obj,args);
+ })();
+ },
+ //填充html
+ fillHtml:function(obj,args){
+ return (function(){
+ obj.empty();
+ //上一页
+ if(args.current > 1){
+ obj.append('
上一页 ');
+ }else{
+ obj.remove('.prevPage');
+ obj.append('
上一页 ');
+ }
+ //中间页码
+ if(args.current != 1 && args.current >= 4 && args.pageCount != 4){
+ obj.append('
'+1+' ');
+ }
+ if(args.current-2 > 2 && args.current <= args.pageCount && args.pageCount > 5){
+ obj.append('
... ');
+ }
+ var start = args.current -2,end = args.current+2;
+ if((start > 1 && args.current < 4)||args.current == 1){
+ end++;
+ }
+ if(args.current > args.pageCount-4 && args.current >= args.pageCount){
+ start--;
+ }
+ for (;start <= end; start++) {
+ if(start <= args.pageCount && start >= 1){
+ if(start != args.current){
+ obj.append('
'+ start +' ');
+ }else{
+ obj.append('
'+ start +' ');
+ }
+ }
+ }
+ if(args.current + 2 < args.pageCount - 1 && args.current >= 1 && args.pageCount > 5){
+ obj.append('
... ');
+ }
+ if(args.current != args.pageCount && args.current < args.pageCount -2 && args.pageCount != 4){
+ obj.append('
'+args.pageCount+' ');
+ }
+ //下一页
+ if(args.current < args.pageCount){
+ obj.append('
下一页 ');
+ }else{
+ obj.remove('.nextPage');
+ obj.append('
下一页 ');
+ }
+ })();
+ },
+ //绑定事件
+ bindEvent:function(obj,args){
+ return (function(){
+ obj.on("click","a.tcdNumber",function(){
+ var current = parseInt($(this).text());
+ ms.fillHtml(obj,{"current":current,"pageCount":args.pageCount});
+ if(typeof(args.backFn)=="function"){
+ args.backFn(current);
+ }
+ });
+ //上一页
+ obj.on("click","a.prevPage",function(){
+ var current = parseInt(obj.children("span.current").text());
+ ms.fillHtml(obj,{"current":current-1,"pageCount":args.pageCount});
+ if(typeof(args.backFn)=="function"){
+ args.backFn(current-1);
+ }
+ });
+ //下一页
+ obj.on("click","a.nextPage",function(){
+ var current = parseInt(obj.children("span.current").text());
+ ms.fillHtml(obj,{"current":current+1,"pageCount":args.pageCount});
+ if(typeof(args.backFn)=="function"){
+ args.backFn(current+1);
+ }
+ });
+ })();
+ }
+ }
+ $.fn.createPage = function(options){
+ var args = $.extend({
+ pageCount : 10,
+ current : 1,
+ backFn : function(){}
+ },options);
+ ms.init(this,args);
+ }
+})(jQuery);
\ No newline at end of file
diff --git a/app/culture/view/szwjs/public/js/jquery.ui.widget.js b/app/culture/view/szwjs/public/js/jquery.ui.widget.js
new file mode 100644
index 0000000..c430419
--- /dev/null
+++ b/app/culture/view/szwjs/public/js/jquery.ui.widget.js
@@ -0,0 +1,530 @@
+/*!
+ * jQuery UI Widget 1.10.4+amd
+ * https://github.com/blueimp/jQuery-File-Upload
+ *
+ * Copyright 2014 jQuery Foundation and other contributors
+ * Released under the MIT license.
+ * http://jquery.org/license
+ *
+ * http://api.jqueryui.com/jQuery.widget/
+ */
+
+(function (factory) {
+ if (typeof define === "function" && define.amd) {
+ // Register as an anonymous AMD module:
+ define(["jquery"], factory);
+ } else {
+ // Browser globals:
+ factory(jQuery);
+ }
+}(function( $, undefined ) {
+
+var uuid = 0,
+ slice = Array.prototype.slice,
+ _cleanData = $.cleanData;
+$.cleanData = function( elems ) {
+ for ( var i = 0, elem; (elem = elems[i]) != null; i++ ) {
+ try {
+ $( elem ).triggerHandler( "remove" );
+ // http://bugs.jquery.com/ticket/8235
+ } catch( e ) {}
+ }
+ _cleanData( elems );
+};
+
+$.widget = function( name, base, prototype ) {
+ var fullName, existingConstructor, constructor, basePrototype,
+ // proxiedPrototype allows the provided prototype to remain unmodified
+ // so that it can be used as a mixin for multiple widgets (#8876)
+ proxiedPrototype = {},
+ namespace = name.split( "." )[ 0 ];
+
+ name = name.split( "." )[ 1 ];
+ fullName = namespace + "-" + name;
+
+ if ( !prototype ) {
+ prototype = base;
+ base = $.Widget;
+ }
+
+ // create selector for plugin
+ $.expr[ ":" ][ fullName.toLowerCase() ] = function( elem ) {
+ return !!$.data( elem, fullName );
+ };
+
+ $[ namespace ] = $[ namespace ] || {};
+ existingConstructor = $[ namespace ][ name ];
+ constructor = $[ namespace ][ name ] = function( options, element ) {
+ // allow instantiation without "new" keyword
+ if ( !this._createWidget ) {
+ return new constructor( options, element );
+ }
+
+ // allow instantiation without initializing for simple inheritance
+ // must use "new" keyword (the code above always passes args)
+ if ( arguments.length ) {
+ this._createWidget( options, element );
+ }
+ };
+ // extend with the existing constructor to carry over any static properties
+ $.extend( constructor, existingConstructor, {
+ version: prototype.version,
+ // copy the object used to create the prototype in case we need to
+ // redefine the widget later
+ _proto: $.extend( {}, prototype ),
+ // track widgets that inherit from this widget in case this widget is
+ // redefined after a widget inherits from it
+ _childConstructors: []
+ });
+
+ basePrototype = new base();
+ // we need to make the options hash a property directly on the new instance
+ // otherwise we'll modify the options hash on the prototype that we're
+ // inheriting from
+ basePrototype.options = $.widget.extend( {}, basePrototype.options );
+ $.each( prototype, function( prop, value ) {
+ if ( !$.isFunction( value ) ) {
+ proxiedPrototype[ prop ] = value;
+ return;
+ }
+ proxiedPrototype[ prop ] = (function() {
+ var _super = function() {
+ return base.prototype[ prop ].apply( this, arguments );
+ },
+ _superApply = function( args ) {
+ return base.prototype[ prop ].apply( this, args );
+ };
+ return function() {
+ var __super = this._super,
+ __superApply = this._superApply,
+ returnValue;
+
+ this._super = _super;
+ this._superApply = _superApply;
+
+ returnValue = value.apply( this, arguments );
+
+ this._super = __super;
+ this._superApply = __superApply;
+
+ return returnValue;
+ };
+ })();
+ });
+ constructor.prototype = $.widget.extend( basePrototype, {
+ // TODO: remove support for widgetEventPrefix
+ // always use the name + a colon as the prefix, e.g., draggable:start
+ // don't prefix for widgets that aren't DOM-based
+ widgetEventPrefix: existingConstructor ? (basePrototype.widgetEventPrefix || name) : name
+ }, proxiedPrototype, {
+ constructor: constructor,
+ namespace: namespace,
+ widgetName: name,
+ widgetFullName: fullName
+ });
+
+ // If this widget is being redefined then we need to find all widgets that
+ // are inheriting from it and redefine all of them so that they inherit from
+ // the new version of this widget. We're essentially trying to replace one
+ // level in the prototype chain.
+ if ( existingConstructor ) {
+ $.each( existingConstructor._childConstructors, function( i, child ) {
+ var childPrototype = child.prototype;
+
+ // redefine the child widget using the same prototype that was
+ // originally used, but inherit from the new version of the base
+ $.widget( childPrototype.namespace + "." + childPrototype.widgetName, constructor, child._proto );
+ });
+ // remove the list of existing child constructors from the old constructor
+ // so the old child constructors can be garbage collected
+ delete existingConstructor._childConstructors;
+ } else {
+ base._childConstructors.push( constructor );
+ }
+
+ $.widget.bridge( name, constructor );
+};
+
+$.widget.extend = function( target ) {
+ var input = slice.call( arguments, 1 ),
+ inputIndex = 0,
+ inputLength = input.length,
+ key,
+ value;
+ for ( ; inputIndex < inputLength; inputIndex++ ) {
+ for ( key in input[ inputIndex ] ) {
+ value = input[ inputIndex ][ key ];
+ if ( input[ inputIndex ].hasOwnProperty( key ) && value !== undefined ) {
+ // Clone objects
+ if ( $.isPlainObject( value ) ) {
+ target[ key ] = $.isPlainObject( target[ key ] ) ?
+ $.widget.extend( {}, target[ key ], value ) :
+ // Don't extend strings, arrays, etc. with objects
+ $.widget.extend( {}, value );
+ // Copy everything else by reference
+ } else {
+ target[ key ] = value;
+ }
+ }
+ }
+ }
+ return target;
+};
+
+$.widget.bridge = function( name, object ) {
+ var fullName = object.prototype.widgetFullName || name;
+ $.fn[ name ] = function( options ) {
+ var isMethodCall = typeof options === "string",
+ args = slice.call( arguments, 1 ),
+ returnValue = this;
+
+ // allow multiple hashes to be passed on init
+ options = !isMethodCall && args.length ?
+ $.widget.extend.apply( null, [ options ].concat(args) ) :
+ options;
+
+ if ( isMethodCall ) {
+ this.each(function() {
+ var methodValue,
+ instance = $.data( this, fullName );
+ if ( !instance ) {
+ return $.error( "cannot call methods on " + name + " prior to initialization; " +
+ "attempted to call method '" + options + "'" );
+ }
+ if ( !$.isFunction( instance[options] ) || options.charAt( 0 ) === "_" ) {
+ return $.error( "no such method '" + options + "' for " + name + " widget instance" );
+ }
+ methodValue = instance[ options ].apply( instance, args );
+ if ( methodValue !== instance && methodValue !== undefined ) {
+ returnValue = methodValue && methodValue.jquery ?
+ returnValue.pushStack( methodValue.get() ) :
+ methodValue;
+ return false;
+ }
+ });
+ } else {
+ this.each(function() {
+ var instance = $.data( this, fullName );
+ if ( instance ) {
+ instance.option( options || {} )._init();
+ } else {
+ $.data( this, fullName, new object( options, this ) );
+ }
+ });
+ }
+
+ return returnValue;
+ };
+};
+
+$.Widget = function( /* options, element */ ) {};
+$.Widget._childConstructors = [];
+
+$.Widget.prototype = {
+ widgetName: "widget",
+ widgetEventPrefix: "",
+ defaultElement: "
",
+ options: {
+ disabled: false,
+
+ // callbacks
+ create: null
+ },
+ _createWidget: function( options, element ) {
+ element = $( element || this.defaultElement || this )[ 0 ];
+ this.element = $( element );
+ this.uuid = uuid++;
+ this.eventNamespace = "." + this.widgetName + this.uuid;
+ this.options = $.widget.extend( {},
+ this.options,
+ this._getCreateOptions(),
+ options );
+
+ this.bindings = $();
+ this.hoverable = $();
+ this.focusable = $();
+
+ if ( element !== this ) {
+ $.data( element, this.widgetFullName, this );
+ this._on( true, this.element, {
+ remove: function( event ) {
+ if ( event.target === element ) {
+ this.destroy();
+ }
+ }
+ });
+ this.document = $( element.style ?
+ // element within the document
+ element.ownerDocument :
+ // element is window or document
+ element.document || element );
+ this.window = $( this.document[0].defaultView || this.document[0].parentWindow );
+ }
+
+ this._create();
+ this._trigger( "create", null, this._getCreateEventData() );
+ this._init();
+ },
+ _getCreateOptions: $.noop,
+ _getCreateEventData: $.noop,
+ _create: $.noop,
+ _init: $.noop,
+
+ destroy: function() {
+ this._destroy();
+ // we can probably remove the unbind calls in 2.0
+ // all event bindings should go through this._on()
+ this.element
+ .unbind( this.eventNamespace )
+ // 1.9 BC for #7810
+ // TODO remove dual storage
+ .removeData( this.widgetName )
+ .removeData( this.widgetFullName )
+ // support: jquery <1.6.3
+ // http://bugs.jquery.com/ticket/9413
+ .removeData( $.camelCase( this.widgetFullName ) );
+ this.widget()
+ .unbind( this.eventNamespace )
+ .removeAttr( "aria-disabled" )
+ .removeClass(
+ this.widgetFullName + "-disabled " +
+ "ui-state-disabled" );
+
+ // clean up events and states
+ this.bindings.unbind( this.eventNamespace );
+ this.hoverable.removeClass( "ui-state-hover" );
+ this.focusable.removeClass( "ui-state-focus" );
+ },
+ _destroy: $.noop,
+
+ widget: function() {
+ return this.element;
+ },
+
+ option: function( key, value ) {
+ var options = key,
+ parts,
+ curOption,
+ i;
+
+ if ( arguments.length === 0 ) {
+ // don't return a reference to the internal hash
+ return $.widget.extend( {}, this.options );
+ }
+
+ if ( typeof key === "string" ) {
+ // handle nested keys, e.g., "foo.bar" => { foo: { bar: ___ } }
+ options = {};
+ parts = key.split( "." );
+ key = parts.shift();
+ if ( parts.length ) {
+ curOption = options[ key ] = $.widget.extend( {}, this.options[ key ] );
+ for ( i = 0; i < parts.length - 1; i++ ) {
+ curOption[ parts[ i ] ] = curOption[ parts[ i ] ] || {};
+ curOption = curOption[ parts[ i ] ];
+ }
+ key = parts.pop();
+ if ( arguments.length === 1 ) {
+ return curOption[ key ] === undefined ? null : curOption[ key ];
+ }
+ curOption[ key ] = value;
+ } else {
+ if ( arguments.length === 1 ) {
+ return this.options[ key ] === undefined ? null : this.options[ key ];
+ }
+ options[ key ] = value;
+ }
+ }
+
+ this._setOptions( options );
+
+ return this;
+ },
+ _setOptions: function( options ) {
+ var key;
+
+ for ( key in options ) {
+ this._setOption( key, options[ key ] );
+ }
+
+ return this;
+ },
+ _setOption: function( key, value ) {
+ this.options[ key ] = value;
+
+ if ( key === "disabled" ) {
+ this.widget()
+ .toggleClass( this.widgetFullName + "-disabled ui-state-disabled", !!value )
+ .attr( "aria-disabled", value );
+ this.hoverable.removeClass( "ui-state-hover" );
+ this.focusable.removeClass( "ui-state-focus" );
+ }
+
+ return this;
+ },
+
+ enable: function() {
+ return this._setOption( "disabled", false );
+ },
+ disable: function() {
+ return this._setOption( "disabled", true );
+ },
+
+ _on: function( suppressDisabledCheck, element, handlers ) {
+ var delegateElement,
+ instance = this;
+
+ // no suppressDisabledCheck flag, shuffle arguments
+ if ( typeof suppressDisabledCheck !== "boolean" ) {
+ handlers = element;
+ element = suppressDisabledCheck;
+ suppressDisabledCheck = false;
+ }
+
+ // no element argument, shuffle and use this.element
+ if ( !handlers ) {
+ handlers = element;
+ element = this.element;
+ delegateElement = this.widget();
+ } else {
+ // accept selectors, DOM elements
+ element = delegateElement = $( element );
+ this.bindings = this.bindings.add( element );
+ }
+
+ $.each( handlers, function( event, handler ) {
+ function handlerProxy() {
+ // allow widgets to customize the disabled handling
+ // - disabled as an array instead of boolean
+ // - disabled class as method for disabling individual parts
+ if ( !suppressDisabledCheck &&
+ ( instance.options.disabled === true ||
+ $( this ).hasClass( "ui-state-disabled" ) ) ) {
+ return;
+ }
+ return ( typeof handler === "string" ? instance[ handler ] : handler )
+ .apply( instance, arguments );
+ }
+
+ // copy the guid so direct unbinding works
+ if ( typeof handler !== "string" ) {
+ handlerProxy.guid = handler.guid =
+ handler.guid || handlerProxy.guid || $.guid++;
+ }
+
+ var match = event.match( /^(\w+)\s*(.*)$/ ),
+ eventName = match[1] + instance.eventNamespace,
+ selector = match[2];
+ if ( selector ) {
+ delegateElement.delegate( selector, eventName, handlerProxy );
+ } else {
+ element.bind( eventName, handlerProxy );
+ }
+ });
+ },
+
+ _off: function( element, eventName ) {
+ eventName = (eventName || "").split( " " ).join( this.eventNamespace + " " ) + this.eventNamespace;
+ element.unbind( eventName ).undelegate( eventName );
+ },
+
+ _delay: function( handler, delay ) {
+ function handlerProxy() {
+ return ( typeof handler === "string" ? instance[ handler ] : handler )
+ .apply( instance, arguments );
+ }
+ var instance = this;
+ return setTimeout( handlerProxy, delay || 0 );
+ },
+
+ _hoverable: function( element ) {
+ this.hoverable = this.hoverable.add( element );
+ this._on( element, {
+ mouseenter: function( event ) {
+ $( event.currentTarget ).addClass( "ui-state-hover" );
+ },
+ mouseleave: function( event ) {
+ $( event.currentTarget ).removeClass( "ui-state-hover" );
+ }
+ });
+ },
+
+ _focusable: function( element ) {
+ this.focusable = this.focusable.add( element );
+ this._on( element, {
+ focusin: function( event ) {
+ $( event.currentTarget ).addClass( "ui-state-focus" );
+ },
+ focusout: function( event ) {
+ $( event.currentTarget ).removeClass( "ui-state-focus" );
+ }
+ });
+ },
+
+ _trigger: function( type, event, data ) {
+ var prop, orig,
+ callback = this.options[ type ];
+
+ data = data || {};
+ event = $.Event( event );
+ event.type = ( type === this.widgetEventPrefix ?
+ type :
+ this.widgetEventPrefix + type ).toLowerCase();
+ // the original event may come from any element
+ // so we need to reset the target on the new event
+ event.target = this.element[ 0 ];
+
+ // copy original event properties over to the new event
+ orig = event.originalEvent;
+ if ( orig ) {
+ for ( prop in orig ) {
+ if ( !( prop in event ) ) {
+ event[ prop ] = orig[ prop ];
+ }
+ }
+ }
+
+ this.element.trigger( event, data );
+ return !( $.isFunction( callback ) &&
+ callback.apply( this.element[0], [ event ].concat( data ) ) === false ||
+ event.isDefaultPrevented() );
+ }
+};
+
+$.each( { show: "fadeIn", hide: "fadeOut" }, function( method, defaultEffect ) {
+ $.Widget.prototype[ "_" + method ] = function( element, options, callback ) {
+ if ( typeof options === "string" ) {
+ options = { effect: options };
+ }
+ var hasOptions,
+ effectName = !options ?
+ method :
+ options === true || typeof options === "number" ?
+ defaultEffect :
+ options.effect || defaultEffect;
+ options = options || {};
+ if ( typeof options === "number" ) {
+ options = { duration: options };
+ }
+ hasOptions = !$.isEmptyObject( options );
+ options.complete = callback;
+ if ( options.delay ) {
+ element.delay( options.delay );
+ }
+ if ( hasOptions && $.effects && $.effects.effect[ effectName ] ) {
+ element[ method ]( options );
+ } else if ( effectName !== method && element[ effectName ] ) {
+ element[ effectName ]( options.duration, options.easing, callback );
+ } else {
+ element.queue(function( next ) {
+ $( this )[ method ]();
+ if ( callback ) {
+ callback.call( element[ 0 ] );
+ }
+ next();
+ });
+ }
+ };
+});
+
+}));
diff --git a/app/culture/view/szwjs/public/js/jquery.validate.min.js b/app/culture/view/szwjs/public/js/jquery.validate.min.js
new file mode 100644
index 0000000..3a8cdb2
--- /dev/null
+++ b/app/culture/view/szwjs/public/js/jquery.validate.min.js
@@ -0,0 +1,4 @@
+/*! jQuery Validation Plugin - v1.13.1 - 10/14/2014
+ * http://jqueryvalidation.org/
+ * Copyright (c) 2014 Jörn Zaefferer; Licensed MIT */
+!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):a(jQuery)}(function(a){a.extend(a.fn,{validate:function(b){if(!this.length)return void(b&&b.debug&&window.console&&console.warn("Nothing selected, can't validate, returning nothing."));var c=a.data(this[0],"validator");return c?c:(this.attr("novalidate","novalidate"),c=new a.validator(b,this[0]),a.data(this[0],"validator",c),c.settings.onsubmit&&(this.validateDelegate(":submit","click",function(b){c.settings.submitHandler&&(c.submitButton=b.target),a(b.target).hasClass("cancel")&&(c.cancelSubmit=!0),void 0!==a(b.target).attr("formnovalidate")&&(c.cancelSubmit=!0)}),this.submit(function(b){function d(){var d,e;return c.settings.submitHandler?(c.submitButton&&(d=a("
").attr("name",c.submitButton.name).val(a(c.submitButton).val()).appendTo(c.currentForm)),e=c.settings.submitHandler.call(c,c.currentForm,b),c.submitButton&&d.remove(),void 0!==e?e:!1):!0}return c.settings.debug&&b.preventDefault(),c.cancelSubmit?(c.cancelSubmit=!1,d()):c.form()?c.pendingRequest?(c.formSubmitted=!0,!1):d():(c.focusInvalid(),!1)})),c)},valid:function(){var b,c;return a(this[0]).is("form")?b=this.validate().form():(b=!0,c=a(this[0].form).validate(),this.each(function(){b=c.element(this)&&b})),b},removeAttrs:function(b){var c={},d=this;return a.each(b.split(/\s/),function(a,b){c[b]=d.attr(b),d.removeAttr(b)}),c},rules:function(b,c){var d,e,f,g,h,i,j=this[0];if(b)switch(d=a.data(j.form,"validator").settings,e=d.rules,f=a.validator.staticRules(j),b){case"add":a.extend(f,a.validator.normalizeRule(c)),delete f.messages,e[j.name]=f,c.messages&&(d.messages[j.name]=a.extend(d.messages[j.name],c.messages));break;case"remove":return c?(i={},a.each(c.split(/\s/),function(b,c){i[c]=f[c],delete f[c],"required"===c&&a(j).removeAttr("aria-required")}),i):(delete e[j.name],f)}return g=a.validator.normalizeRules(a.extend({},a.validator.classRules(j),a.validator.attributeRules(j),a.validator.dataRules(j),a.validator.staticRules(j)),j),g.required&&(h=g.required,delete g.required,g=a.extend({required:h},g),a(j).attr("aria-required","true")),g.remote&&(h=g.remote,delete g.remote,g=a.extend(g,{remote:h})),g}}),a.extend(a.expr[":"],{blank:function(b){return!a.trim(""+a(b).val())},filled:function(b){return!!a.trim(""+a(b).val())},unchecked:function(b){return!a(b).prop("checked")}}),a.validator=function(b,c){this.settings=a.extend(!0,{},a.validator.defaults,b),this.currentForm=c,this.init()},a.validator.format=function(b,c){return 1===arguments.length?function(){var c=a.makeArray(arguments);return c.unshift(b),a.validator.format.apply(this,c)}:(arguments.length>2&&c.constructor!==Array&&(c=a.makeArray(arguments).slice(1)),c.constructor!==Array&&(c=[c]),a.each(c,function(a,c){b=b.replace(new RegExp("\\{"+a+"\\}","g"),function(){return c})}),b)},a.extend(a.validator,{defaults:{messages:{},groups:{},rules:{},errorClass:"error",validClass:"valid",errorElement:"label",focusCleanup:!1,focusInvalid:!0,errorContainer:a([]),errorLabelContainer:a([]),onsubmit:!0,ignore:":hidden",ignoreTitle:!1,onfocusin:function(a){this.lastActive=a,this.settings.focusCleanup&&(this.settings.unhighlight&&this.settings.unhighlight.call(this,a,this.settings.errorClass,this.settings.validClass),this.hideThese(this.errorsFor(a)))},onfocusout:function(a){this.checkable(a)||!(a.name in this.submitted)&&this.optional(a)||this.element(a)},onkeyup:function(a,b){(9!==b.which||""!==this.elementValue(a))&&(a.name in this.submitted||a===this.lastElement)&&this.element(a)},onclick:function(a){a.name in this.submitted?this.element(a):a.parentNode.name in this.submitted&&this.element(a.parentNode)},highlight:function(b,c,d){"radio"===b.type?this.findByName(b.name).addClass(c).removeClass(d):a(b).addClass(c).removeClass(d)},unhighlight:function(b,c,d){"radio"===b.type?this.findByName(b.name).removeClass(c).addClass(d):a(b).removeClass(c).addClass(d)}},setDefaults:function(b){a.extend(a.validator.defaults,b)},messages:{required:"This field is required.",remote:"Please fix this field.",email:"Please enter a valid email address.",url:"Please enter a valid URL.",date:"Please enter a valid date.",dateISO:"Please enter a valid date ( ISO ).",number:"Please enter a valid number.",digits:"Please enter only digits.",creditcard:"Please enter a valid credit card number.",equalTo:"Please enter the same value again.",maxlength:a.validator.format("Please enter no more than {0} characters."),minlength:a.validator.format("Please enter at least {0} characters."),rangelength:a.validator.format("Please enter a value between {0} and {1} characters long."),range:a.validator.format("Please enter a value between {0} and {1}."),max:a.validator.format("Please enter a value less than or equal to {0}."),min:a.validator.format("Please enter a value greater than or equal to {0}.")},autoCreateRanges:!1,prototype:{init:function(){function b(b){var c=a.data(this[0].form,"validator"),d="on"+b.type.replace(/^validate/,""),e=c.settings;e[d]&&!this.is(e.ignore)&&e[d].call(c,this[0],b)}this.labelContainer=a(this.settings.errorLabelContainer),this.errorContext=this.labelContainer.length&&this.labelContainer||a(this.currentForm),this.containers=a(this.settings.errorContainer).add(this.settings.errorLabelContainer),this.submitted={},this.valueCache={},this.pendingRequest=0,this.pending={},this.invalid={},this.reset();var c,d=this.groups={};a.each(this.settings.groups,function(b,c){"string"==typeof c&&(c=c.split(/\s/)),a.each(c,function(a,c){d[c]=b})}),c=this.settings.rules,a.each(c,function(b,d){c[b]=a.validator.normalizeRule(d)}),a(this.currentForm).validateDelegate(":text, [type='password'], [type='file'], select, textarea, [type='number'], [type='search'] ,[type='tel'], [type='url'], [type='email'], [type='datetime'], [type='date'], [type='month'], [type='week'], [type='time'], [type='datetime-local'], [type='range'], [type='color'], [type='radio'], [type='checkbox']","focusin focusout keyup",b).validateDelegate("select, option, [type='radio'], [type='checkbox']","click",b),this.settings.invalidHandler&&a(this.currentForm).bind("invalid-form.validate",this.settings.invalidHandler),a(this.currentForm).find("[required], [data-rule-required], .required").attr("aria-required","true")},form:function(){return this.checkForm(),a.extend(this.submitted,this.errorMap),this.invalid=a.extend({},this.errorMap),this.valid()||a(this.currentForm).triggerHandler("invalid-form",[this]),this.showErrors(),this.valid()},checkForm:function(){this.prepareForm();for(var a=0,b=this.currentElements=this.elements();b[a];a++)this.check(b[a]);return this.valid()},element:function(b){var c=this.clean(b),d=this.validationTargetFor(c),e=!0;return this.lastElement=d,void 0===d?delete this.invalid[c.name]:(this.prepareElement(d),this.currentElements=a(d),e=this.check(d)!==!1,e?delete this.invalid[d.name]:this.invalid[d.name]=!0),a(b).attr("aria-invalid",!e),this.numberOfInvalids()||(this.toHide=this.toHide.add(this.containers)),this.showErrors(),e},showErrors:function(b){if(b){a.extend(this.errorMap,b),this.errorList=[];for(var c in b)this.errorList.push({message:b[c],element:this.findByName(c)[0]});this.successList=a.grep(this.successList,function(a){return!(a.name in b)})}this.settings.showErrors?this.settings.showErrors.call(this,this.errorMap,this.errorList):this.defaultShowErrors()},resetForm:function(){a.fn.resetForm&&a(this.currentForm).resetForm(),this.submitted={},this.lastElement=null,this.prepareForm(),this.hideErrors(),this.elements().removeClass(this.settings.errorClass).removeData("previousValue").removeAttr("aria-invalid")},numberOfInvalids:function(){return this.objectLength(this.invalid)},objectLength:function(a){var b,c=0;for(b in a)c++;return c},hideErrors:function(){this.hideThese(this.toHide)},hideThese:function(a){a.not(this.containers).text(""),this.addWrapper(a).hide()},valid:function(){return 0===this.size()},size:function(){return this.errorList.length},focusInvalid:function(){if(this.settings.focusInvalid)try{a(this.findLastActive()||this.errorList.length&&this.errorList[0].element||[]).filter(":visible").focus().trigger("focusin")}catch(b){}},findLastActive:function(){var b=this.lastActive;return b&&1===a.grep(this.errorList,function(a){return a.element.name===b.name}).length&&b},elements:function(){var b=this,c={};return a(this.currentForm).find("input, select, textarea").not(":submit, :reset, :image, [disabled], [readonly]").not(this.settings.ignore).filter(function(){return!this.name&&b.settings.debug&&window.console&&console.error("%o has no name assigned",this),this.name in c||!b.objectLength(a(this).rules())?!1:(c[this.name]=!0,!0)})},clean:function(b){return a(b)[0]},errors:function(){var b=this.settings.errorClass.split(" ").join(".");return a(this.settings.errorElement+"."+b,this.errorContext)},reset:function(){this.successList=[],this.errorList=[],this.errorMap={},this.toShow=a([]),this.toHide=a([]),this.currentElements=a([])},prepareForm:function(){this.reset(),this.toHide=this.errors().add(this.containers)},prepareElement:function(a){this.reset(),this.toHide=this.errorsFor(a)},elementValue:function(b){var c,d=a(b),e=b.type;return"radio"===e||"checkbox"===e?a("input[name='"+b.name+"']:checked").val():"number"===e&&"undefined"!=typeof b.validity?b.validity.badInput?!1:d.val():(c=d.val(),"string"==typeof c?c.replace(/\r/g,""):c)},check:function(b){b=this.validationTargetFor(this.clean(b));var c,d,e,f=a(b).rules(),g=a.map(f,function(a,b){return b}).length,h=!1,i=this.elementValue(b);for(d in f){e={method:d,parameters:f[d]};try{if(c=a.validator.methods[d].call(this,i,b,e.parameters),"dependency-mismatch"===c&&1===g){h=!0;continue}if(h=!1,"pending"===c)return void(this.toHide=this.toHide.not(this.errorsFor(b)));if(!c)return this.formatAndAdd(b,e),!1}catch(j){throw this.settings.debug&&window.console&&console.log("Exception occurred when checking element "+b.id+", check the '"+e.method+"' method.",j),j}}if(!h)return this.objectLength(f)&&this.successList.push(b),!0},customDataMessage:function(b,c){return a(b).data("msg"+c.charAt(0).toUpperCase()+c.substring(1).toLowerCase())||a(b).data("msg")},customMessage:function(a,b){var c=this.settings.messages[a];return c&&(c.constructor===String?c:c[b])},findDefined:function(){for(var a=0;a
Warning: No message defined for "+b.name+"")},formatAndAdd:function(b,c){var d=this.defaultMessage(b,c.method),e=/\$?\{(\d+)\}/g;"function"==typeof d?d=d.call(this,c.parameters,b):e.test(d)&&(d=a.validator.format(d.replace(e,"{$1}"),c.parameters)),this.errorList.push({message:d,element:b,method:c.method}),this.errorMap[b.name]=d,this.submitted[b.name]=d},addWrapper:function(a){return this.settings.wrapper&&(a=a.add(a.parent(this.settings.wrapper))),a},defaultShowErrors:function(){var a,b,c;for(a=0;this.errorList[a];a++)c=this.errorList[a],this.settings.highlight&&this.settings.highlight.call(this,c.element,this.settings.errorClass,this.settings.validClass),this.showLabel(c.element,c.message);if(this.errorList.length&&(this.toShow=this.toShow.add(this.containers)),this.settings.success)for(a=0;this.successList[a];a++)this.showLabel(this.successList[a]);if(this.settings.unhighlight)for(a=0,b=this.validElements();b[a];a++)this.settings.unhighlight.call(this,b[a],this.settings.errorClass,this.settings.validClass);this.toHide=this.toHide.not(this.toShow),this.hideErrors(),this.addWrapper(this.toShow).show()},validElements:function(){return this.currentElements.not(this.invalidElements())},invalidElements:function(){return a(this.errorList).map(function(){return this.element})},showLabel:function(b,c){var d,e,f,g=this.errorsFor(b),h=this.idOrName(b),i=a(b).attr("aria-describedby");g.length?(g.removeClass(this.settings.validClass).addClass(this.settings.errorClass),g.html(c)):(g=a("<"+this.settings.errorElement+">").attr("id",h+"-error").addClass(this.settings.errorClass).html(c||""),d=g,this.settings.wrapper&&(d=g.hide().show().wrap("<"+this.settings.wrapper+"/>").parent()),this.labelContainer.length?this.labelContainer.append(d):this.settings.errorPlacement?this.settings.errorPlacement(d,a(b)):d.insertAfter(b),g.is("label")?g.attr("for",h):0===g.parents("label[for='"+h+"']").length&&(f=g.attr("id").replace(/(:|\.|\[|\])/g,"\\$1"),i?i.match(new RegExp("\\b"+f+"\\b"))||(i+=" "+f):i=f,a(b).attr("aria-describedby",i),e=this.groups[b.name],e&&a.each(this.groups,function(b,c){c===e&&a("[name='"+b+"']",this.currentForm).attr("aria-describedby",g.attr("id"))}))),!c&&this.settings.success&&(g.text(""),"string"==typeof this.settings.success?g.addClass(this.settings.success):this.settings.success(g,b)),this.toShow=this.toShow.add(g)},errorsFor:function(b){var c=this.idOrName(b),d=a(b).attr("aria-describedby"),e="label[for='"+c+"'], label[for='"+c+"'] *";return d&&(e=e+", #"+d.replace(/\s+/g,", #")),this.errors().filter(e)},idOrName:function(a){return this.groups[a.name]||(this.checkable(a)?a.name:a.id||a.name)},validationTargetFor:function(b){return this.checkable(b)&&(b=this.findByName(b.name)),a(b).not(this.settings.ignore)[0]},checkable:function(a){return/radio|checkbox/i.test(a.type)},findByName:function(b){return a(this.currentForm).find("[name='"+b+"']")},getLength:function(b,c){switch(c.nodeName.toLowerCase()){case"select":return a("option:selected",c).length;case"input":if(this.checkable(c))return this.findByName(c.name).filter(":checked").length}return b.length},depend:function(a,b){return this.dependTypes[typeof a]?this.dependTypes[typeof a](a,b):!0},dependTypes:{"boolean":function(a){return a},string:function(b,c){return!!a(b,c.form).length},"function":function(a,b){return a(b)}},optional:function(b){var c=this.elementValue(b);return!a.validator.methods.required.call(this,c,b)&&"dependency-mismatch"},startRequest:function(a){this.pending[a.name]||(this.pendingRequest++,this.pending[a.name]=!0)},stopRequest:function(b,c){this.pendingRequest--,this.pendingRequest<0&&(this.pendingRequest=0),delete this.pending[b.name],c&&0===this.pendingRequest&&this.formSubmitted&&this.form()?(a(this.currentForm).submit(),this.formSubmitted=!1):!c&&0===this.pendingRequest&&this.formSubmitted&&(a(this.currentForm).triggerHandler("invalid-form",[this]),this.formSubmitted=!1)},previousValue:function(b){return a.data(b,"previousValue")||a.data(b,"previousValue",{old:null,valid:!0,message:this.defaultMessage(b,"remote")})}},classRuleSettings:{required:{required:!0},email:{email:!0},url:{url:!0},date:{date:!0},dateISO:{dateISO:!0},number:{number:!0},digits:{digits:!0},creditcard:{creditcard:!0}},addClassRules:function(b,c){b.constructor===String?this.classRuleSettings[b]=c:a.extend(this.classRuleSettings,b)},classRules:function(b){var c={},d=a(b).attr("class");return d&&a.each(d.split(" "),function(){this in a.validator.classRuleSettings&&a.extend(c,a.validator.classRuleSettings[this])}),c},attributeRules:function(b){var c,d,e={},f=a(b),g=b.getAttribute("type");for(c in a.validator.methods)"required"===c?(d=b.getAttribute(c),""===d&&(d=!0),d=!!d):d=f.attr(c),/min|max/.test(c)&&(null===g||/number|range|text/.test(g))&&(d=Number(d)),d||0===d?e[c]=d:g===c&&"range"!==g&&(e[c]=!0);return e.maxlength&&/-1|2147483647|524288/.test(e.maxlength)&&delete e.maxlength,e},dataRules:function(b){var c,d,e={},f=a(b);for(c in a.validator.methods)d=f.data("rule"+c.charAt(0).toUpperCase()+c.substring(1).toLowerCase()),void 0!==d&&(e[c]=d);return e},staticRules:function(b){var c={},d=a.data(b.form,"validator");return d.settings.rules&&(c=a.validator.normalizeRule(d.settings.rules[b.name])||{}),c},normalizeRules:function(b,c){return a.each(b,function(d,e){if(e===!1)return void delete b[d];if(e.param||e.depends){var f=!0;switch(typeof e.depends){case"string":f=!!a(e.depends,c.form).length;break;case"function":f=e.depends.call(c,c)}f?b[d]=void 0!==e.param?e.param:!0:delete b[d]}}),a.each(b,function(d,e){b[d]=a.isFunction(e)?e(c):e}),a.each(["minlength","maxlength"],function(){b[this]&&(b[this]=Number(b[this]))}),a.each(["rangelength","range"],function(){var c;b[this]&&(a.isArray(b[this])?b[this]=[Number(b[this][0]),Number(b[this][1])]:"string"==typeof b[this]&&(c=b[this].replace(/[\[\]]/g,"").split(/[\s,]+/),b[this]=[Number(c[0]),Number(c[1])]))}),a.validator.autoCreateRanges&&(null!=b.min&&null!=b.max&&(b.range=[b.min,b.max],delete b.min,delete b.max),null!=b.minlength&&null!=b.maxlength&&(b.rangelength=[b.minlength,b.maxlength],delete b.minlength,delete b.maxlength)),b},normalizeRule:function(b){if("string"==typeof b){var c={};a.each(b.split(/\s/),function(){c[this]=!0}),b=c}return b},addMethod:function(b,c,d){a.validator.methods[b]=c,a.validator.messages[b]=void 0!==d?d:a.validator.messages[b],c.length<3&&a.validator.addClassRules(b,a.validator.normalizeRule(b))},methods:{required:function(b,c,d){if(!this.depend(d,c))return"dependency-mismatch";if("select"===c.nodeName.toLowerCase()){var e=a(c).val();return e&&e.length>0}return this.checkable(c)?this.getLength(b,c)>0:a.trim(b).length>0},email:function(a,b){return this.optional(b)||/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/.test(a)},url:function(a,b){return this.optional(b)||/^(https?|s?ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test(a)},date:function(a,b){return this.optional(b)||!/Invalid|NaN/.test(new Date(a).toString())},dateISO:function(a,b){return this.optional(b)||/^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])$/.test(a)},number:function(a,b){return this.optional(b)||/^-?(?:\d+|\d{1,3}(?:,\d{3})+)?(?:\.\d+)?$/.test(a)},digits:function(a,b){return this.optional(b)||/^\d+$/.test(a)},creditcard:function(a,b){if(this.optional(b))return"dependency-mismatch";if(/[^0-9 \-]+/.test(a))return!1;var c,d,e=0,f=0,g=!1;if(a=a.replace(/\D/g,""),a.length<13||a.length>19)return!1;for(c=a.length-1;c>=0;c--)d=a.charAt(c),f=parseInt(d,10),g&&(f*=2)>9&&(f-=9),e+=f,g=!g;return e%10===0},minlength:function(b,c,d){var e=a.isArray(b)?b.length:this.getLength(b,c);return this.optional(c)||e>=d},maxlength:function(b,c,d){var e=a.isArray(b)?b.length:this.getLength(b,c);return this.optional(c)||d>=e},rangelength:function(b,c,d){var e=a.isArray(b)?b.length:this.getLength(b,c);return this.optional(c)||e>=d[0]&&e<=d[1]},min:function(a,b,c){return this.optional(b)||a>=c},max:function(a,b,c){return this.optional(b)||c>=a},range:function(a,b,c){return this.optional(b)||a>=c[0]&&a<=c[1]},equalTo:function(b,c,d){var e=a(d);return this.settings.onfocusout&&e.unbind(".validate-equalTo").bind("blur.validate-equalTo",function(){a(c).valid()}),b===e.val()},remote:function(b,c,d){if(this.optional(c))return"dependency-mismatch";var e,f,g=this.previousValue(c);return this.settings.messages[c.name]||(this.settings.messages[c.name]={}),g.originalMessage=this.settings.messages[c.name].remote,this.settings.messages[c.name].remote=g.message,d="string"==typeof d&&{url:d}||d,g.old===b?g.valid:(g.old=b,e=this,this.startRequest(c),f={},f[c.name]=b,a.ajax(a.extend(!0,{url:d,mode:"abort",port:"validate"+c.name,dataType:"json",data:f,context:e.currentForm,success:function(d){var f,h,i,j=d===!0||"true"===d;e.settings.messages[c.name].remote=g.originalMessage,j?(i=e.formSubmitted,e.prepareElement(c),e.formSubmitted=i,e.successList.push(c),delete e.invalid[c.name],e.showErrors()):(f={},h=d||e.defaultMessage(c,"remote"),f[c.name]=g.message=a.isFunction(h)?h(b):h,e.invalid[c.name]=!0,e.showErrors(f)),g.valid=j,e.stopRequest(c,j)}},d)),"pending")}}}),a.format=function(){throw"$.format has been deprecated. Please use $.validator.format instead."};var b,c={};a.ajaxPrefilter?a.ajaxPrefilter(function(a,b,d){var e=a.port;"abort"===a.mode&&(c[e]&&c[e].abort(),c[e]=d)}):(b=a.ajax,a.ajax=function(d){var e=("mode"in d?d:a.ajaxSettings).mode,f=("port"in d?d:a.ajaxSettings).port;return"abort"===e?(c[f]&&c[f].abort(),c[f]=b.apply(this,arguments),c[f]):b.apply(this,arguments)}),a.extend(a.fn,{validateDelegate:function(b,c,d){return this.bind(c,function(c){var e=a(c.target);return e.is(b)?d.apply(e,arguments):void 0})}})});
\ No newline at end of file
diff --git a/app/culture/view/szwjs/public/js/jquerybark.js b/app/culture/view/szwjs/public/js/jquerybark.js
new file mode 100644
index 0000000..93adea1
--- /dev/null
+++ b/app/culture/view/szwjs/public/js/jquerybark.js
@@ -0,0 +1,4 @@
+/*! jQuery v1.7.2 jquery.com | jquery.org/license */
+(function(a,b){function cy(a){return f.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}function cu(a){if(!cj[a]){var b=c.body,d=f("<"+a+">").appendTo(b),e=d.css("display");d.remove();if(e==="none"||e===""){ck||(ck=c.createElement("iframe"),ck.frameBorder=ck.width=ck.height=0),b.appendChild(ck);if(!cl||!ck.createElement)cl=(ck.contentWindow||ck.contentDocument).document,cl.write((f.support.boxModel?"":"")+""),cl.close();d=cl.createElement(a),cl.body.appendChild(d),e=f.css(d,"display"),b.removeChild(ck)}cj[a]=e}return cj[a]}function ct(a,b){var c={};f.each(cp.concat.apply([],cp.slice(0,b)),function(){c[this]=a});return c}function cs(){cq=b}function cr(){setTimeout(cs,0);return cq=f.now()}function ci(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}function ch(){try{return new a.XMLHttpRequest}catch(b){}}function cb(a,c){a.dataFilter&&(c=a.dataFilter(c,a.dataType));var d=a.dataTypes,e={},g,h,i=d.length,j,k=d[0],l,m,n,o,p;for(g=1;g0){if(c!=="border")for(;e=0===c})}function S(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function K(){return!0}function J(){return!1}function n(a,b,c){var d=b+"defer",e=b+"queue",g=b+"mark",h=f._data(a,d);h&&(c==="queue"||!f._data(a,e))&&(c==="mark"||!f._data(a,g))&&setTimeout(function(){!f._data(a,e)&&!f._data(a,g)&&(f.removeData(a,d,!0),h.fire())},0)}function m(a){for(var b in a){if(b==="data"&&f.isEmptyObject(a[b]))continue;if(b!=="toJSON")return!1}return!0}function l(a,c,d){if(d===b&&a.nodeType===1){var e="data-"+c.replace(k,"-$1").toLowerCase();d=a.getAttribute(e);if(typeof d=="string"){try{d=d==="true"?!0:d==="false"?!1:d==="null"?null:f.isNumeric(d)?+d:j.test(d)?f.parseJSON(d):d}catch(g){}f.data(a,c,d)}else d=b}return d}function h(a){var b=g[a]={},c,d;a=a.split(/\s+/);for(c=0,d=a.length;c)[^>]*$|#([\w\-]*)$)/,j=/\S/,k=/^\s+/,l=/\s+$/,m=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,n=/^[\],:{}\s]*$/,o=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,p=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,q=/(?:^|:|,)(?:\s*\[)+/g,r=/(webkit)[ \/]([\w.]+)/,s=/(opera)(?:.*version)?[ \/]([\w.]+)/,t=/(msie) ([\w.]+)/,u=/(mozilla)(?:.*? rv:([\w.]+))?/,v=/-([a-z]|[0-9])/ig,w=/^-ms-/,x=function(a,b){return(b+"").toUpperCase()},y=d.userAgent,z,A,B,C=Object.prototype.toString,D=Object.prototype.hasOwnProperty,E=Array.prototype.push,F=Array.prototype.slice,G=String.prototype.trim,H=Array.prototype.indexOf,I={};e.fn=e.prototype={constructor:e,init:function(a,d,f){var g,h,j,k;if(!a)return this;if(a.nodeType){this.context=this[0]=a,this.length=1;return this}if(a==="body"&&!d&&c.body){this.context=c,this[0]=c.body,this.selector=a,this.length=1;return this}if(typeof a=="string"){a.charAt(0)!=="<"||a.charAt(a.length-1)!==">"||a.length<3?g=i.exec(a):g=[null,a,null];if(g&&(g[1]||!d)){if(g[1]){d=d instanceof e?d[0]:d,k=d?d.ownerDocument||d:c,j=m.exec(a),j?e.isPlainObject(d)?(a=[c.createElement(j[1])],e.fn.attr.call(a,d,!0)):a=[k.createElement(j[1])]:(j=e.buildFragment([g[1]],[k]),a=(j.cacheable?e.clone(j.fragment):j.fragment).childNodes);return e.merge(this,a)}h=c.getElementById(g[2]);if(h&&h.parentNode){if(h.id!==g[2])return f.find(a);this.length=1,this[0]=h}this.context=c,this.selector=a;return this}return!d||d.jquery?(d||f).find(a):this.constructor(d).find(a)}if(e.isFunction(a))return f.ready(a);a.selector!==b&&(this.selector=a.selector,this.context=a.context);return e.makeArray(a,this)},selector:"",jquery:"1.7.2",length:0,size:function(){return this.length},toArray:function(){return F.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this[this.length+a]:this[a]},pushStack:function(a,b,c){var d=this.constructor();e.isArray(a)?E.apply(d,a):e.merge(d,a),d.prevObject=this,d.context=this.context,b==="find"?d.selector=this.selector+(this.selector?" ":"")+c:b&&(d.selector=this.selector+"."+b+"("+c+")");return d},each:function(a,b){return e.each(this,a,b)},ready:function(a){e.bindReady(),A.add(a);return this},eq:function(a){a=+a;return a===-1?this.slice(a):this.slice(a,a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(F.apply(this,arguments),"slice",F.call(arguments).join(","))},map:function(a){return this.pushStack(e.map(this,function(b,c){return a.call(b,c,b)}))},end:function(){return this.prevObject||this.constructor(null)},push:E,sort:[].sort,splice:[].splice},e.fn.init.prototype=e.fn,e.extend=e.fn.extend=function(){var a,c,d,f,g,h,i=arguments[0]||{},j=1,k=arguments.length,l=!1;typeof i=="boolean"&&(l=i,i=arguments[1]||{},j=2),typeof i!="object"&&!e.isFunction(i)&&(i={}),k===j&&(i=this,--j);for(;j0)return;A.fireWith(c,[e]),e.fn.trigger&&e(c).trigger("ready").off("ready")}},bindReady:function(){if(!A){A=e.Callbacks("once memory");if(c.readyState==="complete")return setTimeout(e.ready,1);if(c.addEventListener)c.addEventListener("DOMContentLoaded",B,!1),a.addEventListener("load",e.ready,!1);else if(c.attachEvent){c.attachEvent("onreadystatechange",B),a.attachEvent("onload",e.ready);var b=!1;try{b=a.frameElement==null}catch(d){}c.documentElement.doScroll&&b&&J()}}},isFunction:function(a){return e.type(a)==="function"},isArray:Array.isArray||function(a){return e.type(a)==="array"},isWindow:function(a){return a!=null&&a==a.window},isNumeric:function(a){return!isNaN(parseFloat(a))&&isFinite(a)},type:function(a){return a==null?String(a):I[C.call(a)]||"object"},isPlainObject:function(a){if(!a||e.type(a)!=="object"||a.nodeType||e.isWindow(a))return!1;try{if(a.constructor&&!D.call(a,"constructor")&&!D.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}var d;for(d in a);return d===b||D.call(a,d)},isEmptyObject:function(a){for(var b in a)return!1;return!0},error:function(a){throw new Error(a)},parseJSON:function(b){if(typeof b!="string"||!b)return null;b=e.trim(b);if(a.JSON&&a.JSON.parse)return a.JSON.parse(b);if(n.test(b.replace(o,"@").replace(p,"]").replace(q,"")))return(new Function("return "+b))();e.error("Invalid JSON: "+b)},parseXML:function(c){if(typeof c!="string"||!c)return null;var d,f;try{a.DOMParser?(f=new DOMParser,d=f.parseFromString(c,"text/xml")):(d=new ActiveXObject("Microsoft.XMLDOM"),d.async="false",d.loadXML(c))}catch(g){d=b}(!d||!d.documentElement||d.getElementsByTagName("parsererror").length)&&e.error("Invalid XML: "+c);return d},noop:function(){},globalEval:function(b){b&&j.test(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(w,"ms-").replace(v,x)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,c,d){var f,g=0,h=a.length,i=h===b||e.isFunction(a);if(d){if(i){for(f in a)if(c.apply(a[f],d)===!1)break}else for(;g0&&a[0]&&a[j-1]||j===0||e.isArray(a));if(k)for(;i1?i.call(arguments,0):b,j.notifyWith(k,e)}}function l(a){return function(c){b[a]=arguments.length>1?i.call(arguments,0):c,--g||j.resolveWith(j,b)}}var b=i.call(arguments,0),c=0,d=b.length,e=Array(d),g=d,h=d,j=d<=1&&a&&f.isFunction(a.promise)?a:f.Deferred(),k=j.promise();if(d>1){for(;ca ",d=p.getElementsByTagName("*"),e=p.getElementsByTagName("a")[0];if(!d||!d.length||!e)return{};g=c.createElement("select"),h=g.appendChild(c.createElement("option")),i=p.getElementsByTagName("input")[0],b={leadingWhitespace:p.firstChild.nodeType===3,tbody:!p.getElementsByTagName("tbody").length,htmlSerialize:!!p.getElementsByTagName("link").length,style:/top/.test(e.getAttribute("style")),hrefNormalized:e.getAttribute("href")==="/a",opacity:/^0.55/.test(e.style.opacity),cssFloat:!!e.style.cssFloat,checkOn:i.value==="on",optSelected:h.selected,getSetAttribute:p.className!=="t",enctype:!!c.createElement("form").enctype,html5Clone:c.createElement("nav").cloneNode(!0).outerHTML!=="<:nav>",submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0,pixelMargin:!0},f.boxModel=b.boxModel=c.compatMode==="CSS1Compat",i.checked=!0,b.noCloneChecked=i.cloneNode(!0).checked,g.disabled=!0,b.optDisabled=!h.disabled;try{delete p.test}catch(r){b.deleteExpando=!1}!p.addEventListener&&p.attachEvent&&p.fireEvent&&(p.attachEvent("onclick",function(){b.noCloneEvent=!1}),p.cloneNode(!0).fireEvent("onclick")),i=c.createElement("input"),i.value="t",i.setAttribute("type","radio"),b.radioValue=i.value==="t",i.setAttribute("checked","checked"),i.setAttribute("name","t"),p.appendChild(i),j=c.createDocumentFragment(),j.appendChild(p.lastChild),b.checkClone=j.cloneNode(!0).cloneNode(!0).lastChild.checked,b.appendChecked=i.checked,j.removeChild(i),j.appendChild(p);if(p.attachEvent)for(n in{submit:1,change:1,focusin:1})m="on"+n,o=m in p,o||(p.setAttribute(m,"return;"),o=typeof p[m]=="function"),b[n+"Bubbles"]=o;j.removeChild(p),j=g=h=p=i=null,f(function(){var d,e,g,h,i,j,l,m,n,q,r,s,t,u=c.getElementsByTagName("body")[0];!u||(m=1,t="padding:0;margin:0;border:",r="position:absolute;top:0;left:0;width:1px;height:1px;",s=t+"0;visibility:hidden;",n="style='"+r+t+"5px solid #000;",q=""+"",d=c.createElement("div"),d.style.cssText=s+"width:0;height:0;position:static;top:0;margin-top:"+m+"px",u.insertBefore(d,u.firstChild),p=c.createElement("div"),d.appendChild(p),p.innerHTML="",k=p.getElementsByTagName("td"),o=k[0].offsetHeight===0,k[0].style.display="",k[1].style.display="none",b.reliableHiddenOffsets=o&&k[0].offsetHeight===0,a.getComputedStyle&&(p.innerHTML="",l=c.createElement("div"),l.style.width="0",l.style.marginRight="0",p.style.width="2px",p.appendChild(l),b.reliableMarginRight=(parseInt((a.getComputedStyle(l,null)||{marginRight:0}).marginRight,10)||0)===0),typeof p.style.zoom!="undefined"&&(p.innerHTML="",p.style.width=p.style.padding="1px",p.style.border=0,p.style.overflow="hidden",p.style.display="inline",p.style.zoom=1,b.inlineBlockNeedsLayout=p.offsetWidth===3,p.style.display="block",p.style.overflow="visible",p.innerHTML="
",b.shrinkWrapBlocks=p.offsetWidth!==3),p.style.cssText=r+s,p.innerHTML=q,e=p.firstChild,g=e.firstChild,i=e.nextSibling.firstChild.firstChild,j={doesNotAddBorder:g.offsetTop!==5,doesAddBorderForTableAndCells:i.offsetTop===5},g.style.position="fixed",g.style.top="20px",j.fixedPosition=g.offsetTop===20||g.offsetTop===15,g.style.position=g.style.top="",e.style.overflow="hidden",e.style.position="relative",j.subtractsBorderForOverflowNotVisible=g.offsetTop===-5,j.doesNotIncludeMarginInBodyOffset=u.offsetTop!==m,a.getComputedStyle&&(p.style.marginTop="1%",b.pixelMargin=(a.getComputedStyle(p,null)||{marginTop:0}).marginTop!=="1%"),typeof d.style.zoom!="undefined"&&(d.style.zoom=1),u.removeChild(d),l=p=d=null,f.extend(b,j))});return b}();var j=/^(?:\{.*\}|\[.*\])$/,k=/([A-Z])/g;f.extend({cache:{},uuid:0,expando:"jQuery"+(f.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(a){a=a.nodeType?f.cache[a[f.expando]]:a[f.expando];return!!a&&!m(a)},data:function(a,c,d,e){if(!!f.acceptData(a)){var g,h,i,j=f.expando,k=typeof c=="string",l=a.nodeType,m=l?f.cache:a,n=l?a[j]:a[j]&&j,o=c==="events";if((!n||!m[n]||!o&&!e&&!m[n].data)&&k&&d===b)return;n||(l?a[j]=n=++f.uuid:n=j),m[n]||(m[n]={},l||(m[n].toJSON=f.noop));if(typeof c=="object"||typeof c=="function")e?m[n]=f.extend(m[n],c):m[n].data=f.extend(m[n].data,c);g=h=m[n],e||(h.data||(h.data={}),h=h.data),d!==b&&(h[f.camelCase(c)]=d);if(o&&!h[c])return g.events;k?(i=h[c],i==null&&(i=h[f.camelCase(c)])):i=h;return i}},removeData:function(a,b,c){if(!!f.acceptData(a)){var d,e,g,h=f.expando,i=a.nodeType,j=i?f.cache:a,k=i?a[h]:h;if(!j[k])return;if(b){d=c?j[k]:j[k].data;if(d){f.isArray(b)||(b in d?b=[b]:(b=f.camelCase(b),b in d?b=[b]:b=b.split(" ")));for(e=0,g=b.length;e1,null,!1)},removeData:function(a){return this.each(function(){f.removeData(this,a)})}}),f.extend({_mark:function(a,b){a&&(b=(b||"fx")+"mark",f._data(a,b,(f._data(a,b)||0)+1))},_unmark:function(a,b,c){a!==!0&&(c=b,b=a,a=!1);if(b){c=c||"fx";var d=c+"mark",e=a?0:(f._data(b,d)||1)-1;e?f._data(b,d,e):(f.removeData(b,d,!0),n(b,c,"mark"))}},queue:function(a,b,c){var d;if(a){b=(b||"fx")+"queue",d=f._data(a,b),c&&(!d||f.isArray(c)?d=f._data(a,b,f.makeArray(c)):d.push(c));return d||[]}},dequeue:function(a,b){b=b||"fx";var c=f.queue(a,b),d=c.shift(),e={};d==="inprogress"&&(d=c.shift()),d&&(b==="fx"&&c.unshift("inprogress"),f._data(a,b+".run",e),d.call(a,function(){f.dequeue(a,b)},e)),c.length||(f.removeData(a,b+"queue "+b+".run",!0),n(a,b,"queue"))}}),f.fn.extend({queue:function(a,c){var d=2;typeof a!="string"&&(c=a,a="fx",d--);if(arguments.length1)},removeAttr:function(a){return this.each(function(){f.removeAttr(this,a)})},prop:function(a,b){return f.access(this,f.prop,a,b,arguments.length>1)},removeProp:function(a){a=f.propFix[a]||a;return this.each(function(){try{this[a]=b,delete this[a]}catch(c){}})},addClass:function(a){var b,c,d,e,g,h,i;if(f.isFunction(a))return this.each(function(b){f(this).addClass(a.call(this,b,this.className))});if(a&&typeof a=="string"){b=a.split(p);for(c=0,d=this.length;c-1)return!0;return!1},val:function(a){var c,d,e,g=this[0];{if(!!arguments.length){e=f.isFunction(a);return this.each(function(d){var g=f(this),h;if(this.nodeType===1){e?h=a.call(this,d,g.val()):h=a,h==null?h="":typeof h=="number"?h+="":f.isArray(h)&&(h=f.map(h,function(a){return a==null?"":a+""})),c=f.valHooks[this.type]||f.valHooks[this.nodeName.toLowerCase()];if(!c||!("set"in c)||c.set(this,h,"value")===b)this.value=h}})}if(g){c=f.valHooks[g.type]||f.valHooks[g.nodeName.toLowerCase()];if(c&&"get"in c&&(d=c.get(g,"value"))!==b)return d;d=g.value;return typeof d=="string"?d.replace(q,""):d==null?"":d}}}}),f.extend({valHooks:{option:{get:function(a){var b=a.attributes.value;return!b||b.specified?a.value:a.text}},select:{get:function(a){var b,c,d,e,g=a.selectedIndex,h=[],i=a.options,j=a.type==="select-one";if(g<0)return null;c=j?g:0,d=j?g+1:i.length;for(;c=0}),c.length||(a.selectedIndex=-1);return c}}},attrFn:{val:!0,css:!0,html:!0,text:!0,data:!0,width:!0,height:!0,offset:!0},attr:function(a,c,d,e){var g,h,i,j=a.nodeType;if(!!a&&j!==3&&j!==8&&j!==2){if(e&&c in f.attrFn)return f(a)[c](d);if(typeof a.getAttribute=="undefined")return f.prop(a,c,d);i=j!==1||!f.isXMLDoc(a),i&&(c=c.toLowerCase(),h=f.attrHooks[c]||(u.test(c)?x:w));if(d!==b){if(d===null){f.removeAttr(a,c);return}if(h&&"set"in h&&i&&(g=h.set(a,d,c))!==b)return g;a.setAttribute(c,""+d);return d}if(h&&"get"in h&&i&&(g=h.get(a,c))!==null)return g;g=a.getAttribute(c);return g===null?b:g}},removeAttr:function(a,b){var c,d,e,g,h,i=0;if(b&&a.nodeType===1){d=b.toLowerCase().split(p),g=d.length;for(;i=0}})});var z=/^(?:textarea|input|select)$/i,A=/^([^\.]*)?(?:\.(.+))?$/,B=/(?:^|\s)hover(\.\S+)?\b/,C=/^key/,D=/^(?:mouse|contextmenu)|click/,E=/^(?:focusinfocus|focusoutblur)$/,F=/^(\w*)(?:#([\w\-]+))?(?:\.([\w\-]+))?$/,G=function(
+a){var b=F.exec(a);b&&(b[1]=(b[1]||"").toLowerCase(),b[3]=b[3]&&new RegExp("(?:^|\\s)"+b[3]+"(?:\\s|$)"));return b},H=function(a,b){var c=a.attributes||{};return(!b[1]||a.nodeName.toLowerCase()===b[1])&&(!b[2]||(c.id||{}).value===b[2])&&(!b[3]||b[3].test((c["class"]||{}).value))},I=function(a){return f.event.special.hover?a:a.replace(B,"mouseenter$1 mouseleave$1")};f.event={add:function(a,c,d,e,g){var h,i,j,k,l,m,n,o,p,q,r,s;if(!(a.nodeType===3||a.nodeType===8||!c||!d||!(h=f._data(a)))){d.handler&&(p=d,d=p.handler,g=p.selector),d.guid||(d.guid=f.guid++),j=h.events,j||(h.events=j={}),i=h.handle,i||(h.handle=i=function(a){return typeof f!="undefined"&&(!a||f.event.triggered!==a.type)?f.event.dispatch.apply(i.elem,arguments):b},i.elem=a),c=f.trim(I(c)).split(" ");for(k=0;k=0&&(h=h.slice(0,-1),k=!0),h.indexOf(".")>=0&&(i=h.split("."),h=i.shift(),i.sort());if((!e||f.event.customEvent[h])&&!f.event.global[h])return;c=typeof c=="object"?c[f.expando]?c:new f.Event(h,c):new f.Event(h),c.type=h,c.isTrigger=!0,c.exclusive=k,c.namespace=i.join("."),c.namespace_re=c.namespace?new RegExp("(^|\\.)"+i.join("\\.(?:.*\\.)?")+"(\\.|$)"):null,o=h.indexOf(":")<0?"on"+h:"";if(!e){j=f.cache;for(l in j)j[l].events&&j[l].events[h]&&f.event.trigger(c,d,j[l].handle.elem,!0);return}c.result=b,c.target||(c.target=e),d=d!=null?f.makeArray(d):[],d.unshift(c),p=f.event.special[h]||{};if(p.trigger&&p.trigger.apply(e,d)===!1)return;r=[[e,p.bindType||h]];if(!g&&!p.noBubble&&!f.isWindow(e)){s=p.delegateType||h,m=E.test(s+h)?e:e.parentNode,n=null;for(;m;m=m.parentNode)r.push([m,s]),n=m;n&&n===e.ownerDocument&&r.push([n.defaultView||n.parentWindow||a,s])}for(l=0;le&&j.push({elem:this,matches:d.slice(e)});for(k=0;k0?this.on(b,null,a,c):this.trigger(b)},f.attrFn&&(f.attrFn[b]=!0),C.test(b)&&(f.event.fixHooks[b]=f.event.keyHooks),D.test(b)&&(f.event.fixHooks[b]=f.event.mouseHooks)}),function(){function x(a,b,c,e,f,g){for(var h=0,i=e.length;h0){k=j;break}}j=j[a]}e[h]=k}}}function w(a,b,c,e,f,g){for(var h=0,i=e.length;h+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,d="sizcache"+(Math.random()+"").replace(".",""),e=0,g=Object.prototype.toString,h=!1,i=!0,j=/\\/g,k=/\r\n/g,l=/\W/;[0,0].sort(function(){i=!1;return 0});var m=function(b,d,e,f){e=e||[],d=d||c;var h=d;if(d.nodeType!==1&&d.nodeType!==9)return[];if(!b||typeof b!="string")return e;var i,j,k,l,n,q,r,t,u=!0,v=m.isXML(d),w=[],x=b;do{a.exec(""),i=a.exec(x);if(i){x=i[3],w.push(i[1]);if(i[2]){l=i[3];break}}}while(i);if(w.length>1&&p.exec(b))if(w.length===2&&o.relative[w[0]])j=y(w[0]+w[1],d,f);else{j=o.relative[w[0]]?[d]:m(w.shift(),d);while(w.length)b=w.shift(),o.relative[b]&&(b+=w.shift()),j=y(b,j,f)}else{!f&&w.length>1&&d.nodeType===9&&!v&&o.match.ID.test(w[0])&&!o.match.ID.test(w[w.length-1])&&(n=m.find(w.shift(),d,v),d=n.expr?m.filter(n.expr,n.set)[0]:n.set[0]);if(d){n=f?{expr:w.pop(),set:s(f)}:m.find(w.pop(),w.length===1&&(w[0]==="~"||w[0]==="+")&&d.parentNode?d.parentNode:d,v),j=n.expr?m.filter(n.expr,n.set):n.set,w.length>0?k=s(j):u=!1;while(w.length)q=w.pop(),r=q,o.relative[q]?r=w.pop():q="",r==null&&(r=d),o.relative[q](k,r,v)}else k=w=[]}k||(k=j),k||m.error(q||b);if(g.call(k)==="[object Array]")if(!u)e.push.apply(e,k);else if(d&&d.nodeType===1)for(t=0;k[t]!=null;t++)k[t]&&(k[t]===!0||k[t].nodeType===1&&m.contains(d,k[t]))&&e.push(j[t]);else for(t=0;k[t]!=null;t++)k[t]&&k[t].nodeType===1&&e.push(j[t]);else s(k,e);l&&(m(l,h,e,f),m.uniqueSort(e));return e};m.uniqueSort=function(a){if(u){h=i,a.sort(u);if(h)for(var b=1;b0},m.find=function(a,b,c){var d,e,f,g,h,i;if(!a)return[];for(e=0,f=o.order.length;e":function(a,b){var c,d=typeof b=="string",e=0,f=a.length;if(d&&!l.test(b)){b=b.toLowerCase();for(;e=0)?c||d.push(h):c&&(b[g]=!1));return!1},ID:function(a){return a[1].replace(j,"")},TAG:function(a,b){return a[1].replace(j,"").toLowerCase()},CHILD:function(a){if(a[1]==="nth"){a[2]||m.error(a[0]),a[2]=a[2].replace(/^\+|\s*/g,"");var b=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(a[2]==="even"&&"2n"||a[2]==="odd"&&"2n+1"||!/\D/.test(a[2])&&"0n+"+a[2]||a[2]);a[2]=b[1]+(b[2]||1)-0,a[3]=b[3]-0}else a[2]&&m.error(a[0]);a[0]=e++;return a},ATTR:function(a,b,c,d,e,f){var g=a[1]=a[1].replace(j,"");!f&&o.attrMap[g]&&(a[1]=o.attrMap[g]),a[4]=(a[4]||a[5]||"").replace(j,""),a[2]==="~="&&(a[4]=" "+a[4]+" ");return a},PSEUDO:function(b,c,d,e,f){if(b[1]==="not")if((a.exec(b[3])||"").length>1||/^\w/.test(b[3]))b[3]=m(b[3],null,null,c);else{var g=m.filter(b[3],c,d,!0^f);d||e.push.apply(e,g);return!1}else if(o.match.POS.test(b[0])||o.match.CHILD.test(b[0]))return!0;return b},POS:function(a){a.unshift(!0);return a}},filters:{enabled:function(a){return a.disabled===!1&&a.type!=="hidden"},disabled:function(a){return a.disabled===!0},checked:function(a){return a.checked===!0},selected:function(a){a.parentNode&&a.parentNode.selectedIndex;return a.selected===!0},parent:function(a){return!!a.firstChild},empty:function(a){return!a.firstChild},has:function(a,b,c){return!!m(c[3],a).length},header:function(a){return/h\d/i.test(a.nodeName)},text:function(a){var b=a.getAttribute("type"),c=a.type;return a.nodeName.toLowerCase()==="input"&&"text"===c&&(b===c||b===null)},radio:function(a){return a.nodeName.toLowerCase()==="input"&&"radio"===a.type},checkbox:function(a){return a.nodeName.toLowerCase()==="input"&&"checkbox"===a.type},file:function(a){return a.nodeName.toLowerCase()==="input"&&"file"===a.type},password:function(a){return a.nodeName.toLowerCase()==="input"&&"password"===a.type},submit:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"submit"===a.type},image:function(a){return a.nodeName.toLowerCase()==="input"&&"image"===a.type},reset:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"reset"===a.type},button:function(a){var b=a.nodeName.toLowerCase();return b==="input"&&"button"===a.type||b==="button"},input:function(a){return/input|select|textarea|button/i.test(a.nodeName)},focus:function(a){return a===a.ownerDocument.activeElement}},setFilters:{first:function(a,b){return b===0},last:function(a,b,c,d){return b===d.length-1},even:function(a,b){return b%2===0},odd:function(a,b){return b%2===1},lt:function(a,b,c){return bc[3]-0},nth:function(a,b,c){return c[3]-0===b},eq:function(a,b,c){return c[3]-0===b}},filter:{PSEUDO:function(a,b,c,d){var e=b[1],f=o.filters[e];if(f)return f(a,c,b,d);if(e==="contains")return(a.textContent||a.innerText||n([a])||"").indexOf(b[3])>=0;if(e==="not"){var g=b[3];for(var h=0,i=g.length;h=0}},ID:function(a,b){return a.nodeType===1&&a.getAttribute("id")===b},TAG:function(a,b){return b==="*"&&a.nodeType===1||!!a.nodeName&&a.nodeName.toLowerCase()===b},CLASS:function(a,b){return(" "+(a.className||a.getAttribute("class"))+" ").indexOf(b)>-1},ATTR:function(a,b){var c=b[1],d=m.attr?m.attr(a,c):o.attrHandle[c]?o.attrHandle[c](a):a[c]!=null?a[c]:a.getAttribute(c),e=d+"",f=b[2],g=b[4];return d==null?f==="!=":!f&&m.attr?d!=null:f==="="?e===g:f==="*="?e.indexOf(g)>=0:f==="~="?(" "+e+" ").indexOf(g)>=0:g?f==="!="?e!==g:f==="^="?e.indexOf(g)===0:f==="$="?e.substr(e.length-g.length)===g:f==="|="?e===g||e.substr(0,g.length+1)===g+"-":!1:e&&d!==!1},POS:function(a,b,c,d){var e=b[2],f=o.setFilters[e];if(f)return f(a,c,b,d)}}},p=o.match.POS,q=function(a,b){return"\\"+(b-0+1)};for(var r in o.match)o.match[r]=new RegExp(o.match[r].source+/(?![^\[]*\])(?![^\(]*\))/.source),o.leftMatch[r]=new RegExp(/(^(?:.|\r|\n)*?)/.source+o.match[r].source.replace(/\\(\d+)/g,q));o.match.globalPOS=p;var s=function(a,b){a=Array.prototype.slice.call(a,0);if(b){b.push.apply(b,a);return b}return a};try{Array.prototype.slice.call(c.documentElement.childNodes,0)[0].nodeType}catch(t){s=function(a,b){var c=0,d=b||[];if(g.call(a)==="[object Array]")Array.prototype.push.apply(d,a);else if(typeof a.length=="number")for(var e=a.length;c ",e.insertBefore(a,e.firstChild),c.getElementById(d)&&(o.find.ID=function(a,c,d){if(typeof c.getElementById!="undefined"&&!d){var e=c.getElementById(a[1]);return e?e.id===a[1]||typeof e.getAttributeNode!="undefined"&&e.getAttributeNode("id").nodeValue===a[1]?[e]:b:[]}},o.filter.ID=function(a,b){var c=typeof a.getAttributeNode!="undefined"&&a.getAttributeNode("id");return a.nodeType===1&&c&&c.nodeValue===b}),e.removeChild(a),e=a=null}(),function(){var a=c.createElement("div");a.appendChild(c.createComment("")),a.getElementsByTagName("*").length>0&&(o.find.TAG=function(a,b){var c=b.getElementsByTagName(a[1]);if(a[1]==="*"){var d=[];for(var e=0;c[e];e++)c[e].nodeType===1&&d.push(c[e]);c=d}return c}),a.innerHTML=" ",a.firstChild&&typeof a.firstChild.getAttribute!="undefined"&&a.firstChild.getAttribute("href")!=="#"&&(o.attrHandle.href=function(a){return a.getAttribute("href",2)}),a=null}(),c.querySelectorAll&&function(){var a=m,b=c.createElement("div"),d="__sizzle__";b.innerHTML="
";if(!b.querySelectorAll||b.querySelectorAll(".TEST").length!==0){m=function(b,e,f,g){e=e||c;if(!g&&!m.isXML(e)){var h=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(b);if(h&&(e.nodeType===1||e.nodeType===9)){if(h[1])return s(e.getElementsByTagName(b),f);if(h[2]&&o.find.CLASS&&e.getElementsByClassName)return s(e.getElementsByClassName(h[2]),f)}if(e.nodeType===9){if(b==="body"&&e.body)return s([e.body],f);if(h&&h[3]){var i=e.getElementById(h[3]);if(!i||!i.parentNode)return s([],f);if(i.id===h[3])return s([i],f)}try{return s(e.querySelectorAll(b),f)}catch(j){}}else if(e.nodeType===1&&e.nodeName.toLowerCase()!=="object"){var k=e,l=e.getAttribute("id"),n=l||d,p=e.parentNode,q=/^\s*[+~]/.test(b);l?n=n.replace(/'/g,"\\$&"):e.setAttribute("id",n),q&&p&&(e=e.parentNode);try{if(!q||p)return s(e.querySelectorAll("[id='"+n+"'] "+b),f)}catch(r){}finally{l||k.removeAttribute("id")}}}return a(b,e,f,g)};for(var e in a)m[e]=a[e];b=null}}(),function(){var a=c.documentElement,b=a.matchesSelector||a.mozMatchesSelector||a.webkitMatchesSelector||a.msMatchesSelector;if(b){var d=!b.call(c.createElement("div"),"div"),e=!1;try{b.call(c.documentElement,"[test!='']:sizzle")}catch(f){e=!0}m.matchesSelector=function(a,c){c=c.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!m.isXML(a))try{if(e||!o.match.PSEUDO.test(c)&&!/!=/.test(c)){var f=b.call(a,c);if(f||!d||a.document&&a.document.nodeType!==11)return f}}catch(g){}return m(c,null,null,[a]).length>0}}}(),function(){var a=c.createElement("div");a.innerHTML="
";if(!!a.getElementsByClassName&&a.getElementsByClassName("e").length!==0){a.lastChild.className="e";if(a.getElementsByClassName("e").length===1)return;o.order.splice(1,0,"CLASS"),o.find.CLASS=function(a,b,c){if(typeof b.getElementsByClassName!="undefined"&&!c)return b.getElementsByClassName(a[1])},a=null}}(),c.documentElement.contains?m.contains=function(a,b){return a!==b&&(a.contains?a.contains(b):!0)}:c.documentElement.compareDocumentPosition?m.contains=function(a,b){return!!(a.compareDocumentPosition(b)&16)}:m.contains=function(){return!1},m.isXML=function(a){var b=(a?a.ownerDocument||a:0).documentElement;return b?b.nodeName!=="HTML":!1};var y=function(a,b,c){var d,e=[],f="",g=b.nodeType?[b]:b;while(d=o.match.PSEUDO.exec(a))f+=d[0],a=a.replace(o.match.PSEUDO,"");a=o.relative[a]?a+"*":a;for(var h=0,i=g.length;h0)for(h=g;h=0:f.filter(a,this).length>0:this.filter(a).length>0)},closest:function(a,b){var c=[],d,e,g=this[0];if(f.isArray(a)){var h=1;while(g&&g.ownerDocument&&g!==b){for(d=0;d-1:f.find.matchesSelector(g,a)){c.push(g);break}g=g.parentNode;if(!g||!g.ownerDocument||g===b||g.nodeType===11)break}}c=c.length>1?f.unique(c):c;return this.pushStack(c,"closest",a)},index:function(a){if(!a)return this[0]&&this[0].parentNode?this.prevAll().length:-1;if(typeof a=="string")return f.inArray(this[0],f(a));return f.inArray(a.jquery?a[0]:a,this)},add:function(a,b){var c=typeof a=="string"?f(a,b):f.makeArray(a&&a.nodeType?[a]:a),d=f.merge(this.get(),c);return this.pushStack(S(c[0])||S(d[0])?d:f.unique(d))},andSelf:function(){return this.add(this.prevObject)}}),f.each({parent:function(a){var b=a.parentNode;return b&&b.nodeType!==11?b:null},parents:function(a){return f.dir(a,"parentNode")},parentsUntil:function(a,b,c){return f.dir(a,"parentNode",c)},next:function(a){return f.nth(a,2,"nextSibling")},prev:function(a){return f.nth(a,2,"previousSibling")},nextAll:function(a){return f.dir(a,"nextSibling")},prevAll:function(a){return f.dir(a,"previousSibling")},nextUntil:function(a,b,c){return f.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return f.dir(a,"previousSibling",c)},siblings:function(a){return f.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return f.sibling(a.firstChild)},contents:function(a){return f.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:f.makeArray(a.childNodes)}},function(a,b){f.fn[a]=function(c,d){var e=f.map(this,b,c);L.test(a)||(d=c),d&&typeof d=="string"&&(e=f.filter(d,e)),e=this.length>1&&!R[a]?f.unique(e):e,(this.length>1||N.test(d))&&M.test(a)&&(e=e.reverse());return this.pushStack(e,a,P.call(arguments).join(","))}}),f.extend({filter:function(a,b,c){c&&(a=":not("+a+")");return b.length===1?f.find.matchesSelector(b[0],a)?[b[0]]:[]:f.find.matches(a,b)},dir:function(a,c,d){var e=[],g=a[c];while(g&&g.nodeType!==9&&(d===b||g.nodeType!==1||!f(g).is(d)))g.nodeType===1&&e.push(g),g=g[c];return e},nth:function(a,b,c,d){b=b||1;var e=0;for(;a;a=a[c])if(a.nodeType===1&&++e===b)break;return a},sibling:function(a,b){var c=[];for(;a;a=a.nextSibling)a.nodeType===1&&a!==b&&c.push(a);return c}});var V="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",W=/ jQuery\d+="(?:\d+|null)"/g,X=/^\s+/,Y=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,Z=/<([\w:]+)/,$=/ ]","i"),bd=/checked\s*(?:[^=]|=\s*.checked.)/i,be=/\/(java|ecma)script/i,bf=/^\s*",""],legend:[1,""," "],thead:[1,""],tr:[2,""],td:[3,""],col:[2,""],area:[1,""," "],_default:[0,"",""]},bh=U(c);bg.optgroup=bg.option,bg.tbody=bg.tfoot=bg.colgroup=bg.caption=bg.thead,bg.th=bg.td,f.support.htmlSerialize||(bg._default=[1,"div","
"]),f.fn.extend({text:function(a){return f.access(this,function(a){return a===b?f.text(this):this.empty().append((this[0]&&this[0].ownerDocument||c).createTextNode(a))},null,a,arguments.length)},wrapAll:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapAll(a.call(this,b))});if(this[0]){var b=f(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&a.firstChild.nodeType===1)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapInner(a.call(this,b))});return this.each(function(){var b=f(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=f.isFunction(a);return this.each(function(c){f(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){f.nodeName(this,"body")||f(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this)});if(arguments.length){var a=f
+.clean(arguments);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this.nextSibling)});if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,f.clean(arguments));return a}},remove:function(a,b){for(var c=0,d;(d=this[c])!=null;c++)if(!a||f.filter(a,[d]).length)!b&&d.nodeType===1&&(f.cleanData(d.getElementsByTagName("*")),f.cleanData([d])),d.parentNode&&d.parentNode.removeChild(d);return this},empty:function(){for(var a=0,b;(b=this[a])!=null;a++){b.nodeType===1&&f.cleanData(b.getElementsByTagName("*"));while(b.firstChild)b.removeChild(b.firstChild)}return this},clone:function(a,b){a=a==null?!1:a,b=b==null?a:b;return this.map(function(){return f.clone(this,a,b)})},html:function(a){return f.access(this,function(a){var c=this[0]||{},d=0,e=this.length;if(a===b)return c.nodeType===1?c.innerHTML.replace(W,""):null;if(typeof a=="string"&&!ba.test(a)&&(f.support.leadingWhitespace||!X.test(a))&&!bg[(Z.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Y,"<$1>$2>");try{for(;d1&&l0?this.clone(!0):this).get();f(e[h])[b](j),d=d.concat(j)}return this.pushStack(d,a,e.selector)}}),f.extend({clone:function(a,b,c){var d,e,g,h=f.support.html5Clone||f.isXMLDoc(a)||!bc.test("<"+a.nodeName+">")?a.cloneNode(!0):bo(a);if((!f.support.noCloneEvent||!f.support.noCloneChecked)&&(a.nodeType===1||a.nodeType===11)&&!f.isXMLDoc(a)){bk(a,h),d=bl(a),e=bl(h);for(g=0;d[g];++g)e[g]&&bk(d[g],e[g])}if(b){bj(a,h);if(c){d=bl(a),e=bl(h);for(g=0;d[g];++g)bj(d[g],e[g])}}d=e=null;return h},clean:function(a,b,d,e){var g,h,i,j=[];b=b||c,typeof b.createElement=="undefined"&&(b=b.ownerDocument||b[0]&&b[0].ownerDocument||c);for(var k=0,l;(l=a[k])!=null;k++){typeof l=="number"&&(l+="");if(!l)continue;if(typeof l=="string")if(!_.test(l))l=b.createTextNode(l);else{l=l.replace(Y,"<$1>$2>");var m=(Z.exec(l)||["",""])[1].toLowerCase(),n=bg[m]||bg._default,o=n[0],p=b.createElement("div"),q=bh.childNodes,r;b===c?bh.appendChild(p):U(b).appendChild(p),p.innerHTML=n[1]+l+n[2];while(o--)p=p.lastChild;if(!f.support.tbody){var s=$.test(l),t=m==="table"&&!s?p.firstChild&&p.firstChild.childNodes:n[1]===""&&!s?p.childNodes:[];for(i=t.length-1;i>=0;--i)f.nodeName(t[i],"tbody")&&!t[i].childNodes.length&&t[i].parentNode.removeChild(t[i])}!f.support.leadingWhitespace&&X.test(l)&&p.insertBefore(b.createTextNode(X.exec(l)[0]),p.firstChild),l=p.childNodes,p&&(p.parentNode.removeChild(p),q.length>0&&(r=q[q.length-1],r&&r.parentNode&&r.parentNode.removeChild(r)))}var u;if(!f.support.appendChecked)if(l[0]&&typeof (u=l.length)=="number")for(i=0;i1)},f.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=by(a,"opacity");return c===""?"1":c}return a.style.opacity}}},cssNumber:{fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":f.support.cssFloat?"cssFloat":"styleFloat"},style:function(a,c,d,e){if(!!a&&a.nodeType!==3&&a.nodeType!==8&&!!a.style){var g,h,i=f.camelCase(c),j=a.style,k=f.cssHooks[i];c=f.cssProps[i]||i;if(d===b){if(k&&"get"in k&&(g=k.get(a,!1,e))!==b)return g;return j[c]}h=typeof d,h==="string"&&(g=bu.exec(d))&&(d=+(g[1]+1)*+g[2]+parseFloat(f.css(a,c)),h="number");if(d==null||h==="number"&&isNaN(d))return;h==="number"&&!f.cssNumber[i]&&(d+="px");if(!k||!("set"in k)||(d=k.set(a,d))!==b)try{j[c]=d}catch(l){}}},css:function(a,c,d){var e,g;c=f.camelCase(c),g=f.cssHooks[c],c=f.cssProps[c]||c,c==="cssFloat"&&(c="float");if(g&&"get"in g&&(e=g.get(a,!0,d))!==b)return e;if(by)return by(a,c)},swap:function(a,b,c){var d={},e,f;for(f in b)d[f]=a.style[f],a.style[f]=b[f];e=c.call(a);for(f in b)a.style[f]=d[f];return e}}),f.curCSS=f.css,c.defaultView&&c.defaultView.getComputedStyle&&(bz=function(a,b){var c,d,e,g,h=a.style;b=b.replace(br,"-$1").toLowerCase(),(d=a.ownerDocument.defaultView)&&(e=d.getComputedStyle(a,null))&&(c=e.getPropertyValue(b),c===""&&!f.contains(a.ownerDocument.documentElement,a)&&(c=f.style(a,b))),!f.support.pixelMargin&&e&&bv.test(b)&&bt.test(c)&&(g=h.width,h.width=c,c=e.width,h.width=g);return c}),c.documentElement.currentStyle&&(bA=function(a,b){var c,d,e,f=a.currentStyle&&a.currentStyle[b],g=a.style;f==null&&g&&(e=g[b])&&(f=e),bt.test(f)&&(c=g.left,d=a.runtimeStyle&&a.runtimeStyle.left,d&&(a.runtimeStyle.left=a.currentStyle.left),g.left=b==="fontSize"?"1em":f,f=g.pixelLeft+"px",g.left=c,d&&(a.runtimeStyle.left=d));return f===""?"auto":f}),by=bz||bA,f.each(["height","width"],function(a,b){f.cssHooks[b]={get:function(a,c,d){if(c)return a.offsetWidth!==0?bB(a,b,d):f.swap(a,bw,function(){return bB(a,b,d)})},set:function(a,b){return bs.test(b)?b+"px":b}}}),f.support.opacity||(f.cssHooks.opacity={get:function(a,b){return bq.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?parseFloat(RegExp.$1)/100+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=f.isNumeric(b)?"alpha(opacity="+b*100+")":"",g=d&&d.filter||c.filter||"";c.zoom=1;if(b>=1&&f.trim(g.replace(bp,""))===""){c.removeAttribute("filter");if(d&&!d.filter)return}c.filter=bp.test(g)?g.replace(bp,e):g+" "+e}}),f(function(){f.support.reliableMarginRight||(f.cssHooks.marginRight={get:function(a,b){return f.swap(a,{display:"inline-block"},function(){return b?by(a,"margin-right"):a.style.marginRight})}})}),f.expr&&f.expr.filters&&(f.expr.filters.hidden=function(a){var b=a.offsetWidth,c=a.offsetHeight;return b===0&&c===0||!f.support.reliableHiddenOffsets&&(a.style&&a.style.display||f.css(a,"display"))==="none"},f.expr.filters.visible=function(a){return!f.expr.filters.hidden(a)}),f.each({margin:"",padding:"",border:"Width"},function(a,b){f.cssHooks[a+b]={expand:function(c){var d,e=typeof c=="string"?c.split(" "):[c],f={};for(d=0;d<4;d++)f[a+bx[d]+b]=e[d]||e[d-2]||e[0];return f}}});var bC=/%20/g,bD=/\[\]$/,bE=/\r?\n/g,bF=/#.*$/,bG=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,bH=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,bI=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,bJ=/^(?:GET|HEAD)$/,bK=/^\/\//,bL=/\?/,bM=/"];if(F)$[1]="document.domain=\""+I+"\";";for(var C=0;C");$.push("");$.push("");$.push("");J.setPos=B;J.onload=Z;H.write("");H.cfg=J;H.write($.join(""));H.close()}}function B(J){var H=J.position.left,C=J.position.top,D=J.el;if(D==T)return;if(D!=J.srcEl&&(P(D)=="none"||D.type=="hidden"))D=J.srcEl;var I=W(D),$=F(Y),E=M(V),B=b(V),G=$dp.dd.offsetHeight,A=$dp.dd.offsetWidth;if(isNaN(C))C=0;if(($.topM+I.bottom+G>E.height)&&($.topM+I.top-G>0))C+=B.top+$.topM+I.top-G-2;else{C+=B.top+$.topM+I.bottom;var _=C-B.top+G-E.height;if(_>0)C-=_}if(isNaN(H))H=0;H+=B.left+Math.min($.leftM+I.left,E.width-A-5)-(S?2:0);J.dd.style.top=C+"px";J.dd.style.left=H+"px"}}})()
\ No newline at end of file
diff --git a/app/culture/view/szwjs/public/js/widget/divhover.js b/app/culture/view/szwjs/public/js/widget/divhover.js
new file mode 100644
index 0000000..a7a8eaa
--- /dev/null
+++ b/app/culture/view/szwjs/public/js/widget/divhover.js
@@ -0,0 +1,319 @@
+
+(function($){
+ $.fn.num = function(options){
+ _this = $(this)
+ var _thisTop,_thisRight,_thisBottom,_thisLeft,_thisTopBottom,_thisRightLeft,_thisAll
+
+ n1 = _this.width();
+ h1 = _this.height();
+
+ var defaults = {
+ Type:'num1',
+ Color:'#ff0000',
+ speed:300,
+ }
+ var options = $.extend({},defaults,options)
+ var becurr = "background:"+options.Color+";position:absolute;border-radius:10px;opahide;"
+ switch(options.Type){
+ case 'num1':
+ num1()
+ break;
+ case 'num2':
+ num2()
+ break;
+ case 'num3':
+ num3()
+ break;
+ case 'num4':
+ num4()
+ break;
+ case 'num5':
+ num5()
+ break;
+ case 'num6':
+ num6()
+ break;
+ case 'num7':
+ num7()
+ break;
+ case 'num8':
+ num8()
+ break;
+ case 'num9':
+ num9()
+ break;
+ case 'num10':
+ num10()
+ break;
+ case 'num11':
+ num10()
+ break;
+ }
+
+ function than(_this){
+ var obj = new Object();
+ obj.name = '123'
+ obj.thsn = function(){
+ _thisTop = _this.find('.divTop').stop().show()
+ _thisRight = _this.find('.divRight').stop().show()
+ _thisBottom = _this.find('.divBottom').stop().show()
+ _thisLeft = _this.find('.divLeft').stop().show()
+ _thisTopBottom = _this.find('.divTop,.divBottom').stop().show()
+ _thisRightLeft = _this.find('.divLeft,.divRight').stop().show()
+ _thisAll = _this.find('.divTop,.divBottom,.divLeft,.divRight').stop().show()
+ }
+ return obj;
+ }
+
+ var opashow = 'opashow',opahide = 'opahide'
+ function num1(){
+ var becurr = "background:"+options.Color+";position:absolute;"
+ // top杈规
+ var divTop ="
";
+
+ // right杈规
+ var divRight ="
";
+
+ // Bottom杈规
+ var divBottom ="
";
+
+ // Left杈规
+ var divLeft ="
";
+ _this.hover(function(){
+ el = $(this)
+ el.append(divTop,divRight,divBottom,divLeft);
+ num1 = new than(el)
+ num1.thsn()
+ _thisTopBottom.animate({width:n1+3.5,opashow},options.speed)
+ _thisRightLeft.animate({height:h1+3.5,opashow},options.speed);
+ },function(){
+ _thisTopBottom.animate({width:0,opahide},options.speed)
+ _thisRightLeft.animate({height:0,opahide},options.speed,function(){
+ _thisAll.remove()
+ });
+ })
+ }
+
+ function num2(){
+ // top杈规
+ var divTop = "
";
+
+ // right杈规
+ var divRight ="
";
+
+ // Bottom杈规
+ var divBottom ="
";
+
+ // Left杈规
+ var divLeft ="
";
+ _this.hover(function(){
+ el = $(this)
+ el.append(divTop,divRight,divBottom,divLeft);
+ num3 = new than(el)
+ num3.thsn()
+ _thisTopBottom.animate({width:n1+3.5},options.speed);
+ _thisRightLeft.animate({height:h1+3.5},options.speed);
+ },function(){
+ _thisTopBottom.animate({width:0},options.speed);
+ _thisRightLeft.animate({height:0},options.speed,function(){
+ _thisAll.remove()
+ });
+ })
+ }
+
+ function num4(){
+ // top杈规
+ var divTop ="
";
+
+ // right杈规
+ var divRight ="
";
+
+ // Bottom杈规
+ var divBottom ="
";
+
+ // Left杈规
+ var divLeft ="
";
+ _this.hover(function(){
+ el =$(this)
+ el.append(divTop,divRight,divBottom,divLeft);
+ num4 = new than(el)
+ num4.thsn()
+ _thisTop.animate({width:n1+3.5},options.speed,function(){
+ _thisRight.animate({height:h1+3.5},options.speed,function(){
+ _thisBottom.animate({width:n1+3.5},options.speed,function(){
+ _thisLeft.animate({height:h1+3.5},options.speed)
+ });
+ });
+ })
+ },function(){
+ _thisAll.stop()
+ _thisLeft.animate({height:0},options.speed,function(){
+ _thisBottom.animate({width:0},options.speed,function(){
+ _thisRight.animate({height:0},options.speed,function(){
+ _thisTop.animate({width:0},options.speed,function(){
+ _thisAll.remove()
+ })
+ });
+ });
+ })
+
+ })
+ }
+
+ function num5(){
+ // top杈规
+ var divTop ="
";
+
+ // right杈规
+ var divRight ="
";
+
+ // Bottom杈规
+ var divBottom ="
";
+
+ // Left杈规
+ var divLeft ="
";
+ _this.hover(function(){
+ el = $(this)
+ el.append(divTop,divRight,divBottom,divLeft);
+ num5 = new than(el)
+ num5.thsn()
+ _thisTopBottom.animate({width:n1+3.5},options.speed,function(){
+ _thisRightLeft.animate({height:h1+3.5},options.speed);
+ });
+
+ },function(){
+ _thisTopBottom.animate({width:0},options.speed,function(){
+ _thisRightLeft.animate({height:0},options.speed,function(){
+ _thisAll.remove()
+ });
+ });
+
+ })
+ }
+
+ function num6(){
+ // top杈规
+ var divTop ="
";
+
+ // right杈规
+ var divRight ="
";
+
+ // Bottom杈规
+ var divBottom ="
";
+
+ // Left杈规
+ var divLeft ="
";
+
+ _this.hover(function(){
+ el = $(this)
+ el.append(divTop,divRight,divBottom,divLeft);
+ num6 = new than(el)
+ num6.thsn()
+ _thisTopBottom.animate({width:n1+3.5,left:-2},options.speed);
+ _thisRightLeft.animate({height:h1+3.5,top:-2},options.speed);
+ },function(){
+ _thisTopBottom.animate({width:0,left:n1/2},options.speed);
+ _thisRightLeft.animate({height:0,top:h1/2},options.speed,function(){
+ _thisAll.remove()
+ });
+ })
+ }
+
+
+ function num7(){
+
+
+ _this.hover(function(){
+ // top杈规
+ var divTop ="
";
+ el = $(this)
+ el.append(divTop);
+ num7 = new than(el)
+ num7.thsn()
+ _thisTop.animate({height:'100%'},options.speed)
+ },function(){
+ _thisTop.animate({height:'0'},options.speed,function(){
+ _thisTop.remove()
+ })
+ })
+ }
+
+ function num8(){
+ // top杈规
+ var divRight ="
";
+
+ _this.hover(function(){
+ el = $(this)
+ el.append(divRight);
+ num7 = new than(el)
+ num7.thsn()
+ _thisRight.animate({width:'100%'},options.speed)
+ },function(){
+ _thisRight.animate({width:'0'},options.speed,function(){
+ _thisRight.remove()
+ })
+ })
+ }
+
+ function num9(){
+ // top杈规
+ var divTop ="
";
+
+
+ _this.hover(function(){
+ el = $(this)
+ el.append(divTop);
+ num7 = new than(el)
+ num7.thsn()
+ _thisTop.animate({width:'100%',height:'100%'},options.speed)
+ },function(){
+ _thisTop.animate({width:'0',height:'0'},options.speed,function(){
+ _thisTop.remove()
+ })
+ })
+ }
+
+ }
+})(jQuery);
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/culture/view/szwjs/public/js/widget/divscroll.js b/app/culture/view/szwjs/public/js/widget/divscroll.js
new file mode 100644
index 0000000..465268c
--- /dev/null
+++ b/app/culture/view/szwjs/public/js/widget/divscroll.js
@@ -0,0 +1,2743 @@
+(function(F) {
+ var G = false;
+ var H = false;
+ var I = false;
+ var J = 5000;
+ var K = 2000;
+ var $ = F;
+ function getScriptPath() {
+ var a = document.getElementsByTagName('script');
+ var b = a[a.length - 1].src.split('?')[0];
+ return (b.split('/').length > 0) ? b.split('/').slice(0, -1).join('/') + '/': ''
+ }
+ var L = getScriptPath();
+ var M = (function() {
+ return window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.oRequestAnimationFrame || window.msRequestAnimationFrame || false
+ })();
+ var N = (function() {
+ return window.cancelRequestAnimationFrame || window.webkitCancelRequestAnimationFrame || window.mozCancelRequestAnimationFrame || window.oCancelRequestAnimationFrame || window.msCancelRequestAnimationFrame || false
+ })();
+ var O = false;
+ var P = function() {
+ if (O) return O;
+ var c = document.createElement('DIV');
+ var d = {};
+ d.haspointerlock = "pointerLockElement" in document || "mozPointerLockElement" in document || "webkitPointerLockElement" in document;
+ d.isopera = ("opera" in window);
+ d.isopera12 = (d.isopera && ("getUserMedia" in navigator));
+ d.isie = (("all" in document) && ("attachEvent" in c) && !d.isopera);
+ d.isieold = (d.isie && !("msInterpolationMode" in c.style));
+ d.isie7 = d.isie && !d.isieold && (!("documentMode" in document) || (document.documentMode == 7));
+ d.isie8 = d.isie && ("documentMode" in document) && (document.documentMode == 8);
+ d.isie9 = d.isie && ("performance" in window) && (document.documentMode >= 9);
+ d.isie10 = d.isie && ("performance" in window) && (document.documentMode >= 10);
+ d.isie9mobile = /iemobile.9/i.test(navigator.userAgent);
+ if (d.isie9mobile) d.isie9 = false;
+ d.isie7mobile = (!d.isie9mobile && d.isie7) && /iemobile/i.test(navigator.userAgent);
+ d.ismozilla = ("MozAppearance" in c.style);
+ d.iswebkit = ("WebkitAppearance" in c.style);
+ d.ischrome = ("chrome" in window);
+ d.ischrome22 = (d.ischrome && d.haspointerlock);
+ d.cantouch = ("ontouchstart" in document.documentElement) || ("ontouchstart" in window);
+ d.hasmstouch = (window.navigator.msPointerEnabled || false);
+ d.ismac = /^mac$/i.test(navigator.platform);
+ d.isios = (d.cantouch && /iphone|ipad|ipod/i.test(navigator.platform));
+ d.isios4 = ((d.isios) && !("seal" in Object));
+ d.isandroid = (/android/i.test(navigator.userAgent));
+ d.trstyle = false;
+ d.hastransform = false;
+ d.hastranslate3d = false;
+ d.transitionstyle = false;
+ d.hastransition = false;
+ d.transitionend = false;
+ var e = ['transform', 'msTransform', 'webkitTransform', 'MozTransform', 'OTransform'];
+ for (var a = 0; a < e.length; a++) {
+ if (typeof c.style[e[a]] != "undefined") {
+ d.trstyle = e[a];
+ break
+ }
+ }
+ d.hastransform = (d.trstyle != false);
+ if (d.hastransform) {
+ c.style[d.trstyle] = "translate3d(1px,2px,3px)";
+ d.hastranslate3d = /translate3d/.test(c.style[d.trstyle])
+ }
+ d.transitionstyle = false;
+ d.prefixstyle = '';
+ d.transitionend = false;
+ var e = ['transition', 'webkitTransition', 'MozTransition', 'OTransition', 'OTransition', 'msTransition', 'KhtmlTransition'];
+ var f = ['', '-webkit-', '-moz-', '-o-', '-o', '-ms-', '-khtml-'];
+ var g = ['transitionend', 'webkitTransitionEnd', 'transitionend', 'otransitionend', 'oTransitionEnd', 'msTransitionEnd', 'KhtmlTransitionEnd'];
+ for (var a = 0; a < e.length; a++) {
+ if (e[a] in c.style) {
+ d.transitionstyle = e[a];
+ d.prefixstyle = f[a];
+ d.transitionend = g[a];
+ break
+ }
+ }
+ d.hastransition = (d.transitionstyle);
+ function detectCursorGrab() {
+ var b = ['-moz-grab', '-webkit-grab', 'grab'];
+ if ((d.ischrome && !d.ischrome22) || d.isie) b = [];
+ for (var a = 0; a < b.length; a++) {
+ var p = b[a];
+ c.style['cursor'] = p;
+ if (c.style['cursor'] == p) return p
+ }
+ return 'url(http://www.google.com/intl/en_ALL/mapfiles/openhand.cur),n-resize'
+ }
+ d.cursorgrabvalue = detectCursorGrab();
+ d.hasmousecapture = ("setCapture" in c);
+
+ c = null;
+ O = d;
+ return d
+ };
+ var Q = function(A, B) {
+ var C = this;
+ this.version = '3.1.4';
+ this.name = 'nicescroll';
+ C.me = B;
+ this.opt = {
+ doc: $("body"),
+ win: false,
+ zindex: 0,
+ cursoropacitymin: 0,
+ cursoropacitymax: 1,
+ cursorcolor: "#424242",
+ cursorwidth: "5px",
+ cursorborder: "1px solid #fff",
+ cursorborderradius: "5px",
+ scrollspeed: 60,
+ mousescrollstep: 8 * 3,
+ touchbehavior: false,
+ hwacceleration: true,
+ usetransition: true,
+ boxzoom: false,
+ dblclickzoom: true,
+ gesturezoom: true,
+ grabcursorenabled: true,
+ autohidemode: true,
+ background: "",
+ iframeautoresize: true,
+ cursorminheight: 32,
+ preservenativescrolling: true,
+ railoffset: false,
+ bouncescroll: true,
+ spacebarenabled: true,
+ railpadding: {
+ top: 0,
+ right: 0,
+ left: 0,
+ bottom: 0
+ },
+ disableoutline: true,
+ horizrailenabled: true,
+ railalign: "right",
+ railvalign: "bottom",
+ enabletranslate3d: true,
+ enablemousewheel: true,
+ enablekeyboard: true,
+ smoothscroll: true,
+ sensitiverail: true,
+ enablemouselockapi: true,
+ cursorfixedheight: false
+ };
+ this.opt.snapbackspeed = 80;
+ if (A || false) {
+ for (var a in C.opt) {
+ if (typeof A[a] != "undefined") C.opt[a] = A[a]
+ }
+ }
+ this.doc = C.opt.doc;
+ this.iddoc = (this.doc && this.doc[0]) ? this.doc[0].id || '': '';
+ this.ispage = /BODY|HTML/.test((C.opt.win) ? C.opt.win[0].nodeName: this.doc[0].nodeName);
+ this.haswrapper = (C.opt.win !== false);
+ this.win = C.opt.win || (this.ispage ? $(window) : this.doc);
+ this.docscroll = (this.ispage && !this.haswrapper) ? $(window) : this.win;
+ this.body = $("body");
+ this.viewport = false;
+ this.isfixed = false;
+ this.iframe = false;
+ this.isiframe = ((this.doc[0].nodeName == 'IFRAME') && (this.win[0].nodeName == 'IFRAME'));
+ this.istextarea = (this.win[0].nodeName == 'TEXTAREA');
+ this.forcescreen = false;
+ this.canshowonmouseevent = (C.opt.autohidemode != "scroll");
+ this.onmousedown = false;
+ this.onmouseup = false;
+ this.onmousemove = false;
+ this.onmousewheel = false;
+ this.onkeypress = false;
+ this.ongesturezoom = false;
+ this.onclick = false;
+ this.onscrollstart = false;
+ this.onscrollend = false;
+ this.onscrollcancel = false;
+ this.onzoomin = false;
+ this.onzoomout = false;
+ this.view = false;
+ this.page = false;
+ this.scroll = {
+ x: 0,
+ y: 0
+ };
+ this.scrollratio = {
+ x: 0,
+ y: 0
+ };
+ this.cursorheight = 20;
+ this.scrollvaluemax = 0;
+ this.scrollrunning = false;
+ this.scrollmom = false;
+ this.observer = false;
+ do {
+ this.id = "ascrail" + (K++)
+ } while ( document . getElementById ( this . id ));
+ this.rail = false;
+ this.cursor = false;
+ this.cursorfreezed = false;
+ this.zoom = false;
+ this.zoomactive = false;
+ this.hasfocus = false;
+ this.hasmousefocus = false;
+ this.visibility = true;
+ this.locked = false;
+ this.hidden = false;
+ this.cursoractive = true;
+ this.nativescrollingarea = false;
+ this.events = [];
+ this.saved = {};
+ this.delaylist = {};
+ this.synclist = {};
+ this.lastdeltax = 0;
+ this.lastdeltay = 0;
+ this.detected = P();
+ var D = $.extend({},
+ this.detected);
+ this.canhwscroll = (D.hastransform && C.opt.hwacceleration);
+ this.ishwscroll = (this.canhwscroll && C.haswrapper);
+ this.istouchcapable = false;
+ if (D.cantouch && D.ischrome && !D.isios && !D.isandroid) {
+ this.istouchcapable = true;
+ D.cantouch = false
+ }
+ if (D.cantouch && D.ismozilla && !D.isios) {
+ this.istouchcapable = true;
+ D.cantouch = false
+ }
+ if (!C.opt.enablemouselockapi) {
+ D.hasmousecapture = false;
+ D.haspointerlock = false
+ }
+ this.delayed = function(a, b, c, d) {
+ var e = C.delaylist[a];
+ var f = (new Date()).getTime();
+ if (!d && e && e.tt) return false;
+ if (e && e.tt) clearTimeout(e.tt);
+ if (e && e.last + c > f && !e.tt) {
+ C.delaylist[a] = {
+ last: f + c,
+ tt: setTimeout(function() {
+ C.delaylist[a].tt = 0;
+ b.call()
+ },
+ c)
+ }
+ } else if (!e || !e.tt) {
+ C.delaylist[a] = {
+ last: f,
+ tt: 0
+ };
+ setTimeout(function() {
+ b.call()
+ },
+ 0)
+ }
+ };
+ this.synched = function(b, c) {
+ function requestSync() {
+ if (C.onsync) return;
+ M(function() {
+ C.onsync = false;
+ for (b in C.synclist) {
+ var a = C.synclist[b];
+ if (a) a.call(C);
+ C.synclist[b] = false
+ }
+ });
+ C.onsync = true
+ };
+ C.synclist[b] = c;
+ requestSync();
+ return b
+ };
+ this.unsynched = function(a) {
+ if (C.synclist[a]) C.synclist[a] = false
+ };
+ this.css = function(a, b) {
+ for (var n in b) {
+ C.saved.css.push([a, n, a.css(n)]);
+ a.css(n, b[n])
+ }
+ };
+ this.scrollTop = function(a) {
+ return (typeof a == "undefined") ? C.getScrollTop() : C.setScrollTop(a)
+ };
+ this.scrollLeft = function(a) {
+ return (typeof a == "undefined") ? C.getScrollLeft() : C.setScrollLeft(a)
+ };
+ BezierClass = function(a, b, c, d, e, f, g) {
+ this.st = a;
+ this.ed = b;
+ this.spd = c;
+ this.p1 = d || 0;
+ this.p2 = e || 1;
+ this.p3 = f || 0;
+ this.p4 = g || 1;
+ this.ts = (new Date()).getTime();
+ this.df = this.ed - this.st
+ };
+ BezierClass.prototype = {
+ B2: function(t) {
+ return 3 * t * t * (1 - t)
+ },
+ B3: function(t) {
+ return 3 * t * (1 - t) * (1 - t)
+ },
+ B4: function(t) {
+ return (1 - t) * (1 - t) * (1 - t)
+ },
+ getNow: function() {
+ var a = (new Date()).getTime();
+ var b = 1 - ((a - this.ts) / this.spd);
+ var c = this.B2(b) + this.B3(b) + this.B4(b);
+ return (b < 0) ? this.ed: this.st + Math.round(this.df * c)
+ },
+ update: function(a, b) {
+ this.st = this.getNow();
+ this.ed = a;
+ this.spd = b;
+ this.ts = (new Date()).getTime();
+ this.df = this.ed - this.st;
+ return this
+ }
+ };
+ if (this.ishwscroll) {
+ this.doc.translate = {
+ x: 0,
+ y: 0,
+ tx: "0px",
+ ty: "0px"
+ };
+ if (D.hastranslate3d && D.isios) this.doc.css("-webkit-backface-visibility", "hidden");
+ function getMatrixValues() {
+ var a = C.doc.css(D.trstyle);
+ if (a && (a.substr(0, 6) == "matrix")) {
+ return a.replace(/^.*\((.*)\)$/g, "$1").replace(/px/g, '').split(/, +/)
+ }
+ return false
+ }
+ this.getScrollTop = function(a) {
+ if (!a) {
+ var b = getMatrixValues();
+ if (b) return (b.length == 16) ? -b[13] : -b[5];
+ if (C.timerscroll && C.timerscroll.bz) return C.timerscroll.bz.getNow()
+ }
+ return C.doc.translate.y
+ };
+ this.getScrollLeft = function(a) {
+ if (!a) {
+ var b = getMatrixValues();
+ if (b) return (b.length == 16) ? -b[12] : -b[4];
+ if (C.timerscroll && C.timerscroll.bh) return C.timerscroll.bh.getNow()
+ }
+ return C.doc.translate.x
+ };
+ if (document.createEvent) {
+ this.notifyScrollEvent = function(a) {
+ var e = document.createEvent("UIEvents");
+ e.initUIEvent("scroll", false, true, window, 1);
+ a.dispatchEvent(e)
+ }
+ } else if (document.fireEvent) {
+ this.notifyScrollEvent = function(a) {
+ var e = document.createEventObject();
+ a.fireEvent("onscroll");
+ e.cancelBubble = true
+ }
+ } else {
+ this.notifyScrollEvent = function(a, b) {}
+ }
+ if (D.hastranslate3d && C.opt.enabletranslate3d) {
+ this.setScrollTop = function(a, b) {
+ C.doc.translate.y = a;
+ C.doc.translate.ty = (a * -1) + "px";
+ C.doc.css(D.trstyle, "translate3d(" + C.doc.translate.tx + "," + C.doc.translate.ty + ",0px)");
+ if (!b) C.notifyScrollEvent(C.win[0])
+ };
+ this.setScrollLeft = function(a, b) {
+ C.doc.translate.x = a;
+ C.doc.translate.tx = (a * -1) + "px";
+ C.doc.css(D.trstyle, "translate3d(" + C.doc.translate.tx + "," + C.doc.translate.ty + ",0px)");
+ if (!b) C.notifyScrollEvent(C.win[0])
+ }
+ } else {
+ this.setScrollTop = function(a, b) {
+ C.doc.translate.y = a;
+ C.doc.translate.ty = (a * -1) + "px";
+ C.doc.css(D.trstyle, "translate(" + C.doc.translate.tx + "," + C.doc.translate.ty + ")");
+ if (!b) C.notifyScrollEvent(C.win[0])
+ };
+ this.setScrollLeft = function(a, b) {
+ C.doc.translate.x = a;
+ C.doc.translate.tx = (a * -1) + "px";
+ C.doc.css(D.trstyle, "translate(" + C.doc.translate.tx + "," + C.doc.translate.ty + ")");
+ if (!b) C.notifyScrollEvent(C.win[0])
+ }
+ }
+ } else {
+ this.getScrollTop = function() {
+ return C.docscroll.scrollTop()
+ };
+ this.setScrollTop = function(a) {
+ return C.docscroll.scrollTop(a)
+ };
+ this.getScrollLeft = function() {
+ return C.docscroll.scrollLeft()
+ };
+ this.setScrollLeft = function(a) {
+ return C.docscroll.scrollLeft(a)
+ }
+ }
+ this.getTarget = function(e) {
+ if (!e) return false;
+ if (e.target) return e.target;
+ if (e.srcElement) return e.srcElement;
+ return false
+ };
+ this.hasParent = function(e, a) {
+ if (!e) return false;
+ var b = e.target || e.srcElement || e || false;
+ while (b && b.id != a) {
+ b = b.parentNode || false
+ }
+ return (b !== false)
+ };
+ var E = {
+ "thin": 1,
+ "medium": 3,
+ "thick": 5
+ };
+ function getWidthToPixel(a, b, c) {
+ var d = a.css(b);
+ var e = parseFloat(d);
+ if (isNaN(e)) {
+ e = E[d] || 0;
+ var f = (e == 3) ? ((c) ? (C.win.outerHeight() - C.win.innerHeight()) : (C.win.outerWidth() - C.win.innerWidth())) : 1;
+ if (C.isie8 && e) e += 1;
+ return (f) ? e: 0
+ }
+ return e
+ };
+ this.getOffset = function() {
+ if (C.isfixed) return {
+ top: parseFloat(C.win.css('top')),
+ left: parseFloat(C.win.css('left'))
+ };
+ if (!C.viewport) return C.win.offset();
+ var a = C.win.offset();
+ var b = C.viewport.offset();
+ return {
+ top: a.top - b.top + C.viewport.scrollTop(),
+ left: a.left - b.left + C.viewport.scrollLeft()
+ }
+ };
+ this.updateScrollBar = function(a) {
+ if (C.ishwscroll) {
+ C.rail.css({
+ height: C.win.innerHeight()
+ });
+ if (C.railh) C.railh.css({
+ width: C.win.innerWidth()
+ })
+ } else {
+ var b = C.getOffset();
+ var c = {
+ top: b.top,
+ left: b.left
+ };
+ c.top += getWidthToPixel(C.win, 'border-top-width', true);
+ var d = (C.win.outerWidth() - C.win.innerWidth()) / 2;
+ c.left += (C.rail.align) ? C.win.outerWidth() - getWidthToPixel(C.win, 'border-right-width') - C.rail.width: getWidthToPixel(C.win, 'border-left-width');
+ var e = C.opt.railoffset;
+ if (e) {
+ if (e.top) c.top += e.top;
+ if (C.rail.align && e.left) c.left += e.left
+ }
+ if (!C.locked) C.rail.css({
+ top: c.top,
+ left: c.left,
+ height: (a) ? a.h: C.win.innerHeight()
+ });
+ if (C.zoom) {
+ C.zoom.css({
+ top: c.top + 1,
+ left: (C.rail.align == 1) ? c.left - 20 : c.left + C.rail.width + 4
+ })
+ }
+ if (C.railh && !C.locked) {
+ var c = {
+ top: b.top,
+ left: b.left
+ };
+ var y = (C.railh.align) ? c.top + getWidthToPixel(C.win, 'border-top-width', true) + C.win.innerHeight() - C.railh.height: c.top + getWidthToPixel(C.win, 'border-top-width', true);
+ var x = c.left + getWidthToPixel(C.win, 'border-left-width');
+ C.railh.css({
+ top: y,
+ left: x,
+ width: C.railh.width
+ })
+ }
+ }
+ };
+ this.doRailClick = function(e, a, b) {
+ var c, pg, cur, pos;
+ if (C.rail.drag && C.rail.drag.pt != 1) return;
+ if (C.locked) return;
+ if (C.rail.drag) return;
+ C.cancelScroll();
+ C.cancelEvent(e);
+ if (a) {
+ c = (b) ? C.doScrollLeft: C.doScrollTop;
+ cur = (b) ? ((e.pageX - C.railh.offset().left - (C.cursorwidth / 2)) * C.scrollratio.x) : ((e.pageY - C.rail.offset().top - (C.cursorheight / 2)) * C.scrollratio.y);
+ c(cur)
+ } else {
+ c = (b) ? C.doScrollLeftBy: C.doScrollBy;
+ cur = (b) ? C.scroll.x: C.scroll.y;
+ pos = (b) ? e.pageX - C.railh.offset().left: e.pageY - C.rail.offset().top;
+ pg = (b) ? C.view.w: C.view.h; (cur >= pos) ? c(pg) : c( - pg)
+ }
+ };
+ C.hasanimationframe = (M);
+ C.hascancelanimationframe = (N);
+ if (!C.hasanimationframe) {
+ M = function(a) {
+ return setTimeout(a, 16)
+ };
+ N = clearInterval
+ } else if (!C.hascancelanimationframe) N = function() {
+ C.cancelAnimationFrame = true
+ };
+ this.init = function() {
+ C.saved.css = [];
+ if (D.isie7mobile) return true;
+ if (D.hasmstouch) C.css((C.ispage) ? $("html") : C.win, {
+ '-ms-touch-action': 'none'
+ });
+ if (!C.ispage || (!D.cantouch && !D.isieold && !D.isie9mobile)) {
+ var m = C.docscroll;
+ if (C.ispage) m = (C.haswrapper) ? C.win: C.doc;
+ if (!D.isie9mobile) C.css(m, {
+ 'overflow-y': 'hidden'
+ });
+ if (C.ispage && D.isie7) {
+ if (C.doc[0].nodeName == 'BODY') C.css($("html"), {
+ 'overflow-y': 'hidden'
+ });
+ else if (C.doc[0].nodeName == 'HTML') C.css($("body"), {
+ 'overflow-y': 'hidden'
+ })
+ }
+ if (D.isios && !C.ispage && !C.haswrapper) C.css($("body"), {
+ "-webkit-overflow-scrolling": "touch"
+ });
+ var o = $(document.createElement('div'));
+ o.css({
+ position: "relative",
+ top: 0,
+ "float": "right",
+ width: C.opt.cursorwidth,
+ height: "0px",
+ 'background-color': C.opt.cursorcolor,
+ border: C.opt.cursorborder,
+ 'background-clip': 'padding-box',
+ '-webkit-border-radius': C.opt.cursorborderradius,
+ '-moz-border-radius': C.opt.cursorborderradius,
+ 'border-radius': C.opt.cursorborderradius
+ });
+ o.hborder = parseFloat(o.outerHeight() - o.innerHeight());
+ C.cursor = o;
+ var p = $(document.createElement('div'));
+ p.attr('id', C.id);
+ var v, a, kp = ["left", "right"];
+ for (var n in kp) {
+ a = kp[n];
+ v = C.opt.railpadding[a]; (v) ? p.css("padding-" + a, v + "px") : C.opt.railpadding[a] = 0
+ }
+ p.append(o);
+ p.width = Math.max(parseFloat(C.opt.cursorwidth), o.outerWidth()) + C.opt.railpadding['left'] + C.opt.railpadding['right'];
+ p.css({
+ width: p.width + "px",
+ //'zIndex': (C.ispage) ? C.opt.zindex: C.opt.zindex + 2,
+ "background": C.opt.background
+ });
+ p.visibility = true;
+ p.scrollable = true;
+ p.align = (C.opt.railalign == "left") ? 0 : 1;
+ C.rail = p;
+ C.rail.drag = false;
+ var q = false;
+ if (C.opt.boxzoom && !C.ispage && !D.isieold) {
+ q = document.createElement('div');
+ C.bind(q, "click", C.doZoom);
+ C.zoom = $(q);
+ C.zoom.css({
+ "cursor": "pointer",
+ //'z-index': C.opt.zindex,
+ 'backgroundImage': 'url(' + L + 'zoomico_wev8.png)',
+ 'height': 18,
+ 'width': 18,
+ 'backgroundPosition': '0px 0px'
+ });
+ if (C.opt.dblclickzoom) C.bind(C.win, "dblclick", C.doZoom);
+ if (D.cantouch && C.opt.gesturezoom) {
+ C.ongesturezoom = function(e) {
+ if (e.scale > 1.5) C.doZoomIn(e);
+ if (e.scale < 0.8) C.doZoomOut(e);
+ return C.cancelEvent(e)
+ };
+ C.bind(C.win, "gestureend", C.ongesturezoom)
+ }
+ };
+ C.railh = false;
+ if (C.opt.horizrailenabled) {
+ C.css(m, {
+ 'overflow-x': 'hidden'
+ });
+ var o = $(document.createElement('div'));
+ o.css({
+ position: "relative",
+ top: 0,
+ height: C.opt.cursorwidth,
+ width: "0px",
+ 'background-color': C.opt.cursorcolor,
+ border: C.opt.cursorborder,
+ 'background-clip': 'padding-box',
+ '-webkit-border-radius': C.opt.cursorborderradius,
+ '-moz-border-radius': C.opt.cursorborderradius,
+ 'border-radius': C.opt.cursorborderradius
+ });
+ o.wborder = parseFloat(o.outerWidth() - o.innerWidth());
+ C.cursorh = o;
+ var r = $(document.createElement('div'));
+ r.attr('id', C.id + '-hr');
+ r.height = 1 + Math.max(parseFloat(C.opt.cursorwidth), o.outerHeight());
+ r.css({
+ height: r.height + "px",
+ //'zIndex': (C.ispage) ? C.opt.zindex: C.opt.zindex + 2,
+ "background": C.opt.background
+ });
+ r.append(o);
+ r.visibility = true;
+ r.scrollable = true;
+ r.align = (C.opt.railvalign == "top") ? 0 : 1;
+ C.railh = r;
+ C.railh.drag = false
+ }
+ if (C.ispage) {
+ p.css({
+ position: "fixed",
+ top: "0px",
+ height: "100%"
+ }); (p.align) ? p.css({
+ right: "0px"
+ }) : p.css({
+ left: "0px"
+ });
+ C.body.append(p);
+ if (C.railh) {
+ r.css({
+ position: "fixed",
+ left: "0px",
+ width: "100%"
+ }); (r.align) ? r.css({
+ bottom: "0px"
+ }) : r.css({
+ top: "0px"
+ });
+ C.body.append(r)
+ }
+ } else {
+ if (C.ishwscroll) {
+ if (C.win.css('position') == 'static') C.css(C.win, {
+ 'position': 'relative'
+ });
+ var s = (C.win[0].nodeName == 'HTML') ? C.body: C.win;
+ if (C.zoom) {
+ C.zoom.css({
+ position: "absolute",
+ top: 1,
+ right: 0,
+ "margin-right": p.width + 4
+ });
+ s.append(C.zoom)
+ }
+ p.css({
+ position: "absolute",
+ top: 0
+ }); (p.align) ? p.css({
+ right: 0
+ }) : p.css({
+ left: 0
+ });
+ s.append(p);
+ if (r) {
+ r.css({
+ position: "absolute",
+ left: 0,
+ bottom: 0
+ }); (r.align) ? r.css({
+ bottom: 0
+ }) : r.css({
+ top: 0
+ });
+ s.append(r)
+ }
+ } else {
+ C.isfixed = (C.win.css("position") == "fixed");
+ var t = (C.isfixed) ? "fixed": "absolute";
+ if (!C.isfixed) C.viewport = C.getViewport(C.win[0]);
+ if (C.viewport) C.body = C.viewport;
+ p.css({
+ position: t
+ });
+ if (C.zoom) C.zoom.css({
+ position: t
+ });
+ C.updateScrollBar();
+ C.body.append(p);
+ if (C.zoom) C.body.append(C.zoom);
+ if (C.railh) {
+ r.css({
+ position: t
+ });
+ C.body.append(r)
+ }
+ }
+ if (D.isios) C.css(C.win, {
+ '-webkit-tap-highlight-color': 'rgba(0,0,0,0)',
+ '-webkit-touch-callout': 'none'
+ });
+ if (D.isie && C.opt.disableoutline) C.win.attr("hideFocus", "true");
+ if (D.iswebkit && C.opt.disableoutline) C.win.css({
+ "outline": "none"
+ })
+ }
+ if (C.opt.autohidemode === false) {
+ C.autohidedom = false;
+ C.rail.css({
+ opacity: C.opt.cursoropacitymax
+ });
+ if (C.railh) C.railh.css({
+ opacity: C.opt.cursoropacitymax
+ })
+ } else if (C.opt.autohidemode === true) {
+ C.autohidedom = $().add(C.rail);
+ if (C.railh) C.autohidedom = C.autohidedom.add(C.railh)
+ } else if (C.opt.autohidemode == "scroll") {
+ C.autohidedom = $().add(C.rail);
+ if (C.railh) C.autohidedom = C.autohidedom.add(C.railh)
+ } else if (C.opt.autohidemode == "cursor") {
+ C.autohidedom = $().add(C.cursor);
+ if (C.railh) C.autohidedom = C.autohidedom.add(C.railh.cursor)
+ } else if (C.opt.autohidemode == "hidden") {
+ C.autohidedom = false;
+ C.hide();
+ C.locked = false
+ }
+ if (D.isie9mobile) {
+ C.scrollmom = new R(C);
+ C.onmangotouch = function(e) {
+ var a = C.getScrollTop();
+ var b = C.getScrollLeft();
+ if ((a == C.scrollmom.lastscrolly) && (b == C.scrollmom.lastscrollx)) return true;
+ var c = a - C.mangotouch.sy;
+ var d = b - C.mangotouch.sx;
+ var f = Math.round(Math.sqrt(Math.pow(d, 2) + Math.pow(c, 2)));
+ if (f == 0) return;
+ var g = (c < 0) ? -1 : 1;
+ var h = (d < 0) ? -1 : 1;
+ var i = +new Date();
+ if (C.mangotouch.lazy) clearTimeout(C.mangotouch.lazy);
+ if (((i - C.mangotouch.tm) > 80) || (C.mangotouch.dry != g) || (C.mangotouch.drx != h)) {
+ C.scrollmom.stop();
+ C.scrollmom.reset(b, a);
+ C.mangotouch.sy = a;
+ C.mangotouch.ly = a;
+ C.mangotouch.sx = b;
+ C.mangotouch.lx = b;
+ C.mangotouch.dry = g;
+ C.mangotouch.drx = h;
+ C.mangotouch.tm = i
+ } else {
+ C.scrollmom.stop();
+ C.scrollmom.update(C.mangotouch.sx - d, C.mangotouch.sy - c);
+ var j = i - C.mangotouch.tm;
+ C.mangotouch.tm = i;
+ var k = Math.max(Math.abs(C.mangotouch.ly - a), Math.abs(C.mangotouch.lx - b));
+ C.mangotouch.ly = a;
+ C.mangotouch.lx = b;
+ if (k > 2) {
+ C.mangotouch.lazy = setTimeout(function() {
+ C.mangotouch.lazy = false;
+ C.mangotouch.dry = 0;
+ C.mangotouch.drx = 0;
+ C.mangotouch.tm = 0;
+ C.scrollmom.doMomentum(30)
+ },
+ 100)
+ }
+ }
+ };
+ var u = C.getScrollTop();
+ var w = C.getScrollLeft();
+ C.mangotouch = {
+ sy: u,
+ ly: u,
+ dry: 0,
+ sx: w,
+ lx: w,
+ drx: 0,
+ lazy: false,
+ tm: 0
+ };
+ C.bind(C.docscroll, "scroll", C.onmangotouch)
+ } else {
+ if (D.cantouch || C.istouchcapable || C.opt.touchbehavior || D.hasmstouch) {
+ C.scrollmom = new R(C);
+ C.ontouchstart = function(e) {
+ if (e.pointerType && e.pointerType != 2) return false;
+ if (!C.locked) {
+ if (D.hasmstouch) {
+ var a = (e.target) ? e.target: false;
+ while (a) {
+ var b = $(a).getNiceScroll();
+ if ((b.length > 0) && (b[0].me == C.me)) break;
+ if (b.length > 0) return false;
+ if ((a.nodeName == 'DIV') && (a.id == C.id)) break;
+ a = (a.parentNode) ? a.parentNode: false
+ }
+ }
+ C.cancelScroll();
+ var a = C.getTarget(e);
+ if (a) {
+ var c = (/INPUT/i.test(a.nodeName)) && (/range/i.test(a.type));
+ if (c) return C.stopPropagation(e)
+ }
+ if (! ("clientX" in e) && ("changedTouches" in e)) {
+ e.clientX = e.changedTouches[0].clientX;
+ e.clientY = e.changedTouches[0].clientY
+ }
+ if (C.forcescreen) {
+ var d = e;
+ var e = {
+ "original": (e.original) ? e.original: e
+ };
+ e.clientX = d.screenX;
+ e.clientY = d.screenY
+ }
+ C.rail.drag = {
+ x: e.clientX,
+ y: e.clientY,
+ sx: C.scroll.x,
+ sy: C.scroll.y,
+ st: C.getScrollTop(),
+ sl: C.getScrollLeft(),
+ pt: 2
+ };
+ if (C.opt.touchbehavior && C.isiframe && D.isie) {
+ var f = C.win.position();
+ C.rail.drag.x += f.left;
+ C.rail.drag.y += f.top
+ }
+ C.hasmoving = false;
+ C.lastmouseup = false;
+ C.scrollmom.reset(e.clientX, e.clientY);
+ if (!D.cantouch && !this.istouchcapable && !D.hasmstouch) {
+ var g = (a) ? /INPUT|SELECT|TEXTAREA/i.test(a.nodeName) : false;
+ if (!g) {
+ if (!C.ispage && D.hasmousecapture) a.setCapture();
+ return C.cancelEvent(e)
+ }
+ if (/SUBMIT|CANCEL|BUTTON/i.test($(a).attr('type'))) {
+ pc = {
+ "tg": a,
+ "click": false
+ };
+ C.preventclick = pc
+ }
+ }
+ }
+ };
+ C.ontouchend = function(e) {
+ if (e.pointerType && e.pointerType != 2) return false;
+ if (C.rail.drag && (C.rail.drag.pt == 2)) {
+ C.scrollmom.doMomentum();
+ C.rail.drag = false;
+ if (C.hasmoving) {
+ C.hasmoving = false;
+ C.lastmouseup = true;
+ C.hideCursor();
+ if (D.hasmousecapture) document.releaseCapture();
+ if (!D.cantouch) return C.cancelEvent(e)
+ }
+ }
+ };
+ var x = (C.opt.touchbehavior && C.isiframe && !D.hasmousecapture);
+ C.ontouchmove = function(e, a) {
+ if (e.pointerType && e.pointerType != 2) return false;
+ if (C.rail.drag && (C.rail.drag.pt == 2)) {
+ if (D.cantouch && (typeof e.original == "undefined")) return true;
+ C.hasmoving = true;
+ if (C.preventclick && !C.preventclick.click) {
+ C.preventclick.click = C.preventclick.tg.onclick || false;
+ C.preventclick.tg.onclick = C.onpreventclick
+ }
+ var b = $.extend({
+ "original": e
+ },
+ e);
+ e = b;
+ if (("changedTouches" in e)) {
+ e.clientX = e.changedTouches[0].clientX;
+ e.clientY = e.changedTouches[0].clientY
+ }
+ if (C.forcescreen) {
+ var c = e;
+ var e = {
+ "original": (e.original) ? e.original: e
+ };
+ e.clientX = c.screenX;
+ e.clientY = c.screenY
+ }
+ var d = ofy = 0;
+ if (x && !a) {
+ var f = C.win.position();
+ d = -f.left;
+ ofy = -f.top
+ }
+ var g = e.clientY + ofy;
+ var h = (g - C.rail.drag.y);
+ var i = C.rail.drag.st - h;
+ if (C.ishwscroll && C.opt.bouncescroll) {
+ if (i < 0) {
+ i = Math.round(i / 2)
+ } else if (i > C.page.maxh) {
+ i = C.page.maxh + Math.round((i - C.page.maxh) / 2)
+ }
+ } else {
+ if (i < 0) {
+ i = 0;
+ g = 0
+ }
+ if (i > C.page.maxh) {
+ i = C.page.maxh;
+ g = 0
+ }
+ }
+ var j = e.clientX + d;
+ if (C.railh && C.railh.scrollable) {
+ var k = (j - C.rail.drag.x);
+ var l = C.rail.drag.sl - k;
+ if (C.ishwscroll && C.opt.bouncescroll) {
+ if (l < 0) {
+ l = Math.round(l / 2)
+ } else if (l > C.page.maxw) {
+ l = C.page.maxw + Math.round((l - C.page.maxw) / 2)
+ }
+ } else {
+ if (l < 0) {
+ l = 0;
+ j = 0
+ }
+ if (l > C.page.maxw) {
+ l = C.page.maxw;
+ j = 0
+ }
+ }
+ }
+ C.synched("touchmove",
+ function() {
+ try {
+ if (C.me.is(":visible") === false) return
+ } catch(e) {}
+ if (C.rail.drag && (C.rail.drag.pt == 2)) {
+ if (C.prepareTransition) C.prepareTransition(0);
+ if (C.rail.scrollable) C.setScrollTop(i);
+ C.scrollmom.update(j, g);
+ if (C.railh && C.railh.scrollable) {
+ C.setScrollLeft(l);
+ C.showCursor(i, l)
+ } else {
+ C.showCursor(i)
+ }
+ if (D.isie10) document.selection.clear()
+ }
+ });
+ if (!D.ischrome && !C.istouchcapable) return C.cancelEvent(e)
+ }
+ }
+ }
+ if (D.cantouch || C.opt.touchbehavior) {
+ C.onpreventclick = function(e) {
+ if (C.preventclick) {
+ C.preventclick.tg.onclick = C.preventclick.click;
+ C.preventclick = false;
+ return C.cancelEvent(e)
+ }
+ };
+ C.onmousedown = C.ontouchstart;
+ C.onmouseup = C.ontouchend;
+ C.onclick = (D.isios) ? false: function(e) {
+ if (C.lastmouseup) {
+ C.lastmouseup = false;
+ return C.cancelEvent(e)
+ } else {
+ return true
+ }
+ };
+ C.onmousemove = C.ontouchmove;
+ if (D.cursorgrabvalue) {
+ C.css((C.ispage) ? C.doc: C.win, {
+ 'cursor': D.cursorgrabvalue
+ });
+ C.css(C.rail, {
+ 'cursor': D.cursorgrabvalue
+ })
+ }
+ } else {
+ C.onmousedown = function(e, a) {
+ if (C.rail.drag && C.rail.drag.pt != 1) return;
+ if (C.locked) return C.cancelEvent(e);
+ C.cancelScroll();
+ C.rail.drag = {
+ x: e.clientX,
+ y: e.clientY,
+ sx: C.scroll.x,
+ sy: C.scroll.y,
+ pt: 1,
+ hr: ( !! a)
+ };
+ var b = C.getTarget(e);
+ if (!C.ispage && D.hasmousecapture) b.setCapture();
+ if (C.isiframe && !D.hasmousecapture) {
+ C.saved["csspointerevents"] = C.doc.css("pointer-events");
+ C.css(C.doc, {
+ "pointer-events": "none"
+ })
+ }
+ return C.cancelEvent(e)
+ };
+ C.onmouseup = function(e) {
+ if (C.rail.drag) {
+ if (D.hasmousecapture) document.releaseCapture();
+ if (C.isiframe && !D.hasmousecapture) C.doc.css("pointer-events", C.saved["csspointerevents"]);
+ if (C.rail.drag.pt != 1) return;
+ C.rail.drag = false;
+ return C.cancelEvent(e)
+ }
+ };
+ C.onmousemove = function(e) {
+ if (C.rail.drag) {
+ if (C.rail.drag.pt != 1) return;
+ if (D.ischrome && e.which == 0) return C.onmouseup(e);
+ C.cursorfreezed = true;
+ if (C.rail.drag.hr) {
+ C.scroll.x = C.rail.drag.sx + (e.clientX - C.rail.drag.x);
+ if (C.scroll.x < 0) C.scroll.x = 0;
+ var a = C.scrollvaluemaxw;
+ if (C.scroll.x > a) C.scroll.x = a
+ } else {
+ C.scroll.y = C.rail.drag.sy + (e.clientY - C.rail.drag.y);
+ if (C.scroll.y < 0) C.scroll.y = 0;
+ var b = C.scrollvaluemax;
+ if (C.scroll.y > b) C.scroll.y = b
+ }
+ C.synched('mousemove',
+ function() {
+ try {
+ if (C.me.is(":visible") === false) return
+ } catch(e) {}
+ if (C.rail.drag && (C.rail.drag.pt == 1)) {
+ C.showCursor();
+ if (C.rail.drag.hr) C.doScrollLeft(Math.round(C.scroll.x * C.scrollratio.x));
+ else C.doScrollTop(Math.round(C.scroll.y * C.scrollratio.y))
+ }
+ });
+ return C.cancelEvent(e)
+ } else {
+ C.checkarea = true
+ }
+ }
+ }
+ if (D.cantouch || C.opt.touchbehavior) {
+ C.bind(C.win, "mousedown", C.onmousedown)
+ }
+ if (D.hasmstouch) {
+ C.css(C.rail, {
+ '-ms-touch-action': 'none'
+ });
+ C.css(C.cursor, {
+ '-ms-touch-action': 'none'
+ });
+ C.bind(C.win, "MSPointerDown", C.ontouchstart);
+ C.bind(document, "MSPointerUp", C.ontouchend);
+ C.bind(document, "MSPointerMove", C.ontouchmove);
+ C.bind(C.cursor, "MSGestureHold",
+ function(e) {
+ e.preventDefault()
+ });
+ C.bind(C.cursor, "contextmenu",
+ function(e) {
+ e.preventDefault()
+ })
+ }
+ if (this.istouchcapable) {
+ C.bind(C.win, "touchstart", C.ontouchstart);
+ C.bind(document, "touchend", C.ontouchend);
+ C.bind(document, "touchcancel", C.ontouchend);
+ C.bind(document, "touchmove", C.ontouchmove)
+ }
+ C.bind(C.cursor, "mousedown", C.onmousedown);
+ C.bind(C.cursor, "mouseup", C.onmouseup);
+ if (C.railh) {
+ C.bind(C.cursorh, "mousedown",
+ function(e) {
+ C.onmousedown(e, true)
+ });
+ C.bind(C.cursorh, "mouseup",
+ function(e) {
+ if (C.rail.drag && C.rail.drag.pt == 2) return;
+ C.rail.drag = false;
+ C.hasmoving = false;
+ C.hideCursor();
+ if (D.hasmousecapture) document.releaseCapture();
+ return C.cancelEvent(e)
+ })
+ }
+ C.bind(document, "mouseup", C.onmouseup);
+ if (D.hasmousecapture) C.bind(C.win, "mouseup", C.onmouseup);
+ C.bind(document, "mousemove", C.onmousemove);
+ if (C.onclick) C.bind(document, "click", C.onclick);
+ if (!D.cantouch && !C.opt.touchbehavior) {
+ C.jqbind(C.rail, "mouseenter",
+ function() {
+ try {
+ if (C.me.is(":visible") === false) return
+ } catch(e) {}
+ if (C.canshowonmouseevent) C.showCursor();
+ C.rail.active = true
+ });
+ C.jqbind(C.rail, "mouseleave",
+ function() {
+ C.rail.active = false;
+ if (!C.rail.drag) C.hideCursor()
+ });
+ if (C.opt.sensitiverail) {
+ C.bind(C.rail, "click",
+ function(e) {
+ C.doRailClick(e, false, false)
+ });
+ C.bind(C.rail, "dblclick",
+ function(e) {
+ C.doRailClick(e, true, false)
+ });
+ C.bind(C.cursor, "click",
+ function(e) {
+ C.cancelEvent(e)
+ });
+ C.bind(C.cursor, "dblclick",
+ function(e) {
+ C.cancelEvent(e)
+ })
+ }
+ if (C.railh) {
+ C.jqbind(C.railh, "mouseenter",
+ function() {
+ try {
+ if (C.me.is(":visible") === false) return
+ } catch(e) {}
+ if (C.canshowonmouseevent) C.showCursor();
+ C.rail.active = true
+ });
+ C.jqbind(C.railh, "mouseleave",
+ function() {
+ C.rail.active = false;
+ if (!C.rail.drag) C.hideCursor()
+ });
+ if (C.opt.sensitiverail) {
+ C.bind(C.railh, "click",
+ function(e) {
+ C.doRailClick(e, false, true)
+ });
+ C.bind(C.railh, "dblclick",
+ function(e) {
+ C.doRailClick(e, true, true)
+ });
+ C.bind(C.cursorh, "click",
+ function(e) {
+ C.cancelEvent(e)
+ });
+ C.bind(C.cursorh, "dblclick",
+ function(e) {
+ C.cancelEvent(e)
+ })
+ }
+ }
+ if (C.zoom) {
+ C.jqbind(C.zoom, "mouseenter",
+ function() {
+ try {
+ if (C.me.is(":visible") === false) return
+ } catch(e) {}
+ if (C.canshowonmouseevent) C.showCursor();
+ C.rail.active = true
+ });
+ C.jqbind(C.zoom, "mouseleave",
+ function() {
+ C.rail.active = false;
+ if (!C.rail.drag) C.hideCursor()
+ })
+ }
+ }
+ if (C.opt.enablemousewheel) {
+ if (!C.isiframe) C.bind((D.isie && C.ispage) ? document: C.docscroll, "mousewheel", C.onmousewheel);
+ C.bind(C.rail, "mousewheel", C.onmousewheel);
+ if (C.railh) C.bind(C.railh, "mousewheel", C.onmousewheelhr)
+ }
+ if (!C.ispage && !D.cantouch && !(/HTML|BODY/.test(C.win[0].nodeName))) {
+ if (!C.win.attr("tabindex")) C.win.attr({
+ "tabindex": J++
+ });
+ C.jqbind(C.win, "focus",
+ function(e) {
+ try {
+ if (C.me.is(":visible") === false) return
+ } catch(e) {}
+ G = (C.getTarget(e)).id || true;
+ C.hasfocus = true;
+ if (C.canshowonmouseevent) C.noticeCursor()
+ });
+ C.jqbind(C.win, "blur",
+ function(e) {
+ G = false;
+ C.hasfocus = false
+ });
+ C.jqbind(C.win, "mouseenter",
+ function(e) {
+ try {
+ if (C.me.is(":visible") === false) return
+ } catch(e) {}
+ H = (C.getTarget(e)).id || true;
+ C.hasmousefocus = true;
+ if (C.canshowonmouseevent) C.noticeCursor()
+ });
+ C.jqbind(C.win, "mouseleave",
+ function() {
+ H = false;
+ C.hasmousefocus = false
+ })
+ }
+ }
+ C.onkeypress = function(e) {
+ if (C.locked && C.page.maxh == 0) return true;
+ e = (e) ? e: window.e;
+ var a = C.getTarget(e);
+ if (a && /INPUT|TEXTAREA|SELECT|OPTION/.test(a.nodeName)) {
+ var b = a.getAttribute('type') || a.type || false;
+ if ((!b) || !(/submit|button|cancel/i.tp)) return true
+ }
+ if (C.hasfocus || (C.hasmousefocus && !G) || (C.ispage && !G && !H)) {
+ var c = e.keyCode;
+ if (C.locked && c != 27) return C.cancelEvent(e);
+ var d = e.ctrlKey || false;
+ var f = e.shiftKey || false;
+ var g = false;
+ switch (c) {
+ case 38:
+ case 63233:
+ C.doScrollBy(24 * 3);
+ g = true;
+ break;
+ case 40:
+ case 63235:
+ C.doScrollBy( - 24 * 3);
+ g = true;
+ break;
+ case 37:
+ case 63232:
+ if (C.railh) { (d) ? C.doScrollLeft(0) : C.doScrollLeftBy(24 * 3);
+ g = true
+ }
+ break;
+ case 39:
+ case 63234:
+ if (C.railh) { (d) ? C.doScrollLeft(C.page.maxw) : C.doScrollLeftBy( - 24 * 3);
+ g = true
+ }
+ break;
+ case 33:
+ case 63276:
+ C.doScrollBy(C.view.h);
+ g = true;
+ break;
+ case 34:
+ case 63277:
+ C.doScrollBy( - C.view.h);
+ g = true;
+ break;
+ case 36:
+ case 63273:
+ (C.railh && d) ? C.doScrollPos(0, 0) : C.doScrollTo(0);
+ g = true;
+ break;
+ case 35:
+ case 63275:
+ (C.railh && d) ? C.doScrollPos(C.page.maxw, C.page.maxh) : C.doScrollTo(C.page.maxh);
+ g = true;
+ break;
+ case 32:
+ if (C.opt.spacebarenabled) { (f) ? C.doScrollBy(C.view.h) : C.doScrollBy( - C.view.h);
+ g = true
+ }
+ break;
+ case 27:
+ if (C.zoomactive) {
+ C.doZoom();
+ g = true
+ }
+ break
+ }
+ if (g) return C.cancelEvent(e)
+ }
+ };
+ if (C.opt.enablekeyboard) C.bind(document, (D.isopera && !D.isopera12) ? "keypress": "keydown", C.onkeypress);
+ C.bind(window, 'resize', C.resize);
+ C.bind(window, 'orientationchange', C.resize);
+ C.bind(window, "load", C.resize);
+ if (D.ischrome && !C.ispage && !C.haswrapper) {
+ var y = C.win.attr("style");
+ var z = parseFloat(C.win.css("width")) + 1;
+ C.win.css('width', z);
+ C.synched("chromefix",
+ function() {
+ C.win.attr("style", y)
+ })
+ }
+ C.onAttributeChange = function(e) {
+ C.lazyResize()
+ };
+ if (!C.ispage && !C.haswrapper) {
+ if ("WebKitMutationObserver" in window) {
+ C.observer = new WebKitMutationObserver(function(a) {
+ a.forEach(C.onAttributeChange)
+ });
+ C.observer.observe(C.win[0], {
+ attributes: true,
+ subtree: false
+ })
+ } else {
+ C.bind(C.win, (D.isie && !D.isie9) ? "propertychange": "DOMAttrModified", C.onAttributeChange);
+ if (D.isie9) C.win[0].attachEvent("onpropertychange", C.onAttributeChange)
+ }
+ }
+ if (!C.ispage && C.opt.boxzoom) C.bind(window, "resize", C.resizeZoom);
+ if (C.istextarea) C.bind(C.win, "mouseup", C.resize);
+ C.resize()
+ }
+ if (this.doc[0].nodeName == 'IFRAME') {
+ function oniframeload(e) {
+ C.iframexd = false;
+ try {
+ var b = 'contentDocument' in this ? this.contentDocument: this.contentWindow.document;
+ var a = b.domain
+ } catch(e) {
+ C.iframexd = true;
+ b = false
+ };
+ if (C.iframexd) {
+ if ("console" in window) console.log('NiceScroll error: policy restriced iframe');
+ return true
+ }
+ C.forcescreen = true;
+ if (C.isiframe) {
+ C.iframe = {
+ "doc": $(b),
+ "html": C.doc.contents().find('html')[0],
+ "body": C.doc.contents().find('body')[0]
+ };
+ C.getContentSize = function() {
+ return {
+ w: Math.max(C.iframe.html.scrollWidth, C.iframe.body.scrollWidth),
+ h: Math.max(C.iframe.html.scrollHeight, C.iframe.body.scrollHeight)
+ }
+ };
+ C.docscroll = $(C.iframe.body)
+ }
+ if (!D.isios && C.opt.iframeautoresize && !C.isiframe) {
+ C.win.scrollTop(0);
+ C.doc.height("");
+ var c = Math.max(b.getElementsByTagName('html')[0].scrollHeight, b.body.scrollHeight);
+ C.doc.height(c)
+ }
+ C.resize();
+ if (D.isie7) C.css($(C.iframe.html), {
+ 'overflow-y': 'hidden'
+ });
+ C.css($(C.iframe.body), {
+ 'overflow-y': 'hidden'
+ });
+ if ('contentWindow' in this) {
+ C.bind(this.contentWindow, "scroll", C.onscroll)
+ } else {
+ C.bind(b, "scroll", C.onscroll)
+ }
+ if (C.opt.enablemousewheel) {
+ C.bind(b, "mousewheel", C.onmousewheel)
+ }
+ if (C.opt.enablekeyboard) C.bind(b, (D.isopera) ? "keypress": "keydown", C.onkeypress);
+ if (D.cantouch || C.opt.touchbehavior) {
+ C.bind(b, "mousedown", C.onmousedown);
+ C.bind(b, "mousemove",
+ function(e) {
+ C.onmousemove(e, true)
+ });
+ if (D.cursorgrabvalue) C.css($(b.body), {
+ 'cursor': D.cursorgrabvalue
+ })
+ }
+ C.bind(b, "mouseup", C.onmouseup);
+ if (C.zoom) {
+ if (C.opt.dblclickzoom) C.bind(b, 'dblclick', C.doZoom);
+ if (C.ongesturezoom) C.bind(b, "gestureend", C.ongesturezoom)
+ }
+ };
+ if (this.doc[0].readyState && this.doc[0].readyState == "complete") {
+ setTimeout(function() {
+ oniframeload.call(C.doc[0], false)
+ },
+ 500)
+ }
+ C.bind(this.doc, "load", oniframeload)
+ }
+ };
+ this.showCursor = function(a, b) {
+ if (C.cursortimeout) {
+ clearTimeout(C.cursortimeout);
+ C.cursortimeout = 0
+ }
+ if (!C.rail) return;
+ try {
+ var c = C.me.offset().top;
+ if (C.me.scrollParent && C.me.scrollParent().length > 0) {
+ if (C.rail.parent().get(0).tagName != "BODY") {
+ c = c - C.me.scrollParent().offset().top;
+ c = c + C.me.scrollParent().offset().scrollTop()
+ }
+ }
+ if (C.rail.parent().get(0).tagName != "BODY") {
+ c = c - F(".e8_boxhead").height()
+ }
+ C.rail.css("top", c);
+ if (!C.rail.data("__resize")) {
+ C.resize();
+ C.rail.data("__resize", true)
+ }
+ } catch(e) {
+ if (window.console) console.log(e, "jquery.nicescroll.js#showCursor")
+ }
+ if (C.autohidedom) {
+ C.autohidedom.stop().css({
+ opacity: C.opt.cursoropacitymax
+ });
+ C.cursoractive = true
+ }
+ if ((typeof a != "undefined") && (a !== false)) {
+ C.scroll.y = Math.round(a * 1 / C.scrollratio.y)
+ }
+ if (typeof b != "undefined") {
+ C.scroll.x = Math.round(b * 1 / C.scrollratio.x)
+ }
+ C.cursor.css({
+ height: C.cursorheight,
+ top: C.scroll.y
+ });
+ if (C.cursorh) { (!C.rail.align && C.rail.visibility) ? C.cursorh.css({
+ width: C.cursorwidth,
+ left: C.scroll.x + C.rail.width
+ }) : C.cursorh.css({
+ width: C.cursorwidth,
+ left: C.scroll.x
+ });
+ C.cursoractive = true
+ }
+ if (C.zoom) C.zoom.stop().css({
+ opacity: C.opt.cursoropacitymax
+ })
+ };
+ this.hideCursor = function(a) {
+ if (C.cursortimeout) return;
+ if (!C.rail) return;
+ if (!C.autohidedom) return;
+ if (a) {
+ C.cursortimeout = setTimeout(function() {
+ if (!C.rail.active || !C.showonmouseevent) {
+ C.autohidedom.stop().animate({
+ opacity: C.opt.cursoropacitymin
+ });
+ if (C.zoom) C.zoom.stop().animate({
+ opacity: C.opt.cursoropacitymin
+ });
+ C.cursoractive = false
+ }
+ C.cursortimeout = 0
+ },
+ a || 400)
+ } else {
+ if (!C.rail.active || !C.showonmouseevent) {
+ C.autohidedom.stop().animate({
+ opacity: C.opt.cursoropacitymin
+ });
+ if (C.zoom) C.zoom.stop().animate({
+ opacity: C.opt.cursoropacitymin
+ });
+ C.cursoractive = false
+ }
+ C.cursortimeout = 0
+ }
+ };
+ this.noticeCursor = function(a, b, c) {
+ C.showCursor(b, c);
+ if (!C.rail.active) C.hideCursor(a)
+ };
+ this.getContentSize = (C.ispage) ?
+ function() {
+ return {
+ w: Math.max(document.body.scrollWidth, document.documentElement.scrollWidth),
+ h: Math.max(document.body.scrollHeight, document.documentElement.scrollHeight)
+ }
+ }: (C.haswrapper) ?
+ function() {
+ return {
+ w: C.doc.outerWidth() + parseInt(C.win.css('paddingLeft')) + parseInt(C.win.css('paddingRight')),
+ h: C.doc.outerHeight() + parseInt(C.win.css('paddingTop')) + parseInt(C.win.css('paddingBottom'))
+ }
+ }: function() {
+ return {
+ w: C.docscroll[0].scrollWidth,
+ h: C.docscroll[0].scrollHeight
+ }
+ };
+ this.onResize = function(e, a) {
+ try {
+ if (C.me.is(":visible") === false) return
+ } catch(e) {}
+ if (!C.win) return false;
+ if (!C.haswrapper && !C.ispage) {
+ if (C.win.css('display') == 'none') {
+ if (C.visibility) C.hideRail().hideRailHr();
+ return false
+ } else {
+ if (!C.hidden && !C.visibility) C.showRail().showRailHr()
+ }
+ }
+ var b = C.page.maxh;
+ var c = C.page.maxw;
+ var d = {
+ h: C.view.h,
+ w: C.view.w
+ };
+ C.view = {
+ w: (C.ispage) ? C.win.width() : parseInt(C.win[0].clientWidth),
+ h: (C.ispage) ? C.win.height() : parseInt(C.win[0].clientHeight)
+ };
+ C.page = (a) ? a: C.getContentSize();
+ C.page.maxh = Math.max(0, C.page.h - C.view.h);
+ C.page.maxw = Math.max(0, C.page.w - C.view.w);
+ if ((C.page.maxh == b) && (C.page.maxw == c) && (C.view.w == d.w)) {
+ if (!C.ispage) {
+ var f = C.win.offset();
+ if (C.lastposition) {
+ var g = C.lastposition;
+ if ((g.top == f.top) && (g.left == f.left)) return C
+ }
+ C.lastposition = f
+ } else {
+ return C
+ }
+ }
+ if (C.page.maxh == 0) {
+ C.hideRail();
+ C.scrollvaluemax = 0;
+ C.scroll.y = 0;
+ C.scrollratio.y = 0;
+ C.cursorheight = 0;
+ C.setScrollTop(0);
+ C.rail.scrollable = false
+ } else {
+ C.rail.scrollable = true
+ }
+ if (C.page.maxw == 0) {
+ C.hideRailHr();
+ C.scrollvaluemaxw = 0;
+ C.scroll.x = 0;
+ C.scrollratio.x = 0;
+ C.cursorwidth = 0;
+ C.setScrollLeft(0);
+ C.railh.scrollable = false
+ } else {
+ C.railh.scrollable = true
+ }
+ C.locked = (C.page.maxh == 0) && (C.page.maxw == 0);
+ if (C.locked) {
+ if (!C.ispage) C.updateScrollBar(C.view);
+ return false
+ }
+ if (!C.hidden && !C.visibility) {
+ C.showRail().showRailHr()
+ } else if (!C.hidden && !C.railh.visibility) C.showRailHr();
+ if (C.istextarea && C.win.css('resize') && C.win.css('resize') != 'none') C.view.h -= 20;
+ if (!C.ispage) C.updateScrollBar(C.view);
+ C.cursorheight = Math.min(C.view.h, Math.round(C.view.h * (C.view.h / C.page.h)));
+ C.cursorheight = (C.opt.cursorfixedheight) ? C.opt.cursorfixedheight: Math.max(C.opt.cursorminheight, C.cursorheight);
+ C.cursorwidth = Math.min(C.view.w, Math.round(C.view.w * (C.view.w / C.page.w)));
+ C.cursorwidth = (C.opt.cursorfixedheight) ? C.opt.cursorfixedheight: Math.max(C.opt.cursorminheight, C.cursorwidth);
+ C.scrollvaluemax = C.view.h - C.cursorheight - C.cursor.hborder;
+ if (C.railh) {
+ C.railh.width = (C.page.maxh > 0) ? (C.view.w - C.rail.width) : C.view.w;
+ C.scrollvaluemaxw = C.railh.width - C.cursorwidth - C.cursorh.wborder
+ }
+ C.scrollratio = {
+ x: (C.page.maxw / C.scrollvaluemaxw),
+ y: (C.page.maxh / C.scrollvaluemax)
+ };
+ var h = C.getScrollTop();
+ if (h > C.page.maxh) {
+ C.doScrollTop(C.page.maxh)
+ } else {
+ C.scroll.y = Math.round(C.getScrollTop() * (1 / C.scrollratio.y));
+ C.scroll.x = Math.round(C.getScrollLeft() * (1 / C.scrollratio.x));
+ if (C.cursoractive) C.noticeCursor()
+ }
+ if (C.scroll.y && (C.getScrollTop() == 0)) C.doScrollTo(Math.floor(C.scroll.y * C.scrollratio.y));
+ return C
+ };
+ this.resize = function() {
+ C.delayed('resize', C.onResize, 30);
+ return C
+ };
+ this.lazyResize = function() {
+ C.delayed('resize', C.resize, 250)
+ };
+ this._bind = function(a, b, c, d) {
+ C.events.push({
+ e: a,
+ n: b,
+ f: c,
+ b: d,
+ q: false
+ });
+ if (a.addEventListener) {
+ a.addEventListener(b, c, d || false)
+ } else if (a.attachEvent) {
+ a.attachEvent("on" + b, c)
+ } else {
+ a["on" + b] = c
+ }
+ };
+ this.jqbind = function(a, b, c) {
+ C.events.push({
+ e: a,
+ n: b,
+ f: c,
+ q: true
+ });
+ $(a).bind(b, c)
+ };
+ this.bind = function(b, c, d, f) {
+ var g = ("jquery" in b) ? b[0] : b;
+ if (g.addEventListener) {
+ if (D.cantouch && /mouseup|mousedown|mousemove/.test(c)) {
+ var h = (c == 'mousedown') ? 'touchstart': (c == 'mouseup') ? 'touchend': 'touchmove';
+ C._bind(g, h,
+ function(e) {
+ if (e.touches) {
+ if (e.touches.length < 2) {
+ var a = (e.touches.length) ? e.touches[0] : e;
+ a.original = e;
+ d.call(this, a)
+ }
+ } else if (e.changedTouches) {
+ var a = e.changedTouches[0];
+ a.original = e;
+ d.call(this, a)
+ }
+ },
+ f || false)
+ }
+ C._bind(g, c, d, f || false);
+ if (c == 'mousewheel') C._bind(g, "DOMMouseScroll", d, f || false);
+ if (D.cantouch && c == "mouseup") C._bind(g, "touchcancel", d, f || false)
+ } else {
+ C._bind(g, c,
+ function(e) {
+ e = e || window.event || false;
+ if (e) {
+ if (e.srcElement) e.target = e.srcElement
+ }
+ return ((d.call(g, e) === false) || f === false) ? C.cancelEvent(e) : true
+ })
+ }
+ };
+ this._unbind = function(a, b, c, d) {
+ if (a.removeEventListener) {
+ a.removeEventListener(b, c, d)
+ } else if (a.detachEvent) {
+ a.detachEvent('on' + b, c)
+ } else {
+ a['on' + b] = false
+ }
+ };
+ this.unbindAll = function() {
+ for (var a = 0; a < C.events.length; a++) {
+ var r = C.events[a]; (r.q) ? r.e.unbind(r.n, r.f) : C._unbind(r.e, r.n, r.f, r.b)
+ }
+ };
+ this.cancelEvent = function(e) {
+ var e = (e.original) ? e.original: (e) ? e: window.event || false;
+ if (!e) return false;
+ if (e.preventDefault) e.preventDefault();
+ if (e.stopPropagation) e.stopPropagation();
+ if (e.preventManipulation) e.preventManipulation();
+ e.cancelBubble = true;
+ e.cancel = true;
+ e.returnValue = false;
+ return false
+ };
+ this.stopPropagation = function(e) {
+ var e = (e.original) ? e.original: (e) ? e: window.event || false;
+ if (!e) return false;
+ if (e.stopPropagation) return e.stopPropagation();
+ if (e.cancelBubble) e.cancelBubble = true;
+ return false
+ };
+ this.showRail = function() {
+ if ((C.page.maxh != 0) && (C.ispage || C.win.css('display') != 'none')) {
+ C.visibility = true;
+ C.rail.visibility = true;
+ C.rail.css('display', 'block')
+ }
+ return C
+ };
+ this.showRailHr = function() {
+ if (!C.railh) return C;
+ if ((C.page.maxw != 0) && (C.ispage || C.win.css('display') != 'none')) {
+ C.railh.visibility = true;
+ C.railh.css('display', 'block')
+ }
+ return C
+ };
+ this.hideRail = function() {
+ C.visibility = false;
+ C.rail.visibility = false;
+ C.rail.css('display', 'none');
+ return C
+ };
+ this.hideRailHr = function() {
+ if (!C.railh) return C;
+ C.railh.visibility = false;
+ C.railh.css('display', 'none');
+ return C
+ };
+ this.show = function() {
+ C.hidden = false;
+ C.locked = false;
+ return C.showRail().showRailHr()
+ };
+ this.hide = function() {
+ C.hidden = true;
+ C.locked = true;
+ return C.hideRail().hideRailHr()
+ };
+ this.toggle = function() {
+ return (C.hidden) ? C.show() : C.hide()
+ };
+ this.remove = function() {
+ C.stop();
+ if (C.cursortimeout) clearTimeout(C.cursortimeout);
+ C.doZoomOut();
+ C.unbindAll();
+ if (C.observer !== false) C.observer.disconnect();
+ C.events = [];
+ if (C.cursor) {
+ C.cursor.remove();
+ C.cursor = null
+ }
+ if (C.cursorh) {
+ C.cursorh.remove();
+ C.cursorh = null
+ }
+ if (C.rail) {
+ C.rail.remove();
+ C.rail = null
+ }
+ if (C.railh) {
+ C.railh.remove();
+ C.railh = null
+ }
+ if (C.zoom) {
+ C.zoom.remove();
+ C.zoom = null
+ }
+ for (var a = 0; a < C.saved.css.length; a++) {
+ var d = C.saved.css[a];
+ d[0].css(d[1], (typeof d[2] == "undefined") ? '': d[2])
+ }
+ C.saved = false;
+ C.me.data('__nicescroll', '');
+ C.me = null;
+ C.doc = null;
+ C.docscroll = null;
+ C.win = null;
+ return C
+ };
+ this.scrollstart = function(a) {
+ this.onscrollstart = a;
+ return C
+ };
+ this.scrollend = function(a) {
+ this.onscrollend = a;
+ return C
+ };
+ this.scrollcancel = function(a) {
+ this.onscrollcancel = a;
+ return C
+ };
+ this.zoomin = function(a) {
+ this.onzoomin = a;
+ return C
+ };
+ this.zoomout = function(a) {
+ this.onzoomout = a;
+ return C
+ };
+ this.isScrollable = function(e) {
+ var a = (e.target) ? e.target: e;
+ while (a && (a.nodeType == 1) && !(/BODY|HTML/.test(a.nodeName))) {
+ var b = $(a);
+ var c = b.css('overflowY') || b.css('overflowX') || b.css('overflow') || '';
+ if (/scroll|auto/.test(c)) return (a.clientHeight != a.scrollHeight);
+ a = (a.parentNode) ? a.parentNode: false
+ }
+ return false
+ };
+ this.getViewport = function(a) {
+ var b = (a && a.parentNode) ? a.parentNode: false;
+ while (b && (b.nodeType == 1) && !(/BODY|HTML/.test(b.nodeName))) {
+ var c = $(b);
+ var d = c.css('overflowY') || c.css('overflowX') || c.css('overflow') || '';
+ if ((/scroll|auto/.test(d)) && (b.clientHeight != b.scrollHeight)) return c;
+ if (c.getNiceScroll().length > 0) return c;
+ b = (b.parentNode) ? b.parentNode: false
+ }
+ return false
+ };
+ function execScrollWheel(e, b) {
+ var c = 0;
+ var d = 0;
+ var f = 1;
+ if ("wheelDeltaY" in e) {
+ f = C.opt.mousescrollstep / (16 * 3);
+ c = Math.floor(e.wheelDeltaX * f);
+ d = Math.floor(e.wheelDeltaY * f);
+ if (d < 0) d = d + 1;
+ if (b && (c == 0) && d) {
+ c = d;
+ d = 0
+ }
+ } else {
+ var g = e.detail ? e.detail * -1 : e.wheelDelta / 40;
+ if (g) { (b) ? c = Math.floor(g * C.opt.mousescrollstep) : d = Math.floor(g * C.opt.mousescrollstep)
+ }
+ }
+ if (c) {
+ if (C.scrollmom) {
+ C.scrollmom.stop()
+ }
+ C.lastdeltax += c;
+ C.synched("mousewheelx",
+ function() {
+ var a = C.lastdeltax;
+ C.lastdeltax = 0;
+ if (!C.rail.drag) {
+ C.doScrollLeftBy(a)
+ }
+ })
+ }
+ if (d) {
+ if (C.scrollmom) {
+ C.scrollmom.stop()
+ }
+ C.lastdeltay += d;
+ C.synched("mousewheely",
+ function() {
+ var a = C.lastdeltay;
+ C.lastdeltay = 0;
+ if (!C.rail.drag) {
+ C.doScrollBy(a)
+ }
+ })
+ }
+ };
+ this.onmousewheel = function(e) {
+ if (C.locked) return true;
+ if (!C.rail.scrollable) {
+ if (C.railh && C.railh.scrollable) {
+ return C.onmousewheelhr(e)
+ } else {
+ return true
+ }
+ }
+ if (C.opt.preservenativescrolling && C.checkarea) {
+ C.checkarea = false;
+ C.nativescrollingarea = C.isScrollable(e)
+ }
+ if (C.nativescrollingarea) return true;
+ if (C.locked) return C.cancelEvent(e);
+ if (C.rail.drag) return C.cancelEvent(e);
+ execScrollWheel(e, false);
+ return C.cancelEvent(e)
+ };
+ this.onmousewheelhr = function(e) {
+ if (C.locked || !C.railh.scrollable) return true;
+ if (C.opt.preservenativescrolling && C.checkarea) {
+ C.checkarea = false;
+ C.nativescrollingarea = C.isScrollable(e)
+ }
+ if (C.nativescrollingarea) return true;
+ if (C.locked) return C.cancelEvent(e);
+ if (C.rail.drag) return C.cancelEvent(e);
+ execScrollWheel(e, true);
+ return C.cancelEvent(e)
+ };
+ this.stop = function() {
+ try {
+ if (C.me.is(":visible") === false) return
+ } catch(e) {}
+ C.cancelScroll();
+ if (C.scrollmon) C.scrollmon.stop();
+ C.cursorfreezed = false;
+ C.scroll.y = Math.round(C.getScrollTop() * (1 / C.scrollratio.y));
+ C.noticeCursor();
+ return C
+ };
+ this.getTransitionSpeed = function(a) {
+ var b = Math.round(C.opt.scrollspeed * 10);
+ var c = Math.min(b, Math.round((a / 20) * C.opt.scrollspeed));
+ return (c > 20) ? c: 0
+ };
+ if (!C.opt.smoothscroll) {
+ this.doScrollLeft = function(x, a) {
+ var y = C.getScrollTop();
+ C.doScrollPos(x, y, a)
+ };
+ this.doScrollTop = function(y, a) {
+ var x = C.getScrollLeft();
+ C.doScrollPos(x, y, a)
+ };
+ this.doScrollPos = function(x, y, a) {
+ var b = (x > C.page.maxw) ? C.page.maxw: x;
+ if (b < 0) b = 0;
+ var c = (y > C.page.maxh) ? C.page.maxh: y;
+ if (c < 0) c = 0;
+ C.synched('scroll',
+ function() {
+ C.setScrollTop(c);
+ C.setScrollLeft(b)
+ })
+ };
+ this.cancelScroll = function() {}
+ } else if (C.ishwscroll && D.hastransition && C.opt.usetransition) {
+ this.prepareTransition = function(a, b) {
+ var c = (b) ? ((a > 20) ? a: 0) : C.getTransitionSpeed(a);
+ var d = (c) ? D.prefixstyle + 'transform ' + c + 'ms ease-out': '';
+ if (!C.lasttransitionstyle || C.lasttransitionstyle != d) {
+ C.lasttransitionstyle = d;
+ C.doc.css(D.transitionstyle, d)
+ }
+ return c
+ };
+ this.doScrollLeft = function(x, a) {
+ var y = (C.scrollrunning) ? C.newscrolly: C.getScrollTop();
+ C.doScrollPos(x, y, a)
+ };
+ this.doScrollTop = function(y, a) {
+ var x = (C.scrollrunning) ? C.newscrollx: C.getScrollLeft();
+ C.doScrollPos(x, y, a)
+ };
+ this.doScrollPos = function(x, y, k) {
+ var l = C.getScrollTop();
+ var m = C.getScrollLeft();
+ if (((C.newscrolly - l) * (y - l) < 0) || ((C.newscrollx - m) * (x - m) < 0)) C.cancelScroll();
+ if (C.opt.bouncescroll == false) {
+ if (y < 0) y = 0;
+ else if (y > C.page.maxh) y = C.page.maxh;
+ if (x < 0) x = 0;
+ else if (x > C.page.maxw) x = C.page.maxw
+ }
+ if (x == C.newscrollx && y == C.newscrolly) return false;
+ C.newscrolly = y;
+ C.newscrollx = x;
+ C.newscrollspeed = k || false;
+ if (C.timer) return false;
+ C.timer = setTimeout(function() {
+ var a = C.getScrollTop();
+ var b = C.getScrollLeft();
+ var c = {};
+ c.x = x - b;
+ c.y = y - a;
+ c.px = b;
+ c.py = a;
+ var d = Math.round(Math.sqrt(Math.pow(c.x, 2) + Math.pow(c.y, 2)));
+ var f = (C.newscrollspeed) ? C.newscrollspeed: d;
+ var g = C.prepareTransition(f);
+ if (C.timerscroll && C.timerscroll.tm) clearInterval(C.timerscroll.tm);
+ if (g > 0) {
+ if (!C.scrollrunning && C.onscrollstart) {
+ var h = {
+ "type": "scrollstart",
+ "current": {
+ "x": b,
+ "y": a
+ },
+ "request": {
+ "x": x,
+ "y": y
+ },
+ "end": {
+ "x": C.newscrollx,
+ "y": C.newscrolly
+ },
+ "speed": g
+ };
+ C.onscrollstart.call(C, h)
+ }
+ if (D.transitionend) {
+ if (!C.scrollendtrapped) {
+ C.scrollendtrapped = true;
+ C.bind(C.doc, D.transitionend, C.onScrollEnd, false)
+ }
+ } else {
+ if (C.scrollendtrapped) clearTimeout(C.scrollendtrapped);
+ C.scrollendtrapped = setTimeout(C.onScrollEnd, g)
+ }
+ var i = a;
+ var j = b;
+ C.timerscroll = {
+ bz: new BezierClass(i, C.newscrolly, g, 0, 0, 0.58, 1),
+ bh: new BezierClass(j, C.newscrollx, g, 0, 0, 0.58, 1)
+ };
+ if (!C.cursorfreezed) C.timerscroll.tm = setInterval(function() {
+ try {
+ if (C.me.is(":visible") === false) return
+ } catch(e) {}
+ C.showCursor(C.getScrollTop(), C.getScrollLeft())
+ },
+ 60)
+ }
+ C.synched("doScroll-set",
+ function() {
+ C.timer = 0;
+ if (C.scrollendtrapped) C.scrollrunning = true;
+ C.setScrollTop(C.newscrolly);
+ C.setScrollLeft(C.newscrollx);
+ if (!C.scrollendtrapped) C.onScrollEnd()
+ })
+ },
+ 50)
+ };
+ this.cancelScroll = function() {
+ try {
+ if (C.me.is(":visible") === false) return
+ } catch(e) {}
+ if (!C.scrollendtrapped) return true;
+ var a = C.getScrollTop();
+ var b = C.getScrollLeft();
+ C.scrollrunning = false;
+ if (!D.transitionend) clearTimeout(D.transitionend);
+ C.scrollendtrapped = false;
+ C._unbind(C.doc, D.transitionend, C.onScrollEnd);
+ C.prepareTransition(0);
+ C.setScrollTop(a);
+ if (C.railh) C.setScrollLeft(b);
+ if (C.timerscroll && C.timerscroll.tm) clearInterval(C.timerscroll.tm);
+ C.timerscroll = false;
+ C.cursorfreezed = false;
+ C.showCursor(a, b);
+ return C
+ };
+ this.onScrollEnd = function() {
+ try {
+ if (C.me.is(":visible") === false) return
+ } catch(e) {};
+ if (C.scrollendtrapped) C._unbind(C.doc, D.transitionend, C.onScrollEnd);
+ C.scrollendtrapped = false;
+ C.prepareTransition(0);
+ if (C.timerscroll && C.timerscroll.tm) clearInterval(C.timerscroll.tm);
+ C.timerscroll = false;
+ var a = C.getScrollTop();
+ var b = C.getScrollLeft();
+ C.setScrollTop(a);
+ if (C.railh) C.setScrollLeft(b);
+ C.noticeCursor(false, a, b);
+ C.cursorfreezed = false;
+ if (a < 0) a = 0;
+ else if (a > C.page.maxh) a = C.page.maxh;
+ if (b < 0) b = 0;
+ else if (b > C.page.maxw) b = C.page.maxw;
+ if ((a != C.newscrolly) || (b != C.newscrollx)) return C.doScrollPos(b, a, C.opt.snapbackspeed);
+ if (C.onscrollend && C.scrollrunning) {
+ var c = {
+ "type": "scrollend",
+ "current": {
+ "x": b,
+ "y": a
+ },
+ "end": {
+ "x": C.newscrollx,
+ "y": C.newscrolly
+ }
+ };
+ C.onscrollend.call(C, c)
+ }
+ C.scrollrunning = false
+ }
+ } else {
+ this.doScrollLeft = function(x) {
+ var y = (C.scrollrunning) ? C.newscrolly: C.getScrollTop();
+ C.doScrollPos(x, y)
+ };
+ this.doScrollTop = function(y) {
+ var x = (C.scrollrunning) ? C.newscrollx: C.getScrollLeft();
+ C.doScrollPos(x, y)
+ };
+ this.doScrollPos = function(x, y) {
+ var y = ((typeof y == "undefined") || (y === false)) ? C.getScrollTop(true) : y;
+ if ((C.timer) && (C.newscrolly == y) && (C.newscrollx == x)) return true;
+ if (C.timer) N(C.timer);
+ C.timer = 0;
+ var g = C.getScrollTop();
+ var h = C.getScrollLeft();
+ if (((C.newscrolly - g) * (y - g) < 0) || ((C.newscrollx - h) * (x - h) < 0)) C.cancelScroll();
+ C.newscrolly = y;
+ C.newscrollx = x;
+ if (!C.bouncescroll || !C.rail.visibility) {
+ if (C.newscrolly < 0) {
+ C.newscrolly = 0
+ } else if (C.newscrolly > C.page.maxh) {
+ C.newscrolly = C.page.maxh
+ }
+ }
+ if (!C.bouncescroll || !C.railh.visibility) {
+ if (C.newscrollx < 0) {
+ C.newscrollx = 0
+ } else if (C.newscrollx > C.page.maxw) {
+ C.newscrollx = C.page.maxw
+ }
+ }
+ C.dst = {};
+ C.dst.x = x - h;
+ C.dst.y = y - g;
+ C.dst.px = h;
+ C.dst.py = g;
+ var i = Math.round(Math.sqrt(Math.pow(C.dst.x, 2) + Math.pow(C.dst.y, 2)));
+ C.dst.ax = C.dst.x / i;
+ C.dst.ay = C.dst.y / i;
+ var j = 0;
+ var k = i;
+ if (C.dst.x == 0) {
+ j = g;
+ k = y;
+ C.dst.ay = 1;
+ C.dst.py = 0
+ } else if (C.dst.y == 0) {
+ j = h;
+ k = x;
+ C.dst.ax = 1;
+ C.dst.px = 0
+ }
+ var l = C.getTransitionSpeed(i);
+ if (l > 0) {
+ C.bzscroll = (C.bzscroll) ? C.bzscroll.update(k, l) : new BezierClass(j, k, l, 0, 1, 0, 1)
+ } else {
+ C.bzscroll = false
+ }
+ if (C.timer) return;
+ if ((g == C.page.maxh && y >= C.page.maxh) || (h == C.page.maxw && x >= C.page.maxw)) C.checkContentSize();
+ var m = 1;
+ function scrolling() {
+ try {
+ if (C.me.is(":visible") === false) return
+ } catch(e) {}
+ if (C.cancelAnimationFrame) return true;
+ C.scrollrunning = true;
+ m = 1 - m;
+ if (m) return (C.timer = M(scrolling) || 1);
+ var a = 0;
+ var b = sy = C.getScrollTop();
+ if (C.dst.ay) {
+ b = (C.bzscroll) ? C.dst.py + (C.bzscroll.getNow() * C.dst.ay) : C.newscrolly;
+ var c = b - sy;
+ if ((c < 0 && b < C.newscrolly) || (c > 0 && b > C.newscrolly)) b = C.newscrolly;
+ C.setScrollTop(b);
+ if (b == C.newscrolly) a = 1
+ } else {
+ a = 1
+ }
+ var d = sx = C.getScrollLeft();
+ if (C.dst.ax) {
+ d = (C.bzscroll) ? C.dst.px + (C.bzscroll.getNow() * C.dst.ax) : C.newscrollx;
+ var c = d - sx;
+ if ((c < 0 && d < C.newscrollx) || (c > 0 && d > C.newscrollx)) d = C.newscrollx;
+ C.setScrollLeft(d);
+ if (d == C.newscrollx) a += 1
+ } else {
+ a += 1
+ }
+ if (a == 2) {
+ C.timer = 0;
+ C.cursorfreezed = false;
+ C.bzscroll = false;
+ C.scrollrunning = false;
+ if (b < 0) b = 0;
+ else if (b > C.page.maxh) b = C.page.maxh;
+ if (d < 0) d = 0;
+ else if (d > C.page.maxw) d = C.page.maxw;
+ if ((d != C.newscrollx) || (b != C.newscrolly)) C.doScrollPos(d, b);
+ else {
+ if (C.onscrollend) {
+ var f = {
+ "type": "scrollend",
+ "current": {
+ "x": sx,
+ "y": sy
+ },
+ "end": {
+ "x": C.newscrollx,
+ "y": C.newscrolly
+ }
+ };
+ C.onscrollend.call(C, f)
+ }
+ }
+ } else {
+ C.timer = M(scrolling) || 1
+ }
+ };
+ C.cancelAnimationFrame = false;
+ C.timer = 1;
+ if (C.onscrollstart && !C.scrollrunning) {
+ var n = {
+ "type": "scrollstart",
+ "current": {
+ "x": h,
+ "y": g
+ },
+ "request": {
+ "x": x,
+ "y": y
+ },
+ "end": {
+ "x": C.newscrollx,
+ "y": C.newscrolly
+ },
+ "speed": l
+ };
+ C.onscrollstart.call(C, n)
+ }
+ scrolling();
+ if ((g == C.page.maxh && y >= g) || (h == C.page.maxw && x >= h)) C.checkContentSize();
+ C.noticeCursor()
+ };
+ this.cancelScroll = function() {
+ if (C.timer) N(C.timer);
+ C.timer = 0;
+ C.bzscroll = false;
+ C.scrollrunning = false;
+ return C
+ }
+ };
+ this.doScrollBy = function(a, b) {
+ try {
+ if (C.me.is(":visible") === false) return
+ } catch(e) {};
+ var c = 0;
+ if (b) {
+ c = Math.floor((C.scroll.y - a) * C.scrollratio.y)
+ } else {
+ var d = (C.timer) ? C.newscrolly: C.getScrollTop(true);
+ c = d - a
+ }
+ if (C.bouncescroll) {
+ var f = Math.round(C.view.h / 2);
+ if (c < -f) c = -f;
+ else if (c > (C.page.maxh + f)) c = (C.page.maxh + f)
+ }
+ C.cursorfreezed = false;
+ py = C.getScrollTop(true);
+ if (c < 0 && py <= 0) return C.noticeCursor();
+ else if (c > C.page.maxh && py >= C.page.maxh) {
+ C.checkContentSize();
+ return C.noticeCursor()
+ }
+ C.doScrollTop(c)
+ };
+ this.doScrollLeftBy = function(a, b) {
+ try {
+ if (C.me.is(":visible") === false) return
+ } catch(e) {};
+ var c = 0;
+ if (b) {
+ c = Math.floor((C.scroll.x - a) * C.scrollratio.x)
+ } else {
+ var d = (C.timer) ? C.newscrollx: C.getScrollLeft(true);
+ c = d - a
+ }
+ if (C.bouncescroll) {
+ var f = Math.round(C.view.w / 2);
+ if (c < -f) c = -f;
+ else if (c > (C.page.maxw + f)) c = (C.page.maxw + f)
+ }
+ C.cursorfreezed = false;
+ px = C.getScrollLeft(true);
+ if (c < 0 && px <= 0) return C.noticeCursor();
+ else if (c > C.page.maxw && px >= C.page.maxw) return C.noticeCursor();
+ C.doScrollLeft(c)
+ };
+ this.doScrollTo = function(a, b) {
+ var c = (b) ? Math.round(a * C.scrollratio.y) : a;
+ if (c < 0) c = 0;
+ else if (c > C.page.maxh) c = C.page.maxh;
+ C.cursorfreezed = false;
+ C.doScrollTop(a)
+ };
+ this.checkContentSize = function() {
+ var a = C.getContentSize();
+ if ((a.h != C.page.h) || (a.w != C.page.w)) C.resize(false, a)
+ };
+ C.onscroll = function(e) {
+ try {
+ if (C.me.is(":visible") === false) return
+ } catch(e) {};
+ if (C.rail.drag) return;
+ if (!C.cursorfreezed) {
+ C.synched('scroll',
+ function() {
+ C.scroll.y = Math.round(C.getScrollTop() * (1 / C.scrollratio.y));
+ if (C.railh) C.scroll.x = Math.round(C.getScrollLeft() * (1 / C.scrollratio.x));
+ C.noticeCursor()
+ })
+ }
+ };
+ C.bind(C.docscroll, "scroll", C.onscroll);
+ this.doZoomIn = function(e) {
+ if (C.zoomactive) return;
+ C.zoomactive = true;
+ C.zoomrestore = {
+ style: {}
+ };
+ var b = ['position', 'top', 'left', 'zIndex', 'backgroundColor', 'marginTop', 'marginBottom', 'marginLeft', 'marginRight'];
+ var c = C.win[0].style;
+ for (var a in b) {
+ var d = b[a];
+ C.zoomrestore.style[d] = (typeof c[d] != 'undefined') ? c[d] : ''
+ }
+ C.zoomrestore.style.width = C.win.css('width');
+ C.zoomrestore.style.height = C.win.css('height');
+ C.zoomrestore.padding = {
+ w: C.win.outerWidth() - C.win.width(),
+ h: C.win.outerHeight() - C.win.height()
+ };
+ if (D.isios4) {
+ C.zoomrestore.scrollTop = $(window).scrollTop();
+ $(window).scrollTop(0)
+ }
+ C.win.css({
+ "position": (D.isios4) ? "absolute": "fixed",
+ "top": 0,
+ "left": 0,
+ //"z-index": C.opt.zindex + 100,
+ "margin": "0px"
+ });
+ var f = C.win.css("backgroundColor");
+ if (f == "" || /transparent|rgba\(0, 0, 0, 0\)|rgba\(0,0,0,0\)/.test(f)) C.win.css("backgroundColor", "#fff");
+ C.rail.css({
+ //"z-index": C.opt.zindex + 110
+ });
+ C.zoom.css({
+ //"z-index": C.opt.zindex + 112
+ });
+ C.zoom.css('backgroundPosition', '0px -18px');
+ C.resizeZoom();
+ if (C.onzoomin) C.onzoomin.call(C);
+ return C.cancelEvent(e)
+ };
+ this.doZoomOut = function(e) {
+ if (!C.zoomactive) return;
+ C.zoomactive = false;
+ C.win.css("margin", "");
+ C.win.css(C.zoomrestore.style);
+ if (D.isios4) {
+ $(window).scrollTop(C.zoomrestore.scrollTop)
+ }
+ C.rail.css({
+ //"z-index": (C.ispage) ? C.opt.zindex: C.opt.zindex + 2
+ });
+ C.zoom.css({
+ //"z-index": C.opt.zindex
+ });
+ C.zoomrestore = false;
+ C.zoom.css('backgroundPosition', '0px 0px');
+ C.onResize();
+ if (C.onzoomout) C.onzoomout.call(C);
+ return C.cancelEvent(e)
+ };
+ this.doZoom = function(e) {
+ return (C.zoomactive) ? C.doZoomOut(e) : C.doZoomIn(e)
+ };
+ this.resizeZoom = function() {
+ if (!C.zoomactive) return;
+ var a = C.getScrollTop();
+ C.win.css({
+ width: $(window).width() - C.zoomrestore.padding.w + "px",
+ height: $(window).height() - C.zoomrestore.padding.h + "px"
+ });
+ C.onResize();
+ console.log(a);
+ C.setScrollTop(Math.min(C.page.maxh, a))
+ };
+ this.init();
+ $.nicescroll.push(this)
+ };
+ var R = function(r) {
+ var s = this;
+ this.nc = r;
+ this.lastx = 0;
+ this.lasty = 0;
+ this.speedx = 0;
+ this.speedy = 0;
+ this.lasttime = 0;
+ this.steptime = 0;
+ this.snapx = false;
+ this.snapy = false;
+ this.demulx = 0;
+ this.demuly = 0;
+ this.lastscrollx = -1;
+ this.lastscrolly = -1;
+ this.chkx = 0;
+ this.chky = 0;
+ this.timer = 0;
+ this.time = function() {
+ return + new Date()
+ };
+ this.reset = function(a, b) {
+ s.stop();
+ var c = s.time();
+ s.steptime = 0;
+ s.lasttime = c;
+ s.speedx = 0;
+ s.speedy = 0;
+ s.lastx = a;
+ s.lasty = b;
+ s.lastscrollx = -1;
+ s.lastscrolly = -1
+ };
+ this.update = function(a, b) {
+ var c = s.time();
+ s.steptime = c - s.lasttime;
+ s.lasttime = c;
+ var d = b - s.lasty;
+ var e = a - s.lastx;
+ var f = s.nc.getScrollTop();
+ var g = s.nc.getScrollLeft();
+ var h = f + d;
+ var i = g + e;
+ s.snapx = (i < 0) || (i > s.nc.page.maxw);
+ s.snapy = (h < 0) || (h > s.nc.page.maxh);
+ s.speedx = e;
+ s.speedy = d;
+ s.lastx = a;
+ s.lasty = b
+ };
+ this.stop = function() {
+ s.nc.unsynched("domomentum2d");
+ if (s.timer) clearTimeout(s.timer);
+ s.timer = 0;
+ s.lastscrollx = -1;
+ s.lastscrolly = -1
+ };
+ this.doSnapy = function(a, b) {
+ var c = false;
+ if (b < 0) {
+ b = 0;
+ c = true
+ } else if (b > s.nc.page.maxh) {
+ b = s.nc.page.maxh;
+ c = true
+ }
+ if (a < 0) {
+ a = 0;
+ c = true
+ } else if (a > s.nc.page.maxw) {
+ a = s.nc.page.maxw;
+ c = true
+ }
+ if (c) s.nc.doScrollPos(a, b, s.nc.opt.snapbackspeed)
+ };
+ this.doMomentum = function(d) {
+ var t = s.time();
+ var l = (d) ? t + d: s.lasttime;
+ var e = s.nc.getScrollLeft();
+ var f = s.nc.getScrollTop();
+ var g = s.nc.page.maxh;
+ var h = s.nc.page.maxw;
+ s.speedx = (h > 0) ? Math.min(60, s.speedx) : 0;
+ s.speedy = (g > 0) ? Math.min(60, s.speedy) : 0;
+ var i = l && (t - l) <= 50;
+ if ((f < 0) || (f > g) || (e < 0) || (e > h)) i = false;
+ var j = (s.speedy && i) ? s.speedy: false;
+ var k = (s.speedx && i) ? s.speedx: false;
+ if (j || k) {
+ var m = Math.max(16, s.steptime);
+ if (m > 50) {
+ var n = m / 50;
+ s.speedx *= n;
+ s.speedy *= n;
+ m = 50
+ }
+ s.demulxy = 0;
+ s.lastscrollx = s.nc.getScrollLeft();
+ s.chkx = s.lastscrollx;
+ s.lastscrolly = s.nc.getScrollTop();
+ s.chky = s.lastscrolly;
+ var o = s.lastscrollx;
+ var p = s.lastscrolly;
+ var q = function() {
+ var c = ((s.time() - t) > 600) ? 0.04 : 0.02;
+ if (s.speedx) {
+ o = Math.floor(s.lastscrollx - (s.speedx * (1 - s.demulxy)));
+ s.lastscrollx = o;
+ if ((o < 0) || (o > h)) c = 0.10
+ }
+ if (s.speedy) {
+ p = Math.floor(s.lastscrolly - (s.speedy * (1 - s.demulxy)));
+ s.lastscrolly = p;
+ if ((p < 0) || (p > g)) c = 0.10
+ }
+ s.demulxy = Math.min(1, s.demulxy + c);
+ s.nc.synched("domomentum2d",
+ function() {
+ if (s.speedx) {
+ var a = s.nc.getScrollLeft();
+ if (a != s.chkx) s.stop();
+ s.chkx = o;
+ s.nc.setScrollLeft(o)
+ }
+ if (s.speedy) {
+ var b = s.nc.getScrollTop();
+ if (b != s.chky) s.stop();
+ s.chky = p;
+ s.nc.setScrollTop(p)
+ }
+ if (!s.timer) {
+ s.nc.hideCursor();
+ s.doSnapy(o, p)
+ }
+ });
+ if (s.demulxy < 1) {
+ s.timer = setTimeout(q, m)
+ } else {
+ s.stop();
+ s.nc.hideCursor();
+ s.doSnapy(o, p)
+ }
+ };
+ q()
+ } else {
+ s.doSnapy(s.nc.getScrollLeft(), s.nc.getScrollTop())
+ }
+ }
+ };
+ var S = F.fn.scrollTop;
+ $.cssHooks["pageYOffset"] = {
+ get: function(a, b, c) {
+ var d = $.data(a, '__nicescroll') || false;
+ return (d && d.ishwscroll) ? d.getScrollTop() : S.call(a)
+ },
+ set: function(a, b) {
+ var c = $.data(a, '__nicescroll') || false; (c && c.ishwscroll) ? c.setScrollTop(parseInt(b)) : S.call(a, b);
+ return this
+ }
+ };
+ F.fn.scrollTop = function(b) {
+ if (typeof b == "undefined") {
+ var c = (this[0]) ? $.data(this[0], '__nicescroll') || false: false;
+ return (c && c.ishwscroll) ? c.getScrollTop() : S.call(this)
+ } else {
+ return this.each(function() {
+ var a = $.data(this, '__nicescroll') || false; (a && a.ishwscroll) ? a.setScrollTop(parseInt(b)) : S.call($(this), b)
+ })
+ }
+ };
+ var T = F.fn.scrollLeft;
+ $.cssHooks.pageXOffset = {
+ get: function(a, b, c) {
+ var d = $.data(a, '__nicescroll') || false;
+ return (d && d.ishwscroll) ? d.getScrollLeft() : T.call(a)
+ },
+ set: function(a, b) {
+ var c = $.data(a, '__nicescroll') || false; (c && c.ishwscroll) ? c.setScrollLeft(parseInt(b)) : T.call(a, b);
+ return this
+ }
+ };
+ F.fn.scrollLeft = function(b) {
+ if (typeof b == "undefined") {
+ var c = (this[0]) ? $.data(this[0], '__nicescroll') || false: false;
+ return (c && c.ishwscroll) ? c.getScrollLeft() : T.call(this)
+ } else {
+ return this.each(function() {
+ var a = $.data(this, '__nicescroll') || false; (a && a.ishwscroll) ? a.setScrollLeft(parseInt(b)) : T.call($(this), b)
+ })
+ }
+ };
+ var U = function(c) {
+ var d = this;
+ this.length = 0;
+ this.name = "nicescrollarray";
+ this.each = function(b) {
+ for (var a = 0; a < d.length; a++) b.call(d[a]);
+ return d
+ };
+ this.push = function(a) {
+ d[d.length] = a;
+ d.length++
+ };
+ this.eq = function(a) {
+ return d[a]
+ };
+ if (c) {
+ for (a = 0; a < c.length; a++) {
+ var e = $.data(c[a], '__nicescroll') || false;
+ if (e) {
+ this[this.length] = e;
+ this.length++
+ }
+ }
+ }
+ return this
+ };
+ function mplex(b, c, d) {
+ for (var a = 0; a < c.length; a++) d(b, c[a])
+ };
+ mplex(U.prototype, ['show', 'hide', 'toggle', 'onResize', 'resize', 'remove', 'stop', 'doScrollPos'],
+ function(e, n) {
+ e[n] = function() {
+ var a = arguments;
+ return this.each(function() {
+ this[n].apply(this, a)
+ })
+ }
+ });
+ F.fn.getNiceScroll = function(a) {
+ if (typeof a == "undefined") {
+ return new U(this)
+ } else {
+ var b = $.data(this[a], '__nicescroll') || false;
+ return b
+ }
+ };
+ F.extend(F.expr[':'], {
+ nicescroll: function(a) {
+ return ($.data(a, '__nicescroll')) ? true: false
+ }
+ });
+ $.fn.niceScroll = function(b, c) {
+ if (typeof c == "undefined") {
+ if ((typeof b == "object") && !("jquery" in b)) {
+ c = b;
+ b = false
+ }
+ }
+ var d = new U();
+ if (typeof c == "undefined") c = {};
+ if (b || false) {
+ c.doc = $(b);
+ c.win = $(this)
+ }
+ var e = !("doc" in c);
+ if (!e && !("win" in c)) c.win = $(this);
+ this.each(function() {
+ var a = $(this).data('__nicescroll') || false;
+ if (!a) {
+ c.doc = (e) ? $(this) : c.doc;
+ a = new Q(c, $(this));
+ $(this).data('__nicescroll', a)
+ }
+ d.push(a)
+ });
+ return (d.length == 1) ? d[0] : d
+ };
+ window.NiceScroll = {
+ getjQuery: function() {
+ return F
+ }
+ };
+ if (!$.nicescroll) {
+ $.nicescroll = new U()
+ }
+})(jQuery); (function($) {
+ $.fn.perfectScrollbar = function(a) {
+ if (a === "update" || a === "resize") {
+ $(this).getNiceScroll().resize();
+ return
+ } else if (a === "getScrollObj") {
+ return $(this).getNiceScroll()
+ } else if (a === "getScrollTop") {
+ var b = $(this).getNiceScroll().eq(0);
+ return b.getScrollTop()
+ } else if (a === "hide") {
+ $(this).getNiceScroll().hide()
+ } else if (a === "show") {
+ $(this).getNiceScroll().show()
+ } else if (a === "toggle") {
+ $(this).getNiceScroll().toggle()
+ } else if (a === "remove" || a === "destroy") {
+ $(this).getNiceScroll().remove()
+ } else if (a === "stop") {
+ $(this).getNiceScroll().stop()
+ } else if (a === "doScrollPos") {
+ $(this).getNiceScroll().doScrollPos()
+ }
+ a = jQuery.extend({
+ cursorwidth: 5,
+ cursorborder: "none",
+ cursorcolor: "#999",
+ hidecursordelay: 0,
+ //zindex: 10001,
+ horizrailenabled: false
+ },
+ a);
+ return $(this).niceScroll(a)
+ }
+})(jQuery);
\ No newline at end of file
diff --git a/app/culture/view/szwjs/public/js/widget/jquery.js b/app/culture/view/szwjs/public/js/widget/jquery.js
new file mode 100644
index 0000000..8328243
--- /dev/null
+++ b/app/culture/view/szwjs/public/js/widget/jquery.js
@@ -0,0 +1,3 @@
+!function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=c.slice,e=c.concat,f=c.push,g=c.indexOf,h={},i=h.toString,j=h.hasOwnProperty,k={},l="1.11.1",m=function(a,b){return new m.fn.init(a,b)},n=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,o=/^-ms-/,p=/-([\da-z])/gi,q=function(a,b){return b.toUpperCase()};m.fn=m.prototype={jquery:l,constructor:m,selector:"",length:0,toArray:function(){return d.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:d.call(this)},pushStack:function(a){var b=m.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a,b){return m.each(this,a,b)},map:function(a){return this.pushStack(m.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(d.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(0>a?b:0);return this.pushStack(c>=0&&b>c?[this[c]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:f,sort:c.sort,splice:c.splice},m.extend=m.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||m.isFunction(g)||(g={}),h===i&&(g=this,h--);i>h;h++)if(null!=(e=arguments[h]))for(d in e)a=g[d],c=e[d],g!==c&&(j&&c&&(m.isPlainObject(c)||(b=m.isArray(c)))?(b?(b=!1,f=a&&m.isArray(a)?a:[]):f=a&&m.isPlainObject(a)?a:{},g[d]=m.extend(j,f,c)):void 0!==c&&(g[d]=c));return g},m.extend({expando:"jQuery"+(l+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===m.type(a)},isArray:Array.isArray||function(a){return"array"===m.type(a)},isWindow:function(a){return null!=a&&a==a.window},isNumeric:function(a){return!m.isArray(a)&&a-parseFloat(a)>=0},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},isPlainObject:function(a){var b;if(!a||"object"!==m.type(a)||a.nodeType||m.isWindow(a))return!1;try{if(a.constructor&&!j.call(a,"constructor")&&!j.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}if(k.ownLast)for(b in a)return j.call(a,b);for(b in a);return void 0===b||j.call(a,b)},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?h[i.call(a)]||"object":typeof a},globalEval:function(b){b&&m.trim(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(o,"ms-").replace(p,q)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b,c){var d,e=0,f=a.length,g=r(a);if(c){if(g){for(;f>e;e++)if(d=b.apply(a[e],c),d===!1)break}else for(e in a)if(d=b.apply(a[e],c),d===!1)break}else if(g){for(;f>e;e++)if(d=b.call(a[e],e,a[e]),d===!1)break}else for(e in a)if(d=b.call(a[e],e,a[e]),d===!1)break;return a},trim:function(a){return null==a?"":(a+"").replace(n,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(r(Object(a))?m.merge(c,"string"==typeof a?[a]:a):f.call(c,a)),c},inArray:function(a,b,c){var d;if(b){if(g)return g.call(b,a,c);for(d=b.length,c=c?0>c?Math.max(0,d+c):c:0;d>c;c++)if(c in b&&b[c]===a)return c}return-1},merge:function(a,b){var c=+b.length,d=0,e=a.length;while(c>d)a[e++]=b[d++];if(c!==c)while(void 0!==b[d])a[e++]=b[d++];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;g>f;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var d,f=0,g=a.length,h=r(a),i=[];if(h)for(;g>f;f++)d=b(a[f],f,c),null!=d&&i.push(d);else for(f in a)d=b(a[f],f,c),null!=d&&i.push(d);return e.apply([],i)},guid:1,proxy:function(a,b){var c,e,f;return"string"==typeof b&&(f=a[b],b=a,a=f),m.isFunction(a)?(c=d.call(arguments,2),e=function(){return a.apply(b||this,c.concat(d.call(arguments)))},e.guid=a.guid=a.guid||m.guid++,e):void 0},now:function(){return+new Date},support:k}),m.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(a,b){h["[object "+b+"]"]=b.toLowerCase()});function r(a){var b=a.length,c=m.type(a);return"function"===c||m.isWindow(a)?!1:1===a.nodeType&&b?!0:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}var s=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u="sizzle"+-new Date,v=a.document,w=0,x=0,y=gb(),z=gb(),A=gb(),B=function(a,b){return a===b&&(l=!0),0},C="undefined",D=1<<31,E={}.hasOwnProperty,F=[],G=F.pop,H=F.push,I=F.push,J=F.slice,K=F.indexOf||function(a){for(var b=0,c=this.length;c>b;b++)if(this[b]===a)return b;return-1},L="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",M="[\\x20\\t\\r\\n\\f]",N="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",O=N.replace("w","w#"),P="\\["+M+"*("+N+")(?:"+M+"*([*^$|!~]?=)"+M+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+O+"))|)"+M+"*\\]",Q=":("+N+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+P+")*)|.*)\\)|)",R=new RegExp("^"+M+"+|((?:^|[^\\\\])(?:\\\\.)*)"+M+"+$","g"),S=new RegExp("^"+M+"*,"+M+"*"),T=new RegExp("^"+M+"*([>+~]|"+M+")"+M+"*"),U=new RegExp("="+M+"*([^\\]'\"]*?)"+M+"*\\]","g"),V=new RegExp(Q),W=new RegExp("^"+O+"$"),X={ID:new RegExp("^#("+N+")"),CLASS:new RegExp("^\\.("+N+")"),TAG:new RegExp("^("+N.replace("w","w*")+")"),ATTR:new RegExp("^"+P),PSEUDO:new RegExp("^"+Q),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+L+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Y=/^(?:input|select|textarea|button)$/i,Z=/^h\d$/i,$=/^[^{]+\{\s*\[native \w/,_=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ab=/[+~]/,bb=/'|\\/g,cb=new RegExp("\\\\([\\da-f]{1,6}"+M+"?|("+M+")|.)","ig"),db=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:0>d?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)};try{I.apply(F=J.call(v.childNodes),v.childNodes),F[v.childNodes.length].nodeType}catch(eb){I={apply:F.length?function(a,b){H.apply(a,J.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function fb(a,b,d,e){var f,h,j,k,l,o,r,s,w,x;if((b?b.ownerDocument||b:v)!==n&&m(b),b=b||n,d=d||[],!a||"string"!=typeof a)return d;if(1!==(k=b.nodeType)&&9!==k)return[];if(p&&!e){if(f=_.exec(a))if(j=f[1]){if(9===k){if(h=b.getElementById(j),!h||!h.parentNode)return d;if(h.id===j)return d.push(h),d}else if(b.ownerDocument&&(h=b.ownerDocument.getElementById(j))&&t(b,h)&&h.id===j)return d.push(h),d}else{if(f[2])return I.apply(d,b.getElementsByTagName(a)),d;if((j=f[3])&&c.getElementsByClassName&&b.getElementsByClassName)return I.apply(d,b.getElementsByClassName(j)),d}if(c.qsa&&(!q||!q.test(a))){if(s=r=u,w=b,x=9===k&&a,1===k&&"object"!==b.nodeName.toLowerCase()){o=g(a),(r=b.getAttribute("id"))?s=r.replace(bb,"\\$&"):b.setAttribute("id",s),s="[id='"+s+"'] ",l=o.length;while(l--)o[l]=s+qb(o[l]);w=ab.test(a)&&ob(b.parentNode)||b,x=o.join(",")}if(x)try{return I.apply(d,w.querySelectorAll(x)),d}catch(y){}finally{r||b.removeAttribute("id")}}}return i(a.replace(R,"$1"),b,d,e)}function gb(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function hb(a){return a[u]=!0,a}function ib(a){var b=n.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function jb(a,b){var c=a.split("|"),e=a.length;while(e--)d.attrHandle[c[e]]=b}function kb(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||D)-(~a.sourceIndex||D);if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function lb(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function mb(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function nb(a){return hb(function(b){return b=+b,hb(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function ob(a){return a&&typeof a.getElementsByTagName!==C&&a}c=fb.support={},f=fb.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},m=fb.setDocument=function(a){var b,e=a?a.ownerDocument||a:v,g=e.defaultView;return e!==n&&9===e.nodeType&&e.documentElement?(n=e,o=e.documentElement,p=!f(e),g&&g!==g.top&&(g.addEventListener?g.addEventListener("unload",function(){m()},!1):g.attachEvent&&g.attachEvent("onunload",function(){m()})),c.attributes=ib(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=ib(function(a){return a.appendChild(e.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=$.test(e.getElementsByClassName)&&ib(function(a){return a.innerHTML="
",a.firstChild.className="i",2===a.getElementsByClassName("i").length}),c.getById=ib(function(a){return o.appendChild(a).id=u,!e.getElementsByName||!e.getElementsByName(u).length}),c.getById?(d.find.ID=function(a,b){if(typeof b.getElementById!==C&&p){var c=b.getElementById(a);return c&&c.parentNode?[c]:[]}},d.filter.ID=function(a){var b=a.replace(cb,db);return function(a){return a.getAttribute("id")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(cb,db);return function(a){var c=typeof a.getAttributeNode!==C&&a.getAttributeNode("id");return c&&c.value===b}}),d.find.TAG=c.getElementsByTagName?function(a,b){return typeof b.getElementsByTagName!==C?b.getElementsByTagName(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){return typeof b.getElementsByClassName!==C&&p?b.getElementsByClassName(a):void 0},r=[],q=[],(c.qsa=$.test(e.querySelectorAll))&&(ib(function(a){a.innerHTML=" ",a.querySelectorAll("[msallowclip^='']").length&&q.push("[*^$]="+M+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||q.push("\\["+M+"*(?:value|"+L+")"),a.querySelectorAll(":checked").length||q.push(":checked")}),ib(function(a){var b=e.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&q.push("name"+M+"*[*^$|!~]?="),a.querySelectorAll(":enabled").length||q.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),q.push(",.*:")})),(c.matchesSelector=$.test(s=o.matches||o.webkitMatchesSelector||o.mozMatchesSelector||o.oMatchesSelector||o.msMatchesSelector))&&ib(function(a){c.disconnectedMatch=s.call(a,"div"),s.call(a,"[s!='']:x"),r.push("!=",Q)}),q=q.length&&new RegExp(q.join("|")),r=r.length&&new RegExp(r.join("|")),b=$.test(o.compareDocumentPosition),t=b||$.test(o.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},B=b?function(a,b){if(a===b)return l=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===e||a.ownerDocument===v&&t(v,a)?-1:b===e||b.ownerDocument===v&&t(v,b)?1:k?K.call(k,a)-K.call(k,b):0:4&d?-1:1)}:function(a,b){if(a===b)return l=!0,0;var c,d=0,f=a.parentNode,g=b.parentNode,h=[a],i=[b];if(!f||!g)return a===e?-1:b===e?1:f?-1:g?1:k?K.call(k,a)-K.call(k,b):0;if(f===g)return kb(a,b);c=a;while(c=c.parentNode)h.unshift(c);c=b;while(c=c.parentNode)i.unshift(c);while(h[d]===i[d])d++;return d?kb(h[d],i[d]):h[d]===v?-1:i[d]===v?1:0},e):n},fb.matches=function(a,b){return fb(a,null,null,b)},fb.matchesSelector=function(a,b){if((a.ownerDocument||a)!==n&&m(a),b=b.replace(U,"='$1']"),!(!c.matchesSelector||!p||r&&r.test(b)||q&&q.test(b)))try{var d=s.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return fb(b,n,null,[a]).length>0},fb.contains=function(a,b){return(a.ownerDocument||a)!==n&&m(a),t(a,b)},fb.attr=function(a,b){(a.ownerDocument||a)!==n&&m(a);var e=d.attrHandle[b.toLowerCase()],f=e&&E.call(d.attrHandle,b.toLowerCase())?e(a,b,!p):void 0;return void 0!==f?f:c.attributes||!p?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},fb.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},fb.uniqueSort=function(a){var b,d=[],e=0,f=0;if(l=!c.detectDuplicates,k=!c.sortStable&&a.slice(0),a.sort(B),l){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return k=null,a},e=fb.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=fb.selectors={cacheLength:50,createPseudo:hb,match:X,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(cb,db),a[3]=(a[3]||a[4]||a[5]||"").replace(cb,db),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||fb.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&fb.error(a[0]),a},PSEUDO:function(a){var b,c=!a[6]&&a[2];return X.CHILD.test(a[0])?null:(a[3]?a[2]=a[4]||a[5]||"":c&&V.test(c)&&(b=g(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(cb,db).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=y[a+" "];return b||(b=new RegExp("(^|"+M+")"+a+"("+M+"|$)"))&&y(a,function(a){return b.test("string"==typeof a.className&&a.className||typeof a.getAttribute!==C&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=fb.attr(d,a);return null==e?"!="===b:b?(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e+" ").indexOf(c)>-1:"|="===b?e===c||e.slice(0,c.length+1)===c+"-":!1):!0}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h;if(q){if(f){while(p){l=b;while(l=l[p])if(h?l.nodeName.toLowerCase()===r:1===l.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){k=q[u]||(q[u]={}),j=k[a]||[],n=j[0]===w&&j[1],m=j[0]===w&&j[2],l=n&&q.childNodes[n];while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if(1===l.nodeType&&++m&&l===b){k[a]=[w,n,m];break}}else if(s&&(j=(b[u]||(b[u]={}))[a])&&j[0]===w)m=j[1];else while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if((h?l.nodeName.toLowerCase()===r:1===l.nodeType)&&++m&&(s&&((l[u]||(l[u]={}))[a]=[w,m]),l===b))break;return m-=e,m===d||m%d===0&&m/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||fb.error("unsupported pseudo: "+a);return e[u]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?hb(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=K.call(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:hb(function(a){var b=[],c=[],d=h(a.replace(R,"$1"));return d[u]?hb(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),!c.pop()}}),has:hb(function(a){return function(b){return fb(a,b).length>0}}),contains:hb(function(a){return function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:hb(function(a){return W.test(a||"")||fb.error("unsupported lang: "+a),a=a.replace(cb,db).toLowerCase(),function(b){var c;do if(c=p?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===o},focus:function(a){return a===n.activeElement&&(!n.hasFocus||n.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return Z.test(a.nodeName)},input:function(a){return Y.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:nb(function(){return[0]}),last:nb(function(a,b){return[b-1]}),eq:nb(function(a,b,c){return[0>c?c+b:c]}),even:nb(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:nb(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:nb(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:nb(function(a,b,c){for(var d=0>c?c+b:c;++db;b++)d+=a[b].value;return d}function rb(a,b,c){var d=b.dir,e=c&&"parentNode"===d,f=x++;return b.first?function(b,c,f){while(b=b[d])if(1===b.nodeType||e)return a(b,c,f)}:function(b,c,g){var h,i,j=[w,f];if(g){while(b=b[d])if((1===b.nodeType||e)&&a(b,c,g))return!0}else while(b=b[d])if(1===b.nodeType||e){if(i=b[u]||(b[u]={}),(h=i[d])&&h[0]===w&&h[1]===f)return j[2]=h[2];if(i[d]=j,j[2]=a(b,c,g))return!0}}}function sb(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function tb(a,b,c){for(var d=0,e=b.length;e>d;d++)fb(a,b[d],c);return c}function ub(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;i>h;h++)(f=a[h])&&(!c||c(f,d,e))&&(g.push(f),j&&b.push(h));return g}function vb(a,b,c,d,e,f){return d&&!d[u]&&(d=vb(d)),e&&!e[u]&&(e=vb(e,f)),hb(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||tb(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:ub(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=ub(r,n),d(j,[],h,i),k=j.length;while(k--)(l=j[k])&&(r[n[k]]=!(q[n[k]]=l))}if(f){if(e||a){if(e){j=[],k=r.length;while(k--)(l=r[k])&&j.push(q[k]=l);e(null,r=[],j,i)}k=r.length;while(k--)(l=r[k])&&(j=e?K.call(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=ub(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):I.apply(g,r)})}function wb(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],h=g||d.relative[" "],i=g?1:0,k=rb(function(a){return a===b},h,!0),l=rb(function(a){return K.call(b,a)>-1},h,!0),m=[function(a,c,d){return!g&&(d||c!==j)||((b=c).nodeType?k(a,c,d):l(a,c,d))}];f>i;i++)if(c=d.relative[a[i].type])m=[rb(sb(m),c)];else{if(c=d.filter[a[i].type].apply(null,a[i].matches),c[u]){for(e=++i;f>e;e++)if(d.relative[a[e].type])break;return vb(i>1&&sb(m),i>1&&qb(a.slice(0,i-1).concat({value:" "===a[i-2].type?"*":""})).replace(R,"$1"),c,e>i&&wb(a.slice(i,e)),f>e&&wb(a=a.slice(e)),f>e&&qb(a))}m.push(c)}return sb(m)}function xb(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,h,i,k){var l,m,o,p=0,q="0",r=f&&[],s=[],t=j,u=f||e&&d.find.TAG("*",k),v=w+=null==t?1:Math.random()||.1,x=u.length;for(k&&(j=g!==n&&g);q!==x&&null!=(l=u[q]);q++){if(e&&l){m=0;while(o=a[m++])if(o(l,g,h)){i.push(l);break}k&&(w=v)}c&&((l=!o&&l)&&p--,f&&r.push(l))}if(p+=q,c&&q!==p){m=0;while(o=b[m++])o(r,s,g,h);if(f){if(p>0)while(q--)r[q]||s[q]||(s[q]=G.call(i));s=ub(s)}I.apply(i,s),k&&!f&&s.length>0&&p+b.length>1&&fb.uniqueSort(i)}return k&&(w=v,j=t),r};return c?hb(f):f}return h=fb.compile=function(a,b){var c,d=[],e=[],f=A[a+" "];if(!f){b||(b=g(a)),c=b.length;while(c--)f=wb(b[c]),f[u]?d.push(f):e.push(f);f=A(a,xb(e,d)),f.selector=a}return f},i=fb.select=function(a,b,e,f){var i,j,k,l,m,n="function"==typeof a&&a,o=!f&&g(a=n.selector||a);if(e=e||[],1===o.length){if(j=o[0]=o[0].slice(0),j.length>2&&"ID"===(k=j[0]).type&&c.getById&&9===b.nodeType&&p&&d.relative[j[1].type]){if(b=(d.find.ID(k.matches[0].replace(cb,db),b)||[])[0],!b)return e;n&&(b=b.parentNode),a=a.slice(j.shift().value.length)}i=X.needsContext.test(a)?0:j.length;while(i--){if(k=j[i],d.relative[l=k.type])break;if((m=d.find[l])&&(f=m(k.matches[0].replace(cb,db),ab.test(j[0].type)&&ob(b.parentNode)||b))){if(j.splice(i,1),a=f.length&&qb(j),!a)return I.apply(e,f),e;break}}}return(n||h(a,o))(f,b,!p,e,ab.test(a)&&ob(b.parentNode)||b),e},c.sortStable=u.split("").sort(B).join("")===u,c.detectDuplicates=!!l,m(),c.sortDetached=ib(function(a){return 1&a.compareDocumentPosition(n.createElement("div"))}),ib(function(a){return a.innerHTML=" ","#"===a.firstChild.getAttribute("href")})||jb("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&ib(function(a){return a.innerHTML=" ",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||jb("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),ib(function(a){return null==a.getAttribute("disabled")})||jb(L,function(a,b,c){var d;return c?void 0:a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),fb}(a);m.find=s,m.expr=s.selectors,m.expr[":"]=m.expr.pseudos,m.unique=s.uniqueSort,m.text=s.getText,m.isXMLDoc=s.isXML,m.contains=s.contains;var t=m.expr.match.needsContext,u=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,v=/^.[^:#\[\.,]*$/;function w(a,b,c){if(m.isFunction(b))return m.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return m.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(v.test(b))return m.filter(b,a,c);b=m.filter(b,a)}return m.grep(a,function(a){return m.inArray(a,b)>=0!==c})}m.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?m.find.matchesSelector(d,a)?[d]:[]:m.find.matches(a,m.grep(b,function(a){return 1===a.nodeType}))},m.fn.extend({find:function(a){var b,c=[],d=this,e=d.length;if("string"!=typeof a)return this.pushStack(m(a).filter(function(){for(b=0;e>b;b++)if(m.contains(d[b],this))return!0}));for(b=0;e>b;b++)m.find(a,d[b],c);return c=this.pushStack(e>1?m.unique(c):c),c.selector=this.selector?this.selector+" "+a:a,c},filter:function(a){return this.pushStack(w(this,a||[],!1))},not:function(a){return this.pushStack(w(this,a||[],!0))},is:function(a){return!!w(this,"string"==typeof a&&t.test(a)?m(a):a||[],!1).length}});var x,y=a.document,z=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,A=m.fn.init=function(a,b){var c,d;if(!a)return this;if("string"==typeof a){if(c="<"===a.charAt(0)&&">"===a.charAt(a.length-1)&&a.length>=3?[null,a,null]:z.exec(a),!c||!c[1]&&b)return!b||b.jquery?(b||x).find(a):this.constructor(b).find(a);if(c[1]){if(b=b instanceof m?b[0]:b,m.merge(this,m.parseHTML(c[1],b&&b.nodeType?b.ownerDocument||b:y,!0)),u.test(c[1])&&m.isPlainObject(b))for(c in b)m.isFunction(this[c])?this[c](b[c]):this.attr(c,b[c]);return this}if(d=y.getElementById(c[2]),d&&d.parentNode){if(d.id!==c[2])return x.find(a);this.length=1,this[0]=d}return this.context=y,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):m.isFunction(a)?"undefined"!=typeof x.ready?x.ready(a):a(m):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),m.makeArray(a,this))};A.prototype=m.fn,x=m(y);var B=/^(?:parents|prev(?:Until|All))/,C={children:!0,contents:!0,next:!0,prev:!0};m.extend({dir:function(a,b,c){var d=[],e=a[b];while(e&&9!==e.nodeType&&(void 0===c||1!==e.nodeType||!m(e).is(c)))1===e.nodeType&&d.push(e),e=e[b];return d},sibling:function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c}}),m.fn.extend({has:function(a){var b,c=m(a,this),d=c.length;return this.filter(function(){for(b=0;d>b;b++)if(m.contains(this,c[b]))return!0})},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=t.test(a)||"string"!=typeof a?m(a,b||this.context):0;e>d;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&m.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?m.unique(f):f)},index:function(a){return a?"string"==typeof a?m.inArray(this[0],m(a)):m.inArray(a.jquery?a[0]:a,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(m.unique(m.merge(this.get(),m(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function D(a,b){do a=a[b];while(a&&1!==a.nodeType);return a}m.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return m.dir(a,"parentNode")},parentsUntil:function(a,b,c){return m.dir(a,"parentNode",c)},next:function(a){return D(a,"nextSibling")},prev:function(a){return D(a,"previousSibling")},nextAll:function(a){return m.dir(a,"nextSibling")},prevAll:function(a){return m.dir(a,"previousSibling")},nextUntil:function(a,b,c){return m.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return m.dir(a,"previousSibling",c)},siblings:function(a){return m.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return m.sibling(a.firstChild)},contents:function(a){return m.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:m.merge([],a.childNodes)}},function(a,b){m.fn[a]=function(c,d){var e=m.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=m.filter(d,e)),this.length>1&&(C[a]||(e=m.unique(e)),B.test(a)&&(e=e.reverse())),this.pushStack(e)}});var E=/\S+/g,F={};function G(a){var b=F[a]={};return m.each(a.match(E)||[],function(a,c){b[c]=!0}),b}m.Callbacks=function(a){a="string"==typeof a?F[a]||G(a):m.extend({},a);var b,c,d,e,f,g,h=[],i=!a.once&&[],j=function(l){for(c=a.memory&&l,d=!0,f=g||0,g=0,e=h.length,b=!0;h&&e>f;f++)if(h[f].apply(l[0],l[1])===!1&&a.stopOnFalse){c=!1;break}b=!1,h&&(i?i.length&&j(i.shift()):c?h=[]:k.disable())},k={add:function(){if(h){var d=h.length;!function f(b){m.each(b,function(b,c){var d=m.type(c);"function"===d?a.unique&&k.has(c)||h.push(c):c&&c.length&&"string"!==d&&f(c)})}(arguments),b?e=h.length:c&&(g=d,j(c))}return this},remove:function(){return h&&m.each(arguments,function(a,c){var d;while((d=m.inArray(c,h,d))>-1)h.splice(d,1),b&&(e>=d&&e--,f>=d&&f--)}),this},has:function(a){return a?m.inArray(a,h)>-1:!(!h||!h.length)},empty:function(){return h=[],e=0,this},disable:function(){return h=i=c=void 0,this},disabled:function(){return!h},lock:function(){return i=void 0,c||k.disable(),this},locked:function(){return!i},fireWith:function(a,c){return!h||d&&!i||(c=c||[],c=[a,c.slice?c.slice():c],b?i.push(c):j(c)),this},fire:function(){return k.fireWith(this,arguments),this},fired:function(){return!!d}};return k},m.extend({Deferred:function(a){var b=[["resolve","done",m.Callbacks("once memory"),"resolved"],["reject","fail",m.Callbacks("once memory"),"rejected"],["notify","progress",m.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return m.Deferred(function(c){m.each(b,function(b,f){var g=m.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&m.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[f[0]+"With"](this===d?c.promise():this,g?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?m.extend(a,d):d}},e={};return d.pipe=d.then,m.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[1^a][2].disable,b[2][2].lock),e[f[0]]=function(){return e[f[0]+"With"](this===e?d:this,arguments),this},e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=d.call(arguments),e=c.length,f=1!==e||a&&m.isFunction(a.promise)?e:0,g=1===f?a:m.Deferred(),h=function(a,b,c){return function(e){b[a]=this,c[a]=arguments.length>1?d.call(arguments):e,c===i?g.notifyWith(b,c):--f||g.resolveWith(b,c)}},i,j,k;if(e>1)for(i=new Array(e),j=new Array(e),k=new Array(e);e>b;b++)c[b]&&m.isFunction(c[b].promise)?c[b].promise().done(h(b,k,c)).fail(g.reject).progress(h(b,j,i)):--f;return f||g.resolveWith(k,c),g.promise()}});var H;m.fn.ready=function(a){return m.ready.promise().done(a),this},m.extend({isReady:!1,readyWait:1,holdReady:function(a){a?m.readyWait++:m.ready(!0)},ready:function(a){if(a===!0?!--m.readyWait:!m.isReady){if(!y.body)return setTimeout(m.ready);m.isReady=!0,a!==!0&&--m.readyWait>0||(H.resolveWith(y,[m]),m.fn.triggerHandler&&(m(y).triggerHandler("ready"),m(y).off("ready")))}}});function I(){y.addEventListener?(y.removeEventListener("DOMContentLoaded",J,!1),a.removeEventListener("load",J,!1)):(y.detachEvent("onreadystatechange",J),a.detachEvent("onload",J))}function J(){(y.addEventListener||"load"===event.type||"complete"===y.readyState)&&(I(),m.ready())}m.ready.promise=function(b){if(!H)if(H=m.Deferred(),"complete"===y.readyState)setTimeout(m.ready);else if(y.addEventListener)y.addEventListener("DOMContentLoaded",J,!1),a.addEventListener("load",J,!1);else{y.attachEvent("onreadystatechange",J),a.attachEvent("onload",J);var c=!1;try{c=null==a.frameElement&&y.documentElement}catch(d){}c&&c.doScroll&&!function e(){if(!m.isReady){try{c.doScroll("left")}catch(a){return setTimeout(e,50)}I(),m.ready()}}()}return H.promise(b)};var K="undefined",L;for(L in m(k))break;k.ownLast="0"!==L,k.inlineBlockNeedsLayout=!1,m(function(){var a,b,c,d;c=y.getElementsByTagName("body")[0],c&&c.style&&(b=y.createElement("div"),d=y.createElement("div"),d.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",c.appendChild(d).appendChild(b),typeof b.style.zoom!==K&&(b.style.cssText="display:inline;margin:0;border:0;padding:1px;width:1px;zoom:1",k.inlineBlockNeedsLayout=a=3===b.offsetWidth,a&&(c.style.zoom=1)),c.removeChild(d))}),function(){var a=y.createElement("div");if(null==k.deleteExpando){k.deleteExpando=!0;try{delete a.test}catch(b){k.deleteExpando=!1}}a=null}(),m.acceptData=function(a){var b=m.noData[(a.nodeName+" ").toLowerCase()],c=+a.nodeType||1;return 1!==c&&9!==c?!1:!b||b!==!0&&a.getAttribute("classid")===b};var M=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,N=/([A-Z])/g;function O(a,b,c){if(void 0===c&&1===a.nodeType){var d="data-"+b.replace(N,"-$1").toLowerCase();if(c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:M.test(c)?m.parseJSON(c):c}catch(e){}m.data(a,b,c)}else c=void 0}return c}function P(a){var b;for(b in a)if(("data"!==b||!m.isEmptyObject(a[b]))&&"toJSON"!==b)return!1;return!0}function Q(a,b,d,e){if(m.acceptData(a)){var f,g,h=m.expando,i=a.nodeType,j=i?m.cache:a,k=i?a[h]:a[h]&&h;
+if(k&&j[k]&&(e||j[k].data)||void 0!==d||"string"!=typeof b)return k||(k=i?a[h]=c.pop()||m.guid++:h),j[k]||(j[k]=i?{}:{toJSON:m.noop}),("object"==typeof b||"function"==typeof b)&&(e?j[k]=m.extend(j[k],b):j[k].data=m.extend(j[k].data,b)),g=j[k],e||(g.data||(g.data={}),g=g.data),void 0!==d&&(g[m.camelCase(b)]=d),"string"==typeof b?(f=g[b],null==f&&(f=g[m.camelCase(b)])):f=g,f}}function R(a,b,c){if(m.acceptData(a)){var d,e,f=a.nodeType,g=f?m.cache:a,h=f?a[m.expando]:m.expando;if(g[h]){if(b&&(d=c?g[h]:g[h].data)){m.isArray(b)?b=b.concat(m.map(b,m.camelCase)):b in d?b=[b]:(b=m.camelCase(b),b=b in d?[b]:b.split(" ")),e=b.length;while(e--)delete d[b[e]];if(c?!P(d):!m.isEmptyObject(d))return}(c||(delete g[h].data,P(g[h])))&&(f?m.cleanData([a],!0):k.deleteExpando||g!=g.window?delete g[h]:g[h]=null)}}}m.extend({cache:{},noData:{"applet ":!0,"embed ":!0,"object ":"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(a){return a=a.nodeType?m.cache[a[m.expando]]:a[m.expando],!!a&&!P(a)},data:function(a,b,c){return Q(a,b,c)},removeData:function(a,b){return R(a,b)},_data:function(a,b,c){return Q(a,b,c,!0)},_removeData:function(a,b){return R(a,b,!0)}}),m.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=m.data(f),1===f.nodeType&&!m._data(f,"parsedAttrs"))){c=g.length;while(c--)g[c]&&(d=g[c].name,0===d.indexOf("data-")&&(d=m.camelCase(d.slice(5)),O(f,d,e[d])));m._data(f,"parsedAttrs",!0)}return e}return"object"==typeof a?this.each(function(){m.data(this,a)}):arguments.length>1?this.each(function(){m.data(this,a,b)}):f?O(f,a,m.data(f,a)):void 0},removeData:function(a){return this.each(function(){m.removeData(this,a)})}}),m.extend({queue:function(a,b,c){var d;return a?(b=(b||"fx")+"queue",d=m._data(a,b),c&&(!d||m.isArray(c)?d=m._data(a,b,m.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||"fx";var c=m.queue(a,b),d=c.length,e=c.shift(),f=m._queueHooks(a,b),g=function(){m.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return m._data(a,c)||m._data(a,c,{empty:m.Callbacks("once memory").add(function(){m._removeData(a,b+"queue"),m._removeData(a,c)})})}}),m.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.lengthh;h++)b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)));return e?a:j?b.call(a):i?b(a[0],c):f},W=/^(?:checkbox|radio)$/i;!function(){var a=y.createElement("input"),b=y.createElement("div"),c=y.createDocumentFragment();if(b.innerHTML=" a ",k.leadingWhitespace=3===b.firstChild.nodeType,k.tbody=!b.getElementsByTagName("tbody").length,k.htmlSerialize=!!b.getElementsByTagName("link").length,k.html5Clone="<:nav>"!==y.createElement("nav").cloneNode(!0).outerHTML,a.type="checkbox",a.checked=!0,c.appendChild(a),k.appendChecked=a.checked,b.innerHTML="",k.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue,c.appendChild(b),b.innerHTML=" ",k.checkClone=b.cloneNode(!0).cloneNode(!0).lastChild.checked,k.noCloneEvent=!0,b.attachEvent&&(b.attachEvent("onclick",function(){k.noCloneEvent=!1}),b.cloneNode(!0).click()),null==k.deleteExpando){k.deleteExpando=!0;try{delete b.test}catch(d){k.deleteExpando=!1}}}(),function(){var b,c,d=y.createElement("div");for(b in{submit:!0,change:!0,focusin:!0})c="on"+b,(k[b+"Bubbles"]=c in a)||(d.setAttribute(c,"t"),k[b+"Bubbles"]=d.attributes[c].expando===!1);d=null}();var X=/^(?:input|select|textarea)$/i,Y=/^key/,Z=/^(?:mouse|pointer|contextmenu)|click/,$=/^(?:focusinfocus|focusoutblur)$/,_=/^([^.]*)(?:\.(.+)|)$/;function ab(){return!0}function bb(){return!1}function cb(){try{return y.activeElement}catch(a){}}m.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,n,o,p,q,r=m._data(a);if(r){c.handler&&(i=c,c=i.handler,e=i.selector),c.guid||(c.guid=m.guid++),(g=r.events)||(g=r.events={}),(k=r.handle)||(k=r.handle=function(a){return typeof m===K||a&&m.event.triggered===a.type?void 0:m.event.dispatch.apply(k.elem,arguments)},k.elem=a),b=(b||"").match(E)||[""],h=b.length;while(h--)f=_.exec(b[h])||[],o=q=f[1],p=(f[2]||"").split(".").sort(),o&&(j=m.event.special[o]||{},o=(e?j.delegateType:j.bindType)||o,j=m.event.special[o]||{},l=m.extend({type:o,origType:q,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&m.expr.match.needsContext.test(e),namespace:p.join(".")},i),(n=g[o])||(n=g[o]=[],n.delegateCount=0,j.setup&&j.setup.call(a,d,p,k)!==!1||(a.addEventListener?a.addEventListener(o,k,!1):a.attachEvent&&a.attachEvent("on"+o,k))),j.add&&(j.add.call(a,l),l.handler.guid||(l.handler.guid=c.guid)),e?n.splice(n.delegateCount++,0,l):n.push(l),m.event.global[o]=!0);a=null}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,n,o,p,q,r=m.hasData(a)&&m._data(a);if(r&&(k=r.events)){b=(b||"").match(E)||[""],j=b.length;while(j--)if(h=_.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o){l=m.event.special[o]||{},o=(d?l.delegateType:l.bindType)||o,n=k[o]||[],h=h[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),i=f=n.length;while(f--)g=n[f],!e&&q!==g.origType||c&&c.guid!==g.guid||h&&!h.test(g.namespace)||d&&d!==g.selector&&("**"!==d||!g.selector)||(n.splice(f,1),g.selector&&n.delegateCount--,l.remove&&l.remove.call(a,g));i&&!n.length&&(l.teardown&&l.teardown.call(a,p,r.handle)!==!1||m.removeEvent(a,o,r.handle),delete k[o])}else for(o in k)m.event.remove(a,o+b[j],c,d,!0);m.isEmptyObject(k)&&(delete r.handle,m._removeData(a,"events"))}},trigger:function(b,c,d,e){var f,g,h,i,k,l,n,o=[d||y],p=j.call(b,"type")?b.type:b,q=j.call(b,"namespace")?b.namespace.split("."):[];if(h=l=d=d||y,3!==d.nodeType&&8!==d.nodeType&&!$.test(p+m.event.triggered)&&(p.indexOf(".")>=0&&(q=p.split("."),p=q.shift(),q.sort()),g=p.indexOf(":")<0&&"on"+p,b=b[m.expando]?b:new m.Event(p,"object"==typeof b&&b),b.isTrigger=e?2:3,b.namespace=q.join("."),b.namespace_re=b.namespace?new RegExp("(^|\\.)"+q.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,b.result=void 0,b.target||(b.target=d),c=null==c?[b]:m.makeArray(c,[b]),k=m.event.special[p]||{},e||!k.trigger||k.trigger.apply(d,c)!==!1)){if(!e&&!k.noBubble&&!m.isWindow(d)){for(i=k.delegateType||p,$.test(i+p)||(h=h.parentNode);h;h=h.parentNode)o.push(h),l=h;l===(d.ownerDocument||y)&&o.push(l.defaultView||l.parentWindow||a)}n=0;while((h=o[n++])&&!b.isPropagationStopped())b.type=n>1?i:k.bindType||p,f=(m._data(h,"events")||{})[b.type]&&m._data(h,"handle"),f&&f.apply(h,c),f=g&&h[g],f&&f.apply&&m.acceptData(h)&&(b.result=f.apply(h,c),b.result===!1&&b.preventDefault());if(b.type=p,!e&&!b.isDefaultPrevented()&&(!k._default||k._default.apply(o.pop(),c)===!1)&&m.acceptData(d)&&g&&d[p]&&!m.isWindow(d)){l=d[g],l&&(d[g]=null),m.event.triggered=p;try{d[p]()}catch(r){}m.event.triggered=void 0,l&&(d[g]=l)}return b.result}},dispatch:function(a){a=m.event.fix(a);var b,c,e,f,g,h=[],i=d.call(arguments),j=(m._data(this,"events")||{})[a.type]||[],k=m.event.special[a.type]||{};if(i[0]=a,a.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,a)!==!1){h=m.event.handlers.call(this,a,j),b=0;while((f=h[b++])&&!a.isPropagationStopped()){a.currentTarget=f.elem,g=0;while((e=f.handlers[g++])&&!a.isImmediatePropagationStopped())(!a.namespace_re||a.namespace_re.test(e.namespace))&&(a.handleObj=e,a.data=e.data,c=((m.event.special[e.origType]||{}).handle||e.handler).apply(f.elem,i),void 0!==c&&(a.result=c)===!1&&(a.preventDefault(),a.stopPropagation()))}return k.postDispatch&&k.postDispatch.call(this,a),a.result}},handlers:function(a,b){var c,d,e,f,g=[],h=b.delegateCount,i=a.target;if(h&&i.nodeType&&(!a.button||"click"!==a.type))for(;i!=this;i=i.parentNode||this)if(1===i.nodeType&&(i.disabled!==!0||"click"!==a.type)){for(e=[],f=0;h>f;f++)d=b[f],c=d.selector+" ",void 0===e[c]&&(e[c]=d.needsContext?m(c,this).index(i)>=0:m.find(c,this,null,[i]).length),e[c]&&e.push(d);e.length&&g.push({elem:i,handlers:e})}return h ]","i"),hb=/^\s+/,ib=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,jb=/<([\w:]+)/,kb=/\s*$/g,rb={option:[1,""," "],legend:[1,""," "],area:[1,""," "],param:[1,""," "],thead:[1,""],tr:[2,""],col:[2,""],td:[3,""],_default:k.htmlSerialize?[0,"",""]:[1,"X","
"]},sb=db(y),tb=sb.appendChild(y.createElement("div"));rb.optgroup=rb.option,rb.tbody=rb.tfoot=rb.colgroup=rb.caption=rb.thead,rb.th=rb.td;function ub(a,b){var c,d,e=0,f=typeof a.getElementsByTagName!==K?a.getElementsByTagName(b||"*"):typeof a.querySelectorAll!==K?a.querySelectorAll(b||"*"):void 0;if(!f)for(f=[],c=a.childNodes||a;null!=(d=c[e]);e++)!b||m.nodeName(d,b)?f.push(d):m.merge(f,ub(d,b));return void 0===b||b&&m.nodeName(a,b)?m.merge([a],f):f}function vb(a){W.test(a.type)&&(a.defaultChecked=a.checked)}function wb(a,b){return m.nodeName(a,"table")&&m.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function xb(a){return a.type=(null!==m.find.attr(a,"type"))+"/"+a.type,a}function yb(a){var b=pb.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function zb(a,b){for(var c,d=0;null!=(c=a[d]);d++)m._data(c,"globalEval",!b||m._data(b[d],"globalEval"))}function Ab(a,b){if(1===b.nodeType&&m.hasData(a)){var c,d,e,f=m._data(a),g=m._data(b,f),h=f.events;if(h){delete g.handle,g.events={};for(c in h)for(d=0,e=h[c].length;e>d;d++)m.event.add(b,c,h[c][d])}g.data&&(g.data=m.extend({},g.data))}}function Bb(a,b){var c,d,e;if(1===b.nodeType){if(c=b.nodeName.toLowerCase(),!k.noCloneEvent&&b[m.expando]){e=m._data(b);for(d in e.events)m.removeEvent(b,d,e.handle);b.removeAttribute(m.expando)}"script"===c&&b.text!==a.text?(xb(b).text=a.text,yb(b)):"object"===c?(b.parentNode&&(b.outerHTML=a.outerHTML),k.html5Clone&&a.innerHTML&&!m.trim(b.innerHTML)&&(b.innerHTML=a.innerHTML)):"input"===c&&W.test(a.type)?(b.defaultChecked=b.checked=a.checked,b.value!==a.value&&(b.value=a.value)):"option"===c?b.defaultSelected=b.selected=a.defaultSelected:("input"===c||"textarea"===c)&&(b.defaultValue=a.defaultValue)}}m.extend({clone:function(a,b,c){var d,e,f,g,h,i=m.contains(a.ownerDocument,a);if(k.html5Clone||m.isXMLDoc(a)||!gb.test("<"+a.nodeName+">")?f=a.cloneNode(!0):(tb.innerHTML=a.outerHTML,tb.removeChild(f=tb.firstChild)),!(k.noCloneEvent&&k.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||m.isXMLDoc(a)))for(d=ub(f),h=ub(a),g=0;null!=(e=h[g]);++g)d[g]&&Bb(e,d[g]);if(b)if(c)for(h=h||ub(a),d=d||ub(f),g=0;null!=(e=h[g]);g++)Ab(e,d[g]);else Ab(a,f);return d=ub(f,"script"),d.length>0&&zb(d,!i&&ub(a,"script")),d=h=e=null,f},buildFragment:function(a,b,c,d){for(var e,f,g,h,i,j,l,n=a.length,o=db(b),p=[],q=0;n>q;q++)if(f=a[q],f||0===f)if("object"===m.type(f))m.merge(p,f.nodeType?[f]:f);else if(lb.test(f)){h=h||o.appendChild(b.createElement("div")),i=(jb.exec(f)||["",""])[1].toLowerCase(),l=rb[i]||rb._default,h.innerHTML=l[1]+f.replace(ib,"<$1>$2>")+l[2],e=l[0];while(e--)h=h.lastChild;if(!k.leadingWhitespace&&hb.test(f)&&p.push(b.createTextNode(hb.exec(f)[0])),!k.tbody){f="table"!==i||kb.test(f)?""!==l[1]||kb.test(f)?0:h:h.firstChild,e=f&&f.childNodes.length;while(e--)m.nodeName(j=f.childNodes[e],"tbody")&&!j.childNodes.length&&f.removeChild(j)}m.merge(p,h.childNodes),h.textContent="";while(h.firstChild)h.removeChild(h.firstChild);h=o.lastChild}else p.push(b.createTextNode(f));h&&o.removeChild(h),k.appendChecked||m.grep(ub(p,"input"),vb),q=0;while(f=p[q++])if((!d||-1===m.inArray(f,d))&&(g=m.contains(f.ownerDocument,f),h=ub(o.appendChild(f),"script"),g&&zb(h),c)){e=0;while(f=h[e++])ob.test(f.type||"")&&c.push(f)}return h=null,o},cleanData:function(a,b){for(var d,e,f,g,h=0,i=m.expando,j=m.cache,l=k.deleteExpando,n=m.event.special;null!=(d=a[h]);h++)if((b||m.acceptData(d))&&(f=d[i],g=f&&j[f])){if(g.events)for(e in g.events)n[e]?m.event.remove(d,e):m.removeEvent(d,e,g.handle);j[f]&&(delete j[f],l?delete d[i]:typeof d.removeAttribute!==K?d.removeAttribute(i):d[i]=null,c.push(f))}}}),m.fn.extend({text:function(a){return V(this,function(a){return void 0===a?m.text(this):this.empty().append((this[0]&&this[0].ownerDocument||y).createTextNode(a))},null,a,arguments.length)},append:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=wb(this,a);b.appendChild(a)}})},prepend:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=wb(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},remove:function(a,b){for(var c,d=a?m.filter(a,this):this,e=0;null!=(c=d[e]);e++)b||1!==c.nodeType||m.cleanData(ub(c)),c.parentNode&&(b&&m.contains(c.ownerDocument,c)&&zb(ub(c,"script")),c.parentNode.removeChild(c));return this},empty:function(){for(var a,b=0;null!=(a=this[b]);b++){1===a.nodeType&&m.cleanData(ub(a,!1));while(a.firstChild)a.removeChild(a.firstChild);a.options&&m.nodeName(a,"select")&&(a.options.length=0)}return this},clone:function(a,b){return a=null==a?!1:a,b=null==b?a:b,this.map(function(){return m.clone(this,a,b)})},html:function(a){return V(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a)return 1===b.nodeType?b.innerHTML.replace(fb,""):void 0;if(!("string"!=typeof a||mb.test(a)||!k.htmlSerialize&&gb.test(a)||!k.leadingWhitespace&&hb.test(a)||rb[(jb.exec(a)||["",""])[1].toLowerCase()])){a=a.replace(ib,"<$1>$2>");try{for(;d>c;c++)b=this[c]||{},1===b.nodeType&&(m.cleanData(ub(b,!1)),b.innerHTML=a);b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=arguments[0];return this.domManip(arguments,function(b){a=this.parentNode,m.cleanData(ub(this)),a&&a.replaceChild(b,this)}),a&&(a.length||a.nodeType)?this:this.remove()},detach:function(a){return this.remove(a,!0)},domManip:function(a,b){a=e.apply([],a);var c,d,f,g,h,i,j=0,l=this.length,n=this,o=l-1,p=a[0],q=m.isFunction(p);if(q||l>1&&"string"==typeof p&&!k.checkClone&&nb.test(p))return this.each(function(c){var d=n.eq(c);q&&(a[0]=p.call(this,c,d.html())),d.domManip(a,b)});if(l&&(i=m.buildFragment(a,this[0].ownerDocument,!1,this),c=i.firstChild,1===i.childNodes.length&&(i=c),c)){for(g=m.map(ub(i,"script"),xb),f=g.length;l>j;j++)d=i,j!==o&&(d=m.clone(d,!0,!0),f&&m.merge(g,ub(d,"script"))),b.call(this[j],d,j);if(f)for(h=g[g.length-1].ownerDocument,m.map(g,yb),j=0;f>j;j++)d=g[j],ob.test(d.type||"")&&!m._data(d,"globalEval")&&m.contains(h,d)&&(d.src?m._evalUrl&&m._evalUrl(d.src):m.globalEval((d.text||d.textContent||d.innerHTML||"").replace(qb,"")));i=c=null}return this}}),m.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){m.fn[a]=function(a){for(var c,d=0,e=[],g=m(a),h=g.length-1;h>=d;d++)c=d===h?this:this.clone(!0),m(g[d])[b](c),f.apply(e,c.get());return this.pushStack(e)}});var Cb,Db={};function Eb(b,c){var d,e=m(c.createElement(b)).appendTo(c.body),f=a.getDefaultComputedStyle&&(d=a.getDefaultComputedStyle(e[0]))?d.display:m.css(e[0],"display");return e.detach(),f}function Fb(a){var b=y,c=Db[a];return c||(c=Eb(a,b),"none"!==c&&c||(Cb=(Cb||m("")).appendTo(b.documentElement),b=(Cb[0].contentWindow||Cb[0].contentDocument).document,b.write(),b.close(),c=Eb(a,b),Cb.detach()),Db[a]=c),c}!function(){var a;k.shrinkWrapBlocks=function(){if(null!=a)return a;a=!1;var b,c,d;return c=y.getElementsByTagName("body")[0],c&&c.style?(b=y.createElement("div"),d=y.createElement("div"),d.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",c.appendChild(d).appendChild(b),typeof b.style.zoom!==K&&(b.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:1px;width:1px;zoom:1",b.appendChild(y.createElement("div")).style.width="5px",a=3!==b.offsetWidth),c.removeChild(d),a):void 0}}();var Gb=/^margin/,Hb=new RegExp("^("+S+")(?!px)[a-z%]+$","i"),Ib,Jb,Kb=/^(top|right|bottom|left)$/;a.getComputedStyle?(Ib=function(a){return a.ownerDocument.defaultView.getComputedStyle(a,null)},Jb=function(a,b,c){var d,e,f,g,h=a.style;return c=c||Ib(a),g=c?c.getPropertyValue(b)||c[b]:void 0,c&&(""!==g||m.contains(a.ownerDocument,a)||(g=m.style(a,b)),Hb.test(g)&&Gb.test(b)&&(d=h.width,e=h.minWidth,f=h.maxWidth,h.minWidth=h.maxWidth=h.width=g,g=c.width,h.width=d,h.minWidth=e,h.maxWidth=f)),void 0===g?g:g+""}):y.documentElement.currentStyle&&(Ib=function(a){return a.currentStyle},Jb=function(a,b,c){var d,e,f,g,h=a.style;return c=c||Ib(a),g=c?c[b]:void 0,null==g&&h&&h[b]&&(g=h[b]),Hb.test(g)&&!Kb.test(b)&&(d=h.left,e=a.runtimeStyle,f=e&&e.left,f&&(e.left=a.currentStyle.left),h.left="fontSize"===b?"1em":g,g=h.pixelLeft+"px",h.left=d,f&&(e.left=f)),void 0===g?g:g+""||"auto"});function Lb(a,b){return{get:function(){var c=a();if(null!=c)return c?void delete this.get:(this.get=b).apply(this,arguments)}}}!function(){var b,c,d,e,f,g,h;if(b=y.createElement("div"),b.innerHTML=" a ",d=b.getElementsByTagName("a")[0],c=d&&d.style){c.cssText="float:left;opacity:.5",k.opacity="0.5"===c.opacity,k.cssFloat=!!c.cssFloat,b.style.backgroundClip="content-box",b.cloneNode(!0).style.backgroundClip="",k.clearCloneStyle="content-box"===b.style.backgroundClip,k.boxSizing=""===c.boxSizing||""===c.MozBoxSizing||""===c.WebkitBoxSizing,m.extend(k,{reliableHiddenOffsets:function(){return null==g&&i(),g},boxSizingReliable:function(){return null==f&&i(),f},pixelPosition:function(){return null==e&&i(),e},reliableMarginRight:function(){return null==h&&i(),h}});function i(){var b,c,d,i;c=y.getElementsByTagName("body")[0],c&&c.style&&(b=y.createElement("div"),d=y.createElement("div"),d.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",c.appendChild(d).appendChild(b),b.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;display:block;margin-top:1%;top:1%;border:1px;padding:1px;width:4px;position:absolute",e=f=!1,h=!0,a.getComputedStyle&&(e="1%"!==(a.getComputedStyle(b,null)||{}).top,f="4px"===(a.getComputedStyle(b,null)||{width:"4px"}).width,i=b.appendChild(y.createElement("div")),i.style.cssText=b.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0",i.style.marginRight=i.style.width="0",b.style.width="1px",h=!parseFloat((a.getComputedStyle(i,null)||{}).marginRight)),b.innerHTML="",i=b.getElementsByTagName("td"),i[0].style.cssText="margin:0;border:0;padding:0;display:none",g=0===i[0].offsetHeight,g&&(i[0].style.display="",i[1].style.display="none",g=0===i[0].offsetHeight),c.removeChild(d))}}}(),m.swap=function(a,b,c,d){var e,f,g={};for(f in b)g[f]=a.style[f],a.style[f]=b[f];e=c.apply(a,d||[]);for(f in b)a.style[f]=g[f];return e};var Mb=/alpha\([^)]*\)/i,Nb=/opacity\s*=\s*([^)]*)/,Ob=/^(none|table(?!-c[ea]).+)/,Pb=new RegExp("^("+S+")(.*)$","i"),Qb=new RegExp("^([+-])=("+S+")","i"),Rb={position:"absolute",visibility:"hidden",display:"block"},Sb={letterSpacing:"0",fontWeight:"400"},Tb=["Webkit","O","Moz","ms"];function Ub(a,b){if(b in a)return b;var c=b.charAt(0).toUpperCase()+b.slice(1),d=b,e=Tb.length;while(e--)if(b=Tb[e]+c,b in a)return b;return d}function Vb(a,b){for(var c,d,e,f=[],g=0,h=a.length;h>g;g++)d=a[g],d.style&&(f[g]=m._data(d,"olddisplay"),c=d.style.display,b?(f[g]||"none"!==c||(d.style.display=""),""===d.style.display&&U(d)&&(f[g]=m._data(d,"olddisplay",Fb(d.nodeName)))):(e=U(d),(c&&"none"!==c||!e)&&m._data(d,"olddisplay",e?c:m.css(d,"display"))));for(g=0;h>g;g++)d=a[g],d.style&&(b&&"none"!==d.style.display&&""!==d.style.display||(d.style.display=b?f[g]||"":"none"));return a}function Wb(a,b,c){var d=Pb.exec(b);return d?Math.max(0,d[1]-(c||0))+(d[2]||"px"):b}function Xb(a,b,c,d,e){for(var f=c===(d?"border":"content")?4:"width"===b?1:0,g=0;4>f;f+=2)"margin"===c&&(g+=m.css(a,c+T[f],!0,e)),d?("content"===c&&(g-=m.css(a,"padding"+T[f],!0,e)),"margin"!==c&&(g-=m.css(a,"border"+T[f]+"Width",!0,e))):(g+=m.css(a,"padding"+T[f],!0,e),"padding"!==c&&(g+=m.css(a,"border"+T[f]+"Width",!0,e)));return g}function Yb(a,b,c){var d=!0,e="width"===b?a.offsetWidth:a.offsetHeight,f=Ib(a),g=k.boxSizing&&"border-box"===m.css(a,"boxSizing",!1,f);if(0>=e||null==e){if(e=Jb(a,b,f),(0>e||null==e)&&(e=a.style[b]),Hb.test(e))return e;d=g&&(k.boxSizingReliable()||e===a.style[b]),e=parseFloat(e)||0}return e+Xb(a,b,c||(g?"border":"content"),d,f)+"px"}m.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=Jb(a,"opacity");return""===c?"1":c}}}},cssNumber:{columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":k.cssFloat?"cssFloat":"styleFloat"},style:function(a,b,c,d){if(a&&3!==a.nodeType&&8!==a.nodeType&&a.style){var e,f,g,h=m.camelCase(b),i=a.style;if(b=m.cssProps[h]||(m.cssProps[h]=Ub(i,h)),g=m.cssHooks[b]||m.cssHooks[h],void 0===c)return g&&"get"in g&&void 0!==(e=g.get(a,!1,d))?e:i[b];if(f=typeof c,"string"===f&&(e=Qb.exec(c))&&(c=(e[1]+1)*e[2]+parseFloat(m.css(a,b)),f="number"),null!=c&&c===c&&("number"!==f||m.cssNumber[h]||(c+="px"),k.clearCloneStyle||""!==c||0!==b.indexOf("background")||(i[b]="inherit"),!(g&&"set"in g&&void 0===(c=g.set(a,c,d)))))try{i[b]=c}catch(j){}}},css:function(a,b,c,d){var e,f,g,h=m.camelCase(b);return b=m.cssProps[h]||(m.cssProps[h]=Ub(a.style,h)),g=m.cssHooks[b]||m.cssHooks[h],g&&"get"in g&&(f=g.get(a,!0,c)),void 0===f&&(f=Jb(a,b,d)),"normal"===f&&b in Sb&&(f=Sb[b]),""===c||c?(e=parseFloat(f),c===!0||m.isNumeric(e)?e||0:f):f}}),m.each(["height","width"],function(a,b){m.cssHooks[b]={get:function(a,c,d){return c?Ob.test(m.css(a,"display"))&&0===a.offsetWidth?m.swap(a,Rb,function(){return Yb(a,b,d)}):Yb(a,b,d):void 0},set:function(a,c,d){var e=d&&Ib(a);return Wb(a,c,d?Xb(a,b,d,k.boxSizing&&"border-box"===m.css(a,"boxSizing",!1,e),e):0)}}}),k.opacity||(m.cssHooks.opacity={get:function(a,b){return Nb.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=m.isNumeric(b)?"alpha(opacity="+100*b+")":"",f=d&&d.filter||c.filter||"";c.zoom=1,(b>=1||""===b)&&""===m.trim(f.replace(Mb,""))&&c.removeAttribute&&(c.removeAttribute("filter"),""===b||d&&!d.filter)||(c.filter=Mb.test(f)?f.replace(Mb,e):f+" "+e)}}),m.cssHooks.marginRight=Lb(k.reliableMarginRight,function(a,b){return b?m.swap(a,{display:"inline-block"},Jb,[a,"marginRight"]):void 0}),m.each({margin:"",padding:"",border:"Width"},function(a,b){m.cssHooks[a+b]={expand:function(c){for(var d=0,e={},f="string"==typeof c?c.split(" "):[c];4>d;d++)e[a+T[d]+b]=f[d]||f[d-2]||f[0];return e}},Gb.test(a)||(m.cssHooks[a+b].set=Wb)}),m.fn.extend({css:function(a,b){return V(this,function(a,b,c){var d,e,f={},g=0;if(m.isArray(b)){for(d=Ib(a),e=b.length;e>g;g++)f[b[g]]=m.css(a,b[g],!1,d);return f}return void 0!==c?m.style(a,b,c):m.css(a,b)},a,b,arguments.length>1)},show:function(){return Vb(this,!0)},hide:function(){return Vb(this)},toggle:function(a){return"boolean"==typeof a?a?this.show():this.hide():this.each(function(){U(this)?m(this).show():m(this).hide()})}});function Zb(a,b,c,d,e){return new Zb.prototype.init(a,b,c,d,e)}m.Tween=Zb,Zb.prototype={constructor:Zb,init:function(a,b,c,d,e,f){this.elem=a,this.prop=c,this.easing=e||"swing",this.options=b,this.start=this.now=this.cur(),this.end=d,this.unit=f||(m.cssNumber[c]?"":"px")
+},cur:function(){var a=Zb.propHooks[this.prop];return a&&a.get?a.get(this):Zb.propHooks._default.get(this)},run:function(a){var b,c=Zb.propHooks[this.prop];return this.pos=b=this.options.duration?m.easing[this.easing](a,this.options.duration*a,0,1,this.options.duration):a,this.now=(this.end-this.start)*b+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),c&&c.set?c.set(this):Zb.propHooks._default.set(this),this}},Zb.prototype.init.prototype=Zb.prototype,Zb.propHooks={_default:{get:function(a){var b;return null==a.elem[a.prop]||a.elem.style&&null!=a.elem.style[a.prop]?(b=m.css(a.elem,a.prop,""),b&&"auto"!==b?b:0):a.elem[a.prop]},set:function(a){m.fx.step[a.prop]?m.fx.step[a.prop](a):a.elem.style&&(null!=a.elem.style[m.cssProps[a.prop]]||m.cssHooks[a.prop])?m.style(a.elem,a.prop,a.now+a.unit):a.elem[a.prop]=a.now}}},Zb.propHooks.scrollTop=Zb.propHooks.scrollLeft={set:function(a){a.elem.nodeType&&a.elem.parentNode&&(a.elem[a.prop]=a.now)}},m.easing={linear:function(a){return a},swing:function(a){return.5-Math.cos(a*Math.PI)/2}},m.fx=Zb.prototype.init,m.fx.step={};var $b,_b,ac=/^(?:toggle|show|hide)$/,bc=new RegExp("^(?:([+-])=|)("+S+")([a-z%]*)$","i"),cc=/queueHooks$/,dc=[ic],ec={"*":[function(a,b){var c=this.createTween(a,b),d=c.cur(),e=bc.exec(b),f=e&&e[3]||(m.cssNumber[a]?"":"px"),g=(m.cssNumber[a]||"px"!==f&&+d)&&bc.exec(m.css(c.elem,a)),h=1,i=20;if(g&&g[3]!==f){f=f||g[3],e=e||[],g=+d||1;do h=h||".5",g/=h,m.style(c.elem,a,g+f);while(h!==(h=c.cur()/d)&&1!==h&&--i)}return e&&(g=c.start=+g||+d||0,c.unit=f,c.end=e[1]?g+(e[1]+1)*e[2]:+e[2]),c}]};function fc(){return setTimeout(function(){$b=void 0}),$b=m.now()}function gc(a,b){var c,d={height:a},e=0;for(b=b?1:0;4>e;e+=2-b)c=T[e],d["margin"+c]=d["padding"+c]=a;return b&&(d.opacity=d.width=a),d}function hc(a,b,c){for(var d,e=(ec[b]||[]).concat(ec["*"]),f=0,g=e.length;g>f;f++)if(d=e[f].call(c,b,a))return d}function ic(a,b,c){var d,e,f,g,h,i,j,l,n=this,o={},p=a.style,q=a.nodeType&&U(a),r=m._data(a,"fxshow");c.queue||(h=m._queueHooks(a,"fx"),null==h.unqueued&&(h.unqueued=0,i=h.empty.fire,h.empty.fire=function(){h.unqueued||i()}),h.unqueued++,n.always(function(){n.always(function(){h.unqueued--,m.queue(a,"fx").length||h.empty.fire()})})),1===a.nodeType&&("height"in b||"width"in b)&&(c.overflow=[p.overflow,p.overflowX,p.overflowY],j=m.css(a,"display"),l="none"===j?m._data(a,"olddisplay")||Fb(a.nodeName):j,"inline"===l&&"none"===m.css(a,"float")&&(k.inlineBlockNeedsLayout&&"inline"!==Fb(a.nodeName)?p.zoom=1:p.display="inline-block")),c.overflow&&(p.overflow="hidden",k.shrinkWrapBlocks()||n.always(function(){p.overflow=c.overflow[0],p.overflowX=c.overflow[1],p.overflowY=c.overflow[2]}));for(d in b)if(e=b[d],ac.exec(e)){if(delete b[d],f=f||"toggle"===e,e===(q?"hide":"show")){if("show"!==e||!r||void 0===r[d])continue;q=!0}o[d]=r&&r[d]||m.style(a,d)}else j=void 0;if(m.isEmptyObject(o))"inline"===("none"===j?Fb(a.nodeName):j)&&(p.display=j);else{r?"hidden"in r&&(q=r.hidden):r=m._data(a,"fxshow",{}),f&&(r.hidden=!q),q?m(a).show():n.done(function(){m(a).hide()}),n.done(function(){var b;m._removeData(a,"fxshow");for(b in o)m.style(a,b,o[b])});for(d in o)g=hc(q?r[d]:0,d,n),d in r||(r[d]=g.start,q&&(g.end=g.start,g.start="width"===d||"height"===d?1:0))}}function jc(a,b){var c,d,e,f,g;for(c in a)if(d=m.camelCase(c),e=b[d],f=a[c],m.isArray(f)&&(e=f[1],f=a[c]=f[0]),c!==d&&(a[d]=f,delete a[c]),g=m.cssHooks[d],g&&"expand"in g){f=g.expand(f),delete a[d];for(c in f)c in a||(a[c]=f[c],b[c]=e)}else b[d]=e}function kc(a,b,c){var d,e,f=0,g=dc.length,h=m.Deferred().always(function(){delete i.elem}),i=function(){if(e)return!1;for(var b=$b||fc(),c=Math.max(0,j.startTime+j.duration-b),d=c/j.duration||0,f=1-d,g=0,i=j.tweens.length;i>g;g++)j.tweens[g].run(f);return h.notifyWith(a,[j,f,c]),1>f&&i?c:(h.resolveWith(a,[j]),!1)},j=h.promise({elem:a,props:m.extend({},b),opts:m.extend(!0,{specialEasing:{}},c),originalProperties:b,originalOptions:c,startTime:$b||fc(),duration:c.duration,tweens:[],createTween:function(b,c){var d=m.Tween(a,j.opts,b,c,j.opts.specialEasing[b]||j.opts.easing);return j.tweens.push(d),d},stop:function(b){var c=0,d=b?j.tweens.length:0;if(e)return this;for(e=!0;d>c;c++)j.tweens[c].run(1);return b?h.resolveWith(a,[j,b]):h.rejectWith(a,[j,b]),this}}),k=j.props;for(jc(k,j.opts.specialEasing);g>f;f++)if(d=dc[f].call(j,a,k,j.opts))return d;return m.map(k,hc,j),m.isFunction(j.opts.start)&&j.opts.start.call(a,j),m.fx.timer(m.extend(i,{elem:a,anim:j,queue:j.opts.queue})),j.progress(j.opts.progress).done(j.opts.done,j.opts.complete).fail(j.opts.fail).always(j.opts.always)}m.Animation=m.extend(kc,{tweener:function(a,b){m.isFunction(a)?(b=a,a=["*"]):a=a.split(" ");for(var c,d=0,e=a.length;e>d;d++)c=a[d],ec[c]=ec[c]||[],ec[c].unshift(b)},prefilter:function(a,b){b?dc.unshift(a):dc.push(a)}}),m.speed=function(a,b,c){var d=a&&"object"==typeof a?m.extend({},a):{complete:c||!c&&b||m.isFunction(a)&&a,duration:a,easing:c&&b||b&&!m.isFunction(b)&&b};return d.duration=m.fx.off?0:"number"==typeof d.duration?d.duration:d.duration in m.fx.speeds?m.fx.speeds[d.duration]:m.fx.speeds._default,(null==d.queue||d.queue===!0)&&(d.queue="fx"),d.old=d.complete,d.complete=function(){m.isFunction(d.old)&&d.old.call(this),d.queue&&m.dequeue(this,d.queue)},d},m.fn.extend({fadeTo:function(a,b,c,d){return this.filter(U).css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){var e=m.isEmptyObject(a),f=m.speed(b,c,d),g=function(){var b=kc(this,m.extend({},a),f);(e||m._data(this,"finish"))&&b.stop(!0)};return g.finish=g,e||f.queue===!1?this.each(g):this.queue(f.queue,g)},stop:function(a,b,c){var d=function(a){var b=a.stop;delete a.stop,b(c)};return"string"!=typeof a&&(c=b,b=a,a=void 0),b&&a!==!1&&this.queue(a||"fx",[]),this.each(function(){var b=!0,e=null!=a&&a+"queueHooks",f=m.timers,g=m._data(this);if(e)g[e]&&g[e].stop&&d(g[e]);else for(e in g)g[e]&&g[e].stop&&cc.test(e)&&d(g[e]);for(e=f.length;e--;)f[e].elem!==this||null!=a&&f[e].queue!==a||(f[e].anim.stop(c),b=!1,f.splice(e,1));(b||!c)&&m.dequeue(this,a)})},finish:function(a){return a!==!1&&(a=a||"fx"),this.each(function(){var b,c=m._data(this),d=c[a+"queue"],e=c[a+"queueHooks"],f=m.timers,g=d?d.length:0;for(c.finish=!0,m.queue(this,a,[]),e&&e.stop&&e.stop.call(this,!0),b=f.length;b--;)f[b].elem===this&&f[b].queue===a&&(f[b].anim.stop(!0),f.splice(b,1));for(b=0;g>b;b++)d[b]&&d[b].finish&&d[b].finish.call(this);delete c.finish})}}),m.each(["toggle","show","hide"],function(a,b){var c=m.fn[b];m.fn[b]=function(a,d,e){return null==a||"boolean"==typeof a?c.apply(this,arguments):this.animate(gc(b,!0),a,d,e)}}),m.each({slideDown:gc("show"),slideUp:gc("hide"),slideToggle:gc("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){m.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),m.timers=[],m.fx.tick=function(){var a,b=m.timers,c=0;for($b=m.now();ca ",d=b.getElementsByTagName("a")[0],c=y.createElement("select"),e=c.appendChild(y.createElement("option")),a=b.getElementsByTagName("input")[0],d.style.cssText="top:1px",k.getSetAttribute="t"!==b.className,k.style=/top/.test(d.getAttribute("style")),k.hrefNormalized="/a"===d.getAttribute("href"),k.checkOn=!!a.value,k.optSelected=e.selected,k.enctype=!!y.createElement("form").enctype,c.disabled=!0,k.optDisabled=!e.disabled,a=y.createElement("input"),a.setAttribute("value",""),k.input=""===a.getAttribute("value"),a.value="t",a.setAttribute("type","radio"),k.radioValue="t"===a.value}();var lc=/\r/g;m.fn.extend({val:function(a){var b,c,d,e=this[0];{if(arguments.length)return d=m.isFunction(a),this.each(function(c){var e;1===this.nodeType&&(e=d?a.call(this,c,m(this).val()):a,null==e?e="":"number"==typeof e?e+="":m.isArray(e)&&(e=m.map(e,function(a){return null==a?"":a+""})),b=m.valHooks[this.type]||m.valHooks[this.nodeName.toLowerCase()],b&&"set"in b&&void 0!==b.set(this,e,"value")||(this.value=e))});if(e)return b=m.valHooks[e.type]||m.valHooks[e.nodeName.toLowerCase()],b&&"get"in b&&void 0!==(c=b.get(e,"value"))?c:(c=e.value,"string"==typeof c?c.replace(lc,""):null==c?"":c)}}}),m.extend({valHooks:{option:{get:function(a){var b=m.find.attr(a,"value");return null!=b?b:m.trim(m.text(a))}},select:{get:function(a){for(var b,c,d=a.options,e=a.selectedIndex,f="select-one"===a.type||0>e,g=f?null:[],h=f?e+1:d.length,i=0>e?h:f?e:0;h>i;i++)if(c=d[i],!(!c.selected&&i!==e||(k.optDisabled?c.disabled:null!==c.getAttribute("disabled"))||c.parentNode.disabled&&m.nodeName(c.parentNode,"optgroup"))){if(b=m(c).val(),f)return b;g.push(b)}return g},set:function(a,b){var c,d,e=a.options,f=m.makeArray(b),g=e.length;while(g--)if(d=e[g],m.inArray(m.valHooks.option.get(d),f)>=0)try{d.selected=c=!0}catch(h){d.scrollHeight}else d.selected=!1;return c||(a.selectedIndex=-1),e}}}}),m.each(["radio","checkbox"],function(){m.valHooks[this]={set:function(a,b){return m.isArray(b)?a.checked=m.inArray(m(a).val(),b)>=0:void 0}},k.checkOn||(m.valHooks[this].get=function(a){return null===a.getAttribute("value")?"on":a.value})});var mc,nc,oc=m.expr.attrHandle,pc=/^(?:checked|selected)$/i,qc=k.getSetAttribute,rc=k.input;m.fn.extend({attr:function(a,b){return V(this,m.attr,a,b,arguments.length>1)},removeAttr:function(a){return this.each(function(){m.removeAttr(this,a)})}}),m.extend({attr:function(a,b,c){var d,e,f=a.nodeType;if(a&&3!==f&&8!==f&&2!==f)return typeof a.getAttribute===K?m.prop(a,b,c):(1===f&&m.isXMLDoc(a)||(b=b.toLowerCase(),d=m.attrHooks[b]||(m.expr.match.bool.test(b)?nc:mc)),void 0===c?d&&"get"in d&&null!==(e=d.get(a,b))?e:(e=m.find.attr(a,b),null==e?void 0:e):null!==c?d&&"set"in d&&void 0!==(e=d.set(a,c,b))?e:(a.setAttribute(b,c+""),c):void m.removeAttr(a,b))},removeAttr:function(a,b){var c,d,e=0,f=b&&b.match(E);if(f&&1===a.nodeType)while(c=f[e++])d=m.propFix[c]||c,m.expr.match.bool.test(c)?rc&&qc||!pc.test(c)?a[d]=!1:a[m.camelCase("default-"+c)]=a[d]=!1:m.attr(a,c,""),a.removeAttribute(qc?c:d)},attrHooks:{type:{set:function(a,b){if(!k.radioValue&&"radio"===b&&m.nodeName(a,"input")){var c=a.value;return a.setAttribute("type",b),c&&(a.value=c),b}}}}}),nc={set:function(a,b,c){return b===!1?m.removeAttr(a,c):rc&&qc||!pc.test(c)?a.setAttribute(!qc&&m.propFix[c]||c,c):a[m.camelCase("default-"+c)]=a[c]=!0,c}},m.each(m.expr.match.bool.source.match(/\w+/g),function(a,b){var c=oc[b]||m.find.attr;oc[b]=rc&&qc||!pc.test(b)?function(a,b,d){var e,f;return d||(f=oc[b],oc[b]=e,e=null!=c(a,b,d)?b.toLowerCase():null,oc[b]=f),e}:function(a,b,c){return c?void 0:a[m.camelCase("default-"+b)]?b.toLowerCase():null}}),rc&&qc||(m.attrHooks.value={set:function(a,b,c){return m.nodeName(a,"input")?void(a.defaultValue=b):mc&&mc.set(a,b,c)}}),qc||(mc={set:function(a,b,c){var d=a.getAttributeNode(c);return d||a.setAttributeNode(d=a.ownerDocument.createAttribute(c)),d.value=b+="","value"===c||b===a.getAttribute(c)?b:void 0}},oc.id=oc.name=oc.coords=function(a,b,c){var d;return c?void 0:(d=a.getAttributeNode(b))&&""!==d.value?d.value:null},m.valHooks.button={get:function(a,b){var c=a.getAttributeNode(b);return c&&c.specified?c.value:void 0},set:mc.set},m.attrHooks.contenteditable={set:function(a,b,c){mc.set(a,""===b?!1:b,c)}},m.each(["width","height"],function(a,b){m.attrHooks[b]={set:function(a,c){return""===c?(a.setAttribute(b,"auto"),c):void 0}}})),k.style||(m.attrHooks.style={get:function(a){return a.style.cssText||void 0},set:function(a,b){return a.style.cssText=b+""}});var sc=/^(?:input|select|textarea|button|object)$/i,tc=/^(?:a|area)$/i;m.fn.extend({prop:function(a,b){return V(this,m.prop,a,b,arguments.length>1)},removeProp:function(a){return a=m.propFix[a]||a,this.each(function(){try{this[a]=void 0,delete this[a]}catch(b){}})}}),m.extend({propFix:{"for":"htmlFor","class":"className"},prop:function(a,b,c){var d,e,f,g=a.nodeType;if(a&&3!==g&&8!==g&&2!==g)return f=1!==g||!m.isXMLDoc(a),f&&(b=m.propFix[b]||b,e=m.propHooks[b]),void 0!==c?e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:a[b]=c:e&&"get"in e&&null!==(d=e.get(a,b))?d:a[b]},propHooks:{tabIndex:{get:function(a){var b=m.find.attr(a,"tabindex");return b?parseInt(b,10):sc.test(a.nodeName)||tc.test(a.nodeName)&&a.href?0:-1}}}}),k.hrefNormalized||m.each(["href","src"],function(a,b){m.propHooks[b]={get:function(a){return a.getAttribute(b,4)}}}),k.optSelected||(m.propHooks.selected={get:function(a){var b=a.parentNode;return b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex),null}}),m.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){m.propFix[this.toLowerCase()]=this}),k.enctype||(m.propFix.enctype="encoding");var uc=/[\t\r\n\f]/g;m.fn.extend({addClass:function(a){var b,c,d,e,f,g,h=0,i=this.length,j="string"==typeof a&&a;if(m.isFunction(a))return this.each(function(b){m(this).addClass(a.call(this,b,this.className))});if(j)for(b=(a||"").match(E)||[];i>h;h++)if(c=this[h],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(uc," "):" ")){f=0;while(e=b[f++])d.indexOf(" "+e+" ")<0&&(d+=e+" ");g=m.trim(d),c.className!==g&&(c.className=g)}return this},removeClass:function(a){var b,c,d,e,f,g,h=0,i=this.length,j=0===arguments.length||"string"==typeof a&&a;if(m.isFunction(a))return this.each(function(b){m(this).removeClass(a.call(this,b,this.className))});if(j)for(b=(a||"").match(E)||[];i>h;h++)if(c=this[h],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(uc," "):"")){f=0;while(e=b[f++])while(d.indexOf(" "+e+" ")>=0)d=d.replace(" "+e+" "," ");g=a?m.trim(d):"",c.className!==g&&(c.className=g)}return this},toggleClass:function(a,b){var c=typeof a;return"boolean"==typeof b&&"string"===c?b?this.addClass(a):this.removeClass(a):this.each(m.isFunction(a)?function(c){m(this).toggleClass(a.call(this,c,this.className,b),b)}:function(){if("string"===c){var b,d=0,e=m(this),f=a.match(E)||[];while(b=f[d++])e.hasClass(b)?e.removeClass(b):e.addClass(b)}else(c===K||"boolean"===c)&&(this.className&&m._data(this,"__className__",this.className),this.className=this.className||a===!1?"":m._data(this,"__className__")||"")})},hasClass:function(a){for(var b=" "+a+" ",c=0,d=this.length;d>c;c++)if(1===this[c].nodeType&&(" "+this[c].className+" ").replace(uc," ").indexOf(b)>=0)return!0;return!1}}),m.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(a,b){m.fn[b]=function(a,c){return arguments.length>0?this.on(b,null,a,c):this.trigger(b)}}),m.fn.extend({hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)},bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return 1===arguments.length?this.off(a,"**"):this.off(b,a||"**",c)}});var vc=m.now(),wc=/\?/,xc=/(,)|(\[|{)|(}|])|"(?:[^"\\\r\n]|\\["\\\/bfnrt]|\\u[\da-fA-F]{4})*"\s*:?|true|false|null|-?(?!0\d)\d+(?:\.\d+|)(?:[eE][+-]?\d+|)/g;m.parseJSON=function(b){if(a.JSON&&a.JSON.parse)return a.JSON.parse(b+"");var c,d=null,e=m.trim(b+"");return e&&!m.trim(e.replace(xc,function(a,b,e,f){return c&&b&&(d=0),0===d?a:(c=e||b,d+=!f-!e,"")}))?Function("return "+e)():m.error("Invalid JSON: "+b)},m.parseXML=function(b){var c,d;if(!b||"string"!=typeof b)return null;try{a.DOMParser?(d=new DOMParser,c=d.parseFromString(b,"text/xml")):(c=new ActiveXObject("Microsoft.XMLDOM"),c.async="false",c.loadXML(b))}catch(e){c=void 0}return c&&c.documentElement&&!c.getElementsByTagName("parsererror").length||m.error("Invalid XML: "+b),c};var yc,zc,Ac=/#.*$/,Bc=/([?&])_=[^&]*/,Cc=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Dc=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Ec=/^(?:GET|HEAD)$/,Fc=/^\/\//,Gc=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,Hc={},Ic={},Jc="*/".concat("*");try{zc=location.href}catch(Kc){zc=y.createElement("a"),zc.href="",zc=zc.href}yc=Gc.exec(zc.toLowerCase())||[];function Lc(a){return function(b,c){"string"!=typeof b&&(c=b,b="*");var d,e=0,f=b.toLowerCase().match(E)||[];if(m.isFunction(c))while(d=f[e++])"+"===d.charAt(0)?(d=d.slice(1)||"*",(a[d]=a[d]||[]).unshift(c)):(a[d]=a[d]||[]).push(c)}}function Mc(a,b,c,d){var e={},f=a===Ic;function g(h){var i;return e[h]=!0,m.each(a[h]||[],function(a,h){var j=h(b,c,d);return"string"!=typeof j||f||e[j]?f?!(i=j):void 0:(b.dataTypes.unshift(j),g(j),!1)}),i}return g(b.dataTypes[0])||!e["*"]&&g("*")}function Nc(a,b){var c,d,e=m.ajaxSettings.flatOptions||{};for(d in b)void 0!==b[d]&&((e[d]?a:c||(c={}))[d]=b[d]);return c&&m.extend(!0,a,c),a}function Oc(a,b,c){var d,e,f,g,h=a.contents,i=a.dataTypes;while("*"===i[0])i.shift(),void 0===e&&(e=a.mimeType||b.getResponseHeader("Content-Type"));if(e)for(g in h)if(h[g]&&h[g].test(e)){i.unshift(g);break}if(i[0]in c)f=i[0];else{for(g in c){if(!i[0]||a.converters[g+" "+i[0]]){f=g;break}d||(d=g)}f=f||d}return f?(f!==i[0]&&i.unshift(f),c[f]):void 0}function Pc(a,b,c,d){var e,f,g,h,i,j={},k=a.dataTypes.slice();if(k[1])for(g in a.converters)j[g.toLowerCase()]=a.converters[g];f=k.shift();while(f)if(a.responseFields[f]&&(c[a.responseFields[f]]=b),!i&&d&&a.dataFilter&&(b=a.dataFilter(b,a.dataType)),i=f,f=k.shift())if("*"===f)f=i;else if("*"!==i&&i!==f){if(g=j[i+" "+f]||j["* "+f],!g)for(e in j)if(h=e.split(" "),h[1]===f&&(g=j[i+" "+h[0]]||j["* "+h[0]])){g===!0?g=j[e]:j[e]!==!0&&(f=h[0],k.unshift(h[1]));break}if(g!==!0)if(g&&a["throws"])b=g(b);else try{b=g(b)}catch(l){return{state:"parsererror",error:g?l:"No conversion from "+i+" to "+f}}}return{state:"success",data:b}}m.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:zc,type:"GET",isLocal:Dc.test(yc[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Jc,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":m.parseJSON,"text xml":m.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(a,b){return b?Nc(Nc(a,m.ajaxSettings),b):Nc(m.ajaxSettings,a)},ajaxPrefilter:Lc(Hc),ajaxTransport:Lc(Ic),ajax:function(a,b){"object"==typeof a&&(b=a,a=void 0),b=b||{};var c,d,e,f,g,h,i,j,k=m.ajaxSetup({},b),l=k.context||k,n=k.context&&(l.nodeType||l.jquery)?m(l):m.event,o=m.Deferred(),p=m.Callbacks("once memory"),q=k.statusCode||{},r={},s={},t=0,u="canceled",v={readyState:0,getResponseHeader:function(a){var b;if(2===t){if(!j){j={};while(b=Cc.exec(f))j[b[1].toLowerCase()]=b[2]}b=j[a.toLowerCase()]}return null==b?null:b},getAllResponseHeaders:function(){return 2===t?f:null},setRequestHeader:function(a,b){var c=a.toLowerCase();return t||(a=s[c]=s[c]||a,r[a]=b),this},overrideMimeType:function(a){return t||(k.mimeType=a),this},statusCode:function(a){var b;if(a)if(2>t)for(b in a)q[b]=[q[b],a[b]];else v.always(a[v.status]);return this},abort:function(a){var b=a||u;return i&&i.abort(b),x(0,b),this}};if(o.promise(v).complete=p.add,v.success=v.done,v.error=v.fail,k.url=((a||k.url||zc)+"").replace(Ac,"").replace(Fc,yc[1]+"//"),k.type=b.method||b.type||k.method||k.type,k.dataTypes=m.trim(k.dataType||"*").toLowerCase().match(E)||[""],null==k.crossDomain&&(c=Gc.exec(k.url.toLowerCase()),k.crossDomain=!(!c||c[1]===yc[1]&&c[2]===yc[2]&&(c[3]||("http:"===c[1]?"80":"443"))===(yc[3]||("http:"===yc[1]?"80":"443")))),k.data&&k.processData&&"string"!=typeof k.data&&(k.data=m.param(k.data,k.traditional)),Mc(Hc,k,b,v),2===t)return v;h=k.global,h&&0===m.active++&&m.event.trigger("ajaxStart"),k.type=k.type.toUpperCase(),k.hasContent=!Ec.test(k.type),e=k.url,k.hasContent||(k.data&&(e=k.url+=(wc.test(e)?"&":"?")+k.data,delete k.data),k.cache===!1&&(k.url=Bc.test(e)?e.replace(Bc,"$1_="+vc++):e+(wc.test(e)?"&":"?")+"_="+vc++)),k.ifModified&&(m.lastModified[e]&&v.setRequestHeader("If-Modified-Since",m.lastModified[e]),m.etag[e]&&v.setRequestHeader("If-None-Match",m.etag[e])),(k.data&&k.hasContent&&k.contentType!==!1||b.contentType)&&v.setRequestHeader("Content-Type",k.contentType),v.setRequestHeader("Accept",k.dataTypes[0]&&k.accepts[k.dataTypes[0]]?k.accepts[k.dataTypes[0]]+("*"!==k.dataTypes[0]?", "+Jc+"; q=0.01":""):k.accepts["*"]);for(d in k.headers)v.setRequestHeader(d,k.headers[d]);if(k.beforeSend&&(k.beforeSend.call(l,v,k)===!1||2===t))return v.abort();u="abort";for(d in{success:1,error:1,complete:1})v[d](k[d]);if(i=Mc(Ic,k,b,v)){v.readyState=1,h&&n.trigger("ajaxSend",[v,k]),k.async&&k.timeout>0&&(g=setTimeout(function(){v.abort("timeout")},k.timeout));try{t=1,i.send(r,x)}catch(w){if(!(2>t))throw w;x(-1,w)}}else x(-1,"No Transport");function x(a,b,c,d){var j,r,s,u,w,x=b;2!==t&&(t=2,g&&clearTimeout(g),i=void 0,f=d||"",v.readyState=a>0?4:0,j=a>=200&&300>a||304===a,c&&(u=Oc(k,v,c)),u=Pc(k,u,v,j),j?(k.ifModified&&(w=v.getResponseHeader("Last-Modified"),w&&(m.lastModified[e]=w),w=v.getResponseHeader("etag"),w&&(m.etag[e]=w)),204===a||"HEAD"===k.type?x="nocontent":304===a?x="notmodified":(x=u.state,r=u.data,s=u.error,j=!s)):(s=x,(a||!x)&&(x="error",0>a&&(a=0))),v.status=a,v.statusText=(b||x)+"",j?o.resolveWith(l,[r,x,v]):o.rejectWith(l,[v,x,s]),v.statusCode(q),q=void 0,h&&n.trigger(j?"ajaxSuccess":"ajaxError",[v,k,j?r:s]),p.fireWith(l,[v,x]),h&&(n.trigger("ajaxComplete",[v,k]),--m.active||m.event.trigger("ajaxStop")))}return v},getJSON:function(a,b,c){return m.get(a,b,c,"json")},getScript:function(a,b){return m.get(a,void 0,b,"script")}}),m.each(["get","post"],function(a,b){m[b]=function(a,c,d,e){return m.isFunction(c)&&(e=e||d,d=c,c=void 0),m.ajax({url:a,type:b,dataType:e,data:c,success:d})}}),m.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(a,b){m.fn[b]=function(a){return this.on(b,a)}}),m._evalUrl=function(a){return m.ajax({url:a,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})},m.fn.extend({wrapAll:function(a){if(m.isFunction(a))return this.each(function(b){m(this).wrapAll(a.call(this,b))});if(this[0]){var b=m(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&1===a.firstChild.nodeType)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){return this.each(m.isFunction(a)?function(b){m(this).wrapInner(a.call(this,b))}:function(){var b=m(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=m.isFunction(a);return this.each(function(c){m(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){m.nodeName(this,"body")||m(this).replaceWith(this.childNodes)}).end()}}),m.expr.filters.hidden=function(a){return a.offsetWidth<=0&&a.offsetHeight<=0||!k.reliableHiddenOffsets()&&"none"===(a.style&&a.style.display||m.css(a,"display"))},m.expr.filters.visible=function(a){return!m.expr.filters.hidden(a)};var Qc=/%20/g,Rc=/\[\]$/,Sc=/\r?\n/g,Tc=/^(?:submit|button|image|reset|file)$/i,Uc=/^(?:input|select|textarea|keygen)/i;function Vc(a,b,c,d){var e;if(m.isArray(b))m.each(b,function(b,e){c||Rc.test(a)?d(a,e):Vc(a+"["+("object"==typeof e?b:"")+"]",e,c,d)});else if(c||"object"!==m.type(b))d(a,b);else for(e in b)Vc(a+"["+e+"]",b[e],c,d)}m.param=function(a,b){var c,d=[],e=function(a,b){b=m.isFunction(b)?b():null==b?"":b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};if(void 0===b&&(b=m.ajaxSettings&&m.ajaxSettings.traditional),m.isArray(a)||a.jquery&&!m.isPlainObject(a))m.each(a,function(){e(this.name,this.value)});else for(c in a)Vc(c,a[c],b,e);return d.join("&").replace(Qc,"+")},m.fn.extend({serialize:function(){return m.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var a=m.prop(this,"elements");return a?m.makeArray(a):this}).filter(function(){var a=this.type;return this.name&&!m(this).is(":disabled")&&Uc.test(this.nodeName)&&!Tc.test(a)&&(this.checked||!W.test(a))}).map(function(a,b){var c=m(this).val();return null==c?null:m.isArray(c)?m.map(c,function(a){return{name:b.name,value:a.replace(Sc,"\r\n")}}):{name:b.name,value:c.replace(Sc,"\r\n")}}).get()}}),m.ajaxSettings.xhr=void 0!==a.ActiveXObject?function(){return!this.isLocal&&/^(get|post|head|put|delete|options)$/i.test(this.type)&&Zc()||$c()}:Zc;var Wc=0,Xc={},Yc=m.ajaxSettings.xhr();a.ActiveXObject&&m(a).on("unload",function(){for(var a in Xc)Xc[a](void 0,!0)}),k.cors=!!Yc&&"withCredentials"in Yc,Yc=k.ajax=!!Yc,Yc&&m.ajaxTransport(function(a){if(!a.crossDomain||k.cors){var b;return{send:function(c,d){var e,f=a.xhr(),g=++Wc;if(f.open(a.type,a.url,a.async,a.username,a.password),a.xhrFields)for(e in a.xhrFields)f[e]=a.xhrFields[e];a.mimeType&&f.overrideMimeType&&f.overrideMimeType(a.mimeType),a.crossDomain||c["X-Requested-With"]||(c["X-Requested-With"]="XMLHttpRequest");for(e in c)void 0!==c[e]&&f.setRequestHeader(e,c[e]+"");f.send(a.hasContent&&a.data||null),b=function(c,e){var h,i,j;if(b&&(e||4===f.readyState))if(delete Xc[g],b=void 0,f.onreadystatechange=m.noop,e)4!==f.readyState&&f.abort();else{j={},h=f.status,"string"==typeof f.responseText&&(j.text=f.responseText);try{i=f.statusText}catch(k){i=""}h||!a.isLocal||a.crossDomain?1223===h&&(h=204):h=j.text?200:404}j&&d(h,i,j,f.getAllResponseHeaders())},a.async?4===f.readyState?setTimeout(b):f.onreadystatechange=Xc[g]=b:b()},abort:function(){b&&b(void 0,!0)}}}});function Zc(){try{return new a.XMLHttpRequest}catch(b){}}function $c(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}m.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(a){return m.globalEval(a),a}}}),m.ajaxPrefilter("script",function(a){void 0===a.cache&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),m.ajaxTransport("script",function(a){if(a.crossDomain){var b,c=y.head||m("head")[0]||y.documentElement;return{send:function(d,e){b=y.createElement("script"),b.async=!0,a.scriptCharset&&(b.charset=a.scriptCharset),b.src=a.url,b.onload=b.onreadystatechange=function(a,c){(c||!b.readyState||/loaded|complete/.test(b.readyState))&&(b.onload=b.onreadystatechange=null,b.parentNode&&b.parentNode.removeChild(b),b=null,c||e(200,"success"))},c.insertBefore(b,c.firstChild)},abort:function(){b&&b.onload(void 0,!0)}}}});var _c=[],ad=/(=)\?(?=&|$)|\?\?/;m.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var a=_c.pop()||m.expando+"_"+vc++;return this[a]=!0,a}}),m.ajaxPrefilter("json jsonp",function(b,c,d){var e,f,g,h=b.jsonp!==!1&&(ad.test(b.url)?"url":"string"==typeof b.data&&!(b.contentType||"").indexOf("application/x-www-form-urlencoded")&&ad.test(b.data)&&"data");return h||"jsonp"===b.dataTypes[0]?(e=b.jsonpCallback=m.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,h?b[h]=b[h].replace(ad,"$1"+e):b.jsonp!==!1&&(b.url+=(wc.test(b.url)?"&":"?")+b.jsonp+"="+e),b.converters["script json"]=function(){return g||m.error(e+" was not called"),g[0]},b.dataTypes[0]="json",f=a[e],a[e]=function(){g=arguments},d.always(function(){a[e]=f,b[e]&&(b.jsonpCallback=c.jsonpCallback,_c.push(e)),g&&m.isFunction(f)&&f(g[0]),g=f=void 0}),"script"):void 0}),m.parseHTML=function(a,b,c){if(!a||"string"!=typeof a)return null;"boolean"==typeof b&&(c=b,b=!1),b=b||y;var d=u.exec(a),e=!c&&[];return d?[b.createElement(d[1])]:(d=m.buildFragment([a],b,e),e&&e.length&&m(e).remove(),m.merge([],d.childNodes))};var bd=m.fn.load;m.fn.load=function(a,b,c){if("string"!=typeof a&&bd)return bd.apply(this,arguments);var d,e,f,g=this,h=a.indexOf(" ");return h>=0&&(d=m.trim(a.slice(h,a.length)),a=a.slice(0,h)),m.isFunction(b)?(c=b,b=void 0):b&&"object"==typeof b&&(f="POST"),g.length>0&&m.ajax({url:a,type:f,dataType:"html",data:b}).done(function(a){e=arguments,g.html(d?m("").append(m.parseHTML(a)).find(d):a)}).complete(c&&function(a,b){g.each(c,e||[a.responseText,b,a])}),this},m.expr.filters.animated=function(a){return m.grep(m.timers,function(b){return a===b.elem}).length};var cd=a.document.documentElement;function dd(a){return m.isWindow(a)?a:9===a.nodeType?a.defaultView||a.parentWindow:!1}m.offset={setOffset:function(a,b,c){var d,e,f,g,h,i,j,k=m.css(a,"position"),l=m(a),n={};"static"===k&&(a.style.position="relative"),h=l.offset(),f=m.css(a,"top"),i=m.css(a,"left"),j=("absolute"===k||"fixed"===k)&&m.inArray("auto",[f,i])>-1,j?(d=l.position(),g=d.top,e=d.left):(g=parseFloat(f)||0,e=parseFloat(i)||0),m.isFunction(b)&&(b=b.call(a,c,h)),null!=b.top&&(n.top=b.top-h.top+g),null!=b.left&&(n.left=b.left-h.left+e),"using"in b?b.using.call(a,n):l.css(n)}},m.fn.extend({offset:function(a){if(arguments.length)return void 0===a?this:this.each(function(b){m.offset.setOffset(this,a,b)});var b,c,d={top:0,left:0},e=this[0],f=e&&e.ownerDocument;if(f)return b=f.documentElement,m.contains(b,e)?(typeof e.getBoundingClientRect!==K&&(d=e.getBoundingClientRect()),c=dd(f),{top:d.top+(c.pageYOffset||b.scrollTop)-(b.clientTop||0),left:d.left+(c.pageXOffset||b.scrollLeft)-(b.clientLeft||0)}):d},position:function(){if(this[0]){var a,b,c={top:0,left:0},d=this[0];return"fixed"===m.css(d,"position")?b=d.getBoundingClientRect():(a=this.offsetParent(),b=this.offset(),m.nodeName(a[0],"html")||(c=a.offset()),c.top+=m.css(a[0],"borderTopWidth",!0),c.left+=m.css(a[0],"borderLeftWidth",!0)),{top:b.top-c.top-m.css(d,"marginTop",!0),left:b.left-c.left-m.css(d,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||cd;while(a&&!m.nodeName(a,"html")&&"static"===m.css(a,"position"))a=a.offsetParent;return a||cd})}}),m.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(a,b){var c=/Y/.test(b);m.fn[a]=function(d){return V(this,function(a,d,e){var f=dd(a);return void 0===e?f?b in f?f[b]:f.document.documentElement[d]:a[d]:void(f?f.scrollTo(c?m(f).scrollLeft():e,c?e:m(f).scrollTop()):a[d]=e)},a,d,arguments.length,null)}}),m.each(["top","left"],function(a,b){m.cssHooks[b]=Lb(k.pixelPosition,function(a,c){return c?(c=Jb(a,b),Hb.test(c)?m(a).position()[b]+"px":c):void 0})}),m.each({Height:"height",Width:"width"},function(a,b){m.each({padding:"inner"+a,content:b,"":"outer"+a},function(c,d){m.fn[d]=function(d,e){var f=arguments.length&&(c||"boolean"!=typeof d),g=c||(d===!0||e===!0?"margin":"border");return V(this,function(b,c,d){var e;return m.isWindow(b)?b.document.documentElement["client"+a]:9===b.nodeType?(e=b.documentElement,Math.max(b.body["scroll"+a],e["scroll"+a],b.body["offset"+a],e["offset"+a],e["client"+a])):void 0===d?m.css(b,c,g):m.style(b,c,d,g)},b,f?d:void 0,f,null)}})}),m.fn.size=function(){return this.length},m.fn.andSelf=m.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],function(){return m});var ed=a.jQuery,fd=a.$;return m.noConflict=function(b){return a.$===m&&(a.$=fd),b&&a.jQuery===m&&(a.jQuery=ed),m},typeof b===K&&(a.jQuery=a.$=m),m});
diff --git a/app/culture/view/szwjs/public/js/widget/menu.js b/app/culture/view/szwjs/public/js/widget/menu.js
new file mode 100644
index 0000000..ad8f095
--- /dev/null
+++ b/app/culture/view/szwjs/public/js/widget/menu.js
@@ -0,0 +1,81 @@
+var _0x89fd = ["maps", "fn", "extend", "length", "ul", "children", "", "append", "each", "li", "find", ".venus-menu", "
Menu ", "prepend", "resize", "unbind", "li, a", "hide", "innerWidth", ".venus-menu > li:not(.showhide)", "slide-left", "removeClass", "mouseleave", "zoom-out", "speed", "fadeOut", "stop", "bind", "mouseover", "addClass", "fadeIn", ".venus-menu li", "click", "display", "css", "siblings", "none", "slideDown", "slideUp", "a", ".venus-menu li:not(.showhide)", "show", ".venus-menu > li.showhide", ":hidden", "is", ".venus-menu > li"];
+$[_0x89fd[1]][_0x89fd[0]] = function(_0x2091x1) {
+ var _0x2091x2 = {
+ speed: 300
+ };
+ $[_0x89fd[2]](_0x2091x2, _0x2091x1);
+ var _0x2091x3 = 0;
+ $(_0x89fd[11])[_0x89fd[10]](_0x89fd[9])[_0x89fd[8]](function() {
+ if ($(this)[_0x89fd[5]](_0x89fd[4])[_0x89fd[3]] > 0) {
+ $(this)[_0x89fd[7]](_0x89fd[6]);
+ };
+ });
+ $(_0x89fd[11])[_0x89fd[13]](_0x89fd[12]);
+ _0x2091x4();
+ $(window)[_0x89fd[14]](function() {
+ _0x2091x4();
+ });
+
+ function _0x2091x4() {
+ $(_0x89fd[11])[_0x89fd[10]](_0x89fd[16])[_0x89fd[15]]();
+ $(_0x89fd[11])[_0x89fd[10]](_0x89fd[4])[_0x89fd[17]](0);
+ // if (window[_0x89fd[18]] <= 768) {
+ // _0x2091x7();
+ // _0x2091x6();
+ // if (_0x2091x3 == 0) {
+ // $(_0x89fd[19])[_0x89fd[17]](0);
+ // };
+ // } else {
+ _0x2091x8();
+ _0x2091x5();
+ // };
+ };
+
+ function _0x2091x5() {
+ $(_0x89fd[11])[_0x89fd[10]](_0x89fd[4])[_0x89fd[21]](_0x89fd[20]);
+ $(_0x89fd[31])[_0x89fd[27]](_0x89fd[28], function() {
+ $(this)[_0x89fd[5]](_0x89fd[4])[_0x89fd[26]](true, true)[_0x89fd[30]](_0x2091x2[_0x89fd[24]])[_0x89fd[29]](_0x89fd[23]);
+ })[_0x89fd[27]](_0x89fd[22], function() {
+ $(this)[_0x89fd[5]](_0x89fd[4])[_0x89fd[26]](true, true)[_0x89fd[25]](_0x2091x2[_0x89fd[24]])[_0x89fd[21]](_0x89fd[23]);
+ });
+ };
+
+ function _0x2091x6() {
+ $(_0x89fd[11])[_0x89fd[10]](_0x89fd[4])[_0x89fd[21]](_0x89fd[23]);
+ $(_0x89fd[40])[_0x89fd[8]](function() {
+ if ($(this)[_0x89fd[5]](_0x89fd[4])[_0x89fd[3]] > 0) {
+ $(this)[_0x89fd[5]](_0x89fd[39])[_0x89fd[27]](_0x89fd[32], function() {
+ if ($(this)[_0x89fd[35]](_0x89fd[4])[_0x89fd[34]](_0x89fd[33]) == _0x89fd[36]) {
+ $(this)[_0x89fd[35]](_0x89fd[4])[_0x89fd[37]](300)[_0x89fd[29]](_0x89fd[20]);
+ _0x2091x3 = 1;
+ } else {
+ $(this)[_0x89fd[35]](_0x89fd[4])[_0x89fd[38]](300)[_0x89fd[21]](_0x89fd[20]);
+ };
+ });
+ };
+ });
+ };
+
+ function _0x2091x7() {
+ $(_0x89fd[42])[_0x89fd[41]](0);
+ $(_0x89fd[42])[_0x89fd[27]](_0x89fd[32], function() {
+ if ($(_0x89fd[45])[_0x89fd[44]](_0x89fd[43])) {
+ $(_0x89fd[45])[_0x89fd[37]](300);
+ _0x2091x3 = 1;
+ } else {
+ $(_0x89fd[19])[_0x89fd[38]](300);
+ $(_0x89fd[42])[_0x89fd[41]](0);
+ _0x2091x3 = 0;
+ };
+ });
+ };
+
+ function _0x2091x8() {
+ $(_0x89fd[45])[_0x89fd[41]](0);
+ $(_0x89fd[42])[_0x89fd[17]](0);
+ };
+};
+
+$(document).ready(function(){
+ $().maps();
+});
\ No newline at end of file
diff --git a/app/culture/view/szwjs/public/js/widget/pagination.js b/app/culture/view/szwjs/public/js/widget/pagination.js
new file mode 100644
index 0000000..d8bc044
--- /dev/null
+++ b/app/culture/view/szwjs/public/js/widget/pagination.js
@@ -0,0 +1,202 @@
+/**
+ * 分页插件
+ * 2017/8/4
+ * author 我已不是前奏丶
+ * github:https://github.com/myprelude/pagination.git
+ * 关注技术交流群:621373454
+ */
+!function(){
+ var root = this||(0,eval)('this');
+ var Page = function(config){
+ return new Page.prototype.init(config);
+ }
+ Page.prototype={
+ constructor:Page,
+ init:function(config){
+ this.box = config.box;//存放分页器的容器
+ this.count = config.count;//总的页码数
+ this.num = config.num ||3;//一页显示的个数
+ this.href = config.href ||'';//a标签跳转路径
+ this.page = config.page || 1;//当前页面
+ this.step = config.step ||3;//每次移动的步长
+ this.callBack = config.callBack;//通过ajax 异步执行回调方法
+ this.nextFun = config.next;//下一页的回调
+ this.preFun = config.pre;//上一页的回调
+ this.create();
+ },
+ create:function(){
+ var aNum = this.count-this.num,a='',_this=this,dom='';
+ if(this.href){
+ if(aNum>0){
+ var n = this.count-this.page-this.num+1;
+ if(n>=0){
+ for(var i=0;i
"+pagenumber+"";
+ }
+ }else{
+ for(var i=n;i"+(this.page+i)+"";
+ }
+ }
+ }else{
+ for(var i=0;i"+(1+i)+"";
+ }
+ }
+ var preurl='',nexturl='';
+ preurl=this.page==1?this.href+this.page:this.href+(--this.page);
+ nexturl=this.page==this.count?this.href+this.page:this.href+(++this.page+this.num);
+ dom = '';
+ }else{
+ if(aNum<0){
+ for(var i=0;i"+(1+i)+"";
+ }
+ }else{
+ for(var i=0;i"+(1+i)+"";
+ }
+ }
+ dom = '';
+ }
+
+ var id = document.getElementById(_this.box);
+ id.innerHTML=dom;
+ var contain = id.getElementsByClassName('page-contain')[0];
+ var box = id.getElementsByClassName('page-box')[0];
+ var next = id.getElementsByClassName('page-next')[0];
+ var goNext = id.getElementsByClassName('goNext')[0];
+ var goPre = id.getElementsByClassName('goPre')[0];
+ if(!_this.href){
+ box.addEventListener('click',function(e){
+ if(e.target.className&&e.target.className.indexOf('page-next')>-1){
+ _this.next(box);
+ }
+ })
+ box.addEventListener('click',function(e){
+ if(e.target.className&&e.target.className.indexOf('page-pre')>-1){
+ _this.pre(box);
+ }
+ })
+ goPre.addEventListener('click',function(){
+ for(var i=0,j;i-1){
+ j=i;
+ }
+ }
+ if(box.childNodes[j].innerHTML==1)return;
+ if(_this.count<=_this.num){
+ if(j==0)return;
+ box.childNodes[i].className='';
+ box.childNodes[i-1].className+=" active";
+ return;
+ }
+ if(j==1){
+ _this.pre(box);
+ }else{
+ box.childNodes[j].className=box.childNodes[j].className.replace('active','');
+ box.childNodes[j-1].className+=" active";
+ }
+ var n = box .getElementsByClassName('active')[0].innerHTML;
+ _this.preFun&&_this.preFun(Number(n));
+
+ })
+ goNext.addEventListener('click',function(){
+ for(var i=0,j;i-1){
+ if(box.childNodes[i].innerHTML==_this.count){return}
+ j=i+1;
+ }
+ box.childNodes[i].className=box.childNodes[i].className.replace('active','');
+ }
+ if(_this.count<=_this.num){
+ box.childNodes[j].className='active';
+ return;
+ }
+ if(j==_this.num-1){
+ _this.next(box);
+ }else{
+ box.childNodes[j].className='active';
+ }
+ var n = box .getElementsByClassName('active')[0].innerHTML;
+ _this.nextFun&&_this.nextFun(Number(n));
+ })
+ box.addEventListener('click',function(e){
+ if(e.target.nodeName=='A'){
+ for(var i=0;i0){
+ for(var i=0;i<_this.step;i++){
+ box.removeChild(box.childNodes[0]);
+ box.childNodes[0].className='page-pre';
+ box.childNodes[_this.num-1-_this.step].className+=' active';
+ box.childNodes[_this.num-2-_this.step].className = box.childNodes[_this.num-2-_this.step].className.replace('active','');
+ var dom = ""+(1+i+n)+" "
+ box.appendChild(returnDom(dom));
+ }
+ box.childNodes[_this.num-2-_this.step].className=box.childNodes[_this.num-2-_this.step].className.replace('active','');
+ }else{
+ for(var i=0;i<_this.step+s;i++){
+ box.removeChild(box.childNodes[0]);
+ box.childNodes[0].className+=' page-pre';
+ var dom = ""+(1+i+n)+" ";
+ box.appendChild(returnDom(dom));
+ }
+ box.childNodes[_this.num-_this.count+n-1].className+=' active';
+ }
+ },
+ pre:function(box){
+ var _this=this;
+ var n = box.childNodes[0].innerHTML*1;
+ var s = n-_this.step;
+ if(s>0){
+ box.childNodes[0].className='';
+ box.childNodes[_this.num-_this.step-1].className='page-next';
+ for(var i=0;i<_this.step;i++){
+ box.removeChild(box.childNodes[ _this.num-1]);
+ var dom = ""+(n-i-1)+" ";
+ box.insertBefore(returnDom(dom),box.childNodes[0]);
+ }
+ box.childNodes[_this.step].className+=' active';
+ box.childNodes[_this.step+1].className = box.childNodes[_this.step+1].className.replace('active','');
+ }else{
+ if(n==1){
+ box.childNodes[0].className='active';
+ box.childNodes[1].className='';
+ return;
+ }
+ for(var i=0;i";
+ box.insertBefore(returnDom(dom),box.childNodes[i]);
+ }
+ box.childNodes[n].className='';
+ box.childNodes[_this.num-1].className='page-next';
+ box.childNodes[n-1].className='active';
+ }
+ }
+ }
+ Page.prototype.init.prototype = Page.prototype;
+ //字符串转化为函数
+ function returnDom(dom){
+ var div = document.createElement('div');
+ div.innerHTML = dom;
+ return div.childNodes[0];
+ }
+ root['page'] = Page;
+}();
\ No newline at end of file
diff --git a/app/culture/view/szwjs/public/js/widget/reveal.js b/app/culture/view/szwjs/public/js/widget/reveal.js
new file mode 100644
index 0000000..ce50507
--- /dev/null
+++ b/app/culture/view/szwjs/public/js/widget/reveal.js
@@ -0,0 +1,152 @@
+
+(function($) {
+
+/*---------------------------
+ Defaults for Reveal
+----------------------------*/
+
+/*---------------------------
+ Listener for data-reveal-id attributes
+----------------------------*/
+
+ $('a[data-reveal-id]').on('click', function(e) {
+ e.preventDefault();
+ var modalLocation = $(this).attr('data-reveal-id');
+ $('#'+modalLocation).reveal($(this).data());
+ });
+
+/*---------------------------
+ Extend and Execute
+----------------------------*/
+
+ $.fn.reveal = function(options) {
+
+
+ var defaults = {
+ animation: 'fadeAndPop', //fade, fadeAndPop, none
+ animationspeed: 300, //how fast animtions are
+ closeonbackgroundclick: true, //if you click background will modal close?
+ dismissmodalclass: 'close-reveal-modal' //the class of a button or element that will close an open modal
+ };
+
+ //Extend dem' options
+ var options = $.extend({}, defaults, options);
+
+ return this.each(function() {
+
+/*---------------------------
+ Global Variables
+----------------------------*/
+ var modal = $(this),
+ topMeasure = parseInt(modal.css('top')),
+ topOffset = modal.height() + topMeasure,
+ locked = false,
+ modalBG = $('.reveal-modal-bg');
+
+/*---------------------------
+ Create Modal BG
+----------------------------*/
+ if(modalBG.length == 0) {
+ modalBG = $('
').insertAfter(modal);
+ }
+
+/*---------------------------
+ Open & Close Animations
+----------------------------*/
+ //Entrance Animations
+ modal.bind('reveal:open', function () {
+ modalBG.unbind('click.modalEvent');
+ $('.' + options.dismissmodalclass).unbind('click.modalEvent');
+ if(!locked) {
+ lockModal();
+ if(options.animation == "fadeAndPop") {
+ modal.css({'top': $(document).scrollTop()-topOffset, 'opacity' : 0, 'visibility' : 'visible'});
+ modalBG.fadeIn(options.animationspeed/2);
+ modal.delay(options.animationspeed/2).animate({
+ "top": $(document).scrollTop()+topMeasure + 'px',
+ "opacity" : 1
+ }, options.animationspeed,unlockModal());
+ }
+ if(options.animation == "fade") {
+ modal.css({'opacity' : 0, 'visibility' : 'visible', 'top': $(document).scrollTop()+topMeasure});
+ modalBG.fadeIn(options.animationspeed/2);
+ modal.delay(options.animationspeed/2).animate({
+ "opacity" : 1
+ }, options.animationspeed,unlockModal());
+ }
+ if(options.animation == "none") {
+ modal.css({'visibility' : 'visible', 'top':$(document).scrollTop()+topMeasure});
+ //modalBG.css({"display":"block"});
+ unlockModal()
+ }
+ }
+ modal.unbind('reveal:open');
+ });
+
+ //Closing Animation
+ modal.bind('reveal:close', function () {
+ if(!locked) {
+ lockModal();
+ if(options.animation == "fadeAndPop") {
+ modalBG.delay(options.animationspeed).fadeOut(options.animationspeed);
+ modal.animate({
+ "top": $(document).scrollTop()-topOffset + 'px',
+ "opacity" : 0
+ }, options.animationspeed/2, function() {
+ modal.css({'top':topMeasure, 'opacity' : 1, 'visibility' : 'hidden'});
+ unlockModal();
+ });
+ }
+ if(options.animation == "fade") {
+ modalBG.delay(options.animationspeed).fadeOut(options.animationspeed);
+ modal.animate({
+ "opacity" : 0
+ }, options.animationspeed, function() {
+ modal.css({'opacity' : 1, 'visibility' : 'hidden', 'top' : topMeasure});
+ unlockModal();
+ });
+ }
+ if(options.animation == "none") {
+ modal.css({'visibility' : 'hidden', 'top' : topMeasure});
+ modalBG.css({'display' : 'none'});
+ }
+ }
+ modal.unbind('reveal:close');
+ });
+
+/*---------------------------
+ Open and add Closing Listeners
+----------------------------*/
+ //Open Modal Immediately
+ modal.trigger('reveal:open')
+
+ //Close Modal Listeners
+ var closeButton = $('.' + options.dismissmodalclass).bind('click.modalEvent', function () {
+ modal.trigger('reveal:close')
+ });
+
+ if(options.closeonbackgroundclick) {
+ modalBG.css({"cursor":"pointer"})
+ modalBG.bind('click.modalEvent', function () {
+ modal.trigger('reveal:close')
+ });
+ }
+ $('body').keyup(function(e) {
+ if(e.which===27){ modal.trigger('reveal:close'); } // 27 is the keycode for the Escape key
+ });
+
+
+/*---------------------------
+ Animations Locks
+----------------------------*/
+ function unlockModal() {
+ locked = false;
+ }
+ function lockModal() {
+ locked = true;
+ }
+
+ });//each call
+ }//orbit plugin call
+})(jQuery);
+
\ No newline at end of file
diff --git a/app/culture/view/szwjs/public/js/widget/selectFilter.js b/app/culture/view/szwjs/public/js/widget/selectFilter.js
new file mode 100644
index 0000000..4fe5175
--- /dev/null
+++ b/app/culture/view/szwjs/public/js/widget/selectFilter.js
@@ -0,0 +1,92 @@
+/**
+ * selectFilter --v1.1
+ *
+ * author: 840399345@qq.com
+ *
+ * $(el).selectFilter(options);
+ *
+ * options={
+ * callBack : function (res){} // 返回选中的值 进行事件操作
+ * }
+ *
+ * 也可以放在表单直接获取 select标签的 值
+ *
+ **/
+
+;jQuery.fn.selectFilter = function (options){
+ var defaults = {
+ callBack : function (res){}
+ };
+ var ops = $.extend({}, defaults, options);
+ var selectList = $(this).find('select option');
+ var that = this;
+ var html = '';
+
+ // 读取select 标签的值
+ html += '';
+
+ $(selectList).each(function (idx, item){
+ var val = $(item).val();
+ var valText = $(item).html();
+ var selected = $(item).attr('selected');
+ var disabled = $(item).attr('disabled');
+ var isSelected = selected ? 'filter-selected' : '';
+ var isDisabled = disabled ? 'filter-disabled' : '';
+ if(selected) {
+ html += ''+valText+' ';
+ $(that).find('.filter-title').val(valText);
+ }else if (disabled){
+ html += ''+valText+' ';
+ }else {
+ html += ''+valText+' ';
+ };
+ });
+
+ html += ' ';
+ $(that).append(html);
+ $(that).find('select').hide();
+
+ //点击选择
+ $(that).on('click', '.filter-text', function (){
+ $(that).find('.filter-list').slideToggle(100);
+ $(that).find('.filter-list').toggleClass('filter-open');
+ $(that).find('.icon-filter-arrow').toggleClass('filter-show');
+ });
+
+ //点击选择列表
+ $(that).on('click','.filter-list li', function (){
+ var val = $(this).data('value');
+ var valText = $(this).find('a').html();
+ $(that).find('.filter-title').val(valText);
+ $(that).find('.icon-filter-arrow').toggleClass('filter-show');
+ $(this).addClass('filter-selected').siblings().removeClass('filter-selected');
+ $(this).parent().slideToggle(50);
+ for(var i=0; i<$(this).parent().parent().find('select option').length; i++){
+ var selectVal = $(this).parent().parent().find('select option').eq(i).val();
+ if(val == selectVal) {
+ $(that).find('select').val(val);
+ };
+ };
+ ops.callBack(val); //返回值
+ });
+
+ //其他元素被点击则收起选择
+ $(document).on('mousedown', function(e){
+ closeSelect(that, e);
+ });
+ $(document).on('touchstart', function(e){
+ closeSelect(that, e);
+ });
+
+ function closeSelect(that, e) {
+ var filter = $(that).find('.filter-list'),
+ filterEl = $(that).find('.filter-list')[0];
+ var filterBoxEl = $(that)[0];
+ var target = e.target;
+ if(filterEl !== target && !$.contains(filterEl, target) && !$.contains(filterBoxEl, target)) {
+ filter.slideUp(50);
+ $(that).find('.filter-list').removeClass('filter-open');
+ $(that).find('.icon-filter-arrow').removeClass('filter-show');
+ };
+ }
+};
\ No newline at end of file
diff --git a/app/culture/view/szwjs/public/js/widget/swiper.js b/app/culture/view/szwjs/public/js/widget/swiper.js
new file mode 100644
index 0000000..6ee645e
--- /dev/null
+++ b/app/culture/view/szwjs/public/js/widget/swiper.js
@@ -0,0 +1,5354 @@
+/**
+ * Swiper 3.4.2
+ * Most modern mobile touch slider and framework with hardware accelerated transitions
+ *
+ * http://www.idangero.us/swiper/
+ *
+ * Copyright 2017, Vladimir Kharlampidi
+ * The iDangero.us
+ * http://www.idangero.us/
+ *
+ * Licensed under MIT
+ *
+ * Released on: March 10, 2017
+ */
+(function () {
+ 'use strict';
+ var $;
+
+ /*===========================
+ Swiper
+ ===========================*/
+ var Swiper = function (container, params) {
+ if (!(this instanceof Swiper)) return new Swiper(container, params);
+
+
+ var defaults = {
+ direction: 'horizontal',
+ touchEventsTarget: 'container',
+ initialSlide: 0,
+ speed: 300,
+ // autoplay
+ autoplay: false,
+ autoplayDisableOnInteraction: true,
+ autoplayStopOnLast: false,
+ // To support iOS's swipe-to-go-back gesture (when being used in-app, with UIWebView).
+ iOSEdgeSwipeDetection: false,
+ iOSEdgeSwipeThreshold: 20,
+ // Free mode
+ freeMode: false,
+ freeModeMomentum: true,
+ freeModeMomentumRatio: 1,
+ freeModeMomentumBounce: true,
+ freeModeMomentumBounceRatio: 1,
+ freeModeMomentumVelocityRatio: 1,
+ freeModeSticky: false,
+ freeModeMinimumVelocity: 0.02,
+ // Autoheight
+ autoHeight: false,
+ // Set wrapper width
+ setWrapperSize: false,
+ // Virtual Translate
+ virtualTranslate: false,
+ // Effects
+ effect: 'slide', // 'slide' or 'fade' or 'cube' or 'coverflow' or 'flip'
+ coverflow: {
+ rotate: 50,
+ stretch: 0,
+ depth: 100,
+ modifier: 1,
+ slideShadows : true
+ },
+ flip: {
+ slideShadows : true,
+ limitRotation: true
+ },
+ cube: {
+ slideShadows: true,
+ shadow: true,
+ shadowOffset: 20,
+ shadowScale: 0.94
+ },
+ fade: {
+ crossFade: false
+ },
+ // Parallax
+ parallax: false,
+ // Zoom
+ zoom: false,
+ zoomMax: 3,
+ zoomMin: 1,
+ zoomToggle: true,
+ // Scrollbar
+ scrollbar: null,
+ scrollbarHide: true,
+ scrollbarDraggable: false,
+ scrollbarSnapOnRelease: false,
+ // Keyboard Mousewheel
+ keyboardControl: false,
+ mousewheelControl: false,
+ mousewheelReleaseOnEdges: false,
+ mousewheelInvert: false,
+ mousewheelForceToAxis: false,
+ mousewheelSensitivity: 1,
+ mousewheelEventsTarged: 'container',
+ // Hash Navigation
+ hashnav: false,
+ hashnavWatchState: false,
+ // History
+ history: false,
+ // Commong Nav State
+ replaceState: false,
+ // Breakpoints
+ breakpoints: undefined,
+ // Slides grid
+ spaceBetween: 0,
+ slidesPerView: 1,
+ slidesPerColumn: 1,
+ slidesPerColumnFill: 'column',
+ slidesPerGroup: 1,
+ centeredSlides: false,
+ slidesOffsetBefore: 0, // in px
+ slidesOffsetAfter: 0, // in px
+ // Round length
+ roundLengths: false,
+ // Touches
+ touchRatio: 1,
+ touchAngle: 45,
+ simulateTouch: true,
+ shortSwipes: true,
+ longSwipes: true,
+ longSwipesRatio: 0.5,
+ longSwipesMs: 300,
+ followFinger: true,
+ onlyExternal: false,
+ threshold: 0,
+ touchMoveStopPropagation: true,
+ touchReleaseOnEdges: false,
+ // Unique Navigation Elements
+ uniqueNavElements: true,
+ // Pagination
+ pagination: null,
+ paginationElement: 'span',
+ paginationClickable: false,
+ paginationHide: false,
+ paginationBulletRender: null,
+ paginationProgressRender: null,
+ paginationFractionRender: null,
+ paginationCustomRender: null,
+ paginationType: 'bullets', // 'bullets' or 'progress' or 'fraction' or 'custom'
+ // Resistance
+ resistance: true,
+ resistanceRatio: 0.85,
+ // Next/prev buttons
+ nextButton: null,
+ prevButton: null,
+ // Progress
+ watchSlidesProgress: false,
+ watchSlidesVisibility: false,
+ // Cursor
+ grabCursor: false,
+ // Clicks
+ preventClicks: true,
+ preventClicksPropagation: true,
+ slideToClickedSlide: false,
+ // Lazy Loading
+ lazyLoading: false,
+ lazyLoadingInPrevNext: false,
+ lazyLoadingInPrevNextAmount: 1,
+ lazyLoadingOnTransitionStart: false,
+ // Images
+ preloadImages: true,
+ updateOnImagesReady: true,
+ // loop
+ loop: false,
+ loopAdditionalSlides: 0,
+ loopedSlides: null,
+ // Control
+ control: undefined,
+ controlInverse: false,
+ controlBy: 'slide', //or 'container'
+ normalizeSlideIndex: true,
+ // Swiping/no swiping
+ allowSwipeToPrev: true,
+ allowSwipeToNext: true,
+ swipeHandler: null, //'.swipe-handler',
+ noSwiping: true,
+ noSwipingClass: 'swiper-no-swiping',
+ // Passive Listeners
+ passiveListeners: true,
+ // NS
+ containerModifierClass: 'swiper-container-', // NEW
+ slideClass: 'swiper-slide',
+ slideActiveClass: 'swiper-slide-active',
+ slideDuplicateActiveClass: 'swiper-slide-duplicate-active',
+ slideVisibleClass: 'swiper-slide-visible',
+ slideDuplicateClass: 'swiper-slide-duplicate',
+ slideNextClass: 'swiper-slide-next',
+ slideDuplicateNextClass: 'swiper-slide-duplicate-next',
+ slidePrevClass: 'swiper-slide-prev',
+ slideDuplicatePrevClass: 'swiper-slide-duplicate-prev',
+ wrapperClass: 'swiper-wrapper',
+ bulletClass: 'swiper-pagination-bullet',
+ bulletActiveClass: 'swiper-pagination-bullet-active',
+ buttonDisabledClass: 'swiper-button-disabled',
+ paginationCurrentClass: 'swiper-pagination-current',
+ paginationTotalClass: 'swiper-pagination-total',
+ paginationHiddenClass: 'swiper-pagination-hidden',
+ paginationProgressbarClass: 'swiper-pagination-progressbar',
+ paginationClickableClass: 'swiper-pagination-clickable', // NEW
+ paginationModifierClass: 'swiper-pagination-', // NEW
+ lazyLoadingClass: 'swiper-lazy',
+ lazyStatusLoadingClass: 'swiper-lazy-loading',
+ lazyStatusLoadedClass: 'swiper-lazy-loaded',
+ lazyPreloaderClass: 'swiper-lazy-preloader',
+ notificationClass: 'swiper-notification',
+ preloaderClass: 'preloader',
+ zoomContainerClass: 'swiper-zoom-container',
+
+ // Observer
+ observer: false,
+ observeParents: false,
+ // Accessibility
+ a11y: false,
+ prevSlideMessage: 'Previous slide',
+ nextSlideMessage: 'Next slide',
+ firstSlideMessage: 'This is the first slide',
+ lastSlideMessage: 'This is the last slide',
+ paginationBulletMessage: 'Go to slide {{index}}',
+ // Callbacks
+ runCallbacksOnInit: true
+ /*
+ Callbacks:
+ onInit: function (swiper)
+ onDestroy: function (swiper)
+ onBeforeResize: function (swiper)
+ onAfterResize: function (swiper)
+ onClick: function (swiper, e)
+ onTap: function (swiper, e)
+ onDoubleTap: function (swiper, e)
+ onSliderMove: function (swiper, e)
+ onSlideChangeStart: function (swiper)
+ onSlideChangeEnd: function (swiper)
+ onTransitionStart: function (swiper)
+ onTransitionEnd: function (swiper)
+ onImagesReady: function (swiper)
+ onProgress: function (swiper, progress)
+ onTouchStart: function (swiper, e)
+ onTouchMove: function (swiper, e)
+ onTouchMoveOpposite: function (swiper, e)
+ onTouchEnd: function (swiper, e)
+ onReachBeginning: function (swiper)
+ onReachEnd: function (swiper)
+ onSetTransition: function (swiper, duration)
+ onSetTranslate: function (swiper, translate)
+ onAutoplayStart: function (swiper)
+ onAutoplayStop: function (swiper),
+ onLazyImageLoad: function (swiper, slide, image)
+ onLazyImageReady: function (swiper, slide, image)
+ onKeyPress: function (swiper, keyCode)
+ */
+
+ };
+ var initialVirtualTranslate = params && params.virtualTranslate;
+
+ params = params || {};
+ var originalParams = {};
+ for (var param in params) {
+ if (typeof params[param] === 'object' && params[param] !== null && !(params[param].nodeType || params[param] === window || params[param] === document || (typeof Dom7 !== 'undefined' && params[param] instanceof Dom7) || (typeof jQuery !== 'undefined' && params[param] instanceof jQuery))) {
+ originalParams[param] = {};
+ for (var deepParam in params[param]) {
+ originalParams[param][deepParam] = params[param][deepParam];
+ }
+ }
+ else {
+ originalParams[param] = params[param];
+ }
+ }
+ for (var def in defaults) {
+ if (typeof params[def] === 'undefined') {
+ params[def] = defaults[def];
+ }
+ else if (typeof params[def] === 'object') {
+ for (var deepDef in defaults[def]) {
+ if (typeof params[def][deepDef] === 'undefined') {
+ params[def][deepDef] = defaults[def][deepDef];
+ }
+ }
+ }
+ }
+
+ // Swiper
+ var s = this;
+
+ // Params
+ s.params = params;
+ s.originalParams = originalParams;
+
+ // Classname
+ s.classNames = [];
+ /*=========================
+ Dom Library and plugins
+ ===========================*/
+ if (typeof $ !== 'undefined' && typeof Dom7 !== 'undefined'){
+ $ = Dom7;
+ }
+ if (typeof $ === 'undefined') {
+ if (typeof Dom7 === 'undefined') {
+ $ = window.Dom7 || window.Zepto || window.jQuery;
+ }
+ else {
+ $ = Dom7;
+ }
+ if (!$) return;
+ }
+ // Export it to Swiper instance
+ s.$ = $;
+
+ /*=========================
+ Breakpoints
+ ===========================*/
+ s.currentBreakpoint = undefined;
+ s.getActiveBreakpoint = function () {
+ //Get breakpoint for window width
+ if (!s.params.breakpoints) return false;
+ var breakpoint = false;
+ var points = [], point;
+ for ( point in s.params.breakpoints ) {
+ if (s.params.breakpoints.hasOwnProperty(point)) {
+ points.push(point);
+ }
+ }
+ points.sort(function (a, b) {
+ return parseInt(a, 10) > parseInt(b, 10);
+ });
+ for (var i = 0; i < points.length; i++) {
+ point = points[i];
+ if (point >= window.innerWidth && !breakpoint) {
+ breakpoint = point;
+ }
+ }
+ return breakpoint || 'max';
+ };
+ s.setBreakpoint = function () {
+ //Set breakpoint for window width and update parameters
+ var breakpoint = s.getActiveBreakpoint();
+ if (breakpoint && s.currentBreakpoint !== breakpoint) {
+ var breakPointsParams = breakpoint in s.params.breakpoints ? s.params.breakpoints[breakpoint] : s.originalParams;
+ var needsReLoop = s.params.loop && (breakPointsParams.slidesPerView !== s.params.slidesPerView);
+ for ( var param in breakPointsParams ) {
+ s.params[param] = breakPointsParams[param];
+ }
+ s.currentBreakpoint = breakpoint;
+ if(needsReLoop && s.destroyLoop) {
+ s.reLoop(true);
+ }
+ }
+ };
+ // Set breakpoint on load
+ if (s.params.breakpoints) {
+ s.setBreakpoint();
+ }
+
+ /*=========================
+ Preparation - Define Container, Wrapper and Pagination
+ ===========================*/
+ s.container = $(container);
+ if (s.container.length === 0) return;
+ if (s.container.length > 1) {
+ var swipers = [];
+ s.container.each(function () {
+ var container = this;
+ swipers.push(new Swiper(this, params));
+ });
+ return swipers;
+ }
+
+ // Save instance in container HTML Element and in data
+ s.container[0].swiper = s;
+ s.container.data('swiper', s);
+
+ s.classNames.push(s.params.containerModifierClass + s.params.direction);
+
+ if (s.params.freeMode) {
+ s.classNames.push(s.params.containerModifierClass + 'free-mode');
+ }
+ if (!s.support.flexbox) {
+ s.classNames.push(s.params.containerModifierClass + 'no-flexbox');
+ s.params.slidesPerColumn = 1;
+ }
+ if (s.params.autoHeight) {
+ s.classNames.push(s.params.containerModifierClass + 'autoheight');
+ }
+ // Enable slides progress when required
+ if (s.params.parallax || s.params.watchSlidesVisibility) {
+ s.params.watchSlidesProgress = true;
+ }
+ // Max resistance when touchReleaseOnEdges
+ if (s.params.touchReleaseOnEdges) {
+ s.params.resistanceRatio = 0;
+ }
+ // Coverflow / 3D
+ if (['cube', 'coverflow', 'flip'].indexOf(s.params.effect) >= 0) {
+ if (s.support.transforms3d) {
+ s.params.watchSlidesProgress = true;
+ s.classNames.push(s.params.containerModifierClass + '3d');
+ }
+ else {
+ s.params.effect = 'slide';
+ }
+ }
+ if (s.params.effect !== 'slide') {
+ s.classNames.push(s.params.containerModifierClass + s.params.effect);
+ }
+ if (s.params.effect === 'cube') {
+ s.params.resistanceRatio = 0;
+ s.params.slidesPerView = 1;
+ s.params.slidesPerColumn = 1;
+ s.params.slidesPerGroup = 1;
+ s.params.centeredSlides = false;
+ s.params.spaceBetween = 0;
+ s.params.virtualTranslate = true;
+ }
+ if (s.params.effect === 'fade' || s.params.effect === 'flip') {
+ s.params.slidesPerView = 1;
+ s.params.slidesPerColumn = 1;
+ s.params.slidesPerGroup = 1;
+ s.params.watchSlidesProgress = true;
+ s.params.spaceBetween = 0;
+ if (typeof initialVirtualTranslate === 'undefined') {
+ s.params.virtualTranslate = true;
+ }
+ }
+
+ // Grab Cursor
+ if (s.params.grabCursor && s.support.touch) {
+ s.params.grabCursor = false;
+ }
+
+ // Wrapper
+ s.wrapper = s.container.children('.' + s.params.wrapperClass);
+
+ // Pagination
+ if (s.params.pagination) {
+ s.paginationContainer = $(s.params.pagination);
+ if (s.params.uniqueNavElements && typeof s.params.pagination === 'string' && s.paginationContainer.length > 1 && s.container.find(s.params.pagination).length === 1) {
+ s.paginationContainer = s.container.find(s.params.pagination);
+ }
+
+ if (s.params.paginationType === 'bullets' && s.params.paginationClickable) {
+ s.paginationContainer.addClass(s.params.paginationModifierClass + 'clickable');
+ }
+ else {
+ s.params.paginationClickable = false;
+ }
+ s.paginationContainer.addClass(s.params.paginationModifierClass + s.params.paginationType);
+ }
+ // Next/Prev Buttons
+ if (s.params.nextButton || s.params.prevButton) {
+ if (s.params.nextButton) {
+ s.nextButton = $(s.params.nextButton);
+ if (s.params.uniqueNavElements && typeof s.params.nextButton === 'string' && s.nextButton.length > 1 && s.container.find(s.params.nextButton).length === 1) {
+ s.nextButton = s.container.find(s.params.nextButton);
+ }
+ }
+ if (s.params.prevButton) {
+ s.prevButton = $(s.params.prevButton);
+ if (s.params.uniqueNavElements && typeof s.params.prevButton === 'string' && s.prevButton.length > 1 && s.container.find(s.params.prevButton).length === 1) {
+ s.prevButton = s.container.find(s.params.prevButton);
+ }
+ }
+ }
+
+ // Is Horizontal
+ s.isHorizontal = function () {
+ return s.params.direction === 'horizontal';
+ };
+ // s.isH = isH;
+
+ // RTL
+ s.rtl = s.isHorizontal() && (s.container[0].dir.toLowerCase() === 'rtl' || s.container.css('direction') === 'rtl');
+ if (s.rtl) {
+ s.classNames.push(s.params.containerModifierClass + 'rtl');
+ }
+
+ // Wrong RTL support
+ if (s.rtl) {
+ s.wrongRTL = s.wrapper.css('display') === '-webkit-box';
+ }
+
+ // Columns
+ if (s.params.slidesPerColumn > 1) {
+ s.classNames.push(s.params.containerModifierClass + 'multirow');
+ }
+
+ // Check for Android
+ if (s.device.android) {
+ s.classNames.push(s.params.containerModifierClass + 'android');
+ }
+
+ // Add classes
+ s.container.addClass(s.classNames.join(' '));
+
+ // Translate
+ s.translate = 0;
+
+ // Progress
+ s.progress = 0;
+
+ // Velocity
+ s.velocity = 0;
+
+ /*=========================
+ Locks, unlocks
+ ===========================*/
+ s.lockSwipeToNext = function () {
+ s.params.allowSwipeToNext = false;
+ if (s.params.allowSwipeToPrev === false && s.params.grabCursor) {
+ s.unsetGrabCursor();
+ }
+ };
+ s.lockSwipeToPrev = function () {
+ s.params.allowSwipeToPrev = false;
+ if (s.params.allowSwipeToNext === false && s.params.grabCursor) {
+ s.unsetGrabCursor();
+ }
+ };
+ s.lockSwipes = function () {
+ s.params.allowSwipeToNext = s.params.allowSwipeToPrev = false;
+ if (s.params.grabCursor) s.unsetGrabCursor();
+ };
+ s.unlockSwipeToNext = function () {
+ s.params.allowSwipeToNext = true;
+ if (s.params.allowSwipeToPrev === true && s.params.grabCursor) {
+ s.setGrabCursor();
+ }
+ };
+ s.unlockSwipeToPrev = function () {
+ s.params.allowSwipeToPrev = true;
+ if (s.params.allowSwipeToNext === true && s.params.grabCursor) {
+ s.setGrabCursor();
+ }
+ };
+ s.unlockSwipes = function () {
+ s.params.allowSwipeToNext = s.params.allowSwipeToPrev = true;
+ if (s.params.grabCursor) s.setGrabCursor();
+ };
+
+ /*=========================
+ Round helper
+ ===========================*/
+ function round(a) {
+ return Math.floor(a);
+ }
+ /*=========================
+ Set grab cursor
+ ===========================*/
+ s.setGrabCursor = function(moving) {
+ s.container[0].style.cursor = 'move';
+ s.container[0].style.cursor = moving ? '-webkit-grabbing' : '-webkit-grab';
+ s.container[0].style.cursor = moving ? '-moz-grabbin' : '-moz-grab';
+ s.container[0].style.cursor = moving ? 'grabbing': 'grab';
+ };
+ s.unsetGrabCursor = function () {
+ s.container[0].style.cursor = '';
+ };
+ if (s.params.grabCursor) {
+ s.setGrabCursor();
+ }
+ /*=========================
+ Update on Images Ready
+ ===========================*/
+ s.imagesToLoad = [];
+ s.imagesLoaded = 0;
+
+ s.loadImage = function (imgElement, src, srcset, sizes, checkForComplete, callback) {
+ var image;
+ function onReady () {
+ if (callback) callback();
+ }
+ if (!imgElement.complete || !checkForComplete) {
+ if (src) {
+ image = new window.Image();
+ image.onload = onReady;
+ image.onerror = onReady;
+ if (sizes) {
+ image.sizes = sizes;
+ }
+ if (srcset) {
+ image.srcset = srcset;
+ }
+ if (src) {
+ image.src = src;
+ }
+ } else {
+ onReady();
+ }
+
+ } else {//image already loaded...
+ onReady();
+ }
+ };
+ s.preloadImages = function () {
+ s.imagesToLoad = s.container.find('img');
+ function _onReady() {
+ if (typeof s === 'undefined' || s === null || !s) return;
+ if (s.imagesLoaded !== undefined) s.imagesLoaded++;
+ if (s.imagesLoaded === s.imagesToLoad.length) {
+ if (s.params.updateOnImagesReady) s.update();
+ s.emit('onImagesReady', s);
+ }
+ }
+ for (var i = 0; i < s.imagesToLoad.length; i++) {
+ s.loadImage(s.imagesToLoad[i], (s.imagesToLoad[i].currentSrc || s.imagesToLoad[i].getAttribute('src')), (s.imagesToLoad[i].srcset || s.imagesToLoad[i].getAttribute('srcset')), s.imagesToLoad[i].sizes || s.imagesToLoad[i].getAttribute('sizes'), true, _onReady);
+ }
+ };
+
+ /*=========================
+ Autoplay
+ ===========================*/
+ s.autoplayTimeoutId = undefined;
+ s.autoplaying = false;
+ s.autoplayPaused = false;
+ function autoplay() {
+ var autoplayDelay = s.params.autoplay;
+ var activeSlide = s.slides.eq(s.activeIndex);
+ if (activeSlide.attr('data-swiper-autoplay')) {
+ autoplayDelay = activeSlide.attr('data-swiper-autoplay') || s.params.autoplay;
+ }
+ s.autoplayTimeoutId = setTimeout(function () {
+ if (s.params.loop) {
+ s.fixLoop();
+ s._slideNext();
+ s.emit('onAutoplay', s);
+ }
+ else {
+ if (!s.isEnd) {
+ s._slideNext();
+ s.emit('onAutoplay', s);
+ }
+ else {
+ if (!params.autoplayStopOnLast) {
+ s._slideTo(0);
+ s.emit('onAutoplay', s);
+ }
+ else {
+ s.stopAutoplay();
+ }
+ }
+ }
+ }, autoplayDelay);
+ }
+ s.startAutoplay = function () {
+ if (typeof s.autoplayTimeoutId !== 'undefined') return false;
+ if (!s.params.autoplay) return false;
+ if (s.autoplaying) return false;
+ s.autoplaying = true;
+ s.emit('onAutoplayStart', s);
+ autoplay();
+ };
+ s.stopAutoplay = function (internal) {
+ if (!s.autoplayTimeoutId) return;
+ if (s.autoplayTimeoutId) clearTimeout(s.autoplayTimeoutId);
+ s.autoplaying = false;
+ s.autoplayTimeoutId = undefined;
+ s.emit('onAutoplayStop', s);
+ };
+ s.pauseAutoplay = function (speed) {
+ if (s.autoplayPaused) return;
+ if (s.autoplayTimeoutId) clearTimeout(s.autoplayTimeoutId);
+ s.autoplayPaused = true;
+ if (speed === 0) {
+ s.autoplayPaused = false;
+ autoplay();
+ }
+ else {
+ s.wrapper.transitionEnd(function () {
+ if (!s) return;
+ s.autoplayPaused = false;
+ if (!s.autoplaying) {
+ s.stopAutoplay();
+ }
+ else {
+ autoplay();
+ }
+ });
+ }
+ };
+ /*=========================
+ Min/Max Translate
+ ===========================*/
+ s.minTranslate = function () {
+ return (-s.snapGrid[0]);
+ };
+ s.maxTranslate = function () {
+ return (-s.snapGrid[s.snapGrid.length - 1]);
+ };
+ /*=========================
+ Slider/slides sizes
+ ===========================*/
+ s.updateAutoHeight = function () {
+ var activeSlides = [];
+ var newHeight = 0;
+ var i;
+
+ // Find slides currently in view
+ if(s.params.slidesPerView !== 'auto' && s.params.slidesPerView > 1) {
+ for (i = 0; i < Math.ceil(s.params.slidesPerView); i++) {
+ var index = s.activeIndex + i;
+ if(index > s.slides.length) break;
+ activeSlides.push(s.slides.eq(index)[0]);
+ }
+ } else {
+ activeSlides.push(s.slides.eq(s.activeIndex)[0]);
+ }
+
+ // Find new height from heighest slide in view
+ for (i = 0; i < activeSlides.length; i++) {
+ if (typeof activeSlides[i] !== 'undefined') {
+ var height = activeSlides[i].offsetHeight;
+ newHeight = height > newHeight ? height : newHeight;
+ }
+ }
+
+ // Update Height
+ if (newHeight) s.wrapper.css('height', newHeight + 'px');
+ };
+ s.updateContainerSize = function () {
+ var width, height;
+ if (typeof s.params.width !== 'undefined') {
+ width = s.params.width;
+ }
+ else {
+ width = s.container[0].clientWidth;
+ }
+ if (typeof s.params.height !== 'undefined') {
+ height = s.params.height;
+ }
+ else {
+ height = s.container[0].clientHeight;
+ }
+ if (width === 0 && s.isHorizontal() || height === 0 && !s.isHorizontal()) {
+ return;
+ }
+
+ //Subtract paddings
+ width = width - parseInt(s.container.css('padding-left'), 10) - parseInt(s.container.css('padding-right'), 10);
+ height = height - parseInt(s.container.css('padding-top'), 10) - parseInt(s.container.css('padding-bottom'), 10);
+
+ // Store values
+ s.width = width;
+ s.height = height;
+ s.size = s.isHorizontal() ? s.width : s.height;
+ };
+
+ s.updateSlidesSize = function () {
+ s.slides = s.wrapper.children('.' + s.params.slideClass);
+ s.snapGrid = [];
+ s.slidesGrid = [];
+ s.slidesSizesGrid = [];
+
+ var spaceBetween = s.params.spaceBetween,
+ slidePosition = -s.params.slidesOffsetBefore,
+ i,
+ prevSlideSize = 0,
+ index = 0;
+ if (typeof s.size === 'undefined') return;
+ if (typeof spaceBetween === 'string' && spaceBetween.indexOf('%') >= 0) {
+ spaceBetween = parseFloat(spaceBetween.replace('%', '')) / 100 * s.size;
+ }
+
+ s.virtualSize = -spaceBetween;
+ // reset margins
+ if (s.rtl) s.slides.css({marginLeft: '', marginTop: ''});
+ else s.slides.css({marginRight: '', marginBottom: ''});
+
+ var slidesNumberEvenToRows;
+ if (s.params.slidesPerColumn > 1) {
+ if (Math.floor(s.slides.length / s.params.slidesPerColumn) === s.slides.length / s.params.slidesPerColumn) {
+ slidesNumberEvenToRows = s.slides.length;
+ }
+ else {
+ slidesNumberEvenToRows = Math.ceil(s.slides.length / s.params.slidesPerColumn) * s.params.slidesPerColumn;
+ }
+ if (s.params.slidesPerView !== 'auto' && s.params.slidesPerColumnFill === 'row') {
+ slidesNumberEvenToRows = Math.max(slidesNumberEvenToRows, s.params.slidesPerView * s.params.slidesPerColumn);
+ }
+ }
+
+ // Calc slides
+ var slideSize;
+ var slidesPerColumn = s.params.slidesPerColumn;
+ var slidesPerRow = slidesNumberEvenToRows / slidesPerColumn;
+ var numFullColumns = slidesPerRow - (s.params.slidesPerColumn * slidesPerRow - s.slides.length);
+ for (i = 0; i < s.slides.length; i++) {
+ slideSize = 0;
+ var slide = s.slides.eq(i);
+ if (s.params.slidesPerColumn > 1) {
+ // Set slides order
+ var newSlideOrderIndex;
+ var column, row;
+ if (s.params.slidesPerColumnFill === 'column') {
+ column = Math.floor(i / slidesPerColumn);
+ row = i - column * slidesPerColumn;
+ if (column > numFullColumns || (column === numFullColumns && row === slidesPerColumn-1)) {
+ if (++row >= slidesPerColumn) {
+ row = 0;
+ column++;
+ }
+ }
+ newSlideOrderIndex = column + row * slidesNumberEvenToRows / slidesPerColumn;
+ slide
+ .css({
+ '-webkit-box-ordinal-group': newSlideOrderIndex,
+ '-moz-box-ordinal-group': newSlideOrderIndex,
+ '-ms-flex-order': newSlideOrderIndex,
+ '-webkit-order': newSlideOrderIndex,
+ 'order': newSlideOrderIndex
+ });
+ }
+ else {
+ row = Math.floor(i / slidesPerRow);
+ column = i - row * slidesPerRow;
+ }
+ slide
+ .css(
+ 'margin-' + (s.isHorizontal() ? 'top' : 'left'),
+ (row !== 0 && s.params.spaceBetween) && (s.params.spaceBetween + 'px')
+ )
+ .attr('data-swiper-column', column)
+ .attr('data-swiper-row', row);
+
+ }
+ if (slide.css('display') === 'none') continue;
+ if (s.params.slidesPerView === 'auto') {
+ slideSize = s.isHorizontal() ? slide.outerWidth(true) : slide.outerHeight(true);
+ if (s.params.roundLengths) slideSize = round(slideSize);
+ }
+ else {
+ slideSize = (s.size - (s.params.slidesPerView - 1) * spaceBetween) / s.params.slidesPerView;
+ if (s.params.roundLengths) slideSize = round(slideSize);
+
+ if (s.isHorizontal()) {
+ s.slides[i].style.width = slideSize + 'px';
+ }
+ else {
+ s.slides[i].style.height = slideSize + 'px';
+ }
+ }
+ s.slides[i].swiperSlideSize = slideSize;
+ s.slidesSizesGrid.push(slideSize);
+
+
+ if (s.params.centeredSlides) {
+ slidePosition = slidePosition + slideSize / 2 + prevSlideSize / 2 + spaceBetween;
+ if(prevSlideSize === 0 && i !== 0) slidePosition = slidePosition - s.size / 2 - spaceBetween;
+ if (i === 0) slidePosition = slidePosition - s.size / 2 - spaceBetween;
+ if (Math.abs(slidePosition) < 1 / 1000) slidePosition = 0;
+ if ((index) % s.params.slidesPerGroup === 0) s.snapGrid.push(slidePosition);
+ s.slidesGrid.push(slidePosition);
+ }
+ else {
+ if ((index) % s.params.slidesPerGroup === 0) s.snapGrid.push(slidePosition);
+ s.slidesGrid.push(slidePosition);
+ slidePosition = slidePosition + slideSize + spaceBetween;
+ }
+
+ s.virtualSize += slideSize + spaceBetween;
+
+ prevSlideSize = slideSize;
+
+ index ++;
+ }
+ s.virtualSize = Math.max(s.virtualSize, s.size) + s.params.slidesOffsetAfter;
+ var newSlidesGrid;
+
+ if (
+ s.rtl && s.wrongRTL && (s.params.effect === 'slide' || s.params.effect === 'coverflow')) {
+ s.wrapper.css({width: s.virtualSize + s.params.spaceBetween + 'px'});
+ }
+ if (!s.support.flexbox || s.params.setWrapperSize) {
+ if (s.isHorizontal()) s.wrapper.css({width: s.virtualSize + s.params.spaceBetween + 'px'});
+ else s.wrapper.css({height: s.virtualSize + s.params.spaceBetween + 'px'});
+ }
+
+ if (s.params.slidesPerColumn > 1) {
+ s.virtualSize = (slideSize + s.params.spaceBetween) * slidesNumberEvenToRows;
+ s.virtualSize = Math.ceil(s.virtualSize / s.params.slidesPerColumn) - s.params.spaceBetween;
+ if (s.isHorizontal()) s.wrapper.css({width: s.virtualSize + s.params.spaceBetween + 'px'});
+ else s.wrapper.css({height: s.virtualSize + s.params.spaceBetween + 'px'});
+ if (s.params.centeredSlides) {
+ newSlidesGrid = [];
+ for (i = 0; i < s.snapGrid.length; i++) {
+ if (s.snapGrid[i] < s.virtualSize + s.snapGrid[0]) newSlidesGrid.push(s.snapGrid[i]);
+ }
+ s.snapGrid = newSlidesGrid;
+ }
+ }
+
+ // Remove last grid elements depending on width
+ if (!s.params.centeredSlides) {
+ newSlidesGrid = [];
+ for (i = 0; i < s.snapGrid.length; i++) {
+ if (s.snapGrid[i] <= s.virtualSize - s.size) {
+ newSlidesGrid.push(s.snapGrid[i]);
+ }
+ }
+ s.snapGrid = newSlidesGrid;
+ if (Math.floor(s.virtualSize - s.size) - Math.floor(s.snapGrid[s.snapGrid.length - 1]) > 1) {
+ s.snapGrid.push(s.virtualSize - s.size);
+ }
+ }
+ if (s.snapGrid.length === 0) s.snapGrid = [0];
+
+ if (s.params.spaceBetween !== 0) {
+ if (s.isHorizontal()) {
+ if (s.rtl) s.slides.css({marginLeft: spaceBetween + 'px'});
+ else s.slides.css({marginRight: spaceBetween + 'px'});
+ }
+ else s.slides.css({marginBottom: spaceBetween + 'px'});
+ }
+ if (s.params.watchSlidesProgress) {
+ s.updateSlidesOffset();
+ }
+ };
+ s.updateSlidesOffset = function () {
+ for (var i = 0; i < s.slides.length; i++) {
+ s.slides[i].swiperSlideOffset = s.isHorizontal() ? s.slides[i].offsetLeft : s.slides[i].offsetTop;
+ }
+ };
+
+ /*=========================
+ Dynamic Slides Per View
+ ===========================*/
+ s.currentSlidesPerView = function () {
+ var spv = 1, i, j;
+ if (s.params.centeredSlides) {
+ var size = s.slides[s.activeIndex].swiperSlideSize;
+ var breakLoop;
+ for (i = s.activeIndex + 1; i < s.slides.length; i++) {
+ if (s.slides[i] && !breakLoop) {
+ size += s.slides[i].swiperSlideSize;
+ spv ++;
+ if (size > s.size) breakLoop = true;
+ }
+ }
+ for (j = s.activeIndex - 1; j >= 0; j--) {
+ if (s.slides[j] && !breakLoop) {
+ size += s.slides[j].swiperSlideSize;
+ spv ++;
+ if (size > s.size) breakLoop = true;
+ }
+ }
+ }
+ else {
+ for (i = s.activeIndex + 1; i < s.slides.length; i++) {
+ if (s.slidesGrid[i] - s.slidesGrid[s.activeIndex] < s.size) {
+ spv++;
+ }
+ }
+ }
+ return spv;
+ };
+ /*=========================
+ Slider/slides progress
+ ===========================*/
+ s.updateSlidesProgress = function (translate) {
+ if (typeof translate === 'undefined') {
+ translate = s.translate || 0;
+ }
+ if (s.slides.length === 0) return;
+ if (typeof s.slides[0].swiperSlideOffset === 'undefined') s.updateSlidesOffset();
+
+ var offsetCenter = -translate;
+ if (s.rtl) offsetCenter = translate;
+
+ // Visible Slides
+ s.slides.removeClass(s.params.slideVisibleClass);
+ for (var i = 0; i < s.slides.length; i++) {
+ var slide = s.slides[i];
+ var slideProgress = (offsetCenter + (s.params.centeredSlides ? s.minTranslate() : 0) - slide.swiperSlideOffset) / (slide.swiperSlideSize + s.params.spaceBetween);
+ if (s.params.watchSlidesVisibility) {
+ var slideBefore = -(offsetCenter - slide.swiperSlideOffset);
+ var slideAfter = slideBefore + s.slidesSizesGrid[i];
+ var isVisible =
+ (slideBefore >= 0 && slideBefore < s.size) ||
+ (slideAfter > 0 && slideAfter <= s.size) ||
+ (slideBefore <= 0 && slideAfter >= s.size);
+ if (isVisible) {
+ s.slides.eq(i).addClass(s.params.slideVisibleClass);
+ }
+ }
+ slide.progress = s.rtl ? -slideProgress : slideProgress;
+ }
+ };
+ s.updateProgress = function (translate) {
+ if (typeof translate === 'undefined') {
+ translate = s.translate || 0;
+ }
+ var translatesDiff = s.maxTranslate() - s.minTranslate();
+ var wasBeginning = s.isBeginning;
+ var wasEnd = s.isEnd;
+ if (translatesDiff === 0) {
+ s.progress = 0;
+ s.isBeginning = s.isEnd = true;
+ }
+ else {
+ s.progress = (translate - s.minTranslate()) / (translatesDiff);
+ s.isBeginning = s.progress <= 0;
+ s.isEnd = s.progress >= 1;
+ }
+ if (s.isBeginning && !wasBeginning) s.emit('onReachBeginning', s);
+ if (s.isEnd && !wasEnd) s.emit('onReachEnd', s);
+
+ if (s.params.watchSlidesProgress) s.updateSlidesProgress(translate);
+ s.emit('onProgress', s, s.progress);
+ };
+ s.updateActiveIndex = function () {
+ var translate = s.rtl ? s.translate : -s.translate;
+ var newActiveIndex, i, snapIndex;
+ for (i = 0; i < s.slidesGrid.length; i ++) {
+ if (typeof s.slidesGrid[i + 1] !== 'undefined') {
+ if (translate >= s.slidesGrid[i] && translate < s.slidesGrid[i + 1] - (s.slidesGrid[i + 1] - s.slidesGrid[i]) / 2) {
+ newActiveIndex = i;
+ }
+ else if (translate >= s.slidesGrid[i] && translate < s.slidesGrid[i + 1]) {
+ newActiveIndex = i + 1;
+ }
+ }
+ else {
+ if (translate >= s.slidesGrid[i]) {
+ newActiveIndex = i;
+ }
+ }
+ }
+ // Normalize slideIndex
+ if(s.params.normalizeSlideIndex){
+ if (newActiveIndex < 0 || typeof newActiveIndex === 'undefined') newActiveIndex = 0;
+ }
+ // for (i = 0; i < s.slidesGrid.length; i++) {
+ // if (- translate >= s.slidesGrid[i]) {
+ // newActiveIndex = i;
+ // }
+ // }
+ snapIndex = Math.floor(newActiveIndex / s.params.slidesPerGroup);
+ if (snapIndex >= s.snapGrid.length) snapIndex = s.snapGrid.length - 1;
+
+ if (newActiveIndex === s.activeIndex) {
+ return;
+ }
+ s.snapIndex = snapIndex;
+ s.previousIndex = s.activeIndex;
+ s.activeIndex = newActiveIndex;
+ s.updateClasses();
+ s.updateRealIndex();
+ };
+ s.updateRealIndex = function(){
+ s.realIndex = parseInt(s.slides.eq(s.activeIndex).attr('data-swiper-slide-index') || s.activeIndex, 10);
+ };
+
+ /*=========================
+ Classes
+ ===========================*/
+ s.updateClasses = function () {
+ s.slides.removeClass(s.params.slideActiveClass + ' ' + s.params.slideNextClass + ' ' + s.params.slidePrevClass + ' ' + s.params.slideDuplicateActiveClass + ' ' + s.params.slideDuplicateNextClass + ' ' + s.params.slideDuplicatePrevClass);
+ var activeSlide = s.slides.eq(s.activeIndex);
+ // Active classes
+ activeSlide.addClass(s.params.slideActiveClass);
+ if (params.loop) {
+ // Duplicate to all looped slides
+ if (activeSlide.hasClass(s.params.slideDuplicateClass)) {
+ s.wrapper.children('.' + s.params.slideClass + ':not(.' + s.params.slideDuplicateClass + ')[data-swiper-slide-index="' + s.realIndex + '"]').addClass(s.params.slideDuplicateActiveClass);
+ }
+ else {
+ s.wrapper.children('.' + s.params.slideClass + '.' + s.params.slideDuplicateClass + '[data-swiper-slide-index="' + s.realIndex + '"]').addClass(s.params.slideDuplicateActiveClass);
+ }
+ }
+ // Next Slide
+ var nextSlide = activeSlide.next('.' + s.params.slideClass).addClass(s.params.slideNextClass);
+ if (s.params.loop && nextSlide.length === 0) {
+ nextSlide = s.slides.eq(0);
+ nextSlide.addClass(s.params.slideNextClass);
+ }
+ // Prev Slide
+ var prevSlide = activeSlide.prev('.' + s.params.slideClass).addClass(s.params.slidePrevClass);
+ if (s.params.loop && prevSlide.length === 0) {
+ prevSlide = s.slides.eq(-1);
+ prevSlide.addClass(s.params.slidePrevClass);
+ }
+ if (params.loop) {
+ // Duplicate to all looped slides
+ if (nextSlide.hasClass(s.params.slideDuplicateClass)) {
+ s.wrapper.children('.' + s.params.slideClass + ':not(.' + s.params.slideDuplicateClass + ')[data-swiper-slide-index="' + nextSlide.attr('data-swiper-slide-index') + '"]').addClass(s.params.slideDuplicateNextClass);
+ }
+ else {
+ s.wrapper.children('.' + s.params.slideClass + '.' + s.params.slideDuplicateClass + '[data-swiper-slide-index="' + nextSlide.attr('data-swiper-slide-index') + '"]').addClass(s.params.slideDuplicateNextClass);
+ }
+ if (prevSlide.hasClass(s.params.slideDuplicateClass)) {
+ s.wrapper.children('.' + s.params.slideClass + ':not(.' + s.params.slideDuplicateClass + ')[data-swiper-slide-index="' + prevSlide.attr('data-swiper-slide-index') + '"]').addClass(s.params.slideDuplicatePrevClass);
+ }
+ else {
+ s.wrapper.children('.' + s.params.slideClass + '.' + s.params.slideDuplicateClass + '[data-swiper-slide-index="' + prevSlide.attr('data-swiper-slide-index') + '"]').addClass(s.params.slideDuplicatePrevClass);
+ }
+ }
+
+ // Pagination
+ if (s.paginationContainer && s.paginationContainer.length > 0) {
+ // Current/Total
+ var current,
+ total = s.params.loop ? Math.ceil((s.slides.length - s.loopedSlides * 2) / s.params.slidesPerGroup) : s.snapGrid.length;
+ if (s.params.loop) {
+ current = Math.ceil((s.activeIndex - s.loopedSlides)/s.params.slidesPerGroup);
+ if (current > s.slides.length - 1 - s.loopedSlides * 2) {
+ current = current - (s.slides.length - s.loopedSlides * 2);
+ }
+ if (current > total - 1) current = current - total;
+ if (current < 0 && s.params.paginationType !== 'bullets') current = total + current;
+ }
+ else {
+ if (typeof s.snapIndex !== 'undefined') {
+ current = s.snapIndex;
+ }
+ else {
+ current = s.activeIndex || 0;
+ }
+ }
+ // Types
+ if (s.params.paginationType === 'bullets' && s.bullets && s.bullets.length > 0) {
+ s.bullets.removeClass(s.params.bulletActiveClass);
+ if (s.paginationContainer.length > 1) {
+ s.bullets.each(function () {
+ if ($(this).index() === current) $(this).addClass(s.params.bulletActiveClass);
+ });
+ }
+ else {
+ s.bullets.eq(current).addClass(s.params.bulletActiveClass);
+ }
+ }
+ if (s.params.paginationType === 'fraction') {
+ s.paginationContainer.find('.' + s.params.paginationCurrentClass).text(current + 1);
+ s.paginationContainer.find('.' + s.params.paginationTotalClass).text(total);
+ }
+ if (s.params.paginationType === 'progress') {
+ var scale = (current + 1) / total,
+ scaleX = scale,
+ scaleY = 1;
+ if (!s.isHorizontal()) {
+ scaleY = scale;
+ scaleX = 1;
+ }
+ s.paginationContainer.find('.' + s.params.paginationProgressbarClass).transform('translate3d(0,0,0) scaleX(' + scaleX + ') scaleY(' + scaleY + ')').transition(s.params.speed);
+ }
+ if (s.params.paginationType === 'custom' && s.params.paginationCustomRender) {
+ s.paginationContainer.html(s.params.paginationCustomRender(s, current + 1, total));
+ s.emit('onPaginationRendered', s, s.paginationContainer[0]);
+ }
+ }
+
+ // Next/active buttons
+ if (!s.params.loop) {
+ if (s.params.prevButton && s.prevButton && s.prevButton.length > 0) {
+ if (s.isBeginning) {
+ s.prevButton.addClass(s.params.buttonDisabledClass);
+ if (s.params.a11y && s.a11y) s.a11y.disable(s.prevButton);
+ }
+ else {
+ s.prevButton.removeClass(s.params.buttonDisabledClass);
+ if (s.params.a11y && s.a11y) s.a11y.enable(s.prevButton);
+ }
+ }
+ if (s.params.nextButton && s.nextButton && s.nextButton.length > 0) {
+ if (s.isEnd) {
+ s.nextButton.addClass(s.params.buttonDisabledClass);
+ if (s.params.a11y && s.a11y) s.a11y.disable(s.nextButton);
+ }
+ else {
+ s.nextButton.removeClass(s.params.buttonDisabledClass);
+ if (s.params.a11y && s.a11y) s.a11y.enable(s.nextButton);
+ }
+ }
+ }
+ };
+
+ /*=========================
+ Pagination
+ ===========================*/
+ s.updatePagination = function () {
+ if (!s.params.pagination) return;
+ if (s.paginationContainer && s.paginationContainer.length > 0) {
+ var paginationHTML = '';
+ if (s.params.paginationType === 'bullets') {
+ var numberOfBullets = s.params.loop ? Math.ceil((s.slides.length - s.loopedSlides * 2) / s.params.slidesPerGroup) : s.snapGrid.length;
+ for (var i = 0; i < numberOfBullets; i++) {
+ if (s.params.paginationBulletRender) {
+ paginationHTML += s.params.paginationBulletRender(s, i, s.params.bulletClass);
+ }
+ else {
+ paginationHTML += '<' + s.params.paginationElement+' class="' + s.params.bulletClass + '">' + s.params.paginationElement + '>';
+ }
+ }
+ s.paginationContainer.html(paginationHTML);
+ s.bullets = s.paginationContainer.find('.' + s.params.bulletClass);
+ if (s.params.paginationClickable && s.params.a11y && s.a11y) {
+ s.a11y.initPagination();
+ }
+ }
+ if (s.params.paginationType === 'fraction') {
+ if (s.params.paginationFractionRender) {
+ paginationHTML = s.params.paginationFractionRender(s, s.params.paginationCurrentClass, s.params.paginationTotalClass);
+ }
+ else {
+ paginationHTML =
+ '' +
+ ' / ' +
+ '';
+ }
+ s.paginationContainer.html(paginationHTML);
+ }
+ if (s.params.paginationType === 'progress') {
+ if (s.params.paginationProgressRender) {
+ paginationHTML = s.params.paginationProgressRender(s, s.params.paginationProgressbarClass);
+ }
+ else {
+ paginationHTML = '';
+ }
+ s.paginationContainer.html(paginationHTML);
+ }
+ if (s.params.paginationType !== 'custom') {
+ s.emit('onPaginationRendered', s, s.paginationContainer[0]);
+ }
+ }
+ };
+ /*=========================
+ Common update method
+ ===========================*/
+ s.update = function (updateTranslate) {
+ if (!s) return;
+ s.updateContainerSize();
+ s.updateSlidesSize();
+ s.updateProgress();
+ s.updatePagination();
+ s.updateClasses();
+ if (s.params.scrollbar && s.scrollbar) {
+ s.scrollbar.set();
+ }
+ var newTranslate;
+ function forceSetTranslate() {
+ var translate = s.rtl ? -s.translate : s.translate;
+ newTranslate = Math.min(Math.max(s.translate, s.maxTranslate()), s.minTranslate());
+ s.setWrapperTranslate(newTranslate);
+ s.updateActiveIndex();
+ s.updateClasses();
+ }
+ if (updateTranslate) {
+ var translated;
+ if (s.controller && s.controller.spline) {
+ s.controller.spline = undefined;
+ }
+ if (s.params.freeMode) {
+ forceSetTranslate();
+ if (s.params.autoHeight) {
+ s.updateAutoHeight();
+ }
+ }
+ else {
+ if ((s.params.slidesPerView === 'auto' || s.params.slidesPerView > 1) && s.isEnd && !s.params.centeredSlides) {
+ translated = s.slideTo(s.slides.length - 1, 0, false, true);
+ }
+ else {
+ translated = s.slideTo(s.activeIndex, 0, false, true);
+ }
+ if (!translated) {
+ forceSetTranslate();
+ }
+ }
+ }
+ else if (s.params.autoHeight) {
+ s.updateAutoHeight();
+ }
+ };
+
+ /*=========================
+ Resize Handler
+ ===========================*/
+ s.onResize = function (forceUpdatePagination) {
+ if (s.params.onBeforeResize) s.params.onBeforeResize(s);
+ //Breakpoints
+ if (s.params.breakpoints) {
+ s.setBreakpoint();
+ }
+
+ // Disable locks on resize
+ var allowSwipeToPrev = s.params.allowSwipeToPrev;
+ var allowSwipeToNext = s.params.allowSwipeToNext;
+ s.params.allowSwipeToPrev = s.params.allowSwipeToNext = true;
+
+ s.updateContainerSize();
+ s.updateSlidesSize();
+ if (s.params.slidesPerView === 'auto' || s.params.freeMode || forceUpdatePagination) s.updatePagination();
+ if (s.params.scrollbar && s.scrollbar) {
+ s.scrollbar.set();
+ }
+ if (s.controller && s.controller.spline) {
+ s.controller.spline = undefined;
+ }
+ var slideChangedBySlideTo = false;
+ if (s.params.freeMode) {
+ var newTranslate = Math.min(Math.max(s.translate, s.maxTranslate()), s.minTranslate());
+ s.setWrapperTranslate(newTranslate);
+ s.updateActiveIndex();
+ s.updateClasses();
+
+ if (s.params.autoHeight) {
+ s.updateAutoHeight();
+ }
+ }
+ else {
+ s.updateClasses();
+ if ((s.params.slidesPerView === 'auto' || s.params.slidesPerView > 1) && s.isEnd && !s.params.centeredSlides) {
+ slideChangedBySlideTo = s.slideTo(s.slides.length - 1, 0, false, true);
+ }
+ else {
+ slideChangedBySlideTo = s.slideTo(s.activeIndex, 0, false, true);
+ }
+ }
+ if (s.params.lazyLoading && !slideChangedBySlideTo && s.lazy) {
+ s.lazy.load();
+ }
+ // Return locks after resize
+ s.params.allowSwipeToPrev = allowSwipeToPrev;
+ s.params.allowSwipeToNext = allowSwipeToNext;
+ if (s.params.onAfterResize) s.params.onAfterResize(s);
+ };
+
+ /*=========================
+ Events
+ ===========================*/
+
+ //Define Touch Events
+ s.touchEventsDesktop = {start: 'mousedown', move: 'mousemove', end: 'mouseup'};
+ if (window.navigator.pointerEnabled) s.touchEventsDesktop = {start: 'pointerdown', move: 'pointermove', end: 'pointerup'};
+ else if (window.navigator.msPointerEnabled) s.touchEventsDesktop = {start: 'MSPointerDown', move: 'MSPointerMove', end: 'MSPointerUp'};
+ s.touchEvents = {
+ start : s.support.touch || !s.params.simulateTouch ? 'touchstart' : s.touchEventsDesktop.start,
+ move : s.support.touch || !s.params.simulateTouch ? 'touchmove' : s.touchEventsDesktop.move,
+ end : s.support.touch || !s.params.simulateTouch ? 'touchend' : s.touchEventsDesktop.end
+ };
+
+
+ // WP8 Touch Events Fix
+ if (window.navigator.pointerEnabled || window.navigator.msPointerEnabled) {
+ (s.params.touchEventsTarget === 'container' ? s.container : s.wrapper).addClass('swiper-wp8-' + s.params.direction);
+ }
+
+ // Attach/detach events
+ s.initEvents = function (detach) {
+ var actionDom = detach ? 'off' : 'on';
+ var action = detach ? 'removeEventListener' : 'addEventListener';
+ var touchEventsTarget = s.params.touchEventsTarget === 'container' ? s.container[0] : s.wrapper[0];
+ var target = s.support.touch ? touchEventsTarget : document;
+
+ var moveCapture = s.params.nested ? true : false;
+
+ //Touch Events
+ if (s.browser.ie) {
+ touchEventsTarget[action](s.touchEvents.start, s.onTouchStart, false);
+ target[action](s.touchEvents.move, s.onTouchMove, moveCapture);
+ target[action](s.touchEvents.end, s.onTouchEnd, false);
+ }
+ else {
+ if (s.support.touch) {
+ var passiveListener = s.touchEvents.start === 'touchstart' && s.support.passiveListener && s.params.passiveListeners ? {passive: true, capture: false} : false;
+ touchEventsTarget[action](s.touchEvents.start, s.onTouchStart, passiveListener);
+ touchEventsTarget[action](s.touchEvents.move, s.onTouchMove, moveCapture);
+ touchEventsTarget[action](s.touchEvents.end, s.onTouchEnd, passiveListener);
+ }
+ if ((params.simulateTouch && !s.device.ios && !s.device.android) || (params.simulateTouch && !s.support.touch && s.device.ios)) {
+ touchEventsTarget[action]('mousedown', s.onTouchStart, false);
+ document[action]('mousemove', s.onTouchMove, moveCapture);
+ document[action]('mouseup', s.onTouchEnd, false);
+ }
+ }
+ window[action]('resize', s.onResize);
+
+ // Next, Prev, Index
+ if (s.params.nextButton && s.nextButton && s.nextButton.length > 0) {
+ s.nextButton[actionDom]('click', s.onClickNext);
+ if (s.params.a11y && s.a11y) s.nextButton[actionDom]('keydown', s.a11y.onEnterKey);
+ }
+ if (s.params.prevButton && s.prevButton && s.prevButton.length > 0) {
+ s.prevButton[actionDom]('click', s.onClickPrev);
+ if (s.params.a11y && s.a11y) s.prevButton[actionDom]('keydown', s.a11y.onEnterKey);
+ }
+ if (s.params.pagination && s.params.paginationClickable) {
+ s.paginationContainer[actionDom]('click', '.' + s.params.bulletClass, s.onClickIndex);
+ if (s.params.a11y && s.a11y) s.paginationContainer[actionDom]('keydown', '.' + s.params.bulletClass, s.a11y.onEnterKey);
+ }
+
+ // Prevent Links Clicks
+ if (s.params.preventClicks || s.params.preventClicksPropagation) touchEventsTarget[action]('click', s.preventClicks, true);
+ };
+ s.attachEvents = function () {
+ s.initEvents();
+ };
+ s.detachEvents = function () {
+ s.initEvents(true);
+ };
+
+ /*=========================
+ Handle Clicks
+ ===========================*/
+ // Prevent Clicks
+ s.allowClick = true;
+ s.preventClicks = function (e) {
+ if (!s.allowClick) {
+ if (s.params.preventClicks) e.preventDefault();
+ if (s.params.preventClicksPropagation && s.animating) {
+ e.stopPropagation();
+ e.stopImmediatePropagation();
+ }
+ }
+ };
+ // Clicks
+ s.onClickNext = function (e) {
+ e.preventDefault();
+ if (s.isEnd && !s.params.loop) return;
+ s.slideNext();
+ };
+ s.onClickPrev = function (e) {
+ e.preventDefault();
+ if (s.isBeginning && !s.params.loop) return;
+ s.slidePrev();
+ };
+ s.onClickIndex = function (e) {
+ e.preventDefault();
+ var index = $(this).index() * s.params.slidesPerGroup;
+ if (s.params.loop) index = index + s.loopedSlides;
+ s.slideTo(index);
+ };
+
+ /*=========================
+ Handle Touches
+ ===========================*/
+ function findElementInEvent(e, selector) {
+ var el = $(e.target);
+ if (!el.is(selector)) {
+ if (typeof selector === 'string') {
+ el = el.parents(selector);
+ }
+ else if (selector.nodeType) {
+ var found;
+ el.parents().each(function (index, _el) {
+ if (_el === selector) found = selector;
+ });
+ if (!found) return undefined;
+ else return selector;
+ }
+ }
+ if (el.length === 0) {
+ return undefined;
+ }
+ return el[0];
+ }
+ s.updateClickedSlide = function (e) {
+ var slide = findElementInEvent(e, '.' + s.params.slideClass);
+ var slideFound = false;
+ if (slide) {
+ for (var i = 0; i < s.slides.length; i++) {
+ if (s.slides[i] === slide) slideFound = true;
+ }
+ }
+
+ if (slide && slideFound) {
+ s.clickedSlide = slide;
+ s.clickedIndex = $(slide).index();
+ }
+ else {
+ s.clickedSlide = undefined;
+ s.clickedIndex = undefined;
+ return;
+ }
+ if (s.params.slideToClickedSlide && s.clickedIndex !== undefined && s.clickedIndex !== s.activeIndex) {
+ var slideToIndex = s.clickedIndex,
+ realIndex,
+ duplicatedSlides,
+ slidesPerView = s.params.slidesPerView === 'auto' ? s.currentSlidesPerView() : s.params.slidesPerView;
+ if (s.params.loop) {
+ if (s.animating) return;
+ realIndex = parseInt($(s.clickedSlide).attr('data-swiper-slide-index'), 10);
+ if (s.params.centeredSlides) {
+ if ((slideToIndex < s.loopedSlides - slidesPerView/2) || (slideToIndex > s.slides.length - s.loopedSlides + slidesPerView/2)) {
+ s.fixLoop();
+ slideToIndex = s.wrapper.children('.' + s.params.slideClass + '[data-swiper-slide-index="' + realIndex + '"]:not(.' + s.params.slideDuplicateClass + ')').eq(0).index();
+ setTimeout(function () {
+ s.slideTo(slideToIndex);
+ }, 0);
+ }
+ else {
+ s.slideTo(slideToIndex);
+ }
+ }
+ else {
+ if (slideToIndex > s.slides.length - slidesPerView) {
+ s.fixLoop();
+ slideToIndex = s.wrapper.children('.' + s.params.slideClass + '[data-swiper-slide-index="' + realIndex + '"]:not(.' + s.params.slideDuplicateClass + ')').eq(0).index();
+ setTimeout(function () {
+ s.slideTo(slideToIndex);
+ }, 0);
+ }
+ else {
+ s.slideTo(slideToIndex);
+ }
+ }
+ }
+ else {
+ s.slideTo(slideToIndex);
+ }
+ }
+ };
+
+ var isTouched,
+ isMoved,
+ allowTouchCallbacks,
+ touchStartTime,
+ isScrolling,
+ currentTranslate,
+ startTranslate,
+ allowThresholdMove,
+ // Form elements to match
+ formElements = 'input, select, textarea, button, video',
+ // Last click time
+ lastClickTime = Date.now(), clickTimeout,
+ //Velocities
+ velocities = [],
+ allowMomentumBounce;
+
+ // Animating Flag
+ s.animating = false;
+
+ // Touches information
+ s.touches = {
+ startX: 0,
+ startY: 0,
+ currentX: 0,
+ currentY: 0,
+ diff: 0
+ };
+
+ // Touch handlers
+ var isTouchEvent, startMoving;
+ s.onTouchStart = function (e) {
+ if (e.originalEvent) e = e.originalEvent;
+ isTouchEvent = e.type === 'touchstart';
+ if (!isTouchEvent && 'which' in e && e.which === 3) return;
+ if (s.params.noSwiping && findElementInEvent(e, '.' + s.params.noSwipingClass)) {
+ s.allowClick = true;
+ return;
+ }
+ if (s.params.swipeHandler) {
+ if (!findElementInEvent(e, s.params.swipeHandler)) return;
+ }
+
+ var startX = s.touches.currentX = e.type === 'touchstart' ? e.targetTouches[0].pageX : e.pageX;
+ var startY = s.touches.currentY = e.type === 'touchstart' ? e.targetTouches[0].pageY : e.pageY;
+
+ // Do NOT start if iOS edge swipe is detected. Otherwise iOS app (UIWebView) cannot swipe-to-go-back anymore
+ if(s.device.ios && s.params.iOSEdgeSwipeDetection && startX <= s.params.iOSEdgeSwipeThreshold) {
+ return;
+ }
+
+ isTouched = true;
+ isMoved = false;
+ allowTouchCallbacks = true;
+ isScrolling = undefined;
+ startMoving = undefined;
+ s.touches.startX = startX;
+ s.touches.startY = startY;
+ touchStartTime = Date.now();
+ s.allowClick = true;
+ s.updateContainerSize();
+ s.swipeDirection = undefined;
+ if (s.params.threshold > 0) allowThresholdMove = false;
+ if (e.type !== 'touchstart') {
+ var preventDefault = true;
+ if ($(e.target).is(formElements)) preventDefault = false;
+ if (document.activeElement && $(document.activeElement).is(formElements)) {
+ document.activeElement.blur();
+ }
+ if (preventDefault) {
+ e.preventDefault();
+ }
+ }
+ s.emit('onTouchStart', s, e);
+ };
+
+ s.onTouchMove = function (e) {
+ if (e.originalEvent) e = e.originalEvent;
+ if (isTouchEvent && e.type === 'mousemove') return;
+ if (e.preventedByNestedSwiper) {
+ s.touches.startX = e.type === 'touchmove' ? e.targetTouches[0].pageX : e.pageX;
+ s.touches.startY = e.type === 'touchmove' ? e.targetTouches[0].pageY : e.pageY;
+ return;
+ }
+ if (s.params.onlyExternal) {
+ // isMoved = true;
+ s.allowClick = false;
+ if (isTouched) {
+ s.touches.startX = s.touches.currentX = e.type === 'touchmove' ? e.targetTouches[0].pageX : e.pageX;
+ s.touches.startY = s.touches.currentY = e.type === 'touchmove' ? e.targetTouches[0].pageY : e.pageY;
+ touchStartTime = Date.now();
+ }
+ return;
+ }
+ if (isTouchEvent && s.params.touchReleaseOnEdges && !s.params.loop) {
+ if (!s.isHorizontal()) {
+ // Vertical
+ if (
+ (s.touches.currentY < s.touches.startY && s.translate <= s.maxTranslate()) ||
+ (s.touches.currentY > s.touches.startY && s.translate >= s.minTranslate())
+ ) {
+ return;
+ }
+ }
+ else {
+ if (
+ (s.touches.currentX < s.touches.startX && s.translate <= s.maxTranslate()) ||
+ (s.touches.currentX > s.touches.startX && s.translate >= s.minTranslate())
+ ) {
+ return;
+ }
+ }
+ }
+ if (isTouchEvent && document.activeElement) {
+ if (e.target === document.activeElement && $(e.target).is(formElements)) {
+ isMoved = true;
+ s.allowClick = false;
+ return;
+ }
+ }
+ if (allowTouchCallbacks) {
+ s.emit('onTouchMove', s, e);
+ }
+ if (e.targetTouches && e.targetTouches.length > 1) return;
+
+ s.touches.currentX = e.type === 'touchmove' ? e.targetTouches[0].pageX : e.pageX;
+ s.touches.currentY = e.type === 'touchmove' ? e.targetTouches[0].pageY : e.pageY;
+
+ if (typeof isScrolling === 'undefined') {
+ var touchAngle;
+ if (s.isHorizontal() && s.touches.currentY === s.touches.startY || !s.isHorizontal() && s.touches.currentX === s.touches.startX) {
+ isScrolling = false;
+ }
+ else {
+ touchAngle = Math.atan2(Math.abs(s.touches.currentY - s.touches.startY), Math.abs(s.touches.currentX - s.touches.startX)) * 180 / Math.PI;
+ isScrolling = s.isHorizontal() ? touchAngle > s.params.touchAngle : (90 - touchAngle > s.params.touchAngle);
+ }
+ }
+ if (isScrolling) {
+ s.emit('onTouchMoveOpposite', s, e);
+ }
+ if (typeof startMoving === 'undefined') {
+ if (s.touches.currentX !== s.touches.startX || s.touches.currentY !== s.touches.startY) {
+ startMoving = true;
+ }
+ }
+ if (!isTouched) return;
+ if (isScrolling) {
+ isTouched = false;
+ return;
+ }
+ if (!startMoving) {
+ return;
+ }
+ s.allowClick = false;
+ s.emit('onSliderMove', s, e);
+ e.preventDefault();
+ if (s.params.touchMoveStopPropagation && !s.params.nested) {
+ e.stopPropagation();
+ }
+
+ if (!isMoved) {
+ if (params.loop) {
+ s.fixLoop();
+ }
+ startTranslate = s.getWrapperTranslate();
+ s.setWrapperTransition(0);
+ if (s.animating) {
+ s.wrapper.trigger('webkitTransitionEnd transitionend oTransitionEnd MSTransitionEnd msTransitionEnd');
+ }
+ if (s.params.autoplay && s.autoplaying) {
+ if (s.params.autoplayDisableOnInteraction) {
+ s.stopAutoplay();
+ }
+ else {
+ s.pauseAutoplay();
+ }
+ }
+ allowMomentumBounce = false;
+ //Grab Cursor
+ if (s.params.grabCursor && (s.params.allowSwipeToNext === true || s.params.allowSwipeToPrev === true)) {
+ s.setGrabCursor(true);
+ }
+ }
+ isMoved = true;
+
+ var diff = s.touches.diff = s.isHorizontal() ? s.touches.currentX - s.touches.startX : s.touches.currentY - s.touches.startY;
+
+ diff = diff * s.params.touchRatio;
+ if (s.rtl) diff = -diff;
+
+ s.swipeDirection = diff > 0 ? 'prev' : 'next';
+ currentTranslate = diff + startTranslate;
+
+ var disableParentSwiper = true;
+ if ((diff > 0 && currentTranslate > s.minTranslate())) {
+ disableParentSwiper = false;
+ if (s.params.resistance) currentTranslate = s.minTranslate() - 1 + Math.pow(-s.minTranslate() + startTranslate + diff, s.params.resistanceRatio);
+ }
+ else if (diff < 0 && currentTranslate < s.maxTranslate()) {
+ disableParentSwiper = false;
+ if (s.params.resistance) currentTranslate = s.maxTranslate() + 1 - Math.pow(s.maxTranslate() - startTranslate - diff, s.params.resistanceRatio);
+ }
+
+ if (disableParentSwiper) {
+ e.preventedByNestedSwiper = true;
+ }
+
+ // Directions locks
+ if (!s.params.allowSwipeToNext && s.swipeDirection === 'next' && currentTranslate < startTranslate) {
+ currentTranslate = startTranslate;
+ }
+ if (!s.params.allowSwipeToPrev && s.swipeDirection === 'prev' && currentTranslate > startTranslate) {
+ currentTranslate = startTranslate;
+ }
+
+
+ // Threshold
+ if (s.params.threshold > 0) {
+ if (Math.abs(diff) > s.params.threshold || allowThresholdMove) {
+ if (!allowThresholdMove) {
+ allowThresholdMove = true;
+ s.touches.startX = s.touches.currentX;
+ s.touches.startY = s.touches.currentY;
+ currentTranslate = startTranslate;
+ s.touches.diff = s.isHorizontal() ? s.touches.currentX - s.touches.startX : s.touches.currentY - s.touches.startY;
+ return;
+ }
+ }
+ else {
+ currentTranslate = startTranslate;
+ return;
+ }
+ }
+
+ if (!s.params.followFinger) return;
+
+ // Update active index in free mode
+ if (s.params.freeMode || s.params.watchSlidesProgress) {
+ s.updateActiveIndex();
+ }
+ if (s.params.freeMode) {
+ //Velocity
+ if (velocities.length === 0) {
+ velocities.push({
+ position: s.touches[s.isHorizontal() ? 'startX' : 'startY'],
+ time: touchStartTime
+ });
+ }
+ velocities.push({
+ position: s.touches[s.isHorizontal() ? 'currentX' : 'currentY'],
+ time: (new window.Date()).getTime()
+ });
+ }
+ // Update progress
+ s.updateProgress(currentTranslate);
+ // Update translate
+ s.setWrapperTranslate(currentTranslate);
+ };
+ s.onTouchEnd = function (e) {
+ if (e.originalEvent) e = e.originalEvent;
+ if (allowTouchCallbacks) {
+ s.emit('onTouchEnd', s, e);
+ }
+ allowTouchCallbacks = false;
+ if (!isTouched) return;
+ //Return Grab Cursor
+ if (s.params.grabCursor && isMoved && isTouched && (s.params.allowSwipeToNext === true || s.params.allowSwipeToPrev === true)) {
+ s.setGrabCursor(false);
+ }
+
+ // Time diff
+ var touchEndTime = Date.now();
+ var timeDiff = touchEndTime - touchStartTime;
+
+ // Tap, doubleTap, Click
+ if (s.allowClick) {
+ s.updateClickedSlide(e);
+ s.emit('onTap', s, e);
+ if (timeDiff < 300 && (touchEndTime - lastClickTime) > 300) {
+ if (clickTimeout) clearTimeout(clickTimeout);
+ clickTimeout = setTimeout(function () {
+ if (!s) return;
+ if (s.params.paginationHide && s.paginationContainer.length > 0 && !$(e.target).hasClass(s.params.bulletClass)) {
+ s.paginationContainer.toggleClass(s.params.paginationHiddenClass);
+ }
+ s.emit('onClick', s, e);
+ }, 300);
+
+ }
+ if (timeDiff < 300 && (touchEndTime - lastClickTime) < 300) {
+ if (clickTimeout) clearTimeout(clickTimeout);
+ s.emit('onDoubleTap', s, e);
+ }
+ }
+
+ lastClickTime = Date.now();
+ setTimeout(function () {
+ if (s) s.allowClick = true;
+ }, 0);
+
+ if (!isTouched || !isMoved || !s.swipeDirection || s.touches.diff === 0 || currentTranslate === startTranslate) {
+ isTouched = isMoved = false;
+ return;
+ }
+ isTouched = isMoved = false;
+
+ var currentPos;
+ if (s.params.followFinger) {
+ currentPos = s.rtl ? s.translate : -s.translate;
+ }
+ else {
+ currentPos = -currentTranslate;
+ }
+ if (s.params.freeMode) {
+ if (currentPos < -s.minTranslate()) {
+ s.slideTo(s.activeIndex);
+ return;
+ }
+ else if (currentPos > -s.maxTranslate()) {
+ if (s.slides.length < s.snapGrid.length) {
+ s.slideTo(s.snapGrid.length - 1);
+ }
+ else {
+ s.slideTo(s.slides.length - 1);
+ }
+ return;
+ }
+
+ if (s.params.freeModeMomentum) {
+ if (velocities.length > 1) {
+ var lastMoveEvent = velocities.pop(), velocityEvent = velocities.pop();
+
+ var distance = lastMoveEvent.position - velocityEvent.position;
+ var time = lastMoveEvent.time - velocityEvent.time;
+ s.velocity = distance / time;
+ s.velocity = s.velocity / 2;
+ if (Math.abs(s.velocity) < s.params.freeModeMinimumVelocity) {
+ s.velocity = 0;
+ }
+ // this implies that the user stopped moving a finger then released.
+ // There would be no events with distance zero, so the last event is stale.
+ if (time > 150 || (new window.Date().getTime() - lastMoveEvent.time) > 300) {
+ s.velocity = 0;
+ }
+ } else {
+ s.velocity = 0;
+ }
+ s.velocity = s.velocity * s.params.freeModeMomentumVelocityRatio;
+
+ velocities.length = 0;
+ var momentumDuration = 1000 * s.params.freeModeMomentumRatio;
+ var momentumDistance = s.velocity * momentumDuration;
+
+ var newPosition = s.translate + momentumDistance;
+ if (s.rtl) newPosition = - newPosition;
+ var doBounce = false;
+ var afterBouncePosition;
+ var bounceAmount = Math.abs(s.velocity) * 20 * s.params.freeModeMomentumBounceRatio;
+ if (newPosition < s.maxTranslate()) {
+ if (s.params.freeModeMomentumBounce) {
+ if (newPosition + s.maxTranslate() < -bounceAmount) {
+ newPosition = s.maxTranslate() - bounceAmount;
+ }
+ afterBouncePosition = s.maxTranslate();
+ doBounce = true;
+ allowMomentumBounce = true;
+ }
+ else {
+ newPosition = s.maxTranslate();
+ }
+ }
+ else if (newPosition > s.minTranslate()) {
+ if (s.params.freeModeMomentumBounce) {
+ if (newPosition - s.minTranslate() > bounceAmount) {
+ newPosition = s.minTranslate() + bounceAmount;
+ }
+ afterBouncePosition = s.minTranslate();
+ doBounce = true;
+ allowMomentumBounce = true;
+ }
+ else {
+ newPosition = s.minTranslate();
+ }
+ }
+ else if (s.params.freeModeSticky) {
+ var j = 0,
+ nextSlide;
+ for (j = 0; j < s.snapGrid.length; j += 1) {
+ if (s.snapGrid[j] > -newPosition) {
+ nextSlide = j;
+ break;
+ }
+
+ }
+ if (Math.abs(s.snapGrid[nextSlide] - newPosition) < Math.abs(s.snapGrid[nextSlide - 1] - newPosition) || s.swipeDirection === 'next') {
+ newPosition = s.snapGrid[nextSlide];
+ } else {
+ newPosition = s.snapGrid[nextSlide - 1];
+ }
+ if (!s.rtl) newPosition = - newPosition;
+ }
+ //Fix duration
+ if (s.velocity !== 0) {
+ if (s.rtl) {
+ momentumDuration = Math.abs((-newPosition - s.translate) / s.velocity);
+ }
+ else {
+ momentumDuration = Math.abs((newPosition - s.translate) / s.velocity);
+ }
+ }
+ else if (s.params.freeModeSticky) {
+ s.slideReset();
+ return;
+ }
+
+ if (s.params.freeModeMomentumBounce && doBounce) {
+ s.updateProgress(afterBouncePosition);
+ s.setWrapperTransition(momentumDuration);
+ s.setWrapperTranslate(newPosition);
+ s.onTransitionStart();
+ s.animating = true;
+ s.wrapper.transitionEnd(function () {
+ if (!s || !allowMomentumBounce) return;
+ s.emit('onMomentumBounce', s);
+
+ s.setWrapperTransition(s.params.speed);
+ s.setWrapperTranslate(afterBouncePosition);
+ s.wrapper.transitionEnd(function () {
+ if (!s) return;
+ s.onTransitionEnd();
+ });
+ });
+ } else if (s.velocity) {
+ s.updateProgress(newPosition);
+ s.setWrapperTransition(momentumDuration);
+ s.setWrapperTranslate(newPosition);
+ s.onTransitionStart();
+ if (!s.animating) {
+ s.animating = true;
+ s.wrapper.transitionEnd(function () {
+ if (!s) return;
+ s.onTransitionEnd();
+ });
+ }
+
+ } else {
+ s.updateProgress(newPosition);
+ }
+
+ s.updateActiveIndex();
+ }
+ if (!s.params.freeModeMomentum || timeDiff >= s.params.longSwipesMs) {
+ s.updateProgress();
+ s.updateActiveIndex();
+ }
+ return;
+ }
+
+ // Find current slide
+ var i, stopIndex = 0, groupSize = s.slidesSizesGrid[0];
+ for (i = 0; i < s.slidesGrid.length; i += s.params.slidesPerGroup) {
+ if (typeof s.slidesGrid[i + s.params.slidesPerGroup] !== 'undefined') {
+ if (currentPos >= s.slidesGrid[i] && currentPos < s.slidesGrid[i + s.params.slidesPerGroup]) {
+ stopIndex = i;
+ groupSize = s.slidesGrid[i + s.params.slidesPerGroup] - s.slidesGrid[i];
+ }
+ }
+ else {
+ if (currentPos >= s.slidesGrid[i]) {
+ stopIndex = i;
+ groupSize = s.slidesGrid[s.slidesGrid.length - 1] - s.slidesGrid[s.slidesGrid.length - 2];
+ }
+ }
+ }
+
+ // Find current slide size
+ var ratio = (currentPos - s.slidesGrid[stopIndex]) / groupSize;
+
+ if (timeDiff > s.params.longSwipesMs) {
+ // Long touches
+ if (!s.params.longSwipes) {
+ s.slideTo(s.activeIndex);
+ return;
+ }
+ if (s.swipeDirection === 'next') {
+ if (ratio >= s.params.longSwipesRatio) s.slideTo(stopIndex + s.params.slidesPerGroup);
+ else s.slideTo(stopIndex);
+
+ }
+ if (s.swipeDirection === 'prev') {
+ if (ratio > (1 - s.params.longSwipesRatio)) s.slideTo(stopIndex + s.params.slidesPerGroup);
+ else s.slideTo(stopIndex);
+ }
+ }
+ else {
+ // Short swipes
+ if (!s.params.shortSwipes) {
+ s.slideTo(s.activeIndex);
+ return;
+ }
+ if (s.swipeDirection === 'next') {
+ s.slideTo(stopIndex + s.params.slidesPerGroup);
+
+ }
+ if (s.swipeDirection === 'prev') {
+ s.slideTo(stopIndex);
+ }
+ }
+ };
+ /*=========================
+ Transitions
+ ===========================*/
+ s._slideTo = function (slideIndex, speed) {
+ return s.slideTo(slideIndex, speed, true, true);
+ };
+ s.slideTo = function (slideIndex, speed, runCallbacks, internal) {
+ if (typeof runCallbacks === 'undefined') runCallbacks = true;
+ if (typeof slideIndex === 'undefined') slideIndex = 0;
+ if (slideIndex < 0) slideIndex = 0;
+ s.snapIndex = Math.floor(slideIndex / s.params.slidesPerGroup);
+ if (s.snapIndex >= s.snapGrid.length) s.snapIndex = s.snapGrid.length - 1;
+
+ var translate = - s.snapGrid[s.snapIndex];
+ // Stop autoplay
+ if (s.params.autoplay && s.autoplaying) {
+ if (internal || !s.params.autoplayDisableOnInteraction) {
+ s.pauseAutoplay(speed);
+ }
+ else {
+ s.stopAutoplay();
+ }
+ }
+ // Update progress
+ s.updateProgress(translate);
+
+ // Normalize slideIndex
+ if(s.params.normalizeSlideIndex){
+ for (var i = 0; i < s.slidesGrid.length; i++) {
+ if (- Math.floor(translate * 100) >= Math.floor(s.slidesGrid[i] * 100)) {
+ slideIndex = i;
+ }
+ }
+ }
+
+ // Directions locks
+ if (!s.params.allowSwipeToNext && translate < s.translate && translate < s.minTranslate()) {
+ return false;
+ }
+ if (!s.params.allowSwipeToPrev && translate > s.translate && translate > s.maxTranslate()) {
+ if ((s.activeIndex || 0) !== slideIndex ) return false;
+ }
+
+ // Update Index
+ if (typeof speed === 'undefined') speed = s.params.speed;
+ s.previousIndex = s.activeIndex || 0;
+ s.activeIndex = slideIndex;
+ s.updateRealIndex();
+ if ((s.rtl && -translate === s.translate) || (!s.rtl && translate === s.translate)) {
+ // Update Height
+ if (s.params.autoHeight) {
+ s.updateAutoHeight();
+ }
+ s.updateClasses();
+ if (s.params.effect !== 'slide') {
+ s.setWrapperTranslate(translate);
+ }
+ return false;
+ }
+ s.updateClasses();
+ s.onTransitionStart(runCallbacks);
+
+ if (speed === 0 || s.browser.lteIE9) {
+ s.setWrapperTranslate(translate);
+ s.setWrapperTransition(0);
+ s.onTransitionEnd(runCallbacks);
+ }
+ else {
+ s.setWrapperTranslate(translate);
+ s.setWrapperTransition(speed);
+ if (!s.animating) {
+ s.animating = true;
+ s.wrapper.transitionEnd(function () {
+ if (!s) return;
+ s.onTransitionEnd(runCallbacks);
+ });
+ }
+
+ }
+
+ return true;
+ };
+
+ s.onTransitionStart = function (runCallbacks) {
+ if (typeof runCallbacks === 'undefined') runCallbacks = true;
+ if (s.params.autoHeight) {
+ s.updateAutoHeight();
+ }
+ if (s.lazy) s.lazy.onTransitionStart();
+ if (runCallbacks) {
+ s.emit('onTransitionStart', s);
+ if (s.activeIndex !== s.previousIndex) {
+ s.emit('onSlideChangeStart', s);
+ if (s.activeIndex > s.previousIndex) {
+ s.emit('onSlideNextStart', s);
+ }
+ else {
+ s.emit('onSlidePrevStart', s);
+ }
+ }
+
+ }
+ };
+ s.onTransitionEnd = function (runCallbacks) {
+ s.animating = false;
+ s.setWrapperTransition(0);
+ if (typeof runCallbacks === 'undefined') runCallbacks = true;
+ if (s.lazy) s.lazy.onTransitionEnd();
+ if (runCallbacks) {
+ s.emit('onTransitionEnd', s);
+ if (s.activeIndex !== s.previousIndex) {
+ s.emit('onSlideChangeEnd', s);
+ if (s.activeIndex > s.previousIndex) {
+ s.emit('onSlideNextEnd', s);
+ }
+ else {
+ s.emit('onSlidePrevEnd', s);
+ }
+ }
+ }
+ if (s.params.history && s.history) {
+ s.history.setHistory(s.params.history, s.activeIndex);
+ }
+ if (s.params.hashnav && s.hashnav) {
+ s.hashnav.setHash();
+ }
+
+ };
+ s.slideNext = function (runCallbacks, speed, internal) {
+ if (s.params.loop) {
+ if (s.animating) return false;
+ s.fixLoop();
+ var clientLeft = s.container[0].clientLeft;
+ return s.slideTo(s.activeIndex + s.params.slidesPerGroup, speed, runCallbacks, internal);
+ }
+ else return s.slideTo(s.activeIndex + s.params.slidesPerGroup, speed, runCallbacks, internal);
+ };
+ s._slideNext = function (speed) {
+ return s.slideNext(true, speed, true);
+ };
+ s.slidePrev = function (runCallbacks, speed, internal) {
+ if (s.params.loop) {
+ if (s.animating) return false;
+ s.fixLoop();
+ var clientLeft = s.container[0].clientLeft;
+ return s.slideTo(s.activeIndex - 1, speed, runCallbacks, internal);
+ }
+ else return s.slideTo(s.activeIndex - 1, speed, runCallbacks, internal);
+ };
+ s._slidePrev = function (speed) {
+ return s.slidePrev(true, speed, true);
+ };
+ s.slideReset = function (runCallbacks, speed, internal) {
+ return s.slideTo(s.activeIndex, speed, runCallbacks);
+ };
+
+ s.disableTouchControl = function () {
+ s.params.onlyExternal = true;
+ return true;
+ };
+ s.enableTouchControl = function () {
+ s.params.onlyExternal = false;
+ return true;
+ };
+
+ /*=========================
+ Translate/transition helpers
+ ===========================*/
+ s.setWrapperTransition = function (duration, byController) {
+ s.wrapper.transition(duration);
+ if (s.params.effect !== 'slide' && s.effects[s.params.effect]) {
+ s.effects[s.params.effect].setTransition(duration);
+ }
+ if (s.params.parallax && s.parallax) {
+ s.parallax.setTransition(duration);
+ }
+ if (s.params.scrollbar && s.scrollbar) {
+ s.scrollbar.setTransition(duration);
+ }
+ if (s.params.control && s.controller) {
+ s.controller.setTransition(duration, byController);
+ }
+ s.emit('onSetTransition', s, duration);
+ };
+ s.setWrapperTranslate = function (translate, updateActiveIndex, byController) {
+ var x = 0, y = 0, z = 0;
+ if (s.isHorizontal()) {
+ x = s.rtl ? -translate : translate;
+ }
+ else {
+ y = translate;
+ }
+
+ if (s.params.roundLengths) {
+ x = round(x);
+ y = round(y);
+ }
+
+ if (!s.params.virtualTranslate) {
+ if (s.support.transforms3d) s.wrapper.transform('translate3d(' + x + 'px, ' + y + 'px, ' + z + 'px)');
+ else s.wrapper.transform('translate(' + x + 'px, ' + y + 'px)');
+ }
+
+ s.translate = s.isHorizontal() ? x : y;
+
+ // Check if we need to update progress
+ var progress;
+ var translatesDiff = s.maxTranslate() - s.minTranslate();
+ if (translatesDiff === 0) {
+ progress = 0;
+ }
+ else {
+ progress = (translate - s.minTranslate()) / (translatesDiff);
+ }
+ if (progress !== s.progress) {
+ s.updateProgress(translate);
+ }
+
+ if (updateActiveIndex) s.updateActiveIndex();
+ if (s.params.effect !== 'slide' && s.effects[s.params.effect]) {
+ s.effects[s.params.effect].setTranslate(s.translate);
+ }
+ if (s.params.parallax && s.parallax) {
+ s.parallax.setTranslate(s.translate);
+ }
+ if (s.params.scrollbar && s.scrollbar) {
+ s.scrollbar.setTranslate(s.translate);
+ }
+ if (s.params.control && s.controller) {
+ s.controller.setTranslate(s.translate, byController);
+ }
+ s.emit('onSetTranslate', s, s.translate);
+ };
+
+ s.getTranslate = function (el, axis) {
+ var matrix, curTransform, curStyle, transformMatrix;
+
+ // automatic axis detection
+ if (typeof axis === 'undefined') {
+ axis = 'x';
+ }
+
+ if (s.params.virtualTranslate) {
+ return s.rtl ? -s.translate : s.translate;
+ }
+
+ curStyle = window.getComputedStyle(el, null);
+ if (window.WebKitCSSMatrix) {
+ curTransform = curStyle.transform || curStyle.webkitTransform;
+ if (curTransform.split(',').length > 6) {
+ curTransform = curTransform.split(', ').map(function(a){
+ return a.replace(',','.');
+ }).join(', ');
+ }
+ // Some old versions of Webkit choke when 'none' is passed; pass
+ // empty string instead in this case
+ transformMatrix = new window.WebKitCSSMatrix(curTransform === 'none' ? '' : curTransform);
+ }
+ else {
+ transformMatrix = curStyle.MozTransform || curStyle.OTransform || curStyle.MsTransform || curStyle.msTransform || curStyle.transform || curStyle.getPropertyValue('transform').replace('translate(', 'matrix(1, 0, 0, 1,');
+ matrix = transformMatrix.toString().split(',');
+ }
+
+ if (axis === 'x') {
+ //Latest Chrome and webkits Fix
+ if (window.WebKitCSSMatrix)
+ curTransform = transformMatrix.m41;
+ //Crazy IE10 Matrix
+ else if (matrix.length === 16)
+ curTransform = parseFloat(matrix[12]);
+ //Normal Browsers
+ else
+ curTransform = parseFloat(matrix[4]);
+ }
+ if (axis === 'y') {
+ //Latest Chrome and webkits Fix
+ if (window.WebKitCSSMatrix)
+ curTransform = transformMatrix.m42;
+ //Crazy IE10 Matrix
+ else if (matrix.length === 16)
+ curTransform = parseFloat(matrix[13]);
+ //Normal Browsers
+ else
+ curTransform = parseFloat(matrix[5]);
+ }
+ if (s.rtl && curTransform) curTransform = -curTransform;
+ return curTransform || 0;
+ };
+ s.getWrapperTranslate = function (axis) {
+ if (typeof axis === 'undefined') {
+ axis = s.isHorizontal() ? 'x' : 'y';
+ }
+ return s.getTranslate(s.wrapper[0], axis);
+ };
+
+ /*=========================
+ Observer
+ ===========================*/
+ s.observers = [];
+ function initObserver(target, options) {
+ options = options || {};
+ // create an observer instance
+ var ObserverFunc = window.MutationObserver || window.WebkitMutationObserver;
+ var observer = new ObserverFunc(function (mutations) {
+ mutations.forEach(function (mutation) {
+ s.onResize(true);
+ s.emit('onObserverUpdate', s, mutation);
+ });
+ });
+
+ observer.observe(target, {
+ attributes: typeof options.attributes === 'undefined' ? true : options.attributes,
+ childList: typeof options.childList === 'undefined' ? true : options.childList,
+ characterData: typeof options.characterData === 'undefined' ? true : options.characterData
+ });
+
+ s.observers.push(observer);
+ }
+ s.initObservers = function () {
+ if (s.params.observeParents) {
+ var containerParents = s.container.parents();
+ for (var i = 0; i < containerParents.length; i++) {
+ initObserver(containerParents[i]);
+ }
+ }
+
+ // Observe container
+ initObserver(s.container[0], {childList: false});
+
+ // Observe wrapper
+ initObserver(s.wrapper[0], {attributes: false});
+ };
+ s.disconnectObservers = function () {
+ for (var i = 0; i < s.observers.length; i++) {
+ s.observers[i].disconnect();
+ }
+ s.observers = [];
+ };
+ /*=========================
+ Loop
+ ===========================*/
+ // Create looped slides
+ s.createLoop = function () {
+ // Remove duplicated slides
+ s.wrapper.children('.' + s.params.slideClass + '.' + s.params.slideDuplicateClass).remove();
+
+ var slides = s.wrapper.children('.' + s.params.slideClass);
+
+ if(s.params.slidesPerView === 'auto' && !s.params.loopedSlides) s.params.loopedSlides = slides.length;
+
+ s.loopedSlides = parseInt(s.params.loopedSlides || s.params.slidesPerView, 10);
+ s.loopedSlides = s.loopedSlides + s.params.loopAdditionalSlides;
+ if (s.loopedSlides > slides.length) {
+ s.loopedSlides = slides.length;
+ }
+
+ var prependSlides = [], appendSlides = [], i;
+ slides.each(function (index, el) {
+ var slide = $(this);
+ if (index < s.loopedSlides) appendSlides.push(el);
+ if (index < slides.length && index >= slides.length - s.loopedSlides) prependSlides.push(el);
+ slide.attr('data-swiper-slide-index', index);
+ });
+ for (i = 0; i < appendSlides.length; i++) {
+ s.wrapper.append($(appendSlides[i].cloneNode(true)).addClass(s.params.slideDuplicateClass));
+ }
+ for (i = prependSlides.length - 1; i >= 0; i--) {
+ s.wrapper.prepend($(prependSlides[i].cloneNode(true)).addClass(s.params.slideDuplicateClass));
+ }
+ };
+ s.destroyLoop = function () {
+ s.wrapper.children('.' + s.params.slideClass + '.' + s.params.slideDuplicateClass).remove();
+ s.slides.removeAttr('data-swiper-slide-index');
+ };
+ s.reLoop = function (updatePosition) {
+ var oldIndex = s.activeIndex - s.loopedSlides;
+ s.destroyLoop();
+ s.createLoop();
+ s.updateSlidesSize();
+ if (updatePosition) {
+ s.slideTo(oldIndex + s.loopedSlides, 0, false);
+ }
+
+ };
+ s.fixLoop = function () {
+ var newIndex;
+ //Fix For Negative Oversliding
+ if (s.activeIndex < s.loopedSlides) {
+ newIndex = s.slides.length - s.loopedSlides * 3 + s.activeIndex;
+ newIndex = newIndex + s.loopedSlides;
+ s.slideTo(newIndex, 0, false, true);
+ }
+ //Fix For Positive Oversliding
+ else if ((s.params.slidesPerView === 'auto' && s.activeIndex >= s.loopedSlides * 2) || (s.activeIndex > s.slides.length - s.params.slidesPerView * 2)) {
+ newIndex = -s.slides.length + s.activeIndex + s.loopedSlides;
+ newIndex = newIndex + s.loopedSlides;
+ s.slideTo(newIndex, 0, false, true);
+ }
+ };
+ /*=========================
+ Append/Prepend/Remove Slides
+ ===========================*/
+ s.appendSlide = function (slides) {
+ if (s.params.loop) {
+ s.destroyLoop();
+ }
+ if (typeof slides === 'object' && slides.length) {
+ for (var i = 0; i < slides.length; i++) {
+ if (slides[i]) s.wrapper.append(slides[i]);
+ }
+ }
+ else {
+ s.wrapper.append(slides);
+ }
+ if (s.params.loop) {
+ s.createLoop();
+ }
+ if (!(s.params.observer && s.support.observer)) {
+ s.update(true);
+ }
+ };
+ s.prependSlide = function (slides) {
+ if (s.params.loop) {
+ s.destroyLoop();
+ }
+ var newActiveIndex = s.activeIndex + 1;
+ if (typeof slides === 'object' && slides.length) {
+ for (var i = 0; i < slides.length; i++) {
+ if (slides[i]) s.wrapper.prepend(slides[i]);
+ }
+ newActiveIndex = s.activeIndex + slides.length;
+ }
+ else {
+ s.wrapper.prepend(slides);
+ }
+ if (s.params.loop) {
+ s.createLoop();
+ }
+ if (!(s.params.observer && s.support.observer)) {
+ s.update(true);
+ }
+ s.slideTo(newActiveIndex, 0, false);
+ };
+ s.removeSlide = function (slidesIndexes) {
+ if (s.params.loop) {
+ s.destroyLoop();
+ s.slides = s.wrapper.children('.' + s.params.slideClass);
+ }
+ var newActiveIndex = s.activeIndex,
+ indexToRemove;
+ if (typeof slidesIndexes === 'object' && slidesIndexes.length) {
+ for (var i = 0; i < slidesIndexes.length; i++) {
+ indexToRemove = slidesIndexes[i];
+ if (s.slides[indexToRemove]) s.slides.eq(indexToRemove).remove();
+ if (indexToRemove < newActiveIndex) newActiveIndex--;
+ }
+ newActiveIndex = Math.max(newActiveIndex, 0);
+ }
+ else {
+ indexToRemove = slidesIndexes;
+ if (s.slides[indexToRemove]) s.slides.eq(indexToRemove).remove();
+ if (indexToRemove < newActiveIndex) newActiveIndex--;
+ newActiveIndex = Math.max(newActiveIndex, 0);
+ }
+
+ if (s.params.loop) {
+ s.createLoop();
+ }
+
+ if (!(s.params.observer && s.support.observer)) {
+ s.update(true);
+ }
+ if (s.params.loop) {
+ s.slideTo(newActiveIndex + s.loopedSlides, 0, false);
+ }
+ else {
+ s.slideTo(newActiveIndex, 0, false);
+ }
+
+ };
+ s.removeAllSlides = function () {
+ var slidesIndexes = [];
+ for (var i = 0; i < s.slides.length; i++) {
+ slidesIndexes.push(i);
+ }
+ s.removeSlide(slidesIndexes);
+ };
+
+
+ /*=========================
+ Effects
+ ===========================*/
+ s.effects = {
+ fade: {
+ setTranslate: function () {
+ for (var i = 0; i < s.slides.length; i++) {
+ var slide = s.slides.eq(i);
+ var offset = slide[0].swiperSlideOffset;
+ var tx = -offset;
+ if (!s.params.virtualTranslate) tx = tx - s.translate;
+ var ty = 0;
+ if (!s.isHorizontal()) {
+ ty = tx;
+ tx = 0;
+ }
+ var slideOpacity = s.params.fade.crossFade ?
+ Math.max(1 - Math.abs(slide[0].progress), 0) :
+ 1 + Math.min(Math.max(slide[0].progress, -1), 0);
+ slide
+ .css({
+ opacity: slideOpacity
+ })
+ .transform('translate3d(' + tx + 'px, ' + ty + 'px, 0px)');
+
+ }
+
+ },
+ setTransition: function (duration) {
+ s.slides.transition(duration);
+ if (s.params.virtualTranslate && duration !== 0) {
+ var eventTriggered = false;
+ s.slides.transitionEnd(function () {
+ if (eventTriggered) return;
+ if (!s) return;
+ eventTriggered = true;
+ s.animating = false;
+ var triggerEvents = ['webkitTransitionEnd', 'transitionend', 'oTransitionEnd', 'MSTransitionEnd', 'msTransitionEnd'];
+ for (var i = 0; i < triggerEvents.length; i++) {
+ s.wrapper.trigger(triggerEvents[i]);
+ }
+ });
+ }
+ }
+ },
+ flip: {
+ setTranslate: function () {
+ for (var i = 0; i < s.slides.length; i++) {
+ var slide = s.slides.eq(i);
+ var progress = slide[0].progress;
+ if (s.params.flip.limitRotation) {
+ progress = Math.max(Math.min(slide[0].progress, 1), -1);
+ }
+ var offset = slide[0].swiperSlideOffset;
+ var rotate = -180 * progress,
+ rotateY = rotate,
+ rotateX = 0,
+ tx = -offset,
+ ty = 0;
+ if (!s.isHorizontal()) {
+ ty = tx;
+ tx = 0;
+ rotateX = -rotateY;
+ rotateY = 0;
+ }
+ else if (s.rtl) {
+ rotateY = -rotateY;
+ }
+
+ slide[0].style.zIndex = -Math.abs(Math.round(progress)) + s.slides.length;
+
+ if (s.params.flip.slideShadows) {
+ //Set shadows
+ var shadowBefore = s.isHorizontal() ? slide.find('.swiper-slide-shadow-left') : slide.find('.swiper-slide-shadow-top');
+ var shadowAfter = s.isHorizontal() ? slide.find('.swiper-slide-shadow-right') : slide.find('.swiper-slide-shadow-bottom');
+ if (shadowBefore.length === 0) {
+ shadowBefore = $('
');
+ slide.append(shadowBefore);
+ }
+ if (shadowAfter.length === 0) {
+ shadowAfter = $('
');
+ slide.append(shadowAfter);
+ }
+ if (shadowBefore.length) shadowBefore[0].style.opacity = Math.max(-progress, 0);
+ if (shadowAfter.length) shadowAfter[0].style.opacity = Math.max(progress, 0);
+ }
+
+ slide
+ .transform('translate3d(' + tx + 'px, ' + ty + 'px, 0px) rotateX(' + rotateX + 'deg) rotateY(' + rotateY + 'deg)');
+ }
+ },
+ setTransition: function (duration) {
+ s.slides.transition(duration).find('.swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left').transition(duration);
+ if (s.params.virtualTranslate && duration !== 0) {
+ var eventTriggered = false;
+ s.slides.eq(s.activeIndex).transitionEnd(function () {
+ if (eventTriggered) return;
+ if (!s) return;
+ if (!$(this).hasClass(s.params.slideActiveClass)) return;
+ eventTriggered = true;
+ s.animating = false;
+ var triggerEvents = ['webkitTransitionEnd', 'transitionend', 'oTransitionEnd', 'MSTransitionEnd', 'msTransitionEnd'];
+ for (var i = 0; i < triggerEvents.length; i++) {
+ s.wrapper.trigger(triggerEvents[i]);
+ }
+ });
+ }
+ }
+ },
+ cube: {
+ setTranslate: function () {
+ var wrapperRotate = 0, cubeShadow;
+ if (s.params.cube.shadow) {
+ if (s.isHorizontal()) {
+ cubeShadow = s.wrapper.find('.swiper-cube-shadow');
+ if (cubeShadow.length === 0) {
+ cubeShadow = $('
');
+ s.wrapper.append(cubeShadow);
+ }
+ cubeShadow.css({height: s.width + 'px'});
+ }
+ else {
+ cubeShadow = s.container.find('.swiper-cube-shadow');
+ if (cubeShadow.length === 0) {
+ cubeShadow = $('
');
+ s.container.append(cubeShadow);
+ }
+ }
+ }
+ for (var i = 0; i < s.slides.length; i++) {
+ var slide = s.slides.eq(i);
+ var slideAngle = i * 90;
+ var round = Math.floor(slideAngle / 360);
+ if (s.rtl) {
+ slideAngle = -slideAngle;
+ round = Math.floor(-slideAngle / 360);
+ }
+ var progress = Math.max(Math.min(slide[0].progress, 1), -1);
+ var tx = 0, ty = 0, tz = 0;
+ if (i % 4 === 0) {
+ tx = - round * 4 * s.size;
+ tz = 0;
+ }
+ else if ((i - 1) % 4 === 0) {
+ tx = 0;
+ tz = - round * 4 * s.size;
+ }
+ else if ((i - 2) % 4 === 0) {
+ tx = s.size + round * 4 * s.size;
+ tz = s.size;
+ }
+ else if ((i - 3) % 4 === 0) {
+ tx = - s.size;
+ tz = 3 * s.size + s.size * 4 * round;
+ }
+ if (s.rtl) {
+ tx = -tx;
+ }
+
+ if (!s.isHorizontal()) {
+ ty = tx;
+ tx = 0;
+ }
+
+ var transform = 'rotateX(' + (s.isHorizontal() ? 0 : -slideAngle) + 'deg) rotateY(' + (s.isHorizontal() ? slideAngle : 0) + 'deg) translate3d(' + tx + 'px, ' + ty + 'px, ' + tz + 'px)';
+ if (progress <= 1 && progress > -1) {
+ wrapperRotate = i * 90 + progress * 90;
+ if (s.rtl) wrapperRotate = -i * 90 - progress * 90;
+ }
+ slide.transform(transform);
+ if (s.params.cube.slideShadows) {
+ //Set shadows
+ var shadowBefore = s.isHorizontal() ? slide.find('.swiper-slide-shadow-left') : slide.find('.swiper-slide-shadow-top');
+ var shadowAfter = s.isHorizontal() ? slide.find('.swiper-slide-shadow-right') : slide.find('.swiper-slide-shadow-bottom');
+ if (shadowBefore.length === 0) {
+ shadowBefore = $('
');
+ slide.append(shadowBefore);
+ }
+ if (shadowAfter.length === 0) {
+ shadowAfter = $('
');
+ slide.append(shadowAfter);
+ }
+ if (shadowBefore.length) shadowBefore[0].style.opacity = Math.max(-progress, 0);
+ if (shadowAfter.length) shadowAfter[0].style.opacity = Math.max(progress, 0);
+ }
+ }
+ s.wrapper.css({
+ '-webkit-transform-origin': '50% 50% -' + (s.size / 2) + 'px',
+ '-moz-transform-origin': '50% 50% -' + (s.size / 2) + 'px',
+ '-ms-transform-origin': '50% 50% -' + (s.size / 2) + 'px',
+ 'transform-origin': '50% 50% -' + (s.size / 2) + 'px'
+ });
+
+ if (s.params.cube.shadow) {
+ if (s.isHorizontal()) {
+ cubeShadow.transform('translate3d(0px, ' + (s.width / 2 + s.params.cube.shadowOffset) + 'px, ' + (-s.width / 2) + 'px) rotateX(90deg) rotateZ(0deg) scale(' + (s.params.cube.shadowScale) + ')');
+ }
+ else {
+ var shadowAngle = Math.abs(wrapperRotate) - Math.floor(Math.abs(wrapperRotate) / 90) * 90;
+ var multiplier = 1.5 - (Math.sin(shadowAngle * 2 * Math.PI / 360) / 2 + Math.cos(shadowAngle * 2 * Math.PI / 360) / 2);
+ var scale1 = s.params.cube.shadowScale,
+ scale2 = s.params.cube.shadowScale / multiplier,
+ offset = s.params.cube.shadowOffset;
+ cubeShadow.transform('scale3d(' + scale1 + ', 1, ' + scale2 + ') translate3d(0px, ' + (s.height / 2 + offset) + 'px, ' + (-s.height / 2 / scale2) + 'px) rotateX(-90deg)');
+ }
+ }
+ var zFactor = (s.isSafari || s.isUiWebView) ? (-s.size / 2) : 0;
+ s.wrapper.transform('translate3d(0px,0,' + zFactor + 'px) rotateX(' + (s.isHorizontal() ? 0 : wrapperRotate) + 'deg) rotateY(' + (s.isHorizontal() ? -wrapperRotate : 0) + 'deg)');
+ },
+ setTransition: function (duration) {
+ s.slides.transition(duration).find('.swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left').transition(duration);
+ if (s.params.cube.shadow && !s.isHorizontal()) {
+ s.container.find('.swiper-cube-shadow').transition(duration);
+ }
+ }
+ },
+ coverflow: {
+ setTranslate: function () {
+ var transform = s.translate;
+ var center = s.isHorizontal() ? -transform + s.width / 2 : -transform + s.height / 2;
+ var rotate = s.isHorizontal() ? s.params.coverflow.rotate: -s.params.coverflow.rotate;
+ var translate = s.params.coverflow.depth;
+ //Each slide offset from center
+ for (var i = 0, length = s.slides.length; i < length; i++) {
+ var slide = s.slides.eq(i);
+ var slideSize = s.slidesSizesGrid[i];
+ var slideOffset = slide[0].swiperSlideOffset;
+ var offsetMultiplier = (center - slideOffset - slideSize / 2) / slideSize * s.params.coverflow.modifier;
+
+ var rotateY = s.isHorizontal() ? rotate * offsetMultiplier : 0;
+ var rotateX = s.isHorizontal() ? 0 : rotate * offsetMultiplier;
+ // var rotateZ = 0
+ var translateZ = -translate * Math.abs(offsetMultiplier);
+
+ var translateY = s.isHorizontal() ? 0 : s.params.coverflow.stretch * (offsetMultiplier);
+ var translateX = s.isHorizontal() ? s.params.coverflow.stretch * (offsetMultiplier) : 0;
+
+ //Fix for ultra small values
+ if (Math.abs(translateX) < 0.001) translateX = 0;
+ if (Math.abs(translateY) < 0.001) translateY = 0;
+ if (Math.abs(translateZ) < 0.001) translateZ = 0;
+ if (Math.abs(rotateY) < 0.001) rotateY = 0;
+ if (Math.abs(rotateX) < 0.001) rotateX = 0;
+
+ var slideTransform = 'translate3d(' + translateX + 'px,' + translateY + 'px,' + translateZ + 'px) rotateX(' + rotateX + 'deg) rotateY(' + rotateY + 'deg)';
+
+ slide.transform(slideTransform);
+ slide[0].style.zIndex = -Math.abs(Math.round(offsetMultiplier)) + 1;
+ if (s.params.coverflow.slideShadows) {
+ //Set shadows
+ var shadowBefore = s.isHorizontal() ? slide.find('.swiper-slide-shadow-left') : slide.find('.swiper-slide-shadow-top');
+ var shadowAfter = s.isHorizontal() ? slide.find('.swiper-slide-shadow-right') : slide.find('.swiper-slide-shadow-bottom');
+ if (shadowBefore.length === 0) {
+ shadowBefore = $('
');
+ slide.append(shadowBefore);
+ }
+ if (shadowAfter.length === 0) {
+ shadowAfter = $('
');
+ slide.append(shadowAfter);
+ }
+ if (shadowBefore.length) shadowBefore[0].style.opacity = offsetMultiplier > 0 ? offsetMultiplier : 0;
+ if (shadowAfter.length) shadowAfter[0].style.opacity = (-offsetMultiplier) > 0 ? -offsetMultiplier : 0;
+ }
+ }
+
+ //Set correct perspective for IE10
+ if (s.browser.ie) {
+ var ws = s.wrapper[0].style;
+ ws.perspectiveOrigin = center + 'px 50%';
+ }
+ },
+ setTransition: function (duration) {
+ s.slides.transition(duration).find('.swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left').transition(duration);
+ }
+ }
+ };
+
+
+ /*=========================
+ Images Lazy Loading
+ ===========================*/
+ s.lazy = {
+ initialImageLoaded: false,
+ loadImageInSlide: function (index, loadInDuplicate) {
+ if (typeof index === 'undefined') return;
+ if (typeof loadInDuplicate === 'undefined') loadInDuplicate = true;
+ if (s.slides.length === 0) return;
+
+ var slide = s.slides.eq(index);
+ var img = slide.find('.' + s.params.lazyLoadingClass + ':not(.' + s.params.lazyStatusLoadedClass + '):not(.' + s.params.lazyStatusLoadingClass + ')');
+ if (slide.hasClass(s.params.lazyLoadingClass) && !slide.hasClass(s.params.lazyStatusLoadedClass) && !slide.hasClass(s.params.lazyStatusLoadingClass)) {
+ img = img.add(slide[0]);
+ }
+ if (img.length === 0) return;
+
+ img.each(function () {
+ var _img = $(this);
+ _img.addClass(s.params.lazyStatusLoadingClass);
+ var background = _img.attr('data-background');
+ var src = _img.attr('data-src'),
+ srcset = _img.attr('data-srcset'),
+ sizes = _img.attr('data-sizes');
+ s.loadImage(_img[0], (src || background), srcset, sizes, false, function () {
+ if (typeof s === 'undefined' || s === null || !s) return;
+ if (background) {
+ _img.css('background-image', 'url("' + background + '")');
+ _img.removeAttr('data-background');
+ }
+ else {
+ if (srcset) {
+ _img.attr('srcset', srcset);
+ _img.removeAttr('data-srcset');
+ }
+ if (sizes) {
+ _img.attr('sizes', sizes);
+ _img.removeAttr('data-sizes');
+ }
+ if (src) {
+ _img.attr('src', src);
+ _img.removeAttr('data-src');
+ }
+
+ }
+
+ _img.addClass(s.params.lazyStatusLoadedClass).removeClass(s.params.lazyStatusLoadingClass);
+ slide.find('.' + s.params.lazyPreloaderClass + ', .' + s.params.preloaderClass).remove();
+ if (s.params.loop && loadInDuplicate) {
+ var slideOriginalIndex = slide.attr('data-swiper-slide-index');
+ if (slide.hasClass(s.params.slideDuplicateClass)) {
+ var originalSlide = s.wrapper.children('[data-swiper-slide-index="' + slideOriginalIndex + '"]:not(.' + s.params.slideDuplicateClass + ')');
+ s.lazy.loadImageInSlide(originalSlide.index(), false);
+ }
+ else {
+ var duplicatedSlide = s.wrapper.children('.' + s.params.slideDuplicateClass + '[data-swiper-slide-index="' + slideOriginalIndex + '"]');
+ s.lazy.loadImageInSlide(duplicatedSlide.index(), false);
+ }
+ }
+ s.emit('onLazyImageReady', s, slide[0], _img[0]);
+ });
+
+ s.emit('onLazyImageLoad', s, slide[0], _img[0]);
+ });
+
+ },
+ load: function () {
+ var i;
+ var slidesPerView = s.params.slidesPerView;
+ if (slidesPerView === 'auto') {
+ slidesPerView = 0;
+ }
+ if (!s.lazy.initialImageLoaded) s.lazy.initialImageLoaded = true;
+ if (s.params.watchSlidesVisibility) {
+ s.wrapper.children('.' + s.params.slideVisibleClass).each(function () {
+ s.lazy.loadImageInSlide($(this).index());
+ });
+ }
+ else {
+ if (slidesPerView > 1) {
+ for (i = s.activeIndex; i < s.activeIndex + slidesPerView ; i++) {
+ if (s.slides[i]) s.lazy.loadImageInSlide(i);
+ }
+ }
+ else {
+ s.lazy.loadImageInSlide(s.activeIndex);
+ }
+ }
+ if (s.params.lazyLoadingInPrevNext) {
+ if (slidesPerView > 1 || (s.params.lazyLoadingInPrevNextAmount && s.params.lazyLoadingInPrevNextAmount > 1)) {
+ var amount = s.params.lazyLoadingInPrevNextAmount;
+ var spv = slidesPerView;
+ var maxIndex = Math.min(s.activeIndex + spv + Math.max(amount, spv), s.slides.length);
+ var minIndex = Math.max(s.activeIndex - Math.max(spv, amount), 0);
+ // Next Slides
+ for (i = s.activeIndex + slidesPerView; i < maxIndex; i++) {
+ if (s.slides[i]) s.lazy.loadImageInSlide(i);
+ }
+ // Prev Slides
+ for (i = minIndex; i < s.activeIndex ; i++) {
+ if (s.slides[i]) s.lazy.loadImageInSlide(i);
+ }
+ }
+ else {
+ var nextSlide = s.wrapper.children('.' + s.params.slideNextClass);
+ if (nextSlide.length > 0) s.lazy.loadImageInSlide(nextSlide.index());
+
+ var prevSlide = s.wrapper.children('.' + s.params.slidePrevClass);
+ if (prevSlide.length > 0) s.lazy.loadImageInSlide(prevSlide.index());
+ }
+ }
+ },
+ onTransitionStart: function () {
+ if (s.params.lazyLoading) {
+ if (s.params.lazyLoadingOnTransitionStart || (!s.params.lazyLoadingOnTransitionStart && !s.lazy.initialImageLoaded)) {
+ s.lazy.load();
+ }
+ }
+ },
+ onTransitionEnd: function () {
+ if (s.params.lazyLoading && !s.params.lazyLoadingOnTransitionStart) {
+ s.lazy.load();
+ }
+ }
+ };
+
+
+ /*=========================
+ Scrollbar
+ ===========================*/
+ s.scrollbar = {
+ isTouched: false,
+ setDragPosition: function (e) {
+ var sb = s.scrollbar;
+ var x = 0, y = 0;
+ var translate;
+ var pointerPosition = s.isHorizontal() ?
+ ((e.type === 'touchstart' || e.type === 'touchmove') ? e.targetTouches[0].pageX : e.pageX || e.clientX) :
+ ((e.type === 'touchstart' || e.type === 'touchmove') ? e.targetTouches[0].pageY : e.pageY || e.clientY) ;
+ var position = (pointerPosition) - sb.track.offset()[s.isHorizontal() ? 'left' : 'top'] - sb.dragSize / 2;
+ var positionMin = -s.minTranslate() * sb.moveDivider;
+ var positionMax = -s.maxTranslate() * sb.moveDivider;
+ if (position < positionMin) {
+ position = positionMin;
+ }
+ else if (position > positionMax) {
+ position = positionMax;
+ }
+ position = -position / sb.moveDivider;
+ s.updateProgress(position);
+ s.setWrapperTranslate(position, true);
+ },
+ dragStart: function (e) {
+ var sb = s.scrollbar;
+ sb.isTouched = true;
+ e.preventDefault();
+ e.stopPropagation();
+
+ sb.setDragPosition(e);
+ clearTimeout(sb.dragTimeout);
+
+ sb.track.transition(0);
+ if (s.params.scrollbarHide) {
+ sb.track.css('opacity', 1);
+ }
+ s.wrapper.transition(100);
+ sb.drag.transition(100);
+ s.emit('onScrollbarDragStart', s);
+ },
+ dragMove: function (e) {
+ var sb = s.scrollbar;
+ if (!sb.isTouched) return;
+ if (e.preventDefault) e.preventDefault();
+ else e.returnValue = false;
+ sb.setDragPosition(e);
+ s.wrapper.transition(0);
+ sb.track.transition(0);
+ sb.drag.transition(0);
+ s.emit('onScrollbarDragMove', s);
+ },
+ dragEnd: function (e) {
+ var sb = s.scrollbar;
+ if (!sb.isTouched) return;
+ sb.isTouched = false;
+ if (s.params.scrollbarHide) {
+ clearTimeout(sb.dragTimeout);
+ sb.dragTimeout = setTimeout(function () {
+ sb.track.css('opacity', 0);
+ sb.track.transition(400);
+ }, 1000);
+
+ }
+ s.emit('onScrollbarDragEnd', s);
+ if (s.params.scrollbarSnapOnRelease) {
+ s.slideReset();
+ }
+ },
+ draggableEvents: (function () {
+ if ((s.params.simulateTouch === false && !s.support.touch)) return s.touchEventsDesktop;
+ else return s.touchEvents;
+ })(),
+ enableDraggable: function () {
+ var sb = s.scrollbar;
+ var target = s.support.touch ? sb.track : document;
+ $(sb.track).on(sb.draggableEvents.start, sb.dragStart);
+ $(target).on(sb.draggableEvents.move, sb.dragMove);
+ $(target).on(sb.draggableEvents.end, sb.dragEnd);
+ },
+ disableDraggable: function () {
+ var sb = s.scrollbar;
+ var target = s.support.touch ? sb.track : document;
+ $(sb.track).off(sb.draggableEvents.start, sb.dragStart);
+ $(target).off(sb.draggableEvents.move, sb.dragMove);
+ $(target).off(sb.draggableEvents.end, sb.dragEnd);
+ },
+ set: function () {
+ if (!s.params.scrollbar) return;
+ var sb = s.scrollbar;
+ sb.track = $(s.params.scrollbar);
+ if (s.params.uniqueNavElements && typeof s.params.scrollbar === 'string' && sb.track.length > 1 && s.container.find(s.params.scrollbar).length === 1) {
+ sb.track = s.container.find(s.params.scrollbar);
+ }
+ sb.drag = sb.track.find('.swiper-scrollbar-drag');
+ if (sb.drag.length === 0) {
+ sb.drag = $('
');
+ sb.track.append(sb.drag);
+ }
+ sb.drag[0].style.width = '';
+ sb.drag[0].style.height = '';
+ sb.trackSize = s.isHorizontal() ? sb.track[0].offsetWidth : sb.track[0].offsetHeight;
+
+ sb.divider = s.size / s.virtualSize;
+ sb.moveDivider = sb.divider * (sb.trackSize / s.size);
+ sb.dragSize = sb.trackSize * sb.divider;
+
+ if (s.isHorizontal()) {
+ sb.drag[0].style.width = sb.dragSize + 'px';
+ }
+ else {
+ sb.drag[0].style.height = sb.dragSize + 'px';
+ }
+
+ if (sb.divider >= 1) {
+ sb.track[0].style.display = 'none';
+ }
+ else {
+ sb.track[0].style.display = '';
+ }
+ if (s.params.scrollbarHide) {
+ sb.track[0].style.opacity = 0;
+ }
+ },
+ setTranslate: function () {
+ if (!s.params.scrollbar) return;
+ var diff;
+ var sb = s.scrollbar;
+ var translate = s.translate || 0;
+ var newPos;
+
+ var newSize = sb.dragSize;
+ newPos = (sb.trackSize - sb.dragSize) * s.progress;
+ if (s.rtl && s.isHorizontal()) {
+ newPos = -newPos;
+ if (newPos > 0) {
+ newSize = sb.dragSize - newPos;
+ newPos = 0;
+ }
+ else if (-newPos + sb.dragSize > sb.trackSize) {
+ newSize = sb.trackSize + newPos;
+ }
+ }
+ else {
+ if (newPos < 0) {
+ newSize = sb.dragSize + newPos;
+ newPos = 0;
+ }
+ else if (newPos + sb.dragSize > sb.trackSize) {
+ newSize = sb.trackSize - newPos;
+ }
+ }
+ if (s.isHorizontal()) {
+ if (s.support.transforms3d) {
+ sb.drag.transform('translate3d(' + (newPos) + 'px, 0, 0)');
+ }
+ else {
+ sb.drag.transform('translateX(' + (newPos) + 'px)');
+ }
+ sb.drag[0].style.width = newSize + 'px';
+ }
+ else {
+ if (s.support.transforms3d) {
+ sb.drag.transform('translate3d(0px, ' + (newPos) + 'px, 0)');
+ }
+ else {
+ sb.drag.transform('translateY(' + (newPos) + 'px)');
+ }
+ sb.drag[0].style.height = newSize + 'px';
+ }
+ if (s.params.scrollbarHide) {
+ clearTimeout(sb.timeout);
+ sb.track[0].style.opacity = 1;
+ sb.timeout = setTimeout(function () {
+ sb.track[0].style.opacity = 0;
+ sb.track.transition(400);
+ }, 1000);
+ }
+ },
+ setTransition: function (duration) {
+ if (!s.params.scrollbar) return;
+ s.scrollbar.drag.transition(duration);
+ }
+ };
+
+
+ /*=========================
+ Controller
+ ===========================*/
+ s.controller = {
+ LinearSpline: function (x, y) {
+ var binarySearch = (function() {
+ var maxIndex, minIndex, guess;
+ return function(array, val) {
+ minIndex = -1;
+ maxIndex = array.length;
+ while (maxIndex - minIndex > 1)
+ if (array[guess = maxIndex + minIndex >> 1] <= val) {
+ minIndex = guess;
+ } else {
+ maxIndex = guess;
+ }
+ return maxIndex;
+ };
+ })();
+ this.x = x;
+ this.y = y;
+ this.lastIndex = x.length - 1;
+ // Given an x value (x2), return the expected y2 value:
+ // (x1,y1) is the known point before given value,
+ // (x3,y3) is the known point after given value.
+ var i1, i3;
+ var l = this.x.length;
+
+ this.interpolate = function (x2) {
+ if (!x2) return 0;
+
+ // Get the indexes of x1 and x3 (the array indexes before and after given x2):
+ i3 = binarySearch(this.x, x2);
+ i1 = i3 - 1;
+
+ // We have our indexes i1 & i3, so we can calculate already:
+ // y2 := ((x2−x1) × (y3−y1)) ÷ (x3−x1) + y1
+ return ((x2 - this.x[i1]) * (this.y[i3] - this.y[i1])) / (this.x[i3] - this.x[i1]) + this.y[i1];
+ };
+ },
+ //xxx: for now i will just save one spline function to to
+ getInterpolateFunction: function(c){
+ if(!s.controller.spline) s.controller.spline = s.params.loop ?
+ new s.controller.LinearSpline(s.slidesGrid, c.slidesGrid) :
+ new s.controller.LinearSpline(s.snapGrid, c.snapGrid);
+ },
+ setTranslate: function (translate, byController) {
+ var controlled = s.params.control;
+ var multiplier, controlledTranslate;
+ function setControlledTranslate(c) {
+ // this will create an Interpolate function based on the snapGrids
+ // x is the Grid of the scrolled scroller and y will be the controlled scroller
+ // it makes sense to create this only once and recall it for the interpolation
+ // the function does a lot of value caching for performance
+ translate = c.rtl && c.params.direction === 'horizontal' ? -s.translate : s.translate;
+ if (s.params.controlBy === 'slide') {
+ s.controller.getInterpolateFunction(c);
+ // i am not sure why the values have to be multiplicated this way, tried to invert the snapGrid
+ // but it did not work out
+ controlledTranslate = -s.controller.spline.interpolate(-translate);
+ }
+
+ if(!controlledTranslate || s.params.controlBy === 'container'){
+ multiplier = (c.maxTranslate() - c.minTranslate()) / (s.maxTranslate() - s.minTranslate());
+ controlledTranslate = (translate - s.minTranslate()) * multiplier + c.minTranslate();
+ }
+
+ if (s.params.controlInverse) {
+ controlledTranslate = c.maxTranslate() - controlledTranslate;
+ }
+ c.updateProgress(controlledTranslate);
+ c.setWrapperTranslate(controlledTranslate, false, s);
+ c.updateActiveIndex();
+ }
+ if (Array.isArray(controlled)) {
+ for (var i = 0; i < controlled.length; i++) {
+ if (controlled[i] !== byController && controlled[i] instanceof Swiper) {
+ setControlledTranslate(controlled[i]);
+ }
+ }
+ }
+ else if (controlled instanceof Swiper && byController !== controlled) {
+
+ setControlledTranslate(controlled);
+ }
+ },
+ setTransition: function (duration, byController) {
+ var controlled = s.params.control;
+ var i;
+ function setControlledTransition(c) {
+ c.setWrapperTransition(duration, s);
+ if (duration !== 0) {
+ c.onTransitionStart();
+ c.wrapper.transitionEnd(function(){
+ if (!controlled) return;
+ if (c.params.loop && s.params.controlBy === 'slide') {
+ c.fixLoop();
+ }
+ c.onTransitionEnd();
+
+ });
+ }
+ }
+ if (Array.isArray(controlled)) {
+ for (i = 0; i < controlled.length; i++) {
+ if (controlled[i] !== byController && controlled[i] instanceof Swiper) {
+ setControlledTransition(controlled[i]);
+ }
+ }
+ }
+ else if (controlled instanceof Swiper && byController !== controlled) {
+ setControlledTransition(controlled);
+ }
+ }
+ };
+
+
+ /*=========================
+ Hash Navigation
+ ===========================*/
+ s.hashnav = {
+ onHashCange: function (e, a) {
+ var newHash = document.location.hash.replace('#', '');
+ var activeSlideHash = s.slides.eq(s.activeIndex).attr('data-hash');
+ if (newHash !== activeSlideHash) {
+ s.slideTo(s.wrapper.children('.' + s.params.slideClass + '[data-hash="' + (newHash) + '"]').index());
+ }
+ },
+ attachEvents: function (detach) {
+ var action = detach ? 'off' : 'on';
+ $(window)[action]('hashchange', s.hashnav.onHashCange);
+ },
+ setHash: function () {
+ if (!s.hashnav.initialized || !s.params.hashnav) return;
+ if (s.params.replaceState && window.history && window.history.replaceState) {
+ window.history.replaceState(null, null, ('#' + s.slides.eq(s.activeIndex).attr('data-hash') || ''));
+ } else {
+ var slide = s.slides.eq(s.activeIndex);
+ var hash = slide.attr('data-hash') || slide.attr('data-history');
+ document.location.hash = hash || '';
+ }
+ },
+ init: function () {
+ if (!s.params.hashnav || s.params.history) return;
+ s.hashnav.initialized = true;
+ var hash = document.location.hash.replace('#', '');
+ if (hash) {
+ var speed = 0;
+ for (var i = 0, length = s.slides.length; i < length; i++) {
+ var slide = s.slides.eq(i);
+ var slideHash = slide.attr('data-hash') || slide.attr('data-history');
+ if (slideHash === hash && !slide.hasClass(s.params.slideDuplicateClass)) {
+ var index = slide.index();
+ s.slideTo(index, speed, s.params.runCallbacksOnInit, true);
+ }
+ }
+ }
+ if (s.params.hashnavWatchState) s.hashnav.attachEvents();
+ },
+ destroy: function () {
+ if (s.params.hashnavWatchState) s.hashnav.attachEvents(true);
+ }
+ };
+
+
+ /*=========================
+ History Api with fallback to Hashnav
+ ===========================*/
+ s.history = {
+ init: function () {
+ if (!s.params.history) return;
+ if (!window.history || !window.history.pushState) {
+ s.params.history = false;
+ s.params.hashnav = true;
+ return;
+ }
+ s.history.initialized = true;
+ this.paths = this.getPathValues();
+ if (!this.paths.key && !this.paths.value) return;
+ this.scrollToSlide(0, this.paths.value, s.params.runCallbacksOnInit);
+ if (!s.params.replaceState) {
+ window.addEventListener('popstate', this.setHistoryPopState);
+ }
+ },
+ setHistoryPopState: function() {
+ s.history.paths = s.history.getPathValues();
+ s.history.scrollToSlide(s.params.speed, s.history.paths.value, false);
+ },
+ getPathValues: function() {
+ var pathArray = window.location.pathname.slice(1).split('/');
+ var total = pathArray.length;
+ var key = pathArray[total - 2];
+ var value = pathArray[total - 1];
+ return { key: key, value: value };
+ },
+ setHistory: function (key, index) {
+ if (!s.history.initialized || !s.params.history) return;
+ var slide = s.slides.eq(index);
+ var value = this.slugify(slide.attr('data-history'));
+ if (!window.location.pathname.includes(key)) {
+ value = key + '/' + value;
+ }
+ if (s.params.replaceState) {
+ window.history.replaceState(null, null, value);
+ } else {
+ window.history.pushState(null, null, value);
+ }
+ },
+ slugify: function(text) {
+ return text.toString().toLowerCase()
+ .replace(/\s+/g, '-')
+ .replace(/[^\w\-]+/g, '')
+ .replace(/\-\-+/g, '-')
+ .replace(/^-+/, '')
+ .replace(/-+$/, '');
+ },
+ scrollToSlide: function(speed, value, runCallbacks) {
+ if (value) {
+ for (var i = 0, length = s.slides.length; i < length; i++) {
+ var slide = s.slides.eq(i);
+ var slideHistory = this.slugify(slide.attr('data-history'));
+ if (slideHistory === value && !slide.hasClass(s.params.slideDuplicateClass)) {
+ var index = slide.index();
+ s.slideTo(index, speed, runCallbacks);
+ }
+ }
+ } else {
+ s.slideTo(0, speed, runCallbacks);
+ }
+ }
+ };
+
+
+ /*=========================
+ Keyboard Control
+ ===========================*/
+ function handleKeyboard(e) {
+ if (e.originalEvent) e = e.originalEvent; //jquery fix
+ var kc = e.keyCode || e.charCode;
+ // Directions locks
+ if (!s.params.allowSwipeToNext && (s.isHorizontal() && kc === 39 || !s.isHorizontal() && kc === 40)) {
+ return false;
+ }
+ if (!s.params.allowSwipeToPrev && (s.isHorizontal() && kc === 37 || !s.isHorizontal() && kc === 38)) {
+ return false;
+ }
+ if (e.shiftKey || e.altKey || e.ctrlKey || e.metaKey) {
+ return;
+ }
+ if (document.activeElement && document.activeElement.nodeName && (document.activeElement.nodeName.toLowerCase() === 'input' || document.activeElement.nodeName.toLowerCase() === 'textarea')) {
+ return;
+ }
+ if (kc === 37 || kc === 39 || kc === 38 || kc === 40) {
+ var inView = false;
+ //Check that swiper should be inside of visible area of window
+ if (s.container.parents('.' + s.params.slideClass).length > 0 && s.container.parents('.' + s.params.slideActiveClass).length === 0) {
+ return;
+ }
+ var windowScroll = {
+ left: window.pageXOffset,
+ top: window.pageYOffset
+ };
+ var windowWidth = window.innerWidth;
+ var windowHeight = window.innerHeight;
+ var swiperOffset = s.container.offset();
+ if (s.rtl) swiperOffset.left = swiperOffset.left - s.container[0].scrollLeft;
+ var swiperCoord = [
+ [swiperOffset.left, swiperOffset.top],
+ [swiperOffset.left + s.width, swiperOffset.top],
+ [swiperOffset.left, swiperOffset.top + s.height],
+ [swiperOffset.left + s.width, swiperOffset.top + s.height]
+ ];
+ for (var i = 0; i < swiperCoord.length; i++) {
+ var point = swiperCoord[i];
+ if (
+ point[0] >= windowScroll.left && point[0] <= windowScroll.left + windowWidth &&
+ point[1] >= windowScroll.top && point[1] <= windowScroll.top + windowHeight
+ ) {
+ inView = true;
+ }
+
+ }
+ if (!inView) return;
+ }
+ if (s.isHorizontal()) {
+ if (kc === 37 || kc === 39) {
+ if (e.preventDefault) e.preventDefault();
+ else e.returnValue = false;
+ }
+ if ((kc === 39 && !s.rtl) || (kc === 37 && s.rtl)) s.slideNext();
+ if ((kc === 37 && !s.rtl) || (kc === 39 && s.rtl)) s.slidePrev();
+ }
+ else {
+ if (kc === 38 || kc === 40) {
+ if (e.preventDefault) e.preventDefault();
+ else e.returnValue = false;
+ }
+ if (kc === 40) s.slideNext();
+ if (kc === 38) s.slidePrev();
+ }
+ s.emit('onKeyPress', s, kc);
+ }
+ s.disableKeyboardControl = function () {
+ s.params.keyboardControl = false;
+ $(document).off('keydown', handleKeyboard);
+ };
+ s.enableKeyboardControl = function () {
+ s.params.keyboardControl = true;
+ $(document).on('keydown', handleKeyboard);
+ };
+
+
+ /*=========================
+ Mousewheel Control
+ ===========================*/
+ s.mousewheel = {
+ event: false,
+ lastScrollTime: (new window.Date()).getTime()
+ };
+ function isEventSupported() {
+ var eventName = 'onwheel';
+ var isSupported = eventName in document;
+
+ if (!isSupported) {
+ var element = document.createElement('div');
+ element.setAttribute(eventName, 'return;');
+ isSupported = typeof element[eventName] === 'function';
+ }
+
+ if (!isSupported &&
+ document.implementation &&
+ document.implementation.hasFeature &&
+ // always returns true in newer browsers as per the standard.
+ // @see http://dom.spec.whatwg.org/#dom-domimplementation-hasfeature
+ document.implementation.hasFeature('', '') !== true ) {
+ // This is the only way to test support for the `wheel` event in IE9+.
+ isSupported = document.implementation.hasFeature('Events.wheel', '3.0');
+ }
+
+ return isSupported;
+ }
+ /**
+ * Mouse wheel (and 2-finger trackpad) support on the web sucks. It is
+ * complicated, thus this doc is long and (hopefully) detailed enough to answer
+ * your questions.
+ *
+ * If you need to react to the mouse wheel in a predictable way, this code is
+ * like your bestest friend. * hugs *
+ *
+ * As of today, there are 4 DOM event types you can listen to:
+ *
+ * 'wheel' -- Chrome(31+), FF(17+), IE(9+)
+ * 'mousewheel' -- Chrome, IE(6+), Opera, Safari
+ * 'MozMousePixelScroll' -- FF(3.5 only!) (2010-2013) -- don't bother!
+ * 'DOMMouseScroll' -- FF(0.9.7+) since 2003
+ *
+ * So what to do? The is the best:
+ *
+ * normalizeWheel.getEventType();
+ *
+ * In your event callback, use this code to get sane interpretation of the
+ * deltas. This code will return an object with properties:
+ *
+ * spinX -- normalized spin speed (use for zoom) - x plane
+ * spinY -- " - y plane
+ * pixelX -- normalized distance (to pixels) - x plane
+ * pixelY -- " - y plane
+ *
+ * Wheel values are provided by the browser assuming you are using the wheel to
+ * scroll a web page by a number of lines or pixels (or pages). Values can vary
+ * significantly on different platforms and browsers, forgetting that you can
+ * scroll at different speeds. Some devices (like trackpads) emit more events
+ * at smaller increments with fine granularity, and some emit massive jumps with
+ * linear speed or acceleration.
+ *
+ * This code does its best to normalize the deltas for you:
+ *
+ * - spin is trying to normalize how far the wheel was spun (or trackpad
+ * dragged). This is super useful for zoom support where you want to
+ * throw away the chunky scroll steps on the PC and make those equal to
+ * the slow and smooth tiny steps on the Mac. Key data: This code tries to
+ * resolve a single slow step on a wheel to 1.
+ *
+ * - pixel is normalizing the desired scroll delta in pixel units. You'll
+ * get the crazy differences between browsers, but at least it'll be in
+ * pixels!
+ *
+ * - positive value indicates scrolling DOWN/RIGHT, negative UP/LEFT. This
+ * should translate to positive value zooming IN, negative zooming OUT.
+ * This matches the newer 'wheel' event.
+ *
+ * Why are there spinX, spinY (or pixels)?
+ *
+ * - spinX is a 2-finger side drag on the trackpad, and a shift + wheel turn
+ * with a mouse. It results in side-scrolling in the browser by default.
+ *
+ * - spinY is what you expect -- it's the classic axis of a mouse wheel.
+ *
+ * - I dropped spinZ/pixelZ. It is supported by the DOM 3 'wheel' event and
+ * probably is by browsers in conjunction with fancy 3D controllers .. but
+ * you know.
+ *
+ * Implementation info:
+ *
+ * Examples of 'wheel' event if you scroll slowly (down) by one step with an
+ * average mouse:
+ *
+ * OS X + Chrome (mouse) - 4 pixel delta (wheelDelta -120)
+ * OS X + Safari (mouse) - N/A pixel delta (wheelDelta -12)
+ * OS X + Firefox (mouse) - 0.1 line delta (wheelDelta N/A)
+ * Win8 + Chrome (mouse) - 100 pixel delta (wheelDelta -120)
+ * Win8 + Firefox (mouse) - 3 line delta (wheelDelta -120)
+ *
+ * On the trackpad:
+ *
+ * OS X + Chrome (trackpad) - 2 pixel delta (wheelDelta -6)
+ * OS X + Firefox (trackpad) - 1 pixel delta (wheelDelta N/A)
+ *
+ * On other/older browsers.. it's more complicated as there can be multiple and
+ * also missing delta values.
+ *
+ * The 'wheel' event is more standard:
+ *
+ * http://www.w3.org/TR/DOM-Level-3-Events/#events-wheelevents
+ *
+ * The basics is that it includes a unit, deltaMode (pixels, lines, pages), and
+ * deltaX, deltaY and deltaZ. Some browsers provide other values to maintain
+ * backward compatibility with older events. Those other values help us
+ * better normalize spin speed. Example of what the browsers provide:
+ *
+ * | event.wheelDelta | event.detail
+ * ------------------+------------------+--------------
+ * Safari v5/OS X | -120 | 0
+ * Safari v5/Win7 | -120 | 0
+ * Chrome v17/OS X | -120 | 0
+ * Chrome v17/Win7 | -120 | 0
+ * IE9/Win7 | -120 | undefined
+ * Firefox v4/OS X | undefined | 1
+ * Firefox v4/Win7 | undefined | 3
+ *
+ */
+ function normalizeWheel( /*object*/ event ) /*object*/ {
+ // Reasonable defaults
+ var PIXEL_STEP = 10;
+ var LINE_HEIGHT = 40;
+ var PAGE_HEIGHT = 800;
+
+ var sX = 0, sY = 0, // spinX, spinY
+ pX = 0, pY = 0; // pixelX, pixelY
+
+ // Legacy
+ if( 'detail' in event ) {
+ sY = event.detail;
+ }
+ if( 'wheelDelta' in event ) {
+ sY = -event.wheelDelta / 120;
+ }
+ if( 'wheelDeltaY' in event ) {
+ sY = -event.wheelDeltaY / 120;
+ }
+ if( 'wheelDeltaX' in event ) {
+ sX = -event.wheelDeltaX / 120;
+ }
+
+ // side scrolling on FF with DOMMouseScroll
+ if( 'axis' in event && event.axis === event.HORIZONTAL_AXIS ) {
+ sX = sY;
+ sY = 0;
+ }
+
+ pX = sX * PIXEL_STEP;
+ pY = sY * PIXEL_STEP;
+
+ if( 'deltaY' in event ) {
+ pY = event.deltaY;
+ }
+ if( 'deltaX' in event ) {
+ pX = event.deltaX;
+ }
+
+ if( (pX || pY) && event.deltaMode ) {
+ if( event.deltaMode === 1 ) { // delta in LINE units
+ pX *= LINE_HEIGHT;
+ pY *= LINE_HEIGHT;
+ } else { // delta in PAGE units
+ pX *= PAGE_HEIGHT;
+ pY *= PAGE_HEIGHT;
+ }
+ }
+
+ // Fall-back if spin cannot be determined
+ if( pX && !sX ) {
+ sX = (pX < 1) ? -1 : 1;
+ }
+ if( pY && !sY ) {
+ sY = (pY < 1) ? -1 : 1;
+ }
+
+ return {
+ spinX: sX,
+ spinY: sY,
+ pixelX: pX,
+ pixelY: pY
+ };
+ }
+ if (s.params.mousewheelControl) {
+ /**
+ * The best combination if you prefer spinX + spinY normalization. It favors
+ * the older DOMMouseScroll for Firefox, as FF does not include wheelDelta with
+ * 'wheel' event, making spin speed determination impossible.
+ */
+ s.mousewheel.event = (navigator.userAgent.indexOf('firefox') > -1) ?
+ 'DOMMouseScroll' :
+ isEventSupported() ?
+ 'wheel' : 'mousewheel';
+ }
+ function handleMousewheel(e) {
+ if (e.originalEvent) e = e.originalEvent; //jquery fix
+ var delta = 0;
+ var rtlFactor = s.rtl ? -1 : 1;
+
+ var data = normalizeWheel( e );
+
+ if (s.params.mousewheelForceToAxis) {
+ if (s.isHorizontal()) {
+ if (Math.abs(data.pixelX) > Math.abs(data.pixelY)) delta = data.pixelX * rtlFactor;
+ else return;
+ }
+ else {
+ if (Math.abs(data.pixelY) > Math.abs(data.pixelX)) delta = data.pixelY;
+ else return;
+ }
+ }
+ else {
+ delta = Math.abs(data.pixelX) > Math.abs(data.pixelY) ? - data.pixelX * rtlFactor : - data.pixelY;
+ }
+
+ if (delta === 0) return;
+
+ if (s.params.mousewheelInvert) delta = -delta;
+
+ if (!s.params.freeMode) {
+ if ((new window.Date()).getTime() - s.mousewheel.lastScrollTime > 60) {
+ if (delta < 0) {
+ if ((!s.isEnd || s.params.loop) && !s.animating) {
+ s.slideNext();
+ s.emit('onScroll', s, e);
+ }
+ else if (s.params.mousewheelReleaseOnEdges) return true;
+ }
+ else {
+ if ((!s.isBeginning || s.params.loop) && !s.animating) {
+ s.slidePrev();
+ s.emit('onScroll', s, e);
+ }
+ else if (s.params.mousewheelReleaseOnEdges) return true;
+ }
+ }
+ s.mousewheel.lastScrollTime = (new window.Date()).getTime();
+
+ }
+ else {
+ //Freemode or scrollContainer:
+ var position = s.getWrapperTranslate() + delta * s.params.mousewheelSensitivity;
+ var wasBeginning = s.isBeginning,
+ wasEnd = s.isEnd;
+
+ if (position >= s.minTranslate()) position = s.minTranslate();
+ if (position <= s.maxTranslate()) position = s.maxTranslate();
+
+ s.setWrapperTransition(0);
+ s.setWrapperTranslate(position);
+ s.updateProgress();
+ s.updateActiveIndex();
+
+ if (!wasBeginning && s.isBeginning || !wasEnd && s.isEnd) {
+ s.updateClasses();
+ }
+
+ if (s.params.freeModeSticky) {
+ clearTimeout(s.mousewheel.timeout);
+ s.mousewheel.timeout = setTimeout(function () {
+ s.slideReset();
+ }, 300);
+ }
+ else {
+ if (s.params.lazyLoading && s.lazy) {
+ s.lazy.load();
+ }
+ }
+ // Emit event
+ s.emit('onScroll', s, e);
+
+ // Stop autoplay
+ if (s.params.autoplay && s.params.autoplayDisableOnInteraction) s.stopAutoplay();
+
+ // Return page scroll on edge positions
+ if (position === 0 || position === s.maxTranslate()) return;
+ }
+
+ if (e.preventDefault) e.preventDefault();
+ else e.returnValue = false;
+ return false;
+ }
+ s.disableMousewheelControl = function () {
+ if (!s.mousewheel.event) return false;
+ var target = s.container;
+ if (s.params.mousewheelEventsTarged !== 'container') {
+ target = $(s.params.mousewheelEventsTarged);
+ }
+ target.off(s.mousewheel.event, handleMousewheel);
+ s.params.mousewheelControl = false;
+ return true;
+ };
+
+ s.enableMousewheelControl = function () {
+ if (!s.mousewheel.event) return false;
+ var target = s.container;
+ if (s.params.mousewheelEventsTarged !== 'container') {
+ target = $(s.params.mousewheelEventsTarged);
+ }
+ target.on(s.mousewheel.event, handleMousewheel);
+ s.params.mousewheelControl = true;
+ return true;
+ };
+
+
+ /*=========================
+ Parallax
+ ===========================*/
+ function setParallaxTransform(el, progress) {
+ el = $(el);
+ var p, pX, pY;
+ var rtlFactor = s.rtl ? -1 : 1;
+
+ p = el.attr('data-swiper-parallax') || '0';
+ pX = el.attr('data-swiper-parallax-x');
+ pY = el.attr('data-swiper-parallax-y');
+ if (pX || pY) {
+ pX = pX || '0';
+ pY = pY || '0';
+ }
+ else {
+ if (s.isHorizontal()) {
+ pX = p;
+ pY = '0';
+ }
+ else {
+ pY = p;
+ pX = '0';
+ }
+ }
+
+ if ((pX).indexOf('%') >= 0) {
+ pX = parseInt(pX, 10) * progress * rtlFactor + '%';
+ }
+ else {
+ pX = pX * progress * rtlFactor + 'px' ;
+ }
+ if ((pY).indexOf('%') >= 0) {
+ pY = parseInt(pY, 10) * progress + '%';
+ }
+ else {
+ pY = pY * progress + 'px' ;
+ }
+
+ el.transform('translate3d(' + pX + ', ' + pY + ',0px)');
+ }
+ s.parallax = {
+ setTranslate: function () {
+ s.container.children('[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y]').each(function(){
+ setParallaxTransform(this, s.progress);
+
+ });
+ s.slides.each(function () {
+ var slide = $(this);
+ slide.find('[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y]').each(function () {
+ var progress = Math.min(Math.max(slide[0].progress, -1), 1);
+ setParallaxTransform(this, progress);
+ });
+ });
+ },
+ setTransition: function (duration) {
+ if (typeof duration === 'undefined') duration = s.params.speed;
+ s.container.find('[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y]').each(function(){
+ var el = $(this);
+ var parallaxDuration = parseInt(el.attr('data-swiper-parallax-duration'), 10) || duration;
+ if (duration === 0) parallaxDuration = 0;
+ el.transition(parallaxDuration);
+ });
+ }
+ };
+
+
+ /*=========================
+ Zoom
+ ===========================*/
+ s.zoom = {
+ // "Global" Props
+ scale: 1,
+ currentScale: 1,
+ isScaling: false,
+ gesture: {
+ slide: undefined,
+ slideWidth: undefined,
+ slideHeight: undefined,
+ image: undefined,
+ imageWrap: undefined,
+ zoomMax: s.params.zoomMax
+ },
+ image: {
+ isTouched: undefined,
+ isMoved: undefined,
+ currentX: undefined,
+ currentY: undefined,
+ minX: undefined,
+ minY: undefined,
+ maxX: undefined,
+ maxY: undefined,
+ width: undefined,
+ height: undefined,
+ startX: undefined,
+ startY: undefined,
+ touchesStart: {},
+ touchesCurrent: {}
+ },
+ velocity: {
+ x: undefined,
+ y: undefined,
+ prevPositionX: undefined,
+ prevPositionY: undefined,
+ prevTime: undefined
+ },
+ // Calc Scale From Multi-touches
+ getDistanceBetweenTouches: function (e) {
+ if (e.targetTouches.length < 2) return 1;
+ var x1 = e.targetTouches[0].pageX,
+ y1 = e.targetTouches[0].pageY,
+ x2 = e.targetTouches[1].pageX,
+ y2 = e.targetTouches[1].pageY;
+ var distance = Math.sqrt(Math.pow(x2 - x1, 2) + Math.pow(y2 - y1, 2));
+ return distance;
+ },
+ // Events
+ onGestureStart: function (e) {
+ var z = s.zoom;
+ if (!s.support.gestures) {
+ if (e.type !== 'touchstart' || e.type === 'touchstart' && e.targetTouches.length < 2) {
+ return;
+ }
+ z.gesture.scaleStart = z.getDistanceBetweenTouches(e);
+ }
+ if (!z.gesture.slide || !z.gesture.slide.length) {
+ z.gesture.slide = $(this);
+ if (z.gesture.slide.length === 0) z.gesture.slide = s.slides.eq(s.activeIndex);
+ z.gesture.image = z.gesture.slide.find('img, svg, canvas');
+ z.gesture.imageWrap = z.gesture.image.parent('.' + s.params.zoomContainerClass);
+ z.gesture.zoomMax = z.gesture.imageWrap.attr('data-swiper-zoom') || s.params.zoomMax ;
+ if (z.gesture.imageWrap.length === 0) {
+ z.gesture.image = undefined;
+ return;
+ }
+ }
+ z.gesture.image.transition(0);
+ z.isScaling = true;
+ },
+ onGestureChange: function (e) {
+ var z = s.zoom;
+ if (!s.support.gestures) {
+ if (e.type !== 'touchmove' || e.type === 'touchmove' && e.targetTouches.length < 2) {
+ return;
+ }
+ z.gesture.scaleMove = z.getDistanceBetweenTouches(e);
+ }
+ if (!z.gesture.image || z.gesture.image.length === 0) return;
+ if (s.support.gestures) {
+ z.scale = e.scale * z.currentScale;
+ }
+ else {
+ z.scale = (z.gesture.scaleMove / z.gesture.scaleStart) * z.currentScale;
+ }
+ if (z.scale > z.gesture.zoomMax) {
+ z.scale = z.gesture.zoomMax - 1 + Math.pow((z.scale - z.gesture.zoomMax + 1), 0.5);
+ }
+ if (z.scale < s.params.zoomMin) {
+ z.scale = s.params.zoomMin + 1 - Math.pow((s.params.zoomMin - z.scale + 1), 0.5);
+ }
+ z.gesture.image.transform('translate3d(0,0,0) scale(' + z.scale + ')');
+ },
+ onGestureEnd: function (e) {
+ var z = s.zoom;
+ if (!s.support.gestures) {
+ if (e.type !== 'touchend' || e.type === 'touchend' && e.changedTouches.length < 2) {
+ return;
+ }
+ }
+ if (!z.gesture.image || z.gesture.image.length === 0) return;
+ z.scale = Math.max(Math.min(z.scale, z.gesture.zoomMax), s.params.zoomMin);
+ z.gesture.image.transition(s.params.speed).transform('translate3d(0,0,0) scale(' + z.scale + ')');
+ z.currentScale = z.scale;
+ z.isScaling = false;
+ if (z.scale === 1) z.gesture.slide = undefined;
+ },
+ onTouchStart: function (s, e) {
+ var z = s.zoom;
+ if (!z.gesture.image || z.gesture.image.length === 0) return;
+ if (z.image.isTouched) return;
+ if (s.device.os === 'android') e.preventDefault();
+ z.image.isTouched = true;
+ z.image.touchesStart.x = e.type === 'touchstart' ? e.targetTouches[0].pageX : e.pageX;
+ z.image.touchesStart.y = e.type === 'touchstart' ? e.targetTouches[0].pageY : e.pageY;
+ },
+ onTouchMove: function (e) {
+ var z = s.zoom;
+ if (!z.gesture.image || z.gesture.image.length === 0) return;
+ s.allowClick = false;
+ if (!z.image.isTouched || !z.gesture.slide) return;
+
+ if (!z.image.isMoved) {
+ z.image.width = z.gesture.image[0].offsetWidth;
+ z.image.height = z.gesture.image[0].offsetHeight;
+ z.image.startX = s.getTranslate(z.gesture.imageWrap[0], 'x') || 0;
+ z.image.startY = s.getTranslate(z.gesture.imageWrap[0], 'y') || 0;
+ z.gesture.slideWidth = z.gesture.slide[0].offsetWidth;
+ z.gesture.slideHeight = z.gesture.slide[0].offsetHeight;
+ z.gesture.imageWrap.transition(0);
+ if (s.rtl) z.image.startX = -z.image.startX;
+ if (s.rtl) z.image.startY = -z.image.startY;
+ }
+ // Define if we need image drag
+ var scaledWidth = z.image.width * z.scale;
+ var scaledHeight = z.image.height * z.scale;
+
+ if (scaledWidth < z.gesture.slideWidth && scaledHeight < z.gesture.slideHeight) return;
+
+ z.image.minX = Math.min((z.gesture.slideWidth / 2 - scaledWidth / 2), 0);
+ z.image.maxX = -z.image.minX;
+ z.image.minY = Math.min((z.gesture.slideHeight / 2 - scaledHeight / 2), 0);
+ z.image.maxY = -z.image.minY;
+
+ z.image.touchesCurrent.x = e.type === 'touchmove' ? e.targetTouches[0].pageX : e.pageX;
+ z.image.touchesCurrent.y = e.type === 'touchmove' ? e.targetTouches[0].pageY : e.pageY;
+
+ if (!z.image.isMoved && !z.isScaling) {
+ if (s.isHorizontal() &&
+ (Math.floor(z.image.minX) === Math.floor(z.image.startX) && z.image.touchesCurrent.x < z.image.touchesStart.x) ||
+ (Math.floor(z.image.maxX) === Math.floor(z.image.startX) && z.image.touchesCurrent.x > z.image.touchesStart.x)
+ ) {
+ z.image.isTouched = false;
+ return;
+ }
+ else if (!s.isHorizontal() &&
+ (Math.floor(z.image.minY) === Math.floor(z.image.startY) && z.image.touchesCurrent.y < z.image.touchesStart.y) ||
+ (Math.floor(z.image.maxY) === Math.floor(z.image.startY) && z.image.touchesCurrent.y > z.image.touchesStart.y)
+ ) {
+ z.image.isTouched = false;
+ return;
+ }
+ }
+ e.preventDefault();
+ e.stopPropagation();
+
+ z.image.isMoved = true;
+ z.image.currentX = z.image.touchesCurrent.x - z.image.touchesStart.x + z.image.startX;
+ z.image.currentY = z.image.touchesCurrent.y - z.image.touchesStart.y + z.image.startY;
+
+ if (z.image.currentX < z.image.minX) {
+ z.image.currentX = z.image.minX + 1 - Math.pow((z.image.minX - z.image.currentX + 1), 0.8);
+ }
+ if (z.image.currentX > z.image.maxX) {
+ z.image.currentX = z.image.maxX - 1 + Math.pow((z.image.currentX - z.image.maxX + 1), 0.8);
+ }
+
+ if (z.image.currentY < z.image.minY) {
+ z.image.currentY = z.image.minY + 1 - Math.pow((z.image.minY - z.image.currentY + 1), 0.8);
+ }
+ if (z.image.currentY > z.image.maxY) {
+ z.image.currentY = z.image.maxY - 1 + Math.pow((z.image.currentY - z.image.maxY + 1), 0.8);
+ }
+
+ //Velocity
+ if (!z.velocity.prevPositionX) z.velocity.prevPositionX = z.image.touchesCurrent.x;
+ if (!z.velocity.prevPositionY) z.velocity.prevPositionY = z.image.touchesCurrent.y;
+ if (!z.velocity.prevTime) z.velocity.prevTime = Date.now();
+ z.velocity.x = (z.image.touchesCurrent.x - z.velocity.prevPositionX) / (Date.now() - z.velocity.prevTime) / 2;
+ z.velocity.y = (z.image.touchesCurrent.y - z.velocity.prevPositionY) / (Date.now() - z.velocity.prevTime) / 2;
+ if (Math.abs(z.image.touchesCurrent.x - z.velocity.prevPositionX) < 2) z.velocity.x = 0;
+ if (Math.abs(z.image.touchesCurrent.y - z.velocity.prevPositionY) < 2) z.velocity.y = 0;
+ z.velocity.prevPositionX = z.image.touchesCurrent.x;
+ z.velocity.prevPositionY = z.image.touchesCurrent.y;
+ z.velocity.prevTime = Date.now();
+
+ z.gesture.imageWrap.transform('translate3d(' + z.image.currentX + 'px, ' + z.image.currentY + 'px,0)');
+ },
+ onTouchEnd: function (s, e) {
+ var z = s.zoom;
+ if (!z.gesture.image || z.gesture.image.length === 0) return;
+ if (!z.image.isTouched || !z.image.isMoved) {
+ z.image.isTouched = false;
+ z.image.isMoved = false;
+ return;
+ }
+ z.image.isTouched = false;
+ z.image.isMoved = false;
+ var momentumDurationX = 300;
+ var momentumDurationY = 300;
+ var momentumDistanceX = z.velocity.x * momentumDurationX;
+ var newPositionX = z.image.currentX + momentumDistanceX;
+ var momentumDistanceY = z.velocity.y * momentumDurationY;
+ var newPositionY = z.image.currentY + momentumDistanceY;
+
+ //Fix duration
+ if (z.velocity.x !== 0) momentumDurationX = Math.abs((newPositionX - z.image.currentX) / z.velocity.x);
+ if (z.velocity.y !== 0) momentumDurationY = Math.abs((newPositionY - z.image.currentY) / z.velocity.y);
+ var momentumDuration = Math.max(momentumDurationX, momentumDurationY);
+
+ z.image.currentX = newPositionX;
+ z.image.currentY = newPositionY;
+
+ // Define if we need image drag
+ var scaledWidth = z.image.width * z.scale;
+ var scaledHeight = z.image.height * z.scale;
+ z.image.minX = Math.min((z.gesture.slideWidth / 2 - scaledWidth / 2), 0);
+ z.image.maxX = -z.image.minX;
+ z.image.minY = Math.min((z.gesture.slideHeight / 2 - scaledHeight / 2), 0);
+ z.image.maxY = -z.image.minY;
+ z.image.currentX = Math.max(Math.min(z.image.currentX, z.image.maxX), z.image.minX);
+ z.image.currentY = Math.max(Math.min(z.image.currentY, z.image.maxY), z.image.minY);
+
+ z.gesture.imageWrap.transition(momentumDuration).transform('translate3d(' + z.image.currentX + 'px, ' + z.image.currentY + 'px,0)');
+ },
+ onTransitionEnd: function (s) {
+ var z = s.zoom;
+ if (z.gesture.slide && s.previousIndex !== s.activeIndex) {
+ z.gesture.image.transform('translate3d(0,0,0) scale(1)');
+ z.gesture.imageWrap.transform('translate3d(0,0,0)');
+ z.gesture.slide = z.gesture.image = z.gesture.imageWrap = undefined;
+ z.scale = z.currentScale = 1;
+ }
+ },
+ // Toggle Zoom
+ toggleZoom: function (s, e) {
+ var z = s.zoom;
+ if (!z.gesture.slide) {
+ z.gesture.slide = s.clickedSlide ? $(s.clickedSlide) : s.slides.eq(s.activeIndex);
+ z.gesture.image = z.gesture.slide.find('img, svg, canvas');
+ z.gesture.imageWrap = z.gesture.image.parent('.' + s.params.zoomContainerClass);
+ }
+ if (!z.gesture.image || z.gesture.image.length === 0) return;
+
+ var touchX, touchY, offsetX, offsetY, diffX, diffY, translateX, translateY, imageWidth, imageHeight, scaledWidth, scaledHeight, translateMinX, translateMinY, translateMaxX, translateMaxY, slideWidth, slideHeight;
+
+ if (typeof z.image.touchesStart.x === 'undefined' && e) {
+ touchX = e.type === 'touchend' ? e.changedTouches[0].pageX : e.pageX;
+ touchY = e.type === 'touchend' ? e.changedTouches[0].pageY : e.pageY;
+ }
+ else {
+ touchX = z.image.touchesStart.x;
+ touchY = z.image.touchesStart.y;
+ }
+
+ if (z.scale && z.scale !== 1) {
+ // Zoom Out
+ z.scale = z.currentScale = 1;
+ z.gesture.imageWrap.transition(300).transform('translate3d(0,0,0)');
+ z.gesture.image.transition(300).transform('translate3d(0,0,0) scale(1)');
+ z.gesture.slide = undefined;
+ }
+ else {
+ // Zoom In
+ z.scale = z.currentScale = z.gesture.imageWrap.attr('data-swiper-zoom') || s.params.zoomMax;
+ if (e) {
+ slideWidth = z.gesture.slide[0].offsetWidth;
+ slideHeight = z.gesture.slide[0].offsetHeight;
+ offsetX = z.gesture.slide.offset().left;
+ offsetY = z.gesture.slide.offset().top;
+ diffX = offsetX + slideWidth/2 - touchX;
+ diffY = offsetY + slideHeight/2 - touchY;
+
+ imageWidth = z.gesture.image[0].offsetWidth;
+ imageHeight = z.gesture.image[0].offsetHeight;
+ scaledWidth = imageWidth * z.scale;
+ scaledHeight = imageHeight * z.scale;
+
+ translateMinX = Math.min((slideWidth / 2 - scaledWidth / 2), 0);
+ translateMinY = Math.min((slideHeight / 2 - scaledHeight / 2), 0);
+ translateMaxX = -translateMinX;
+ translateMaxY = -translateMinY;
+
+ translateX = diffX * z.scale;
+ translateY = diffY * z.scale;
+
+ if (translateX < translateMinX) {
+ translateX = translateMinX;
+ }
+ if (translateX > translateMaxX) {
+ translateX = translateMaxX;
+ }
+
+ if (translateY < translateMinY) {
+ translateY = translateMinY;
+ }
+ if (translateY > translateMaxY) {
+ translateY = translateMaxY;
+ }
+ }
+ else {
+ translateX = 0;
+ translateY = 0;
+ }
+ z.gesture.imageWrap.transition(300).transform('translate3d(' + translateX + 'px, ' + translateY + 'px,0)');
+ z.gesture.image.transition(300).transform('translate3d(0,0,0) scale(' + z.scale + ')');
+ }
+ },
+ // Attach/Detach Events
+ attachEvents: function (detach) {
+ var action = detach ? 'off' : 'on';
+
+ if (s.params.zoom) {
+ var target = s.slides;
+ var passiveListener = s.touchEvents.start === 'touchstart' && s.support.passiveListener && s.params.passiveListeners ? {passive: true, capture: false} : false;
+ // Scale image
+ if (s.support.gestures) {
+ s.slides[action]('gesturestart', s.zoom.onGestureStart, passiveListener);
+ s.slides[action]('gesturechange', s.zoom.onGestureChange, passiveListener);
+ s.slides[action]('gestureend', s.zoom.onGestureEnd, passiveListener);
+ }
+ else if (s.touchEvents.start === 'touchstart') {
+ s.slides[action](s.touchEvents.start, s.zoom.onGestureStart, passiveListener);
+ s.slides[action](s.touchEvents.move, s.zoom.onGestureChange, passiveListener);
+ s.slides[action](s.touchEvents.end, s.zoom.onGestureEnd, passiveListener);
+ }
+
+ // Move image
+ s[action]('touchStart', s.zoom.onTouchStart);
+ s.slides.each(function (index, slide){
+ if ($(slide).find('.' + s.params.zoomContainerClass).length > 0) {
+ $(slide)[action](s.touchEvents.move, s.zoom.onTouchMove);
+ }
+ });
+ s[action]('touchEnd', s.zoom.onTouchEnd);
+
+ // Scale Out
+ s[action]('transitionEnd', s.zoom.onTransitionEnd);
+ if (s.params.zoomToggle) {
+ s.on('doubleTap', s.zoom.toggleZoom);
+ }
+ }
+ },
+ init: function () {
+ s.zoom.attachEvents();
+ },
+ destroy: function () {
+ s.zoom.attachEvents(true);
+ }
+ };
+
+
+ /*=========================
+ Plugins API. Collect all and init all plugins
+ ===========================*/
+ s._plugins = [];
+ for (var plugin in s.plugins) {
+ var p = s.plugins[plugin](s, s.params[plugin]);
+ if (p) s._plugins.push(p);
+ }
+ // Method to call all plugins event/method
+ s.callPlugins = function (eventName) {
+ for (var i = 0; i < s._plugins.length; i++) {
+ if (eventName in s._plugins[i]) {
+ s._plugins[i][eventName](arguments[1], arguments[2], arguments[3], arguments[4], arguments[5]);
+ }
+ }
+ };
+
+
+ /*=========================
+ Events/Callbacks/Plugins Emitter
+ ===========================*/
+ function normalizeEventName (eventName) {
+ if (eventName.indexOf('on') !== 0) {
+ if (eventName[0] !== eventName[0].toUpperCase()) {
+ eventName = 'on' + eventName[0].toUpperCase() + eventName.substring(1);
+ }
+ else {
+ eventName = 'on' + eventName;
+ }
+ }
+ return eventName;
+ }
+ s.emitterEventListeners = {
+
+ };
+ s.emit = function (eventName) {
+ // Trigger callbacks
+ if (s.params[eventName]) {
+ s.params[eventName](arguments[1], arguments[2], arguments[3], arguments[4], arguments[5]);
+ }
+ var i;
+ // Trigger events
+ if (s.emitterEventListeners[eventName]) {
+ for (i = 0; i < s.emitterEventListeners[eventName].length; i++) {
+ s.emitterEventListeners[eventName][i](arguments[1], arguments[2], arguments[3], arguments[4], arguments[5]);
+ }
+ }
+ // Trigger plugins
+ if (s.callPlugins) s.callPlugins(eventName, arguments[1], arguments[2], arguments[3], arguments[4], arguments[5]);
+ };
+ s.on = function (eventName, handler) {
+ eventName = normalizeEventName(eventName);
+ if (!s.emitterEventListeners[eventName]) s.emitterEventListeners[eventName] = [];
+ s.emitterEventListeners[eventName].push(handler);
+ return s;
+ };
+ s.off = function (eventName, handler) {
+ var i;
+ eventName = normalizeEventName(eventName);
+ if (typeof handler === 'undefined') {
+ // Remove all handlers for such event
+ s.emitterEventListeners[eventName] = [];
+ return s;
+ }
+ if (!s.emitterEventListeners[eventName] || s.emitterEventListeners[eventName].length === 0) return;
+ for (i = 0; i < s.emitterEventListeners[eventName].length; i++) {
+ if(s.emitterEventListeners[eventName][i] === handler) s.emitterEventListeners[eventName].splice(i, 1);
+ }
+ return s;
+ };
+ s.once = function (eventName, handler) {
+ eventName = normalizeEventName(eventName);
+ var _handler = function () {
+ handler(arguments[0], arguments[1], arguments[2], arguments[3], arguments[4]);
+ s.off(eventName, _handler);
+ };
+ s.on(eventName, _handler);
+ return s;
+ };
+
+
+ // Accessibility tools
+ s.a11y = {
+ makeFocusable: function ($el) {
+ $el.attr('tabIndex', '0');
+ return $el;
+ },
+ addRole: function ($el, role) {
+ $el.attr('role', role);
+ return $el;
+ },
+
+ addLabel: function ($el, label) {
+ $el.attr('aria-label', label);
+ return $el;
+ },
+
+ disable: function ($el) {
+ $el.attr('aria-disabled', true);
+ return $el;
+ },
+
+ enable: function ($el) {
+ $el.attr('aria-disabled', false);
+ return $el;
+ },
+
+ onEnterKey: function (event) {
+ if (event.keyCode !== 13) return;
+ if ($(event.target).is(s.params.nextButton)) {
+ s.onClickNext(event);
+ if (s.isEnd) {
+ s.a11y.notify(s.params.lastSlideMessage);
+ }
+ else {
+ s.a11y.notify(s.params.nextSlideMessage);
+ }
+ }
+ else if ($(event.target).is(s.params.prevButton)) {
+ s.onClickPrev(event);
+ if (s.isBeginning) {
+ s.a11y.notify(s.params.firstSlideMessage);
+ }
+ else {
+ s.a11y.notify(s.params.prevSlideMessage);
+ }
+ }
+ if ($(event.target).is('.' + s.params.bulletClass)) {
+ $(event.target)[0].click();
+ }
+ },
+
+ liveRegion: $(' '),
+
+ notify: function (message) {
+ var notification = s.a11y.liveRegion;
+ if (notification.length === 0) return;
+ notification.html('');
+ notification.html(message);
+ },
+ init: function () {
+ // Setup accessibility
+ if (s.params.nextButton && s.nextButton && s.nextButton.length > 0) {
+ s.a11y.makeFocusable(s.nextButton);
+ s.a11y.addRole(s.nextButton, 'button');
+ s.a11y.addLabel(s.nextButton, s.params.nextSlideMessage);
+ }
+ if (s.params.prevButton && s.prevButton && s.prevButton.length > 0) {
+ s.a11y.makeFocusable(s.prevButton);
+ s.a11y.addRole(s.prevButton, 'button');
+ s.a11y.addLabel(s.prevButton, s.params.prevSlideMessage);
+ }
+
+ $(s.container).append(s.a11y.liveRegion);
+ },
+ initPagination: function () {
+ if (s.params.pagination && s.params.paginationClickable && s.bullets && s.bullets.length) {
+ s.bullets.each(function () {
+ var bullet = $(this);
+ s.a11y.makeFocusable(bullet);
+ s.a11y.addRole(bullet, 'button');
+ s.a11y.addLabel(bullet, s.params.paginationBulletMessage.replace(/{{index}}/, bullet.index() + 1));
+ });
+ }
+ },
+ destroy: function () {
+ if (s.a11y.liveRegion && s.a11y.liveRegion.length > 0) s.a11y.liveRegion.remove();
+ }
+ };
+
+
+ /*=========================
+ Init/Destroy
+ ===========================*/
+ s.init = function () {
+ if (s.params.loop) s.createLoop();
+ s.updateContainerSize();
+ s.updateSlidesSize();
+ s.updatePagination();
+ if (s.params.scrollbar && s.scrollbar) {
+ s.scrollbar.set();
+ if (s.params.scrollbarDraggable) {
+ s.scrollbar.enableDraggable();
+ }
+ }
+ if (s.params.effect !== 'slide' && s.effects[s.params.effect]) {
+ if (!s.params.loop) s.updateProgress();
+ s.effects[s.params.effect].setTranslate();
+ }
+ if (s.params.loop) {
+ s.slideTo(s.params.initialSlide + s.loopedSlides, 0, s.params.runCallbacksOnInit);
+ }
+ else {
+ s.slideTo(s.params.initialSlide, 0, s.params.runCallbacksOnInit);
+ if (s.params.initialSlide === 0) {
+ if (s.parallax && s.params.parallax) s.parallax.setTranslate();
+ if (s.lazy && s.params.lazyLoading) {
+ s.lazy.load();
+ s.lazy.initialImageLoaded = true;
+ }
+ }
+ }
+ s.attachEvents();
+ if (s.params.observer && s.support.observer) {
+ s.initObservers();
+ }
+ if (s.params.preloadImages && !s.params.lazyLoading) {
+ s.preloadImages();
+ }
+ if (s.params.zoom && s.zoom) {
+ s.zoom.init();
+ }
+ if (s.params.autoplay) {
+ s.startAutoplay();
+ }
+ if (s.params.keyboardControl) {
+ if (s.enableKeyboardControl) s.enableKeyboardControl();
+ }
+ if (s.params.mousewheelControl) {
+ if (s.enableMousewheelControl) s.enableMousewheelControl();
+ }
+ // Deprecated hashnavReplaceState changed to replaceState for use in hashnav and history
+ if (s.params.hashnavReplaceState) {
+ s.params.replaceState = s.params.hashnavReplaceState;
+ }
+ if (s.params.history) {
+ if (s.history) s.history.init();
+ }
+ if (s.params.hashnav) {
+ if (s.hashnav) s.hashnav.init();
+ }
+ if (s.params.a11y && s.a11y) s.a11y.init();
+ s.emit('onInit', s);
+ };
+
+ // Cleanup dynamic styles
+ s.cleanupStyles = function () {
+ // Container
+ s.container.removeClass(s.classNames.join(' ')).removeAttr('style');
+
+ // Wrapper
+ s.wrapper.removeAttr('style');
+
+ // Slides
+ if (s.slides && s.slides.length) {
+ s.slides
+ .removeClass([
+ s.params.slideVisibleClass,
+ s.params.slideActiveClass,
+ s.params.slideNextClass,
+ s.params.slidePrevClass
+ ].join(' '))
+ .removeAttr('style')
+ .removeAttr('data-swiper-column')
+ .removeAttr('data-swiper-row');
+ }
+
+ // Pagination/Bullets
+ if (s.paginationContainer && s.paginationContainer.length) {
+ s.paginationContainer.removeClass(s.params.paginationHiddenClass);
+ }
+ if (s.bullets && s.bullets.length) {
+ s.bullets.removeClass(s.params.bulletActiveClass);
+ }
+
+ // Buttons
+ if (s.params.prevButton) $(s.params.prevButton).removeClass(s.params.buttonDisabledClass);
+ if (s.params.nextButton) $(s.params.nextButton).removeClass(s.params.buttonDisabledClass);
+
+ // Scrollbar
+ if (s.params.scrollbar && s.scrollbar) {
+ if (s.scrollbar.track && s.scrollbar.track.length) s.scrollbar.track.removeAttr('style');
+ if (s.scrollbar.drag && s.scrollbar.drag.length) s.scrollbar.drag.removeAttr('style');
+ }
+ };
+
+ // Destroy
+ s.destroy = function (deleteInstance, cleanupStyles) {
+ // Detach evebts
+ s.detachEvents();
+ // Stop autoplay
+ s.stopAutoplay();
+ // Disable draggable
+ if (s.params.scrollbar && s.scrollbar) {
+ if (s.params.scrollbarDraggable) {
+ s.scrollbar.disableDraggable();
+ }
+ }
+ // Destroy loop
+ if (s.params.loop) {
+ s.destroyLoop();
+ }
+ // Cleanup styles
+ if (cleanupStyles) {
+ s.cleanupStyles();
+ }
+ // Disconnect observer
+ s.disconnectObservers();
+
+ // Destroy zoom
+ if (s.params.zoom && s.zoom) {
+ s.zoom.destroy();
+ }
+ // Disable keyboard/mousewheel
+ if (s.params.keyboardControl) {
+ if (s.disableKeyboardControl) s.disableKeyboardControl();
+ }
+ if (s.params.mousewheelControl) {
+ if (s.disableMousewheelControl) s.disableMousewheelControl();
+ }
+ // Disable a11y
+ if (s.params.a11y && s.a11y) s.a11y.destroy();
+ // Delete history popstate
+ if (s.params.history && !s.params.replaceState) {
+ window.removeEventListener('popstate', s.history.setHistoryPopState);
+ }
+ if (s.params.hashnav && s.hashnav) {
+ s.hashnav.destroy();
+ }
+ // Destroy callback
+ s.emit('onDestroy');
+ // Delete instance
+ if (deleteInstance !== false) s = null;
+ };
+
+ s.init();
+
+
+
+ // Return swiper instance
+ return s;
+ };
+
+
+ /*==================================================
+ Prototype
+ ====================================================*/
+ Swiper.prototype = {
+ isSafari: (function () {
+ var ua = window.navigator.userAgent.toLowerCase();
+ return (ua.indexOf('safari') >= 0 && ua.indexOf('chrome') < 0 && ua.indexOf('android') < 0);
+ })(),
+ isUiWebView: /(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/i.test(window.navigator.userAgent),
+ isArray: function (arr) {
+ return Object.prototype.toString.apply(arr) === '[object Array]';
+ },
+ /*==================================================
+ Browser
+ ====================================================*/
+ browser: {
+ ie: window.navigator.pointerEnabled || window.navigator.msPointerEnabled,
+ ieTouch: (window.navigator.msPointerEnabled && window.navigator.msMaxTouchPoints > 1) || (window.navigator.pointerEnabled && window.navigator.maxTouchPoints > 1),
+ lteIE9: (function() {
+ // create temporary DIV
+ var div = document.createElement('div');
+ // add content to tmp DIV which is wrapped into the IE HTML conditional statement
+ div.innerHTML = '';
+ // return true / false value based on what will browser render
+ return div.getElementsByTagName('i').length === 1;
+ })()
+ },
+ /*==================================================
+ Devices
+ ====================================================*/
+ device: (function () {
+ var ua = window.navigator.userAgent;
+ var android = ua.match(/(Android);?[\s\/]+([\d.]+)?/);
+ var ipad = ua.match(/(iPad).*OS\s([\d_]+)/);
+ var ipod = ua.match(/(iPod)(.*OS\s([\d_]+))?/);
+ var iphone = !ipad && ua.match(/(iPhone\sOS|iOS)\s([\d_]+)/);
+ return {
+ ios: ipad || iphone || ipod,
+ android: android
+ };
+ })(),
+ /*==================================================
+ Feature Detection
+ ====================================================*/
+ support: {
+ touch : (window.Modernizr && Modernizr.touch === true) || (function () {
+ return !!(('ontouchstart' in window) || window.DocumentTouch && document instanceof DocumentTouch);
+ })(),
+
+ transforms3d : (window.Modernizr && Modernizr.csstransforms3d === true) || (function () {
+ var div = document.createElement('div').style;
+ return ('webkitPerspective' in div || 'MozPerspective' in div || 'OPerspective' in div || 'MsPerspective' in div || 'perspective' in div);
+ })(),
+
+ flexbox: (function () {
+ var div = document.createElement('div').style;
+ var styles = ('alignItems webkitAlignItems webkitBoxAlign msFlexAlign mozBoxAlign webkitFlexDirection msFlexDirection mozBoxDirection mozBoxOrient webkitBoxDirection webkitBoxOrient').split(' ');
+ for (var i = 0; i < styles.length; i++) {
+ if (styles[i] in div) return true;
+ }
+ })(),
+
+ observer: (function () {
+ return ('MutationObserver' in window || 'WebkitMutationObserver' in window);
+ })(),
+
+ passiveListener: (function () {
+ var supportsPassive = false;
+ try {
+ var opts = Object.defineProperty({}, 'passive', {
+ get: function() {
+ supportsPassive = true;
+ }
+ });
+ window.addEventListener('testPassiveListener', null, opts);
+ } catch (e) {}
+ return supportsPassive;
+ })(),
+
+ gestures: (function () {
+ return 'ongesturestart' in window;
+ })()
+ },
+ /*==================================================
+ Plugins
+ ====================================================*/
+ plugins: {}
+ };
+
+
+ /*===========================
+ Dom7 Library
+ ===========================*/
+ var Dom7 = (function () {
+ var Dom7 = function (arr) {
+ var _this = this, i = 0;
+ // Create array-like object
+ for (i = 0; i < arr.length; i++) {
+ _this[i] = arr[i];
+ }
+ _this.length = arr.length;
+ // Return collection with methods
+ return this;
+ };
+ var $ = function (selector, context) {
+ var arr = [], i = 0;
+ if (selector && !context) {
+ if (selector instanceof Dom7) {
+ return selector;
+ }
+ }
+ if (selector) {
+ // String
+ if (typeof selector === 'string') {
+ var els, tempParent, html = selector.trim();
+ if (html.indexOf('<') >= 0 && html.indexOf('>') >= 0) {
+ var toCreate = 'div';
+ if (html.indexOf(':~]/)) {
+ // Pure ID selector
+ els = [document.getElementById(selector.split('#')[1])];
+ }
+ else {
+ // Other selectors
+ els = (context || document).querySelectorAll(selector);
+ }
+ for (i = 0; i < els.length; i++) {
+ if (els[i]) arr.push(els[i]);
+ }
+ }
+ }
+ // Node/element
+ else if (selector.nodeType || selector === window || selector === document) {
+ arr.push(selector);
+ }
+ //Array of elements or instance of Dom
+ else if (selector.length > 0 && selector[0].nodeType) {
+ for (i = 0; i < selector.length; i++) {
+ arr.push(selector[i]);
+ }
+ }
+ }
+ return new Dom7(arr);
+ };
+ Dom7.prototype = {
+ // Classes and attriutes
+ addClass: function (className) {
+ if (typeof className === 'undefined') {
+ return this;
+ }
+ var classes = className.split(' ');
+ for (var i = 0; i < classes.length; i++) {
+ for (var j = 0; j < this.length; j++) {
+ this[j].classList.add(classes[i]);
+ }
+ }
+ return this;
+ },
+ removeClass: function (className) {
+ var classes = className.split(' ');
+ for (var i = 0; i < classes.length; i++) {
+ for (var j = 0; j < this.length; j++) {
+ this[j].classList.remove(classes[i]);
+ }
+ }
+ return this;
+ },
+ hasClass: function (className) {
+ if (!this[0]) return false;
+ else return this[0].classList.contains(className);
+ },
+ toggleClass: function (className) {
+ var classes = className.split(' ');
+ for (var i = 0; i < classes.length; i++) {
+ for (var j = 0; j < this.length; j++) {
+ this[j].classList.toggle(classes[i]);
+ }
+ }
+ return this;
+ },
+ attr: function (attrs, value) {
+ if (arguments.length === 1 && typeof attrs === 'string') {
+ // Get attr
+ if (this[0]) return this[0].getAttribute(attrs);
+ else return undefined;
+ }
+ else {
+ // Set attrs
+ for (var i = 0; i < this.length; i++) {
+ if (arguments.length === 2) {
+ // String
+ this[i].setAttribute(attrs, value);
+ }
+ else {
+ // Object
+ for (var attrName in attrs) {
+ this[i][attrName] = attrs[attrName];
+ this[i].setAttribute(attrName, attrs[attrName]);
+ }
+ }
+ }
+ return this;
+ }
+ },
+ removeAttr: function (attr) {
+ for (var i = 0; i < this.length; i++) {
+ this[i].removeAttribute(attr);
+ }
+ return this;
+ },
+ data: function (key, value) {
+ if (typeof value === 'undefined') {
+ // Get value
+ if (this[0]) {
+ var dataKey = this[0].getAttribute('data-' + key);
+ if (dataKey) return dataKey;
+ else if (this[0].dom7ElementDataStorage && (key in this[0].dom7ElementDataStorage)) return this[0].dom7ElementDataStorage[key];
+ else return undefined;
+ }
+ else return undefined;
+ }
+ else {
+ // Set value
+ for (var i = 0; i < this.length; i++) {
+ var el = this[i];
+ if (!el.dom7ElementDataStorage) el.dom7ElementDataStorage = {};
+ el.dom7ElementDataStorage[key] = value;
+ }
+ return this;
+ }
+ },
+ // Transforms
+ transform : function (transform) {
+ for (var i = 0; i < this.length; i++) {
+ var elStyle = this[i].style;
+ elStyle.webkitTransform = elStyle.MsTransform = elStyle.msTransform = elStyle.MozTransform = elStyle.OTransform = elStyle.transform = transform;
+ }
+ return this;
+ },
+ transition: function (duration) {
+ if (typeof duration !== 'string') {
+ duration = duration + 'ms';
+ }
+ for (var i = 0; i < this.length; i++) {
+ var elStyle = this[i].style;
+ elStyle.webkitTransitionDuration = elStyle.MsTransitionDuration = elStyle.msTransitionDuration = elStyle.MozTransitionDuration = elStyle.OTransitionDuration = elStyle.transitionDuration = duration;
+ }
+ return this;
+ },
+ //Events
+ on: function (eventName, targetSelector, listener, capture) {
+ function handleLiveEvent(e) {
+ var target = e.target;
+ if ($(target).is(targetSelector)) listener.call(target, e);
+ else {
+ var parents = $(target).parents();
+ for (var k = 0; k < parents.length; k++) {
+ if ($(parents[k]).is(targetSelector)) listener.call(parents[k], e);
+ }
+ }
+ }
+ var events = eventName.split(' ');
+ var i, j;
+ for (i = 0; i < this.length; i++) {
+ if (typeof targetSelector === 'function' || targetSelector === false) {
+ // Usual events
+ if (typeof targetSelector === 'function') {
+ listener = arguments[1];
+ capture = arguments[2] || false;
+ }
+ for (j = 0; j < events.length; j++) {
+ this[i].addEventListener(events[j], listener, capture);
+ }
+ }
+ else {
+ //Live events
+ for (j = 0; j < events.length; j++) {
+ if (!this[i].dom7LiveListeners) this[i].dom7LiveListeners = [];
+ this[i].dom7LiveListeners.push({listener: listener, liveListener: handleLiveEvent});
+ this[i].addEventListener(events[j], handleLiveEvent, capture);
+ }
+ }
+ }
+
+ return this;
+ },
+ off: function (eventName, targetSelector, listener, capture) {
+ var events = eventName.split(' ');
+ for (var i = 0; i < events.length; i++) {
+ for (var j = 0; j < this.length; j++) {
+ if (typeof targetSelector === 'function' || targetSelector === false) {
+ // Usual events
+ if (typeof targetSelector === 'function') {
+ listener = arguments[1];
+ capture = arguments[2] || false;
+ }
+ this[j].removeEventListener(events[i], listener, capture);
+ }
+ else {
+ // Live event
+ if (this[j].dom7LiveListeners) {
+ for (var k = 0; k < this[j].dom7LiveListeners.length; k++) {
+ if (this[j].dom7LiveListeners[k].listener === listener) {
+ this[j].removeEventListener(events[i], this[j].dom7LiveListeners[k].liveListener, capture);
+ }
+ }
+ }
+ }
+ }
+ }
+ return this;
+ },
+ once: function (eventName, targetSelector, listener, capture) {
+ var dom = this;
+ if (typeof targetSelector === 'function') {
+ targetSelector = false;
+ listener = arguments[1];
+ capture = arguments[2];
+ }
+ function proxy(e) {
+ listener(e);
+ dom.off(eventName, targetSelector, proxy, capture);
+ }
+ dom.on(eventName, targetSelector, proxy, capture);
+ },
+ trigger: function (eventName, eventData) {
+ for (var i = 0; i < this.length; i++) {
+ var evt;
+ try {
+ evt = new window.CustomEvent(eventName, {detail: eventData, bubbles: true, cancelable: true});
+ }
+ catch (e) {
+ evt = document.createEvent('Event');
+ evt.initEvent(eventName, true, true);
+ evt.detail = eventData;
+ }
+ this[i].dispatchEvent(evt);
+ }
+ return this;
+ },
+ transitionEnd: function (callback) {
+ var events = ['webkitTransitionEnd', 'transitionend', 'oTransitionEnd', 'MSTransitionEnd', 'msTransitionEnd'],
+ i, j, dom = this;
+ function fireCallBack(e) {
+ /*jshint validthis:true */
+ if (e.target !== this) return;
+ callback.call(this, e);
+ for (i = 0; i < events.length; i++) {
+ dom.off(events[i], fireCallBack);
+ }
+ }
+ if (callback) {
+ for (i = 0; i < events.length; i++) {
+ dom.on(events[i], fireCallBack);
+ }
+ }
+ return this;
+ },
+ // Sizing/Styles
+ width: function () {
+ if (this[0] === window) {
+ return window.innerWidth;
+ }
+ else {
+ if (this.length > 0) {
+ return parseFloat(this.css('width'));
+ }
+ else {
+ return null;
+ }
+ }
+ },
+ outerWidth: function (includeMargins) {
+ if (this.length > 0) {
+ if (includeMargins)
+ return this[0].offsetWidth + parseFloat(this.css('margin-right')) + parseFloat(this.css('margin-left'));
+ else
+ return this[0].offsetWidth;
+ }
+ else return null;
+ },
+ height: function () {
+ if (this[0] === window) {
+ return window.innerHeight;
+ }
+ else {
+ if (this.length > 0) {
+ return parseFloat(this.css('height'));
+ }
+ else {
+ return null;
+ }
+ }
+ },
+ outerHeight: function (includeMargins) {
+ if (this.length > 0) {
+ if (includeMargins)
+ return this[0].offsetHeight + parseFloat(this.css('margin-top')) + parseFloat(this.css('margin-bottom'));
+ else
+ return this[0].offsetHeight;
+ }
+ else return null;
+ },
+ offset: function () {
+ if (this.length > 0) {
+ var el = this[0];
+ var box = el.getBoundingClientRect();
+ var body = document.body;
+ var clientTop = el.clientTop || body.clientTop || 0;
+ var clientLeft = el.clientLeft || body.clientLeft || 0;
+ var scrollTop = window.pageYOffset || el.scrollTop;
+ var scrollLeft = window.pageXOffset || el.scrollLeft;
+ return {
+ top: box.top + scrollTop - clientTop,
+ left: box.left + scrollLeft - clientLeft
+ };
+ }
+ else {
+ return null;
+ }
+ },
+ css: function (props, value) {
+ var i;
+ if (arguments.length === 1) {
+ if (typeof props === 'string') {
+ if (this[0]) return window.getComputedStyle(this[0], null).getPropertyValue(props);
+ }
+ else {
+ for (i = 0; i < this.length; i++) {
+ for (var prop in props) {
+ this[i].style[prop] = props[prop];
+ }
+ }
+ return this;
+ }
+ }
+ if (arguments.length === 2 && typeof props === 'string') {
+ for (i = 0; i < this.length; i++) {
+ this[i].style[props] = value;
+ }
+ return this;
+ }
+ return this;
+ },
+
+ //Dom manipulation
+ each: function (callback) {
+ for (var i = 0; i < this.length; i++) {
+ callback.call(this[i], i, this[i]);
+ }
+ return this;
+ },
+ html: function (html) {
+ if (typeof html === 'undefined') {
+ return this[0] ? this[0].innerHTML : undefined;
+ }
+ else {
+ for (var i = 0; i < this.length; i++) {
+ this[i].innerHTML = html;
+ }
+ return this;
+ }
+ },
+ text: function (text) {
+ if (typeof text === 'undefined') {
+ if (this[0]) {
+ return this[0].textContent.trim();
+ }
+ else return null;
+ }
+ else {
+ for (var i = 0; i < this.length; i++) {
+ this[i].textContent = text;
+ }
+ return this;
+ }
+ },
+ is: function (selector) {
+ if (!this[0]) return false;
+ var compareWith, i;
+ if (typeof selector === 'string') {
+ var el = this[0];
+ if (el === document) return selector === document;
+ if (el === window) return selector === window;
+
+ if (el.matches) return el.matches(selector);
+ else if (el.webkitMatchesSelector) return el.webkitMatchesSelector(selector);
+ else if (el.mozMatchesSelector) return el.mozMatchesSelector(selector);
+ else if (el.msMatchesSelector) return el.msMatchesSelector(selector);
+ else {
+ compareWith = $(selector);
+ for (i = 0; i < compareWith.length; i++) {
+ if (compareWith[i] === this[0]) return true;
+ }
+ return false;
+ }
+ }
+ else if (selector === document) return this[0] === document;
+ else if (selector === window) return this[0] === window;
+ else {
+ if (selector.nodeType || selector instanceof Dom7) {
+ compareWith = selector.nodeType ? [selector] : selector;
+ for (i = 0; i < compareWith.length; i++) {
+ if (compareWith[i] === this[0]) return true;
+ }
+ return false;
+ }
+ return false;
+ }
+
+ },
+ index: function () {
+ if (this[0]) {
+ var child = this[0];
+ var i = 0;
+ while ((child = child.previousSibling) !== null) {
+ if (child.nodeType === 1) i++;
+ }
+ return i;
+ }
+ else return undefined;
+ },
+ eq: function (index) {
+ if (typeof index === 'undefined') return this;
+ var length = this.length;
+ var returnIndex;
+ if (index > length - 1) {
+ return new Dom7([]);
+ }
+ if (index < 0) {
+ returnIndex = length + index;
+ if (returnIndex < 0) return new Dom7([]);
+ else return new Dom7([this[returnIndex]]);
+ }
+ return new Dom7([this[index]]);
+ },
+ append: function (newChild) {
+ var i, j;
+ for (i = 0; i < this.length; i++) {
+ if (typeof newChild === 'string') {
+ var tempDiv = document.createElement('div');
+ tempDiv.innerHTML = newChild;
+ while (tempDiv.firstChild) {
+ this[i].appendChild(tempDiv.firstChild);
+ }
+ }
+ else if (newChild instanceof Dom7) {
+ for (j = 0; j < newChild.length; j++) {
+ this[i].appendChild(newChild[j]);
+ }
+ }
+ else {
+ this[i].appendChild(newChild);
+ }
+ }
+ return this;
+ },
+ prepend: function (newChild) {
+ var i, j;
+ for (i = 0; i < this.length; i++) {
+ if (typeof newChild === 'string') {
+ var tempDiv = document.createElement('div');
+ tempDiv.innerHTML = newChild;
+ for (j = tempDiv.childNodes.length - 1; j >= 0; j--) {
+ this[i].insertBefore(tempDiv.childNodes[j], this[i].childNodes[0]);
+ }
+ // this[i].insertAdjacentHTML('afterbegin', newChild);
+ }
+ else if (newChild instanceof Dom7) {
+ for (j = 0; j < newChild.length; j++) {
+ this[i].insertBefore(newChild[j], this[i].childNodes[0]);
+ }
+ }
+ else {
+ this[i].insertBefore(newChild, this[i].childNodes[0]);
+ }
+ }
+ return this;
+ },
+ insertBefore: function (selector) {
+ var before = $(selector);
+ for (var i = 0; i < this.length; i++) {
+ if (before.length === 1) {
+ before[0].parentNode.insertBefore(this[i], before[0]);
+ }
+ else if (before.length > 1) {
+ for (var j = 0; j < before.length; j++) {
+ before[j].parentNode.insertBefore(this[i].cloneNode(true), before[j]);
+ }
+ }
+ }
+ },
+ insertAfter: function (selector) {
+ var after = $(selector);
+ for (var i = 0; i < this.length; i++) {
+ if (after.length === 1) {
+ after[0].parentNode.insertBefore(this[i], after[0].nextSibling);
+ }
+ else if (after.length > 1) {
+ for (var j = 0; j < after.length; j++) {
+ after[j].parentNode.insertBefore(this[i].cloneNode(true), after[j].nextSibling);
+ }
+ }
+ }
+ },
+ next: function (selector) {
+ if (this.length > 0) {
+ if (selector) {
+ if (this[0].nextElementSibling && $(this[0].nextElementSibling).is(selector)) return new Dom7([this[0].nextElementSibling]);
+ else return new Dom7([]);
+ }
+ else {
+ if (this[0].nextElementSibling) return new Dom7([this[0].nextElementSibling]);
+ else return new Dom7([]);
+ }
+ }
+ else return new Dom7([]);
+ },
+ nextAll: function (selector) {
+ var nextEls = [];
+ var el = this[0];
+ if (!el) return new Dom7([]);
+ while (el.nextElementSibling) {
+ var next = el.nextElementSibling;
+ if (selector) {
+ if($(next).is(selector)) nextEls.push(next);
+ }
+ else nextEls.push(next);
+ el = next;
+ }
+ return new Dom7(nextEls);
+ },
+ prev: function (selector) {
+ if (this.length > 0) {
+ if (selector) {
+ if (this[0].previousElementSibling && $(this[0].previousElementSibling).is(selector)) return new Dom7([this[0].previousElementSibling]);
+ else return new Dom7([]);
+ }
+ else {
+ if (this[0].previousElementSibling) return new Dom7([this[0].previousElementSibling]);
+ else return new Dom7([]);
+ }
+ }
+ else return new Dom7([]);
+ },
+ prevAll: function (selector) {
+ var prevEls = [];
+ var el = this[0];
+ if (!el) return new Dom7([]);
+ while (el.previousElementSibling) {
+ var prev = el.previousElementSibling;
+ if (selector) {
+ if($(prev).is(selector)) prevEls.push(prev);
+ }
+ else prevEls.push(prev);
+ el = prev;
+ }
+ return new Dom7(prevEls);
+ },
+ parent: function (selector) {
+ var parents = [];
+ for (var i = 0; i < this.length; i++) {
+ if (selector) {
+ if ($(this[i].parentNode).is(selector)) parents.push(this[i].parentNode);
+ }
+ else {
+ parents.push(this[i].parentNode);
+ }
+ }
+ return $($.unique(parents));
+ },
+ parents: function (selector) {
+ var parents = [];
+ for (var i = 0; i < this.length; i++) {
+ var parent = this[i].parentNode;
+ while (parent) {
+ if (selector) {
+ if ($(parent).is(selector)) parents.push(parent);
+ }
+ else {
+ parents.push(parent);
+ }
+ parent = parent.parentNode;
+ }
+ }
+ return $($.unique(parents));
+ },
+ find : function (selector) {
+ var foundElements = [];
+ for (var i = 0; i < this.length; i++) {
+ var found = this[i].querySelectorAll(selector);
+ for (var j = 0; j < found.length; j++) {
+ foundElements.push(found[j]);
+ }
+ }
+ return new Dom7(foundElements);
+ },
+ children: function (selector) {
+ var children = [];
+ for (var i = 0; i < this.length; i++) {
+ var childNodes = this[i].childNodes;
+
+ for (var j = 0; j < childNodes.length; j++) {
+ if (!selector) {
+ if (childNodes[j].nodeType === 1) children.push(childNodes[j]);
+ }
+ else {
+ if (childNodes[j].nodeType === 1 && $(childNodes[j]).is(selector)) children.push(childNodes[j]);
+ }
+ }
+ }
+ return new Dom7($.unique(children));
+ },
+ remove: function () {
+ for (var i = 0; i < this.length; i++) {
+ if (this[i].parentNode) this[i].parentNode.removeChild(this[i]);
+ }
+ return this;
+ },
+ add: function () {
+ var dom = this;
+ var i, j;
+ for (i = 0; i < arguments.length; i++) {
+ var toAdd = $(arguments[i]);
+ for (j = 0; j < toAdd.length; j++) {
+ dom[dom.length] = toAdd[j];
+ dom.length++;
+ }
+ }
+ return dom;
+ }
+ };
+ $.fn = Dom7.prototype;
+ $.unique = function (arr) {
+ var unique = [];
+ for (var i = 0; i < arr.length; i++) {
+ if (unique.indexOf(arr[i]) === -1) unique.push(arr[i]);
+ }
+ return unique;
+ };
+
+ return $;
+ })();
+
+
+ /*===========================
+ Get Dom libraries
+ ===========================*/
+ var swiperDomPlugins = ['jQuery', 'Zepto', 'Dom7'];
+ for (var i = 0; i < swiperDomPlugins.length; i++) {
+ if (window[swiperDomPlugins[i]]) {
+ addLibraryPlugin(window[swiperDomPlugins[i]]);
+ }
+ }
+ // Required DOM Plugins
+ var domLib;
+ if (typeof Dom7 === 'undefined') {
+ domLib = window.Dom7 || window.Zepto || window.jQuery;
+ }
+ else {
+ domLib = Dom7;
+ }
+
+
+ /*===========================
+ Add .swiper plugin from Dom libraries
+ ===========================*/
+ function addLibraryPlugin(lib) {
+ lib.fn.swiper = function (params) {
+ var firstInstance;
+ lib(this).each(function () {
+ var s = new Swiper(this, params);
+ if (!firstInstance) firstInstance = s;
+ });
+ return firstInstance;
+ };
+ }
+
+ if (domLib) {
+ if (!('transitionEnd' in domLib.fn)) {
+ domLib.fn.transitionEnd = function (callback) {
+ var events = ['webkitTransitionEnd', 'transitionend', 'oTransitionEnd', 'MSTransitionEnd', 'msTransitionEnd'],
+ i, j, dom = this;
+ function fireCallBack(e) {
+ /*jshint validthis:true */
+ if (e.target !== this) return;
+ callback.call(this, e);
+ for (i = 0; i < events.length; i++) {
+ dom.off(events[i], fireCallBack);
+ }
+ }
+ if (callback) {
+ for (i = 0; i < events.length; i++) {
+ dom.on(events[i], fireCallBack);
+ }
+ }
+ return this;
+ };
+ }
+ if (!('transform' in domLib.fn)) {
+ domLib.fn.transform = function (transform) {
+ for (var i = 0; i < this.length; i++) {
+ var elStyle = this[i].style;
+ elStyle.webkitTransform = elStyle.MsTransform = elStyle.msTransform = elStyle.MozTransform = elStyle.OTransform = elStyle.transform = transform;
+ }
+ return this;
+ };
+ }
+ if (!('transition' in domLib.fn)) {
+ domLib.fn.transition = function (duration) {
+ if (typeof duration !== 'string') {
+ duration = duration + 'ms';
+ }
+ for (var i = 0; i < this.length; i++) {
+ var elStyle = this[i].style;
+ elStyle.webkitTransitionDuration = elStyle.MsTransitionDuration = elStyle.msTransitionDuration = elStyle.MozTransitionDuration = elStyle.OTransitionDuration = elStyle.transitionDuration = duration;
+ }
+ return this;
+ };
+ }
+ if (!('outerWidth' in domLib.fn)) {
+ domLib.fn.outerWidth = function (includeMargins) {
+ if (this.length > 0) {
+ if (includeMargins)
+ return this[0].offsetWidth + parseFloat(this.css('margin-right')) + parseFloat(this.css('margin-left'));
+ else
+ return this[0].offsetWidth;
+ }
+ else return null;
+ };
+ }
+ }
+
+
+ window.Swiper = Swiper;
+})();
+
+/*===========================
+Swiper AMD Export
+===========================*/
+if (typeof(module) !== 'undefined')
+{
+ module.exports = window.Swiper;
+}
+else if (typeof define === 'function' && define.amd) {
+ define([], function () {
+ 'use strict';
+ return window.Swiper;
+ });
+}
+
+//# sourceMappingURL=maps/swiper.js.map
diff --git a/app/culture/view/szwjs/public/js/widget/swiper.min.js b/app/culture/view/szwjs/public/js/widget/swiper.min.js
new file mode 100644
index 0000000..03a652f
--- /dev/null
+++ b/app/culture/view/szwjs/public/js/widget/swiper.min.js
@@ -0,0 +1,19 @@
+/**
+ * Swiper 3.4.2
+ * Most modern mobile touch slider and framework with hardware accelerated transitions
+ *
+ * http://www.idangero.us/swiper/
+ *
+ * Copyright 2017, Vladimir Kharlampidi
+ * The iDangero.us
+ * http://www.idangero.us/
+ *
+ * Licensed under MIT
+ *
+ * Released on: March 10, 2017
+ */
+!function(){"use strict";var e,a=function(s,i){function r(e){return Math.floor(e)}function n(){var e=T.params.autoplay,a=T.slides.eq(T.activeIndex);a.attr("data-swiper-autoplay")&&(e=a.attr("data-swiper-autoplay")||T.params.autoplay),T.autoplayTimeoutId=setTimeout(function(){T.params.loop?(T.fixLoop(),T._slideNext(),T.emit("onAutoplay",T)):T.isEnd?i.autoplayStopOnLast?T.stopAutoplay():(T._slideTo(0),T.emit("onAutoplay",T)):(T._slideNext(),T.emit("onAutoplay",T))},e)}function o(a,t){var s=e(a.target);if(!s.is(t))if("string"==typeof t)s=s.parents(t);else if(t.nodeType){var i;return s.parents().each(function(e,a){a===t&&(i=t)}),i?t:void 0}if(0!==s.length)return s[0]}function l(e,a){a=a||{};var t=window.MutationObserver||window.WebkitMutationObserver,s=new t(function(e){e.forEach(function(e){T.onResize(!0),T.emit("onObserverUpdate",T,e)})});s.observe(e,{attributes:void 0===a.attributes||a.attributes,childList:void 0===a.childList||a.childList,characterData:void 0===a.characterData||a.characterData}),T.observers.push(s)}function p(e){e.originalEvent&&(e=e.originalEvent);var a=e.keyCode||e.charCode;if(!T.params.allowSwipeToNext&&(T.isHorizontal()&&39===a||!T.isHorizontal()&&40===a))return!1;if(!T.params.allowSwipeToPrev&&(T.isHorizontal()&&37===a||!T.isHorizontal()&&38===a))return!1;if(!(e.shiftKey||e.altKey||e.ctrlKey||e.metaKey||document.activeElement&&document.activeElement.nodeName&&("input"===document.activeElement.nodeName.toLowerCase()||"textarea"===document.activeElement.nodeName.toLowerCase()))){if(37===a||39===a||38===a||40===a){var t=!1;if(T.container.parents("."+T.params.slideClass).length>0&&0===T.container.parents("."+T.params.slideActiveClass).length)return;var s={left:window.pageXOffset,top:window.pageYOffset},i=window.innerWidth,r=window.innerHeight,n=T.container.offset();T.rtl&&(n.left=n.left-T.container[0].scrollLeft);for(var o=[[n.left,n.top],[n.left+T.width,n.top],[n.left,n.top+T.height],[n.left+T.width,n.top+T.height]],l=0;l=s.left&&p[0]<=s.left+i&&p[1]>=s.top&&p[1]<=s.top+r&&(t=!0)}if(!t)return}T.isHorizontal()?(37!==a&&39!==a||(e.preventDefault?e.preventDefault():e.returnValue=!1),(39===a&&!T.rtl||37===a&&T.rtl)&&T.slideNext(),(37===a&&!T.rtl||39===a&&T.rtl)&&T.slidePrev()):(38!==a&&40!==a||(e.preventDefault?e.preventDefault():e.returnValue=!1),40===a&&T.slideNext(),38===a&&T.slidePrev()),T.emit("onKeyPress",T,a)}}function d(e){var a=0,t=0,s=0,i=0;return"detail"in e&&(t=e.detail),"wheelDelta"in e&&(t=-e.wheelDelta/120),"wheelDeltaY"in e&&(t=-e.wheelDeltaY/120),"wheelDeltaX"in e&&(a=-e.wheelDeltaX/120),"axis"in e&&e.axis===e.HORIZONTAL_AXIS&&(a=t,t=0),s=10*a,i=10*t,"deltaY"in e&&(i=e.deltaY),"deltaX"in e&&(s=e.deltaX),(s||i)&&e.deltaMode&&(1===e.deltaMode?(s*=40,i*=40):(s*=800,i*=800)),s&&!a&&(a=s<1?-1:1),i&&!t&&(t=i<1?-1:1),{spinX:a,spinY:t,pixelX:s,pixelY:i}}function u(e){e.originalEvent&&(e=e.originalEvent);var a=0,t=T.rtl?-1:1,s=d(e);if(T.params.mousewheelForceToAxis)if(T.isHorizontal()){if(!(Math.abs(s.pixelX)>Math.abs(s.pixelY)))return;a=s.pixelX*t}else{if(!(Math.abs(s.pixelY)>Math.abs(s.pixelX)))return;a=s.pixelY}else a=Math.abs(s.pixelX)>Math.abs(s.pixelY)?-s.pixelX*t:-s.pixelY;if(0!==a){if(T.params.mousewheelInvert&&(a=-a),T.params.freeMode){var i=T.getWrapperTranslate()+a*T.params.mousewheelSensitivity,r=T.isBeginning,n=T.isEnd;if(i>=T.minTranslate()&&(i=T.minTranslate()),i<=T.maxTranslate()&&(i=T.maxTranslate()),T.setWrapperTransition(0),T.setWrapperTranslate(i),T.updateProgress(),T.updateActiveIndex(),(!r&&T.isBeginning||!n&&T.isEnd)&&T.updateClasses(),T.params.freeModeSticky?(clearTimeout(T.mousewheel.timeout),T.mousewheel.timeout=setTimeout(function(){T.slideReset()},300)):T.params.lazyLoading&&T.lazy&&T.lazy.load(),T.emit("onScroll",T,e),T.params.autoplay&&T.params.autoplayDisableOnInteraction&&T.stopAutoplay(),0===i||i===T.maxTranslate())return}else{if((new window.Date).getTime()-T.mousewheel.lastScrollTime>60)if(a<0)if(T.isEnd&&!T.params.loop||T.animating){if(T.params.mousewheelReleaseOnEdges)return!0}else T.slideNext(),T.emit("onScroll",T,e);else if(T.isBeginning&&!T.params.loop||T.animating){if(T.params.mousewheelReleaseOnEdges)return!0}else T.slidePrev(),T.emit("onScroll",T,e);T.mousewheel.lastScrollTime=(new window.Date).getTime()}return e.preventDefault?e.preventDefault():e.returnValue=!1,!1}}function c(a,t){a=e(a);var s,i,r,n=T.rtl?-1:1;s=a.attr("data-swiper-parallax")||"0",i=a.attr("data-swiper-parallax-x"),r=a.attr("data-swiper-parallax-y"),i||r?(i=i||"0",r=r||"0"):T.isHorizontal()?(i=s,r="0"):(r=s,i="0"),i=i.indexOf("%")>=0?parseInt(i,10)*t*n+"%":i*t*n+"px",r=r.indexOf("%")>=0?parseInt(r,10)*t+"%":r*t+"px",a.transform("translate3d("+i+", "+r+",0px)")}function m(e){return 0!==e.indexOf("on")&&(e=e[0]!==e[0].toUpperCase()?"on"+e[0].toUpperCase()+e.substring(1):"on"+e),e}if(!(this instanceof a))return new a(s,i);var h={direction:"horizontal",touchEventsTarget:"container",initialSlide:0,speed:300,autoplay:!1,autoplayDisableOnInteraction:!0,autoplayStopOnLast:!1,iOSEdgeSwipeDetection:!1,iOSEdgeSwipeThreshold:20,freeMode:!1,freeModeMomentum:!0,freeModeMomentumRatio:1,freeModeMomentumBounce:!0,freeModeMomentumBounceRatio:1,freeModeMomentumVelocityRatio:1,freeModeSticky:!1,freeModeMinimumVelocity:.02,autoHeight:!1,setWrapperSize:!1,virtualTranslate:!1,effect:"slide",coverflow:{rotate:50,stretch:0,depth:100,modifier:1,slideShadows:!0},flip:{slideShadows:!0,limitRotation:!0},cube:{slideShadows:!0,shadow:!0,shadowOffset:20,shadowScale:.94},fade:{crossFade:!1},parallax:!1,zoom:!1,zoomMax:3,zoomMin:1,zoomToggle:!0,scrollbar:null,scrollbarHide:!0,scrollbarDraggable:!1,scrollbarSnapOnRelease:!1,keyboardControl:!1,mousewheelControl:!1,mousewheelReleaseOnEdges:!1,mousewheelInvert:!1,mousewheelForceToAxis:!1,mousewheelSensitivity:1,mousewheelEventsTarged:"container",hashnav:!1,hashnavWatchState:!1,history:!1,replaceState:!1,breakpoints:void 0,spaceBetween:0,slidesPerView:1,slidesPerColumn:1,slidesPerColumnFill:"column",slidesPerGroup:1,centeredSlides:!1,slidesOffsetBefore:0,slidesOffsetAfter:0,roundLengths:!1,touchRatio:1,touchAngle:45,simulateTouch:!0,shortSwipes:!0,longSwipes:!0,longSwipesRatio:.5,longSwipesMs:300,followFinger:!0,onlyExternal:!1,threshold:0,touchMoveStopPropagation:!0,touchReleaseOnEdges:!1,uniqueNavElements:!0,pagination:null,paginationElement:"span",paginationClickable:!1,paginationHide:!1,paginationBulletRender:null,paginationProgressRender:null,paginationFractionRender:null,paginationCustomRender:null,paginationType:"bullets",resistance:!0,resistanceRatio:.85,nextButton:null,prevButton:null,watchSlidesProgress:!1,watchSlidesVisibility:!1,grabCursor:!1,preventClicks:!0,preventClicksPropagation:!0,slideToClickedSlide:!1,lazyLoading:!1,lazyLoadingInPrevNext:!1,lazyLoadingInPrevNextAmount:1,lazyLoadingOnTransitionStart:!1,preloadImages:!0,updateOnImagesReady:!0,loop:!1,loopAdditionalSlides:0,loopedSlides:null,control:void 0,controlInverse:!1,controlBy:"slide",normalizeSlideIndex:!0,allowSwipeToPrev:!0,allowSwipeToNext:!0,swipeHandler:null,noSwiping:!0,noSwipingClass:"swiper-no-swiping",passiveListeners:!0,containerModifierClass:"swiper-container-",slideClass:"swiper-slide",slideActiveClass:"swiper-slide-active",slideDuplicateActiveClass:"swiper-slide-duplicate-active",slideVisibleClass:"swiper-slide-visible",slideDuplicateClass:"swiper-slide-duplicate",slideNextClass:"swiper-slide-next",slideDuplicateNextClass:"swiper-slide-duplicate-next",slidePrevClass:"swiper-slide-prev",slideDuplicatePrevClass:"swiper-slide-duplicate-prev",wrapperClass:"swiper-wrapper",bulletClass:"swiper-pagination-bullet",bulletActiveClass:"swiper-pagination-bullet-active",buttonDisabledClass:"swiper-button-disabled",paginationCurrentClass:"swiper-pagination-current",paginationTotalClass:"swiper-pagination-total",paginationHiddenClass:"swiper-pagination-hidden",paginationProgressbarClass:"swiper-pagination-progressbar",paginationClickableClass:"swiper-pagination-clickable",paginationModifierClass:"swiper-pagination-",lazyLoadingClass:"swiper-lazy",lazyStatusLoadingClass:"swiper-lazy-loading",lazyStatusLoadedClass:"swiper-lazy-loaded",lazyPreloaderClass:"swiper-lazy-preloader",notificationClass:"swiper-notification",preloaderClass:"preloader",zoomContainerClass:"swiper-zoom-container",observer:!1,observeParents:!1,a11y:!1,prevSlideMessage:"Previous slide",nextSlideMessage:"Next slide",firstSlideMessage:"This is the first slide",lastSlideMessage:"This is the last slide",paginationBulletMessage:"Go to slide {{index}}",runCallbacksOnInit:!0},g=i&&i.virtualTranslate;i=i||{};var f={};for(var v in i)if("object"!=typeof i[v]||null===i[v]||(i[v].nodeType||i[v]===window||i[v]===document||void 0!==t&&i[v]instanceof t||"undefined"!=typeof jQuery&&i[v]instanceof jQuery))f[v]=i[v];else{f[v]={};for(var w in i[v])f[v][w]=i[v][w]}for(var y in h)if(void 0===i[y])i[y]=h[y];else if("object"==typeof i[y])for(var x in h[y])void 0===i[y][x]&&(i[y][x]=h[y][x]);var T=this;if(T.params=i,T.originalParams=f,T.classNames=[],void 0!==e&&void 0!==t&&(e=t),(void 0!==e||(e=void 0===t?window.Dom7||window.Zepto||window.jQuery:t))&&(T.$=e,T.currentBreakpoint=void 0,T.getActiveBreakpoint=function(){if(!T.params.breakpoints)return!1;var e,a=!1,t=[];for(e in T.params.breakpoints)T.params.breakpoints.hasOwnProperty(e)&&t.push(e);t.sort(function(e,a){return parseInt(e,10)>parseInt(a,10)});for(var s=0;s=window.innerWidth&&!a&&(a=e);return a||"max"},T.setBreakpoint=function(){var e=T.getActiveBreakpoint();if(e&&T.currentBreakpoint!==e){var a=e in T.params.breakpoints?T.params.breakpoints[e]:T.originalParams,t=T.params.loop&&a.slidesPerView!==T.params.slidesPerView;for(var s in a)T.params[s]=a[s];T.currentBreakpoint=e,t&&T.destroyLoop&&T.reLoop(!0)}},T.params.breakpoints&&T.setBreakpoint(),T.container=e(s),0!==T.container.length)){if(T.container.length>1){var b=[];return T.container.each(function(){b.push(new a(this,i))}),b}T.container[0].swiper=T,T.container.data("swiper",T),T.classNames.push(T.params.containerModifierClass+T.params.direction),T.params.freeMode&&T.classNames.push(T.params.containerModifierClass+"free-mode"),T.support.flexbox||(T.classNames.push(T.params.containerModifierClass+"no-flexbox"),T.params.slidesPerColumn=1),T.params.autoHeight&&T.classNames.push(T.params.containerModifierClass+"autoheight"),(T.params.parallax||T.params.watchSlidesVisibility)&&(T.params.watchSlidesProgress=!0),T.params.touchReleaseOnEdges&&(T.params.resistanceRatio=0),["cube","coverflow","flip"].indexOf(T.params.effect)>=0&&(T.support.transforms3d?(T.params.watchSlidesProgress=!0,T.classNames.push(T.params.containerModifierClass+"3d")):T.params.effect="slide"),"slide"!==T.params.effect&&T.classNames.push(T.params.containerModifierClass+T.params.effect),"cube"===T.params.effect&&(T.params.resistanceRatio=0,T.params.slidesPerView=1,T.params.slidesPerColumn=1,T.params.slidesPerGroup=1,T.params.centeredSlides=!1,T.params.spaceBetween=0,T.params.virtualTranslate=!0),"fade"!==T.params.effect&&"flip"!==T.params.effect||(T.params.slidesPerView=1,T.params.slidesPerColumn=1,T.params.slidesPerGroup=1,T.params.watchSlidesProgress=!0,T.params.spaceBetween=0,void 0===g&&(T.params.virtualTranslate=!0)),T.params.grabCursor&&T.support.touch&&(T.params.grabCursor=!1),T.wrapper=T.container.children("."+T.params.wrapperClass),T.params.pagination&&(T.paginationContainer=e(T.params.pagination),T.params.uniqueNavElements&&"string"==typeof T.params.pagination&&T.paginationContainer.length>1&&1===T.container.find(T.params.pagination).length&&(T.paginationContainer=T.container.find(T.params.pagination)),"bullets"===T.params.paginationType&&T.params.paginationClickable?T.paginationContainer.addClass(T.params.paginationModifierClass+"clickable"):T.params.paginationClickable=!1,T.paginationContainer.addClass(T.params.paginationModifierClass+T.params.paginationType)),(T.params.nextButton||T.params.prevButton)&&(T.params.nextButton&&(T.nextButton=e(T.params.nextButton),T.params.uniqueNavElements&&"string"==typeof T.params.nextButton&&T.nextButton.length>1&&1===T.container.find(T.params.nextButton).length&&(T.nextButton=T.container.find(T.params.nextButton))),T.params.prevButton&&(T.prevButton=e(T.params.prevButton),T.params.uniqueNavElements&&"string"==typeof T.params.prevButton&&T.prevButton.length>1&&1===T.container.find(T.params.prevButton).length&&(T.prevButton=T.container.find(T.params.prevButton)))),T.isHorizontal=function(){return"horizontal"===T.params.direction},T.rtl=T.isHorizontal()&&("rtl"===T.container[0].dir.toLowerCase()||"rtl"===T.container.css("direction")),T.rtl&&T.classNames.push(T.params.containerModifierClass+"rtl"),T.rtl&&(T.wrongRTL="-webkit-box"===T.wrapper.css("display")),T.params.slidesPerColumn>1&&T.classNames.push(T.params.containerModifierClass+"multirow"),T.device.android&&T.classNames.push(T.params.containerModifierClass+"android"),T.container.addClass(T.classNames.join(" ")),T.translate=0,T.progress=0,T.velocity=0,T.lockSwipeToNext=function(){T.params.allowSwipeToNext=!1,T.params.allowSwipeToPrev===!1&&T.params.grabCursor&&T.unsetGrabCursor()},T.lockSwipeToPrev=function(){T.params.allowSwipeToPrev=!1,T.params.allowSwipeToNext===!1&&T.params.grabCursor&&T.unsetGrabCursor()},T.lockSwipes=function(){T.params.allowSwipeToNext=T.params.allowSwipeToPrev=!1,T.params.grabCursor&&T.unsetGrabCursor()},T.unlockSwipeToNext=function(){T.params.allowSwipeToNext=!0,T.params.allowSwipeToPrev===!0&&T.params.grabCursor&&T.setGrabCursor()},T.unlockSwipeToPrev=function(){T.params.allowSwipeToPrev=!0,T.params.allowSwipeToNext===!0&&T.params.grabCursor&&T.setGrabCursor()},T.unlockSwipes=function(){T.params.allowSwipeToNext=T.params.allowSwipeToPrev=!0,T.params.grabCursor&&T.setGrabCursor()},T.setGrabCursor=function(e){T.container[0].style.cursor="move",T.container[0].style.cursor=e?"-webkit-grabbing":"-webkit-grab",T.container[0].style.cursor=e?"-moz-grabbin":"-moz-grab",T.container[0].style.cursor=e?"grabbing":"grab"},T.unsetGrabCursor=function(){T.container[0].style.cursor=""},T.params.grabCursor&&T.setGrabCursor(),T.imagesToLoad=[],T.imagesLoaded=0,T.loadImage=function(e,a,t,s,i,r){function n(){r&&r()}var o;e.complete&&i?n():a?(o=new window.Image,o.onload=n,o.onerror=n,s&&(o.sizes=s),t&&(o.srcset=t),a&&(o.src=a)):n()},T.preloadImages=function(){function e(){void 0!==T&&null!==T&&T&&(void 0!==T.imagesLoaded&&T.imagesLoaded++,T.imagesLoaded===T.imagesToLoad.length&&(T.params.updateOnImagesReady&&T.update(),T.emit("onImagesReady",T)))}T.imagesToLoad=T.container.find("img");for(var a=0;a1)for(e=0;eT.slides.length)break;a.push(T.slides.eq(s)[0])}else a.push(T.slides.eq(T.activeIndex)[0]);for(e=0;et?i:t}t&&T.wrapper.css("height",t+"px")},T.updateContainerSize=function(){var e,a;e=void 0!==T.params.width?T.params.width:T.container[0].clientWidth,a=void 0!==T.params.height?T.params.height:T.container[0].clientHeight,0===e&&T.isHorizontal()||0===a&&!T.isHorizontal()||(e=e-parseInt(T.container.css("padding-left"),10)-parseInt(T.container.css("padding-right"),10),a=a-parseInt(T.container.css("padding-top"),10)-parseInt(T.container.css("padding-bottom"),10),T.width=e,T.height=a,T.size=T.isHorizontal()?T.width:T.height)},T.updateSlidesSize=function(){T.slides=T.wrapper.children("."+T.params.slideClass),T.snapGrid=[],T.slidesGrid=[],T.slidesSizesGrid=[];var e,a=T.params.spaceBetween,t=-T.params.slidesOffsetBefore,s=0,i=0;if(void 0!==T.size){"string"==typeof a&&a.indexOf("%")>=0&&(a=parseFloat(a.replace("%",""))/100*T.size),T.virtualSize=-a,T.rtl?T.slides.css({marginLeft:"",marginTop:""}):T.slides.css({marginRight:"",marginBottom:""});var n;T.params.slidesPerColumn>1&&(n=Math.floor(T.slides.length/T.params.slidesPerColumn)===T.slides.length/T.params.slidesPerColumn?T.slides.length:Math.ceil(T.slides.length/T.params.slidesPerColumn)*T.params.slidesPerColumn,"auto"!==T.params.slidesPerView&&"row"===T.params.slidesPerColumnFill&&(n=Math.max(n,T.params.slidesPerView*T.params.slidesPerColumn)));var o,l=T.params.slidesPerColumn,p=n/l,d=p-(T.params.slidesPerColumn*p-T.slides.length);for(e=0;e1){var c,m,h;"column"===T.params.slidesPerColumnFill?(m=Math.floor(e/l),h=e-m*l,(m>d||m===d&&h===l-1)&&++h>=l&&(h=0,m++),c=m+h*n/l,u.css({"-webkit-box-ordinal-group":c,"-moz-box-ordinal-group":c,"-ms-flex-order":c,"-webkit-order":c,order:c})):(h=Math.floor(e/p),m=e-h*p),u.css("margin-"+(T.isHorizontal()?"top":"left"),0!==h&&T.params.spaceBetween&&T.params.spaceBetween+"px").attr("data-swiper-column",m).attr("data-swiper-row",h)}"none"!==u.css("display")&&("auto"===T.params.slidesPerView?(o=T.isHorizontal()?u.outerWidth(!0):u.outerHeight(!0),T.params.roundLengths&&(o=r(o))):(o=(T.size-(T.params.slidesPerView-1)*a)/T.params.slidesPerView,T.params.roundLengths&&(o=r(o)),T.isHorizontal()?T.slides[e].style.width=o+"px":T.slides[e].style.height=o+"px"),T.slides[e].swiperSlideSize=o,T.slidesSizesGrid.push(o),T.params.centeredSlides?(t=t+o/2+s/2+a,0===s&&0!==e&&(t=t-T.size/2-a),0===e&&(t=t-T.size/2-a),Math.abs(t)<.001&&(t=0),i%T.params.slidesPerGroup==0&&T.snapGrid.push(t),T.slidesGrid.push(t)):(i%T.params.slidesPerGroup==0&&T.snapGrid.push(t),T.slidesGrid.push(t),t=t+o+a),T.virtualSize+=o+a,s=o,i++)}T.virtualSize=Math.max(T.virtualSize,T.size)+T.params.slidesOffsetAfter;var g;if(T.rtl&&T.wrongRTL&&("slide"===T.params.effect||"coverflow"===T.params.effect)&&T.wrapper.css({width:T.virtualSize+T.params.spaceBetween+"px"}),T.support.flexbox&&!T.params.setWrapperSize||(T.isHorizontal()?T.wrapper.css({width:T.virtualSize+T.params.spaceBetween+"px"}):T.wrapper.css({height:T.virtualSize+T.params.spaceBetween+"px"})),T.params.slidesPerColumn>1&&(T.virtualSize=(o+T.params.spaceBetween)*n,T.virtualSize=Math.ceil(T.virtualSize/T.params.slidesPerColumn)-T.params.spaceBetween,T.isHorizontal()?T.wrapper.css({width:T.virtualSize+T.params.spaceBetween+"px"}):T.wrapper.css({height:T.virtualSize+T.params.spaceBetween+"px"}),T.params.centeredSlides)){for(g=[],e=0;e1&&T.snapGrid.push(T.virtualSize-T.size)}0===T.snapGrid.length&&(T.snapGrid=[0]),0!==T.params.spaceBetween&&(T.isHorizontal()?T.rtl?T.slides.css({marginLeft:a+"px"}):T.slides.css({marginRight:a+"px"}):T.slides.css({marginBottom:a+"px"})),T.params.watchSlidesProgress&&T.updateSlidesOffset()}},T.updateSlidesOffset=function(){for(var e=0;eT.size&&(s=!0));for(a=T.activeIndex-1;a>=0;a--)T.slides[a]&&!s&&(i+=T.slides[a].swiperSlideSize,t++,i>T.size&&(s=!0))}else for(e=T.activeIndex+1;e=0&&r0&&n<=T.size||r<=0&&n>=T.size)&&T.slides.eq(t).addClass(T.params.slideVisibleClass)}s.progress=T.rtl?-i:i}}},T.updateProgress=function(e){void 0===e&&(e=T.translate||0);var a=T.maxTranslate()-T.minTranslate(),t=T.isBeginning,s=T.isEnd;0===a?(T.progress=0,T.isBeginning=T.isEnd=!0):(T.progress=(e-T.minTranslate())/a,T.isBeginning=T.progress<=0,T.isEnd=T.progress>=1),T.isBeginning&&!t&&T.emit("onReachBeginning",T),T.isEnd&&!s&&T.emit("onReachEnd",T),T.params.watchSlidesProgress&&T.updateSlidesProgress(e),T.emit("onProgress",T,T.progress)},T.updateActiveIndex=function(){var e,a,t,s=T.rtl?T.translate:-T.translate;for(a=0;a=T.slidesGrid[a]&&s=T.slidesGrid[a]&&s=T.slidesGrid[a]&&(e=a);T.params.normalizeSlideIndex&&(e<0||void 0===e)&&(e=0),t=Math.floor(e/T.params.slidesPerGroup),t>=T.snapGrid.length&&(t=T.snapGrid.length-1),e!==T.activeIndex&&(T.snapIndex=t,T.previousIndex=T.activeIndex,T.activeIndex=e,T.updateClasses(),T.updateRealIndex())},T.updateRealIndex=function(){T.realIndex=parseInt(T.slides.eq(T.activeIndex).attr("data-swiper-slide-index")||T.activeIndex,10)},T.updateClasses=function(){T.slides.removeClass(T.params.slideActiveClass+" "+T.params.slideNextClass+" "+T.params.slidePrevClass+" "+T.params.slideDuplicateActiveClass+" "+T.params.slideDuplicateNextClass+" "+T.params.slideDuplicatePrevClass);var a=T.slides.eq(T.activeIndex);a.addClass(T.params.slideActiveClass),i.loop&&(a.hasClass(T.params.slideDuplicateClass)?T.wrapper.children("."+T.params.slideClass+":not(."+T.params.slideDuplicateClass+')[data-swiper-slide-index="'+T.realIndex+'"]').addClass(T.params.slideDuplicateActiveClass):T.wrapper.children("."+T.params.slideClass+"."+T.params.slideDuplicateClass+'[data-swiper-slide-index="'+T.realIndex+'"]').addClass(T.params.slideDuplicateActiveClass));var t=a.next("."+T.params.slideClass).addClass(T.params.slideNextClass);T.params.loop&&0===t.length&&(t=T.slides.eq(0),t.addClass(T.params.slideNextClass));var s=a.prev("."+T.params.slideClass).addClass(T.params.slidePrevClass);if(T.params.loop&&0===s.length&&(s=T.slides.eq(-1),s.addClass(T.params.slidePrevClass)),i.loop&&(t.hasClass(T.params.slideDuplicateClass)?T.wrapper.children("."+T.params.slideClass+":not(."+T.params.slideDuplicateClass+')[data-swiper-slide-index="'+t.attr("data-swiper-slide-index")+'"]').addClass(T.params.slideDuplicateNextClass):T.wrapper.children("."+T.params.slideClass+"."+T.params.slideDuplicateClass+'[data-swiper-slide-index="'+t.attr("data-swiper-slide-index")+'"]').addClass(T.params.slideDuplicateNextClass),s.hasClass(T.params.slideDuplicateClass)?T.wrapper.children("."+T.params.slideClass+":not(."+T.params.slideDuplicateClass+')[data-swiper-slide-index="'+s.attr("data-swiper-slide-index")+'"]').addClass(T.params.slideDuplicatePrevClass):T.wrapper.children("."+T.params.slideClass+"."+T.params.slideDuplicateClass+'[data-swiper-slide-index="'+s.attr("data-swiper-slide-index")+'"]').addClass(T.params.slideDuplicatePrevClass)),T.paginationContainer&&T.paginationContainer.length>0){var r,n=T.params.loop?Math.ceil((T.slides.length-2*T.loopedSlides)/T.params.slidesPerGroup):T.snapGrid.length;if(T.params.loop?(r=Math.ceil((T.activeIndex-T.loopedSlides)/T.params.slidesPerGroup),r>T.slides.length-1-2*T.loopedSlides&&(r-=T.slides.length-2*T.loopedSlides),r>n-1&&(r-=n),r<0&&"bullets"!==T.params.paginationType&&(r=n+r)):r=void 0!==T.snapIndex?T.snapIndex:T.activeIndex||0,"bullets"===T.params.paginationType&&T.bullets&&T.bullets.length>0&&(T.bullets.removeClass(T.params.bulletActiveClass),T.paginationContainer.length>1?T.bullets.each(function(){e(this).index()===r&&e(this).addClass(T.params.bulletActiveClass)}):T.bullets.eq(r).addClass(T.params.bulletActiveClass)),"fraction"===T.params.paginationType&&(T.paginationContainer.find("."+T.params.paginationCurrentClass).text(r+1),T.paginationContainer.find("."+T.params.paginationTotalClass).text(n)),"progress"===T.params.paginationType){var o=(r+1)/n,l=o,p=1;T.isHorizontal()||(p=o,l=1),T.paginationContainer.find("."+T.params.paginationProgressbarClass).transform("translate3d(0,0,0) scaleX("+l+") scaleY("+p+")").transition(T.params.speed)}"custom"===T.params.paginationType&&T.params.paginationCustomRender&&(T.paginationContainer.html(T.params.paginationCustomRender(T,r+1,n)),T.emit("onPaginationRendered",T,T.paginationContainer[0]))}T.params.loop||(T.params.prevButton&&T.prevButton&&T.prevButton.length>0&&(T.isBeginning?(T.prevButton.addClass(T.params.buttonDisabledClass),T.params.a11y&&T.a11y&&T.a11y.disable(T.prevButton)):(T.prevButton.removeClass(T.params.buttonDisabledClass),T.params.a11y&&T.a11y&&T.a11y.enable(T.prevButton))),T.params.nextButton&&T.nextButton&&T.nextButton.length>0&&(T.isEnd?(T.nextButton.addClass(T.params.buttonDisabledClass),T.params.a11y&&T.a11y&&T.a11y.disable(T.nextButton)):(T.nextButton.removeClass(T.params.buttonDisabledClass),T.params.a11y&&T.a11y&&T.a11y.enable(T.nextButton))))},T.updatePagination=function(){if(T.params.pagination&&T.paginationContainer&&T.paginationContainer.length>0){var e="";if("bullets"===T.params.paginationType){for(var a=T.params.loop?Math.ceil((T.slides.length-2*T.loopedSlides)/T.params.slidesPerGroup):T.snapGrid.length,t=0;t'+T.params.paginationElement+">";T.paginationContainer.html(e),T.bullets=T.paginationContainer.find("."+T.params.bulletClass),T.params.paginationClickable&&T.params.a11y&&T.a11y&&T.a11y.initPagination()}"fraction"===T.params.paginationType&&(e=T.params.paginationFractionRender?T.params.paginationFractionRender(T,T.params.paginationCurrentClass,T.params.paginationTotalClass):' / ',T.paginationContainer.html(e)),"progress"===T.params.paginationType&&(e=T.params.paginationProgressRender?T.params.paginationProgressRender(T,T.params.paginationProgressbarClass):'',T.paginationContainer.html(e)),"custom"!==T.params.paginationType&&T.emit("onPaginationRendered",T,T.paginationContainer[0])}},T.update=function(e){function a(){T.rtl,T.translate;t=Math.min(Math.max(T.translate,T.maxTranslate()),T.minTranslate()),T.setWrapperTranslate(t),T.updateActiveIndex(),T.updateClasses()}if(T){T.updateContainerSize(),T.updateSlidesSize(),T.updateProgress(),T.updatePagination(),T.updateClasses(),T.params.scrollbar&&T.scrollbar&&T.scrollbar.set();var t;if(e){T.controller&&T.controller.spline&&(T.controller.spline=void 0),T.params.freeMode?(a(),T.params.autoHeight&&T.updateAutoHeight()):(("auto"===T.params.slidesPerView||T.params.slidesPerView>1)&&T.isEnd&&!T.params.centeredSlides?T.slideTo(T.slides.length-1,0,!1,!0):T.slideTo(T.activeIndex,0,!1,!0))||a()}else T.params.autoHeight&&T.updateAutoHeight()}},T.onResize=function(e){T.params.onBeforeResize&&T.params.onBeforeResize(T),T.params.breakpoints&&T.setBreakpoint();var a=T.params.allowSwipeToPrev,t=T.params.allowSwipeToNext;T.params.allowSwipeToPrev=T.params.allowSwipeToNext=!0,T.updateContainerSize(),T.updateSlidesSize(),("auto"===T.params.slidesPerView||T.params.freeMode||e)&&T.updatePagination(),T.params.scrollbar&&T.scrollbar&&T.scrollbar.set(),T.controller&&T.controller.spline&&(T.controller.spline=void 0);var s=!1;if(T.params.freeMode){var i=Math.min(Math.max(T.translate,T.maxTranslate()),T.minTranslate());T.setWrapperTranslate(i),T.updateActiveIndex(),T.updateClasses(),T.params.autoHeight&&T.updateAutoHeight()}else T.updateClasses(),s=("auto"===T.params.slidesPerView||T.params.slidesPerView>1)&&T.isEnd&&!T.params.centeredSlides?T.slideTo(T.slides.length-1,0,!1,!0):T.slideTo(T.activeIndex,0,!1,!0);T.params.lazyLoading&&!s&&T.lazy&&T.lazy.load(),T.params.allowSwipeToPrev=a,T.params.allowSwipeToNext=t,T.params.onAfterResize&&T.params.onAfterResize(T)},T.touchEventsDesktop={start:"mousedown",move:"mousemove",end:"mouseup"},window.navigator.pointerEnabled?T.touchEventsDesktop={start:"pointerdown",move:"pointermove",end:"pointerup"}:window.navigator.msPointerEnabled&&(T.touchEventsDesktop={start:"MSPointerDown",move:"MSPointerMove",end:"MSPointerUp"}),T.touchEvents={start:T.support.touch||!T.params.simulateTouch?"touchstart":T.touchEventsDesktop.start,move:T.support.touch||!T.params.simulateTouch?"touchmove":T.touchEventsDesktop.move,end:T.support.touch||!T.params.simulateTouch?"touchend":T.touchEventsDesktop.end},(window.navigator.pointerEnabled||window.navigator.msPointerEnabled)&&("container"===T.params.touchEventsTarget?T.container:T.wrapper).addClass("swiper-wp8-"+T.params.direction),T.initEvents=function(e){var a=e?"off":"on",t=e?"removeEventListener":"addEventListener",s="container"===T.params.touchEventsTarget?T.container[0]:T.wrapper[0],r=T.support.touch?s:document,n=!!T.params.nested;if(T.browser.ie)s[t](T.touchEvents.start,T.onTouchStart,!1),r[t](T.touchEvents.move,T.onTouchMove,n),r[t](T.touchEvents.end,T.onTouchEnd,!1);else{if(T.support.touch){var o=!("touchstart"!==T.touchEvents.start||!T.support.passiveListener||!T.params.passiveListeners)&&{passive:!0,capture:!1};s[t](T.touchEvents.start,T.onTouchStart,o),s[t](T.touchEvents.move,T.onTouchMove,n),s[t](T.touchEvents.end,T.onTouchEnd,o)}(i.simulateTouch&&!T.device.ios&&!T.device.android||i.simulateTouch&&!T.support.touch&&T.device.ios)&&(s[t]("mousedown",T.onTouchStart,!1),document[t]("mousemove",T.onTouchMove,n),document[t]("mouseup",T.onTouchEnd,!1))}window[t]("resize",T.onResize),T.params.nextButton&&T.nextButton&&T.nextButton.length>0&&(T.nextButton[a]("click",T.onClickNext),T.params.a11y&&T.a11y&&T.nextButton[a]("keydown",T.a11y.onEnterKey)),T.params.prevButton&&T.prevButton&&T.prevButton.length>0&&(T.prevButton[a]("click",T.onClickPrev),T.params.a11y&&T.a11y&&T.prevButton[a]("keydown",T.a11y.onEnterKey)),T.params.pagination&&T.params.paginationClickable&&(T.paginationContainer[a]("click","."+T.params.bulletClass,T.onClickIndex),T.params.a11y&&T.a11y&&T.paginationContainer[a]("keydown","."+T.params.bulletClass,T.a11y.onEnterKey)),(T.params.preventClicks||T.params.preventClicksPropagation)&&s[t]("click",T.preventClicks,!0)},T.attachEvents=function(){T.initEvents()},T.detachEvents=function(){T.initEvents(!0)},T.allowClick=!0,T.preventClicks=function(e){T.allowClick||(T.params.preventClicks&&e.preventDefault(),T.params.preventClicksPropagation&&T.animating&&(e.stopPropagation(),e.stopImmediatePropagation()))},T.onClickNext=function(e){e.preventDefault(),T.isEnd&&!T.params.loop||T.slideNext()},T.onClickPrev=function(e){e.preventDefault(),T.isBeginning&&!T.params.loop||T.slidePrev()},T.onClickIndex=function(a){a.preventDefault();var t=e(this).index()*T.params.slidesPerGroup;T.params.loop&&(t+=T.loopedSlides),T.slideTo(t)},
+T.updateClickedSlide=function(a){var t=o(a,"."+T.params.slideClass),s=!1;if(t)for(var i=0;iT.slides.length-T.loopedSlides+l/2?(T.fixLoop(),n=T.wrapper.children("."+T.params.slideClass+'[data-swiper-slide-index="'+r+'"]:not(.'+T.params.slideDuplicateClass+")").eq(0).index(),setTimeout(function(){T.slideTo(n)},0)):T.slideTo(n):n>T.slides.length-l?(T.fixLoop(),n=T.wrapper.children("."+T.params.slideClass+'[data-swiper-slide-index="'+r+'"]:not(.'+T.params.slideDuplicateClass+")").eq(0).index(),setTimeout(function(){T.slideTo(n)},0)):T.slideTo(n)}else T.slideTo(n)}};var S,C,z,M,E,P,I,k,L,D,B="input, select, textarea, button, video",H=Date.now(),G=[];T.animating=!1,T.touches={startX:0,startY:0,currentX:0,currentY:0,diff:0};var X,A;T.onTouchStart=function(a){if(a.originalEvent&&(a=a.originalEvent),(X="touchstart"===a.type)||!("which"in a)||3!==a.which){if(T.params.noSwiping&&o(a,"."+T.params.noSwipingClass))return void(T.allowClick=!0);if(!T.params.swipeHandler||o(a,T.params.swipeHandler)){var t=T.touches.currentX="touchstart"===a.type?a.targetTouches[0].pageX:a.pageX,s=T.touches.currentY="touchstart"===a.type?a.targetTouches[0].pageY:a.pageY;if(!(T.device.ios&&T.params.iOSEdgeSwipeDetection&&t<=T.params.iOSEdgeSwipeThreshold)){if(S=!0,C=!1,z=!0,E=void 0,A=void 0,T.touches.startX=t,T.touches.startY=s,M=Date.now(),T.allowClick=!0,T.updateContainerSize(),T.swipeDirection=void 0,T.params.threshold>0&&(k=!1),"touchstart"!==a.type){var i=!0;e(a.target).is(B)&&(i=!1),document.activeElement&&e(document.activeElement).is(B)&&document.activeElement.blur(),i&&a.preventDefault()}T.emit("onTouchStart",T,a)}}}},T.onTouchMove=function(a){if(a.originalEvent&&(a=a.originalEvent),!X||"mousemove"!==a.type){if(a.preventedByNestedSwiper)return T.touches.startX="touchmove"===a.type?a.targetTouches[0].pageX:a.pageX,void(T.touches.startY="touchmove"===a.type?a.targetTouches[0].pageY:a.pageY);if(T.params.onlyExternal)return T.allowClick=!1,void(S&&(T.touches.startX=T.touches.currentX="touchmove"===a.type?a.targetTouches[0].pageX:a.pageX,T.touches.startY=T.touches.currentY="touchmove"===a.type?a.targetTouches[0].pageY:a.pageY,M=Date.now()));if(X&&T.params.touchReleaseOnEdges&&!T.params.loop)if(T.isHorizontal()){if(T.touches.currentXT.touches.startX&&T.translate>=T.minTranslate())return}else if(T.touches.currentYT.touches.startY&&T.translate>=T.minTranslate())return;if(X&&document.activeElement&&a.target===document.activeElement&&e(a.target).is(B))return C=!0,void(T.allowClick=!1);if(z&&T.emit("onTouchMove",T,a),!(a.targetTouches&&a.targetTouches.length>1)){if(T.touches.currentX="touchmove"===a.type?a.targetTouches[0].pageX:a.pageX,T.touches.currentY="touchmove"===a.type?a.targetTouches[0].pageY:a.pageY,void 0===E){var t;T.isHorizontal()&&T.touches.currentY===T.touches.startY||!T.isHorizontal()&&T.touches.currentX===T.touches.startX?E=!1:(t=180*Math.atan2(Math.abs(T.touches.currentY-T.touches.startY),Math.abs(T.touches.currentX-T.touches.startX))/Math.PI,E=T.isHorizontal()?t>T.params.touchAngle:90-t>T.params.touchAngle)}if(E&&T.emit("onTouchMoveOpposite",T,a),void 0===A&&(T.touches.currentX===T.touches.startX&&T.touches.currentY===T.touches.startY||(A=!0)),S){if(E)return void(S=!1);if(A){T.allowClick=!1,T.emit("onSliderMove",T,a),a.preventDefault(),T.params.touchMoveStopPropagation&&!T.params.nested&&a.stopPropagation(),C||(i.loop&&T.fixLoop(),I=T.getWrapperTranslate(),T.setWrapperTransition(0),T.animating&&T.wrapper.trigger("webkitTransitionEnd transitionend oTransitionEnd MSTransitionEnd msTransitionEnd"),T.params.autoplay&&T.autoplaying&&(T.params.autoplayDisableOnInteraction?T.stopAutoplay():T.pauseAutoplay()),D=!1,!T.params.grabCursor||T.params.allowSwipeToNext!==!0&&T.params.allowSwipeToPrev!==!0||T.setGrabCursor(!0)),C=!0;var s=T.touches.diff=T.isHorizontal()?T.touches.currentX-T.touches.startX:T.touches.currentY-T.touches.startY;s*=T.params.touchRatio,T.rtl&&(s=-s),T.swipeDirection=s>0?"prev":"next",P=s+I;var r=!0;if(s>0&&P>T.minTranslate()?(r=!1,T.params.resistance&&(P=T.minTranslate()-1+Math.pow(-T.minTranslate()+I+s,T.params.resistanceRatio))):s<0&&PI&&(P=I),T.params.threshold>0){if(!(Math.abs(s)>T.params.threshold||k))return void(P=I);if(!k)return k=!0,T.touches.startX=T.touches.currentX,T.touches.startY=T.touches.currentY,P=I,void(T.touches.diff=T.isHorizontal()?T.touches.currentX-T.touches.startX:T.touches.currentY-T.touches.startY)}T.params.followFinger&&((T.params.freeMode||T.params.watchSlidesProgress)&&T.updateActiveIndex(),T.params.freeMode&&(0===G.length&&G.push({position:T.touches[T.isHorizontal()?"startX":"startY"],time:M}),G.push({position:T.touches[T.isHorizontal()?"currentX":"currentY"],time:(new window.Date).getTime()})),T.updateProgress(P),T.setWrapperTranslate(P))}}}}},T.onTouchEnd=function(a){if(a.originalEvent&&(a=a.originalEvent),z&&T.emit("onTouchEnd",T,a),z=!1,S){T.params.grabCursor&&C&&S&&(T.params.allowSwipeToNext===!0||T.params.allowSwipeToPrev===!0)&&T.setGrabCursor(!1);var t=Date.now(),s=t-M;if(T.allowClick&&(T.updateClickedSlide(a),T.emit("onTap",T,a),s<300&&t-H>300&&(L&&clearTimeout(L),L=setTimeout(function(){T&&(T.params.paginationHide&&T.paginationContainer.length>0&&!e(a.target).hasClass(T.params.bulletClass)&&T.paginationContainer.toggleClass(T.params.paginationHiddenClass),T.emit("onClick",T,a))},300)),s<300&&t-H<300&&(L&&clearTimeout(L),T.emit("onDoubleTap",T,a))),H=Date.now(),setTimeout(function(){T&&(T.allowClick=!0)},0),!S||!C||!T.swipeDirection||0===T.touches.diff||P===I)return void(S=C=!1);S=C=!1;var i;if(i=T.params.followFinger?T.rtl?T.translate:-T.translate:-P,T.params.freeMode){if(i<-T.minTranslate())return void T.slideTo(T.activeIndex);if(i>-T.maxTranslate())return void(T.slides.length1){var r=G.pop(),n=G.pop(),o=r.position-n.position,l=r.time-n.time;T.velocity=o/l,T.velocity=T.velocity/2,Math.abs(T.velocity)150||(new window.Date).getTime()-r.time>300)&&(T.velocity=0)}else T.velocity=0;T.velocity=T.velocity*T.params.freeModeMomentumVelocityRatio,G.length=0;var p=1e3*T.params.freeModeMomentumRatio,d=T.velocity*p,u=T.translate+d;T.rtl&&(u=-u);var c,m=!1,h=20*Math.abs(T.velocity)*T.params.freeModeMomentumBounceRatio;if(uT.minTranslate())T.params.freeModeMomentumBounce?(u-T.minTranslate()>h&&(u=T.minTranslate()+h),c=T.minTranslate(),m=!0,D=!0):u=T.minTranslate();else if(T.params.freeModeSticky){var g,f=0;for(f=0;f-u){g=f;break}u=Math.abs(T.snapGrid[g]-u)=T.params.longSwipesMs)&&(T.updateProgress(),T.updateActiveIndex()))}var v,w=0,y=T.slidesSizesGrid[0];for(v=0;v=T.slidesGrid[v]&&i=T.slidesGrid[v]&&(w=v,y=T.slidesGrid[T.slidesGrid.length-1]-T.slidesGrid[T.slidesGrid.length-2]);var x=(i-T.slidesGrid[w])/y;if(s>T.params.longSwipesMs){if(!T.params.longSwipes)return void T.slideTo(T.activeIndex);"next"===T.swipeDirection&&(x>=T.params.longSwipesRatio?T.slideTo(w+T.params.slidesPerGroup):T.slideTo(w)),"prev"===T.swipeDirection&&(x>1-T.params.longSwipesRatio?T.slideTo(w+T.params.slidesPerGroup):T.slideTo(w))}else{if(!T.params.shortSwipes)return void T.slideTo(T.activeIndex);"next"===T.swipeDirection&&T.slideTo(w+T.params.slidesPerGroup),"prev"===T.swipeDirection&&T.slideTo(w)}}},T._slideTo=function(e,a){return T.slideTo(e,a,!0,!0)},T.slideTo=function(e,a,t,s){void 0===t&&(t=!0),void 0===e&&(e=0),e<0&&(e=0),T.snapIndex=Math.floor(e/T.params.slidesPerGroup),T.snapIndex>=T.snapGrid.length&&(T.snapIndex=T.snapGrid.length-1);var i=-T.snapGrid[T.snapIndex];if(T.params.autoplay&&T.autoplaying&&(s||!T.params.autoplayDisableOnInteraction?T.pauseAutoplay(a):T.stopAutoplay()),T.updateProgress(i),T.params.normalizeSlideIndex)for(var r=0;r=Math.floor(100*T.slidesGrid[r])&&(e=r);return!(!T.params.allowSwipeToNext&&iT.translate&&i>T.maxTranslate()&&(T.activeIndex||0)!==e)&&(void 0===a&&(a=T.params.speed),T.previousIndex=T.activeIndex||0,T.activeIndex=e,T.updateRealIndex(),T.rtl&&-i===T.translate||!T.rtl&&i===T.translate?(T.params.autoHeight&&T.updateAutoHeight(),T.updateClasses(),"slide"!==T.params.effect&&T.setWrapperTranslate(i),!1):(T.updateClasses(),T.onTransitionStart(t),0===a||T.browser.lteIE9?(T.setWrapperTranslate(i),T.setWrapperTransition(0),T.onTransitionEnd(t)):(T.setWrapperTranslate(i),T.setWrapperTransition(a),T.animating||(T.animating=!0,T.wrapper.transitionEnd(function(){T&&T.onTransitionEnd(t)}))),!0)))},T.onTransitionStart=function(e){void 0===e&&(e=!0),T.params.autoHeight&&T.updateAutoHeight(),T.lazy&&T.lazy.onTransitionStart(),e&&(T.emit("onTransitionStart",T),T.activeIndex!==T.previousIndex&&(T.emit("onSlideChangeStart",T),T.activeIndex>T.previousIndex?T.emit("onSlideNextStart",T):T.emit("onSlidePrevStart",T)))},T.onTransitionEnd=function(e){T.animating=!1,T.setWrapperTransition(0),void 0===e&&(e=!0),T.lazy&&T.lazy.onTransitionEnd(),e&&(T.emit("onTransitionEnd",T),T.activeIndex!==T.previousIndex&&(T.emit("onSlideChangeEnd",T),T.activeIndex>T.previousIndex?T.emit("onSlideNextEnd",T):T.emit("onSlidePrevEnd",T))),T.params.history&&T.history&&T.history.setHistory(T.params.history,T.activeIndex),T.params.hashnav&&T.hashnav&&T.hashnav.setHash()},T.slideNext=function(e,a,t){if(T.params.loop){if(T.animating)return!1;T.fixLoop();T.container[0].clientLeft;return T.slideTo(T.activeIndex+T.params.slidesPerGroup,a,e,t)}return T.slideTo(T.activeIndex+T.params.slidesPerGroup,a,e,t)},T._slideNext=function(e){return T.slideNext(!0,e,!0)},T.slidePrev=function(e,a,t){if(T.params.loop){if(T.animating)return!1;T.fixLoop();T.container[0].clientLeft;return T.slideTo(T.activeIndex-1,a,e,t)}return T.slideTo(T.activeIndex-1,a,e,t)},T._slidePrev=function(e){return T.slidePrev(!0,e,!0)},T.slideReset=function(e,a,t){return T.slideTo(T.activeIndex,a,e)},T.disableTouchControl=function(){return T.params.onlyExternal=!0,!0},T.enableTouchControl=function(){return T.params.onlyExternal=!1,!0},T.setWrapperTransition=function(e,a){T.wrapper.transition(e),"slide"!==T.params.effect&&T.effects[T.params.effect]&&T.effects[T.params.effect].setTransition(e),T.params.parallax&&T.parallax&&T.parallax.setTransition(e),T.params.scrollbar&&T.scrollbar&&T.scrollbar.setTransition(e),T.params.control&&T.controller&&T.controller.setTransition(e,a),T.emit("onSetTransition",T,e)},T.setWrapperTranslate=function(e,a,t){var s=0,i=0;T.isHorizontal()?s=T.rtl?-e:e:i=e,T.params.roundLengths&&(s=r(s),i=r(i)),T.params.virtualTranslate||(T.support.transforms3d?T.wrapper.transform("translate3d("+s+"px, "+i+"px, 0px)"):T.wrapper.transform("translate("+s+"px, "+i+"px)")),T.translate=T.isHorizontal()?s:i;var n,o=T.maxTranslate()-T.minTranslate();n=0===o?0:(e-T.minTranslate())/o,n!==T.progress&&T.updateProgress(e),a&&T.updateActiveIndex(),"slide"!==T.params.effect&&T.effects[T.params.effect]&&T.effects[T.params.effect].setTranslate(T.translate),T.params.parallax&&T.parallax&&T.parallax.setTranslate(T.translate),T.params.scrollbar&&T.scrollbar&&T.scrollbar.setTranslate(T.translate),T.params.control&&T.controller&&T.controller.setTranslate(T.translate,t),T.emit("onSetTranslate",T,T.translate)},T.getTranslate=function(e,a){var t,s,i,r;return void 0===a&&(a="x"),T.params.virtualTranslate?T.rtl?-T.translate:T.translate:(i=window.getComputedStyle(e,null),window.WebKitCSSMatrix?(s=i.transform||i.webkitTransform,s.split(",").length>6&&(s=s.split(", ").map(function(e){return e.replace(",",".")}).join(", ")),r=new window.WebKitCSSMatrix("none"===s?"":s)):(r=i.MozTransform||i.OTransform||i.MsTransform||i.msTransform||i.transform||i.getPropertyValue("transform").replace("translate(","matrix(1, 0, 0, 1,"),t=r.toString().split(",")),"x"===a&&(s=window.WebKitCSSMatrix?r.m41:16===t.length?parseFloat(t[12]):parseFloat(t[4])),"y"===a&&(s=window.WebKitCSSMatrix?r.m42:16===t.length?parseFloat(t[13]):parseFloat(t[5])),T.rtl&&s&&(s=-s),s||0)},T.getWrapperTranslate=function(e){return void 0===e&&(e=T.isHorizontal()?"x":"y"),T.getTranslate(T.wrapper[0],e)},T.observers=[],T.initObservers=function(){if(T.params.observeParents)for(var e=T.container.parents(),a=0;aa.length&&(T.loopedSlides=a.length);var t,s=[],i=[];for(a.each(function(t,r){var n=e(this);t=a.length-T.loopedSlides&&s.push(r),n.attr("data-swiper-slide-index",t)}),t=0;t=0;t--)T.wrapper.prepend(e(s[t].cloneNode(!0)).addClass(T.params.slideDuplicateClass))},T.destroyLoop=function(){T.wrapper.children("."+T.params.slideClass+"."+T.params.slideDuplicateClass).remove(),T.slides.removeAttr("data-swiper-slide-index")},T.reLoop=function(e){var a=T.activeIndex-T.loopedSlides;T.destroyLoop(),T.createLoop(),T.updateSlidesSize(),e&&T.slideTo(a+T.loopedSlides,0,!1)},T.fixLoop=function(){var e;T.activeIndex=2*T.loopedSlides||T.activeIndex>T.slides.length-2*T.params.slidesPerView)&&(e=-T.slides.length+T.activeIndex+T.loopedSlides,e+=T.loopedSlides,T.slideTo(e,0,!1,!0))},T.appendSlide=function(e){if(T.params.loop&&T.destroyLoop(),"object"==typeof e&&e.length)for(var a=0;a '),t.append(d)),0===u.length&&(u=e('
'),t.append(u)),d.length&&(d[0].style.opacity=Math.max(-s,0)),u.length&&(u[0].style.opacity=Math.max(s,0))}t.transform("translate3d("+l+"px, "+p+"px, 0px) rotateX("+o+"deg) rotateY("+n+"deg)")}},setTransition:function(a){if(T.slides.transition(a).find(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").transition(a),T.params.virtualTranslate&&0!==a){var t=!1;T.slides.eq(T.activeIndex).transitionEnd(function(){if(!t&&T&&e(this).hasClass(T.params.slideActiveClass)){t=!0,T.animating=!1;for(var a=["webkitTransitionEnd","transitionend","oTransitionEnd","MSTransitionEnd","msTransitionEnd"],s=0;s'),T.wrapper.append(a)),a.css({height:T.width+"px"})):(a=T.container.find(".swiper-cube-shadow"),0===a.length&&(a=e('
'),T.container.append(a))));for(var s=0;s-1&&(t=90*s+90*o,T.rtl&&(t=90*-s-90*o)),i.transform(u),T.params.cube.slideShadows){var c=T.isHorizontal()?i.find(".swiper-slide-shadow-left"):i.find(".swiper-slide-shadow-top"),m=T.isHorizontal()?i.find(".swiper-slide-shadow-right"):i.find(".swiper-slide-shadow-bottom");0===c.length&&(c=e('
'),i.append(c)),0===m.length&&(m=e('
'),i.append(m)),c.length&&(c[0].style.opacity=Math.max(-o,0)),m.length&&(m[0].style.opacity=Math.max(o,0))}}if(T.wrapper.css({"-webkit-transform-origin":"50% 50% -"+T.size/2+"px","-moz-transform-origin":"50% 50% -"+T.size/2+"px","-ms-transform-origin":"50% 50% -"+T.size/2+"px","transform-origin":"50% 50% -"+T.size/2+"px"}),T.params.cube.shadow)if(T.isHorizontal())a.transform("translate3d(0px, "+(T.width/2+T.params.cube.shadowOffset)+"px, "+-T.width/2+"px) rotateX(90deg) rotateZ(0deg) scale("+T.params.cube.shadowScale+")");else{var h=Math.abs(t)-90*Math.floor(Math.abs(t)/90),g=1.5-(Math.sin(2*h*Math.PI/360)/2+Math.cos(2*h*Math.PI/360)/2),f=T.params.cube.shadowScale,v=T.params.cube.shadowScale/g,w=T.params.cube.shadowOffset;a.transform("scale3d("+f+", 1, "+v+") translate3d(0px, "+(T.height/2+w)+"px, "+-T.height/2/v+"px) rotateX(-90deg)")}var y=T.isSafari||T.isUiWebView?-T.size/2:0;T.wrapper.transform("translate3d(0px,0,"+y+"px) rotateX("+(T.isHorizontal()?0:t)+"deg) rotateY("+(T.isHorizontal()?-t:0)+"deg)")},setTransition:function(e){T.slides.transition(e).find(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").transition(e),T.params.cube.shadow&&!T.isHorizontal()&&T.container.find(".swiper-cube-shadow").transition(e)}},coverflow:{setTranslate:function(){for(var a=T.translate,t=T.isHorizontal()?-a+T.width/2:-a+T.height/2,s=T.isHorizontal()?T.params.coverflow.rotate:-T.params.coverflow.rotate,i=T.params.coverflow.depth,r=0,n=T.slides.length;r'),o.append(v)),0===w.length&&(w=e('
'),o.append(w)),v.length&&(v[0].style.opacity=d>0?d:0),w.length&&(w[0].style.opacity=-d>0?-d:0)}}if(T.browser.ie){T.wrapper[0].style.perspectiveOrigin=t+"px 50%"}},setTransition:function(e){T.slides.transition(e).find(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").transition(e)}}},T.lazy={initialImageLoaded:!1,loadImageInSlide:function(a,t){if(void 0!==a&&(void 0===t&&(t=!0),0!==T.slides.length)){var s=T.slides.eq(a),i=s.find("."+T.params.lazyLoadingClass+":not(."+T.params.lazyStatusLoadedClass+"):not(."+T.params.lazyStatusLoadingClass+")");!s.hasClass(T.params.lazyLoadingClass)||s.hasClass(T.params.lazyStatusLoadedClass)||s.hasClass(T.params.lazyStatusLoadingClass)||(i=i.add(s[0])),0!==i.length&&i.each(function(){var a=e(this);a.addClass(T.params.lazyStatusLoadingClass);var i=a.attr("data-background"),r=a.attr("data-src"),n=a.attr("data-srcset"),o=a.attr("data-sizes");T.loadImage(a[0],r||i,n,o,!1,function(){if(void 0!==T&&null!==T&&T){if(i?(a.css("background-image",'url("'+i+'")'),a.removeAttr("data-background")):(n&&(a.attr("srcset",n),a.removeAttr("data-srcset")),o&&(a.attr("sizes",o),a.removeAttr("data-sizes")),r&&(a.attr("src",r),a.removeAttr("data-src"))),a.addClass(T.params.lazyStatusLoadedClass).removeClass(T.params.lazyStatusLoadingClass),s.find("."+T.params.lazyPreloaderClass+", ."+T.params.preloaderClass).remove(),T.params.loop&&t){var e=s.attr("data-swiper-slide-index");if(s.hasClass(T.params.slideDuplicateClass)){var l=T.wrapper.children('[data-swiper-slide-index="'+e+'"]:not(.'+T.params.slideDuplicateClass+")");T.lazy.loadImageInSlide(l.index(),!1)}else{var p=T.wrapper.children("."+T.params.slideDuplicateClass+'[data-swiper-slide-index="'+e+'"]');T.lazy.loadImageInSlide(p.index(),!1)}}T.emit("onLazyImageReady",T,s[0],a[0])}}),T.emit("onLazyImageLoad",T,s[0],a[0])})}},load:function(){var a,t=T.params.slidesPerView;if("auto"===t&&(t=0),T.lazy.initialImageLoaded||(T.lazy.initialImageLoaded=!0),T.params.watchSlidesVisibility)T.wrapper.children("."+T.params.slideVisibleClass).each(function(){T.lazy.loadImageInSlide(e(this).index())});else if(t>1)for(a=T.activeIndex;a1||T.params.lazyLoadingInPrevNextAmount&&T.params.lazyLoadingInPrevNextAmount>1){var s=T.params.lazyLoadingInPrevNextAmount,i=t,r=Math.min(T.activeIndex+i+Math.max(s,i),T.slides.length),n=Math.max(T.activeIndex-Math.max(i,s),0);for(a=T.activeIndex+t;a0&&T.lazy.loadImageInSlide(o.index());var l=T.wrapper.children("."+T.params.slidePrevClass);l.length>0&&T.lazy.loadImageInSlide(l.index())}},onTransitionStart:function(){T.params.lazyLoading&&(T.params.lazyLoadingOnTransitionStart||!T.params.lazyLoadingOnTransitionStart&&!T.lazy.initialImageLoaded)&&T.lazy.load()},onTransitionEnd:function(){T.params.lazyLoading&&!T.params.lazyLoadingOnTransitionStart&&T.lazy.load()}},T.scrollbar={isTouched:!1,setDragPosition:function(e){var a=T.scrollbar,t=T.isHorizontal()?"touchstart"===e.type||"touchmove"===e.type?e.targetTouches[0].pageX:e.pageX||e.clientX:"touchstart"===e.type||"touchmove"===e.type?e.targetTouches[0].pageY:e.pageY||e.clientY,s=t-a.track.offset()[T.isHorizontal()?"left":"top"]-a.dragSize/2,i=-T.minTranslate()*a.moveDivider,r=-T.maxTranslate()*a.moveDivider;sr&&(s=r),s=-s/a.moveDivider,T.updateProgress(s),T.setWrapperTranslate(s,!0)},dragStart:function(e){var a=T.scrollbar;a.isTouched=!0,e.preventDefault(),e.stopPropagation(),a.setDragPosition(e),clearTimeout(a.dragTimeout),a.track.transition(0),T.params.scrollbarHide&&a.track.css("opacity",1),T.wrapper.transition(100),a.drag.transition(100),T.emit("onScrollbarDragStart",T)},dragMove:function(e){var a=T.scrollbar;a.isTouched&&(e.preventDefault?e.preventDefault():e.returnValue=!1,a.setDragPosition(e),T.wrapper.transition(0),a.track.transition(0),a.drag.transition(0),T.emit("onScrollbarDragMove",T))},dragEnd:function(e){var a=T.scrollbar;a.isTouched&&(a.isTouched=!1,T.params.scrollbarHide&&(clearTimeout(a.dragTimeout),a.dragTimeout=setTimeout(function(){a.track.css("opacity",0),a.track.transition(400)},1e3)),T.emit("onScrollbarDragEnd",T),T.params.scrollbarSnapOnRelease&&T.slideReset())},draggableEvents:function(){return T.params.simulateTouch!==!1||T.support.touch?T.touchEvents:T.touchEventsDesktop}(),enableDraggable:function(){var a=T.scrollbar,t=T.support.touch?a.track:document;e(a.track).on(a.draggableEvents.start,a.dragStart),e(t).on(a.draggableEvents.move,a.dragMove),e(t).on(a.draggableEvents.end,a.dragEnd)},disableDraggable:function(){var a=T.scrollbar,t=T.support.touch?a.track:document;e(a.track).off(a.draggableEvents.start,a.dragStart),e(t).off(a.draggableEvents.move,a.dragMove),e(t).off(a.draggableEvents.end,a.dragEnd)},set:function(){if(T.params.scrollbar){var a=T.scrollbar;a.track=e(T.params.scrollbar),T.params.uniqueNavElements&&"string"==typeof T.params.scrollbar&&a.track.length>1&&1===T.container.find(T.params.scrollbar).length&&(a.track=T.container.find(T.params.scrollbar)),a.drag=a.track.find(".swiper-scrollbar-drag"),0===a.drag.length&&(a.drag=e('
'),a.track.append(a.drag)),a.drag[0].style.width="",a.drag[0].style.height="",a.trackSize=T.isHorizontal()?a.track[0].offsetWidth:a.track[0].offsetHeight,a.divider=T.size/T.virtualSize,a.moveDivider=a.divider*(a.trackSize/T.size),a.dragSize=a.trackSize*a.divider,T.isHorizontal()?a.drag[0].style.width=a.dragSize+"px":a.drag[0].style.height=a.dragSize+"px",a.divider>=1?a.track[0].style.display="none":a.track[0].style.display="",T.params.scrollbarHide&&(a.track[0].style.opacity=0)}},setTranslate:function(){if(T.params.scrollbar){var e,a=T.scrollbar,t=(T.translate,a.dragSize);e=(a.trackSize-a.dragSize)*T.progress,T.rtl&&T.isHorizontal()?(e=-e,e>0?(t=a.dragSize-e,e=0):-e+a.dragSize>a.trackSize&&(t=a.trackSize+e)):e<0?(t=a.dragSize+e,e=0):e+a.dragSize>a.trackSize&&(t=a.trackSize-e),T.isHorizontal()?(T.support.transforms3d?a.drag.transform("translate3d("+e+"px, 0, 0)"):a.drag.transform("translateX("+e+"px)"),a.drag[0].style.width=t+"px"):(T.support.transforms3d?a.drag.transform("translate3d(0px, "+e+"px, 0)"):a.drag.transform("translateY("+e+"px)"),a.drag[0].style.height=t+"px"),T.params.scrollbarHide&&(clearTimeout(a.timeout),a.track[0].style.opacity=1,a.timeout=setTimeout(function(){a.track[0].style.opacity=0,a.track.transition(400)},1e3))}},setTransition:function(e){T.params.scrollbar&&T.scrollbar.drag.transition(e)}},T.controller={LinearSpline:function(e,a){var t=function(){var e,a,t;return function(s,i){for(a=-1,e=s.length;e-a>1;)s[t=e+a>>1]<=i?a=t:e=t;return e}}();this.x=e,this.y=a,this.lastIndex=e.length-1;var s,i;this.x.length;this.interpolate=function(e){return e?(i=t(this.x,e),s=i-1,(e-this.x[s])*(this.y[i]-this.y[s])/(this.x[i]-this.x[s])+this.y[s]):0}},getInterpolateFunction:function(e){T.controller.spline||(T.controller.spline=T.params.loop?new T.controller.LinearSpline(T.slidesGrid,e.slidesGrid):new T.controller.LinearSpline(T.snapGrid,e.snapGrid))},setTranslate:function(e,t){function s(a){e=a.rtl&&"horizontal"===a.params.direction?-T.translate:T.translate,"slide"===T.params.controlBy&&(T.controller.getInterpolateFunction(a),r=-T.controller.spline.interpolate(-e)),r&&"container"!==T.params.controlBy||(i=(a.maxTranslate()-a.minTranslate())/(T.maxTranslate()-T.minTranslate()),r=(e-T.minTranslate())*i+a.minTranslate()),T.params.controlInverse&&(r=a.maxTranslate()-r),a.updateProgress(r),a.setWrapperTranslate(r,!1,T),a.updateActiveIndex()}var i,r,n=T.params.control;if(Array.isArray(n))for(var o=0;o-1?"DOMMouseScroll":function(){var e="onwheel"in document;if(!e){var a=document.createElement("div");a.setAttribute("onwheel","return;"),e="function"==typeof a.onwheel}return!e&&document.implementation&&document.implementation.hasFeature&&document.implementation.hasFeature("","")!==!0&&(e=document.implementation.hasFeature("Events.wheel","3.0")),e}()?"wheel":"mousewheel"),T.disableMousewheelControl=function(){if(!T.mousewheel.event)return!1;var a=T.container;return"container"!==T.params.mousewheelEventsTarged&&(a=e(T.params.mousewheelEventsTarged)),a.off(T.mousewheel.event,u),T.params.mousewheelControl=!1,!0},T.enableMousewheelControl=function(){if(!T.mousewheel.event)return!1;var a=T.container;return"container"!==T.params.mousewheelEventsTarged&&(a=e(T.params.mousewheelEventsTarged)),a.on(T.mousewheel.event,u),T.params.mousewheelControl=!0,!0},T.parallax={setTranslate:function(){T.container.children("[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y]").each(function(){c(this,T.progress)}),T.slides.each(function(){var a=e(this);a.find("[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y]").each(function(){c(this,Math.min(Math.max(a[0].progress,-1),1))})})},setTransition:function(a){void 0===a&&(a=T.params.speed),T.container.find("[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y]").each(function(){var t=e(this),s=parseInt(t.attr("data-swiper-parallax-duration"),10)||a;0===a&&(s=0),t.transition(s)})}},T.zoom={scale:1,currentScale:1,isScaling:!1,gesture:{slide:void 0,slideWidth:void 0,slideHeight:void 0,image:void 0,imageWrap:void 0,zoomMax:T.params.zoomMax},image:{isTouched:void 0,isMoved:void 0,currentX:void 0,currentY:void 0,minX:void 0,minY:void 0,maxX:void 0,maxY:void 0,width:void 0,height:void 0,startX:void 0,startY:void 0,touchesStart:{},touchesCurrent:{}},velocity:{x:void 0,y:void 0,prevPositionX:void 0,prevPositionY:void 0,prevTime:void 0},getDistanceBetweenTouches:function(e){if(e.targetTouches.length<2)return 1;var a=e.targetTouches[0].pageX,t=e.targetTouches[0].pageY,s=e.targetTouches[1].pageX,i=e.targetTouches[1].pageY;return Math.sqrt(Math.pow(s-a,2)+Math.pow(i-t,2))},onGestureStart:function(a){var t=T.zoom;if(!T.support.gestures){if("touchstart"!==a.type||"touchstart"===a.type&&a.targetTouches.length<2)return;t.gesture.scaleStart=t.getDistanceBetweenTouches(a)}if(!(t.gesture.slide&&t.gesture.slide.length||(t.gesture.slide=e(this),0===t.gesture.slide.length&&(t.gesture.slide=T.slides.eq(T.activeIndex)),t.gesture.image=t.gesture.slide.find("img, svg, canvas"),t.gesture.imageWrap=t.gesture.image.parent("."+T.params.zoomContainerClass),t.gesture.zoomMax=t.gesture.imageWrap.attr("data-swiper-zoom")||T.params.zoomMax,0!==t.gesture.imageWrap.length)))return void(t.gesture.image=void 0);t.gesture.image.transition(0),t.isScaling=!0},onGestureChange:function(e){var a=T.zoom;if(!T.support.gestures){if("touchmove"!==e.type||"touchmove"===e.type&&e.targetTouches.length<2)return;a.gesture.scaleMove=a.getDistanceBetweenTouches(e)}a.gesture.image&&0!==a.gesture.image.length&&(T.support.gestures?a.scale=e.scale*a.currentScale:a.scale=a.gesture.scaleMove/a.gesture.scaleStart*a.currentScale,a.scale>a.gesture.zoomMax&&(a.scale=a.gesture.zoomMax-1+Math.pow(a.scale-a.gesture.zoomMax+1,.5)),a.scalea.image.touchesStart.x)return void(a.image.isTouched=!1);if(!T.isHorizontal()&&Math.floor(a.image.minY)===Math.floor(a.image.startY)&&a.image.touchesCurrent.ya.image.touchesStart.y)return void(a.image.isTouched=!1)}e.preventDefault(),e.stopPropagation(),a.image.isMoved=!0,a.image.currentX=a.image.touchesCurrent.x-a.image.touchesStart.x+a.image.startX,a.image.currentY=a.image.touchesCurrent.y-a.image.touchesStart.y+a.image.startY,a.image.currentXa.image.maxX&&(a.image.currentX=a.image.maxX-1+Math.pow(a.image.currentX-a.image.maxX+1,.8)),a.image.currentYa.image.maxY&&(a.image.currentY=a.image.maxY-1+Math.pow(a.image.currentY-a.image.maxY+1,.8)),a.velocity.prevPositionX||(a.velocity.prevPositionX=a.image.touchesCurrent.x),a.velocity.prevPositionY||(a.velocity.prevPositionY=a.image.touchesCurrent.y),a.velocity.prevTime||(a.velocity.prevTime=Date.now()),a.velocity.x=(a.image.touchesCurrent.x-a.velocity.prevPositionX)/(Date.now()-a.velocity.prevTime)/2,a.velocity.y=(a.image.touchesCurrent.y-a.velocity.prevPositionY)/(Date.now()-a.velocity.prevTime)/2,Math.abs(a.image.touchesCurrent.x-a.velocity.prevPositionX)<2&&(a.velocity.x=0),Math.abs(a.image.touchesCurrent.y-a.velocity.prevPositionY)<2&&(a.velocity.y=0),a.velocity.prevPositionX=a.image.touchesCurrent.x,a.velocity.prevPositionY=a.image.touchesCurrent.y,a.velocity.prevTime=Date.now(),a.gesture.imageWrap.transform("translate3d("+a.image.currentX+"px, "+a.image.currentY+"px,0)")}}},onTouchEnd:function(e,a){var t=e.zoom;if(t.gesture.image&&0!==t.gesture.image.length){if(!t.image.isTouched||!t.image.isMoved)return t.image.isTouched=!1,void(t.image.isMoved=!1);t.image.isTouched=!1,t.image.isMoved=!1;var s=300,i=300,r=t.velocity.x*s,n=t.image.currentX+r,o=t.velocity.y*i,l=t.image.currentY+o;0!==t.velocity.x&&(s=Math.abs((n-t.image.currentX)/t.velocity.x)),0!==t.velocity.y&&(i=Math.abs((l-t.image.currentY)/t.velocity.y));var p=Math.max(s,i);t.image.currentX=n,t.image.currentY=l;var d=t.image.width*t.scale,u=t.image.height*t.scale;t.image.minX=Math.min(t.gesture.slideWidth/2-d/2,0),t.image.maxX=-t.image.minX,t.image.minY=Math.min(t.gesture.slideHeight/2-u/2,0),t.image.maxY=-t.image.minY,t.image.currentX=Math.max(Math.min(t.image.currentX,t.image.maxX),t.image.minX),t.image.currentY=Math.max(Math.min(t.image.currentY,t.image.maxY),t.image.minY),t.gesture.imageWrap.transition(p).transform("translate3d("+t.image.currentX+"px, "+t.image.currentY+"px,0)")}},onTransitionEnd:function(e){var a=e.zoom;a.gesture.slide&&e.previousIndex!==e.activeIndex&&(a.gesture.image.transform("translate3d(0,0,0) scale(1)"),a.gesture.imageWrap.transform("translate3d(0,0,0)"),a.gesture.slide=a.gesture.image=a.gesture.imageWrap=void 0,a.scale=a.currentScale=1)},toggleZoom:function(a,t){var s=a.zoom;if(s.gesture.slide||(s.gesture.slide=a.clickedSlide?e(a.clickedSlide):a.slides.eq(a.activeIndex),s.gesture.image=s.gesture.slide.find("img, svg, canvas"),s.gesture.imageWrap=s.gesture.image.parent("."+a.params.zoomContainerClass)),s.gesture.image&&0!==s.gesture.image.length){var i,r,n,o,l,p,d,u,c,m,h,g,f,v,w,y,x,T;void 0===s.image.touchesStart.x&&t?(i="touchend"===t.type?t.changedTouches[0].pageX:t.pageX,r="touchend"===t.type?t.changedTouches[0].pageY:t.pageY):(i=s.image.touchesStart.x,r=s.image.touchesStart.y),s.scale&&1!==s.scale?(s.scale=s.currentScale=1,s.gesture.imageWrap.transition(300).transform("translate3d(0,0,0)"),s.gesture.image.transition(300).transform("translate3d(0,0,0) scale(1)"),s.gesture.slide=void 0):(s.scale=s.currentScale=s.gesture.imageWrap.attr("data-swiper-zoom")||a.params.zoomMax,t?(x=s.gesture.slide[0].offsetWidth,T=s.gesture.slide[0].offsetHeight,n=s.gesture.slide.offset().left,o=s.gesture.slide.offset().top,l=n+x/2-i,p=o+T/2-r,c=s.gesture.image[0].offsetWidth,m=s.gesture.image[0].offsetHeight,h=c*s.scale,g=m*s.scale,f=Math.min(x/2-h/2,0),v=Math.min(T/2-g/2,0),w=-f,y=-v,d=l*s.scale,u=p*s.scale,dw&&(d=w),uy&&(u=y)):(d=0,u=0),s.gesture.imageWrap.transition(300).transform("translate3d("+d+"px, "+u+"px,0)"),s.gesture.image.transition(300).transform("translate3d(0,0,0) scale("+s.scale+")"))}},attachEvents:function(a){var t=a?"off":"on";if(T.params.zoom){var s=(T.slides,!("touchstart"!==T.touchEvents.start||!T.support.passiveListener||!T.params.passiveListeners)&&{passive:!0,capture:!1});T.support.gestures?(T.slides[t]("gesturestart",T.zoom.onGestureStart,s),T.slides[t]("gesturechange",T.zoom.onGestureChange,s),T.slides[t]("gestureend",T.zoom.onGestureEnd,s)):"touchstart"===T.touchEvents.start&&(T.slides[t](T.touchEvents.start,T.zoom.onGestureStart,s),T.slides[t](T.touchEvents.move,T.zoom.onGestureChange,s),T.slides[t](T.touchEvents.end,T.zoom.onGestureEnd,s)),T[t]("touchStart",T.zoom.onTouchStart),T.slides.each(function(a,s){e(s).find("."+T.params.zoomContainerClass).length>0&&e(s)[t](T.touchEvents.move,T.zoom.onTouchMove)}),T[t]("touchEnd",T.zoom.onTouchEnd),T[t]("transitionEnd",T.zoom.onTransitionEnd),T.params.zoomToggle&&T.on("doubleTap",T.zoom.toggleZoom)}},init:function(){T.zoom.attachEvents()},destroy:function(){T.zoom.attachEvents(!0)}},T._plugins=[];for(var Y in T.plugins){var O=T.plugins[Y](T,T.params[Y]);O&&T._plugins.push(O)}return T.callPlugins=function(e){for(var a=0;a'),notify:function(e){var a=T.a11y.liveRegion;0!==a.length&&(a.html(""),a.html(e))},init:function(){T.params.nextButton&&T.nextButton&&T.nextButton.length>0&&(T.a11y.makeFocusable(T.nextButton),T.a11y.addRole(T.nextButton,"button"),T.a11y.addLabel(T.nextButton,T.params.nextSlideMessage)),T.params.prevButton&&T.prevButton&&T.prevButton.length>0&&(T.a11y.makeFocusable(T.prevButton),T.a11y.addRole(T.prevButton,"button"),T.a11y.addLabel(T.prevButton,T.params.prevSlideMessage)),e(T.container).append(T.a11y.liveRegion)},initPagination:function(){T.params.pagination&&T.params.paginationClickable&&T.bullets&&T.bullets.length&&T.bullets.each(function(){var a=e(this);T.a11y.makeFocusable(a),T.a11y.addRole(a,"button"),T.a11y.addLabel(a,T.params.paginationBulletMessage.replace(/{{index}}/,a.index()+1))})},destroy:function(){T.a11y.liveRegion&&T.a11y.liveRegion.length>0&&T.a11y.liveRegion.remove()}},T.init=function(){T.params.loop&&T.createLoop(),T.updateContainerSize(),T.updateSlidesSize(),T.updatePagination(),T.params.scrollbar&&T.scrollbar&&(T.scrollbar.set(),T.params.scrollbarDraggable&&T.scrollbar.enableDraggable()),"slide"!==T.params.effect&&T.effects[T.params.effect]&&(T.params.loop||T.updateProgress(),T.effects[T.params.effect].setTranslate()),T.params.loop?T.slideTo(T.params.initialSlide+T.loopedSlides,0,T.params.runCallbacksOnInit):(T.slideTo(T.params.initialSlide,0,T.params.runCallbacksOnInit),0===T.params.initialSlide&&(T.parallax&&T.params.parallax&&T.parallax.setTranslate(),T.lazy&&T.params.lazyLoading&&(T.lazy.load(),T.lazy.initialImageLoaded=!0))),T.attachEvents(),T.params.observer&&T.support.observer&&T.initObservers(),T.params.preloadImages&&!T.params.lazyLoading&&T.preloadImages(),T.params.zoom&&T.zoom&&T.zoom.init(),T.params.autoplay&&T.startAutoplay(),T.params.keyboardControl&&T.enableKeyboardControl&&T.enableKeyboardControl(),T.params.mousewheelControl&&T.enableMousewheelControl&&T.enableMousewheelControl(),T.params.hashnavReplaceState&&(T.params.replaceState=T.params.hashnavReplaceState),T.params.history&&T.history&&T.history.init(),T.params.hashnav&&T.hashnav&&T.hashnav.init(),T.params.a11y&&T.a11y&&T.a11y.init(),T.emit("onInit",T)},T.cleanupStyles=function(){T.container.removeClass(T.classNames.join(" ")).removeAttr("style"),T.wrapper.removeAttr("style"),T.slides&&T.slides.length&&T.slides.removeClass([T.params.slideVisibleClass,T.params.slideActiveClass,T.params.slideNextClass,T.params.slidePrevClass].join(" ")).removeAttr("style").removeAttr("data-swiper-column").removeAttr("data-swiper-row"),T.paginationContainer&&T.paginationContainer.length&&T.paginationContainer.removeClass(T.params.paginationHiddenClass),T.bullets&&T.bullets.length&&T.bullets.removeClass(T.params.bulletActiveClass),T.params.prevButton&&e(T.params.prevButton).removeClass(T.params.buttonDisabledClass),T.params.nextButton&&e(T.params.nextButton).removeClass(T.params.buttonDisabledClass),T.params.scrollbar&&T.scrollbar&&(T.scrollbar.track&&T.scrollbar.track.length&&T.scrollbar.track.removeAttr("style"),T.scrollbar.drag&&T.scrollbar.drag.length&&T.scrollbar.drag.removeAttr("style"))},T.destroy=function(e,a){T.detachEvents(),T.stopAutoplay(),T.params.scrollbar&&T.scrollbar&&T.params.scrollbarDraggable&&T.scrollbar.disableDraggable(),T.params.loop&&T.destroyLoop(),a&&T.cleanupStyles(),T.disconnectObservers(),T.params.zoom&&T.zoom&&T.zoom.destroy(),T.params.keyboardControl&&T.disableKeyboardControl&&T.disableKeyboardControl(),T.params.mousewheelControl&&T.disableMousewheelControl&&T.disableMousewheelControl(),T.params.a11y&&T.a11y&&T.a11y.destroy(),T.params.history&&!T.params.replaceState&&window.removeEventListener("popstate",T.history.setHistoryPopState),T.params.hashnav&&T.hashnav&&T.hashnav.destroy(),T.emit("onDestroy"),e!==!1&&(T=null)},T.init(),T}};a.prototype={isSafari:function(){var e=window.navigator.userAgent.toLowerCase();return e.indexOf("safari")>=0&&e.indexOf("chrome")<0&&e.indexOf("android")<0}(),isUiWebView:/(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/i.test(window.navigator.userAgent),isArray:function(e){return"[object Array]"===Object.prototype.toString.apply(e)},browser:{ie:window.navigator.pointerEnabled||window.navigator.msPointerEnabled,ieTouch:window.navigator.msPointerEnabled&&window.navigator.msMaxTouchPoints>1||window.navigator.pointerEnabled&&window.navigator.maxTouchPoints>1,lteIE9:function(){var e=document.createElement("div");return e.innerHTML="",1===e.getElementsByTagName("i").length}()},device:function(){var e=window.navigator.userAgent,a=e.match(/(Android);?[\s\/]+([\d.]+)?/),t=e.match(/(iPad).*OS\s([\d_]+)/),s=e.match(/(iPod)(.*OS\s([\d_]+))?/),i=!t&&e.match(/(iPhone\sOS|iOS)\s([\d_]+)/);return{ios:t||i||s,android:a}}(),support:{touch:window.Modernizr&&Modernizr.touch===!0||function(){return!!("ontouchstart"in window||window.DocumentTouch&&document instanceof DocumentTouch)}(),transforms3d:window.Modernizr&&Modernizr.csstransforms3d===!0||function(){var e=document.createElement("div").style;return"webkitPerspective"in e||"MozPerspective"in e||"OPerspective"in e||"MsPerspective"in e||"perspective"in e}(),flexbox:function(){for(var e=document.createElement("div").style,a="alignItems webkitAlignItems webkitBoxAlign msFlexAlign mozBoxAlign webkitFlexDirection msFlexDirection mozBoxDirection mozBoxOrient webkitBoxDirection webkitBoxOrient".split(" "),t=0;t=0&&o.indexOf(">")>=0){var l="div";for(0===o.indexOf(":~]/)?(t||document).querySelectorAll(a):[document.getElementById(a.split("#")[1])],i=0;i0&&a[0].nodeType)for(i=0;i0?parseFloat(this.css("width")):null},outerWidth:function(e){return this.length>0?e?this[0].offsetWidth+parseFloat(this.css("margin-right"))+parseFloat(this.css("margin-left")):this[0].offsetWidth:null},height:function(){return this[0]===window?window.innerHeight:this.length>0?parseFloat(this.css("height")):null},outerHeight:function(e){return this.length>0?e?this[0].offsetHeight+parseFloat(this.css("margin-top"))+parseFloat(this.css("margin-bottom")):this[0].offsetHeight:null},offset:function(){if(this.length>0){var e=this[0],a=e.getBoundingClientRect(),t=document.body,s=e.clientTop||t.clientTop||0,i=e.clientLeft||t.clientLeft||0,r=window.pageYOffset||e.scrollTop,n=window.pageXOffset||e.scrollLeft;return{top:a.top+r-s,left:a.left+n-i}}return null},css:function(e,a){var t;if(1===arguments.length){if("string"!=typeof e){for(t=0;ts-1?new e([]):a<0?(t=s+a,new e(t<0?[]:[this[t]])):new e([this[a]])},append:function(a){var t,s;for(t=0;t=0;s--)this[t].insertBefore(i.childNodes[s],this[t].childNodes[0])}else if(a instanceof e)for(s=0;s1)for(var i=0;i1)for(var i=0;i0?t?this[0].nextElementSibling&&a(this[0].nextElementSibling).is(t)?[this[0].nextElementSibling]:[]:this[0].nextElementSibling?[this[0].nextElementSibling]:[]:[])},nextAll:function(t){var s=[],i=this[0];if(!i)return new e([]);for(;i.nextElementSibling;){var r=i.nextElementSibling;t?a(r).is(t)&&s.push(r):s.push(r),i=r}return new e(s)},prev:function(t){return new e(this.length>0?t?this[0].previousElementSibling&&a(this[0].previousElementSibling).is(t)?[this[0].previousElementSibling]:[]:this[0].previousElementSibling?[this[0].previousElementSibling]:[]:[])},prevAll:function(t){var s=[],i=this[0];if(!i)return new e([]);for(;i.previousElementSibling;){var r=i.previousElementSibling;t?a(r).is(t)&&s.push(r):s.push(r),i=r}return new e(s)},parent:function(e){for(var t=[],s=0;s0?e?this[0].offsetWidth+parseFloat(this.css("margin-right"))+parseFloat(this.css("margin-left")):this[0].offsetWidth:null})),window.Swiper=a}(),"undefined"!=typeof module?module.exports=window.Swiper:"function"==typeof define&&define.amd&&define([],function(){"use strict";return window.Swiper});
+//# sourceMappingURL=maps/swiper.min.js.map
diff --git a/app/culture/view/szwjs/public/nav.html b/app/culture/view/szwjs/public/nav.html
new file mode 100644
index 0000000..e6beea8
--- /dev/null
+++ b/app/culture/view/szwjs/public/nav.html
@@ -0,0 +1,86 @@
+
+
diff --git a/app/culture/view/szwjs/public/scripts.html b/app/culture/view/szwjs/public/scripts.html
new file mode 100644
index 0000000..c81eb18
--- /dev/null
+++ b/app/culture/view/szwjs/public/scripts.html
@@ -0,0 +1,9 @@
+
+
+
+
+
+
+
+
+
diff --git a/app/culture/view/szwjs/public/userinfo.html b/app/culture/view/szwjs/public/userinfo.html
new file mode 100644
index 0000000..bffa2c9
--- /dev/null
+++ b/app/culture/view/szwjs/public/userinfo.html
@@ -0,0 +1,32 @@
+
+
+ {if condition="$profile['individual_investor_verification_status'] eq 1 or $profile['institutional_investor_verification_status'] eq 1"}
+
投资认证 已认证
+ {elseif condition="$profile['individual_investor_verification_status'] eq -1 or $profile['institutional_investor_verification_status'] eq -1"}
+
投资认证 认证中
+ {elseif condition="$profile['individual_investor_verification_status'] eq -2 or $profile['institutional_investor_verification_status'] eq -2"}
+
投资认证 认证失败
+ {else}
+
申请投资认证 未认证
+ {/if}
+
申请认证后可查看项目
+
+
+ {if condition="$profile['corporate_verification_status'] eq 1"}
+
企业认证 已认证
+ {elseif condition="$profile['corporate_verification_status'] eq -1"}
+
企业认证 认证中
+ {elseif condition="$profile['corporate_verification_status'] eq -2"}
+
企业认证 认证失败
+ {else}
+
申请企业认证 未认证
+ {/if}
+
申请认证后可发布项目
+
+
+
+
\ No newline at end of file
diff --git a/app/culture/view/szwjs/public/usernav.html b/app/culture/view/szwjs/public/usernav.html
new file mode 100644
index 0000000..7e6bc2c
--- /dev/null
+++ b/app/culture/view/szwjs/public/usernav.html
@@ -0,0 +1,44 @@
+
+
+
个人中心
+
Ersonal Center
+
+
+
+
\ No newline at end of file