/*! jquery v1.8.3 jquery.com | jquery.org/license */ (function(e,t){function _(e){var t=m[e]={};return v.each(e.split(y),function(e,n){t[n]=!0}),t}function h(e,n,r){if(r===t&&e.nodetype===1){var i="data-"+n.replace(p,"-$1").tolowercase();r=e.getattribute(i);if(typeof r=="string"){try{r=r==="true"?!0:r==="false"?!1:r==="null"?null:+r+""===r?+r:d.test(r)?v.parsejson(r):r}catch(s){}v.data(e,n,r)}else r=t}return r}function b(e){var t;for(t in e){if(t==="data"&&v.isemptyobject(e[t]))continue;if(t!=="tojson")return!1}return!0}function et(){return!1}function tt(){return!0}function ut(e){return!e||!e.parentnode||e.parentnode.nodetype===11}function at(e,t){do e=e[t];while(e&&e.nodetype!==1);return e}function ft(e,t,n){t=t||0;if(v.isfunction(t))return v.grep(e,function(e,r){var i=!!t.call(e,r,e);return i===n});if(t.nodetype)return v.grep(e,function(e,r){return e===t===n});if(typeof t=="string"){var r=v.grep(e,function(e){return e.nodetype===1});if(it.test(t))return v.filter(t,r,!n);t=v.filter(t,r)}return v.grep(e,function(e,r){return v.inarray(e,t)>=0===n})}function lt(e){var t=ct.split("|"),n=e.createdocumentfragment();if(n.createelement)while(t.length)n.createelement(t.pop());return n}function lt(e,t){return e.getelementsbytagname(t)[0]||e.appendchild(e.ownerdocument.createelement(t))}function at(e,t){if(t.nodetype!==1||!v.hasdata(e))return;var n,r,i,s=v._data(e),o=v._data(t,s),u=s.events;if(u){delete o.handle,o.events={};for(n in u)for(r=0,i=u[n].length;r").appendto(i.body),n=t.css("display");t.remove();if(n==="none"||n===""){pt=i.body.appendchild(pt||v.extend(i.createelement("iframe"),{frameborder:0,width:0,height:0}));if(!ht||!pt.createelement)ht=(pt.contentwindow||pt.contentdocument).document,ht.write(""),ht.close();t=ht.body.appendchild(ht.createelement(e)),n=dt(t,"display"),i.body.removechild(pt)}return wt[e]=n,n}function fn(e,t,n,r){var i;if(v.isarray(t))v.each(t,function(t,i){n||sn.test(e)?r(e,i):fn(e+"["+(typeof i=="object"?t:"")+"]",i,n,r)});else if(!n&&v.type(t)==="object")for(i in t)fn(e+"["+i+"]",t[i],n,r);else r(e,t)}function cn(e){return function(t,n){typeof t!="string"&&(n=t,t="*");var r,i,s,o=t.tolowercase().split(y),u=0,a=o.length;if(v.isfunction(n))for(;u)[^>]*$|#([\w\-]*)$)/,e=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,s=/^[\],:{}\s]*$/,x=/(?:^|:|,)(?:\s*\[)+/g,t=/\\(?:["\\\/bfnrt]|u[\da-fa-f]{4})/g,n=/"[^"\\\r\n]*"|true|false|null|-?(?:\d\d*\.|)\d+(?:[ee][\-+]?\d+|)/g,c=/^-ms-/,k=/-([\da-z])/gi,l=function(e,t){return(t+"").touppercase()},a=function(){i.addeventlistener?(i.removeeventlistener("domcontentloaded",a,!1),v.ready()):i.readystate==="complete"&&(i.detachevent("onreadystatechange",a),v.ready())},o={};v.fn=v.prototype={constructor:v,init:function(e,n,r){var s,o,u,a;if(!e)return this;if(e.nodetype)return this.context=this[0]=e,this.length=1,this;if(typeof e=="string"){e.charat(0)==="<"&&e.charat(e.length-1)===">"&&e.length>=3?s=[null,e,null]:s=w.exec(e);if(s&&(s[1]||!n)){if(s[1])return n=n instanceof v?n[0]:n,a=n&&n.nodetype?n.ownerdocument||n:i,e=v.parsehtml(s[1],a,!0),e.test(s[1])&&v.isplainobject(n)&&this.attr.call(e,n,!0),v.merge(this,e);o=i.getelementbyid(s[2]);if(o&&o.parentnode){if(o.id!==s[2])return r.find(e);this.length=1,this[0]=o}return this.context=i,this.selector=e,this}return!n||n.jquery?(n||r).find(e):this.constructor(n).find(e)}return v.isfunction(e)?r.ready(e):(e.selector!==t&&(this.selector=e.selector,this.context=e.context),v.makearray(e,this))},selector:"",jquery:"1.8.3",length:0,size:function(){return this.length},toarray:function(){return l.call(this)},get:function(e){return e==null?this.toarray():e<0?this[this.length+e]:this[e]},pushstack:function(e,t,n){var r=v.merge(this.constructor(),e);return r.prevobject=this,r.context=this.context,t==="find"?r.selector=this.selector+(this.selector?" ":"")+n:t&&(r.selector=this.selector+"."+t+"("+n+")"),r},each:function(e,t){return v.each(this,e,t)},ready:function(e){return v.ready.promise().done(e),this},eq:function(e){return e=+e,e===-1?this.slice(e):this.slice(e,e+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushstack(l.apply(this,arguments),"slice",l.call(arguments).join(","))},map:function(e){return this.pushstack(v.map(this,function(t,n){return e.call(t,n,t)}))},end:function(){return this.prevobject||this.constructor(null)},push:f,sort:[].sort,splice:[].splice},v.fn.init.prototype=v.fn,v.extend=v.fn.extend=function(){var e,n,r,i,s,o,u=arguments[0]||{},a=1,f=arguments.length,l=!1;typeof u=="boolean"&&(l=u,u=arguments[1]||{},a=2),typeof u!="object"&&!v.isfunction(u)&&(u={}),f===a&&(u=this,--a);for(;a0)return;r.resolvewith(i,[v]),v.fn.trigger&&v(i).trigger("ready").off("ready")},isfunction:function(e){return v.type(e)==="function"},isarray:array.isarray||function(e){return v.type(e)==="array"},iswindow:function(e){return e!=null&&e==e.window},isnumeric:function(e){return!isnan(parsefloat(e))&&isfinite(e)},type:function(e){return e==null?string(e):o[h.call(e)]||"object"},isplainobject:function(e){if(!e||v.type(e)!=="object"||e.nodetype||v.iswindow(e))return!1;try{if(e.constructor&&!p.call(e,"constructor")&&!p.call(e.constructor.prototype,"isprototypeof"))return!1}catch(n){return!1}var r;for(r in e);return r===t||p.call(e,r)},isemptyobject:function(e){var t;for(t in e)return!1;return!0},error:function(e){throw new error(e)},parsehtml:function(e,t,n){var r;return!e||typeof e!="string"?null:(typeof t=="boolean"&&(n=t,t=0),t=t||i,(r=e.exec(e))?[t.createelement(r[1])]:(r=v.buildfragment([e],t,n?null:[]),v.merge([],(r.cacheable?v.clone(r.fragment):r.fragment).childnodes)))},parsejson:function(t){if(!t||typeof t!="string")return null;t=v.trim(t);if(e.json&&e.json.parse)return e.json.parse(t);if(s.test(t.replace(t,"@").replace(n,"]").replace(x,"")))return(new function("return "+t))();v.error("invalid json: "+t)},parsexml:function(n){var r,i;if(!n||typeof n!="string")return null;try{e.domparser?(i=new domparser,r=i.parsefromstring(n,"text/xml")):(r=new activexobject("microsoft.xmldom"),r.async="false",r.loadxml(n))}catch(s){r=t}return(!r||!r.documentelement||r.getelementsbytagname("parsererror").length)&&v.error("invalid xml: "+n),r},noop:function(){},globaleval:function(t){t&&g.test(t)&&(e.execscript||function(t){e.eval.call(e,t)})(t)},camelcase:function(e){return e.replace(c,"ms-").replace(k,l)},nodename:function(e,t){return e.nodename&&e.nodename.tolowercase()===t.tolowercase()},each:function(e,n,r){var i,s=0,o=e.length,u=o===t||v.isfunction(e);if(r){if(u){for(i in e)if(n.apply(e[i],r)===!1)break}else for(;s0&&e[0]&&e[a-1]||a===0||v.isarray(e));if(f)for(;u-1)a.splice(n,1),i&&(n<=o&&o--,n<=u&&u--)}),this},has:function(e){return v.inarray(e,a)>-1},empty:function(){return a=[],this},disable:function(){return a=f=n=t,this},disabled:function(){return!a},lock:function(){return f=t,n||c.disable(),this},locked:function(){return!f},firewith:function(e,t){return t=t||[],t=[e,t.slice?t.slice():t],a&&(!r||f)&&(i?f.push(t):l(t)),this},fire:function(){return c.firewith(this,arguments),this},fired:function(){return!!r}};return c},v.extend({deferred:function(e){var t=[["resolve","done",v.callbacks("once memory"),"resolved"],["reject","fail",v.callbacks("once memory"),"rejected"],["notify","progress",v.callbacks("memory")]],n="pending",r={state:function(){return n},always:function(){return i.done(arguments).fail(arguments),this},then:function(){var e=arguments;return v.deferred(function(n){v.each(t,function(t,r){var s=r[0],o=e[t];i[r[1]](v.isfunction(o)?function(){var e=o.apply(this,arguments);e&&v.isfunction(e.promise)?e.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[s+"with"](this===i?n:this,[e])}:n[s])}),e=null}).promise()},promise:function(e){return e!=null?v.extend(e,r):r}},i={};return r.pipe=r.then,v.each(t,function(e,s){var o=s[2],u=s[3];r[s[1]]=o.add,u&&o.add(function(){n=u},t[e^1][2].disable,t[2][2].lock),i[s[0]]=o.fire,i[s[0]+"with"]=o.firewith}),r.promise(i),e&&e.call(i,i),i},when:function(e){var t=0,n=l.call(arguments),r=n.length,i=r!==1||e&&v.isfunction(e.promise)?r:0,s=i===1?e:v.deferred(),o=function(e,t,n){return function(r){t[e]=this,n[e]=arguments.length>1?l.call(arguments):r,n===u?s.notifywith(t,n):--i||s.resolvewith(t,n)}},u,a,f;if(r>1){u=new array(r),a=new array(r),f=new array(r);for(;t
a",n=p.getelementsbytagname("*"),r=p.getelementsbytagname("a")[0];if(!n||!r||!n.length)return{};s=i.createelement("select"),o=s.appendchild(i.createelement("option")),u=p.getelementsbytagname("input")[0],r.style.csstext="top:1px;float:left;opacity:.5",t={leadingwhitespace:p.firstchild.nodetype===3,tbody:!p.getelementsbytagname("tbody").length,htmlserialize:!!p.getelementsbytagname("link").length,style:/top/.test(r.getattribute("style")),hrefnormalized:r.getattribute("href")==="/a",opacity:/^0.5/.test(r.style.opacity),cssfloat:!!r.style.cssfloat,checkon:u.value==="on",optselected:o.selected,getsetattribute:p.classname!=="t",enctype:!!i.createelement("form").enctype,html5clone:i.createelement("nav").clonenode(!0).outerhtml!=="<:nav>",boxmodel:i.compatmode==="css1compat",submitbubbles:!0,changebubbles:!0,focusinbubbles:!1,deleteexpando:!0,nocloneevent:!0,inlineblockneedslayout:!1,shrinkwrapblocks:!1,reliablemarginright:!0,boxsizingreliable:!0,pixelposition:!1},u.checked=!0,t.noclonechecked=u.clonenode(!0).checked,s.disabled=!0,t.optdisabled=!o.disabled;try{delete p.test}catch(d){t.deleteexpando=!1}!p.addeventlistener&&p.attachevent&&p.fireevent&&(p.attachevent("onclick",h=function(){t.nocloneevent=!1}),p.clonenode(!0).fireevent("onclick"),p.detachevent("onclick",h)),u=i.createelement("input"),u.value="t",u.setattribute("type","radio"),t.radiovalue=u.value==="t",u.setattribute("checked","checked"),u.setattribute("name","t"),p.appendchild(u),a=i.createdocumentfragment(),a.appendchild(p.lastchild),t.checkclone=a.clonenode(!0).clonenode(!0).lastchild.checked,t.appendchecked=u.checked,a.removechild(u),a.appendchild(p);if(p.attachevent)for(l in{submit:!0,change:!0,focusin:!0})f="on"+l,c=f in p,c||(p.setattribute(f,"return;"),c=typeof p[f]=="function"),t[l+"bubbles"]=c;return v(function(){var n,r,s,o,u="padding:0;margin:0;border:0;display:block;overflow:hidden;",a=i.getelementsbytagname("body")[0];if(!a)return;n=i.createelement("div"),n.style.csstext="visibility:hidden;border:0;width:0;height:0;position:static;top:0;margin-top:1px",a.insertbefore(n,a.firstchild),r=i.createelement("div"),n.appendchild(r),r.innerhtml="
t
",s=r.getelementsbytagname("td"),s[0].style.csstext="padding:0;margin:0;border:0;display:none",c=s[0].offsetheight===0,s[0].style.display="",s[1].style.display="none",t.reliablehiddenoffsets=c&&s[0].offsetheight===0,r.innerhtml="",r.style.csstext="box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;",t.boxsizing=r.offsetwidth===4,t.doesnotincludemargininbodyoffset=a.offsettop!==1,e.getcomputedstyle&&(t.pixelposition=(e.getcomputedstyle(r,null)||{}).top!=="1%",t.boxsizingreliable=(e.getcomputedstyle(r,null)||{width:"4px"}).width==="4px",o=i.createelement("div"),o.style.csstext=r.style.csstext=u,o.style.marginright=o.style.width="0",r.style.width="1px",r.appendchild(o),t.reliablemarginright=!parsefloat((e.getcomputedstyle(o,null)||{}).marginright)),typeof r.style.zoom!="undefined"&&(r.innerhtml="",r.style.csstext=u+"width:1px;padding:1px;display:inline;zoom:1",t.inlineblockneedslayout=r.offsetwidth===3,r.style.display="block",r.style.overflow="visible",r.innerhtml="
",r.firstchild.style.width="5px",t.shrinkwrapblocks=r.offsetwidth!==3,n.style.zoom=1),a.removechild(n),n=r=s=o=null}),a.removechild(p),n=r=s=o=u=a=p=null,t}();var d=/(?:\{[\s\s]*\}|\[[\s\s]*\])$/,p=/([a-z])/g;v.extend({cache:{},deletedids:[],uuid:0,expando:"jquery"+(v.fn.jquery+math.random()).replace(/\d/g,""),nodata:{embed:!0,object:"clsid:d27cdb6e-ae6d-11cf-96b8-444553540000",applet:!0},hasdata:function(e){return e=e.nodetype?v.cache[e[v.expando]]:e[v.expando],!!e&&!b(e)},data:function(e,n,r,i){if(!v.acceptdata(e))return;var s,o,u=v.expando,a=typeof n=="string",f=e.nodetype,l=f?v.cache:e,c=f?e[u]:e[u]&&u;if((!c||!l[c]||!i&&!l[c].data)&&a&&r===t)return;c||(f?e[u]=c=v.deletedids.pop()||v.guid++:c=u),l[c]||(l[c]={},f||(l[c].tojson=v.noop));if(typeof n=="object"||typeof n=="function")i?l[c]=v.extend(l[c],n):l[c].data=v.extend(l[c].data,n);return s=l[c],i||(s.data||(s.data={}),s=s.data),r!==t&&(s[v.camelcase(n)]=r),a?(o=s[n],o==null&&(o=s[v.camelcase(n)])):o=s,o},removedata:function(e,t,n){if(!v.acceptdata(e))return;var r,i,s,o=e.nodetype,u=o?v.cache:e,a=o?e[v.expando]:v.expando;if(!u[a])return;if(t){r=n?u[a]:u[a].data;if(r){v.isarray(t)||(t in r?t=[t]:(t=v.camelcase(t),t in r?t=[t]:t=t.split(" ")));for(i=0,s=t.length;i1,null,!1))},removedata:function(e){return this.each(function(){v.removedata(this,e)})}}),v.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=v._data(e,t),n&&(!r||v.isarray(n)?r=v._data(e,t,v.makearray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=v.queue(e,t),r=n.length,i=n.shift(),s=v._queuehooks(e,t),o=function(){v.dequeue(e,t)};i==="inprogress"&&(i=n.shift(),r--),i&&(t==="fx"&&n.unshift("inprogress"),delete s.stop,i.call(e,o,s)),!r&&s&&s.empty.fire()},_queuehooks:function(e,t){var n=t+"queuehooks";return v._data(e,n)||v._data(e,n,{empty:v.callbacks("once memory").add(function(){v.removedata(e,t+"queue",!0),v.removedata(e,n,!0)})})}}),v.fn.extend({queue:function(e,n){var r=2;return typeof e!="string"&&(n=e,e="fx",r--),arguments.length1)},removeattr:function(e){return this.each(function(){v.removeattr(this,e)})},prop:function(e,t){return v.access(this,v.prop,e,t,arguments.length>1)},removeprop:function(e){return e=v.propfix[e]||e,this.each(function(){try{this[e]=t,delete this[e]}catch(n){}})},addclass:function(e){var t,n,r,i,s,o,u;if(v.isfunction(e))return this.each(function(t){v(this).addclass(e.call(this,t,this.classname))});if(e&&typeof e=="string"){t=e.split(y);for(n=0,r=this.length;n=0)r=r.replace(" "+n[s]+" "," ");i.classname=e?v.trim(r):""}}}return this},toggleclass:function(e,t){var n=typeof e,r=typeof t=="boolean";return v.isfunction(e)?this.each(function(n){v(this).toggleclass(e.call(this,n,this.classname,t),t)}):this.each(function(){if(n==="string"){var i,s=0,o=v(this),u=t,a=e.split(y);while(i=a[s++])u=r?u:!o.hasclass(i),o[u?"addclass":"removeclass"](i)}else if(n==="undefined"||n==="boolean")this.classname&&v._data(this,"__classname__",this.classname),this.classname=this.classname||e===!1?"":v._data(this,"__classname__")||""})},hasclass:function(e){var t=" "+e+" ",n=0,r=this.length;for(;n=0)return!0;return!1},val:function(e){var n,r,i,s=this[0];if(!arguments.length){if(s)return n=v.valhooks[s.type]||v.valhooks[s.nodename.tolowercase()],n&&"get"in n&&(r=n.get(s,"value"))!==t?r:(r=s.value,typeof r=="string"?r.replace(r,""):r==null?"":r);return}return i=v.isfunction(e),this.each(function(r){var s,o=v(this);if(this.nodetype!==1)return;i?s=e.call(this,r,o.val()):s=e,s==null?s="":typeof s=="number"?s+="":v.isarray(s)&&(s=v.map(s,function(e){return e==null?"":e+""})),n=v.valhooks[this.type]||v.valhooks[this.nodename.tolowercase()];if(!n||!("set"in n)||n.set(this,s,"value")===t)this.value=s})}}),v.extend({valhooks:{option:{get:function(e){var t=e.attributes.value;return!t||t.specified?e.value:e.text}},select:{get:function(e){var t,n,r=e.options,i=e.selectedindex,s=e.type==="select-one"||i<0,o=s?null:[],u=s?i+1:r.length,a=i<0?u:s?i:0;for(;a=0}),n.length||(e.selectedindex=-1),n}}},attrfn:{},attr:function(e,n,r,i){var s,o,u,a=e.nodetype;if(!e||a===3||a===8||a===2)return;if(i&&v.isfunction(v.fn[n]))return v(e)[n](r);if(typeof e.getattribute=="undefined")return v.prop(e,n,r);u=a!==1||!v.isxmldoc(e),u&&(n=n.tolowercase(),o=v.attrhooks[n]||(x.test(n)?f:j));if(r!==t){if(r===null){v.removeattr(e,n);return}return o&&"set"in o&&u&&(s=o.set(e,r,n))!==t?s:(e.setattribute(n,r+""),r)}return o&&"get"in o&&u&&(s=o.get(e,n))!==null?s:(s=e.getattribute(n),s===null?t:s)},removeattr:function(e,t){var n,r,i,s,o=0;if(t&&e.nodetype===1){r=t.split(y);for(;o=0}})});var $=/^(?:textarea|input|select)$/i,j=/^([^\.]*|)(?:\.(.+)|)$/,k=/(?:^|\s)hover(\.\s+|)\b/,q=/^key/,g=/^(?:mouse|contextmenu)|click/,y=/^(?:focusinfocus|focusoutblur)$/,z=function(e){return v.event.special.hover?e:e.replace(k,"mouseenter$1 mouseleave$1")};v.event={add:function(e,n,r,i,s){var o,u,a,f,l,c,h,p,d,m,g;if(e.nodetype===3||e.nodetype===8||!n||!r||!(o=v._data(e)))return;r.handler&&(d=r,r=d.handler,s=d.selector),r.guid||(r.guid=v.guid++),a=o.events,a||(o.events=a={}),u=o.handle,u||(o.handle=u=function(e){return typeof v=="undefined"||!!e&&v.event.triggered===e.type?t:v.event.dispatch.apply(u.elem,arguments)},u.elem=e),n=v.trim(z(n)).split(" ");for(f=0;f=0&&(y=y.slice(0,-1),a=!0),y.indexof(".")>=0&&(b=y.split("."),y=b.shift(),b.sort());if((!s||v.event.customevent[y])&&!v.event.global[y])return;n=typeof n=="object"?n[v.expando]?n:new v.event(y,n):new v.event(y),n.type=y,n.istrigger=!0,n.exclusive=a,n.namespace=b.join("."),n.namespace_re=n.namespace?new regexp("(^|\\.)"+b.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,h=y.indexof(":")<0?"on"+y:"";if(!s){u=v.cache;for(f in u)u[f].events&&u[f].events[y]&&v.event.trigger(n,r,u[f].handle.elem,!0);return}n.result=t,n.target||(n.target=s),r=r!=null?v.makearray(r):[],r.unshift(n),p=v.event.special[y]||{};if(p.trigger&&p.trigger.apply(s,r)===!1)return;m=[[s,p.bindtype||y]];if(!o&&!p.nobubble&&!v.iswindow(s)){g=p.delegatetype||y,l=y.test(g+y)?s:s.parentnode;for(c=s;l;l=l.parentnode)m.push([l,g]),c=l;c===(s.ownerdocument||i)&&m.push([c.defaultview||c.parentwindow||e,g])}for(f=0;f=0:v.find(h,this,null,[s]).length),u[h]&&f.push(c);f.length&&w.push({elem:s,matches:f})}d.length>m&&w.push({elem:this,matches:d.slice(m)});for(r=0;r0?this.on(t,null,e,n):this.trigger(t)},q.test(t)&&(v.event.fixhooks[t]=v.event.keyhooks),g.test(t)&&(v.event.fixhooks[t]=v.event.mousehooks)}),function(e,t){function nt(e,t,n,r){n=n||[],t=t||g;var i,s,a,f,l=t.nodetype;if(!e||typeof e!="string")return n;if(l!==1&&l!==9)return[];a=o(t);if(!a&&!r)if(i=r.exec(e))if(f=i[1]){if(l===9){s=t.getelementbyid(f);if(!s||!s.parentnode)return n;if(s.id===f)return n.push(s),n}else if(t.ownerdocument&&(s=t.ownerdocument.getelementbyid(f))&&u(t,s)&&s.id===f)return n.push(s),n}else{if(i[2])return s.apply(n,x.call(t.getelementsbytagname(e),0)),n;if((f=i[3])&&z&&t.getelementsbyclassname)return s.apply(n,x.call(t.getelementsbyclassname(f),0)),n}return vt(e.replace(j,"$1"),t,n,r,a)}function rt(e){return function(t){var n=t.nodename.tolowercase();return n==="input"&&t.type===e}}function it(e){return function(t){var n=t.nodename.tolowercase();return(n==="input"||n==="button")&&t.type===e}}function st(e){return n(function(t){return t=+t,n(function(n,r){var i,s=e([],n.length,t),o=s.length;while(o--)n[i=s[o]]&&(n[i]=!(r[i]=n[i]))})})}function ot(e,t,n){if(e===t)return n;var r=e.nextsibling;while(r){if(r===t)return-1;r=r.nextsibling}return 1}function ut(e,t){var n,r,s,o,u,a,f,l=l[d][e+" "];if(l)return t?0:l.slice(0);u=e,a=[],f=i.prefilter;while(u){if(!n||(r=f.exec(u)))r&&(u=u.slice(r[0].length)||u),a.push(s=[]);n=!1;if(r=i.exec(u))s.push(n=new m(r.shift())),u=u.slice(n.length),n.type=r[0].replace(j," ");for(o in i.filter)(r=j[o].exec(u))&&(!f[o]||(r=f[o](r)))&&(s.push(n=new m(r.shift())),u=u.slice(n.length),n.type=o,n.matches=r);if(!n)break}return t?u.length:u?nt.error(e):l(e,a).slice(0)}function at(e,t,r){var i=t.dir,s=r&&t.dir==="parentnode",o=w++;return t.first?function(t,n,r){while(t=t[i])if(s||t.nodetype===1)return e(t,n,r)}:function(t,r,u){if(!u){var a,f=b+" "+o+" ",l=f+n;while(t=t[i])if(s||t.nodetype===1){if((a=t[d])===l)return t.sizset;if(typeof a=="string"&&a.indexof(f)===0){if(t.sizset)return t}else{t[d]=l;if(e(t,r,u))return t.sizset=!0,t;t.sizset=!1}}}else while(t=t[i])if(s||t.nodetype===1)if(e(t,r,u))return t}}function ft(e){return e.length>1?function(t,n,r){var i=e.length;while(i--)if(!e[i](t,n,r))return!1;return!0}:e[0]}function lt(e,t,n,r,i){var s,o=[],u=0,a=e.length,f=t!=null;for(;u-1&&(s[f]=!(o[f]=c))}}else g=lt(g===o?g.splice(d,g.length):g),i?i(null,o,g,a):s.apply(o,g)})}function ht(e){var t,n,r,s=e.length,o=i.relative[e[0].type],u=o||i.relative[" "],a=o?1:0,f=at(function(e){return e===t},u,!0),l=at(function(e){return t.call(t,e)>-1},u,!0),h=[function(e,n,r){return!o&&(r||n!==c)||((t=n).nodetype?f(e,n,r):l(e,n,r))}];for(;a1&&ft(h),a>1&&e.slice(0,a-1).join("").replace(j,"$1"),n,a0,s=e.length>0,o=function(u,a,f,l,h){var p,d,v,m=[],y=0,w="0",x=u&&[],t=h!=null,n=c,c=u||s&&i.find.tag("*",h&&a.parentnode||a),k=b+=n==null?1:math.e;t&&(c=a!==g&&a,n=o.el);for(;(p=c[w])!=null;w++){if(s&&p){for(d=0;v=e[d];d++)if(v(p,a,f)){l.push(p);break}t&&(b=k,n=++o.el)}r&&((p=!v&&p)&&y--,u&&x.push(p))}y+=w;if(r&&w!==y){for(d=0;v=t[d];d++)v(x,m,a,f);if(u){if(y>0)while(w--)!x[w]&&!m[w]&&(m[w]=e.call(l));m=lt(m)}s.apply(l,m),t&&!u&&m.length>0&&y+t.length>1&&nt.uniquesort(l)}return t&&(b=k,c=n),x};return o.el=0,r?n(o):o}function dt(e,t,n){var r=0,i=t.length;for(;r2&&(f=u[0]).type==="id"&&t.nodetype===9&&!s&&i.relative[u[1].type]){t=i.find.id(f.matches[0].replace($,""),t,s)[0];if(!t)return n;e=e.slice(u.shift().length)}for(o=j.pos.test(e)?-1:u.length-1;o>=0;o--){f=u[o];if(i.relative[l=f.type])break;if(c=i.find[l])if(r=c(f.matches[0].replace($,""),z.test(u[0].type)&&t.parentnode||t,s)){u.splice(o,1),e=r.length&&u.join("");if(!e)return s.apply(n,x.call(r,0)),n;break}}}return a(e,h)(r,t,s,n,z.test(e)),n}function mt(){}var n,r,i,s,o,u,a,f,l,c,h=!0,p="undefined",d=("sizcache"+math.random()).replace(".",""),m=string,g=e.document,y=g.documentelement,b=0,w=0,e=[].pop,s=[].push,x=[].slice,t=[].indexof||function(e){var t=0,n=this.length;for(;ti.cachelength&&delete e[t.shift()],e[n+" "]=r},e)},k=c(),l=c(),a=c(),o="[\\x20\\t\\r\\n\\f]",m="(?:\\\\.|[-\\w]|[^\\x00-\\xa0])+",_=m.replace("w","w#"),d="([*^$|!~]?=)",p="\\["+o+"*("+m+")"+o+"*(?:"+d+o+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+_+")|)|)"+o+"*\\]",h=":("+m+")(?:\\((?:(['\"])((?:\\\\.|[^\\\\])*?)\\2|([^()[\\]]*|(?:(?:"+p+")|[^:]|\\\\.)*|.*))\\)|)",b=":(even|odd|eq|gt|lt|nth|first|last)(?:\\("+o+"*((?:-\\d)?\\d*)"+o+"*\\)|)(?=[^-]|$)",j=new regexp("^"+o+"+|((?:^|[^\\\\])(?:\\\\.)*)"+o+"+$","g"),f=new regexp("^"+o+"*,"+o+"*"),i=new regexp("^"+o+"*([\\x20\\t\\r\\n\\f>+~])"+o+"*"),q=new regexp(h),r=/^(?:#([\w\-]+)|(\w+)|\.([\w\-]+))$/,u=/^:not/,z=/[\x20\t\r\n\f]*[+~]/,w=/:not\($/,x=/h\d/i,v=/input|select|textarea|button/i,$=/\\(?!\\)/g,j={id:new regexp("^#("+m+")"),class:new regexp("^\\.("+m+")"),name:new regexp("^\\[name=['\"]?("+m+")['\"]?\\]"),tag:new regexp("^("+m.replace("w","w*")+")"),attr:new regexp("^"+p),pseudo:new regexp("^"+h),pos:new regexp(b,"i"),child:new regexp("^:(only|nth|first|last)-child(?:\\("+o+"*(even|odd|(([+-]|)(\\d*)n|)"+o+"*(?:([+-]|)"+o+"*(\\d+)|))"+o+"*\\)|)","i"),needscontext:new regexp("^"+o+"*[>+~]|"+b,"i")},k=function(e){var t=g.createelement("div");try{return e(t)}catch(n){return!1}finally{t=null}},q=k(function(e){return e.appendchild(g.createcomment("")),!e.getelementsbytagname("*").length}),g=k(function(e){return e.innerhtml="",e.firstchild&&typeof e.firstchild.getattribute!==p&&e.firstchild.getattribute("href")==="#"}),y=k(function(e){e.innerhtml="";var t=typeof e.lastchild.getattribute("multiple");return t!=="boolean"&&t!=="string"}),z=k(function(e){return e.innerhtml="",!e.getelementsbyclassname||!e.getelementsbyclassname("e").length?!1:(e.lastchild.classname="e",e.getelementsbyclassname("e").length===2)}),et=k(function(e){e.id=d+0,e.innerhtml="
",y.insertbefore(e,y.firstchild);var t=g.getelementsbyname&&g.getelementsbyname(d).length===2+g.getelementsbyname(d+0).length;return r=!g.getelementbyid(d),y.removechild(e),t});try{x.call(y.childnodes,0)[0].nodetype}catch(tt){x=function(e){var t,n=[];for(;t=this[e];e++)n.push(t);return n}}nt.matches=function(e,t){return nt(e,null,null,t)},nt.matchesselector=function(e,t){return nt(t,null,null,[e]).length>0},s=nt.gettext=function(e){var t,n="",r=0,i=e.nodetype;if(i){if(i===1||i===9||i===11){if(typeof e.textcontent=="string")return e.textcontent;for(e=e.firstchild;e;e=e.nextsibling)n+=s(e)}else if(i===3||i===4)return e.nodevalue}else for(;t=e[r];r++)n+=s(t);return n},o=nt.isxml=function(e){var t=e&&(e.ownerdocument||e).documentelement;return t?t.nodename!=="html":!1},u=nt.contains=y.contains?function(e,t){var n=e.nodetype===9?e.documentelement:e,r=t&&t.parentnode;return e===r||!!(r&&r.nodetype===1&&n.contains&&n.contains(r))}:y.comparedocumentposition?function(e,t){return t&&!!(e.comparedocumentposition(t)&16)}:function(e,t){while(t=t.parentnode)if(t===e)return!0;return!1},nt.attr=function(e,t){var n,r=o(e);return r||(t=t.tolowercase()),(n=i.attrhandle[t])?n(e):r||y?e.getattribute(t):(n=e.getattributenode(t),n?typeof e[t]=="boolean"?e[t]?t:null:n.specified?n.value:null:null)},i=nt.selectors={cachelength:50,createpseudo:n,match:j,attrhandle:g?{}:{href:function(e){return e.getattribute("href",2)},type:function(e){return e.getattribute("type")}},find:{id:r?function(e,t,n){if(typeof t.getelementbyid!==p&&!n){var r=t.getelementbyid(e);return r&&r.parentnode?[r]:[]}}:function(e,n,r){if(typeof n.getelementbyid!==p&&!r){var i=n.getelementbyid(e);return i?i.id===e||typeof i.getattributenode!==p&&i.getattributenode("id").value===e?[i]:t:[]}},tag:q?function(e,t){if(typeof t.getelementsbytagname!==p)return t.getelementsbytagname(e)}:function(e,t){var n=t.getelementsbytagname(e);if(e==="*"){var r,i=[],s=0;for(;r=n[s];s++)r.nodetype===1&&i.push(r);return i}return n},name:et&&function(e,t){if(typeof t.getelementsbyname!==p)return t.getelementsbyname(name)},class:z&&function(e,t,n){if(typeof t.getelementsbyclassname!==p&&!n)return t.getelementsbyclassname(e)}},relative:{">":{dir:"parentnode",first:!0}," ":{dir:"parentnode"},"+":{dir:"previoussibling",first:!0},"~":{dir:"previoussibling"}},prefilter:{attr:function(e){return e[1]=e[1].replace($,""),e[3]=(e[4]||e[5]||"").replace($,""),e[2]==="~="&&(e[3]=" "+e[3]+" "),e.slice(0,4)},child:function(e){return e[1]=e[1].tolowercase(),e[1]==="nth"?(e[2]||nt.error(e[0]),e[3]=+(e[3]?e[4]+(e[5]||1):2*(e[2]==="even"||e[2]==="odd")),e[4]=+(e[6]+e[7]||e[2]==="odd")):e[2]&&nt.error(e[0]),e},pseudo:function(e){var t,n;if(j.child.test(e[0]))return null;if(e[3])e[2]=e[3];else if(t=e[4])q.test(t)&&(n=ut(t,!0))&&(n=t.indexof(")",t.length-n)-t.length)&&(t=t.slice(0,n),e[0]=e[0].slice(0,n)),e[2]=t;return e.slice(0,3)}},filter:{id:r?function(e){return e=e.replace($,""),function(t){return t.getattribute("id")===e}}:function(e){return e=e.replace($,""),function(t){var n=typeof t.getattributenode!==p&&t.getattributenode("id");return n&&n.value===e}},tag:function(e){return e==="*"?function(){return!0}:(e=e.replace($,"").tolowercase(),function(t){return t.nodename&&t.nodename.tolowercase()===e})},class:function(e){var t=k[d][e+" "];return t||(t=new regexp("(^|"+o+")"+e+"("+o+"|$)"))&&k(e,function(e){return t.test(e.classname||typeof e.getattribute!==p&&e.getattribute("class")||"")})},attr:function(e,t,n){return function(r,i){var s=nt.attr(r,e);return s==null?t==="!=":t?(s+="",t==="="?s===n:t==="!="?s!==n:t==="^="?n&&s.indexof(n)===0:t==="*="?n&&s.indexof(n)>-1:t==="$="?n&&s.substr(s.length-n.length)===n:t==="~="?(" "+s+" ").indexof(n)>-1:t==="|="?s===n||s.substr(0,n.length+1)===n+"-":!1):!0}},child:function(e,t,n,r){return e==="nth"?function(e){var t,i,s=e.parentnode;if(n===1&&r===0)return!0;if(s){i=0;for(t=s.firstchild;t;t=t.nextsibling)if(t.nodetype===1){i++;if(e===t)break}}return i-=r,i===n||i%n===0&&i/n>=0}:function(t){var n=t;switch(e){case"only":case"first":while(n=n.previoussibling)if(n.nodetype===1)return!1;if(e==="first")return!0;n=t;case"last":while(n=n.nextsibling)if(n.nodetype===1)return!1;return!0}}},pseudo:function(e,t){var n,r=i.pseudos[e]||i.setfilters[e.tolowercase()]||nt.error("unsupported pseudo: "+e);return r[d]?r(t):r.length>1?(n=[e,e,"",t],i.setfilters.hasownproperty(e.tolowercase())?n(function(e,n){var i,s=r(e,t),o=s.length;while(o--)i=t.call(e,s[o]),e[i]=!(n[i]=s[o])}):function(e){return r(e,0,n)}):r}},pseudos:{not:n(function(e){var t=[],n=[],r=a(e.replace(j,"$1"));return r[d]?n(function(e,t,n,i){var s,o=r(e,null,i,[]),u=e.length;while(u--)if(s=o[u])e[u]=!(t[u]=s)}):function(e,i,s){return t[0]=e,r(t,null,s,n),!n.pop()}}),has:n(function(e){return function(t){return nt(e,t).length>0}}),contains:n(function(e){return function(t){return(t.textcontent||t.innertext||s(t)).indexof(e)>-1}}),enabled:function(e){return e.disabled===!1},disabled:function(e){return e.disabled===!0},checked:function(e){var t=e.nodename.tolowercase();return t==="input"&&!!e.checked||t==="option"&&!!e.selected},selected:function(e){return e.parentnode&&e.parentnode.selectedindex,e.selected===!0},parent:function(e){return!i.pseudos.empty(e)},empty:function(e){var t;e=e.firstchild;while(e){if(e.nodename>"@"||(t=e.nodetype)===3||t===4)return!1;e=e.nextsibling}return!0},header:function(e){return x.test(e.nodename)},text:function(e){var t,n;return e.nodename.tolowercase()==="input"&&(t=e.type)==="text"&&((n=e.getattribute("type"))==null||n.tolowercase()===t)},radio:rt("radio"),checkbox:rt("checkbox"),file:rt("file"),password:rt("password"),image:rt("image"),submit:it("submit"),reset:it("reset"),button:function(e){var t=e.nodename.tolowercase();return t==="input"&&e.type==="button"||t==="button"},input:function(e){return v.test(e.nodename)},focus:function(e){var t=e.ownerdocument;return e===t.activeelement&&(!t.hasfocus||t.hasfocus())&&!!(e.type||e.href||~e.tabindex)},active:function(e){return e===e.ownerdocument.activeelement},first:st(function(){return[0]}),last:st(function(e,t){return[t-1]}),eq:st(function(e,t,n){return[n<0?n+t:n]}),even:st(function(e,t){for(var n=0;n=0;)e.push(r);return e}),gt:st(function(e,t,n){for(var r=n<0?n+t:n;++r",e.queryselectorall("[selected]").length||i.push("\\["+o+"*(?:checked|disabled|ismap|multiple|readonly|selected|value)"),e.queryselectorall(":checked").length||i.push(":checked")}),k(function(e){e.innerhtml="

",e.queryselectorall("[test^='']").length&&i.push("[*^$]="+o+"*(?:\"\"|'')"),e.innerhtml="",e.queryselectorall(":enabled").length||i.push(":enabled",":disabled")}),i=new regexp(i.join("|")),vt=function(e,r,s,o,u){if(!o&&!u&&!i.test(e)){var a,f,l=!0,c=d,h=r,p=r.nodetype===9&&e;if(r.nodetype===1&&r.nodename.tolowercase()!=="object"){a=ut(e),(l=r.getattribute("id"))?c=l.replace(n,"\\$&"):r.setattribute("id",c),c="[id='"+c+"'] ",f=a.length;while(f--)a[f]=c+a[f].join("");h=z.test(e)&&r.parentnode||r,p=a.join(",")}if(p)try{return s.apply(s,x.call(h.queryselectorall(p),0)),s}catch(v){}finally{l||r.removeattribute("id")}}return t(e,r,s,o,u)},u&&(k(function(t){e=u.call(t,"div");try{u.call(t,"[test!='']:sizzle"),s.push("!=",h)}catch(n){}}),s=new regexp(s.join("|")),nt.matchesselector=function(t,n){n=n.replace(r,"='$1']");if(!o(t)&&!s.test(n)&&!i.test(n))try{var a=u.call(t,n);if(a||e||t.document&&t.document.nodetype!==11)return a}catch(f){}return nt(n,null,null,[t]).length>0})}(),i.pseudos.nth=i.pseudos.eq,i.filters=mt.prototype=i.pseudos,i.setfilters=new mt,nt.attr=v.attr,v.find=nt,v.expr=nt.selectors,v.expr[":"]=v.expr.pseudos,v.unique=nt.uniquesort,v.text=nt.gettext,v.isxmldoc=nt.isxml,v.contains=nt.contains}(e);var nt=/until$/,rt=/^(?:parents|prev(?:until|all))/,it=/^.[^:#\[\.,]*$/,st=v.expr.match.needscontext,ot={children:!0,contents:!0,next:!0,prev:!0};v.fn.extend({find:function(e){var t,n,r,i,s,o,u=this;if(typeof e!="string")return v(e).filter(function(){for(t=0,n=u.length;t0)for(i=r;i=0:v.filter(e,this).length>0:this.filter(e).length>0)},closest:function(e,t){var n,r=0,i=this.length,s=[],o=st.test(e)||typeof e!="string"?v(e,t||this.context):0;for(;r-1:v.find.matchesselector(n,e)){s.push(n);break}n=n.parentnode}}return s=s.length>1?v.unique(s):s,this.pushstack(s,"closest",e)},index:function(e){return e?typeof e=="string"?v.inarray(this[0],v(e)):v.inarray(e.jquery?e[0]:e,this):this[0]&&this[0].parentnode?this.prevall().length:-1},add:function(e,t){var n=typeof e=="string"?v(e,t):v.makearray(e&&e.nodetype?[e]:e),r=v.merge(this.get(),n);return this.pushstack(ut(n[0])||ut(r[0])?r:v.unique(r))},addback:function(e){return this.add(e==null?this.prevobject:this.prevobject.filter(e))}}),v.fn.andself=v.fn.addback,v.each({parent:function(e){var t=e.parentnode;return t&&t.nodetype!==11?t:null},parents:function(e){return v.dir(e,"parentnode")},parentsuntil:function(e,t,n){return v.dir(e,"parentnode",n)},next:function(e){return at(e,"nextsibling")},prev:function(e){return at(e,"previoussibling")},nextall:function(e){return v.dir(e,"nextsibling")},prevall:function(e){return v.dir(e,"previoussibling")},nextuntil:function(e,t,n){return v.dir(e,"nextsibling",n)},prevuntil:function(e,t,n){return v.dir(e,"previoussibling",n)},siblings:function(e){return v.sibling((e.parentnode||{}).firstchild,e)},children:function(e){return v.sibling(e.firstchild)},contents:function(e){return v.nodename(e,"iframe")?e.contentdocument||e.contentwindow.document:v.merge([],e.childnodes)}},function(e,t){v.fn[e]=function(n,r){var i=v.map(this,t,n);return nt.test(e)||(r=n),r&&typeof r=="string"&&(i=v.filter(r,i)),i=this.length>1&&!ot[e]?v.unique(i):i,this.length>1&&rt.test(e)&&(i=i.reverse()),this.pushstack(i,e,l.call(arguments).join(","))}}),v.extend({filter:function(e,t,n){return n&&(e=":not("+e+")"),t.length===1?v.find.matchesselector(t[0],e)?[t[0]]:[]:v.find.matches(e,t)},dir:function(e,n,r){var i=[],s=e[n];while(s&&s.nodetype!==9&&(r===t||s.nodetype!==1||!v(s).is(r)))s.nodetype===1&&i.push(s),s=s[n];return i},sibling:function(e,t){var n=[];for(;e;e=e.nextsibling)e.nodetype===1&&e!==t&&n.push(e);return n}});var ct="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",ht=/ jquery\d+="(?:null|\d+)"/g,pt=/^\s+/,dt=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,vt=/<([\w:]+)/,mt=/]","i"),et=/^(?:checkbox|radio)$/,st=/checked\s*(?:[^=]|=\s*.checked.)/i,xt=/\/(java|ecma)script/i,tt=/^\s*\s*$/g,nt={option:[1,""],legend:[1,"
","
"],thead:[1,"","
"],tr:[2,"","
"],td:[3,"","
"],col:[2,"","
"],area:[1,"",""],_default:[0,"",""]},ct=lt(i),kt=ct.appendchild(i.createelement("div"));nt.optgroup=nt.option,nt.tbody=nt.tfoot=nt.colgroup=nt.caption=nt.thead,nt.th=nt.td,v.support.htmlserialize||(nt._default=[1,"x
","
"]),v.fn.extend({text:function(e){return v.access(this,function(e){return e===t?v.text(this):this.empty().append((this[0]&&this[0].ownerdocument||i).createtextnode(e))},null,e,arguments.length)},wrapall:function(e){if(v.isfunction(e))return this.each(function(t){v(this).wrapall(e.call(this,t))});if(this[0]){var t=v(e,this[0].ownerdocument).eq(0).clone(!0);this[0].parentnode&&t.insertbefore(this[0]),t.map(function(){var e=this;while(e.firstchild&&e.firstchild.nodetype===1)e=e.firstchild;return e}).append(this)}return this},wrapinner:function(e){return v.isfunction(e)?this.each(function(t){v(this).wrapinner(e.call(this,t))}):this.each(function(){var t=v(this),n=t.contents();n.length?n.wrapall(e):t.append(e)})},wrap:function(e){var t=v.isfunction(e);return this.each(function(n){v(this).wrapall(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){v.nodename(this,"body")||v(this).replacewith(this.childnodes)}).end()},append:function(){return this.dommanip(arguments,!0,function(e){(this.nodetype===1||this.nodetype===11)&&this.appendchild(e)})},prepend:function(){return this.dommanip(arguments,!0,function(e){(this.nodetype===1||this.nodetype===11)&&this.insertbefore(e,this.firstchild)})},before:function(){if(!ut(this[0]))return this.dommanip(arguments,!1,function(e){this.parentnode.insertbefore(e,this)});if(arguments.length){var e=v.clean(arguments);return this.pushstack(v.merge(e,this),"before",this.selector)}},after:function(){if(!ut(this[0]))return this.dommanip(arguments,!1,function(e){this.parentnode.insertbefore(e,this.nextsibling)});if(arguments.length){var e=v.clean(arguments);return this.pushstack(v.merge(this,e),"after",this.selector)}},remove:function(e,t){var n,r=0;for(;(n=this[r])!=null;r++)if(!e||v.filter(e,[n]).length)!t&&n.nodetype===1&&(v.cleandata(n.getelementsbytagname("*")),v.cleandata([n])),n.parentnode&&n.parentnode.removechild(n);return this},empty:function(){var e,t=0;for(;(e=this[t])!=null;t++){e.nodetype===1&&v.cleandata(e.getelementsbytagname("*"));while(e.firstchild)e.removechild(e.firstchild)}return this},clone:function(e,t){return e=e==null?!1:e,t=t==null?e:t,this.map(function(){return v.clone(this,e,t)})},html:function(e){return v.access(this,function(e){var n=this[0]||{},r=0,i=this.length;if(e===t)return n.nodetype===1?n.innerhtml.replace(ht,""):t;if(typeof e=="string"&&!yt.test(e)&&(v.support.htmlserialize||!wt.test(e))&&(v.support.leadingwhitespace||!pt.test(e))&&!nt[(vt.exec(e)||["",""])[1].tolowercase()]){e=e.replace(dt,"<$1>");try{for(;r1&&typeof f=="string"&&st.test(f))return this.each(function(){v(this).dommanip(e,n,r)});if(v.isfunction(f))return this.each(function(i){var s=v(this);e[0]=f.call(this,i,n?s.html():t),s.dommanip(e,n,r)});if(this[0]){i=v.buildfragment(e,this,l),o=i.fragment,s=o.firstchild,o.childnodes.length===1&&(o=s);if(s){n=n&&v.nodename(s,"tr");for(u=i.cacheable||c-1;a0?this.clone(!0):this).get(),v(o[i])[t](r),s=s.concat(r);return this.pushstack(s,e,o.selector)}}),v.extend({clone:function(e,t,n){var r,i,s,o;v.support.html5clone||v.isxmldoc(e)||!wt.test("<"+e.nodename+">")?o=e.clonenode(!0):(kt.innerhtml=e.outerhtml,kt.removechild(o=kt.firstchild));if((!v.support.nocloneevent||!v.support.noclonechecked)&&(e.nodetype===1||e.nodetype===11)&&!v.isxmldoc(e)){ot(e,o),r=mt(e),i=mt(o);for(s=0;r[s];++s)i[s]&&ot(r[s],i[s])}if(t){at(e,o);if(n){r=mt(e),i=mt(o);for(s=0;r[s];++s)at(r[s],i[s])}}return r=i=null,o},clean:function(e,t,n,r){var s,o,u,a,f,l,c,h,p,d,m,g,y=t===i&&ct,b=[];if(!t||typeof t.createdocumentfragment=="undefined")t=i;for(s=0;(u=e[s])!=null;s++){typeof u=="number"&&(u+="");if(!u)continue;if(typeof u=="string")if(!gt.test(u))u=t.createtextnode(u);else{y=y||lt(t),c=t.createelement("div"),y.appendchild(c),u=u.replace(dt,"<$1>"),a=(vt.exec(u)||["",""])[1].tolowercase(),f=nt[a]||nt._default,l=f[0],c.innerhtml=f[1]+u+f[2];while(l--)c=c.lastchild;if(!v.support.tbody){h=mt.test(u),p=a==="table"&&!h?c.firstchild&&c.firstchild.childnodes:f[1]===""&&!h?c.childnodes:[];for(o=p.length-1;o>=0;--o)v.nodename(p[o],"tbody")&&!p[o].childnodes.length&&p[o].parentnode.removechild(p[o])}!v.support.leadingwhitespace&&pt.test(u)&&c.insertbefore(t.createtextnode(pt.exec(u)[0]),c.firstchild),u=c.childnodes,c.parentnode.removechild(c)}u.nodetype?b.push(u):v.merge(b,u)}c&&(u=c=y=null);if(!v.support.appendchecked)for(s=0;(u=b[s])!=null;s++)v.nodename(u,"input")?_t(u):typeof u.getelementsbytagname!="undefined"&&v.grep(u.getelementsbytagname("input"),_t);if(n){m=function(e){if(!e.type||xt.test(e.type))return r?r.push(e.parentnode?e.parentnode.removechild(e):e):n.appendchild(e)};for(s=0;(u=b[s])!=null;s++)if(!v.nodename(u,"script")||!m(u))n.appendchild(u),typeof u.getelementsbytagname!="undefined"&&(g=v.grep(v.merge([],u.getelementsbytagname("script")),m),b.splice.apply(b,[s+1,0].concat(g)),s+=g.length)}return b},cleandata:function(e,t){var n,r,i,s,o=0,u=v.expando,a=v.cache,f=v.support.deleteexpando,l=v.event.special;for(;(i=e[o])!=null;o++)if(t||v.acceptdata(i)){r=i[u],n=r&&a[r];if(n){if(n.events)for(s in n.events)l[s]?v.event.remove(i,s):v.removeevent(i,s,n.handle);a[r]&&(delete a[r],f?delete i[u]:i.removeattribute?i.removeattribute(u):i[u]=null,v.deletedids.push(r))}}}}),function(){var e,t;v.uamatch=function(e){e=e.tolowercase();var t=/(chrome)[ \/]([\w.]+)/.exec(e)||/(webkit)[ \/]([\w.]+)/.exec(e)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(e)||/(msie) ([\w.]+)/.exec(e)||e.indexof("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(e)||[];return{browser:t[1]||"",version:t[2]||"0"}},e=v.uamatch(o.useragent),t={},e.browser&&(t[e.browser]=!0,t.version=e.version),t.chrome?t.webkit=!0:t.webkit&&(t.safari=!0),v.browser=t,v.sub=function(){function e(t,n){return new e.fn.init(t,n)}v.extend(!0,e,this),e.superclass=this,e.fn=e.prototype=this(),e.fn.constructor=e,e.sub=this.sub,e.fn.init=function(r,i){return i&&i instanceof v&&!(i instanceof e)&&(i=e(i)),v.fn.init.call(this,r,i,t)},e.fn.init.prototype=e.fn;var t=e(i);return e}}();var dt,pt,ht,bt=/alpha\([^)]*\)/i,jt=/opacity=([^)]*)/,ft=/^(top|right|bottom|left)$/,it=/^(none|table(?!-c[ea]).+)/,qt=/^margin/,rt=new regexp("^("+m+")(.*)$","i"),ut=new regexp("^("+m+")(?!px)[a-z%]+$","i"),zt=new regexp("^([-+])=("+m+")","i"),wt={body:"block"},xt={position:"absolute",visibility:"hidden",display:"block"},vt={letterspacing:0,fontweight:400},$t=["top","right","bottom","left"],jt=["webkit","o","moz","ms"],kt=v.fn.toggle;v.fn.extend({css:function(e,n){return v.access(this,function(e,n,r){return r!==t?v.style(e,n,r):v.css(e,n)},e,n,arguments.length>1)},show:function(){return yt(this,!0)},hide:function(){return yt(this)},toggle:function(e,t){var n=typeof e=="boolean";return v.isfunction(e)&&v.isfunction(t)?kt.apply(this,arguments):this.each(function(){(n?e:gt(this))?v(this).show():v(this).hide()})}}),v.extend({csshooks:{opacity:{get:function(e,t){if(t){var n=dt(e,"opacity");return n===""?"1":n}}}},cssnumber:{fillopacity:!0,fontweight:!0,lineheight:!0,opacity:!0,orphans:!0,widows:!0,zindex:!0,zoom:!0},cssprops:{"float":v.support.cssfloat?"cssfloat":"stylefloat"},style:function(e,n,r,i){if(!e||e.nodetype===3||e.nodetype===8||!e.style)return;var s,o,u,a=v.camelcase(n),f=e.style;n=v.cssprops[a]||(v.cssprops[a]=qt(f,a)),u=v.csshooks[n]||v.csshooks[a];if(r===t)return u&&"get"in u&&(s=u.get(e,!1,i))!==t?s:f[n];o=typeof r,o==="string"&&(s=zt.exec(r))&&(r=(s[1]+1)*s[2]+parsefloat(v.css(e,n)),o="number");if(r==null||o==="number"&&isnan(r))return;o==="number"&&!v.cssnumber[a]&&(r+="px");if(!u||!("set"in u)||(r=u.set(e,r,i))!==t)try{f[n]=r}catch(l){}},css:function(e,n,r,i){var s,o,u,a=v.camelcase(n);return n=v.cssprops[a]||(v.cssprops[a]=qt(e.style,a)),u=v.csshooks[n]||v.csshooks[a],u&&"get"in u&&(s=u.get(e,!0,i)),s===t&&(s=dt(e,n)),s==="normal"&&n in vt&&(s=vt[n]),r||i!==t?(o=parsefloat(s),r||v.isnumeric(o)?o||0:s):s},swap:function(e,t,n){var r,i,s={};for(i in t)s[i]=e.style[i],e.style[i]=t[i];r=n.call(e);for(i in t)e.style[i]=s[i];return r}}),e.getcomputedstyle?dt=function(t,n){var r,i,s,o,u=e.getcomputedstyle(t,null),a=t.style;return u&&(r=u.getpropertyvalue(n)||u[n],r===""&&!v.contains(t.ownerdocument,t)&&(r=v.style(t,n)),ut.test(r)&&qt.test(n)&&(i=a.width,s=a.minwidth,o=a.maxwidth,a.minwidth=a.maxwidth=a.width=r,r=u.width,a.width=i,a.minwidth=s,a.maxwidth=o)),r}:i.documentelement.currentstyle&&(dt=function(e,t){var n,r,i=e.currentstyle&&e.currentstyle[t],s=e.style;return i==null&&s&&s[t]&&(i=s[t]),ut.test(i)&&!ft.test(t)&&(n=s.left,r=e.runtimestyle&&e.runtimestyle.left,r&&(e.runtimestyle.left=e.currentstyle.left),s.left=t==="fontsize"?"1em":i,i=s.pixelleft+"px",s.left=n,r&&(e.runtimestyle.left=r)),i===""?"auto":i}),v.each(["height","width"],function(e,t){v.csshooks[t]={get:function(e,n,r){if(n)return e.offsetwidth===0&&it.test(dt(e,"display"))?v.swap(e,xt,function(){return tn(e,t,r)}):tn(e,t,r)},set:function(e,n,r){return zt(e,n,r?en(e,t,r,v.support.boxsizing&&v.css(e,"boxsizing")==="border-box"):0)}}}),v.support.opacity||(v.csshooks.opacity={get:function(e,t){return jt.test((t&&e.currentstyle?e.currentstyle.filter:e.style.filter)||"")?.01*parsefloat(regexp.$1)+"":t?"1":""},set:function(e,t){var n=e.style,r=e.currentstyle,i=v.isnumeric(t)?"alpha(opacity="+t*100+")":"",s=r&&r.filter||n.filter||"";n.zoom=1;if(t>=1&&v.trim(s.replace(bt,""))===""&&n.removeattribute){n.removeattribute("filter");if(r&&!r.filter)return}n.filter=bt.test(s)?s.replace(bt,i):s+" "+i}}),v(function(){v.support.reliablemarginright||(v.csshooks.marginright={get:function(e,t){return v.swap(e,{display:"inline-block"},function(){if(t)return dt(e,"marginright")})}}),!v.support.pixelposition&&v.fn.position&&v.each(["top","left"],function(e,t){v.csshooks[t]={get:function(e,n){if(n){var r=dt(e,t);return ut.test(r)?v(e).position()[t]+"px":r}}}})}),v.expr&&v.expr.filters&&(v.expr.filters.hidden=function(e){return e.offsetwidth===0&&e.offsetheight===0||!v.support.reliablehiddenoffsets&&(e.style&&e.style.display||dt(e,"display"))==="none"},v.expr.filters.visible=function(e){return!v.expr.filters.hidden(e)}),v.each({margin:"",padding:"",border:"width"},function(e,t){v.csshooks[e+t]={expand:function(n){var r,i=typeof n=="string"?n.split(" "):[n],s={};for(r=0;r<4;r++)s[e+$t[r]+t]=i[r]||i[r-2]||i[0];return s}},qt.test(e)||(v.csshooks[e+t].set=zt)});var rn=/%20/g,sn=/\[\]$/,on=/\r?\n/g,un=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,an=/^(?:select|textarea)/i;v.fn.extend({serialize:function(){return v.param(this.serializearray())},serializearray:function(){return this.map(function(){return this.elements?v.makearray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||an.test(this.nodename)||un.test(this.type))}).map(function(e,t){var n=v(this).val();return n==null?null:v.isarray(n)?v.map(n,function(e,n){return{name:t.name,value:e.replace(on,"\r\n")}}):{name:t.name,value:n.replace(on,"\r\n")}}).get()}}),v.param=function(e,n){var r,i=[],s=function(e,t){t=v.isfunction(t)?t():t==null?"":t,i[i.length]=encodeuricomponent(e)+"="+encodeuricomponent(t)};n===t&&(n=v.ajaxsettings&&v.ajaxsettings.traditional);if(v.isarray(e)||e.jquery&&!v.isplainobject(e))v.each(e,function(){s(this.name,this.value)});else for(r in e)fn(r,e[r],n,s);return i.join("&").replace(rn,"+")};var ln,cn,hn=/#.*$/,pn=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,dn=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,vn=/^(?:get|head)$/,mn=/^\/\//,gn=/\?/,yn=/)<[^<]*)*<\/script>/gi,bn=/([?&])_=[^&]*/,wn=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,en=v.fn.load,sn={},xn={},tn=["*/"]+["*"];try{cn=s.href}catch(nn){cn=i.createelement("a"),cn.href="",cn=cn.href}ln=wn.exec(cn.tolowercase())||[],v.fn.load=function(e,n,r){if(typeof e!="string"&&en)return en.apply(this,arguments);if(!this.length)return this;var i,s,o,u=this,a=e.indexof(" ");return a>=0&&(i=e.slice(a,e.length),e=e.slice(0,a)),v.isfunction(n)?(r=n,n=t):n&&typeof n=="object"&&(s="post"),v.ajax({url:e,type:s,datatype:"html",data:n,complete:function(e,t){r&&u.each(r,o||[e.responsetext,t,e])}}).done(function(e){o=arguments,u.html(i?v("
").append(e.replace(yn,"")).find(i):e)}),this},v.each("ajaxstart ajaxstop ajaxcomplete ajaxerror ajaxsuccess ajaxsend".split(" "),function(e,t){v.fn[t]=function(e){return this.on(t,e)}}),v.each(["get","post"],function(e,n){v[n]=function(e,r,i,s){return v.isfunction(r)&&(s=s||i,i=r,r=t),v.ajax({type:n,url:e,data:r,success:i,datatype:s})}}),v.extend({getscript:function(e,n){return v.get(e,t,n,"script")},getjson:function(e,t,n){return v.get(e,t,n,"json")},ajaxsetup:function(e,t){return t?ln(e,v.ajaxsettings):(t=e,e=v.ajaxsettings),ln(e,t),e},ajaxsettings:{url:cn,islocal:dn.test(ln[1]),global:!0,type:"get",contenttype:"application/x-www-form-urlencoded; charset=utf-8",processdata:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":tn},contents:{xml:/xml/,html:/html/,json:/json/},responsefields:{xml:"responsexml",text:"responsetext"},converters:{"* text":e.string,"text html":!0,"text json":v.parsejson,"text xml":v.parsexml},flatoptions:{context:!0,url:!0}},ajaxprefilter:cn(sn),ajaxtransport:cn(xn),ajax:function(e,n){function t(e,n,s,a){var l,y,b,w,s,t=n;if(e===2)return;e=2,u&&cleartimeout(u),o=t,i=a||"",x.readystate=e>0?4:0,s&&(w=an(c,x,s));if(e>=200&&e<300||e===304)c.ifmodified&&(s=x.getresponseheader("last-modified"),s&&(v.lastmodified[r]=s),s=x.getresponseheader("etag"),s&&(v.etag[r]=s)),e===304?(t="notmodified",l=!0):(l=on(c,w),t=l.state,y=l.data,b=l.error,l=!b);else{b=t;if(!t||e)t="error",e<0&&(e=0)}x.status=e,x.statustext=(n||t)+"",l?d.resolvewith(h,[y,t,x]):d.rejectwith(h,[x,t,b]),x.statuscode(g),g=t,f&&p.trigger("ajax"+(l?"success":"error"),[x,c,l?y:b]),m.firewith(h,[x,t]),f&&(p.trigger("ajaxcomplete",[x,c]),--v.active||v.event.trigger("ajaxstop"))}typeof e=="object"&&(n=e,e=t),n=n||{};var r,i,s,o,u,a,f,l,c=v.ajaxsetup({},n),h=c.context||c,p=h!==c&&(h.nodetype||h instanceof v)?v(h):v.event,d=v.deferred(),m=v.callbacks("once memory"),g=c.statuscode||{},b={},w={},e=0,s="canceled",x={readystate:0,setrequestheader:function(e,t){if(!e){var n=e.tolowercase();e=w[n]=w[n]||e,b[e]=t}return this},getallresponseheaders:function(){return e===2?i:null},getresponseheader:function(e){var n;if(e===2){if(!s){s={};while(n=pn.exec(i))s[n[1].tolowercase()]=n[2]}n=s[e.tolowercase()]}return n===t?null:n},overridemimetype:function(e){return e||(c.mimetype=e),this},abort:function(e){return e=e||s,o&&o.abort(e),t(0,e),this}};d.promise(x),x.success=x.done,x.error=x.fail,x.complete=m.add,x.statuscode=function(e){if(e){var t;if(e<2)for(t in e)g[t]=[g[t],e[t]];else t=e[x.status],x.always(t)}return this},c.url=((e||c.url)+"").replace(hn,"").replace(mn,ln[1]+"//"),c.datatypes=v.trim(c.datatype||"*").tolowercase().split(y),c.crossdomain==null&&(a=wn.exec(c.url.tolowercase()),c.crossdomain=!(!a||a[1]===ln[1]&&a[2]===ln[2]&&(a[3]||(a[1]==="http:"?80:443))==(ln[3]||(ln[1]==="http:"?80:443)))),c.data&&c.processdata&&typeof c.data!="string"&&(c.data=v.param(c.data,c.traditional)),kn(sn,c,n,x);if(e===2)return x;f=c.global,c.type=c.type.touppercase(),c.hascontent=!vn.test(c.type),f&&v.active++===0&&v.event.trigger("ajaxstart");if(!c.hascontent){c.data&&(c.url+=(gn.test(c.url)?"&":"?")+c.data,delete c.data),r=c.url;if(c.cache===!1){var n=v.now(),c=c.url.replace(bn,"$1_="+n);c.url=c+(c===c.url?(gn.test(c.url)?"&":"?")+"_="+n:"")}}(c.data&&c.hascontent&&c.contenttype!==!1||n.contenttype)&&x.setrequestheader("content-type",c.contenttype),c.ifmodified&&(r=r||c.url,v.lastmodified[r]&&x.setrequestheader("if-modified-since",v.lastmodified[r]),v.etag[r]&&x.setrequestheader("if-none-match",v.etag[r])),x.setrequestheader("accept",c.datatypes[0]&&c.accepts[c.datatypes[0]]?c.accepts[c.datatypes[0]]+(c.datatypes[0]!=="*"?", "+tn+"; q=0.01":""):c.accepts["*"]);for(l in c.headers)x.setrequestheader(l,c.headers[l]);if(!c.beforesend||c.beforesend.call(h,x,c)!==!1&&e!==2){s="abort";for(l in{success:1,error:1,complete:1})x[l](c[l]);o=kn(xn,c,n,x);if(!o)t(-1,"no transport");else{x.readystate=1,f&&p.trigger("ajaxsend",[x,c]),c.async&&c.timeout>0&&(u=settimeout(function(){x.abort("timeout")},c.timeout));try{e=1,o.send(b,t)}catch(k){if(!(e<2))throw k;t(-1,k)}}return x}return x.abort()},active:0,lastmodified:{},etag:{}});var mn=[],_n=/\?/,dn=/(=)\?(?=&|$)|\?\?/,pn=v.now();v.ajaxsetup({jsonp:"callback",jsonpcallback:function(){var e=mn.pop()||v.expando+"_"+pn++;return this[e]=!0,e}}),v.ajaxprefilter("json jsonp",function(n,r,i){var s,o,u,a=n.data,f=n.url,l=n.jsonp!==!1,c=l&&dn.test(f),h=l&&!c&&typeof a=="string"&&!(n.contenttype||"").indexof("application/x-www-form-urlencoded")&&dn.test(a);if(n.datatypes[0]==="jsonp"||c||h)return s=n.jsonpcallback=v.isfunction(n.jsonpcallback)?n.jsonpcallback():n.jsonpcallback,o=e[s],c?n.url=f.replace(dn,"$1"+s):h?n.data=a.replace(dn,"$1"+s):l&&(n.url+=(_n.test(f)?"&":"?")+n.jsonp+"="+s),n.converters["script json"]=function(){return u||v.error(s+" was not called"),u[0]},n.datatypes[0]="json",e[s]=function(){u=arguments},i.always(function(){e[s]=o,n[s]&&(n.jsonpcallback=r.jsonpcallback,mn.push(s)),u&&v.isfunction(o)&&o(u[0]),u=o=t}),"script"}),v.ajaxsetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(e){return v.globaleval(e),e}}}),v.ajaxprefilter("script",function(e){e.cache===t&&(e.cache=!1),e.crossdomain&&(e.type="get",e.global=!1)}),v.ajaxtransport("script",function(e){if(e.crossdomain){var n,r=i.head||i.getelementsbytagname("head")[0]||i.documentelement;return{send:function(s,o){n=i.createelement("script"),n.async="async",e.scriptcharset&&(n.charset=e.scriptcharset),n.src=e.url,n.onload=n.onreadystatechange=function(e,i){if(i||!n.readystate||/loaded|complete/.test(n.readystate))n.onload=n.onreadystatechange=null,r&&n.parentnode&&r.removechild(n),n=t,i||o(200,"success")},r.insertbefore(n,r.firstchild)},abort:function(){n&&n.onload(0,1)}}}});var hn,bn=e.activexobject?function(){for(var e in hn)hn[e](0,1)}:!1,jn=0;v.ajaxsettings.xhr=e.activexobject?function(){return!this.islocal&&fn()||in()}:fn,function(e){v.extend(v.support,{ajax:!!e,cors:!!e&&"withcredentials"in e})}(v.ajaxsettings.xhr()),v.support.ajax&&v.ajaxtransport(function(n){if(!n.crossdomain||v.support.cors){var r;return{send:function(i,s){var o,u,a=n.xhr();n.username?a.open(n.type,n.url,n.async,n.username,n.password):a.open(n.type,n.url,n.async);if(n.xhrfields)for(u in n.xhrfields)a[u]=n.xhrfields[u];n.mimetype&&a.overridemimetype&&a.overridemimetype(n.mimetype),!n.crossdomain&&!i["x-requested-with"]&&(i["x-requested-with"]="xmlhttprequest");try{for(u in i)a.setrequestheader(u,i[u])}catch(f){}a.send(n.hascontent&&n.data||null),r=function(e,i){var u,f,l,c,h;try{if(r&&(i||a.readystate===4)){r=t,o&&(a.onreadystatechange=v.noop,bn&&delete hn[o]);if(i)a.readystate!==4&&a.abort();else{u=a.status,l=a.getallresponseheaders(),c={},h=a.responsexml,h&&h.documentelement&&(c.xml=h);try{c.text=a.responsetext}catch(p){}try{f=a.statustext}catch(p){f=""}!u&&n.islocal&&!n.crossdomain?u=c.text?200:404:u===1223&&(u=204)}}}catch(d){i||s(-1,d)}c&&s(u,f,c,l)},n.async?a.readystate===4?settimeout(r,0):(o=++jn,bn&&(hn||(hn={},v(e).unload(bn)),hn[o]=r),a.onreadystatechange=r):r()},abort:function(){r&&r(0,1)}}}});var qn,rn,un=/^(?:toggle|show|hide)$/,zn=new regexp("^(?:([-+])=|)("+m+")([a-z%]*)$","i"),wn=/queuehooks$/,xn=[gn],vn={"*":[function(e,t){var n,r,i=this.createtween(e,t),s=zn.exec(t),o=i.cur(),u=+o||0,a=1,f=20;if(s){n=+s[2],r=s[3]||(v.cssnumber[e]?"":"px");if(r!=="px"&&u){u=v.css(i.elem,e,!0)||n||1;do a=a||".5",u/=a,v.style(i.elem,e,u+r);while(a!==(a=i.cur()/o)&&a!==1&&--f)}i.unit=r,i.start=u,i.end=s[1]?u+(s[1]+1)*n:n}return i}]};v.animation=v.extend(kn,{tweener:function(e,t){v.isfunction(e)?(t=e,e=["*"]):e=e.split(" ");var n,r=0,i=e.length;for(;r-1,f={},l={},c,h;a?(l=i.position(),c=l.top,h=l.left):(c=parsefloat(o)||0,h=parsefloat(u)||0),v.isfunction(t)&&(t=t.call(e,n,s)),t.top!=null&&(f.top=t.top-s.top+c),t.left!=null&&(f.left=t.left-s.left+h),"using"in t?t.using.call(e,f):i.css(f)}},v.fn.extend({position:function(){if(!this[0])return;var e=this[0],t=this.offsetparent(),n=this.offset(),r=er.test(t[0].nodename)?{top:0,left:0}:t.offset();return n.top-=parsefloat(v.css(e,"margintop"))||0,n.left-=parsefloat(v.css(e,"marginleft"))||0,r.top+=parsefloat(v.css(t[0],"bordertopwidth"))||0,r.left+=parsefloat(v.css(t[0],"borderleftwidth"))||0,{top:n.top-r.top,left:n.left-r.left}},offsetparent:function(){return this.map(function(){var e=this.offsetparent||i.body;while(e&&!er.test(e.nodename)&&v.css(e,"position")==="static")e=e.offsetparent;return e||i.body})}}),v.each({scrollleft:"pagexoffset",scrolltop:"pageyoffset"},function(e,n){var r=/y/.test(n);v.fn[e]=function(i){return v.access(this,function(e,i,s){var o=tr(e);if(s===t)return o?n in o?o[n]:o.document.documentelement[i]:e[i];o?o.scrollto(r?v(o).scrollleft():s,r?s:v(o).scrolltop()):e[i]=s},e,i,arguments.length,null)}}),v.each({height:"height",width:"width"},function(e,n){v.each({padding:"inner"+e,content:n,"":"outer"+e},function(r,i){v.fn[i]=function(i,s){var o=arguments.length&&(r||typeof i!="boolean"),u=r||(i===!0||s===!0?"margin":"border");return v.access(this,function(n,r,i){var s;return v.iswindow(n)?n.document.documentelement["client"+e]:n.nodetype===9?(s=n.documentelement,math.max(n.body["scroll"+e],s["scroll"+e],n.body["offset"+e],s["offset"+e],s["client"+e])):i===t?v.css(n,r,i,u):v.style(n,r,i,u)},n,o?i:t,o,null)}})}),e.jquery=e.$=v,typeof define=="function"&&define.amd&&define.amd.jquery&&define("jquery",[],function(){return v})})(window); ;(function($, undefined) { "use strict"; var ver = '3.0.3'; function debug(s) { if ($.fn.cycle.debug) log(s); } function log() { /*global console */ if (window.console && console.log) console.log('[cycle] ' + array.prototype.join.call(arguments,' ')); } $.expr[':'].paused = function(el) { return el.cyclepause; }; // the options arg can be... // a number - indicates an immediate transition should occur to the given slide index // a string - 'pause', 'resume', 'toggle', 'next', 'prev', 'stop', 'destroy' or the name of a transition effect (ie, 'fade', 'zoom', etc) // an object - properties to control the slideshow // // the arg2 arg can be... // the name of an fx (only used in conjunction with a numeric value for 'options') // the value true (only used in first arg == 'resume') and indicates // that the resume should occur immediately (not wait for next timeout) $.fn.cycle = function(options, arg2) { var o = { s: this.selector, c: this.context }; // in 1.3+ we can fix mistakes with the ready state if (this.length === 0 && options != 'stop') { if (!$.isready && o.s) { log('dom not ready, queuing slideshow'); $(function() { $(o.s,o.c).cycle(options,arg2); }); return this; } // is your dom ready? http://docs.jquery.com/tutorials:introducing_$(document).ready() log('terminating; zero elements found by selector' + ($.isready ? '' : ' (dom not ready)')); return this; } // iterate the matched nodeset return this.each(function() { var opts = handlearguments(this, options, arg2); if (opts === false) return; opts.updateactivepagerlink = opts.updateactivepagerlink || $.fn.cycle.updateactivepagerlink; // stop existing slideshow for this container (if there is one) if (this.cycletimeout) cleartimeout(this.cycletimeout); this.cycletimeout = this.cyclepause = 0; this.cyclestop = 0; // issue #108 var $cont = $(this); var $slides = opts.slideexpr ? $(opts.slideexpr, this) : $cont.children(); var els = $slides.get(); if (els.length < 2) { log('terminating; too few slides: ' + els.length); return; } var opts2 = buildoptions($cont, $slides, els, opts, o); if (opts2 === false) return; var starttime = opts2.continuous ? 10 : gettimeout(els[opts2.currslide], els[opts2.nextslide], opts2, !opts2.backwards); // if it's an auto slideshow, kick it off if (starttime) { starttime += (opts2.delay || 0); if (starttime < 10) starttime = 10; debug('first timeout: ' + starttime); this.cycletimeout = settimeout(function(){go(els,opts2,0,!opts.backwards);}, starttime); } }); }; function triggerpause(cont, byhover, onpager) { var opts = $(cont).data('cycle.opts'); if (!opts) return; var paused = !!cont.cyclepause; if (paused && opts.paused) opts.paused(cont, opts, byhover, onpager); else if (!paused && opts.resumed) opts.resumed(cont, opts, byhover, onpager); } // process the args that were passed to the plugin fn function handlearguments(cont, options, arg2) { if (cont.cyclestop === undefined) cont.cyclestop = 0; if (options === undefined || options === null) options = {}; if (options.constructor == string) { switch(options) { case 'destroy': case 'stop': var opts = $(cont).data('cycle.opts'); if (!opts) return false; cont.cyclestop++; // callbacks look for change if (cont.cycletimeout) cleartimeout(cont.cycletimeout); cont.cycletimeout = 0; if (opts.elements) $(opts.elements).stop(); $(cont).removedata('cycle.opts'); if (options == 'destroy') destroy(cont, opts); return false; case 'toggle': cont.cyclepause = (cont.cyclepause === 1) ? 0 : 1; checkinstantresume(cont.cyclepause, arg2, cont); triggerpause(cont); return false; case 'pause': cont.cyclepause = 1; triggerpause(cont); return false; case 'resume': cont.cyclepause = 0; checkinstantresume(false, arg2, cont); triggerpause(cont); return false; case 'prev': case 'next': opts = $(cont).data('cycle.opts'); if (!opts) { log('options not found, "prev/next" ignored'); return false; } if (typeof arg2 == 'string') opts.onetimefx = arg2; $.fn.cycle[options](opts); return false; default: options = { fx: options }; } return options; } else if (options.constructor == number) { // go to the requested slide var num = options; options = $(cont).data('cycle.opts'); if (!options) { log('options not found, can not advance slide'); return false; } if (num < 0 || num >= options.elements.length) { log('invalid slide index: ' + num); return false; } options.nextslide = num; if (cont.cycletimeout) { cleartimeout(cont.cycletimeout); cont.cycletimeout = 0; } if (typeof arg2 == 'string') options.onetimefx = arg2; go(options.elements, options, 1, num >= options.currslide); return false; } return options; function checkinstantresume(ispaused, arg2, cont) { if (!ispaused && arg2 === true) { // resume now! var options = $(cont).data('cycle.opts'); if (!options) { log('options not found, can not resume'); return false; } if (cont.cycletimeout) { cleartimeout(cont.cycletimeout); cont.cycletimeout = 0; } go(options.elements, options, 1, !options.backwards); } } } function removefilter(el, opts) { if (!$.support.opacity && opts.cleartype && el.style.filter) { try { el.style.removeattribute('filter'); } catch(smother) {} // handle old opera versions } } // unbind event handlers function destroy(cont, opts) { if (opts.next) $(opts.next).unbind(opts.prevnextevent); if (opts.prev) $(opts.prev).unbind(opts.prevnextevent); if (opts.pager || opts.pageranchorbuilder) $.each(opts.pageranchors || [], function() { this.unbind().remove(); }); opts.pageranchors = null; $(cont).unbind('mouseenter.cycle mouseleave.cycle'); if (opts.destroy) // callback opts.destroy(opts); } // one-time initialization function buildoptions($cont, $slides, els, options, o) { var startingslidespecified; // support metadata plugin (v1.0 and v2.0) var opts = $.extend({}, $.fn.cycle.defaults, options || {}, $.metadata ? $cont.metadata() : $.meta ? $cont.data() : {}); var meta = $.isfunction($cont.data) ? $cont.data(opts.metaattr) : null; if (meta) opts = $.extend(opts, meta); if (opts.autostop) opts.countdown = opts.autostopcount || els.length; var cont = $cont[0]; $cont.data('cycle.opts', opts); opts.$cont = $cont; opts.stopcount = cont.cyclestop; opts.elements = els; opts.before = opts.before ? [opts.before] : []; opts.after = opts.after ? [opts.after] : []; // push some after callbacks if (!$.support.opacity && opts.cleartype) opts.after.push(function() { removefilter(this, opts); }); if (opts.continuous) opts.after.push(function() { go(els,opts,0,!opts.backwards); }); saveoriginalopts(opts); // cleartype corrections if (!$.support.opacity && opts.cleartype && !opts.cleartypenobg) cleartypefix($slides); // container requires non-static position so that slides can be position within if ($cont.css('position') == 'static') $cont.css('position', 'relative'); if (opts.width) $cont.width(opts.width); if (opts.height && opts.height != 'auto') $cont.height(opts.height); if (opts.startingslide !== undefined) { opts.startingslide = parseint(opts.startingslide,10); if (opts.startingslide >= els.length || opts.startslide < 0) opts.startingslide = 0; // catch bogus input else startingslidespecified = true; } else if (opts.backwards) opts.startingslide = els.length - 1; else opts.startingslide = 0; // if random, mix up the slide array if (opts.random) { opts.randommap = []; for (var i = 0; i < els.length; i++) opts.randommap.push(i); opts.randommap.sort(function(a,b) {return math.random() - 0.5;}); if (startingslidespecified) { // try to find the specified starting slide and if found set start slide index in the map accordingly for ( var cnt = 0; cnt < els.length; cnt++ ) { if ( opts.startingslide == opts.randommap[cnt] ) { opts.randomindex = cnt; } } } else { opts.randomindex = 1; opts.startingslide = opts.randommap[1]; } } else if (opts.startingslide >= els.length) opts.startingslide = 0; // catch bogus input opts.currslide = opts.startingslide || 0; var first = opts.startingslide; // set position and zindex on all the slides $slides.css({position: 'absolute', top:0, left:0}).hide().each(function(i) { var z; if (opts.backwards) z = first ? i <= first ? els.length + (i-first) : first-i : els.length-i; else z = first ? i >= first ? els.length - (i-first) : first-i : els.length-i; $(this).css('z-index', z); }); // make sure first slide is visible $(els[first]).css('opacity',1).show(); // opacity bit needed to handle restart use case removefilter(els[first], opts); // stretch slides if (opts.fit) { if (!opts.aspect) { if (opts.width) $slides.width(opts.width); if (opts.height && opts.height != 'auto') $slides.height(opts.height); } else { $slides.each(function(){ var $slide = $(this); var ratio = (opts.aspect === true) ? $slide.width()/$slide.height() : opts.aspect; if( opts.width && $slide.width() != opts.width ) { $slide.width( opts.width ); $slide.height( opts.width / ratio ); } if( opts.height && $slide.height() < opts.height ) { $slide.height( opts.height ); $slide.width( opts.height * ratio ); } }); } } if (opts.center && ((!opts.fit) || opts.aspect)) { $slides.each(function(){ var $slide = $(this); $slide.css({ "margin-left": opts.width ? ((opts.width - $slide.width()) / 2) + "px" : 0, "margin-top": opts.height ? ((opts.height - $slide.height()) / 2) + "px" : 0 }); }); } if (opts.center && !opts.fit && !opts.slideresize) { $slides.each(function(){ var $slide = $(this); $slide.css({ "margin-left": opts.width ? ((opts.width - $slide.width()) / 2) + "px" : 0, "margin-top": opts.height ? ((opts.height - $slide.height()) / 2) + "px" : 0 }); }); } // stretch container var reshape = (opts.containerresize || opts.containerresizeheight) && $cont.innerheight() < 1; if (reshape) { // do this only if container has no size http://tinyurl.com/da2oa9 var maxw = 0, maxh = 0; for(var j=0; j < els.length; j++) { var $e = $(els[j]), e = $e[0], w = $e.outerwidth(), h = $e.outerheight(); if (!w) w = e.offsetwidth || e.width || $e.attr('width'); if (!h) h = e.offsetheight || e.height || $e.attr('height'); maxw = w > maxw ? w : maxw; maxh = h > maxh ? h : maxh; } if (opts.containerresize && maxw > 0 && maxh > 0) $cont.css({width:maxw+'px',height:maxh+'px'}); if (opts.containerresizeheight && maxh > 0) $cont.css({height:maxh+'px'}); } var pauseflag = false; // https://github.com/malsup/cycle/issues/44 if (opts.pause) $cont.bind('mouseenter.cycle', function(){ pauseflag = true; this.cyclepause++; triggerpause(cont, true); }).bind('mouseleave.cycle', function(){ if (pauseflag) this.cyclepause--; triggerpause(cont, true); }); if (supportmultitransitions(opts) === false) return false; // apparently a lot of people use image slideshows without height/width attributes on the images. // cycle 2.50+ requires the sizing info for every slide; this block tries to deal with that. var requeue = false; options.requeueattempts = options.requeueattempts || 0; $slides.each(function() { // try to get height/width of each slide var $el = $(this); this.cycleh = (opts.fit && opts.height) ? opts.height : ($el.height() || this.offsetheight || this.height || $el.attr('height') || 0); this.cyclew = (opts.fit && opts.width) ? opts.width : ($el.width() || this.offsetwidth || this.width || $el.attr('width') || 0); if ( $el.is('img') ) { var loading = (this.cycleh === 0 && this.cyclew === 0 && !this.complete); // don't requeue for images that are still loading but have a valid size if (loading) { if (o.s && opts.requeueonimagenotloaded && ++options.requeueattempts < 100) { // track retry count so we don't loop forever log(options.requeueattempts,' - img slide not loaded, requeuing slideshow: ', this.src, this.cyclew, this.cycleh); settimeout(function() {$(o.s,o.c).cycle(options);}, opts.requeuetimeout); requeue = true; return false; // break each loop } else { log('could not determine size of image: '+this.src, this.cyclew, this.cycleh); } } } return true; }); if (requeue) return false; opts.cssbefore = opts.cssbefore || {}; opts.cssafter = opts.cssafter || {}; opts.cssfirst = opts.cssfirst || {}; opts.animin = opts.animin || {}; opts.animout = opts.animout || {}; $slides.not(':eq('+first+')').css(opts.cssbefore); $($slides[first]).css(opts.cssfirst); if (opts.timeout) { opts.timeout = parseint(opts.timeout,10); // ensure that timeout and speed settings are sane if (opts.speed.constructor == string) opts.speed = $.fx.speeds[opts.speed] || parseint(opts.speed,10); if (!opts.sync) opts.speed = opts.speed / 2; var buffer = opts.fx == 'none' ? 0 : opts.fx == 'shuffle' ? 500 : 250; while((opts.timeout - opts.speed) < buffer) // sanitize timeout opts.timeout += opts.speed; } if (opts.easing) opts.easein = opts.easeout = opts.easing; if (!opts.speedin) opts.speedin = opts.speed; if (!opts.speedout) opts.speedout = opts.speed; opts.slidecount = els.length; opts.currslide = opts.lastslide = first; if (opts.random) { if (++opts.randomindex == els.length) opts.randomindex = 0; opts.nextslide = opts.randommap[opts.randomindex]; } else if (opts.backwards) opts.nextslide = opts.startingslide === 0 ? (els.length-1) : opts.startingslide-1; else opts.nextslide = opts.startingslide >= (els.length-1) ? 0 : opts.startingslide+1; // run transition init fn if (!opts.multifx) { var init = $.fn.cycle.transitions[opts.fx]; if ($.isfunction(init)) init($cont, $slides, opts); else if (opts.fx != 'custom' && !opts.multifx) { log('unknown transition: ' + opts.fx,'; slideshow terminating'); return false; } } // fire artificial events var e0 = $slides[first]; if (!opts.skipinitializationcallbacks) { if (opts.before.length) opts.before[0].apply(e0, [e0, e0, opts, true]); if (opts.after.length) opts.after[0].apply(e0, [e0, e0, opts, true]); } if (opts.next) $(opts.next).bind(opts.prevnextevent,function(){return advance(opts,1);}); if (opts.prev) $(opts.prev).bind(opts.prevnextevent,function(){return advance(opts,0);}); if (opts.pager || opts.pageranchorbuilder) buildpager(els,opts); exposeaddslide(opts, els); return opts; } // save off original opts so we can restore after clearing state function saveoriginalopts(opts) { opts.original = { before: [], after: [] }; opts.original.cssbefore = $.extend({}, opts.cssbefore); opts.original.cssafter = $.extend({}, opts.cssafter); opts.original.animin = $.extend({}, opts.animin); opts.original.animout = $.extend({}, opts.animout); $.each(opts.before, function() { opts.original.before.push(this); }); $.each(opts.after, function() { opts.original.after.push(this); }); } function supportmultitransitions(opts) { var i, tx, txs = $.fn.cycle.transitions; // look for multiple effects if (opts.fx.indexof(',') > 0) { opts.multifx = true; opts.fxs = opts.fx.replace(/\s*/g,'').split(','); // discard any bogus effect names for (i=0; i < opts.fxs.length; i++) { var fx = opts.fxs[i]; tx = txs[fx]; if (!tx || !txs.hasownproperty(fx) || !$.isfunction(tx)) { log('discarding unknown transition: ',fx); opts.fxs.splice(i,1); i--; } } // if we have an empty list then we threw everything away! if (!opts.fxs.length) { log('no valid transitions named; slideshow terminating.'); return false; } } else if (opts.fx == 'all') { // auto-gen the list of transitions opts.multifx = true; opts.fxs = []; for (var p in txs) { if (txs.hasownproperty(p)) { tx = txs[p]; if (txs.hasownproperty(p) && $.isfunction(tx)) opts.fxs.push(p); } } } if (opts.multifx && opts.randomizeeffects) { // munge the fxs array to make effect selection random var r1 = math.floor(math.random() * 20) + 30; for (i = 0; i < r1; i++) { var r2 = math.floor(math.random() * opts.fxs.length); opts.fxs.push(opts.fxs.splice(r2,1)[0]); } debug('randomized fx sequence: ',opts.fxs); } return true; } // provide a mechanism for adding slides after the slideshow has started function exposeaddslide(opts, els) { opts.addslide = function(newslide, prepend) { var $s = $(newslide), s = $s[0]; if (!opts.autostopcount) opts.countdown++; els[prepend?'unshift':'push'](s); if (opts.els) opts.els[prepend?'unshift':'push'](s); // shuffle needs this opts.slidecount = els.length; // add the slide to the random map and resort if (opts.random) { opts.randommap.push(opts.slidecount-1); opts.randommap.sort(function(a,b) {return math.random() - 0.5;}); } $s.css('position','absolute'); $s[prepend?'prependto':'appendto'](opts.$cont); if (prepend) { opts.currslide++; opts.nextslide++; } if (!$.support.opacity && opts.cleartype && !opts.cleartypenobg) cleartypefix($s); if (opts.fit && opts.width) $s.width(opts.width); if (opts.fit && opts.height && opts.height != 'auto') $s.height(opts.height); s.cycleh = (opts.fit && opts.height) ? opts.height : $s.height(); s.cyclew = (opts.fit && opts.width) ? opts.width : $s.width(); $s.css(opts.cssbefore); if (opts.pager || opts.pageranchorbuilder) $.fn.cycle.createpageranchor(els.length-1, s, $(opts.pager), els, opts); if ($.isfunction(opts.onaddslide)) opts.onaddslide($s); else $s.hide(); // default behavior }; } // reset internal state; we do this on every pass in order to support multiple effects $.fn.cycle.resetstate = function(opts, fx) { fx = fx || opts.fx; opts.before = []; opts.after = []; opts.cssbefore = $.extend({}, opts.original.cssbefore); opts.cssafter = $.extend({}, opts.original.cssafter); opts.animin = $.extend({}, opts.original.animin); opts.animout = $.extend({}, opts.original.animout); opts.fxfn = null; $.each(opts.original.before, function() { opts.before.push(this); }); $.each(opts.original.after, function() { opts.after.push(this); }); // re-init var init = $.fn.cycle.transitions[fx]; if ($.isfunction(init)) init(opts.$cont, $(opts.elements), opts); }; // this is the main engine fn, it handles the timeouts, callbacks and slide index mgmt function go(els, opts, manual, fwd) { var p = opts.$cont[0], curr = els[opts.currslide], next = els[opts.nextslide]; // opts.busy is true if we're in the middle of an animation if (manual && opts.busy && opts.manualtrump) { // let manual transitions requests trump active ones debug('manualtrump in go(), stopping active transition'); $(els).stop(true,true); opts.busy = 0; cleartimeout(p.cycletimeout); } // don't begin another timeout-based transition if there is one active if (opts.busy) { debug('transition active, ignoring new tx request'); return; } // stop cycling if we have an outstanding stop request if (p.cyclestop != opts.stopcount || p.cycletimeout === 0 && !manual) return; // check to see if we should stop cycling based on autostop options if (!manual && !p.cyclepause && !opts.bounce && ((opts.autostop && (--opts.countdown <= 0)) || (opts.nowrap && !opts.random && opts.nextslide < opts.currslide))) { if (opts.end) opts.end(opts); return; } // if slideshow is paused, only transition on a manual trigger var changed = false; if ((manual || !p.cyclepause) && (opts.nextslide != opts.currslide)) { changed = true; var fx = opts.fx; // keep trying to get the slide size if we don't have it yet curr.cycleh = curr.cycleh || $(curr).height(); curr.cyclew = curr.cyclew || $(curr).width(); next.cycleh = next.cycleh || $(next).height(); next.cyclew = next.cyclew || $(next).width(); // support multiple transition types if (opts.multifx) { if (fwd && (opts.lastfx === undefined || ++opts.lastfx >= opts.fxs.length)) opts.lastfx = 0; else if (!fwd && (opts.lastfx === undefined || --opts.lastfx < 0)) opts.lastfx = opts.fxs.length - 1; fx = opts.fxs[opts.lastfx]; } // one-time fx overrides apply to: $('div').cycle(3,'zoom'); if (opts.onetimefx) { fx = opts.onetimefx; opts.onetimefx = null; } $.fn.cycle.resetstate(opts, fx); // run the before callbacks if (opts.before.length) $.each(opts.before, function(i,o) { if (p.cyclestop != opts.stopcount) return; o.apply(next, [curr, next, opts, fwd]); }); // stage the after callacks var after = function() { opts.busy = 0; $.each(opts.after, function(i,o) { if (p.cyclestop != opts.stopcount) return; o.apply(next, [curr, next, opts, fwd]); }); if (!p.cyclestop) { // queue next transition queuenext(); } }; debug('tx firing('+fx+'); currslide: ' + opts.currslide + '; nextslide: ' + opts.nextslide); // get ready to perform the transition opts.busy = 1; if (opts.fxfn) // fx function provided? opts.fxfn(curr, next, opts, after, fwd, manual && opts.fastonevent); else if ($.isfunction($.fn.cycle[opts.fx])) // fx plugin ? $.fn.cycle[opts.fx](curr, next, opts, after, fwd, manual && opts.fastonevent); else $.fn.cycle.custom(curr, next, opts, after, fwd, manual && opts.fastonevent); } else { queuenext(); } if (changed || opts.nextslide == opts.currslide) { // calculate the next slide var roll; opts.lastslide = opts.currslide; if (opts.random) { opts.currslide = opts.nextslide; if (++opts.randomindex == els.length) { opts.randomindex = 0; opts.randommap.sort(function(a,b) {return math.random() - 0.5;}); } opts.nextslide = opts.randommap[opts.randomindex]; if (opts.nextslide == opts.currslide) opts.nextslide = (opts.currslide == opts.slidecount - 1) ? 0 : opts.currslide + 1; } else if (opts.backwards) { roll = (opts.nextslide - 1) < 0; if (roll && opts.bounce) { opts.backwards = !opts.backwards; opts.nextslide = 1; opts.currslide = 0; } else { opts.nextslide = roll ? (els.length-1) : opts.nextslide-1; opts.currslide = roll ? 0 : opts.nextslide+1; } } else { // sequence roll = (opts.nextslide + 1) == els.length; if (roll && opts.bounce) { opts.backwards = !opts.backwards; opts.nextslide = els.length-2; opts.currslide = els.length-1; } else { opts.nextslide = roll ? 0 : opts.nextslide+1; opts.currslide = roll ? els.length-1 : opts.nextslide-1; } } } if (changed && opts.pager) opts.updateactivepagerlink(opts.pager, opts.currslide, opts.activepagerclass); function queuenext() { // stage the next transition var ms = 0, timeout = opts.timeout; if (opts.timeout && !opts.continuous) { ms = gettimeout(els[opts.currslide], els[opts.nextslide], opts, fwd); if (opts.fx == 'shuffle') ms -= opts.speedout; } else if (opts.continuous && p.cyclepause) // continuous shows work off an after callback, not this timer logic ms = 10; if (ms > 0) p.cycletimeout = settimeout(function(){ go(els, opts, 0, !opts.backwards); }, ms); } } // invoked after transition $.fn.cycle.updateactivepagerlink = function(pager, currslide, clsname) { $(pager).each(function() { $(this).children().removeclass(clsname).eq(currslide).addclass(clsname); }); }; // calculate timeout value for current transition function gettimeout(curr, next, opts, fwd) { if (opts.timeoutfn) { // call user provided calc fn var t = opts.timeoutfn.call(curr,curr,next,opts,fwd); while (opts.fx != 'none' && (t - opts.speed) < 250) // sanitize timeout t += opts.speed; debug('calculated timeout: ' + t + '; speed: ' + opts.speed); if (t !== false) return t; } return opts.timeout; } // expose next/prev function, caller must pass in state $.fn.cycle.next = function(opts) { advance(opts,1); }; $.fn.cycle.prev = function(opts) { advance(opts,0);}; // advance slide forward or back function advance(opts, moveforward) { var val = moveforward ? 1 : -1; var els = opts.elements; var p = opts.$cont[0], timeout = p.cycletimeout; if (timeout) { cleartimeout(timeout); p.cycletimeout = 0; } if (opts.random && val < 0) { // move back to the previously display slide opts.randomindex--; if (--opts.randomindex == -2) opts.randomindex = els.length-2; else if (opts.randomindex == -1) opts.randomindex = els.length-1; opts.nextslide = opts.randommap[opts.randomindex]; } else if (opts.random) { opts.nextslide = opts.randommap[opts.randomindex]; } else { opts.nextslide = opts.currslide + val; if (opts.nextslide < 0) { if (opts.nowrap) return false; opts.nextslide = els.length - 1; } else if (opts.nextslide >= els.length) { if (opts.nowrap) return false; opts.nextslide = 0; } } var cb = opts.onprevnextevent || opts.prevnextclick; // prevnextclick is deprecated if ($.isfunction(cb)) cb(val > 0, opts.nextslide, els[opts.nextslide]); go(els, opts, 1, moveforward); return false; } function buildpager(els, opts) { var $p = $(opts.pager); $.each(els, function(i,o) { $.fn.cycle.createpageranchor(i,o,$p,els,opts); }); opts.updateactivepagerlink(opts.pager, opts.startingslide, opts.activepagerclass); } $.fn.cycle.createpageranchor = function(i, el, $p, els, opts) { var a; if ($.isfunction(opts.pageranchorbuilder)) { a = opts.pageranchorbuilder(i,el); debug('pageranchorbuilder('+i+', el) returned: ' + a); } else a = ''+(i+1)+''; if (!a) return; var $a = $(a); // don't reparent if anchor is in the dom if ($a.parents('body').length === 0) { var arr = []; if ($p.length > 1) { $p.each(function() { var $clone = $a.clone(true); $(this).append($clone); arr.push($clone[0]); }); $a = $(arr); } else { $a.appendto($p); } } opts.pageranchors = opts.pageranchors || []; opts.pageranchors.push($a); var pagerfn = function(e) { e.preventdefault(); opts.nextslide = i; var p = opts.$cont[0], timeout = p.cycletimeout; if (timeout) { cleartimeout(timeout); p.cycletimeout = 0; } var cb = opts.onpagerevent || opts.pagerclick; // pagerclick is deprecated if ($.isfunction(cb)) cb(opts.nextslide, els[opts.nextslide]); go(els,opts,1,opts.currslide < i); // trigger the trans // return false; // <== allow bubble }; if ( /mouseenter|mouseover/i.test(opts.pagerevent) ) { $a.hover(pagerfn, function(){/* no-op */} ); } else { $a.bind(opts.pagerevent, pagerfn); } if ( ! /^click/.test(opts.pagerevent) && !opts.allowpagerclickbubble) $a.bind('click.cycle', function(){return false;}); // suppress click var cont = opts.$cont[0]; var pauseflag = false; // https://github.com/malsup/cycle/issues/44 if (opts.pauseonpagerhover) { $a.hover( function() { pauseflag = true; cont.cyclepause++; triggerpause(cont,true,true); }, function() { if (pauseflag) cont.cyclepause--; triggerpause(cont,true,true); } ); } }; // helper fn to calculate the number of slides between the current and the next $.fn.cycle.hopsfromlast = function(opts, fwd) { var hops, l = opts.lastslide, c = opts.currslide; if (fwd) hops = c > l ? c - l : opts.slidecount - l; else hops = c < l ? l - c : l + opts.slidecount - c; return hops; }; // fix cleartype problems in ie6 by setting an explicit bg color // (otherwise text slides look horrible during a fade transition) function cleartypefix($slides) { debug('applying cleartype background-color hack'); function hex(s) { s = parseint(s,10).tostring(16); return s.length < 2 ? '0'+s : s; } function getbg(e) { for ( ; e && e.nodename.tolowercase() != 'html'; e = e.parentnode) { var v = $.css(e,'background-color'); if (v && v.indexof('rgb') >= 0 ) { var rgb = v.match(/\d+/g); return '#'+ hex(rgb[0]) + hex(rgb[1]) + hex(rgb[2]); } if (v && v != 'transparent') return v; } return '#ffffff'; } $slides.each(function() { $(this).css('background-color', getbg(this)); }); } // reset common props before the next transition $.fn.cycle.commonreset = function(curr,next,opts,w,h,rev) { $(opts.elements).not(curr).hide(); if (typeof opts.cssbefore.opacity == 'undefined') opts.cssbefore.opacity = 1; opts.cssbefore.display = 'block'; if (opts.slideresize && w !== false && next.cyclew > 0) opts.cssbefore.width = next.cyclew; if (opts.slideresize && h !== false && next.cycleh > 0) opts.cssbefore.height = next.cycleh; opts.cssafter = opts.cssafter || {}; opts.cssafter.display = 'none'; $(curr).css('zindex',opts.slidecount + (rev === true ? 1 : 0)); $(next).css('zindex',opts.slidecount + (rev === true ? 0 : 1)); }; // the actual fn for effecting a transition $.fn.cycle.custom = function(curr, next, opts, cb, fwd, speedoverride) { var $l = $(curr), $n = $(next); var speedin = opts.speedin, speedout = opts.speedout, easein = opts.easein, easeout = opts.easeout, animindelay = opts.animindelay, animoutdelay = opts.animoutdelay; $n.css(opts.cssbefore); if (speedoverride) { if (typeof speedoverride == 'number') speedin = speedout = speedoverride; else speedin = speedout = 1; easein = easeout = null; } var fn = function() { $n.delay(animindelay).animate(opts.animin, speedin, easein, function() { cb(); }); }; $l.delay(animoutdelay).animate(opts.animout, speedout, easeout, function() { $l.css(opts.cssafter); if (!opts.sync) fn(); }); if (opts.sync) fn(); }; // transition definitions - only fade is defined here, transition pack defines the rest $.fn.cycle.transitions = { fade: function($cont, $slides, opts) { $slides.not(':eq('+opts.currslide+')').css('opacity',0); opts.before.push(function(curr,next,opts) { $.fn.cycle.commonreset(curr,next,opts); opts.cssbefore.opacity = 0; }); opts.animin = { opacity: 1 }; opts.animout = { opacity: 0 }; opts.cssbefore = { top: 0, left: 0 }; } }; $.fn.cycle.ver = function() { return ver; }; // override these globally if you like (they are all optional) $.fn.cycle.defaults = { activepagerclass: 'activeslide', // class name used for the active pager link after: null, // transition callback (scope set to element that was shown): function(currslideelement, nextslideelement, options, forwardflag) allowpagerclickbubble: false, // allows or prevents click event on pager anchors from bubbling animin: null, // properties that define how the slide animates in animindelay: 0, // allows delay before next slide transitions in animout: null, // properties that define how the slide animates out animoutdelay: 0, // allows delay before current slide transitions out aspect: false, // preserve aspect ratio during fit resizing, cropping if necessary (must be used with fit option) autostop: 0, // true to end slideshow after x transitions (where x == slide count) autostopcount: 0, // number of transitions (optionally used with autostop to define x) backwards: false, // true to start slideshow at last slide and move backwards through the stack before: null, // transition callback (scope set to element to be shown): function(currslideelement, nextslideelement, options, forwardflag) center: null, // set to true to have cycle add top/left margin to each slide (use with width and height options) cleartype: !$.support.opacity, // true if cleartype corrections should be applied (for ie) cleartypenobg: false, // set to true to disable extra cleartype fixing (leave false to force background color setting on slides) containerresize: 1, // resize container to fit largest slide containerresizeheight: 0, // resize containers height to fit the largest slide but leave the width dynamic continuous: 0, // true to start next transition immediately after current one completes cssafter: null, // properties that defined the state of the slide after transitioning out cssbefore: null, // properties that define the initial state of the slide before transitioning in delay: 0, // additional delay (in ms) for first transition (hint: can be negative) easein: null, // easing for "in" transition easeout: null, // easing for "out" transition easing: null, // easing method for both in and out transitions end: null, // callback invoked when the slideshow terminates (use with autostop or nowrap options): function(options) fastonevent: 0, // force fast transitions when triggered manually (via pager or prev/next); value == time in ms fit: 0, // force slides to fit container fx: 'fade', // name of transition effect (or comma separated names, ex: 'fade,scrollup,shuffle') fxfn: null, // function used to control the transition: function(currslideelement, nextslideelement, options, aftercalback, forwardflag) height: 'auto', // container height (if the 'fit' option is true, the slides will be set to this height as well) manualtrump: true, // causes manual transition to stop an active transition instead of being ignored metaattr: 'cycle', // data- attribute that holds the option data for the slideshow next: null, // element, jquery object, or jquery selector string for the element to use as event trigger for next slide nowrap: 0, // true to prevent slideshow from wrapping onpagerevent: null, // callback fn for pager events: function(zerobasedslideindex, slideelement) onprevnextevent: null, // callback fn for prev/next events: function(isnext, zerobasedslideindex, slideelement) pager: null, // element, jquery object, or jquery selector string for the element to use as pager container pageranchorbuilder: null, // callback fn for building anchor links: function(index, domelement) pagerevent: 'click.cycle', // name of event which drives the pager navigation pause: 0, // true to enable "pause on hover" pauseonpagerhover: 0, // true to pause when hovering over pager link prev: null, // element, jquery object, or jquery selector string for the element to use as event trigger for previous slide prevnextevent: 'click.cycle',// event which drives the manual transition to the previous or next slide random: 0, // true for random, false for sequence (not applicable to shuffle fx) randomizeeffects: 1, // valid when multiple effects are used; true to make the effect sequence random requeueonimagenotloaded: true, // requeue the slideshow if any image slides are not yet loaded requeuetimeout: 250, // ms delay for requeue rev: 0, // causes animations to transition in reverse (for effects that support it such as scrollhorz/scrollvert/shuffle) shuffle: null, // coords for shuffle animation, ex: { top:15, left: 200 } skipinitializationcallbacks: false, // set to true to disable the first before/after callback that occurs prior to any transition slideexpr: null, // expression for selecting slides (if something other than all children is required) slideresize: 1, // force slide width/height to fixed size before every transition speed: 1000, // speed of the transition (any valid fx speed value) speedin: null, // speed of the 'in' transition speedout: null, // speed of the 'out' transition startingslide: undefined,// zero-based index of the first slide to be displayed sync: 1, // true if in/out transitions should occur simultaneously timeout: 4000, // milliseconds between slide transitions (0 to disable auto advance) timeoutfn: null, // callback for determining per-slide timeout value: function(currslideelement, nextslideelement, options, forwardflag) updateactivepagerlink: null,// callback fn invoked to update the active pager link (adds/removes activepagerclass style) width: null // container width (if the 'fit' option is true, the slides will be set to this width as well) }; })(jquery); /*! * jquery cycle plugin transition definitions * this script is a plugin for the jquery cycle plugin * examples and documentation at: http://malsup.com/jquery/cycle/ * copyright (c) 2007-2010 m. alsup * version: 2.73 * dual licensed under the mit and gpl licenses: * http://www.opensource.org/licenses/mit-license.php * http://www.gnu.org/licenses/gpl.html */ (function($) { "use strict"; // // these functions define slide initialization and properties for the named // transitions. to save file size feel free to remove any of these that you // don't need. // $.fn.cycle.transitions.none = function($cont, $slides, opts) { opts.fxfn = function(curr,next,opts,after){ $(next).show(); $(curr).hide(); after(); }; }; // not a cross-fade, fadeout only fades out the top slide $.fn.cycle.transitions.fadeout = function($cont, $slides, opts) { $slides.not(':eq('+opts.currslide+')').css({ display: 'block', 'opacity': 1 }); opts.before.push(function(curr,next,opts,w,h,rev) { $(curr).css('zindex',opts.slidecount + (rev !== true ? 1 : 0)); $(next).css('zindex',opts.slidecount + (rev !== true ? 0 : 1)); }); opts.animin.opacity = 1; opts.animout.opacity = 0; opts.cssbefore.opacity = 1; opts.cssbefore.display = 'block'; opts.cssafter.zindex = 0; }; // scrollup/down/left/right $.fn.cycle.transitions.scrollup = function($cont, $slides, opts) { $cont.css('overflow','hidden'); opts.before.push($.fn.cycle.commonreset); var h = $cont.height(); opts.cssbefore.top = h; opts.cssbefore.left = 0; opts.cssfirst.top = 0; opts.animin.top = 0; opts.animout.top = -h; }; $.fn.cycle.transitions.scrolldown = function($cont, $slides, opts) { $cont.css('overflow','hidden'); opts.before.push($.fn.cycle.commonreset); var h = $cont.height(); opts.cssfirst.top = 0; opts.cssbefore.top = -h; opts.cssbefore.left = 0; opts.animin.top = 0; opts.animout.top = h; }; $.fn.cycle.transitions.scrollleft = function($cont, $slides, opts) { $cont.css('overflow','hidden'); opts.before.push($.fn.cycle.commonreset); var w = $cont.width(); opts.cssfirst.left = 0; opts.cssbefore.left = w; opts.cssbefore.top = 0; opts.animin.left = 0; opts.animout.left = 0-w; }; $.fn.cycle.transitions.scrollright = function($cont, $slides, opts) { $cont.css('overflow','hidden'); opts.before.push($.fn.cycle.commonreset); var w = $cont.width(); opts.cssfirst.left = 0; opts.cssbefore.left = -w; opts.cssbefore.top = 0; opts.animin.left = 0; opts.animout.left = w; }; $.fn.cycle.transitions.scrollhorz = function($cont, $slides, opts) { $cont.css('overflow','hidden').width(); opts.before.push(function(curr, next, opts, fwd) { if (opts.rev) fwd = !fwd; $.fn.cycle.commonreset(curr,next,opts); opts.cssbefore.left = fwd ? (next.cyclew-1) : (1-next.cyclew); opts.animout.left = fwd ? -curr.cyclew : curr.cyclew; }); opts.cssfirst.left = 0; opts.cssbefore.top = 0; opts.animin.left = 0; opts.animout.top = 0; }; $.fn.cycle.transitions.scrollvert = function($cont, $slides, opts) { $cont.css('overflow','hidden'); opts.before.push(function(curr, next, opts, fwd) { if (opts.rev) fwd = !fwd; $.fn.cycle.commonreset(curr,next,opts); opts.cssbefore.top = fwd ? (1-next.cycleh) : (next.cycleh-1); opts.animout.top = fwd ? curr.cycleh : -curr.cycleh; }); opts.cssfirst.top = 0; opts.cssbefore.left = 0; opts.animin.top = 0; opts.animout.left = 0; }; // slidex/slidey $.fn.cycle.transitions.slidex = function($cont, $slides, opts) { opts.before.push(function(curr, next, opts) { $(opts.elements).not(curr).hide(); $.fn.cycle.commonreset(curr,next,opts,false,true); opts.animin.width = next.cyclew; }); opts.cssbefore.left = 0; opts.cssbefore.top = 0; opts.cssbefore.width = 0; opts.animin.width = 'show'; opts.animout.width = 0; }; $.fn.cycle.transitions.slidey = function($cont, $slides, opts) { opts.before.push(function(curr, next, opts) { $(opts.elements).not(curr).hide(); $.fn.cycle.commonreset(curr,next,opts,true,false); opts.animin.height = next.cycleh; }); opts.cssbefore.left = 0; opts.cssbefore.top = 0; opts.cssbefore.height = 0; opts.animin.height = 'show'; opts.animout.height = 0; }; // shuffle $.fn.cycle.transitions.shuffle = function($cont, $slides, opts) { var i, w = $cont.css('overflow', 'visible').width(); $slides.css({left: 0, top: 0}); opts.before.push(function(curr,next,opts) { $.fn.cycle.commonreset(curr,next,opts,true,true,true); }); // only adjust speed once! if (!opts.speedadjusted) { opts.speed = opts.speed / 2; // shuffle has 2 transitions opts.speedadjusted = true; } opts.random = 0; opts.shuffle = opts.shuffle || {left:-w, top:15}; opts.els = []; for (i=0; i < $slides.length; i++) opts.els.push($slides[i]); for (i=0; i < opts.currslide; i++) opts.els.push(opts.els.shift()); // custom transition fn (hat tip to benjamin sterling for this bit of sweetness!) opts.fxfn = function(curr, next, opts, cb, fwd) { if (opts.rev) fwd = !fwd; var $el = fwd ? $(curr) : $(next); $(next).css(opts.cssbefore); var count = opts.slidecount; $el.animate(opts.shuffle, opts.speedin, opts.easein, function() { var hops = $.fn.cycle.hopsfromlast(opts, fwd); for (var k=0; k < hops; k++) { if (fwd) opts.els.push(opts.els.shift()); else opts.els.unshift(opts.els.pop()); } if (fwd) { for (var i=0, len=opts.els.length; i < len; i++) $(opts.els[i]).css('z-index', len-i+count); } else { var z = $(curr).css('z-index'); $el.css('z-index', parseint(z,10)+1+count); } $el.animate({left:0, top:0}, opts.speedout, opts.easeout, function() { $(fwd ? this : curr).hide(); if (cb) cb(); }); }); }; $.extend(opts.cssbefore, { display: 'block', opacity: 1, top: 0, left: 0 }); }; // turnup/down/left/right $.fn.cycle.transitions.turnup = function($cont, $slides, opts) { opts.before.push(function(curr, next, opts) { $.fn.cycle.commonreset(curr,next,opts,true,false); opts.cssbefore.top = next.cycleh; opts.animin.height = next.cycleh; opts.animout.width = next.cyclew; }); opts.cssfirst.top = 0; opts.cssbefore.left = 0; opts.cssbefore.height = 0; opts.animin.top = 0; opts.animout.height = 0; }; $.fn.cycle.transitions.turndown = function($cont, $slides, opts) { opts.before.push(function(curr, next, opts) { $.fn.cycle.commonreset(curr,next,opts,true,false); opts.animin.height = next.cycleh; opts.animout.top = curr.cycleh; }); opts.cssfirst.top = 0; opts.cssbefore.left = 0; opts.cssbefore.top = 0; opts.cssbefore.height = 0; opts.animout.height = 0; }; $.fn.cycle.transitions.turnleft = function($cont, $slides, opts) { opts.before.push(function(curr, next, opts) { $.fn.cycle.commonreset(curr,next,opts,false,true); opts.cssbefore.left = next.cyclew; opts.animin.width = next.cyclew; }); opts.cssbefore.top = 0; opts.cssbefore.width = 0; opts.animin.left = 0; opts.animout.width = 0; }; $.fn.cycle.transitions.turnright = function($cont, $slides, opts) { opts.before.push(function(curr, next, opts) { $.fn.cycle.commonreset(curr,next,opts,false,true); opts.animin.width = next.cyclew; opts.animout.left = curr.cyclew; }); $.extend(opts.cssbefore, { top: 0, left: 0, width: 0 }); opts.animin.left = 0; opts.animout.width = 0; }; // zoom $.fn.cycle.transitions.zoom = function($cont, $slides, opts) { opts.before.push(function(curr, next, opts) { $.fn.cycle.commonreset(curr,next,opts,false,false,true); opts.cssbefore.top = next.cycleh/2; opts.cssbefore.left = next.cyclew/2; $.extend(opts.animin, { top: 0, left: 0, width: next.cyclew, height: next.cycleh }); $.extend(opts.animout, { width: 0, height: 0, top: curr.cycleh/2, left: curr.cyclew/2 }); }); opts.cssfirst.top = 0; opts.cssfirst.left = 0; opts.cssbefore.width = 0; opts.cssbefore.height = 0; }; // fadezoom $.fn.cycle.transitions.fadezoom = function($cont, $slides, opts) { opts.before.push(function(curr, next, opts) { $.fn.cycle.commonreset(curr,next,opts,false,false); opts.cssbefore.left = next.cyclew/2; opts.cssbefore.top = next.cycleh/2; $.extend(opts.animin, { top: 0, left: 0, width: next.cyclew, height: next.cycleh }); }); opts.cssbefore.width = 0; opts.cssbefore.height = 0; opts.animout.opacity = 0; }; // blindx $.fn.cycle.transitions.blindx = function($cont, $slides, opts) { var w = $cont.css('overflow','hidden').width(); opts.before.push(function(curr, next, opts) { $.fn.cycle.commonreset(curr,next,opts); opts.animin.width = next.cyclew; opts.animout.left = curr.cyclew; }); opts.cssbefore.left = w; opts.cssbefore.top = 0; opts.animin.left = 0; opts.animout.left = w; }; // blindy $.fn.cycle.transitions.blindy = function($cont, $slides, opts) { var h = $cont.css('overflow','hidden').height(); opts.before.push(function(curr, next, opts) { $.fn.cycle.commonreset(curr,next,opts); opts.animin.height = next.cycleh; opts.animout.top = curr.cycleh; }); opts.cssbefore.top = h; opts.cssbefore.left = 0; opts.animin.top = 0; opts.animout.top = h; }; // blindz $.fn.cycle.transitions.blindz = function($cont, $slides, opts) { var h = $cont.css('overflow','hidden').height(); var w = $cont.width(); opts.before.push(function(curr, next, opts) { $.fn.cycle.commonreset(curr,next,opts); opts.animin.height = next.cycleh; opts.animout.top = curr.cycleh; }); opts.cssbefore.top = h; opts.cssbefore.left = w; opts.animin.top = 0; opts.animin.left = 0; opts.animout.top = h; opts.animout.left = w; }; // growx - grow horizontally from centered 0 width $.fn.cycle.transitions.growx = function($cont, $slides, opts) { opts.before.push(function(curr, next, opts) { $.fn.cycle.commonreset(curr,next,opts,false,true); opts.cssbefore.left = this.cyclew/2; opts.animin.left = 0; opts.animin.width = this.cyclew; opts.animout.left = 0; }); opts.cssbefore.top = 0; opts.cssbefore.width = 0; }; // growy - grow vertically from centered 0 height $.fn.cycle.transitions.growy = function($cont, $slides, opts) { opts.before.push(function(curr, next, opts) { $.fn.cycle.commonreset(curr,next,opts,true,false); opts.cssbefore.top = this.cycleh/2; opts.animin.top = 0; opts.animin.height = this.cycleh; opts.animout.top = 0; }); opts.cssbefore.height = 0; opts.cssbefore.left = 0; }; // curtainx - squeeze in both edges horizontally $.fn.cycle.transitions.curtainx = function($cont, $slides, opts) { opts.before.push(function(curr, next, opts) { $.fn.cycle.commonreset(curr,next,opts,false,true,true); opts.cssbefore.left = next.cyclew/2; opts.animin.left = 0; opts.animin.width = this.cyclew; opts.animout.left = curr.cyclew/2; opts.animout.width = 0; }); opts.cssbefore.top = 0; opts.cssbefore.width = 0; }; // curtainy - squeeze in both edges vertically $.fn.cycle.transitions.curtainy = function($cont, $slides, opts) { opts.before.push(function(curr, next, opts) { $.fn.cycle.commonreset(curr,next,opts,true,false,true); opts.cssbefore.top = next.cycleh/2; opts.animin.top = 0; opts.animin.height = next.cycleh; opts.animout.top = curr.cycleh/2; opts.animout.height = 0; }); opts.cssbefore.height = 0; opts.cssbefore.left = 0; }; // cover - curr slide covered by next slide $.fn.cycle.transitions.cover = function($cont, $slides, opts) { var d = opts.direction || 'left'; var w = $cont.css('overflow','hidden').width(); var h = $cont.height(); opts.before.push(function(curr, next, opts) { $.fn.cycle.commonreset(curr,next,opts); opts.cssafter.display = ''; if (d == 'right') opts.cssbefore.left = -w; else if (d == 'up') opts.cssbefore.top = h; else if (d == 'down') opts.cssbefore.top = -h; else opts.cssbefore.left = w; }); opts.animin.left = 0; opts.animin.top = 0; opts.cssbefore.top = 0; opts.cssbefore.left = 0; }; // uncover - curr slide moves off next slide $.fn.cycle.transitions.uncover = function($cont, $slides, opts) { var d = opts.direction || 'left'; var w = $cont.css('overflow','hidden').width(); var h = $cont.height(); opts.before.push(function(curr, next, opts) { $.fn.cycle.commonreset(curr,next,opts,true,true,true); if (d == 'right') opts.animout.left = w; else if (d == 'up') opts.animout.top = -h; else if (d == 'down') opts.animout.top = h; else opts.animout.left = -w; }); opts.animin.left = 0; opts.animin.top = 0; opts.cssbefore.top = 0; opts.cssbefore.left = 0; }; // toss - move top slide and fade away $.fn.cycle.transitions.toss = function($cont, $slides, opts) { var w = $cont.css('overflow','visible').width(); var h = $cont.height(); opts.before.push(function(curr, next, opts) { $.fn.cycle.commonreset(curr,next,opts,true,true,true); // provide default toss settings if animout not provided if (!opts.animout.left && !opts.animout.top) $.extend(opts.animout, { left: w*2, top: -h/2, opacity: 0 }); else opts.animout.opacity = 0; }); opts.cssbefore.left = 0; opts.cssbefore.top = 0; opts.animin.left = 0; }; // wipe - clip animation $.fn.cycle.transitions.wipe = function($cont, $slides, opts) { var w = $cont.css('overflow','hidden').width(); var h = $cont.height(); opts.cssbefore = opts.cssbefore || {}; var clip; if (opts.clip) { if (/l2r/.test(opts.clip)) clip = 'rect(0px 0px '+h+'px 0px)'; else if (/r2l/.test(opts.clip)) clip = 'rect(0px '+w+'px '+h+'px '+w+'px)'; else if (/t2b/.test(opts.clip)) clip = 'rect(0px '+w+'px 0px 0px)'; else if (/b2t/.test(opts.clip)) clip = 'rect('+h+'px '+w+'px '+h+'px 0px)'; else if (/zoom/.test(opts.clip)) { var top = parseint(h/2,10); var left = parseint(w/2,10); clip = 'rect('+top+'px '+left+'px '+top+'px '+left+'px)'; } } opts.cssbefore.clip = opts.cssbefore.clip || clip || 'rect(0px 0px 0px 0px)'; var d = opts.cssbefore.clip.match(/(\d+)/g); var t = parseint(d[0],10), r = parseint(d[1],10), b = parseint(d[2],10), l = parseint(d[3],10); opts.before.push(function(curr, next, opts) { if (curr == next) return; var $curr = $(curr), $next = $(next); $.fn.cycle.commonreset(curr,next,opts,true,true,false); opts.cssafter.display = 'block'; var step = 1, count = parseint((opts.speedin / 13),10) - 1; (function f() { var tt = t ? t - parseint(step * (t/count),10) : 0; var ll = l ? l - parseint(step * (l/count),10) : 0; var bb = b < h ? b + parseint(step * ((h-b)/count || 1),10) : h; var rr = r < w ? r + parseint(step * ((w-r)/count || 1),10) : w; $next.css({ clip: 'rect('+tt+'px '+rr+'px '+bb+'px '+ll+'px)' }); (step++ <= count) ? settimeout(f, 13) : $curr.css('display', 'none'); })(); }); $.extend(opts.cssbefore, { display: 'block', opacity: 1, top: 0, left: 0 }); opts.animin = { left: 0 }; opts.animout = { left: 0 }; }; })(jquery);