").append(b.parseHTML(e)).find(i):e)}).complete(r&&function(e,t){s.each(r,o||[e.responseText,t,e])}),this},b.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){b.fn[t]=function(e){return this.on(t,e)}}),b.each(["get","post"],function(e,n){b[n]=function(e,r,i,o){return b.isFunction(r)&&(o=o||i,i=r,r=t),b.ajax({url:e,type:n,dataType:o,data:r,success:i})}}),b.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:yn,type:"GET",isLocal:Nn.test(mn[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Dn,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"},converters:{"* text":e.String,"text html":!0,"text json":b.parseJSON,"text xml":b.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?Mn(Mn(e,b.ajaxSettings),t):Mn(b.ajaxSettings,e)},ajaxPrefilter:Hn(An),ajaxTransport:Hn(jn),ajax:function(e,n){"object"==typeof e&&(n=e,e=t),n=n||{};var r,i,o,a,s,u,l,c,p=b.ajaxSetup({},n),f=p.context||p,d=p.context&&(f.nodeType||f.jquery)?b(f):b.event,h=b.Deferred(),g=b.Callbacks("once memory"),m=p.statusCode||{},y={},v={},x=0,T="canceled",N={readyState:0,getResponseHeader:function(e){var t;if(2===x){if(!c){c={};while(t=Tn.exec(a))c[t[1].toLowerCase()]=t[2]}t=c[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return 2===x?a:null},setRequestHeader:function(e,t){var n=e.toLowerCase();return x||(e=v[n]=v[n]||e,y[e]=t),this},overrideMimeType:function(e){return x||(p.mimeType=e),this},statusCode:function(e){var t;if(e)if(2>x)for(t in e)m[t]=[m[t],e[t]];else N.always(e[N.status]);return this},abort:function(e){var t=e||T;return l&&l.abort(t),k(0,t),this}};if(h.promise(N).complete=g.add,N.success=N.done,N.error=N.fail,p.url=((e||p.url||yn)+"").replace(xn,"").replace(kn,mn[1]+"//"),p.type=n.method||n.type||p.method||p.type,p.dataTypes=b.trim(p.dataType||"*").toLowerCase().match(w)||[""],null==p.crossDomain&&(r=En.exec(p.url.toLowerCase()),p.crossDomain=!(!r||r[1]===mn[1]&&r[2]===mn[2]&&(r[3]||("http:"===r[1]?80:443))==(mn[3]||("http:"===mn[1]?80:443)))),p.data&&p.processData&&"string"!=typeof p.data&&(p.data=b.param(p.data,p.traditional)),qn(An,p,n,N),2===x)return N;u=p.global,u&&0===b.active++&&b.event.trigger("ajaxStart"),p.type=p.type.toUpperCase(),p.hasContent=!Cn.test(p.type),o=p.url,p.hasContent||(p.data&&(o=p.url+=(bn.test(o)?"&":"?")+p.data,delete p.data),p.cache===!1&&(p.url=wn.test(o)?o.replace(wn,"$1_="+vn++):o+(bn.test(o)?"&":"?")+"_="+vn++)),p.ifModified&&(b.lastModified[o]&&N.setRequestHeader("If-Modified-Since",b.lastModified[o]),b.etag[o]&&N.setRequestHeader("If-None-Match",b.etag[o])),(p.data&&p.hasContent&&p.contentType!==!1||n.contentType)&&N.setRequestHeader("Content-Type",p.contentType),N.setRequestHeader("Accept",p.dataTypes[0]&&p.accepts[p.dataTypes[0]]?p.accepts[p.dataTypes[0]]+("*"!==p.dataTypes[0]?", "+Dn+"; q=0.01":""):p.accepts["*"]);for(i in p.headers)N.setRequestHeader(i,p.headers[i]);if(p.beforeSend&&(p.beforeSend.call(f,N,p)===!1||2===x))return N.abort();T="abort";for(i in{success:1,error:1,complete:1})N[i](p[i]);if(l=qn(jn,p,n,N)){N.readyState=1,u&&d.trigger("ajaxSend",[N,p]),p.async&&p.timeout>0&&(s=setTimeout(function(){N.abort("timeout")},p.timeout));try{x=1,l.send(y,k)}catch(C){if(!(2>x))throw C;k(-1,C)}}else k(-1,"No Transport");function k(e,n,r,i){var c,y,v,w,T,C=n;2!==x&&(x=2,s&&clearTimeout(s),l=t,a=i||"",N.readyState=e>0?4:0,r&&(w=_n(p,N,r)),e>=200&&300>e||304===e?(p.ifModified&&(T=N.getResponseHeader("Last-Modified"),T&&(b.lastModified[o]=T),T=N.getResponseHeader("etag"),T&&(b.etag[o]=T)),204===e?(c=!0,C="nocontent"):304===e?(c=!0,C="notmodified"):(c=Fn(p,w),C=c.state,y=c.data,v=c.error,c=!v)):(v=C,(e||!C)&&(C="error",0>e&&(e=0))),N.status=e,N.statusText=(n||C)+"",c?h.resolveWith(f,[y,C,N]):h.rejectWith(f,[N,C,v]),N.statusCode(m),m=t,u&&d.trigger(c?"ajaxSuccess":"ajaxError",[N,p,c?y:v]),g.fireWith(f,[N,C]),u&&(d.trigger("ajaxComplete",[N,p]),--b.active||b.event.trigger("ajaxStop")))}return N},getScript:function(e,n){return b.get(e,t,n,"script")},getJSON:function(e,t,n){return b.get(e,t,n,"json")}});function _n(e,n,r){var i,o,a,s,u=e.contents,l=e.dataTypes,c=e.responseFields;for(s in c)s in r&&(n[c[s]]=r[s]);while("*"===l[0])l.shift(),o===t&&(o=e.mimeType||n.getResponseHeader("Content-Type"));if(o)for(s in u)if(u[s]&&u[s].test(o)){l.unshift(s);break}if(l[0]in r)a=l[0];else{for(s in r){if(!l[0]||e.converters[s+" "+l[0]]){a=s;break}i||(i=s)}a=a||i}return a?(a!==l[0]&&l.unshift(a),r[a]):t}function Fn(e,t){var n,r,i,o,a={},s=0,u=e.dataTypes.slice(),l=u[0];if(e.dataFilter&&(t=e.dataFilter(t,e.dataType)),u[1])for(i in e.converters)a[i.toLowerCase()]=e.converters[i];for(;r=u[++s];)if("*"!==r){if("*"!==l&&l!==r){if(i=a[l+" "+r]||a["* "+r],!i)for(n in a)if(o=n.split(" "),o[1]===r&&(i=a[l+" "+o[0]]||a["* "+o[0]])){i===!0?i=a[n]:a[n]!==!0&&(r=o[0],u.splice(s--,0,r));break}if(i!==!0)if(i&&e["throws"])t=i(t);else try{t=i(t)}catch(c){return{state:"parsererror",error:i?c:"No conversion from "+l+" to "+r}}}l=r}return{state:"success",data:t}}b.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(e){return b.globalEval(e),e}}}),b.ajaxPrefilter("script",function(e){e.cache===t&&(e.cache=!1),e.crossDomain&&(e.type="GET",e.global=!1)}),b.ajaxTransport("script",function(e){if(e.crossDomain){var n,r=o.head||b("head")[0]||o.documentElement;return{send:function(t,i){n=o.createElement("script"),n.async=!0,e.scriptCharset&&(n.charset=e.scriptCharset),n.src=e.url,n.onload=n.onreadystatechange=function(e,t){(t||!n.readyState||/loaded|complete/.test(n.readyState))&&(n.onload=n.onreadystatechange=null,n.parentNode&&n.parentNode.removeChild(n),n=null,t||i(200,"success"))},r.insertBefore(n,r.firstChild)},abort:function(){n&&n.onload(t,!0)}}}});var On=[],Bn=/(=)\?(?=&|$)|\?\?/;b.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=On.pop()||b.expando+"_"+vn++;return this[e]=!0,e}}),b.ajaxPrefilter("json jsonp",function(n,r,i){var o,a,s,u=n.jsonp!==!1&&(Bn.test(n.url)?"url":"string"==typeof n.data&&!(n.contentType||"").indexOf("application/x-www-form-urlencoded")&&Bn.test(n.data)&&"data");return u||"jsonp"===n.dataTypes[0]?(o=n.jsonpCallback=b.isFunction(n.jsonpCallback)?n.jsonpCallback():n.jsonpCallback,u?n[u]=n[u].replace(Bn,"$1"+o):n.jsonp!==!1&&(n.url+=(bn.test(n.url)?"&":"?")+n.jsonp+"="+o),n.converters["script json"]=function(){return s||b.error(o+" was not called"),s[0]},n.dataTypes[0]="json",a=e[o],e[o]=function(){s=arguments},i.always(function(){e[o]=a,n[o]&&(n.jsonpCallback=r.jsonpCallback,On.push(o)),s&&b.isFunction(a)&&a(s[0]),s=a=t}),"script"):t});var Pn,Rn,Wn=0,$n=e.ActiveXObject&&function(){var e;for(e in Pn)Pn[e](t,!0)};function In(){try{return new e.XMLHttpRequest}catch(t){}}function zn(){try{return new e.ActiveXObject("Microsoft.XMLHTTP")}catch(t){}}b.ajaxSettings.xhr=e.ActiveXObject?function(){return!this.isLocal&&In()||zn()}:In,Rn=b.ajaxSettings.xhr(),b.support.cors=!!Rn&&"withCredentials"in Rn,Rn=b.support.ajax=!!Rn,Rn&&b.ajaxTransport(function(n){if(!n.crossDomain||b.support.cors){var r;return{send:function(i,o){var a,s,u=n.xhr();if(n.username?u.open(n.type,n.url,n.async,n.username,n.password):u.open(n.type,n.url,n.async),n.xhrFields)for(s in n.xhrFields)u[s]=n.xhrFields[s];n.mimeType&&u.overrideMimeType&&u.overrideMimeType(n.mimeType),n.crossDomain||i["X-Requested-With"]||(i["X-Requested-With"]="XMLHttpRequest");try{for(s in i)u.setRequestHeader(s,i[s])}catch(l){}u.send(n.hasContent&&n.data||null),r=function(e,i){var s,l,c,p;try{if(r&&(i||4===u.readyState))if(r=t,a&&(u.onreadystatechange=b.noop,$n&&delete Pn[a]),i)4!==u.readyState&&u.abort();else{p={},s=u.status,l=u.getAllResponseHeaders(),"string"==typeof u.responseText&&(p.text=u.responseText);try{c=u.statusText}catch(f){c=""}s||!n.isLocal||n.crossDomain?1223===s&&(s=204):s=p.text?200:404}}catch(d){i||o(-1,d)}p&&o(s,c,p,l)},n.async?4===u.readyState?setTimeout(r):(a=++Wn,$n&&(Pn||(Pn={},b(e).unload($n)),Pn[a]=r),u.onreadystatechange=r):r()},abort:function(){r&&r(t,!0)}}}});var Xn,Un,Vn=/^(?:toggle|show|hide)$/,Yn=RegExp("^(?:([+-])=|)("+x+")([a-z%]*)$","i"),Jn=/queueHooks$/,Gn=[nr],Qn={"*":[function(e,t){var n,r,i=this.createTween(e,t),o=Yn.exec(t),a=i.cur(),s=+a||0,u=1,l=20;if(o){if(n=+o[2],r=o[3]||(b.cssNumber[e]?"":"px"),"px"!==r&&s){s=b.css(i.elem,e,!0)||n||1;do u=u||".5",s/=u,b.style(i.elem,e,s+r);while(u!==(u=i.cur()/a)&&1!==u&&--l)}i.unit=r,i.start=s,i.end=o[1]?s+(o[1]+1)*n:n}return i}]};function Kn(){return setTimeout(function(){Xn=t}),Xn=b.now()}function Zn(e,t){b.each(t,function(t,n){var r=(Qn[t]||[]).concat(Qn["*"]),i=0,o=r.length;for(;o>i;i++)if(r[i].call(e,t,n))return})}function er(e,t,n){var r,i,o=0,a=Gn.length,s=b.Deferred().always(function(){delete u.elem}),u=function(){if(i)return!1;var t=Xn||Kn(),n=Math.max(0,l.startTime+l.duration-t),r=n/l.duration||0,o=1-r,a=0,u=l.tweens.length;for(;u>a;a++)l.tweens[a].run(o);return s.notifyWith(e,[l,o,n]),1>o&&u?n:(s.resolveWith(e,[l]),!1)},l=s.promise({elem:e,props:b.extend({},t),opts:b.extend(!0,{specialEasing:{}},n),originalProperties:t,originalOptions:n,startTime:Xn||Kn(),duration:n.duration,tweens:[],createTween:function(t,n){var r=b.Tween(e,l.opts,t,n,l.opts.specialEasing[t]||l.opts.easing);return l.tweens.push(r),r},stop:function(t){var n=0,r=t?l.tweens.length:0;if(i)return this;for(i=!0;r>n;n++)l.tweens[n].run(1);return t?s.resolveWith(e,[l,t]):s.rejectWith(e,[l,t]),this}}),c=l.props;for(tr(c,l.opts.specialEasing);a>o;o++)if(r=Gn[o].call(l,e,c,l.opts))return r;return Zn(l,c),b.isFunction(l.opts.start)&&l.opts.start.call(e,l),b.fx.timer(b.extend(u,{elem:e,anim:l,queue:l.opts.queue})),l.progress(l.opts.progress).done(l.opts.done,l.opts.complete).fail(l.opts.fail).always(l.opts.always)}function tr(e,t){var n,r,i,o,a;for(i in e)if(r=b.camelCase(i),o=t[r],n=e[i],b.isArray(n)&&(o=n[1],n=e[i]=n[0]),i!==r&&(e[r]=n,delete e[i]),a=b.cssHooks[r],a&&"expand"in a){n=a.expand(n),delete e[r];for(i in n)i in e||(e[i]=n[i],t[i]=o)}else t[r]=o}b.Animation=b.extend(er,{tweener:function(e,t){b.isFunction(e)?(t=e,e=["*"]):e=e.split(" ");var n,r=0,i=e.length;for(;i>r;r++)n=e[r],Qn[n]=Qn[n]||[],Qn[n].unshift(t)},prefilter:function(e,t){t?Gn.unshift(e):Gn.push(e)}});function nr(e,t,n){var r,i,o,a,s,u,l,c,p,f=this,d=e.style,h={},g=[],m=e.nodeType&&nn(e);n.queue||(c=b._queueHooks(e,"fx"),null==c.unqueued&&(c.unqueued=0,p=c.empty.fire,c.empty.fire=function(){c.unqueued||p()}),c.unqueued++,f.always(function(){f.always(function(){c.unqueued--,b.queue(e,"fx").length||c.empty.fire()})})),1===e.nodeType&&("height"in t||"width"in t)&&(n.overflow=[d.overflow,d.overflowX,d.overflowY],"inline"===b.css(e,"display")&&"none"===b.css(e,"float")&&(b.support.inlineBlockNeedsLayout&&"inline"!==un(e.nodeName)?d.zoom=1:d.display="inline-block")),n.overflow&&(d.overflow="hidden",b.support.shrinkWrapBlocks||f.always(function(){d.overflow=n.overflow[0],d.overflowX=n.overflow[1],d.overflowY=n.overflow[2]}));for(i in t)if(a=t[i],Vn.exec(a)){if(delete t[i],u=u||"toggle"===a,a===(m?"hide":"show"))continue;g.push(i)}if(o=g.length){s=b._data(e,"fxshow")||b._data(e,"fxshow",{}),"hidden"in s&&(m=s.hidden),u&&(s.hidden=!m),m?b(e).show():f.done(function(){b(e).hide()}),f.done(function(){var t;b._removeData(e,"fxshow");for(t in h)b.style(e,t,h[t])});for(i=0;o>i;i++)r=g[i],l=f.createTween(r,m?s[r]:0),h[r]=s[r]||b.style(e,r),r in s||(s[r]=l.start,m&&(l.end=l.start,l.start="width"===r||"height"===r?1:0))}}function rr(e,t,n,r,i){return new rr.prototype.init(e,t,n,r,i)}b.Tween=rr,rr.prototype={constructor:rr,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||"swing",this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(b.cssNumber[n]?"":"px")},cur:function(){var e=rr.propHooks[this.prop];return e&&e.get?e.get(this):rr.propHooks._default.get(this)},run:function(e){var t,n=rr.propHooks[this.prop];return this.pos=t=this.options.duration?b.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):rr.propHooks._default.set(this),this}},rr.prototype.init.prototype=rr.prototype,rr.propHooks={_default:{get:function(e){var t;return null==e.elem[e.prop]||e.elem.style&&null!=e.elem.style[e.prop]?(t=b.css(e.elem,e.prop,""),t&&"auto"!==t?t:0):e.elem[e.prop]},set:function(e){b.fx.step[e.prop]?b.fx.step[e.prop](e):e.elem.style&&(null!=e.elem.style[b.cssProps[e.prop]]||b.cssHooks[e.prop])?b.style(e.elem,e.prop,e.now+e.unit):e.elem[e.prop]=e.now}}},rr.propHooks.scrollTop=rr.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},b.each(["toggle","show","hide"],function(e,t){var n=b.fn[t];b.fn[t]=function(e,r,i){return null==e||"boolean"==typeof e?n.apply(this,arguments):this.animate(ir(t,!0),e,r,i)}}),b.fn.extend({fadeTo:function(e,t,n,r){return this.filter(nn).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(e,t,n,r){var i=b.isEmptyObject(e),o=b.speed(t,n,r),a=function(){var t=er(this,b.extend({},e),o);a.finish=function(){t.stop(!0)},(i||b._data(this,"finish"))&&t.stop(!0)};return a.finish=a,i||o.queue===!1?this.each(a):this.queue(o.queue,a)},stop:function(e,n,r){var i=function(e){var t=e.stop;delete e.stop,t(r)};return"string"!=typeof e&&(r=n,n=e,e=t),n&&e!==!1&&this.queue(e||"fx",[]),this.each(function(){var t=!0,n=null!=e&&e+"queueHooks",o=b.timers,a=b._data(this);if(n)a[n]&&a[n].stop&&i(a[n]);else for(n in a)a[n]&&a[n].stop&&Jn.test(n)&&i(a[n]);for(n=o.length;n--;)o[n].elem!==this||null!=e&&o[n].queue!==e||(o[n].anim.stop(r),t=!1,o.splice(n,1));(t||!r)&&b.dequeue(this,e)})},finish:function(e){return e!==!1&&(e=e||"fx"),this.each(function(){var t,n=b._data(this),r=n[e+"queue"],i=n[e+"queueHooks"],o=b.timers,a=r?r.length:0;for(n.finish=!0,b.queue(this,e,[]),i&&i.cur&&i.cur.finish&&i.cur.finish.call(this),t=o.length;t--;)o[t].elem===this&&o[t].queue===e&&(o[t].anim.stop(!0),o.splice(t,1));for(t=0;a>t;t++)r[t]&&r[t].finish&&r[t].finish.call(this);delete n.finish})}});function ir(e,t){var n,r={height:e},i=0;for(t=t?1:0;4>i;i+=2-t)n=Zt[i],r["margin"+n]=r["padding"+n]=e;return t&&(r.opacity=r.width=e),r}b.each({slideDown:ir("show"),slideUp:ir("hide"),slideToggle:ir("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){b.fn[e]=function(e,n,r){return this.animate(t,e,n,r)}}),b.speed=function(e,t,n){var r=e&&"object"==typeof e?b.extend({},e):{complete:n||!n&&t||b.isFunction(e)&&e,duration:e,easing:n&&t||t&&!b.isFunction(t)&&t};return r.duration=b.fx.off?0:"number"==typeof r.duration?r.duration:r.duration in b.fx.speeds?b.fx.speeds[r.duration]:b.fx.speeds._default,(null==r.queue||r.queue===!0)&&(r.queue="fx"),r.old=r.complete,r.complete=function(){b.isFunction(r.old)&&r.old.call(this),r.queue&&b.dequeue(this,r.queue)},r},b.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2}},b.timers=[],b.fx=rr.prototype.init,b.fx.tick=function(){var e,n=b.timers,r=0;for(Xn=b.now();n.length>r;r++)e=n[r],e()||n[r]!==e||n.splice(r--,1);n.length||b.fx.stop(),Xn=t},b.fx.timer=function(e){e()&&b.timers.push(e)&&b.fx.start()},b.fx.interval=13,b.fx.start=function(){Un||(Un=setInterval(b.fx.tick,b.fx.interval))},b.fx.stop=function(){clearInterval(Un),Un=null},b.fx.speeds={slow:600,fast:200,_default:400},b.fx.step={},b.expr&&b.expr.filters&&(b.expr.filters.animated=function(e){return b.grep(b.timers,function(t){return e===t.elem}).length}),b.fn.offset=function(e){if(arguments.length)return e===t?this:this.each(function(t){b.offset.setOffset(this,e,t)});var n,r,o={top:0,left:0},a=this[0],s=a&&a.ownerDocument;if(s)return n=s.documentElement,b.contains(n,a)?(typeof a.getBoundingClientRect!==i&&(o=a.getBoundingClientRect()),r=or(s),{top:o.top+(r.pageYOffset||n.scrollTop)-(n.clientTop||0),left:o.left+(r.pageXOffset||n.scrollLeft)-(n.clientLeft||0)}):o},b.offset={setOffset:function(e,t,n){var r=b.css(e,"position");"static"===r&&(e.style.position="relative");var i=b(e),o=i.offset(),a=b.css(e,"top"),s=b.css(e,"left"),u=("absolute"===r||"fixed"===r)&&b.inArray("auto",[a,s])>-1,l={},c={},p,f;u?(c=i.position(),p=c.top,f=c.left):(p=parseFloat(a)||0,f=parseFloat(s)||0),b.isFunction(t)&&(t=t.call(e,n,o)),null!=t.top&&(l.top=t.top-o.top+p),null!=t.left&&(l.left=t.left-o.left+f),"using"in t?t.using.call(e,l):i.css(l)}},b.fn.extend({position:function(){if(this[0]){var e,t,n={top:0,left:0},r=this[0];return"fixed"===b.css(r,"position")?t=r.getBoundingClientRect():(e=this.offsetParent(),t=this.offset(),b.nodeName(e[0],"html")||(n=e.offset()),n.top+=b.css(e[0],"borderTopWidth",!0),n.left+=b.css(e[0],"borderLeftWidth",!0)),{top:t.top-n.top-b.css(r,"marginTop",!0),left:t.left-n.left-b.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent||o.documentElement;while(e&&!b.nodeName(e,"html")&&"static"===b.css(e,"position"))e=e.offsetParent;return e||o.documentElement})}}),b.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,n){var r=/Y/.test(n);b.fn[e]=function(i){return b.access(this,function(e,i,o){var a=or(e);return o===t?a?n in a?a[n]:a.document.documentElement[i]:e[i]:(a?a.scrollTo(r?b(a).scrollLeft():o,r?o:b(a).scrollTop()):e[i]=o,t)},e,i,arguments.length,null)}});function or(e){return b.isWindow(e)?e:9===e.nodeType?e.defaultView||e.parentWindow:!1}b.each({Height:"height",Width:"width"},function(e,n){b.each({padding:"inner"+e,content:n,"":"outer"+e},function(r,i){b.fn[i]=function(i,o){var a=arguments.length&&(r||"boolean"!=typeof i),s=r||(i===!0||o===!0?"margin":"border");return b.access(this,function(n,r,i){var o;return b.isWindow(n)?n.document.documentElement["client"+e]:9===n.nodeType?(o=n.documentElement,Math.max(n.body["scroll"+e],o["scroll"+e],n.body["offset"+e],o["offset"+e],o["client"+e])):i===t?b.css(n,r,s):b.style(n,r,i,s)},n,a?i:t,a,null)}})}),e.jQuery=e.$=b,"function"==typeof define&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return b})})(window); function slideSwitch(){var $active=jQuery('#cabecera_slide canvas.active');if($active.length==0)$active=jQuery('#cabecera_slide canvas:last');var $next=$active.next().length?$active.next():jQuery('#cabecera_slide canvas:first');$active.addClass('last-active');$next.css({opacity:0.0}).addClass('active').animate({opacity:1.0},1000,function(){$active.removeClass('active last-active');});}
jQuery(function(){jQuery.each(jQuery('ul.art-menu'),function(i,val){var cambiado=false;var m=jQuery(val);var links=m.find('a');for(var i=0;i
50){jQuery('#uparrow').fadeIn();}else{jQuery('#uparrow').fadeOut();}});jQuery('#uparrow').click(function(){jQuery('body,html').animate({scrollTop:0},800);return false;});});jQuery('.countAnimated').each(function(){$(this).prop('Counter',0).animate({Counter:$(this).text()},{duration:4000,easing:'swing',step:function(now){$(this).text(Math.ceil(now));}});});});jQuery(document).ready(function(){if(typeof(ajaxImage)=='undefined')
ajaxImage='/images/ajax/cart-pack.gif';jQuery(".btn_add_carrito").on("click",function(event){$.blockUI({message:' Actualizando
el carrito...
'});var cantidad=$(this).attr("cantidad");if(cantidad==''||cantidad==0||cantidad==undefined)
cantidad=1;refreshCart($(this).attr("producto"),$(this).attr("atributos"),cantidad,false,'relativo','',$(this).data("from"),$(this).data("to"));event.preventDefault();if($(this).attr("data-goto-cart")=="true"){setTimeout(function(){window.location.href="carrito";},2000);}else{$.unblockUI();}});jQuery(".btn_add_carrito_fly").on("click",function(event){var cart=$('#miniCart');var imgtofly=jQuery("#product_"+jQuery(this).attr("producto")+" .product_img");if(imgtofly){var imgclone=imgtofly.clone().offset({top:imgtofly.offset().top,left:imgtofly.offset().left}).css({'opacity':'0.8','position':'absolute','border':'2px solid gray','border-radius':'5px','width':'auto','z-index':'1000'}).appendTo(jQuery('body')).animate({'top':cart.offset().top+10,'left':cart.offset().left+30,'width':55,'height':55},1000,'easeInElastic');imgclone.animate({'width':0,'height':0},function(){jQuery(this).detach()});}
event.preventDefault();});initRefreshCart();});function initRefreshCart(){jQuery(".btn_del_carrito").on("click",function(event){event.preventDefault();refreshCart($(this).attr("producto"),$(this).attr("atributos"),-1,$(this).attr("rel")=="reload",'relativo','',$(this).data("from"),$(this).data("to"));});}
function refreshCart(producto,atributos,cantidad,recargar,modo,ejecuta,dateFrom,dateTo){jQuery.ajax({contentType:"application/x-www-form-urlencoded",type:"POST",async:false,url:"add_cart?clean=1",data:"id_producto="+producto+"&atributos="+atributos+"&cantidad="+cantidad+"&modo="+modo+"&date_from="+dateFrom+"&date_to="+dateTo,success:function(datos){jQuery("#miniCartDiv").html(datos.message);jQuery(".divCarritoCantidad").html(parentOpen+datos.num_productos+parentClose);initRefreshCart();if(recargar)
location.reload();if(ejecuta)
eval(ejecuta);}});}
var megaMenuCreate=(function($){"use strict";return function(){var sheet=$(".art-sheet");var sheetLeft=sheet.offset().left;var sheetWidth=sheet.width();try{sheetWidth-=(parseInt($(".art-hmenu").parents("nav").css("padding-left").replace("px",""),10)||0)*2;}catch(e){}
$(".art-hmenu .art-hmenu-mega-menu").css("width","").css("left","").css("right","").removeAttr("data-ext-l").removeAttr("data-ext-r").children("li").css("width","").css("margin-left","").css("margin-right","").siblings("li.cleared").remove();$(".art-hmenu-mega-menu").each(function(){var ul=$(this);var ltr=!ul.hasClass("art-hmenu-right-to-left");var widths=[];var horizontalMargin=6;ul.children("li").each(function(){widths.push($(this).width());});var maxWidth=Math.max.apply(window,widths);var submenusWidth=maxWidth*widths.length;var minMegaMenuWidth=Math.min(sheetWidth,submenusWidth);var colsPerRow=parseInt(minMegaMenuWidth/maxWidth,10);var megaMenuWidth=(maxWidth*colsPerRow)+(horizontalMargin>0?horizontalMargin*colsPerRow-1:colsPerRow-1);var parentWidth=ul.parent("li").children("a").outerWidth(false);if(submenusWidth>ul.parent("li").children("a").outerWidth(false)){ul.children("li").css("width",Math.round(parseFloat(maxWidth,10))+"px");ul.css("width",Math.round(parseFloat(megaMenuWidth,10))+"px");}
ul.children("li").each(function(index){if(index%colsPerRow!==0)
$(this).css("margin-left",horizontalMargin+"px");});if(submenusWidth>sheetWidth){var newlineLis=[];ul.children("li").each(function(index){if((index+1)%colsPerRow===0){newlineLis.push($(this));}});}
sheetWidth=sheet.outerWidth(false);var li=ul.parent("li");var ulLeft=li.offset().left;var ulWidth=ul.outerWidth(false)-60;if(ltr){var leftOffset=0;if(ulLeft+ulWidth>sheetLeft+sheetWidth){leftOffset=(ulLeft+ulWidth)-(sheetLeft+sheetWidth);ul.css("left","-"+Math.round(parseFloat(leftOffset,10))+"px");ul.attr("data-ext-l",Math.round(parseFloat(leftOffset,10)));ul.attr("data-ext-r",Math.round(parseFloat(ulWidth-leftOffset-li.outerWidth(false),10)));}}else{var rightOffset=0;ulLeft=ulLeft+li.outerWidth(false)-ulWidth;if(ulLeftli.mega").each(function(i,v){var itm=$(this);var subm=itm.children("ul");if(subm.length===0){return;}
itm.removeClass("ext ext-r ext-l");itm.css("width","").find(".ext-off,.ext-m,.ext-l,.ext-r").remove();subm.children("li").children("a").css("width","");var lw=0,rw=0;if(typeof subm.attr("data-ext-l")!=="undefined"&&typeof subm.attr("data-ext-r")!=="undefined"){lw=parseInt(subm.attr("data-ext-l"),10)+0;rw=parseInt(subm.attr("data-ext-r"),10)+0;itm.addClass("ext-r").addClass("ext-l");}else{var ltr=!subm.hasClass("art-hmenu-right-to-left");itm.addClass(ltr?"ext-r":"ext-l");}
var shadow=0;if(subm.length>0){var lnk=itm.children("a");var lnkWidth=lnk.outerWidth(false);itm.css("width",Math.round(parseFloat(lnkWidth,10))+"px");var menubarMargin=5*2;var menubarBorder=0*2;var submWidth=subm.width()+shadow+menubarMargin+menubarBorder;var w=submWidth-lnkWidth;$("").insertBefore(lnk);if(w<0){var submA=subm.children("li").children("a");var pL=parseInt(submA.css("padding-left").replace("px",""),10)||0;var pR=parseInt(submA.css("padding-right").replace("px",""),10)||0;var bL=parseInt(submA.css("border-left").replace("px",""),10)||0;var bR=parseInt(submA.css("border-right").replace("px",""),10)||0;subm.children("li").children("a").css("width",(lnkWidth-pL-pR-bL-bR)+"px");submWidth=subm.width()+shadow+menubarMargin+menubarBorder;w=submWidth-lnkWidth;}
$("0?lw:Math.round(parseFloat(w,10)))+"px;\">
").insertBefore(lnk);$("0?rw:Math.round(parseFloat(w,10)))+"px;\">
").insertBefore(lnk);itm.addClass("ext");}});};})(jQuery);jQuery(window).load(menuExtendedCreate);function openMenuMobile(){return;jQuery(".responsive .art-menu li").on("click",function(e){jQuery(this).addClass("active");});}
jQuery(document).ready(function(){jQuery(".responsive .art-nav ul.art-hmenu li").on("click",function(e){jQuery(this).find("ul").addClass("visibleSubMenu");});setTimeout("openMenuMobile();",1500);});function removeQueryStringParameter(url,key){var urlparts=url.split('?');if(urlparts.length>=2){var prefix=encodeURIComponent(key)+'=';var pars=urlparts[1].split(/[&]/g);for(var i=pars.length;i-->0;)
if(pars[i].indexOf(prefix,0)==0)
pars.splice(i,1);if(pars.length>0)
return urlparts[0]+'?'+pars.join('&');else
return urlparts[0];}else
return url;}
function updateQueryStringParameter(uri,key,value){var re=new RegExp("([?&])"+key+"=.*?(&|#|$)","i");if(uri.match(re)){return uri.replace(re,'$1'+key+"="+value+'$2');}else{var hash='';if(uri.indexOf('#')!==-1){hash=uri.replace(/.*#/,'#');uri=uri.replace(/#.*/,'');}
var separator=uri.indexOf('?')!==-1?"&":"?";return uri+separator+key+"="+value+hash;}}
function getSearchParams(k){var p={};location.search.replace(/[?&]+([^=&]+)=([^&]*)/gi,function(s,k,v){p[k]=v})
return k?p[k]:p;}
function pushLocalStorage(variable,data){var a=[];a=JSON.parse(localStorage.getItem(variable))||[];a.push(data);localStorage.setItem(variable,JSON.stringify(a));}
function DrawCirclePoints(points,radius,x,y){slice=2*3.1416/points;for(i=0;i
Puede encontrar toda la información en nuestra Política de Cookies.',delay:600,expires:30,link:'politica-de-cookies?clean=1',onAccept:function(){var myPreferences=jQuery.fn.ihavecookies.cookie();jQuery(".cookie-wrap").fadeOut("slow",function(){jQuery(this).remove();});},onReject:function(){var myPreferences=jQuery.fn.ihavecookies.cookie();jQuery(".cookie-wrap").fadeOut("slow",function(){jQuery(this).remove();});},onLoad:function(){jQuery(".cookie-wrap").show();},uncheckBoxes:true,acceptBtnLabel:'Aceptar',rejectBtnLabel:'Rechazar',moreInfoLabel:'Más información',advancedBtnLabel:'Personalizar',cookieTypesTitle:'Selecciona las cookies que quieres aceptar',fixedCookieTypeLabel:'Esenciales',fixedCookieTypeDesc:'Estas son las cookies esenciales para el correcto funcionamiento de la web.',cookieTypes:[{type:'Preferencia del sitio',value:'preferences',description:'Estas son cookies que están relacionadas con las preferencias de su sitio, p. Ej. recordar su nombre de usuario, colores del sitio, etc.'},{type:'Análisis',value:'analytics',description:'Cookies relacionadas con visitas al sitio, tipos de navegador, etc.'},{type:'Marketing',value:'marketing',description:'Cookies relacionadas con el marketing, p. Ej. boletines, redes sociales, etc.'}]}
jQuery(document).ready(function(){setTimeout('launchIHaveCookies()',3000);});function launchIHaveCookies(){jQuery('.cookie-wrap').ihavecookies(optionsIHaveCookies);if(jQuery.fn.ihavecookies.preference('marketing')===true){}
jQuery('#ihavecookiesBtn').on('click',function(){jQuery('.cookie-wrap').ihavecookies(optionsIHaveCookies,'reinit');});setTimeout('jQuery("div#gdpr-cookie-message a").colorbox({maxHeight:"600px", maxWidth:"700px", height:"80%", width:"80%"});',1000);}
function isiPhone(){return((navigator.platform.indexOf("iPhone")!=-1)||(navigator.platform.indexOf("iPod")!=-1));}
const loadScriptFile=(FILE_URL,async=true,type="text/javascript")=>{return new Promise((resolve,reject)=>{try{const scriptEle=document.createElement("script");scriptEle.type=type;scriptEle.async=async;scriptEle.src=FILE_URL;scriptEle.addEventListener("load",(ev)=>{resolve({status:true});});scriptEle.addEventListener("error",(ev)=>{reject({status:false,message:`Failed to load the script ${FILE_URL}`});});document.body.appendChild(scriptEle);}catch(error){reject(error);}});}; (function(jQuery){(function($){"use strict";if(!$.rsModules){$.rsModules={uid:0};}
function RoyalSlider(element,options){var i,self=this,navigator=window.navigator,ua=navigator.userAgent.toLowerCase();self.uid=$.rsModules.uid++;self.ns='.rs'+self.uid;var tempStyle=document.createElement('div').style,vendors=['webkit','Moz','ms','O'],vendor='',lastTime=0,tempV;for(i=0;i-1;self.slider=$(element);self.ev=$(self);self._doc=$(document);self.st=$.extend({},$.fn.royalSlider.defaults,options);self._currAnimSpeed=self.st.transitionSpeed;self._minPosOffset=0;if(self.st.allowCSS3){if((!br.webkit||self.st.allowCSS3OnWebkit)){var bT=vendor+(vendor?'T':'t');self._useCSS3Transitions=((bT+'ransform')in tempStyle)&&((bT+'ransition')in tempStyle);if(self._useCSS3Transitions){self._use3dTransform=(vendor+(vendor?'P':'p')+'erspective')in tempStyle;}}}
vendor=vendor.toLowerCase();self._vendorPref='-'+vendor+'-';self._slidesHorizontal=(self.st.slidesOrientation==='vertical')?false:true;self._reorderProp=self._slidesHorizontal?'left':'top';self._sizeProp=self._slidesHorizontal?'width':'height';self._prevNavItemId=-1;self._isMove=(self.st.transitionType==='fade')?false:true;if(!self._isMove){self.st.sliderDrag=false;self._fadeZIndex=10;}
self._opacityCSS='z-index:0; display:none; opacity:0;';self._newSlideId=0;self._sPosition=0;self._nextSlidePos=0;$.each($.rsModules,function(helper,opts){if(helper!=='uid')
opts.call(self);});self.slides=[];self._idCount=0;var returnVal;var ts=self.st.slides?$(self.st.slides):self.slider.children().detach();ts.each(function(){self._parseNode(this,true);});if(self.st.randomizeSlides){self.slides.sort(function(){return 0.5-Math.random();});}
self.numSlides=self.slides.length;self._refreshNumPreloadImages();if(!self.st.startSlideId){self.st.startSlideId=0;}else if(self.st.startSlideId>self.numSlides-1){self.st.startSlideId=self.numSlides-1;}
self._newSlideId=self.staticSlideId=self.currSlideId=self._realId=self.st.startSlideId;self.currSlide=self.slides[self.currSlideId];self._accelerationPos=0;self.pointerMultitouch=false;self.slider.addClass((self._slidesHorizontal?'rsHor':'rsVer')+(self._isMove?'':' rsFade'));var sliderHTML='';self.slidesSpacing=self.st.slidesSpacing;self._slideSize=(self._slidesHorizontal?self.slider.width():$(window).height())+self.st.slidesSpacing;self._preload=Boolean(self._numPreloadImages>0);if(self.numSlides<=1){self._loop=false;}
var loopHelpers=(self._loop&&self._isMove)?(self.numSlides===2?1:2):0;self._loopHelpers=loopHelpers;self._maxImages=self.numSlides<6?self.numSlides:6;self._currBlockIndex=0;self._idOffset=0;self.slidesJQ=[];for(i=0;i
');var addCursors=function(){if(self.st.sliderDrag){self._hasDrag=true;if(br.msie||br.opera){self._grabCursor=self._grabbingCursor="move";}else if(br.mozilla){self._grabCursor="-moz-grab";self._grabbingCursor="-moz-grabbing";}else if(br.webkit&&(navigator.platform.indexOf("Mac")!=-1)){self._grabCursor="-webkit-grab";self._grabbingCursor="-webkit-grabbing";}
self._setGrabCursor();}};var rsNS=self.ns;var addEventNames=function(pref,down,move,up,cancel){self._downEvent=pref+down+rsNS;self._moveEvent=pref+move+rsNS;self._upEvent=pref+up+rsNS;if(cancel)
self._cancelEvent=pref+cancel+rsNS;};var nPointerEnabled=navigator.pointerEnabled;self.pointerEnabled=nPointerEnabled||navigator.msPointerEnabled;if(self.pointerEnabled){self.hasTouch=false;self._lastItemFriction=0.2;self.pointerMultitouch=Boolean(navigator[(nPointerEnabled?'m':'msM')+'axTouchPoints']>1);if(nPointerEnabled){addEventNames('pointer','down','move','up','cancel');}else{addEventNames('MSPointer','Down','Move','Up','Cancel');}}else{if(!self.isIOS){addEventNames('mouse','down','move','up');}else{self._downEvent=self._moveEvent=self._upEvent=self._cancelEvent='';}
if('ontouchstart'in window||'createTouch'in document){self.hasTouch=true;self._downEvent+=' touchstart'+rsNS;self._moveEvent+=' touchmove'+rsNS;self._upEvent+=' touchend'+rsNS;self._cancelEvent+=' touchcancel'+rsNS;self._lastItemFriction=0.5;if(self.st.sliderTouch){self._hasDrag=true;}}else{self.hasTouch=false;self._lastItemFriction=0.2;}}
addCursors();self.slider.html(sliderHTML);self._controlsContainer=self.st.controlsInside?self._sliderOverflow:self.slider;self._slidesContainer=self._sliderOverflow.children('.rsContainer');if(self.pointerEnabled){self._slidesContainer.css((nPointerEnabled?'':'-ms-')+'touch-action',self._slidesHorizontal?'pan-y':'pan-x');}
self._preloader=$('
');var slides=self._slidesContainer.children('.rsSlide');self._currHolder=self.slidesJQ[self.currSlideId];self._selectedSlideHolder=0;function createItemHTML(i,className){return'';}
if(self._useCSS3Transitions){self._TP='transition-property';self._TD='transition-duration';self._TTF='transition-timing-function';self._yProp=self._xProp=self._vendorPref+'transform';if(self._use3dTransform){if(br.webkit&&!br.chrome){self.slider.addClass('rsWebkit3d');}
self._tPref1='translate3d(';self._tPref2='px, ';self._tPref3='px, 0px)';}else{self._tPref1='translate(';self._tPref2='px, ';self._tPref3='px)';}
if(!self._isMove){var animObj={};animObj[(self._vendorPref+self._TP)]='opacity';animObj[(self._vendorPref+self._TD)]=self.st.transitionSpeed+'ms';animObj[(self._vendorPref+self._TTF)]=self.st.css3easeInOut;slides.css(animObj);}else{self._slidesContainer[(self._vendorPref+self._TP)]=(self._vendorPref+'transform');}}else{self._xProp='left';self._yProp='top';}
var resizeTimer;$(window).on('resize'+self.ns,function(){if(resizeTimer){clearTimeout(resizeTimer);}
resizeTimer=setTimeout(function(){self.updateSliderSize();},50);});self.ev.trigger('rsAfterPropsSetup');self.updateSliderSize();if(self.st.keyboardNavEnabled){self._bindKeyboardNav();}
if(self.st.arrowsNavHideOnTouch&&(self.hasTouch||self.pointerMultitouch)){self.st.arrowsNav=false;}
if(self.st.arrowsNav){var rArr='rsArrow',container=self._controlsContainer;$('
').appendTo(container);self._arrowLeft=container.children('.'+rArr+'Left').click(function(e){e.preventDefault();self.prev();});self._arrowRight=container.children('.'+rArr+'Right').click(function(e){e.preventDefault();self.next();});if(self.st.arrowsNavAutoHide&&!self.hasTouch){self._arrowLeft.addClass('rsHidden');self._arrowRight.addClass('rsHidden');var hoverEl=container;hoverEl.one("mousemove.arrowshover",function(){self._arrowLeft.removeClass('rsHidden');self._arrowRight.removeClass('rsHidden');});hoverEl.hover(function(){if(!self._arrowsAutoHideLocked){self._arrowLeft.removeClass('rsHidden');self._arrowRight.removeClass('rsHidden');}},function(){if(!self._arrowsAutoHideLocked){self._arrowLeft.addClass('rsHidden');self._arrowRight.addClass('rsHidden');}});}
self.ev.on('rsOnUpdateNav',function(){self._updateArrowsNav();});self._updateArrowsNav();}
if((self.hasTouch&&self.st.sliderTouch)||(!self.hasTouch&&self.st.sliderDrag)){self._slidesContainer.on(self._downEvent,function(e){self._onDragStart(e);});}else{self.dragSuccess=false;}
var videoClasses=['rsPlayBtnIcon','rsPlayBtn','rsCloseVideoBtn','rsCloseVideoIcn'];self._slidesContainer.click(function(e){if(!self.dragSuccess){var t=$(e.target);var tClass=t.attr('class');if($.inArray(tClass,videoClasses)!==-1){if(self.toggleVideo()){return false;}}
if(self.st.navigateByClick&&!self._blockActions){if($(e.target).closest('.rsNoDrag',self._currHolder).length){return true;}
self._mouseNext(e);}
self.ev.trigger('rsSlideClick',e);}}).on('click.rs','a',function(e){if(self.dragSuccess){return false;}else{self._blockActions=true;setTimeout(function(){self._blockActions=false;},3);}});self.ev.trigger('rsAfterInit');}
RoyalSlider.prototype={constructor:RoyalSlider,_mouseNext:function(e){var self=this,relativePos=e[self._slidesHorizontal?'pageX':'pageY']-self._sliderOffset;if(relativePos>=self._nextSlidePos){self.next();}else if(relativePos<0){self.prev();}},_refreshNumPreloadImages:function(){var self=this,n;n=self.st.numImagesToPreload;self._loop=self.st.loop;if(self._loop){if(self.numSlides===2){self._loop=false;self.st.loopRewind=true;}else if(self.numSlides<2){self.st.loopRewind=self._loop=false;}}
if(self._loop&&n>0){if(self.numSlides<=4){n=1;}else{n=Math.floor((self.numSlides-1)/2);}}
self._numPreloadImages=n;},_parseNode:function(content,pushToSlides){var self=this,hasImg,isRoot,hasCover,obj={},tempEl,first=true;content=$(content);self._currContent=content;self.ev.trigger('rsBeforeParseNode',[content,obj]);if(obj.stopParsing){return;}
content=self._currContent;obj.id=self._idCount;obj.contentAdded=false;self._idCount++;obj.images=[];obj.isBig=false;if(!obj.hasCover){if(content.hasClass('rsImg')){tempEl=content;hasImg=true;}else{tempEl=content.find('.rsImg');if(tempEl.length){hasImg=true;}}
if(hasImg){obj.bigImage=tempEl.eq(0).attr('data-rsBigImg');tempEl.each(function(){var item=$(this);if(item.is('a')){parseEl(item,'href');}else if(item.is('img')){parseEl(item,'src');}else{parseEl(item);}});}else if(content.is('img')){content.addClass('rsImg rsMainSlideImage');parseEl(content,'src');}}
tempEl=content.find('.rsCaption');if(tempEl.length){obj.caption=tempEl.remove();}
obj.content=content;self.ev.trigger('rsAfterParseNode',[content,obj]);function parseEl(el,s){if(s){obj.images.push(el.attr(s));}else{obj.images.push(el.text());}
if(first){first=false;obj.caption=(s==='src')?el.attr('alt'):el.contents();obj.image=obj.images[0];obj.videoURL=el.attr('data-rsVideo');var wAtt=el.attr('data-rsw'),hAtt=el.attr('data-rsh');if(typeof wAtt!=='undefined'&&wAtt!==false&&typeof hAtt!=='undefined'&&hAtt!==false){obj.iW=parseInt(wAtt,10);obj.iH=parseInt(hAtt,10);}else if(self.st.imgWidth&&self.st.imgHeight){obj.iW=self.st.imgWidth;obj.iH=self.st.imgHeight;}}}
if(pushToSlides){self.slides.push(obj);}
if(obj.images.length===0){obj.isLoaded=true;obj.isRendered=false;obj.isLoading=false;obj.images=null;}
return obj;},_bindKeyboardNav:function(){var self=this,interval,keyCode,onKeyboardAction=function(keyCode){if(keyCode===37){self.prev();}else if(keyCode===39){self.next();}};self._doc.on('keydown'+self.ns,function(e){if(!self.st.keyboardNavEnabled){return true;}
if(!self._isDragging){keyCode=e.keyCode;if(keyCode===37||keyCode===39){if(!interval){if(document.activeElement&&(/(INPUT|SELECT|TEXTAREA)/i).test(document.activeElement.tagName)){return true;}
if(self.isFullscreen){e.preventDefault();}
onKeyboardAction(keyCode);interval=setInterval(function(){onKeyboardAction(keyCode);},700);}}}}).on('keyup'+self.ns,function(e){if(interval){clearInterval(interval);interval=null;}});},goTo:function(id,notUserAction){var self=this;if(id!==self.currSlideId){self._moveTo(id,self.st.transitionSpeed,true,!notUserAction);}},destroy:function(remove){var self=this;self.ev.trigger('rsBeforeDestroy');self._doc.off('keydown'+self.ns+' keyup'+self.ns+' '+self._moveEvent+' '+self._upEvent);self._slidesContainer.off(self._downEvent+' click');self.slider.data('royalSlider',null);$.removeData(self.slider,'royalSlider');$(window).off('resize'+self.ns);if(self.loadingTimeout){clearTimeout(self.loadingTimeout);}
if(remove){self.slider.remove();}
self.slides=null;self.slider=null;self.ev=null;},_updateBlocksContent:function(beforeTransition,getId){var self=this,item,i,n,pref,group,groupId,slideCode,loop=self._loop,numSlides=self.numSlides;if(!isNaN(getId)){return getCorrectLoopedId(getId);}
var id=self.currSlideId;var groupOffset;var itemsOnSide=beforeTransition?(Math.abs(self._prevSlideId-self.currSlideId)>=self.numSlides-1?0:1):self._numPreloadImages;var itemsOnleftSide=itemsOnSide;var itemsOnRightSide=(self.numSlides%2)==0?itemsOnSide+1:itemsOnSide;var itemsToCheck=Math.min(2,itemsOnSide);var updateAfter=false;var updateBefore=false;var tempId;for(i=id;i
id-1-itemsToCheck;i--){tempId=getCorrectLoopedId(i);item=self.slides[tempId];if(item&&(!item.isAdded||!item.positionSet)){updateBefore=true;break;}}
if(updateAfter){for(i=id;iid-1-itemsOnleftSide;i--){tempId=getCorrectLoopedId(i);groupOffset=Math.floor((self._realId-(id-i))/numSlides)*numSlides;item=self.slides[tempId];if(item){updateItem(item,tempId);}}}
if(!beforeTransition){var start=id;var distance=itemsOnSide;var min=getCorrectLoopedId(id-itemsOnleftSide);var max=getCorrectLoopedId(id+itemsOnRightSide);var nmin=min>max?0:min;for(i=0;imax){if(i>min-1){continue;}}
if(imax){item=self.slides[i];if(item&&!item.isAdded){updateItem(item,i);}
if(item&&item.holder){item.holder.detach();item.isAdded=false;}}}}
function updateItem(item,i,slideCode){if(!item.isAdded){if(!slideCode)
slideCode=self.slidesJQ[i];if(!item.holder){slideCode=self.slidesJQ[i]=$(slideCode);item.holder=slideCode;}else{slideCode=item.holder;}
item.appendOnLoaded=false;updatePos(i,item,slideCode);addContent(i,item);self._addBlockToContainer(item,slideCode,beforeTransition);item.isAdded=true;}else{addContent(i,item);updatePos(i,item);}}
function addContent(i,item){if(!item.contentAdded){self.setItemHtml(item,beforeTransition);if(!beforeTransition){item.contentAdded=true;}}}
function updatePos(i,item,slideCode){if(self._isMove){if(!slideCode){slideCode=self.slidesJQ[i];}
slideCode.css(self._reorderProp,(i+self._idOffset+groupOffset)*self._slideSize);}}
function getCorrectLoopedId(index){var changed=false;if(loop){if(index>numSlides-1){return getCorrectLoopedId(index-numSlides);}else if(index<0){return getCorrectLoopedId(numSlides+index);}}
return index;}},setItemHtml:function(currSlideObject,beforeTransition){var self=this;var parseDataAndLoad=function(){if(!currSlideObject.images){currSlideObject.isRendered=true;currSlideObject.isLoaded=true;currSlideObject.isLoading=false;appendContent(true);return;}
if(currSlideObject.isLoading){return;}
var el,isRoot;if(currSlideObject.content.hasClass('rsImg')){el=currSlideObject.content;isRoot=true;}else{el=currSlideObject.content.find('.rsImg:not(img)');}
if(el&&!el.is('img')){el.each(function(){var item=$(this),newEl='';if(!isRoot){item.replaceWith(newEl);}else{currSlideObject.content=$(newEl);}});}
el=isRoot?currSlideObject.content:currSlideObject.content.find('img.rsImg');setPreloader();el.eq(0).addClass('rsMainSlideImage');if(currSlideObject.iW&&currSlideObject.iH){if(!currSlideObject.isLoaded){self._resizeImage(currSlideObject);}
appendContent();}
currSlideObject.isLoading=true;var newEl;var eNames='load.rs error.rs';if(currSlideObject.isBig){$('').on(eNames,function(e){$(this).off(eNames);onLoad([this],true);}).attr('src',currSlideObject.image);}else{currSlideObject.loaded=[];currSlideObject.numStartedLoad=0;var onLoaded=function(e){$(this).off(eNames);currSlideObject.loaded.push(this);if(currSlideObject.loaded.length===currSlideObject.numStartedLoad){onLoad(currSlideObject.loaded,false);}};for(var i=0;i');currSlideObject.numStartedLoad++;image.on('load.rs error.rs',onLoaded).attr('src',currSlideObject.images[i]);}}};var onLoad=function($images,isBig){if($images.length){var img=$images[0],src=img.src;if(isBig!==currSlideObject.isBig){var c=currSlideObject.holder.children();if(c&&c.length>1){removePreloader();}
return;}
if(currSlideObject.iW&&currSlideObject.iH){imageLoadingComplete();return;}
currSlideObject.iW=img.width;currSlideObject.iH=img.height;if(currSlideObject.iW&&currSlideObject.iH){imageLoadingComplete();return;}else{var loader=new Image();loader.onload=function(){if(loader.width){currSlideObject.iW=loader.width;currSlideObject.iH=loader.height;imageLoadingComplete();}else{setTimeout(function(){if(loader.width){currSlideObject.iW=loader.width;currSlideObject.iH=loader.height;}
imageLoadingComplete();},1000);}};loader.src=img.src;}}else{imageLoadingComplete();}};var imageLoadingComplete=function(){currSlideObject.isLoaded=true;currSlideObject.isLoading=false;appendContent();removePreloader();triggerLoaded();};var waitForTransition=function(){if(!self._isMove&&currSlideObject.images&&currSlideObject.iW&&currSlideObject.iH){parseDataAndLoad();return;}
currSlideObject.holder.isWaiting=true;setPreloader();currSlideObject.holder.slideId=-99;};var appendContent=function(){if(!currSlideObject.isAppended&&self.ev){var visibleNearby=self.st.visibleNearby,bId=currSlideObject.id-self._newSlideId;if(!beforeTransition&&!currSlideObject.appendOnLoaded&&self.st.fadeinLoadedSlide&&(bId===0||((visibleNearby||self._isAnimating||self._isDragging)&&(bId===-1||bId===1)))){var css={visibility:'visible',opacity:0};css[self._vendorPref+'transition']='opacity 400ms ease-in-out';currSlideObject.content.css(css);setTimeout(function(){currSlideObject.content.css('opacity',1);},16);}
if(currSlideObject.holder.find('.rsPreloader').length){currSlideObject.holder.append(currSlideObject.content);}else{currSlideObject.holder.html(currSlideObject.content);}
currSlideObject.isAppended=true;if(currSlideObject.isLoaded){self._resizeImage(currSlideObject);triggerLoaded();}
if(!currSlideObject.sizeReady){currSlideObject.sizeReady=true;setTimeout(function(){self.ev.trigger('rsMaybeSizeReady',currSlideObject);},100);}}};var triggerLoaded=function(){if(!currSlideObject.loadedTriggered&&self.ev){currSlideObject.isLoaded=currSlideObject.loadedTriggered=true;currSlideObject.holder.trigger('rsAfterContentSet');self.ev.trigger('rsAfterContentSet',currSlideObject);}};var setPreloader=function(){if(self.st.usePreloader)
currSlideObject.holder.html(self._preloader.clone());};var removePreloader=function(now){if(self.st.usePreloader){var preloader=currSlideObject.holder.find('.rsPreloader');if(preloader.length){preloader.remove();}}};if(currSlideObject.isLoaded){appendContent();return;}else{if(beforeTransition){waitForTransition();}else{parseDataAndLoad();}}},_addBlockToContainer:function(slideObject,content,dontFade){var self=this;var holder=slideObject.holder;var bId=slideObject.id-self._newSlideId;var visibleNearby=false;self._slidesContainer.append(holder);slideObject.appendOnLoaded=false;},_onDragStart:function(e,isThumbs){var self=this,point,wasAnimating,isTouch=(e.type==='touchstart');self._isTouchGesture=isTouch;self.ev.trigger('rsDragStart');if($(e.target).closest('.rsNoDrag',self._currHolder).length){self.dragSuccess=false;return true;}
if(!isThumbs){if(self._isAnimating){self._wasAnimating=true;self._stopAnimation();}}
self.dragSuccess=false;if(self._isDragging){if(isTouch){self._multipleTouches=true;}
return;}else{if(isTouch){self._multipleTouches=false;}}
self._setGrabbingCursor();if(isTouch){var touches=e.originalEvent.touches;if(touches&&touches.length>0){point=touches[0];if(touches.length>1){self._multipleTouches=true;}}
else{return;}}else{e.preventDefault();point=e;if(self.pointerEnabled)point=point.originalEvent;}
self._isDragging=true;self._doc.on(self._moveEvent,function(e){self._onDragMove(e,isThumbs);}).on(self._upEvent,function(e){self._onDragRelease(e,isThumbs);});self._currMoveAxis='';self._hasMoved=false;self._pageX=point.pageX;self._pageY=point.pageY;self._startPagePos=self._accelerationPos=(!isThumbs?self._slidesHorizontal:self._thumbsHorizontal)?point.pageX:point.pageY;self._horDir=0;self._verDir=0;self._currRenderPosition=!isThumbs?self._sPosition:self._thumbsPosition;self._startTime=new Date().getTime();if(isTouch){self._sliderOverflow.on(self._cancelEvent,function(e){self._onDragRelease(e,isThumbs);});}},_renderMovement:function(point,isThumbs){var self=this;if(self._checkedAxis){var timeStamp=self._renderMoveTime,deltaX=point.pageX-self._pageX,deltaY=point.pageY-self._pageY,newX=self._currRenderPosition+deltaX,newY=self._currRenderPosition+deltaY,isHorizontal=(!isThumbs?self._slidesHorizontal:self._thumbsHorizontal),newPos=isHorizontal?newX:newY,mAxis=self._currMoveAxis;self._hasMoved=true;self._pageX=point.pageX;self._pageY=point.pageY;if(mAxis==='x'&&deltaX!==0){self._horDir=deltaX>0?1:-1;}else if(mAxis==='y'&&deltaY!==0){self._verDir=deltaY>0?1:-1;}
var pointPos=isHorizontal?self._pageX:self._pageY,deltaPos=isHorizontal?deltaX:deltaY;if(!isThumbs){if(!self._loop){if(self.currSlideId<=0){if(pointPos-self._startPagePos>0){newPos=self._currRenderPosition+deltaPos*self._lastItemFriction;}}
if(self.currSlideId>=self.numSlides-1){if(pointPos-self._startPagePos<0){newPos=self._currRenderPosition+deltaPos*self._lastItemFriction;}}}}else{if(newPos>self._thumbsMinPosition){newPos=self._currRenderPosition+deltaPos*self._lastItemFriction;}else if(newPos200){self._startTime=timeStamp;self._accelerationPos=pointPos;}
if(!isThumbs){if(self._isMove){self._setPosition(self._currRenderPosition);}}else{self._setThumbsPosition(self._currRenderPosition);}}},_onDragMove:function(e,isThumbs){var self=this,point,isTouch=(e.type==='touchmove');if(self._isTouchGesture&&!isTouch){return;}
if(isTouch){if(self._lockAxis){return;}
var touches=e.originalEvent.touches;if(touches){if(touches.length>1){return;}else{point=touches[0];}}else{return;}}else{point=e;if(self.pointerEnabled)point=point.originalEvent;}
if(!self._hasMoved){if(self._useCSS3Transitions){(!isThumbs?self._slidesContainer:self._thumbsContainer).css((self._vendorPref+self._TD),'0s');}
(function animloop(){if(self._isDragging){self._animFrame=requestAnimationFrame(animloop);if(self._renderMoveEvent)
self._renderMovement(self._renderMoveEvent,isThumbs);}})();}
if(!self._checkedAxis){var dir=(!isThumbs?self._slidesHorizontal:self._thumbsHorizontal),diff=(Math.abs(point.pageX-self._pageX)-Math.abs(point.pageY-self._pageY))-(dir?-7:7);if(diff>7){if(dir){e.preventDefault();self._currMoveAxis='x';}else if(isTouch){self._completeGesture(e);return;}
self._checkedAxis=true;}else if(diff<-7){if(!dir){e.preventDefault();self._currMoveAxis='y';}else if(isTouch){self._completeGesture(e);return;}
self._checkedAxis=true;}
return;}
e.preventDefault();self._renderMoveTime=new Date().getTime();self._renderMoveEvent=point;},_completeGesture:function(e,isThumbs){var self=this;self._lockAxis=true;self._hasMoved=self._isDragging=false;self._onDragRelease(e);},_onDragRelease:function(e,isThumbs){var self=this,totalMoveDist,accDist,duration,v0,newPos,newDist,newDuration,blockLink,isTouch=(e.type.indexOf('touch')>-1);if(self._isTouchGesture&&!isTouch){return;}
self._isTouchGesture=false;self.ev.trigger('rsDragRelease');self._renderMoveEvent=null;self._isDragging=false;self._lockAxis=false;self._checkedAxis=false;self._renderMoveTime=0;cancelAnimationFrame(self._animFrame);if(self._hasMoved){if(!isThumbs){if(self._isMove){self._setPosition(self._currRenderPosition);}}else{self._setThumbsPosition(self._currRenderPosition);}}
self._doc.off(self._moveEvent).off(self._upEvent);if(isTouch){self._sliderOverflow.off(self._cancelEvent);}
self._setGrabCursor();if(!self._hasMoved&&!self._multipleTouches){if(isThumbs&&self._thumbsEnabled){var item=$(e.target).closest('.rsNavItem');if(item.length){self.goTo(item.index());}
return;}}
var orient=(!isThumbs?self._slidesHorizontal:self._thumbsHorizontal);if(!self._hasMoved||(self._currMoveAxis==='y'&&orient)||(self._currMoveAxis==='x'&&!orient)){if(!isThumbs&&self._wasAnimating){self._wasAnimating=false;if(!self.st.navigateByClick){self.dragSuccess=true;}else{self._mouseNext((self.pointerEnabled?e.originalEvent:e));self.dragSuccess=true;return;}}else{self._wasAnimating=false;self.dragSuccess=false;return;}}else{self.dragSuccess=true;}
self._wasAnimating=false;self._currMoveAxis='';function getCorrectSpeed(newSpeed){if(newSpeed<100){return 100;}else if(newSpeed>500){return 500;}
return newSpeed;}
function returnToCurrent(isSlow,v0){if(self._isMove||isThumbs){newPos=(-self._realId-self._idOffset)*self._slideSize;newDist=Math.abs(self._sPosition-newPos);self._currAnimSpeed=newDist/v0;if(isSlow){self._currAnimSpeed+=250;}
self._currAnimSpeed=getCorrectSpeed(self._currAnimSpeed);self._animateTo(newPos,false);}}
var snapDist=self.st.minSlideOffset,point=isTouch?e.originalEvent.changedTouches[0]:(self.pointerEnabled?e.originalEvent:e),pPos=orient?point.pageX:point.pageY,sPos=self._startPagePos,axPos=self._accelerationPos,axCurrItem=self.currSlideId,axNumItems=self.numSlides,dir=orient?self._horDir:self._verDir,loop=self._loop,changeHash=false,distOffset=0;totalMoveDist=Math.abs(pPos-sPos);accDist=pPos-axPos;duration=(new Date().getTime())-self._startTime;v0=Math.abs(accDist)/duration;if(dir===0||axNumItems<=1){returnToCurrent(true,v0);return;}
if(!loop&&!isThumbs){if(axCurrItem<=0){if(dir>0){returnToCurrent(true,v0);return;}}else if(axCurrItem>=axNumItems-1){if(dir<0){returnToCurrent(true,v0);return;}}}
if(!isThumbs){var getSwipedSlides=function(dist){var numSwipedSlides=Math.floor(dist/self._slideSize);var nextSlideOffset=dist-(numSwipedSlides*self._slideSize);if(nextSlideOffset>snapDist){numSwipedSlides++;}
return numSwipedSlides;};if(sPos+snapDistpPos){if(dir>0){returnToCurrent(false,v0);return;}
var swipedSlides=getSwipedSlides(sPos-pPos);self._moveTo(self.currSlideId+swipedSlides,getCorrectSpeed(Math.abs(self._sPosition-(-self._realId-self._idOffset-swipedSlides)*self._slideSize)/v0),changeHash,true,true);}else{returnToCurrent(false,v0);}}else{newPos=self._thumbsPosition;var transitionSpeed;if(newPos>self._thumbsMinPosition){newPos=self._thumbsMinPosition;}else if(newPos0&&S>minXDist){minXDist=minXDist+self._thumbsViewportSize/(15/(S/v0*friction));v0=v0*minXDist/S;S=minXDist;}else if(accDist<0&&S>maxXDist){maxXDist=maxXDist+self._thumbsViewportSize/(15/(S/v0*friction));v0=v0*maxXDist/S;S=maxXDist;}
transitionSpeed=Math.max(Math.round(v0/friction),50);newPos=newPos+S*(accDist<0?-1:1);if(newPos>self._thumbsMinPosition){self._animateThumbsTo(newPos,transitionSpeed,true,self._thumbsMinPosition,200);return;}else if(newPosself.numSlides){index=self.numSlides;}
self.slides.splice(index,0,parsedSlide);self.slidesJQ.splice(index,0,$(''));if(index<=self.currSlideId){self.currSlideId++;}
self.ev.trigger('rsOnAppendSlide',[parsedSlide,index]);self._refreshSlides(index);if(index===self.currSlideId){self.ev.trigger('rsAfterSlideChange');}},removeSlide:function(index){var self=this,slideToRemove=self.slides[index];if(slideToRemove){if(slideToRemove.holder){slideToRemove.holder.remove();}
if(index=self.numSlides){self.goTo(self.numSlides-1);}else if(self.currSlideId<0){self.goTo(0);}
self._refreshNumPreloadImages();if(self._isMove){self._slidesContainer.css((self._vendorPref+self._TD),'0ms');}
if(self._refreshSlidesTimeout){clearTimeout(self._refreshSlidesTimeout);}
self._refreshSlidesTimeout=setTimeout(function(){if(self._isMove){self._setPosition((-self._realId-self._idOffset)*self._slideSize);}
self._updateBlocksContent();if(!self._isMove){self._currHolder.css({display:'block',opacity:1});}},14);self.ev.trigger('rsOnUpdateNav');},_setGrabCursor:function(){var self=this;if(self._hasDrag&&self._isMove){if(self._grabCursor){self._sliderOverflow.css('cursor',self._grabCursor);}else{self._sliderOverflow.removeClass('grabbing-cursor');self._sliderOverflow.addClass('grab-cursor');}}},_setGrabbingCursor:function(){var self=this;if(self._hasDrag&&self._isMove){if(self._grabbingCursor){self._sliderOverflow.css('cursor',self._grabbingCursor);}else{self._sliderOverflow.removeClass('grab-cursor');self._sliderOverflow.addClass('grabbing-cursor');}}},next:function(notUserAction){var self=this;self._moveTo('next',self.st.transitionSpeed,true,!notUserAction);},prev:function(notUserAction){var self=this;self._moveTo('prev',self.st.transitionSpeed,true,!notUserAction);},_moveTo:function(type,speed,inOutEasing,userAction,fromSwipe){var self=this,newPos,difference,i,newItemId;self.ev.trigger('rsBeforeMove',[type,userAction]);if(type==='next'){newItemId=self.currSlideId+1;}else if(type==='prev'){newItemId=self.currSlideId-1;}else{newItemId=type=parseInt(type,10);}
if(!self._loop){if(newItemId<0){self._doBackAndForthAnim('left',!userAction);return;}else if(newItemId>=self.numSlides){self._doBackAndForthAnim('right',!userAction);return;}}
if(self._isAnimating){self._stopAnimation(true);inOutEasing=false;}
difference=newItemId-self.currSlideId;self._prevSlideId=self.currSlideId;var prevId=self.currSlideId;var id=self.currSlideId+difference;var realId=self._realId;var temp;var delayed;if(self._loop){id=self._updateBlocksContent(false,id);realId+=difference;}else{realId=id;}
self._newSlideId=id;self._oldHolder=self.slidesJQ[self.currSlideId];self._realId=realId;self.currSlideId=self._newSlideId;self.currSlide=self.slides[self.currSlideId];self._currHolder=self.slidesJQ[self.currSlideId];var checkDist=self.st.slidesDiff;var next=Boolean(difference>0);var absDiff=Math.abs(difference);var g1=Math.floor(prevId/self._numPreloadImages);var g2=Math.floor((prevId+(next?checkDist:-checkDist))/self._numPreloadImages);var biggest=next?Math.max(g1,g2):Math.min(g1,g2);var biggestId=biggest*self._numPreloadImages+(next?(self._numPreloadImages-1):0);if(biggestId>self.numSlides-1){biggestId=self.numSlides-1;}else if(biggestId<0){biggestId=0;}
var toLast=next?(biggestId-prevId):(prevId-biggestId);if(toLast>self._numPreloadImages){toLast=self._numPreloadImages;}
if(absDiff>toLast+checkDist){self._idOffset+=(absDiff-(toLast+checkDist))*(next?-1:1);speed=speed*1.4;for(i=0;iself.numSlides-1){testId=testId-self.numSlides;}
if(testId!==self.currSlideId){return false;}
return true;}},_updateArrowsNav:function(){var self=this,arrDisClass='rsArrowDisabled';if(self.st.arrowsNav){if(self.numSlides<=1){self._arrowLeft.css('display','none');self._arrowRight.css('display','none');return;}else{self._arrowLeft.css('display','block');self._arrowRight.css('display','block');}
if(!self._loop&&!self.st.loopRewind){if(self.currSlideId===0){self._arrowLeft.addClass(arrDisClass);}else{self._arrowLeft.removeClass(arrDisClass);}
if(self.currSlideId===self.numSlides-1){self._arrowRight.addClass(arrDisClass);}else{self._arrowRight.removeClass(arrDisClass);}}}},_animateTo:function(pos,dir,loadAll,inOutEasing,customComplete){var self=this,moveProp,oldBlock,animBlock;var animObj={};if(isNaN(self._currAnimSpeed)){self._currAnimSpeed=400;}
self._sPosition=self._currRenderPosition=pos;self.ev.trigger('rsBeforeAnimStart');if(!self._useCSS3Transitions){if(self._isMove){animObj[self._slidesHorizontal?self._xProp:self._yProp]=pos+'px';self._slidesContainer.animate(animObj,self._currAnimSpeed,inOutEasing?self.st.easeInOut:self.st.easeOut);}else{oldBlock=self._oldHolder;animBlock=self._currHolder;animBlock.stop(true,true).css({opacity:0,display:'block',zIndex:self._fadeZIndex});self._currAnimSpeed=self.st.transitionSpeed;animBlock.animate({opacity:1},self._currAnimSpeed,self.st.easeInOut);clearTimeouts();if(oldBlock){oldBlock.data('rsTimeout',setTimeout(function(){oldBlock.stop(true,true).css({opacity:0,display:'none',zIndex:0});},self._currAnimSpeed+60));}}}else{if(self._isMove){self._currAnimSpeed=parseInt(self._currAnimSpeed,10);var td=self._vendorPref+self._TD;var ttf=self._vendorPref+self._TTF;animObj[td]=self._currAnimSpeed+'ms';animObj[ttf]=inOutEasing?$.rsCSS3Easing[self.st.easeInOut]:$.rsCSS3Easing[self.st.easeOut];self._slidesContainer.css(animObj);if(inOutEasing||!self.hasTouch){setTimeout(function(){self._setPosition(pos);},5);}else{self._setPosition(pos);}}else{self._currAnimSpeed=self.st.transitionSpeed;oldBlock=self._oldHolder;animBlock=self._currHolder;if(animBlock.data('rsTimeout')){animBlock.css('opacity',0);}
clearTimeouts();if(oldBlock){oldBlock.data('rsTimeout',setTimeout(function(){animObj[self._vendorPref+self._TD]='0ms';animObj.zIndex=0;animObj.display='none';oldBlock.data('rsTimeout','');oldBlock.css(animObj);setTimeout(function(){oldBlock.css('opacity',0);},16);},self._currAnimSpeed+60));}
animObj.display='block';animObj.zIndex=self._fadeZIndex;animObj.opacity=0;animObj[self._vendorPref+self._TD]='0ms';animObj[self._vendorPref+self._TTF]=$.rsCSS3Easing[self.st.easeInOut];animBlock.css(animObj);animBlock.data('rsTimeout',setTimeout(function(){animBlock.css(self._vendorPref+self._TD,self._currAnimSpeed+'ms');animBlock.data('rsTimeout',setTimeout(function(){animBlock.css('opacity',1);animBlock.data('rsTimeout','');},20));},20));}}
self._isAnimating=true;if(self.loadingTimeout){clearTimeout(self.loadingTimeout);}
if(customComplete){self.loadingTimeout=setTimeout(function(){self.loadingTimeout=null;customComplete.call();},self._currAnimSpeed+60);}else{self.loadingTimeout=setTimeout(function(){self.loadingTimeout=null;self._animationComplete(dir);},self._currAnimSpeed+60);}
function clearTimeouts(){var t;if(oldBlock){t=oldBlock.data('rsTimeout');if(t){if(oldBlock!==animBlock){oldBlock.css({opacity:0,display:'none',zIndex:0});}
clearTimeout(t);oldBlock.data('rsTimeout','');}}
t=animBlock.data('rsTimeout');if(t){clearTimeout(t);animBlock.data('rsTimeout','');}}},_stopAnimation:function(noCSS3){var self=this;self._isAnimating=false;clearTimeout(self.loadingTimeout);if(self._isMove){if(!self._useCSS3Transitions){self._slidesContainer.stop(true);self._sPosition=parseInt(self._slidesContainer.css(self._slidesHorizontal?self._xProp:self._yProp),10);}else if(!noCSS3){var oldPos=self._sPosition;var newPos=self._currRenderPosition=self._getTransformProp();self._slidesContainer.css((self._vendorPref+self._TD),'0ms');if(oldPos!==newPos){self._setPosition(newPos);}}}else{if(self._fadeZIndex>20){self._fadeZIndex=10;}else{self._fadeZIndex++;}}},_getTransformProp:function(){var self=this,transform=window.getComputedStyle(self._slidesContainer.get(0),null).getPropertyValue(self._vendorPref+'transform'),explodedMatrix=transform.replace(/^matrix\(/i,'').split(/, |\)$/g),isMatrix3d=(explodedMatrix[0].indexOf('matrix3d')===0);return parseInt(explodedMatrix[(self._slidesHorizontal?(isMatrix3d?12:4):(isMatrix3d?13:5))],10);},_getCSS3Prop:function(pos,hor){var self=this;return self._useCSS3Transitions?self._tPref1+(hor?(pos+self._tPref2+0):(0+self._tPref2+pos))+self._tPref3:pos;},_animationComplete:function(dir){var self=this;if(!self._isMove){self._currHolder.css('z-index',0);self._fadeZIndex=10;}
self._isAnimating=false;self.staticSlideId=self.currSlideId;self._updateBlocksContent();self._slidesMoved=false;self.ev.trigger('rsAfterSlideChange');},_doBackAndForthAnim:function(type,userAction){var self=this,newPos=(-self._realId-self._idOffset)*self._slideSize;if(self.numSlides===0||self._isAnimating){return;}
if(self.st.loopRewind){self.goTo(type==='left'?self.numSlides-1:0,userAction);return;}
if(self._isMove){self._currAnimSpeed=200;var allAnimComplete=function(){self._isAnimating=false;};var firstAnimComplete=function(){self._isAnimating=false;self._animateTo(newPos,'',false,true,allAnimComplete);};self._animateTo(newPos+(type==='left'?30:-30),'',false,true,firstAnimComplete);}},_resizeImage:function(slideObject,useClone){var isRoot=true;if(slideObject.isRendered){return;}
var img=slideObject.content;var classToFind='rsMainSlideImage';var isVideo;var self=this,imgAlignCenter=$.isFunction(self.st.imageAlignCenter)?self.st.imageAlignCenter(slideObject):self.st.imageAlignCenter,imgScaleMode=$.isFunction(self.st.imageScaleMode)?self.st.imageScaleMode(slideObject):self.st.imageScaleMode,tempEl,bMargin;if(slideObject.videoURL){classToFind='rsVideoContainer';if(imgScaleMode!=='fill'){isVideo=true;}else{tempEl=img;if(!tempEl.hasClass(classToFind)){tempEl=tempEl.find('.'+classToFind);}
tempEl.css({width:'100%',height:'100%'});classToFind='rsMainSlideImage';}}
if(!img.hasClass(classToFind)){isRoot=false;img=img.find('.'+classToFind);}
if(!img){return;}
var baseImageWidth=slideObject.iW,baseImageHeight=slideObject.iH;slideObject.isRendered=true;if(imgScaleMode==='none'&&!imgAlignCenter){return;}
if(imgScaleMode!=='fill'){bMargin=self._imagePadding;}else{bMargin=0;}
var containerWidth=self._wrapWidth-bMargin*2,containerHeight=self._wrapHeight-bMargin*2,hRatio,vRatio,ratio,nWidth,nHeight,cssObj={};if(imgScaleMode==='fit-if-smaller'){if(baseImageWidth>containerWidth||baseImageHeight>containerHeight){imgScaleMode='fit';}}
if(imgScaleMode==='fill'||imgScaleMode==='fit'){hRatio=containerWidth/baseImageWidth;vRatio=containerHeight/baseImageHeight;if(imgScaleMode=="fill"){ratio=hRatio>vRatio?hRatio:vRatio;}else if(imgScaleMode=="fit"){ratio=hRatio0){for(i=0;i0){var cItemTemp;for(i=0;i0){moveEffect=item.data('move-effect');if(moveEffect){moveEffect=moveEffect.toLowerCase();if(moveEffect==='none'){moveEffect=false;}else if(moveEffect!=='left'&&moveEffect!=='top'&&moveEffect!=='bottom'&&moveEffect!=='right'){moveEffect=self.st.block.moveEffect;if(moveEffect==='none'){moveEffect=false;}}}else{moveEffect=self.st.block.moveEffect;}
if(moveEffect&&moveEffect!=='none'){var moveHorizontal;if(moveEffect==='right'||moveEffect==='left'){moveHorizontal=true;}else{moveHorizontal=false;}
var currPos,startPos;isOppositeProp=false;if(self._useCSS3Transitions){currPos=0;moveProp=self._xProp;}else{if(moveHorizontal){if(!isNaN(parseInt(item.css('right'),10))){moveProp='right';isOppositeProp=true;}else{moveProp='left';}}else{if(!isNaN(parseInt(item.css('bottom'),10))){moveProp='bottom';isOppositeProp=true;}else{moveProp='top';}}
moveProp='margin-'+moveProp;if(isOppositeProp){moveOffset=-moveOffset;}
if(!self._useCSS3Transitions){currPos=item.data('rs-start-move-prop');if(currPos===undefined){currPos=parseInt(item.css(moveProp),10);item.data('rs-start-move-prop',currPos);}}else{currPos=parseInt(item.css(moveProp),10);}}
if(moveEffect==='top'||moveEffect==='left'){startPos=currPos-moveOffset;}else{startPos=currPos+moveOffset;}
newPropObj[moveProp]=self._getCSS3Prop(startPos,moveHorizontal);animObj[moveProp]=self._getCSS3Prop(currPos,moveHorizontal);}}
var fadeEffect=item.attr('data-fade-effect');if(!fadeEffect){fadeEffect=self.st.block.fadeEffect;}else if(fadeEffect.toLowerCase()==='none'||fadeEffect.toLowerCase()==='false'){fadeEffect=false;}
if(fadeEffect){newPropObj.opacity=0;animObj.opacity=1;}
if(fadeEffect||moveEffect){transitionData={};transitionData.hasFade=Boolean(fadeEffect);if(Boolean(moveEffect)){transitionData.moveProp=moveProp;transitionData.hasMove=true;}
transitionData.speed=item.data('speed');if(isNaN(transitionData.speed)){transitionData.speed=self.st.block.speed;}
transitionData.easing=item.data('easing');if(!transitionData.easing){transitionData.easing=self.st.block.easing;}
transitionData.css3Easing=$.rsCSS3Easing[transitionData.easing];transitionData.delay=item.data('delay');if(isNaN(transitionData.delay)){transitionData.delay=self.st.block.delay*index;}}
var blockPropsObj={};if(self._useCSS3Transitions){blockPropsObj[(self._vendorPref+self._TD)]='0ms';}
blockPropsObj.moveProp=animObj.moveProp;blockPropsObj.opacity=animObj.opacity;blockPropsObj.display='none';self._blockAnimProps.push({block:item,css:blockPropsObj});self._updateAnimBlockProps(item,newPropObj);self._animatedBlockTimeouts.push(setTimeout((function(cItem,animateData,transitionData,index){return function(){cItem.css('display','block');if(transitionData){var animObj={};if(!self._useCSS3Transitions){setTimeout(function(){cItem.animate(animateData,transitionData.speed,transitionData.easing);},16);}else{var prop='';if(transitionData.hasMove){prop+=transitionData.moveProp;}
if(transitionData.hasFade){if(transitionData.hasMove){prop+=', ';}
prop+='opacity';}
animObj[(self._vendorPref+self._TP)]=prop;animObj[(self._vendorPref+self._TD)]=transitionData.speed+'ms';animObj[(self._vendorPref+self._TTF)]=transitionData.css3Easing;cItem.css(animObj);setTimeout(function(){cItem.css(animateData);},24);}}
delete self._animatedBlockTimeouts[index];};})(item,animObj,transitionData,index),transitionData.delay<=6?12:transitionData.delay));});}});$.rsModules.animatedBlocks=$.rsProto._initAnimatedBlocks;})(jQuery);(function($){"use strict";$.extend($.rsProto,{_initAutoHeight:function(){var self=this;if(self.st.autoHeight){var holder,tH,currSlide,currHeight,updHeight=function(animate){currSlide=self.slides[self.currSlideId];holder=currSlide.holder;if(holder){tH=holder.height();if(tH&&tH!==currHeight){self._wrapHeight=tH;if(self._useCSS3Transitions||!animate){self._sliderOverflow.css('height',tH);}else{self._sliderOverflow.stop(true,true).animate({height:tH},self.st.transitionSpeed);}}}};self.ev.on('rsMaybeSizeReady.rsAutoHeight',function(e,slideObject){if(currSlide===slideObject){updHeight();}});self.ev.on('rsAfterContentSet.rsAutoHeight',function(e,slideObject){if(currSlide===slideObject){updHeight();}});self.slider.addClass('rsAutoHeight');self.ev.one('rsAfterInit',function(){setTimeout(function(){updHeight(false);setTimeout(function(){self.slider.append('');if(self._useCSS3Transitions){self._sliderOverflow.css(self._vendorPref+'transition','height '+self.st.transitionSpeed+'ms ease-in-out');}},16);},16);});self.ev.on('rsBeforeAnimStart',function(){updHeight(true);});self.ev.on('rsBeforeSizeSet',function(){setTimeout(function(){updHeight(false);},16);});}}});$.rsModules.autoHeight=$.rsProto._initAutoHeight;})(jQuery);(function($){"use strict";$.extend($.rsProto,{_initAutoplay:function(){var self=this,del;self._autoPlayDefaults={enabled:false,stopAtAction:true,pauseOnHover:true,delay:2000};if(!self.st.autoPlay&&self.st.autoplay){self.st.autoPlay=self.st.autoplay;}
self.st.autoPlay=$.extend({},self._autoPlayDefaults,self.st.autoPlay);if(self.st.autoPlay.enabled){self.ev.on('rsBeforeParseNode',function(e,content,obj){content=$(content);del=content.attr('data-rsDelay');if(del){obj.customDelay=parseInt(del,10);}});self.ev.one('rsAfterInit',function(){self._setupAutoPlay();});self.ev.on('rsBeforeDestroy',function(){self.stopAutoPlay();self.slider.off('mouseenter mouseleave');$(window).off('blur'+self.ns+' focus'+self.ns);});}},_setupAutoPlay:function(){var self=this;self.startAutoPlay();self.ev.on('rsAfterContentSet',function(e,slideObject){if(!self._isDragging&&!self._isAnimating&&self._autoPlayEnabled&&slideObject===self.currSlide){self._play();}});self.ev.on('rsDragRelease',function(){if(self._autoPlayEnabled&&self._autoPlayPaused){self._autoPlayPaused=false;self._play();}});self.ev.on('rsAfterSlideChange',function(){if(self._autoPlayEnabled){if(self._autoPlayPaused){self._autoPlayPaused=false;if(self.currSlide.isLoaded){self._play();}}}});self.ev.on('rsDragStart',function(){if(self._autoPlayEnabled){if(self.st.autoPlay.stopAtAction){self.stopAutoPlay();}else{self._autoPlayPaused=true;self._pause();}}});self.ev.on('rsBeforeMove',function(e,type,userAction){if(self._autoPlayEnabled){if(userAction&&self.st.autoPlay.stopAtAction){self.stopAutoPlay();}else{self._autoPlayPaused=true;self._pause();}}});self._pausedByVideo=false;self.ev.on('rsVideoStop',function(){if(self._autoPlayEnabled){self._pausedByVideo=false;self._play();}});self.ev.on('rsVideoPlay',function(){if(self._autoPlayEnabled){self._autoPlayPaused=false;self._pause();self._pausedByVideo=true;}});$(window).on('blur'+self.ns,function(){if(self._autoPlayEnabled){self._autoPlayPaused=true;self._pause();}}).on('focus'+self.ns,function(){if(self._autoPlayEnabled&&self._autoPlayPaused){self._autoPlayPaused=false;self._play();}});if(self.st.autoPlay.pauseOnHover){self._pausedByHover=false;self.slider.hover(function(){if(self._autoPlayEnabled){self._autoPlayPaused=false;self._pause();self._pausedByHover=true;}},function(){if(self._autoPlayEnabled){self._pausedByHover=false;self._play();}});}},toggleAutoPlay:function(){var self=this;if(self._autoPlayEnabled){self.stopAutoPlay();}else{self.startAutoPlay();}},startAutoPlay:function(){var self=this;self._autoPlayEnabled=true;if(self.currSlide.isLoaded){self._play();}},stopAutoPlay:function(){var self=this;self._pausedByVideo=self._pausedByHover=self._autoPlayPaused=self._autoPlayEnabled=false;self._pause();},_play:function(){var self=this;if(!self._pausedByHover&&!self._pausedByVideo){self._autoPlayRunning=true;if(self._autoPlayTimeout){clearTimeout(self._autoPlayTimeout);}
self._autoPlayTimeout=setTimeout(function(){var changed;if(!self._loop&&!self.st.loopRewind){changed=true;self.st.loopRewind=true;}
self.next(true);if(changed){changed=false;self.st.loopRewind=false;}},!self.currSlide.customDelay?self.st.autoPlay.delay:self.currSlide.customDelay);}},_pause:function(){var self=this;if(!self._pausedByHover&&!self._pausedByVideo){self._autoPlayRunning=false;if(self._autoPlayTimeout){clearTimeout(self._autoPlayTimeout);self._autoPlayTimeout=null;}}}});$.rsModules.autoplay=$.rsProto._initAutoplay;})(jQuery);(function($){"use strict";$.extend($.rsProto,{_initBullets:function(){var self=this;if(self.st.controlNavigation==='bullets'){var itemHTML='
';self.ev.one('rsAfterPropsSetup',function(){self._controlNavEnabled=true;self.slider.addClass('rsWithBullets');var out='';for(var i=0;i
');self._controlNavItems=out.appendTo(self.slider).children();self._controlNav.on('click.rs','.rsNavItem',function(e){if(!self._thumbsDrag){self.goTo($(this).index());}});});self.ev.on('rsOnAppendSlide',function(e,parsedSlide,index){if(index>=self.numSlides){self._controlNav.append(itemHTML);}else{self._controlNavItems.eq(index).before(itemHTML);}
self._controlNavItems=self._controlNav.children();});self.ev.on('rsOnRemoveSlide',function(e,index){var itemToRemove=self._controlNavItems.eq(index);if(itemToRemove&&itemToRemove.length){itemToRemove.remove();self._controlNavItems=self._controlNav.children();}});self.ev.on('rsOnUpdateNav',function(){var id=self.currSlideId,currItem,prevItem;if(self._prevNavItem){self._prevNavItem.removeClass('rsNavSelected');}
currItem=self._controlNavItems.eq(id);currItem.addClass('rsNavSelected');self._prevNavItem=currItem;});}}});$.rsModules.bullets=$.rsProto._initBullets;})(jQuery);(function($){"use strict";$.extend($.rsProto,{_initDeeplinking:function(){var self=this,isBlocked,hashTimeout,hashChangeTimeout;self._hashDefaults={enabled:false,change:false,prefix:''};self.st.deeplinking=$.extend({},self._hashDefaults,self.st.deeplinking);if(self.st.deeplinking.enabled){var hashChange=self.st.deeplinking.change,prefix='#'+self.st.deeplinking.prefix,getSlideIdByHash=function(){var hash=window.location.hash;if(hash){hash=parseInt(hash.substring(prefix.length),10);if(hash>=0){return hash-1;}}
return-1;};var id=getSlideIdByHash();if(id!==-1){self.st.startSlideId=id;}
if(hashChange){$(window).on('hashchange'+self.ns,function(e){if(!isBlocked){var id=getSlideIdByHash();if(id<0){return;}
if(id>self.numSlides-1)
id=self.numSlides-1;self.goTo(id);}});self.ev.on('rsBeforeAnimStart',function(){if(hashTimeout){clearTimeout(hashTimeout);}
if(hashChangeTimeout){clearTimeout(hashChangeTimeout);}});self.ev.on('rsAfterSlideChange',function(){if(hashTimeout){clearTimeout(hashTimeout);}
if(hashChangeTimeout){clearTimeout(hashChangeTimeout);}
hashChangeTimeout=setTimeout(function(){isBlocked=true;window.location.replace((''+window.location).split('#')[0]+prefix+(self.currSlideId+1));hashTimeout=setTimeout(function(){isBlocked=false;hashTimeout=null;},60);},400);});}
self.ev.on('rsBeforeDestroy',function(){hashChangeTimeout=null;hashTimeout=null;if(hashChange){$(window).off('hashchange'+self.ns);}});}}});$.rsModules.deeplinking=$.rsProto._initDeeplinking;})(jQuery);
/*!
* jQuery hashchange event - v1.3 - 7/21/2010
* http://benalman.com/projects/jquery-hashchange-plugin/
*
* Copyright (c) 2010 "Cowboy" Ben Alman
* Dual licensed under the MIT and GPL licenses.
* http://benalman.com/about/license/
*/
(function($,window,undefined){'$:nomunge';var str_hashchange='hashchange',doc=document,fake_onhashchange,special=$.event.special,doc_mode=doc.documentMode,supports_onhashchange='on'+str_hashchange in window&&(doc_mode===undefined||doc_mode>7);function get_fragment(url){url=url||location.href;return'#'+url.replace(/^[^#]*#?(.*)$/,'$1');};$.fn[str_hashchange]=function(fn){return fn?this.bind(str_hashchange,fn):this.trigger(str_hashchange);};$.fn[str_hashchange].delay=50;special[str_hashchange]=$.extend(special[str_hashchange],{setup:function(){if(supports_onhashchange){return false;}
$(fake_onhashchange.start);},teardown:function(){if(supports_onhashchange){return false;}
$(fake_onhashchange.stop);}});fake_onhashchange=(function(){var self={},timeout_id,last_hash=get_fragment(),fn_retval=function(val){return val;},history_set=fn_retval,history_get=fn_retval;self.start=function(){timeout_id||poll();};self.stop=function(){timeout_id&&clearTimeout(timeout_id);timeout_id=undefined;};function poll(){var hash=get_fragment(),history_hash=history_get(last_hash);if(hash!==last_hash){history_set(last_hash=hash,history_hash);$(window).trigger(str_hashchange);}else if(history_hash!==last_hash){location.href=location.href.replace(/#.*/,'')+history_hash;}
timeout_id=setTimeout(poll,$.fn[str_hashchange].delay);};window.attachEvent&&!window.addEventListener&&!supports_onhashchange&&(function(){var iframe,iframe_src;self.start=function(){if(!iframe){iframe_src=$.fn[str_hashchange].src;iframe_src=iframe_src&&iframe_src+get_fragment();iframe=$('').hide().one('load',function(){iframe_src||history_set(get_fragment());poll();}).attr('src',iframe_src||'javascript:0').insertAfter('body')[0].contentWindow;doc.onpropertychange=function(){try{if(event.propertyName==='title'){iframe.document.title=doc.title;}}catch(e){}};}};self.stop=fn_retval;history_get=function(){return get_fragment(iframe.location.href);};history_set=function(hash,history_hash){var iframe_doc=iframe.document,domain=$.fn[str_hashchange].domain;if(hash!==history_hash){iframe_doc.title=doc.title;iframe_doc.open();domain&&iframe_doc.write('');iframe_doc.close();iframe.location.hash=hash;}};})();return self;})();})(jQuery,this);(function($){"use strict";$.extend($.rsProto,{_initFullscreen:function(){var self=this;self._fullscreenDefaults={enabled:false,keyboardNav:true,buttonFS:true,nativeFS:false,doubleTap:true};self.st.fullscreen=$.extend({},self._fullscreenDefaults,self.st.fullscreen);if(self.st.fullscreen.enabled){self.ev.one('rsBeforeSizeSet',function(){self._setupFullscreen();});}},_setupFullscreen:function(){var self=this;self._fsKeyboard=(!self.st.keyboardNavEnabled&&self.st.fullscreen.keyboardNav);if(self.st.fullscreen.nativeFS){self._fullScreenApi={supportsFullScreen:false,isFullScreen:function(){return false;},requestFullScreen:function(){},cancelFullScreen:function(){},fullScreenEventName:'',prefix:''};var browserPrefixes='webkit moz o ms khtml'.split(' ');if(!self.isAndroid){if(typeof document.cancelFullScreen!='undefined'){self._fullScreenApi.supportsFullScreen=true;}else{for(var i=0;i ').appendTo(self._controlsContainer).on('click.rs',function(){if(self.isFullscreen){self.exitFullscreen();}else{self.enterFullscreen();}});}},enterFullscreen:function(preventNative){var self=this;if(self._fullScreenApi){if(!preventNative){self._doc.on(self._fullScreenApi.fullScreenEventName,function(e){if(!self._fullScreenApi.isFullScreen()){self.exitFullscreen(true);}else{self.enterFullscreen(true);}});self._fullScreenApi.requestFullScreen($('html')[0]);return;}else{self._fullScreenApi.requestFullScreen($('html')[0]);}}
if(self._isFullscreenUpdating){return;}
self._isFullscreenUpdating=true;self._doc.on('keyup'+self.ns+'fullscreen',function(e){if(e.keyCode===27){self.exitFullscreen();}});if(self._fsKeyboard){self._bindKeyboardNav();}
var win=$(window);self._fsScrollTopOnEnter=win.scrollTop();self._fsScrollLeftOnEnter=win.scrollLeft();self._htmlStyle=$('html').attr('style');self._bodyStyle=$('body').attr('style');self._sliderStyle=self.slider.attr('style');$('body, html').css({overflow:'hidden',height:'100%',width:'100%',margin:'0',padding:'0'});self.slider.addClass('rsFullscreen');var item,i;for(i=0;i':'';if(item.content.hasClass('rsImg')){item.content=$(newHTML);}else{item.content.find('.rsImg').eq(0).replaceWith(newHTML);}
if(!item.isLoaded&&!item.isLoading&&item.holder){item.holder.html(item.content);}}});$.rsModules.fullscreen=$.rsProto._initFullscreen;})(jQuery);(function($){"use strict";$.extend($.rsProto,{_initGlobalCaption:function(){var self=this;if(self.st.globalCaption){var setCurrCaptionHTML=function(){self.globalCaption.html(self.currSlide.caption);};self.ev.on('rsAfterInit',function(){self.globalCaption=$('').appendTo(!self.st.globalCaptionInside?self.slider:self._sliderOverflow);setCurrCaptionHTML();});self.ev.on('rsBeforeAnimStart',function(){setCurrCaptionHTML();});}}});$.rsModules.globalCaption=$.rsProto._initGlobalCaption;})(jQuery);(function($){"use strict";$.extend($.rsProto,{_initAutoHideControlNav:function(){var self=this;if(self.st.navAutoHide&&!self.hasTouch){self.ev.one('rsAfterInit',function(){if(self._controlNav){self._controlNav.addClass('rsHidden');var hoverEl=self.slider;hoverEl.one("mousemove.controlnav",function(){self._controlNav.removeClass('rsHidden');});hoverEl.hover(function(){self._controlNav.removeClass('rsHidden');},function(){self._controlNav.addClass('rsHidden');});}});}}});$.rsModules.autoHideNav=$.rsProto._initAutoHideControlNav;})(jQuery);(function($){"use strict";$.extend($.rsProto,{_initTabs:function(){var self=this;if(self.st.controlNavigation==='tabs'){self.ev.on('rsBeforeParseNode',function(e,content,obj){content=$(content);obj.thumbnail=content.find('.rsTmb').remove();if(!obj.thumbnail.length){obj.thumbnail=content.attr('data-rsTmb');if(!obj.thumbnail){obj.thumbnail=content.find('.rsImg').attr('data-rsTmb');}
if(!obj.thumbnail){obj.thumbnail='';}else{obj.thumbnail='';}}else{obj.thumbnail=$(document.createElement('div')).append(obj.thumbnail).html();}});self.ev.one('rsAfterPropsSetup',function(){self._createTabs();});self.ev.on('rsOnAppendSlide',function(e,parsedSlide,index){if(index>=self.numSlides){self._controlNav.append(''+parsedSlide.thumbnail+'
');}else{self._controlNavItems.eq(index).before(''+item.thumbnail+'
');}
self._controlNavItems=self._controlNav.children();});self.ev.on('rsOnRemoveSlide',function(e,index){var itemToRemove=self._controlNavItems.eq(index);if(itemToRemove){itemToRemove.remove();self._controlNavItems=self._controlNav.children();}});self.ev.on('rsOnUpdateNav',function(){var id=self.currSlideId,currItem,prevItem;if(self._prevNavItem){self._prevNavItem.removeClass('rsNavSelected');}
currItem=self._controlNavItems.eq(id);currItem.addClass('rsNavSelected');self._prevNavItem=currItem;});}},_createTabs:function(){var self=this,out='',item;self._controlNavEnabled=true;out+='';for(var i=0;i'+self.slides[i].thumbnail+'
';}
out+=' ';out=$(out);self._controlNav=out;self._controlNavItems=out.children('.rsNavItem');self.slider.append(out);self._controlNav.click(function(e){var item=$(e.target).closest('.rsNavItem');if(item.length){self.goTo(item.index());}});}});$.rsModules.tabs=$.rsProto._initTabs;})(jQuery);(function($){"use strict";$.extend($.rsProto,{_initThumbs:function(){var self=this;if(self.st.controlNavigation==='thumbnails'){self._thumbsDefaults={drag:true,touch:true,orientation:'horizontal',navigation:true,arrows:true,arrowLeft:null,arrowRight:null,spacing:4,arrowsAutoHide:false,appendSpan:false,transitionSpeed:600,autoCenter:true,fitInViewport:true,firstMargin:true,paddingTop:0,paddingBottom:0};self.st.thumbs=$.extend({},self._thumbsDefaults,self.st.thumbs);self._firstThumbMoved=true;if(self.st.thumbs.firstMargin===false){self.st.thumbs.firstMargin=0;}
else if(self.st.thumbs.firstMargin===true){self.st.thumbs.firstMargin=self.st.thumbs.spacing;}
self.ev.on('rsBeforeParseNode',function(e,content,obj){content=$(content);obj.thumbnail=content.find('.rsTmb').remove();if(!obj.thumbnail.length){obj.thumbnail=content.attr('data-rsTmb');if(!obj.thumbnail){obj.thumbnail=content.find('.rsImg').attr('data-rsTmb');}
if(!obj.thumbnail){obj.thumbnail='';}else{obj.thumbnail='';}}else{obj.thumbnail=$(document.createElement('div')).append(obj.thumbnail).html();}});self.ev.one('rsAfterPropsSetup',function(){self._createThumbs();});self._prevNavItem=null;self.ev.on('rsOnUpdateNav',function(){var currItem=$(self._controlNavItems[self.currSlideId]);if(currItem===self._prevNavItem){return;}
if(self._prevNavItem){self._prevNavItem.removeClass('rsNavSelected');self._prevNavItem=null;}
if(self._thumbsNavigation){self._setCurrentThumb(self.currSlideId);}
self._prevNavItem=currItem.addClass('rsNavSelected');});self.ev.on('rsOnAppendSlide',function(e,parsedSlide,index){var html=''+self._addThumbHTML+parsedSlide.thumbnail+'
';if(index>=self.numSlides){self._thumbsContainer.append(html);}else{self._controlNavItems.eq(index).before(html);}
self._controlNavItems=self._thumbsContainer.children();self.updateThumbsSize();});self.ev.on('rsOnRemoveSlide',function(e,index){var itemToRemove=self._controlNavItems.eq(index);if(itemToRemove){itemToRemove.remove();self._controlNavItems=self._thumbsContainer.children();self.updateThumbsSize();}});}},_createThumbs:function(){var self=this,tText='rsThumbs',thumbSt=self.st.thumbs,out='',style,item,spacing=thumbSt.spacing;self._controlNavEnabled=true;self._thumbsHorizontal=(thumbSt.orientation==='vertical')?false:true;self._thumbsMargin=style=spacing?' style="margin-'+(self._thumbsHorizontal?'right':'bottom')+':'+spacing+'px;"':'';self._thumbsPosition=0;self._isThumbsAnimating=false;self._thumbsDrag=false;self._thumbsNavigation=false;self._thumbsArrows=(thumbSt.arrows&&thumbSt.navigation);var pl=(self._thumbsHorizontal?'Hor':'Ver');self.slider.addClass('rsWithThumbs'+' rsWithThumbs'+pl);out+='';self._addThumbHTML=thumbSt.appendSpan?'':'';for(var i=0;i'+item.thumbnail+self._addThumbHTML+'
';}
out=$(out+'
');var o={};if(thumbSt.paddingTop){o[self._thumbsHorizontal?'paddingTop':'paddingLeft']=thumbSt.paddingTop;}
if(thumbSt.paddingBottom){o[self._thumbsHorizontal?'paddingBottom':'paddingRight']=thumbSt.paddingBottom;}
out.css(o);self._thumbsContainer=$(out).find('.'+tText+'Container');if(self._thumbsArrows){tText+='Arrow';if(thumbSt.arrowLeft){self._thumbsArrowLeft=thumbSt.arrowLeft;}else{self._thumbsArrowLeft=$('