/*! jquery v1.10.1 | (c) 2005, 2013 jquery foundation, inc. | jquery.org/license //jquery-1.10.1.min */ (function(e,t){var n,r,i=typeof t,o=e.location,a=e.document,s=a.documentelement,l=e.jquery,u=e.$,c={},p=[],f="1.10.1",d=p.concat,h=p.push,g=p.slice,m=p.indexof,y=c.tostring,v=c.hasownproperty,b=f.trim,x=function(e,t){return new x.fn.init(e,t,r)},w=/[+-]?(?:\d*\.|)\d+(?:[ee][+-]?\d+|)/.source,t=/\s+/g,c=/^[\s\ufeff\xa0]+|[\s\ufeff\xa0]+$/g,n=/^(?:\s*(<[\w\w]+>)[^>]*|#([\w-]*))$/,k=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,e=/^[\],:{}\s]*$/,s=/(?:^|:|,)(?:\s*\[)+/g,a=/\\(?:["\\\/bfnrt]|u[\da-fa-f]{4})/g,j=/"[^"\\\r\n]*"|true|false|null|-?(?:\d+\.|)\d+(?:[ee][+-]?\d+|)/g,d=/^-ms-/,l=/-([\da-z])/gi,h=function(e,t){return t.touppercase()},q=function(e){(a.addeventlistener||"load"===e.type||"complete"===a.readystate)&&(_(),x.ready())},_=function(){a.addeventlistener?(a.removeeventlistener("domcontentloaded",q,!1),e.removeeventlistener("load",q,!1)):(a.detachevent("onreadystatechange",q),e.detachevent("onload",q))};x.fn=x.prototype={jquery:f,constructor:x,init:function(e,n,r){var i,o;if(!e)return this;if("string"==typeof e){if(i="<"===e.charat(0)&&">"===e.charat(e.length-1)&&e.length>=3?[null,e,null]:n.exec(e),!i||!i[1]&&n)return!n||n.jquery?(n||r).find(e):this.constructor(n).find(e);if(i[1]){if(n=n instanceof x?n[0]:n,x.merge(this,x.parsehtml(i[1],n&&n.nodetype?n.ownerdocument||n:a,!0)),k.test(i[1])&&x.isplainobject(n))for(i in n)x.isfunction(this[i])?this[i](n[i]):this.attr(i,n[i]);return this}if(o=a.getelementbyid(i[2]),o&&o.parentnode){if(o.id!==i[2])return r.find(e);this.length=1,this[0]=o}return this.context=a,this.selector=e,this}return e.nodetype?(this.context=this[0]=e,this.length=1,this):x.isfunction(e)?r.ready(e):(e.selector!==t&&(this.selector=e.selector,this.context=e.context),x.makearray(e,this))},selector:"",length:0,toarray:function(){return g.call(this)},get:function(e){return null==e?this.toarray():0>e?this[this.length+e]:this[e]},pushstack:function(e){var t=x.merge(this.constructor(),e);return t.prevobject=this,t.context=this.context,t},each:function(e,t){return x.each(this,e,t)},ready:function(e){return x.ready.promise().done(e),this},slice:function(){return this.pushstack(g.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(0>e?t:0);return this.pushstack(n>=0&&t>n?[this[n]]:[])},map:function(e){return this.pushstack(x.map(this,function(t,n){return e.call(t,n,t)}))},end:function(){return this.prevobject||this.constructor(null)},push:h,sort:[].sort,splice:[].splice},x.fn.init.prototype=x.fn,x.extend=x.fn.extend=function(){var e,n,r,i,o,a,s=arguments[0]||{},l=1,u=arguments.length,c=!1;for("boolean"==typeof s&&(c=s,s=arguments[1]||{},l=2),"object"==typeof s||x.isfunction(s)||(s={}),u===l&&(s=this,--l);u>l;l++)if(null!=(o=arguments[l]))for(i in o)e=s[i],r=o[i],s!==r&&(c&&r&&(x.isplainobject(r)||(n=x.isarray(r)))?(n?(n=!1,a=e&&x.isarray(e)?e:[]):a=e&&x.isplainobject(e)?e:{},s[i]=x.extend(c,a,r)):r!==t&&(s[i]=r));return s},x.extend({expando:"jquery"+(f+math.random()).replace(/\d/g,""),noconflict:function(t){return e.$===x&&(e.$=u),t&&e.jquery===x&&(e.jquery=l),x},isready:!1,readywait:1,holdready:function(e){e?x.readywait++:x.ready(!0)},ready:function(e){if(e===!0?!--x.readywait:!x.isready){if(!a.body)return settimeout(x.ready);x.isready=!0,e!==!0&&--x.readywait>0||(n.resolvewith(a,[x]),x.fn.trigger&&x(a).trigger("ready").off("ready"))}},isfunction:function(e){return"function"===x.type(e)},isarray:array.isarray||function(e){return"array"===x.type(e)},iswindow:function(e){return null!=e&&e==e.window},isnumeric:function(e){return!isnan(parsefloat(e))&&isfinite(e)},type:function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?c[y.call(e)]||"object":typeof e},isplainobject:function(e){var n;if(!e||"object"!==x.type(e)||e.nodetype||x.iswindow(e))return!1;try{if(e.constructor&&!v.call(e,"constructor")&&!v.call(e.constructor.prototype,"isprototypeof"))return!1}catch(r){return!1}if(x.support.ownlast)for(n in e)return v.call(e,n);for(n in e);return n===t||v.call(e,n)},isemptyobject:function(e){var t;for(t in e)return!1;return!0},error:function(e){throw error(e)},parsehtml:function(e,t,n){if(!e||"string"!=typeof e)return null;"boolean"==typeof t&&(n=t,t=!1),t=t||a;var r=k.exec(e),i=!n&&[];return r?[t.createelement(r[1])]:(r=x.buildfragment([e],t,i),i&&x(i).remove(),x.merge([],r.childnodes))},parsejson:function(n){return e.json&&e.json.parse?e.json.parse(n):null===n?n:"string"==typeof n&&(n=x.trim(n),n&&e.test(n.replace(a,"@").replace(j,"]").replace(s,"")))?function("return "+n)():(x.error("invalid json: "+n),t)},parsexml:function(n){var r,i;if(!n||"string"!=typeof n)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(o){r=t}return r&&r.documentelement&&!r.getelementsbytagname("parsererror").length||x.error("invalid xml: "+n),r},noop:function(){},globaleval:function(t){t&&x.trim(t)&&(e.execscript||function(t){e.eval.call(e,t)})(t)},camelcase:function(e){return e.replace(d,"ms-").replace(l,h)},nodename:function(e,t){return e.nodename&&e.nodename.tolowercase()===t.tolowercase()},each:function(e,t,n){var r,i=0,o=e.length,a=m(e);if(n){if(a){for(;o>i;i++)if(r=t.apply(e[i],n),r===!1)break}else for(i in e)if(r=t.apply(e[i],n),r===!1)break}else if(a){for(;o>i;i++)if(r=t.call(e[i],i,e[i]),r===!1)break}else for(i in e)if(r=t.call(e[i],i,e[i]),r===!1)break;return e},trim:b&&!b.call("\ufeff\u00a0")?function(e){return null==e?"":b.call(e)}:function(e){return null==e?"":(e+"").replace(c,"")},makearray:function(e,t){var n=t||[];return null!=e&&(m(object(e))?x.merge(n,"string"==typeof e?[e]:e):h.call(n,e)),n},inarray:function(e,t,n){var r;if(t){if(m)return m.call(t,e,n);for(r=t.length,n=n?0>n?math.max(0,r+n):n:0;r>n;n++)if(n in t&&t[n]===e)return n}return-1},merge:function(e,n){var r=n.length,i=e.length,o=0;if("number"==typeof r)for(;r>o;o++)e[i++]=n[o];else while(n[o]!==t)e[i++]=n[o++];return e.length=i,e},grep:function(e,t,n){var r,i=[],o=0,a=e.length;for(n=!!n;a>o;o++)r=!!t(e[o],o),n!==r&&i.push(e[o]);return i},map:function(e,t,n){var r,i=0,o=e.length,a=m(e),s=[];if(a)for(;o>i;i++)r=t(e[i],i,n),null!=r&&(s[s.length]=r);else for(i in e)r=t(e[i],i,n),null!=r&&(s[s.length]=r);return d.apply([],s)},guid:1,proxy:function(e,n){var r,i,o;return"string"==typeof n&&(o=e[n],n=e,e=o),x.isfunction(e)?(r=g.call(arguments,2),i=function(){return e.apply(n||this,r.concat(g.call(arguments)))},i.guid=e.guid=e.guid||x.guid++,i):t},access:function(e,n,r,i,o,a,s){var l=0,u=e.length,c=null==r;if("object"===x.type(r)){o=!0;for(l in r)x.access(e,n,l,r[l],!0,a,s)}else if(i!==t&&(o=!0,x.isfunction(i)||(s=!0),c&&(s?(n.call(e,i),n=null):(c=n,n=function(e,t,n){return c.call(x(e),n)})),n))for(;u>l;l++)n(e[l],r,s?i:i.call(e[l],l,n(e[l],r)));return o?e:c?n.call(e):u?n(e[0],r):a},now:function(){return(new date).gettime()},swap:function(e,t,n,r){var i,o,a={};for(o in t)a[o]=e.style[o],e.style[o]=t[o];i=n.apply(e,r||[]);for(o in t)e.style[o]=a[o];return i}}),x.ready.promise=function(t){if(!n)if(n=x.deferred(),"complete"===a.readystate)settimeout(x.ready);else if(a.addeventlistener)a.addeventlistener("domcontentloaded",q,!1),e.addeventlistener("load",q,!1);else{a.attachevent("onreadystatechange",q),e.attachevent("onload",q);var r=!1;try{r=null==e.frameelement&&a.documentelement}catch(i){}r&&r.doscroll&&function o(){if(!x.isready){try{r.doscroll("left")}catch(e){return settimeout(o,50)}_(),x.ready()}}()}return n.promise(t)},x.each("boolean number string function array date regexp object error".split(" "),function(e,t){c["[object "+t+"]"]=t.tolowercase()});function m(e){var t=e.length,n=x.type(e);return x.iswindow(e)?!1:1===e.nodetype&&t?!0:"array"===n||"function"!==n&&(0===t||"number"==typeof t&&t>0&&t-1 in e)}r=x(a),function(e,t){var n,r,i,o,a,s,l,u,c,p,f,d,h,g,m,y,v,b="sizzle"+-new date,w=e.document,t=0,c=0,n=lt(),k=lt(),e=lt(),s=!1,a=function(){return 0},j=typeof t,d=1<<31,l={}.hasownproperty,h=[],q=h.pop,_=h.push,m=h.push,o=h.slice,f=h.indexof||function(e){var t=0,n=this.length;for(;n>t;t++)if(this[t]===e)return t;return-1},b="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",p="[\\x20\\t\\r\\n\\f]",r="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",w=r.replace("w","w#"),$="\\["+p+"*("+r+")"+p+"*(?:([*^$|!~]?=)"+p+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+w+")|)|)"+p+"*\\]",i=":("+r+")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|"+$.replace(3,8)+")*)|.*)\\)|)",z=regexp("^"+p+"+|((?:^|[^\\\\])(?:\\\\.)*)"+p+"+$","g"),x=regexp("^"+p+"*,"+p+"*"),u=regexp("^"+p+"*([>+~]|"+p+")"+p+"*"),v=regexp(p+"*[+~]"),y=regexp("="+p+"*([^\\]'\"]*)"+p+"*\\]","g"),j=regexp(i),g=regexp("^"+w+"$"),q={id:regexp("^#("+r+")"),class:regexp("^\\.("+r+")"),tag:regexp("^("+r.replace("w","w*")+")"),attr:regexp("^"+$),pseudo:regexp("^"+i),child:regexp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+p+"*(even|odd|(([+-]|)(\\d*)n|)"+p+"*(?:([+-]|)"+p+"*(\\d+)|))"+p+"*\\)|)","i"),bool:regexp("^(?:"+b+")$","i"),needscontext:regexp("^"+p+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+p+"*((?:-\\d)?\\d*)"+p+"*\\)|)(?=[^-]|$)","i")},k=/^[^{]+\{\s*\[native \w/,z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,et=/^(?:input|select|textarea|button)$/i,tt=/^h\d$/i,nt=/'|\\/g,rt=regexp("\\\\([\\da-f]{1,6}"+p+"?|("+p+")|.)","ig"),it=function(e,t,n){var r="0x"+t-65536;return r!==r||n?t:0>r?string.fromcharcode(r+65536):string.fromcharcode(55296|r>>10,56320|1023&r)};try{m.apply(h=o.call(w.childnodes),w.childnodes),h[w.childnodes.length].nodetype}catch(ot){m={apply:h.length?function(e,t){_.apply(e,o.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function at(e,t,n,i){var o,a,s,l,u,c,d,m,y,x;if((t?t.ownerdocument||t:w)!==f&&p(t),t=t||f,n=n||[],!e||"string"!=typeof e)return n;if(1!==(l=t.nodetype)&&9!==l)return[];if(h&&!i){if(o=z.exec(e))if(s=o[1]){if(9===l){if(a=t.getelementbyid(s),!a||!a.parentnode)return n;if(a.id===s)return n.push(a),n}else if(t.ownerdocument&&(a=t.ownerdocument.getelementbyid(s))&&v(t,a)&&a.id===s)return n.push(a),n}else{if(o[2])return m.apply(n,t.getelementsbytagname(e)),n;if((s=o[3])&&r.getelementsbyclassname&&t.getelementsbyclassname)return m.apply(n,t.getelementsbyclassname(s)),n}if(r.qsa&&(!g||!g.test(e))){if(m=d=b,y=t,x=9===l&&e,1===l&&"object"!==t.nodename.tolowercase()){c=bt(e),(d=t.getattribute("id"))?m=d.replace(nt,"\\$&"):t.setattribute("id",m),m="[id='"+m+"'] ",u=c.length;while(u--)c[u]=m+xt(c[u]);y=v.test(e)&&t.parentnode||t,x=c.join(",")}if(x)try{return m.apply(n,y.queryselectorall(x)),n}catch(t){}finally{d||t.removeattribute("id")}}}return at(e.replace(z,"$1"),t,n,i)}function st(e){return k.test(e+"")}function lt(){var e=[];function t(n,r){return e.push(n+=" ")>o.cachelength&&delete t[e.shift()],t[n]=r}return t}function ut(e){return e[b]=!0,e}function ct(e){var t=f.createelement("div");try{return!!e(t)}catch(n){return!1}finally{t.parentnode&&t.parentnode.removechild(t),t=null}}function pt(e,t,n){e=e.split("|");var r,i=e.length,a=n?null:t;while(i--)(r=o.attrhandle[e[i]])&&r!==t||(o.attrhandle[e[i]]=a)}function ft(e,t){var n=e.getattributenode(t);return n&&n.specified?n.value:e[t]===!0?t.tolowercase():null}function dt(e,t){return e.getattribute(t,"type"===t.tolowercase()?1:2)}function ht(e){return"input"===e.nodename.tolowercase()?e.defaultvalue:t}function gt(e,t){var n=t&&e,r=n&&1===e.nodetype&&1===t.nodetype&&(~t.sourceindex||d)-(~e.sourceindex||d);if(r)return r;if(n)while(n=n.nextsibling)if(n===t)return-1;return e?1:-1}function mt(e){return function(t){var n=t.nodename.tolowercase();return"input"===n&&t.type===e}}function yt(e){return function(t){var n=t.nodename.tolowercase();return("input"===n||"button"===n)&&t.type===e}}function vt(e){return ut(function(t){return t=+t,ut(function(n,r){var i,o=e([],n.length,t),a=o.length;while(a--)n[i=o[a]]&&(n[i]=!(r[i]=n[i]))})})}s=at.isxml=function(e){var t=e&&(e.ownerdocument||e).documentelement;return t?"html"!==t.nodename:!1},r=at.support={},p=at.setdocument=function(e){var n=e?e.ownerdocument||e:w,i=n.parentwindow;return n!==f&&9===n.nodetype&&n.documentelement?(f=n,d=n.documentelement,h=!s(n),i&&i.frameelement&&i.attachevent("onbeforeunload",function(){p()}),r.attributes=ct(function(e){return e.innerhtml="",pt("type|href|height|width",dt,"#"===e.firstchild.getattribute("href")),pt(b,ft,null==e.getattribute("disabled")),e.classname="i",!e.getattribute("classname")}),r.input=ct(function(e){return e.innerhtml="",e.firstchild.setattribute("value",""),""===e.firstchild.getattribute("value")}),pt("value",ht,r.attributes&&r.input),r.getelementsbytagname=ct(function(e){return e.appendchild(n.createcomment("")),!e.getelementsbytagname("*").length}),r.getelementsbyclassname=ct(function(e){return e.innerhtml="
",e.firstchild.classname="i",2===e.getelementsbyclassname("i").length}),r.getbyid=ct(function(e){return d.appendchild(e).id=b,!n.getelementsbyname||!n.getelementsbyname(b).length}),r.getbyid?(o.find.id=function(e,t){if(typeof t.getelementbyid!==j&&h){var n=t.getelementbyid(e);return n&&n.parentnode?[n]:[]}},o.filter.id=function(e){var t=e.replace(rt,it);return function(e){return e.getattribute("id")===t}}):(delete o.find.id,o.filter.id=function(e){var t=e.replace(rt,it);return function(e){var n=typeof e.getattributenode!==j&&e.getattributenode("id");return n&&n.value===t}}),o.find.tag=r.getelementsbytagname?function(e,n){return typeof n.getelementsbytagname!==j?n.getelementsbytagname(e):t}:function(e,t){var n,r=[],i=0,o=t.getelementsbytagname(e);if("*"===e){while(n=o[i++])1===n.nodetype&&r.push(n);return r}return o},o.find.class=r.getelementsbyclassname&&function(e,n){return typeof n.getelementsbyclassname!==j&&h?n.getelementsbyclassname(e):t},m=[],g=[],(r.qsa=st(n.queryselectorall))&&(ct(function(e){e.innerhtml="",e.queryselectorall("[selected]").length||g.push("\\["+p+"*(?:value|"+b+")"),e.queryselectorall(":checked").length||g.push(":checked")}),ct(function(e){var t=n.createelement("input");t.setattribute("type","hidden"),e.appendchild(t).setattribute("t",""),e.queryselectorall("[t^='']").length&&g.push("[*^$]="+p+"*(?:''|\"\")"),e.queryselectorall(":enabled").length||g.push(":enabled",":disabled"),e.queryselectorall("*,:x"),g.push(",.*:")})),(r.matchesselector=st(y=d.webkitmatchesselector||d.mozmatchesselector||d.omatchesselector||d.msmatchesselector))&&ct(function(e){r.disconnectedmatch=y.call(e,"div"),y.call(e,"[s!='']:x"),m.push("!=",i)}),g=g.length&®exp(g.join("|")),m=m.length&®exp(m.join("|")),v=st(d.contains)||d.comparedocumentposition?function(e,t){var n=9===e.nodetype?e.documentelement:e,r=t&&t.parentnode;return e===r||!(!r||1!==r.nodetype||!(n.contains?n.contains(r):e.comparedocumentposition&&16&e.comparedocumentposition(r)))}:function(e,t){if(t)while(t=t.parentnode)if(t===e)return!0;return!1},r.sortdetached=ct(function(e){return 1&e.comparedocumentposition(n.createelement("div"))}),a=d.comparedocumentposition?function(e,t){if(e===t)return s=!0,0;var i=t.comparedocumentposition&&e.comparedocumentposition&&e.comparedocumentposition(t);return i?1&i||!r.sortdetached&&t.comparedocumentposition(e)===i?e===n||v(w,e)?-1:t===n||v(w,t)?1:c?f.call(c,e)-f.call(c,t):0:4&i?-1:1:e.comparedocumentposition?-1:1}:function(e,t){var r,i=0,o=e.parentnode,a=t.parentnode,s=[e],l=[t];if(e===t)return s=!0,0;if(!o||!a)return e===n?-1:t===n?1:o?-1:a?1:c?f.call(c,e)-f.call(c,t):0;if(o===a)return gt(e,t);r=e;while(r=r.parentnode)s.unshift(r);r=t;while(r=r.parentnode)l.unshift(r);while(s[i]===l[i])i++;return i?gt(s[i],l[i]):s[i]===w?-1:l[i]===w?1:0},n):f},at.matches=function(e,t){return at(e,null,null,t)},at.matchesselector=function(e,t){if((e.ownerdocument||e)!==f&&p(e),t=t.replace(y,"='$1']"),!(!r.matchesselector||!h||m&&m.test(t)||g&&g.test(t)))try{var n=y.call(e,t);if(n||r.disconnectedmatch||e.document&&11!==e.document.nodetype)return n}catch(i){}return at(t,f,null,[e]).length>0},at.contains=function(e,t){return(e.ownerdocument||e)!==f&&p(e),v(e,t)},at.attr=function(e,n){(e.ownerdocument||e)!==f&&p(e);var i=o.attrhandle[n.tolowercase()],a=i&&l.call(o.attrhandle,n.tolowercase())?i(e,n,!h):t;return a===t?r.attributes||!h?e.getattribute(n):(a=e.getattributenode(n))&&a.specified?a.value:null:a},at.error=function(e){throw error("syntax error, unrecognized expression: "+e)},at.uniquesort=function(e){var t,n=[],i=0,o=0;if(s=!r.detectduplicates,c=!r.sortstable&&e.slice(0),e.sort(a),s){while(t=e[o++])t===e[o]&&(i=n.push(o));while(i--)e.splice(n[i],1)}return e},a=at.gettext=function(e){var t,n="",r=0,i=e.nodetype;if(i){if(1===i||9===i||11===i){if("string"==typeof e.textcontent)return e.textcontent;for(e=e.firstchild;e;e=e.nextsibling)n+=a(e)}else if(3===i||4===i)return e.nodevalue}else for(;t=e[r];r++)n+=a(t);return n},o=at.selectors={cachelength:50,createpseudo:ut,match:q,attrhandle:{},find:{},relative:{">":{dir:"parentnode",first:!0}," ":{dir:"parentnode"},"+":{dir:"previoussibling",first:!0},"~":{dir:"previoussibling"}},prefilter:{attr:function(e){return e[1]=e[1].replace(rt,it),e[3]=(e[4]||e[5]||"").replace(rt,it),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},child:function(e){return e[1]=e[1].tolowercase(),"nth"===e[1].slice(0,3)?(e[3]||at.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&at.error(e[0]),e},pseudo:function(e){var n,r=!e[5]&&e[2];return q.child.test(e[0])?null:(e[3]&&e[4]!==t?e[2]=e[4]:r&&j.test(r)&&(n=bt(r,!0))&&(n=r.indexof(")",r.length-n)-r.length)&&(e[0]=e[0].slice(0,n),e[2]=r.slice(0,n)),e.slice(0,3))}},filter:{tag:function(e){var t=e.replace(rt,it).tolowercase();return"*"===e?function(){return!0}:function(e){return e.nodename&&e.nodename.tolowercase()===t}},class:function(e){var t=n[e+" "];return t||(t=regexp("(^|"+p+")"+e+"("+p+"|$)"))&&n(e,function(e){return t.test("string"==typeof e.classname&&e.classname||typeof e.getattribute!==j&&e.getattribute("class")||"")})},attr:function(e,t,n){return function(r){var i=at.attr(r,e);return null==i?"!="===t:t?(i+="","="===t?i===n:"!="===t?i!==n:"^="===t?n&&0===i.indexof(n):"*="===t?n&&i.indexof(n)>-1:"$="===t?n&&i.slice(-n.length)===n:"~="===t?(" "+i+" ").indexof(n)>-1:"|="===t?i===n||i.slice(0,n.length+1)===n+"-":!1):!0}},child:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentnode}:function(t,n,l){var u,c,p,f,d,h,g=o!==a?"nextsibling":"previoussibling",m=t.parentnode,y=s&&t.nodename.tolowercase(),v=!l&&!s;if(m){if(o){while(g){p=t;while(p=p[g])if(s?p.nodename.tolowercase()===y:1===p.nodetype)return!1;h=g="only"===e&&!h&&"nextsibling"}return!0}if(h=[a?m.firstchild:m.lastchild],a&&v){c=m[b]||(m[b]={}),u=c[e]||[],d=u[0]===t&&u[1],f=u[0]===t&&u[2],p=d&&m.childnodes[d];while(p=++d&&p&&p[g]||(f=d=0)||h.pop())if(1===p.nodetype&&++f&&p===t){c[e]=[t,d,f];break}}else if(v&&(u=(t[b]||(t[b]={}))[e])&&u[0]===t)f=u[1];else while(p=++d&&p&&p[g]||(f=d=0)||h.pop())if((s?p.nodename.tolowercase()===y:1===p.nodetype)&&++f&&(v&&((p[b]||(p[b]={}))[e]=[t,f]),p===t))break;return f-=i,f===r||0===f%r&&f/r>=0}}},pseudo:function(e,t){var n,r=o.pseudos[e]||o.setfilters[e.tolowercase()]||at.error("unsupported pseudo: "+e);return r[b]?r(t):r.length>1?(n=[e,e,"",t],o.setfilters.hasownproperty(e.tolowercase())?ut(function(e,n){var i,o=r(e,t),a=o.length;while(a--)i=f.call(e,o[a]),e[i]=!(n[i]=o[a])}):function(e){return r(e,0,n)}):r}},pseudos:{not:ut(function(e){var t=[],n=[],r=l(e.replace(z,"$1"));return r[b]?ut(function(e,t,n,i){var o,a=r(e,null,i,[]),s=e.length;while(s--)(o=a[s])&&(e[s]=!(t[s]=o))}):function(e,i,o){return t[0]=e,r(t,null,o,n),!n.pop()}}),has:ut(function(e){return function(t){return at(e,t).length>0}}),contains:ut(function(e){return function(t){return(t.textcontent||t.innertext||a(t)).indexof(e)>-1}}),lang:ut(function(e){return g.test(e||"")||at.error("unsupported lang: "+e),e=e.replace(rt,it).tolowercase(),function(t){var n;do if(n=h?t.lang:t.getattribute("xml:lang")||t.getattribute("lang"))return n=n.tolowercase(),n===e||0===n.indexof(e+"-");while((t=t.parentnode)&&1===t.nodetype);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===d},focus:function(e){return e===f.activeelement&&(!f.hasfocus||f.hasfocus())&&!!(e.type||e.href||~e.tabindex)},enabled:function(e){return e.disabled===!1},disabled:function(e){return e.disabled===!0},checked:function(e){var t=e.nodename.tolowercase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentnode&&e.parentnode.selectedindex,e.selected===!0},empty:function(e){for(e=e.firstchild;e;e=e.nextsibling)if(e.nodename>"@"||3===e.nodetype||4===e.nodetype)return!1;return!0},parent:function(e){return!o.pseudos.empty(e)},header:function(e){return tt.test(e.nodename)},input:function(e){return et.test(e.nodename)},button:function(e){var t=e.nodename.tolowercase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodename.tolowercase()&&"text"===e.type&&(null==(t=e.getattribute("type"))||t.tolowercase()===e.type)},first:vt(function(){return[0]}),last:vt(function(e,t){return[t-1]}),eq:vt(function(e,t,n){return[0>n?n+t:n]}),even:vt(function(e,t){var n=0;for(;t>n;n+=2)e.push(n);return e}),odd:vt(function(e,t){var n=1;for(;t>n;n+=2)e.push(n);return e}),lt:vt(function(e,t,n){var r=0>n?n+t:n;for(;--r>=0;)e.push(r);return e}),gt:vt(function(e,t,n){var r=0>n?n+t:n;for(;t>++r;)e.push(r);return e})}};for(n in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})o.pseudos[n]=mt(n);for(n in{submit:!0,reset:!0})o.pseudos[n]=yt(n);function bt(e,t){var n,r,i,a,s,l,u,c=k[e+" "];if(c)return t?0:c.slice(0);s=e,l=[],u=o.prefilter;while(s){(!n||(r=x.exec(s)))&&(r&&(s=s.slice(r[0].length)||s),l.push(i=[])),n=!1,(r=u.exec(s))&&(n=r.shift(),i.push({value:n,type:r[0].replace(z," ")}),s=s.slice(n.length));for(a in o.filter)!(r=q[a].exec(s))||u[a]&&!(r=u[a](r))||(n=r.shift(),i.push({value:n,type:a,matches:r}),s=s.slice(n.length));if(!n)break}return t?s.length:s?at.error(e):k(e,l).slice(0)}function xt(e){var t=0,n=e.length,r="";for(;n>t;t++)r+=e[t].value;return r}function wt(e,t,n){var r=t.dir,o=n&&"parentnode"===r,a=c++;return t.first?function(t,n,i){while(t=t[r])if(1===t.nodetype||o)return e(t,n,i)}:function(t,n,s){var l,u,c,p=t+" "+a;if(s){while(t=t[r])if((1===t.nodetype||o)&&e(t,n,s))return!0}else while(t=t[r])if(1===t.nodetype||o)if(c=t[b]||(t[b]={}),(u=c[r])&&u[0]===p){if((l=u[1])===!0||l===i)return l===!0}else if(u=c[r]=[p],u[1]=e(t,n,s)||i,u[1]===!0)return!0}}function tt(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 ct(e,t,n,r,i){var o,a=[],s=0,l=e.length,u=null!=t;for(;l>s;s++)(o=e[s])&&(!n||n(o,r,i))&&(a.push(o),u&&t.push(s));return a}function nt(e,t,n,r,i,o){return r&&!r[b]&&(r=nt(r)),i&&!i[b]&&(i=nt(i,o)),ut(function(o,a,s,l){var u,c,p,f=[],d=[],h=a.length,g=o||st(t||"*",s.nodetype?[s]:s,[]),m=!e||!o&&t?g:ct(g,f,e,s,l),y=n?i||(o?e:h||r)?[]:a:m;if(n&&n(m,y,s,l),r){u=ct(y,d),r(u,[],s,l),c=u.length;while(c--)(p=u[c])&&(y[d[c]]=!(m[d[c]]=p))}if(o){if(i||e){if(i){u=[],c=y.length;while(c--)(p=y[c])&&u.push(m[c]=p);i(null,y=[],u,l)}c=y.length;while(c--)(p=y[c])&&(u=i?f.call(o,p):f[c])>-1&&(o[u]=!(a[u]=p))}}else y=ct(y===a?y.splice(h,y.length):y),i?i(null,a,y,l):m.apply(a,y)})}function kt(e){var t,n,r,i=e.length,a=o.relative[e[0].type],s=a||o.relative[" "],l=a?1:0,c=wt(function(e){return e===t},s,!0),p=wt(function(e){return f.call(t,e)>-1},s,!0),f=[function(e,n,r){return!a&&(r||n!==u)||((t=n).nodetype?c(e,n,r):p(e,n,r))}];for(;i>l;l++)if(n=o.relative[e[l].type])f=[wt(tt(f),n)];else{if(n=o.filter[e[l].type].apply(null,e[l].matches),n[b]){for(r=++l;i>r;r++)if(o.relative[e[r].type])break;return nt(l>1&&tt(f),l>1&&xt(e.slice(0,l-1).concat({value:" "===e[l-2].type?"*":""})).replace(z,"$1"),n,r>l&&kt(e.slice(l,r)),i>r&&kt(e=e.slice(r)),i>r&&xt(e))}f.push(n)}return tt(f)}function et(e,t){var n=0,r=t.length>0,a=e.length>0,s=function(s,l,c,p,d){var h,g,m,y=[],v=0,b="0",x=s&&[],w=null!=d,c=u,n=s||a&&o.find.tag("*",d&&l.parentnode||l),k=t+=null==c?1:math.random()||.1;for(w&&(u=l!==f&&l,i=n);null!=(h=n[b]);b++){if(a&&h){g=0;while(m=e[g++])if(m(h,l,c)){p.push(h);break}w&&(t=k,i=++n)}r&&((h=!m&&h)&&v--,s&&x.push(h))}if(v+=b,r&&b!==v){g=0;while(m=t[g++])m(x,y,l,c);if(s){if(v>0)while(b--)x[b]||y[b]||(y[b]=q.call(p));y=ct(y)}m.apply(p,y),w&&!s&&y.length>0&&v+t.length>1&&at.uniquesort(p)}return w&&(t=k,u=c),x};return r?ut(s):s}l=at.compile=function(e,t){var n,r=[],i=[],o=e[e+" "];if(!o){t||(t=bt(e)),n=t.length;while(n--)o=kt(t[n]),o[b]?r.push(o):i.push(o);o=e(e,et(i,r))}return o};function st(e,t,n){var r=0,i=t.length;for(;i>r;r++)at(e,t[r],n);return n}function at(e,t,n,i){var a,s,u,c,p,f=bt(e);if(!i&&1===f.length){if(s=f[0]=f[0].slice(0),s.length>2&&"id"===(u=s[0]).type&&r.getbyid&&9===t.nodetype&&h&&o.relative[s[1].type]){if(t=(o.find.id(u.matches[0].replace(rt,it),t)||[])[0],!t)return n;e=e.slice(s.shift().value.length)}a=q.needscontext.test(e)?0:s.length;while(a--){if(u=s[a],o.relative[c=u.type])break;if((p=o.find[c])&&(i=p(u.matches[0].replace(rt,it),v.test(s[0].type)&&t.parentnode||t))){if(s.splice(a,1),e=i.length&&xt(s),!e)return m.apply(n,i),n;break}}}return l(e,f)(i,t,!h,n,v.test(e)),n}o.pseudos.nth=o.pseudos.eq;function jt(){}jt.prototype=o.filters=o.pseudos,o.setfilters=new jt,r.sortstable=b.split("").sort(a).join("")===b,p(),[0,0].sort(a),r.detectduplicates=s,x.find=at,x.expr=at.selectors,x.expr[":"]=x.expr.pseudos,x.unique=at.uniquesort,x.text=at.gettext,x.isxmldoc=at.isxml,x.contains=at.contains}(e);var o={};function f(e){var t=o[e]={};return x.each(e.match(t)||[],function(e,n){t[n]=!0}),t}x.callbacks=function(e){e="string"==typeof e?o[e]||f(e):x.extend({},e);var n,r,i,o,a,s,l=[],u=!e.once&&[],c=function(t){for(r=e.memory&&t,i=!0,a=s||0,s=0,o=l.length,n=!0;l&&o>a;a++)if(l[a].apply(t[0],t[1])===!1&&e.stoponfalse){r=!1;break}n=!1,l&&(u?u.length&&c(u.shift()):r?l=[]:p.disable())},p={add:function(){if(l){var t=l.length;(function i(t){x.each(t,function(t,n){var r=x.type(n);"function"===r?e.unique&&p.has(n)||l.push(n):n&&n.length&&"string"!==r&&i(n)})})(arguments),n?o=l.length:r&&(s=t,c(r))}return this},remove:function(){return l&&x.each(arguments,function(e,t){var r;while((r=x.inarray(t,l,r))>-1)l.splice(r,1),n&&(o>=r&&o--,a>=r&&a--)}),this},has:function(e){return e?x.inarray(e,l)>-1:!(!l||!l.length)},empty:function(){return l=[],o=0,this},disable:function(){return l=u=r=t,this},disabled:function(){return!l},lock:function(){return u=t,r||p.disable(),this},locked:function(){return!u},firewith:function(e,t){return t=t||[],t=[e,t.slice?t.slice():t],!l||i&&!u||(n?u.push(t):c(t)),this},fire:function(){return p.firewith(this,arguments),this},fired:function(){return!!i}};return p},x.extend({deferred:function(e){var t=[["resolve","done",x.callbacks("once memory"),"resolved"],["reject","fail",x.callbacks("once memory"),"rejected"],["notify","progress",x.callbacks("memory")]],n="pending",r={state:function(){return n},always:function(){return i.done(arguments).fail(arguments),this},then:function(){var e=arguments;return x.deferred(function(n){x.each(t,function(t,o){var a=o[0],s=x.isfunction(e[t])&&e[t];i[o[1]](function(){var e=s&&s.apply(this,arguments);e&&x.isfunction(e.promise)?e.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[a+"with"](this===r?n.promise():this,s?[e]:arguments)})}),e=null}).promise()},promise:function(e){return null!=e?x.extend(e,r):r}},i={};return r.pipe=r.then,x.each(t,function(e,o){var a=o[2],s=o[3];r[o[1]]=a.add,s&&a.add(function(){n=s},t[1^e][2].disable,t[2][2].lock),i[o[0]]=function(){return i[o[0]+"with"](this===i?r:this,arguments),this},i[o[0]+"with"]=a.firewith}),r.promise(i),e&&e.call(i,i),i},when:function(e){var t=0,n=g.call(arguments),r=n.length,i=1!==r||e&&x.isfunction(e.promise)?r:0,o=1===i?e:x.deferred(),a=function(e,t,n){return function(r){t[e]=this,n[e]=arguments.length>1?g.call(arguments):r,n===s?o.notifywith(t,n):--i||o.resolvewith(t,n)}},s,l,u;if(r>1)for(s=array(r),l=array(r),u=array(r);r>t;t++)n[t]&&x.isfunction(n[t].promise)?n[t].promise().done(a(t,u,n)).fail(o.reject).progress(a(t,l,s)):--i;return i||o.resolvewith(u,n),o.promise()}}),x.support=function(t){var n,r,o,s,l,u,c,p,f,d=a.createelement("div");if(d.setattribute("classname","t"),d.innerhtml="
a",n=d.getelementsbytagname("*")||[],r=d.getelementsbytagname("a")[0],!r||!r.style||!n.length)return t;s=a.createelement("select"),u=s.appendchild(a.createelement("option")),o=d.getelementsbytagname("input")[0],r.style.csstext="top:1px;float:left;opacity:.5",t.getsetattribute="t"!==d.classname,t.leadingwhitespace=3===d.firstchild.nodetype,t.tbody=!d.getelementsbytagname("tbody").length,t.htmlserialize=!!d.getelementsbytagname("link").length,t.style=/top/.test(r.getattribute("style")),t.hrefnormalized="/a"===r.getattribute("href"),t.opacity=/^0.5/.test(r.style.opacity),t.cssfloat=!!r.style.cssfloat,t.checkon=!!o.value,t.optselected=u.selected,t.enctype=!!a.createelement("form").enctype,t.html5clone="<:nav>"!==a.createelement("nav").clonenode(!0).outerhtml,t.inlineblockneedslayout=!1,t.shrinkwrapblocks=!1,t.pixelposition=!1,t.deleteexpando=!0,t.nocloneevent=!0,t.reliablemarginright=!0,t.boxsizingreliable=!0,o.checked=!0,t.noclonechecked=o.clonenode(!0).checked,s.disabled=!0,t.optdisabled=!u.disabled;try{delete d.test}catch(h){t.deleteexpando=!1}o=a.createelement("input"),o.setattribute("value",""),t.input=""===o.getattribute("value"),o.value="t",o.setattribute("type","radio"),t.radiovalue="t"===o.value,o.setattribute("checked","t"),o.setattribute("name","t"),l=a.createdocumentfragment(),l.appendchild(o),t.appendchecked=o.checked,t.checkclone=l.clonenode(!0).clonenode(!0).lastchild.checked,d.attachevent&&(d.attachevent("onclick",function(){t.nocloneevent=!1}),d.clonenode(!0).click());for(f in{submit:!0,change:!0,focusin:!0})d.setattribute(c="on"+f,"t"),t[f+"bubbles"]=c in e||d.attributes[c].expando===!1;d.style.backgroundclip="content-box",d.clonenode(!0).style.backgroundclip="",t.clearclonestyle="content-box"===d.style.backgroundclip;for(f in x(t))break;return t.ownlast="0"!==f,x(function(){var n,r,o,s="padding:0;margin:0;border:0;display:block;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;",l=a.getelementsbytagname("body")[0];l&&(n=a.createelement("div"),n.style.csstext="border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px",l.appendchild(n).appendchild(d),d.innerhtml="
t
",o=d.getelementsbytagname("td"),o[0].style.csstext="padding:0;margin:0;border:0;display:none",p=0===o[0].offsetheight,o[0].style.display="",o[1].style.display="none",t.reliablehiddenoffsets=p&&0===o[0].offsetheight,d.innerhtml="",d.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%;",x.swap(l,null!=l.style.zoom?{zoom:1}:{},function(){t.boxsizing=4===d.offsetwidth}),e.getcomputedstyle&&(t.pixelposition="1%"!==(e.getcomputedstyle(d,null)||{}).top,t.boxsizingreliable="4px"===(e.getcomputedstyle(d,null)||{width:"4px"}).width,r=d.appendchild(a.createelement("div")),r.style.csstext=d.style.csstext=s,r.style.marginright=r.style.width="0",d.style.width="1px",t.reliablemarginright=!parsefloat((e.getcomputedstyle(r,null)||{}).marginright)),typeof d.style.zoom!==i&&(d.innerhtml="",d.style.csstext=s+"width:1px;padding:1px;display:inline;zoom:1",t.inlineblockneedslayout=3===d.offsetwidth,d.style.display="block",d.innerhtml="
",d.firstchild.style.width="5px",t.shrinkwrapblocks=3!==d.offsetwidth,t.inlineblockneedslayout&&(l.style.zoom=1)),l.removechild(n),n=d=o=r=null) }),n=s=l=u=r=o=null,t}({});var b=/(?:\{[\s\s]*\}|\[[\s\s]*\])$/,p=/([a-z])/g;function r(e,n,r,i){if(x.acceptdata(e)){var o,a,s=x.expando,l=e.nodetype,u=l?x.cache:e,c=l?e[s]:e[s]&&s;if(c&&u[c]&&(i||u[c].data)||r!==t||"string"!=typeof n)return c||(c=l?e[s]=p.pop()||x.guid++:s),u[c]||(u[c]=l?{}:{tojson:x.noop}),("object"==typeof n||"function"==typeof n)&&(i?u[c]=x.extend(u[c],n):u[c].data=x.extend(u[c].data,n)),a=u[c],i||(a.data||(a.data={}),a=a.data),r!==t&&(a[x.camelcase(n)]=r),"string"==typeof n?(o=a[n],null==o&&(o=a[x.camelcase(n)])):o=a,o}}function w(e,t,n){if(x.acceptdata(e)){var r,i,o=e.nodetype,a=o?x.cache:e,s=o?e[x.expando]:x.expando;if(a[s]){if(t&&(r=n?a[s]:a[s].data)){x.isarray(t)?t=t.concat(x.map(t,x.camelcase)):t in r?t=[t]:(t=x.camelcase(t),t=t in r?[t]:t.split(" ")),i=t.length;while(i--)delete r[t[i]];if(n?!i(r):!x.isemptyobject(r))return}(n||(delete a[s].data,i(a[s])))&&(o?x.cleandata([e],!0):x.support.deleteexpando||a!=a.window?delete a[s]:a[s]=null)}}}x.extend({cache:{},nodata:{applet:!0,embed:!0,object:"clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"},hasdata:function(e){return e=e.nodetype?x.cache[e[x.expando]]:e[x.expando],!!e&&!i(e)},data:function(e,t,n){return r(e,t,n)},removedata:function(e,t){return w(e,t)},_data:function(e,t,n){return r(e,t,n,!0)},_removedata:function(e,t){return w(e,t,!0)},acceptdata:function(e){if(e.nodetype&&1!==e.nodetype&&9!==e.nodetype)return!1;var t=e.nodename&&x.nodata[e.nodename.tolowercase()];return!t||t!==!0&&e.getattribute("classid")===t}}),x.fn.extend({data:function(e,n){var r,i,o=null,a=0,s=this[0];if(e===t){if(this.length&&(o=x.data(s),1===s.nodetype&&!x._data(s,"parsedattrs"))){for(r=s.attributes;r.length>a;a++)i=r[a].name,0===i.indexof("data-")&&(i=x.camelcase(i.slice(5)),$(s,i,o[i]));x._data(s,"parsedattrs",!0)}return o}return"object"==typeof e?this.each(function(){x.data(this,e)}):arguments.length>1?this.each(function(){x.data(this,e,n)}):s?$(s,e,x.data(s,e)):null},removedata:function(e){return this.each(function(){x.removedata(this,e)})}});function $(e,n,r){if(r===t&&1===e.nodetype){var i="data-"+n.replace(p,"-$1").tolowercase();if(r=e.getattribute(i),"string"==typeof r){try{r="true"===r?!0:"false"===r?!1:"null"===r?null:+r+""===r?+r:b.test(r)?x.parsejson(r):r}catch(o){}x.data(e,n,r)}else r=t}return r}function i(e){var t;for(t in e)if(("data"!==t||!x.isemptyobject(e[t]))&&"tojson"!==t)return!1;return!0}x.extend({queue:function(e,n,r){var i;return e?(n=(n||"fx")+"queue",i=x._data(e,n),r&&(!i||x.isarray(r)?i=x._data(e,n,x.makearray(r)):i.push(r)),i||[]):t},dequeue:function(e,t){t=t||"fx";var n=x.queue(e,t),r=n.length,i=n.shift(),o=x._queuehooks(e,t),a=function(){x.dequeue(e,t)};"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,a,o)),!r&&o&&o.empty.fire()},_queuehooks:function(e,t){var n=t+"queuehooks";return x._data(e,n)||x._data(e,n,{empty:x.callbacks("once memory").add(function(){x._removedata(e,t+"queue"),x._removedata(e,n)})})}}),x.fn.extend({queue:function(e,n){var r=2;return"string"!=typeof e&&(n=e,e="fx",r--),r>arguments.length?x.queue(this[0],e):n===t?this:this.each(function(){var t=x.queue(this,e,n);x._queuehooks(this,e),"fx"===e&&"inprogress"!==t[0]&&x.dequeue(this,e)})},dequeue:function(e){return this.each(function(){x.dequeue(this,e)})},delay:function(e,t){return e=x.fx?x.fx.speeds[e]||e:e,t=t||"fx",this.queue(t,function(t,n){var r=settimeout(t,e);n.stop=function(){cleartimeout(r)}})},clearqueue:function(e){return this.queue(e||"fx",[])},promise:function(e,n){var r,i=1,o=x.deferred(),a=this,s=this.length,l=function(){--i||o.resolvewith(a,[a])};"string"!=typeof e&&(n=e,e=t),e=e||"fx";while(s--)r=x._data(a[s],e+"queuehooks"),r&&r.empty&&(i++,r.empty.add(l));return l(),o.promise(n)}});var z,x,u=/[\t\r\n\f]/g,v=/\r/g,y=/^(?:input|select|textarea|button|object)$/i,j=/^(?:a|area)$/i,g=/^(?:checked|selected)$/i,q=x.support.getsetattribute,k=x.support.input;x.fn.extend({attr:function(e,t){return x.access(this,x.attr,e,t,arguments.length>1)},removeattr:function(e){return this.each(function(){x.removeattr(this,e)})},prop:function(e,t){return x.access(this,x.prop,e,t,arguments.length>1)},removeprop:function(e){return e=x.propfix[e]||e,this.each(function(){try{this[e]=t,delete this[e]}catch(n){}})},addclass:function(e){var t,n,r,i,o,a=0,s=this.length,l="string"==typeof e&&e;if(x.isfunction(e))return this.each(function(t){x(this).addclass(e.call(this,t,this.classname))});if(l)for(t=(e||"").match(t)||[];s>a;a++)if(n=this[a],r=1===n.nodetype&&(n.classname?(" "+n.classname+" ").replace(u," "):" ")){o=0;while(i=t[o++])0>r.indexof(" "+i+" ")&&(r+=i+" ");n.classname=x.trim(r)}return this},removeclass:function(e){var t,n,r,i,o,a=0,s=this.length,l=0===arguments.length||"string"==typeof e&&e;if(x.isfunction(e))return this.each(function(t){x(this).removeclass(e.call(this,t,this.classname))});if(l)for(t=(e||"").match(t)||[];s>a;a++)if(n=this[a],r=1===n.nodetype&&(n.classname?(" "+n.classname+" ").replace(u," "):"")){o=0;while(i=t[o++])while(r.indexof(" "+i+" ")>=0)r=r.replace(" "+i+" "," ");n.classname=e?x.trim(r):""}return this},toggleclass:function(e,t){var n=typeof e,r="boolean"==typeof t;return x.isfunction(e)?this.each(function(n){x(this).toggleclass(e.call(this,n,this.classname,t),t)}):this.each(function(){if("string"===n){var o,a=0,s=x(this),l=t,u=e.match(t)||[];while(o=u[a++])l=r?l:!s.hasclass(o),s[l?"addclass":"removeclass"](o)}else(n===i||"boolean"===n)&&(this.classname&&x._data(this,"__classname__",this.classname),this.classname=this.classname||e===!1?"":x._data(this,"__classname__")||"")})},hasclass:function(e){var t=" "+e+" ",n=0,r=this.length;for(;r>n;n++)if(1===this[n].nodetype&&(" "+this[n].classname+" ").replace(u," ").indexof(t)>=0)return!0;return!1},val:function(e){var n,r,i,o=this[0];{if(arguments.length)return i=x.isfunction(e),this.each(function(n){var o;1===this.nodetype&&(o=i?e.call(this,n,x(this).val()):e,null==o?o="":"number"==typeof o?o+="":x.isarray(o)&&(o=x.map(o,function(e){return null==e?"":e+""})),r=x.valhooks[this.type]||x.valhooks[this.nodename.tolowercase()],r&&"set"in r&&r.set(this,o,"value")!==t||(this.value=o))});if(o)return r=x.valhooks[o.type]||x.valhooks[o.nodename.tolowercase()],r&&"get"in r&&(n=r.get(o,"value"))!==t?n:(n=o.value,"string"==typeof n?n.replace(v,""):null==n?"":n)}}}),x.extend({valhooks:{option:{get:function(e){var t=x.find.attr(e,"value");return null!=t?t:e.text}},select:{get:function(e){var t,n,r=e.options,i=e.selectedindex,o="select-one"===e.type||0>i,a=o?null:[],s=o?i+1:r.length,l=0>i?s:o?i:0;for(;s>l;l++)if(n=r[l],!(!n.selected&&l!==i||(x.support.optdisabled?n.disabled:null!==n.getattribute("disabled"))||n.parentnode.disabled&&x.nodename(n.parentnode,"optgroup"))){if(t=x(n).val(),o)return t;a.push(t)}return a},set:function(e,t){var n,r,i=e.options,o=x.makearray(t),a=i.length;while(a--)r=i[a],(r.selected=x.inarray(x(r).val(),o)>=0)&&(n=!0);return n||(e.selectedindex=-1),o}}},attr:function(e,n,r){var o,a,s=e.nodetype;if(e&&3!==s&&8!==s&&2!==s)return typeof e.getattribute===i?x.prop(e,n,r):(1===s&&x.isxmldoc(e)||(n=n.tolowercase(),o=x.attrhooks[n]||(x.expr.match.bool.test(n)?x:z)),r===t?o&&"get"in o&&null!==(a=o.get(e,n))?a:(a=x.find.attr(e,n),null==a?t:a):null!==r?o&&"set"in o&&(a=o.set(e,r,n))!==t?a:(e.setattribute(n,r+""),r):(x.removeattr(e,n),t))},removeattr:function(e,t){var n,r,i=0,o=t&&t.match(t);if(o&&1===e.nodetype)while(n=o[i++])r=x.propfix[n]||n,x.expr.match.bool.test(n)?k&&q||!g.test(n)?e[r]=!1:e[x.camelcase("default-"+n)]=e[r]=!1:x.attr(e,n,""),e.removeattribute(q?n:r)},attrhooks:{type:{set:function(e,t){if(!x.support.radiovalue&&"radio"===t&&x.nodename(e,"input")){var n=e.value;return e.setattribute("type",t),n&&(e.value=n),t}}}},propfix:{"for":"htmlfor","class":"classname"},prop:function(e,n,r){var i,o,a,s=e.nodetype;if(e&&3!==s&&8!==s&&2!==s)return a=1!==s||!x.isxmldoc(e),a&&(n=x.propfix[n]||n,o=x.prophooks[n]),r!==t?o&&"set"in o&&(i=o.set(e,r,n))!==t?i:e[n]=r:o&&"get"in o&&null!==(i=o.get(e,n))?i:e[n]},prophooks:{tabindex:{get:function(e){var t=x.find.attr(e,"tabindex");return t?parseint(t,10):y.test(e.nodename)||j.test(e.nodename)&&e.href?0:-1}}}}),x={set:function(e,t,n){return t===!1?x.removeattr(e,n):k&&q||!g.test(n)?e.setattribute(!q&&x.propfix[n]||n,n):e[x.camelcase("default-"+n)]=e[n]=!0,n}},x.each(x.expr.match.bool.source.match(/\w+/g),function(e,n){var r=x.expr.attrhandle[n]||x.find.attr;x.expr.attrhandle[n]=k&&q||!g.test(n)?function(e,n,i){var o=x.expr.attrhandle[n],a=i?t:(x.expr.attrhandle[n]=t)!=r(e,n,i)?n.tolowercase():null;return x.expr.attrhandle[n]=o,a}:function(e,n,r){return r?t:e[x.camelcase("default-"+n)]?n.tolowercase():null}}),k&&q||(x.attrhooks.value={set:function(e,n,r){return x.nodename(e,"input")?(e.defaultvalue=n,t):z&&z.set(e,n,r)}}),q||(z={set:function(e,n,r){var i=e.getattributenode(r);return i||e.setattributenode(i=e.ownerdocument.createattribute(r)),i.value=n+="","value"===r||n===e.getattribute(r)?n:t}},x.expr.attrhandle.id=x.expr.attrhandle.name=x.expr.attrhandle.coords=function(e,n,r){var i;return r?t:(i=e.getattributenode(n))&&""!==i.value?i.value:null},x.valhooks.button={get:function(e,n){var r=e.getattributenode(n);return r&&r.specified?r.value:t},set:z.set},x.attrhooks.contenteditable={set:function(e,t,n){z.set(e,""===t?!1:t,n)}},x.each(["width","height"],function(e,n){x.attrhooks[n]={set:function(e,r){return""===r?(e.setattribute(n,"auto"),r):t}}})),x.support.hrefnormalized||x.each(["href","src"],function(e,t){x.prophooks[t]={get:function(e){return e.getattribute(t,4)}}}),x.support.style||(x.attrhooks.style={get:function(e){return e.style.csstext||t},set:function(e,t){return e.style.csstext=t+""}}),x.support.optselected||(x.prophooks.selected={get:function(e){var t=e.parentnode;return t&&(t.selectedindex,t.parentnode&&t.parentnode.selectedindex),null}}),x.each(["tabindex","readonly","maxlength","cellspacing","cellpadding","rowspan","colspan","usemap","frameborder","contenteditable"],function(){x.propfix[this.tolowercase()]=this}),x.support.enctype||(x.propfix.enctype="encoding"),x.each(["radio","checkbox"],function(){x.valhooks[this]={set:function(e,n){return x.isarray(n)?e.checked=x.inarray(x(e).val(),n)>=0:t}},x.support.checkon||(x.valhooks[this].get=function(e){return null===e.getattribute("value")?"on":e.value})});var z=/^(?:input|select|textarea)$/i,et=/^key/,tt=/^(?:mouse|contextmenu)|click/,nt=/^(?:focusinfocus|focusoutblur)$/,rt=/^([^.]*)(?:\.(.+)|)$/;function it(){return!0}function ot(){return!1}function at(){try{return a.activeelement}catch(e){}}x.event={global:{},add:function(e,n,r,o,a){var s,l,u,c,p,f,d,h,g,m,y,v=x._data(e);if(v){r.handler&&(c=r,r=c.handler,a=c.selector),r.guid||(r.guid=x.guid++),(l=v.events)||(l=v.events={}),(f=v.handle)||(f=v.handle=function(e){return typeof x===i||e&&x.event.triggered===e.type?t:x.event.dispatch.apply(f.elem,arguments)},f.elem=e),n=(n||"").match(t)||[""],u=n.length;while(u--)s=rt.exec(n[u])||[],g=y=s[1],m=(s[2]||"").split(".").sort(),g&&(p=x.event.special[g]||{},g=(a?p.delegatetype:p.bindtype)||g,p=x.event.special[g]||{},d=x.extend({type:g,origtype:y,data:o,handler:r,guid:r.guid,selector:a,needscontext:a&&x.expr.match.needscontext.test(a),namespace:m.join(".")},c),(h=l[g])||(h=l[g]=[],h.delegatecount=0,p.setup&&p.setup.call(e,o,m,f)!==!1||(e.addeventlistener?e.addeventlistener(g,f,!1):e.attachevent&&e.attachevent("on"+g,f))),p.add&&(p.add.call(e,d),d.handler.guid||(d.handler.guid=r.guid)),a?h.splice(h.delegatecount++,0,d):h.push(d),x.event.global[g]=!0);e=null}},remove:function(e,t,n,r,i){var o,a,s,l,u,c,p,f,d,h,g,m=x.hasdata(e)&&x._data(e);if(m&&(c=m.events)){t=(t||"").match(t)||[""],u=t.length;while(u--)if(s=rt.exec(t[u])||[],d=g=s[1],h=(s[2]||"").split(".").sort(),d){p=x.event.special[d]||{},d=(r?p.delegatetype:p.bindtype)||d,f=c[d]||[],s=s[2]&®exp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),l=o=f.length;while(o--)a=f[o],!i&&g!==a.origtype||n&&n.guid!==a.guid||s&&!s.test(a.namespace)||r&&r!==a.selector&&("**"!==r||!a.selector)||(f.splice(o,1),a.selector&&f.delegatecount--,p.remove&&p.remove.call(e,a));l&&!f.length&&(p.teardown&&p.teardown.call(e,h,m.handle)!==!1||x.removeevent(e,d,m.handle),delete c[d])}else for(d in c)x.event.remove(e,d+t[u],n,r,!0);x.isemptyobject(c)&&(delete m.handle,x._removedata(e,"events"))}},trigger:function(n,r,i,o){var s,l,u,c,p,f,d,h=[i||a],g=v.call(n,"type")?n.type:n,m=v.call(n,"namespace")?n.namespace.split("."):[];if(u=f=i=i||a,3!==i.nodetype&&8!==i.nodetype&&!nt.test(g+x.event.triggered)&&(g.indexof(".")>=0&&(m=g.split("."),g=m.shift(),m.sort()),l=0>g.indexof(":")&&"on"+g,n=n[x.expando]?n:new x.event(g,"object"==typeof n&&n),n.istrigger=o?2:3,n.namespace=m.join("."),n.namespace_re=n.namespace?regexp("(^|\\.)"+m.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,n.result=t,n.target||(n.target=i),r=null==r?[n]:x.makearray(r,[n]),p=x.event.special[g]||{},o||!p.trigger||p.trigger.apply(i,r)!==!1)){if(!o&&!p.nobubble&&!x.iswindow(i)){for(c=p.delegatetype||g,nt.test(c+g)||(u=u.parentnode);u;u=u.parentnode)h.push(u),f=u;f===(i.ownerdocument||a)&&h.push(f.defaultview||f.parentwindow||e)}d=0;while((u=h[d++])&&!n.ispropagationstopped())n.type=d>1?c:p.bindtype||g,s=(x._data(u,"events")||{})[n.type]&&x._data(u,"handle"),s&&s.apply(u,r),s=l&&u[l],s&&x.acceptdata(u)&&s.apply&&s.apply(u,r)===!1&&n.preventdefault();if(n.type=g,!o&&!n.isdefaultprevented()&&(!p._default||p._default.apply(h.pop(),r)===!1)&&x.acceptdata(i)&&l&&i[g]&&!x.iswindow(i)){f=i[l],f&&(i[l]=null),x.event.triggered=g;try{i[g]()}catch(y){}x.event.triggered=t,f&&(i[l]=f)}return n.result}},dispatch:function(e){e=x.event.fix(e);var n,r,i,o,a,s=[],l=g.call(arguments),u=(x._data(this,"events")||{})[e.type]||[],c=x.event.special[e.type]||{};if(l[0]=e,e.delegatetarget=this,!c.predispatch||c.predispatch.call(this,e)!==!1){s=x.event.handlers.call(this,e,u),n=0;while((o=s[n++])&&!e.ispropagationstopped()){e.currenttarget=o.elem,a=0;while((i=o.handlers[a++])&&!e.isimmediatepropagationstopped())(!e.namespace_re||e.namespace_re.test(i.namespace))&&(e.handleobj=i,e.data=i.data,r=((x.event.special[i.origtype]||{}).handle||i.handler).apply(o.elem,l),r!==t&&(e.result=r)===!1&&(e.preventdefault(),e.stoppropagation()))}return c.postdispatch&&c.postdispatch.call(this,e),e.result}},handlers:function(e,n){var r,i,o,a,s=[],l=n.delegatecount,u=e.target;if(l&&u.nodetype&&(!e.button||"click"!==e.type))for(;u!=this;u=u.parentnode||this)if(1===u.nodetype&&(u.disabled!==!0||"click"!==e.type)){for(o=[],a=0;l>a;a++)i=n[a],r=i.selector+" ",o[r]===t&&(o[r]=i.needscontext?x(r,this).index(u)>=0:x.find(r,this,null,[u]).length),o[r]&&o.push(i);o.length&&s.push({elem:u,handlers:o})}return n.length>l&&s.push({elem:this,handlers:n.slice(l)}),s},fix:function(e){if(e[x.expando])return e;var t,n,r,i=e.type,o=e,s=this.fixhooks[i];s||(this.fixhooks[i]=s=tt.test(i)?this.mousehooks:et.test(i)?this.keyhooks:{}),r=s.props?this.props.concat(s.props):this.props,e=new x.event(o),t=r.length;while(t--)n=r[t],e[n]=o[n];return e.target||(e.target=o.srcelement||a),3===e.target.nodetype&&(e.target=e.target.parentnode),e.metakey=!!e.metakey,s.filter?s.filter(e,o):e},props:"altkey bubbles cancelable ctrlkey currenttarget eventphase metakey relatedtarget shiftkey target timestamp view which".split(" "),fixhooks:{},keyhooks:{props:"char charcode key keycode".split(" "),filter:function(e,t){return null==e.which&&(e.which=null!=t.charcode?t.charcode:t.keycode),e}},mousehooks:{props:"button buttons clientx clienty fromelement offsetx offsety pagex pagey screenx screeny toelement".split(" "),filter:function(e,n){var r,i,o,s=n.button,l=n.fromelement;return null==e.pagex&&null!=n.clientx&&(i=e.target.ownerdocument||a,o=i.documentelement,r=i.body,e.pagex=n.clientx+(o&&o.scrollleft||r&&r.scrollleft||0)-(o&&o.clientleft||r&&r.clientleft||0),e.pagey=n.clienty+(o&&o.scrolltop||r&&r.scrolltop||0)-(o&&o.clienttop||r&&r.clienttop||0)),!e.relatedtarget&&l&&(e.relatedtarget=l===e.target?n.toelement:l),e.which||s===t||(e.which=1&s?1:2&s?3:4&s?2:0),e}},special:{load:{nobubble:!0},focus:{trigger:function(){if(this!==at()&&this.focus)try{return this.focus(),!1}catch(e){}},delegatetype:"focusin"},blur:{trigger:function(){return this===at()&&this.blur?(this.blur(),!1):t},delegatetype:"focusout"},click:{trigger:function(){return x.nodename(this,"input")&&"checkbox"===this.type&&this.click?(this.click(),!1):t},_default:function(e){return x.nodename(e.target,"a")}},beforeunload:{postdispatch:function(e){e.result!==t&&(e.originalevent.returnvalue=e.result)}}},simulate:function(e,t,n,r){var i=x.extend(new x.event,n,{type:e,issimulated:!0,originalevent:{}});r?x.event.trigger(i,null,t):x.event.dispatch.call(t,i),i.isdefaultprevented()&&n.preventdefault()}},x.removeevent=a.removeeventlistener?function(e,t,n){e.removeeventlistener&&e.removeeventlistener(t,n,!1)}:function(e,t,n){var r="on"+t;e.detachevent&&(typeof e[r]===i&&(e[r]=null),e.detachevent(r,n))},x.event=function(e,n){return this instanceof x.event?(e&&e.type?(this.originalevent=e,this.type=e.type,this.isdefaultprevented=e.defaultprevented||e.returnvalue===!1||e.getpreventdefault&&e.getpreventdefault()?it:ot):this.type=e,n&&x.extend(this,n),this.timestamp=e&&e.timestamp||x.now(),this[x.expando]=!0,t):new x.event(e,n)},x.event.prototype={isdefaultprevented:ot,ispropagationstopped:ot,isimmediatepropagationstopped:ot,preventdefault:function(){var e=this.originalevent;this.isdefaultprevented=it,e&&(e.preventdefault?e.preventdefault():e.returnvalue=!1)},stoppropagation:function(){var e=this.originalevent;this.ispropagationstopped=it,e&&(e.stoppropagation&&e.stoppropagation(),e.cancelbubble=!0)},stopimmediatepropagation:function(){this.isimmediatepropagationstopped=it,this.stoppropagation()}},x.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(e,t){x.event.special[e]={delegatetype:t,bindtype:t,handle:function(e){var n,r=this,i=e.relatedtarget,o=e.handleobj;return(!i||i!==r&&!x.contains(r,i))&&(e.type=o.origtype,n=o.handler.apply(this,arguments),e.type=t),n}}}),x.support.submitbubbles||(x.event.special.submit={setup:function(){return x.nodename(this,"form")?!1:(x.event.add(this,"click._submit keypress._submit",function(e){var n=e.target,r=x.nodename(n,"input")||x.nodename(n,"button")?n.form:t;r&&!x._data(r,"submitbubbles")&&(x.event.add(r,"submit._submit",function(e){e._submit_bubble=!0}),x._data(r,"submitbubbles",!0))}),t)},postdispatch:function(e){e._submit_bubble&&(delete e._submit_bubble,this.parentnode&&!e.istrigger&&x.event.simulate("submit",this.parentnode,e,!0))},teardown:function(){return x.nodename(this,"form")?!1:(x.event.remove(this,"._submit"),t)}}),x.support.changebubbles||(x.event.special.change={setup:function(){return z.test(this.nodename)?(("checkbox"===this.type||"radio"===this.type)&&(x.event.add(this,"propertychange._change",function(e){"checked"===e.originalevent.propertyname&&(this._just_changed=!0)}),x.event.add(this,"click._change",function(e){this._just_changed&&!e.istrigger&&(this._just_changed=!1),x.event.simulate("change",this,e,!0)})),!1):(x.event.add(this,"beforeactivate._change",function(e){var t=e.target;z.test(t.nodename)&&!x._data(t,"changebubbles")&&(x.event.add(t,"change._change",function(e){!this.parentnode||e.issimulated||e.istrigger||x.event.simulate("change",this.parentnode,e,!0)}),x._data(t,"changebubbles",!0))}),t)},handle:function(e){var n=e.target;return this!==n||e.issimulated||e.istrigger||"radio"!==n.type&&"checkbox"!==n.type?e.handleobj.handler.apply(this,arguments):t},teardown:function(){return x.event.remove(this,"._change"),!z.test(this.nodename)}}),x.support.focusinbubbles||x.each({focus:"focusin",blur:"focusout"},function(e,t){var n=0,r=function(e){x.event.simulate(t,e.target,x.event.fix(e),!0)};x.event.special[t]={setup:function(){0===n++&&a.addeventlistener(e,r,!0)},teardown:function(){0===--n&&a.removeeventlistener(e,r,!0)}}}),x.fn.extend({on:function(e,n,r,i,o){var a,s;if("object"==typeof e){"string"!=typeof n&&(r=r||n,n=t);for(a in e)this.on(a,n,r,e[a],o);return this}if(null==r&&null==i?(i=n,r=n=t):null==i&&("string"==typeof n?(i=r,r=t):(i=r,r=n,n=t)),i===!1)i=ot;else if(!i)return this;return 1===o&&(s=i,i=function(e){return x().off(e),s.apply(this,arguments)},i.guid=s.guid||(s.guid=x.guid++)),this.each(function(){x.event.add(this,e,i,r,n)})},one:function(e,t,n,r){return this.on(e,t,n,r,1)},off:function(e,n,r){var i,o;if(e&&e.preventdefault&&e.handleobj)return i=e.handleobj,x(e.delegatetarget).off(i.namespace?i.origtype+"."+i.namespace:i.origtype,i.selector,i.handler),this;if("object"==typeof e){for(o in e)this.off(o,n,e[o]);return this}return(n===!1||"function"==typeof n)&&(r=n,n=t),r===!1&&(r=ot),this.each(function(){x.event.remove(this,e,r,n)})},trigger:function(e,t){return this.each(function(){x.event.trigger(e,t,this)})},triggerhandler:function(e,n){var r=this[0];return r?x.event.trigger(e,n,r,!0):t}});var st=/^.[^:#\[\.,]*$/,lt=/^(?:parents|prev(?:until|all))/,ut=x.expr.match.needscontext,ct={children:!0,contents:!0,next:!0,prev:!0};x.fn.extend({find:function(e){var t,n=[],r=this,i=r.length;if("string"!=typeof e)return this.pushstack(x(e).filter(function(){for(t=0;i>t;t++)if(x.contains(r[t],this))return!0}));for(t=0;i>t;t++)x.find(e,r[t],n);return n=this.pushstack(i>1?x.unique(n):n),n.selector=this.selector?this.selector+" "+e:e,n},has:function(e){var t,n=x(e,this),r=n.length;return this.filter(function(){for(t=0;r>t;t++)if(x.contains(this,n[t]))return!0})},not:function(e){return this.pushstack(ft(this,e||[],!0))},filter:function(e){return this.pushstack(ft(this,e||[],!1))},is:function(e){return!!ft(this,"string"==typeof e&&ut.test(e)?x(e):e||[],!1).length},closest:function(e,t){var n,r=0,i=this.length,o=[],a=ut.test(e)||"string"!=typeof e?x(e,t||this.context):0;for(;i>r;r++)for(n=this[r];n&&n!==t;n=n.parentnode)if(11>n.nodetype&&(a?a.index(n)>-1:1===n.nodetype&&x.find.matchesselector(n,e))){n=o.push(n);break}return this.pushstack(o.length>1?x.unique(o):o)},index:function(e){return e?"string"==typeof e?x.inarray(this[0],x(e)):x.inarray(e.jquery?e[0]:e,this):this[0]&&this[0].parentnode?this.first().prevall().length:-1},add:function(e,t){var n="string"==typeof e?x(e,t):x.makearray(e&&e.nodetype?[e]:e),r=x.merge(this.get(),n);return this.pushstack(x.unique(r))},addback:function(e){return this.add(null==e?this.prevobject:this.prevobject.filter(e))}});function pt(e,t){do e=e[t];while(e&&1!==e.nodetype);return e}x.each({parent:function(e){var t=e.parentnode;return t&&11!==t.nodetype?t:null},parents:function(e){return x.dir(e,"parentnode")},parentsuntil:function(e,t,n){return x.dir(e,"parentnode",n)},next:function(e){return pt(e,"nextsibling")},prev:function(e){return pt(e,"previoussibling")},nextall:function(e){return x.dir(e,"nextsibling")},prevall:function(e){return x.dir(e,"previoussibling")},nextuntil:function(e,t,n){return x.dir(e,"nextsibling",n)},prevuntil:function(e,t,n){return x.dir(e,"previoussibling",n)},siblings:function(e){return x.sibling((e.parentnode||{}).firstchild,e)},children:function(e){return x.sibling(e.firstchild)},contents:function(e){return x.nodename(e,"iframe")?e.contentdocument||e.contentwindow.document:x.merge([],e.childnodes)}},function(e,t){x.fn[e]=function(n,r){var i=x.map(this,t,n);return"until"!==e.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=x.filter(r,i)),this.length>1&&(ct[e]||(i=x.unique(i)),lt.test(e)&&(i=i.reverse())),this.pushstack(i)}}),x.extend({filter:function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodetype?x.find.matchesselector(r,e)?[r]:[]:x.find.matches(e,x.grep(t,function(e){return 1===e.nodetype}))},dir:function(e,n,r){var i=[],o=e[n];while(o&&9!==o.nodetype&&(r===t||1!==o.nodetype||!x(o).is(r)))1===o.nodetype&&i.push(o),o=o[n];return i},sibling:function(e,t){var n=[];for(;e;e=e.nextsibling)1===e.nodetype&&e!==t&&n.push(e);return n}});function ft(e,t,n){if(x.isfunction(t))return x.grep(e,function(e,r){return!!t.call(e,r,e)!==n});if(t.nodetype)return x.grep(e,function(e){return e===t!==n});if("string"==typeof t){if(st.test(t))return x.filter(t,e,n);t=x.filter(t,e)}return x.grep(e,function(e){return x.inarray(e,t)>=0!==n})}function dt(e){var t=ht.split("|"),n=e.createdocumentfragment();if(n.createelement)while(t.length)n.createelement(t.pop());return n}var ht="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",gt=/ jquery\d+="(?:null|\d+)"/g,mt=regexp("<(?:"+ht+")[\\s/>]","i"),yt=/^\s+/,vt=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,bt=/<([\w:]+)/,xt=/\s*$/g,at={option:[1,""],legend:[1,"
","
"],area:[1,"",""],param:[1,"",""],thead:[1,"","
"],tr:[2,"","
"],col:[2,"","
"],td:[3,"","
"],_default:x.support.htmlserialize?[0,"",""]:[1,"x
","
"]},jt=dt(a),dt=jt.appendchild(a.createelement("div"));at.optgroup=at.option,at.tbody=at.tfoot=at.colgroup=at.caption=at.thead,at.th=at.td,x.fn.extend({text:function(e){return x.access(this,function(e){return e===t?x.text(this):this.empty().append((this[0]&&this[0].ownerdocument||a).createtextnode(e))},null,e,arguments.length)},append:function(){return this.dommanip(arguments,function(e){if(1===this.nodetype||11===this.nodetype||9===this.nodetype){var t=lt(this,e);t.appendchild(e)}})},prepend:function(){return this.dommanip(arguments,function(e){if(1===this.nodetype||11===this.nodetype||9===this.nodetype){var t=lt(this,e);t.insertbefore(e,t.firstchild)}})},before:function(){return this.dommanip(arguments,function(e){this.parentnode&&this.parentnode.insertbefore(e,this)})},after:function(){return this.dommanip(arguments,function(e){this.parentnode&&this.parentnode.insertbefore(e,this.nextsibling)})},remove:function(e,t){var n,r=e?x.filter(e,this):this,i=0;for(;null!=(n=r[i]);i++)t||1!==n.nodetype||x.cleandata(ft(n)),n.parentnode&&(t&&x.contains(n.ownerdocument,n)&&_t(ft(n,"script")),n.parentnode.removechild(n));return this},empty:function(){var e,t=0;for(;null!=(e=this[t]);t++){1===e.nodetype&&x.cleandata(ft(e,!1));while(e.firstchild)e.removechild(e.firstchild);e.options&&x.nodename(e,"select")&&(e.options.length=0)}return this},clone:function(e,t){return e=null==e?!1:e,t=null==t?e:t,this.map(function(){return x.clone(this,e,t)})},html:function(e){return x.access(this,function(e){var n=this[0]||{},r=0,i=this.length;if(e===t)return 1===n.nodetype?n.innerhtml.replace(gt,""):t;if(!("string"!=typeof e||tt.test(e)||!x.support.htmlserialize&&mt.test(e)||!x.support.leadingwhitespace&&yt.test(e)||at[(bt.exec(e)||["",""])[1].tolowercase()])){e=e.replace(vt,"<$1>");try{for(;i>r;r++)n=this[r]||{},1===n.nodetype&&(x.cleandata(ft(n,!1)),n.innerhtml=e);n=0}catch(o){}}n&&this.empty().append(e)},null,e,arguments.length)},replacewith:function(){var e=x.map(this,function(e){return[e.nextsibling,e.parentnode]}),t=0;return this.dommanip(arguments,function(n){var r=e[t++],i=e[t++];i&&(r&&r.parentnode!==i&&(r=this.nextsibling),x(this).remove(),i.insertbefore(n,r))},!0),t?this:this.remove()},detach:function(e){return this.remove(e,!0)},dommanip:function(e,t,n){e=d.apply([],e);var r,i,o,a,s,l,u=0,c=this.length,p=this,f=c-1,h=e[0],g=x.isfunction(h);if(g||!(1>=c||"string"!=typeof h||x.support.checkclone)&&nt.test(h))return this.each(function(r){var i=p.eq(r);g&&(e[0]=h.call(this,r,i.html())),i.dommanip(e,t,n)});if(c&&(l=x.buildfragment(e,this[0].ownerdocument,!1,!n&&this),r=l.firstchild,1===l.childnodes.length&&(l=r),r)){for(a=x.map(ft(l,"script"),ht),o=a.length;c>u;u++)i=l,u!==f&&(i=x.clone(i,!0,!0),o&&x.merge(a,ft(i,"script"))),t.call(this[u],i,u);if(o)for(s=a[a.length-1].ownerdocument,x.map(a,qt),u=0;o>u;u++)i=a[u],kt.test(i.type||"")&&!x._data(i,"globaleval")&&x.contains(s,i)&&(i.src?x._evalurl(i.src):x.globaleval((i.text||i.textcontent||i.innerhtml||"").replace(st,"")));l=r=null}return this}});function lt(e,t){return x.nodename(e,"table")&&x.nodename(1===t.nodetype?t:t.firstchild,"tr")?e.getelementsbytagname("tbody")[0]||e.appendchild(e.ownerdocument.createelement("tbody")):e}function ht(e){return e.type=(null!==x.find.attr(e,"type"))+"/"+e.type,e}function qt(e){var t=et.exec(e.type);return t?e.type=t[1]:e.removeattribute("type"),e}function _t(e,t){var n,r=0;for(;null!=(n=e[r]);r++)x._data(n,"globaleval",!t||x._data(t[r],"globaleval"))}function mt(e,t){if(1===t.nodetype&&x.hasdata(e)){var n,r,i,o=x._data(e),a=x._data(t,o),s=o.events;if(s){delete a.handle,a.events={};for(n in s)for(r=0,i=s[n].length;i>r;r++)x.event.add(t,n,s[n][r])}a.data&&(a.data=x.extend({},a.data))}}function ot(e,t){var n,r,i;if(1===t.nodetype){if(n=t.nodename.tolowercase(),!x.support.nocloneevent&&t[x.expando]){i=x._data(t);for(r in i.events)x.removeevent(t,r,i.handle);t.removeattribute(x.expando)}"script"===n&&t.text!==e.text?(ht(t).text=e.text,qt(t)):"object"===n?(t.parentnode&&(t.outerhtml=e.outerhtml),x.support.html5clone&&e.innerhtml&&!x.trim(t.innerhtml)&&(t.innerhtml=e.innerhtml)):"input"===n&&ct.test(e.type)?(t.defaultchecked=t.checked=e.checked,t.value!==e.value&&(t.value=e.value)):"option"===n?t.defaultselected=t.selected=e.defaultselected:("input"===n||"textarea"===n)&&(t.defaultvalue=e.defaultvalue)}}x.each({appendto:"append",prependto:"prepend",insertbefore:"before",insertafter:"after",replaceall:"replacewith"},function(e,t){x.fn[e]=function(e){var n,r=0,i=[],o=x(e),a=o.length-1;for(;a>=r;r++)n=r===a?this:this.clone(!0),x(o[r])[t](n),h.apply(i,n.get());return this.pushstack(i)}});function ft(e,n){var r,o,a=0,s=typeof e.getelementsbytagname!==i?e.getelementsbytagname(n||"*"):typeof e.queryselectorall!==i?e.queryselectorall(n||"*"):t;if(!s)for(s=[],r=e.childnodes||e;null!=(o=r[a]);a++)!n||x.nodename(o,n)?s.push(o):x.merge(s,ft(o,n));return n===t||n&&x.nodename(e,n)?x.merge([e],s):s}function bt(e){ct.test(e.type)&&(e.defaultchecked=e.checked)}x.extend({clone:function(e,t,n){var r,i,o,a,s,l=x.contains(e.ownerdocument,e);if(x.support.html5clone||x.isxmldoc(e)||!mt.test("<"+e.nodename+">")?o=e.clonenode(!0):(dt.innerhtml=e.outerhtml,dt.removechild(o=dt.firstchild)),!(x.support.nocloneevent&&x.support.noclonechecked||1!==e.nodetype&&11!==e.nodetype||x.isxmldoc(e)))for(r=ft(o),s=ft(e),a=0;null!=(i=s[a]);++a)r[a]&&ot(i,r[a]);if(t)if(n)for(s=s||ft(e),r=r||ft(o),a=0;null!=(i=s[a]);a++)mt(i,r[a]);else mt(e,o);return r=ft(o,"script"),r.length>0&&_t(r,!l&&ft(e,"script")),r=s=i=null,o},buildfragment:function(e,t,n,r){var i,o,a,s,l,u,c,p=e.length,f=dt(t),d=[],h=0;for(;p>h;h++)if(o=e[h],o||0===o)if("object"===x.type(o))x.merge(d,o.nodetype?[o]:o);else if(wt.test(o)){s=s||f.appendchild(t.createelement("div")),l=(bt.exec(o)||["",""])[1].tolowercase(),c=at[l]||at._default,s.innerhtml=c[1]+o.replace(vt,"<$1>")+c[2],i=c[0];while(i--)s=s.lastchild;if(!x.support.leadingwhitespace&&yt.test(o)&&d.push(t.createtextnode(yt.exec(o)[0])),!x.support.tbody){o="table"!==l||xt.test(o)?""!==c[1]||xt.test(o)?0:s:s.firstchild,i=o&&o.childnodes.length;while(i--)x.nodename(u=o.childnodes[i],"tbody")&&!u.childnodes.length&&o.removechild(u)}x.merge(d,s.childnodes),s.textcontent="";while(s.firstchild)s.removechild(s.firstchild);s=f.lastchild}else d.push(t.createtextnode(o));s&&f.removechild(s),x.support.appendchecked||x.grep(ft(d,"input"),bt),h=0;while(o=d[h++])if((!r||-1===x.inarray(o,r))&&(a=x.contains(o.ownerdocument,o),s=ft(f.appendchild(o),"script"),a&&_t(s),n)){i=0;while(o=s[i++])kt.test(o.type||"")&&n.push(o)}return s=null,f},cleandata:function(e,t){var n,r,o,a,s=0,l=x.expando,u=x.cache,c=x.support.deleteexpando,f=x.event.special;for(;null!=(n=e[s]);s++)if((t||x.acceptdata(n))&&(o=n[l],a=o&&u[o])){if(a.events)for(r in a.events)f[r]?x.event.remove(n,r):x.removeevent(n,r,a.handle); u[o]&&(delete u[o],c?delete n[l]:typeof n.removeattribute!==i?n.removeattribute(l):n[l]=null,p.push(o))}},_evalurl:function(e){return x.ajax({url:e,type:"get",datatype:"script",async:!1,global:!1,"throws":!0})}}),x.fn.extend({wrapall:function(e){if(x.isfunction(e))return this.each(function(t){x(this).wrapall(e.call(this,t))});if(this[0]){var t=x(e,this[0].ownerdocument).eq(0).clone(!0);this[0].parentnode&&t.insertbefore(this[0]),t.map(function(){var e=this;while(e.firstchild&&1===e.firstchild.nodetype)e=e.firstchild;return e}).append(this)}return this},wrapinner:function(e){return x.isfunction(e)?this.each(function(t){x(this).wrapinner(e.call(this,t))}):this.each(function(){var t=x(this),n=t.contents();n.length?n.wrapall(e):t.append(e)})},wrap:function(e){var t=x.isfunction(e);return this.each(function(n){x(this).wrapall(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){x.nodename(this,"body")||x(this).replacewith(this.childnodes)}).end()}});var pt,rt,wt,$t=/alpha\([^)]*\)/i,it=/opacity\s*=\s*([^)]*)/,zt=/^(top|right|bottom|left)$/,xt=/^(none|table(?!-c[ea]).+)/,ut=/^margin/,vt=regexp("^("+w+")(.*)$","i"),yt=regexp("^("+w+")(?!px)[a-z%]+$","i"),jt=regexp("^([+-])=("+w+")","i"),gt={body:"block"},qt={position:"absolute",visibility:"hidden",display:"block"},kt={letterspacing:0,fontweight:400},zt=["top","right","bottom","left"],en=["webkit","o","moz","ms"];function tn(e,t){if(t in e)return t;var n=t.charat(0).touppercase()+t.slice(1),r=t,i=en.length;while(i--)if(t=en[i]+n,t in e)return t;return r}function nn(e,t){return e=t||e,"none"===x.css(e,"display")||!x.contains(e.ownerdocument,e)}function rn(e,t){var n,r,i,o=[],a=0,s=e.length;for(;s>a;a++)r=e[a],r.style&&(o[a]=x._data(r,"olddisplay"),n=r.style.display,t?(o[a]||"none"!==n||(r.style.display=""),""===r.style.display&&nn(r)&&(o[a]=x._data(r,"olddisplay",ln(r.nodename)))):o[a]||(i=nn(r),(n&&"none"!==n||!i)&&x._data(r,"olddisplay",i?n:x.css(r,"display"))));for(a=0;s>a;a++)r=e[a],r.style&&(t&&"none"!==r.style.display&&""!==r.style.display||(r.style.display=t?o[a]||"":"none"));return e}x.fn.extend({css:function(e,n){return x.access(this,function(e,n,r){var i,o,a={},s=0;if(x.isarray(n)){for(o=rt(e),i=n.length;i>s;s++)a[n[s]]=x.css(e,n[s],!1,o);return a}return r!==t?x.style(e,n,r):x.css(e,n)},e,n,arguments.length>1)},show:function(){return rn(this,!0)},hide:function(){return rn(this)},toggle:function(e){var t="boolean"==typeof e;return this.each(function(){(t?e:nn(this))?x(this).show():x(this).hide()})}}),x.extend({csshooks:{opacity:{get:function(e,t){if(t){var n=wt(e,"opacity");return""===n?"1":n}}}},cssnumber:{columncount:!0,fillopacity:!0,fontweight:!0,lineheight:!0,opacity:!0,orphans:!0,widows:!0,zindex:!0,zoom:!0},cssprops:{"float":x.support.cssfloat?"cssfloat":"stylefloat"},style:function(e,n,r,i){if(e&&3!==e.nodetype&&8!==e.nodetype&&e.style){var o,a,s,l=x.camelcase(n),u=e.style;if(n=x.cssprops[l]||(x.cssprops[l]=tn(u,l)),s=x.csshooks[n]||x.csshooks[l],r===t)return s&&"get"in s&&(o=s.get(e,!1,i))!==t?o:u[n];if(a=typeof r,"string"===a&&(o=jt.exec(r))&&(r=(o[1]+1)*o[2]+parsefloat(x.css(e,n)),a="number"),!(null==r||"number"===a&&isnan(r)||("number"!==a||x.cssnumber[l]||(r+="px"),x.support.clearclonestyle||""!==r||0!==n.indexof("background")||(u[n]="inherit"),s&&"set"in s&&(r=s.set(e,r,i))===t)))try{u[n]=r}catch(c){}}},css:function(e,n,r,i){var o,a,s,l=x.camelcase(n);return n=x.cssprops[l]||(x.cssprops[l]=tn(e.style,l)),s=x.csshooks[n]||x.csshooks[l],s&&"get"in s&&(a=s.get(e,!0,r)),a===t&&(a=wt(e,n,i)),"normal"===a&&n in kt&&(a=kt[n]),""===r||r?(o=parsefloat(a),r===!0||x.isnumeric(o)?o||0:a):a}}),e.getcomputedstyle?(rt=function(t){return e.getcomputedstyle(t,null)},wt=function(e,n,r){var i,o,a,s=r||rt(e),l=s?s.getpropertyvalue(n)||s[n]:t,u=e.style;return s&&(""!==l||x.contains(e.ownerdocument,e)||(l=x.style(e,n)),yt.test(l)&&ut.test(n)&&(i=u.width,o=u.minwidth,a=u.maxwidth,u.minwidth=u.maxwidth=u.width=l,l=s.width,u.width=i,u.minwidth=o,u.maxwidth=a)),l}):a.documentelement.currentstyle&&(rt=function(e){return e.currentstyle},wt=function(e,n,r){var i,o,a,s=r||rt(e),l=s?s[n]:t,u=e.style;return null==l&&u&&u[n]&&(l=u[n]),yt.test(l)&&!zt.test(n)&&(i=u.left,o=e.runtimestyle,a=o&&o.left,a&&(o.left=e.currentstyle.left),u.left="fontsize"===n?"1em":l,l=u.pixelleft+"px",u.left=i,a&&(o.left=a)),""===l?"auto":l});function on(e,t,n){var r=vt.exec(t);return r?math.max(0,r[1]-(n||0))+(r[2]||"px"):t}function an(e,t,n,r,i){var o=n===(r?"border":"content")?4:"width"===t?1:0,a=0;for(;4>o;o+=2)"margin"===n&&(a+=x.css(e,n+zt[o],!0,i)),r?("content"===n&&(a-=x.css(e,"padding"+zt[o],!0,i)),"margin"!==n&&(a-=x.css(e,"border"+zt[o]+"width",!0,i))):(a+=x.css(e,"padding"+zt[o],!0,i),"padding"!==n&&(a+=x.css(e,"border"+zt[o]+"width",!0,i)));return a}function sn(e,t,n){var r=!0,i="width"===t?e.offsetwidth:e.offsetheight,o=rt(e),a=x.support.boxsizing&&"border-box"===x.css(e,"boxsizing",!1,o);if(0>=i||null==i){if(i=wt(e,t,o),(0>i||null==i)&&(i=e.style[t]),yt.test(i))return i;r=a&&(x.support.boxsizingreliable||i===e.style[t]),i=parsefloat(i)||0}return i+an(e,t,n||(a?"border":"content"),r,o)+"px"}function ln(e){var t=a,n=gt[e];return n||(n=un(e,t),"none"!==n&&n||(pt=(pt||x("', error : '

the requested content cannot be loaded.
please try again later.

', closebtn : '', next : '', prev : '' }, // properties for each animation type // opening fancybox openeffect : 'fade', // 'elastic', 'fade' or 'none' openspeed : 250, openeasing : 'swing', openopacity : true, openmethod : 'zoomin', // closing fancybox closeeffect : 'fade', // 'elastic', 'fade' or 'none' closespeed : 250, closeeasing : 'swing', closeopacity : true, closemethod : 'zoomout', // changing next gallery item nexteffect : 'elastic', // 'elastic', 'fade' or 'none' nextspeed : 250, nexteasing : 'swing', nextmethod : 'changein', // changing previous gallery item preveffect : 'elastic', // 'elastic', 'fade' or 'none' prevspeed : 250, preveasing : 'swing', prevmethod : 'changeout', // enable default helpers helpers : { overlay : true, title : true }, // callbacks oncancel : $.noop, // if canceling beforeload : $.noop, // before loading afterload : $.noop, // after loading beforeshow : $.noop, // before changing in current item aftershow : $.noop, // after opening beforechange : $.noop, // before changing gallery item beforeclose : $.noop, // before closing afterclose : $.noop // after closing }, //current state group : {}, // selected group opts : {}, // group options previous : null, // previous element coming : null, // element being loaded current : null, // currently loaded element isactive : false, // is activated isopen : false, // is currently open isopened : false, // have been fully opened at least once wrap : null, skin : null, outer : null, inner : null, player : { timer : null, isactive : false }, // loaders ajaxload : null, imgpreload : null, // some collections transitions : {}, helpers : {}, /* * static methods */ open: function (group, opts) { if (!group) { return; } if (!$.isplainobject(opts)) { opts = {}; } // close if already active if (false === f.close(true)) { return; } // normalize group if (!$.isarray(group)) { group = isquery(group) ? $(group).get() : [group]; } // recheck if the type of each element is `object` and set content type (image, ajax, etc) $.each(group, function(i, element) { var obj = {}, href, title, content, type, rez, hrefparts, selector; if ($.type(element) === "object") { // check if is dom element if (element.nodetype) { element = $(element); } if (isquery(element)) { obj = { href : element.data('fancybox-href') || element.attr('href'), title : element.data('fancybox-title') || element.attr('title'), isdom : true, element : element }; if ($.metadata) { $.extend(true, obj, element.metadata()); } } else { obj = element; } } href = opts.href || obj.href || (isstring(element) ? element : null); title = opts.title !== undefined ? opts.title : obj.title || ''; content = opts.content || obj.content; type = content ? 'html' : (opts.type || obj.type); if (!type && obj.isdom) { type = element.data('fancybox-type'); if (!type) { rez = element.prop('class').match(/fancybox\.(\w+)/); type = rez ? rez[1] : null; } } if (isstring(href)) { // try to guess the content type if (!type) { if (f.isimage(href)) { type = 'image'; } else if (f.isswf(href)) { type = 'swf'; } else if (href.charat(0) === '#') { type = 'inline'; } else if (isstring(element)) { type = 'html'; content = element; } } // split url into two pieces with source url and content selector, e.g, // "/mypage.html #my_id" will load "/mypage.html" and display element having id "my_id" if (type === 'ajax') { hrefparts = href.split(/\s+/, 2); href = hrefparts.shift(); selector = hrefparts.shift(); } } if (!content) { if (type === 'inline') { if (href) { content = $( isstring(href) ? href.replace(/.*(?=#[^\s]+$)/, '') : href ); //strip for ie7 } else if (obj.isdom) { content = element; } } else if (type === 'html') { content = href; } else if (!type && !href && obj.isdom) { type = 'inline'; content = element; } } $.extend(obj, { href : href, type : type, content : content, title : title, selector : selector }); group[ i ] = obj; }); // extend the defaults f.opts = $.extend(true, {}, f.defaults, opts); // all options are merged recursive except keys if (opts.keys !== undefined) { f.opts.keys = opts.keys ? $.extend({}, f.defaults.keys, opts.keys) : false; } f.group = group; return f._start(f.opts.index); }, // cancel image loading or abort ajax request cancel: function () { var coming = f.coming; if (!coming || false === f.trigger('oncancel')) { return; } f.hideloading(); if (f.ajaxload) { f.ajaxload.abort(); } f.ajaxload = null; if (f.imgpreload) { f.imgpreload.onload = f.imgpreload.onerror = null; } if (coming.wrap) { coming.wrap.stop(true, true).trigger('onreset').remove(); } f.coming = null; // if the first item has been canceled, then clear everything if (!f.current) { f._afterzoomout( coming ); } }, // start closing animation if is open; remove immediately if opening/closing close: function (event) { f.cancel(); if (false === f.trigger('beforeclose')) { return; } f.unbindevents(); if (!f.isactive) { return; } if (!f.isopen || event === true) { $('.fancybox-wrap').stop(true).trigger('onreset').remove(); f._afterzoomout(); } else { f.isopen = f.isopened = false; f.isclosing = true; $('.fancybox-item, .fancybox-nav').remove(); f.wrap.stop(true, true).removeclass('fancybox-opened'); f.transitions[ f.current.closemethod ](); } }, // manage slideshow: // $.fancybox.play(); - toggle slideshow // $.fancybox.play( true ); - start // $.fancybox.play( false ); - stop play: function ( action ) { var clear = function () { cleartimeout(f.player.timer); }, set = function () { clear(); if (f.current && f.player.isactive) { f.player.timer = settimeout(f.next, f.current.playspeed); } }, stop = function () { clear(); $('body').unbind('.player'); f.player.isactive = false; f.trigger('onplayend'); }, start = function () { if (f.current && (f.current.loop || f.current.index < f.group.length - 1)) { f.player.isactive = true; $('body').bind({ 'aftershow.player onupdate.player' : set, 'oncancel.player beforeclose.player' : stop, 'beforeload.player' : clear }); set(); f.trigger('onplaystart'); } }; if (action === true || (!f.player.isactive && action !== false)) { start(); } else { stop(); } }, // navigate to next gallery item next: function ( direction ) { var current = f.current; if (current) { if (!isstring(direction)) { direction = current.direction.next; } f.jumpto(current.index + 1, direction, 'next'); } }, // navigate to previous gallery item prev: function ( direction ) { var current = f.current; if (current) { if (!isstring(direction)) { direction = current.direction.prev; } f.jumpto(current.index - 1, direction, 'prev'); } }, // navigate to gallery item by index jumpto: function ( index, direction, router ) { var current = f.current; if (!current) { return; } index = getscalar(index); f.direction = direction || current.direction[ (index >= current.index ? 'next' : 'prev') ]; f.router = router || 'jumpto'; if (current.loop) { if (index < 0) { index = current.group.length + (index % current.group.length); } index = index % current.group.length; } if (current.group[ index ] !== undefined) { f.cancel(); f._start(index); } }, // center inside viewport and toggle position type to fixed or absolute if needed reposition: function (e, onlyabsolute) { var current = f.current, wrap = current ? current.wrap : null, pos; if (wrap) { pos = f._getposition(onlyabsolute); if (e && e.type === 'scroll') { delete pos.position; wrap.stop(true, true).animate(pos, 200); } else { wrap.css(pos); current.pos = $.extend({}, current.dim, pos); } } }, update: function (e) { var type = (e && e.type), anyway = !type || type === 'orientationchange'; if (anyway) { cleartimeout(didupdate); didupdate = null; } if (!f.isopen || didupdate) { return; } didupdate = settimeout(function() { var current = f.current; if (!current || f.isclosing) { return; } f.wrap.removeclass('fancybox-tmp'); if (anyway || type === 'load' || (type === 'resize' && current.autoresize)) { f._setdimension(); } if (!(type === 'scroll' && current.canshrink)) { f.reposition(e); } f.trigger('onupdate'); didupdate = null; }, (anyway && !istouch ? 0 : 300)); }, // shrink content to fit inside viewport or restore if resized toggle: function ( action ) { if (f.isopen) { f.current.fittoview = $.type(action) === "boolean" ? action : !f.current.fittoview; // help browser to restore document dimensions if (istouch) { f.wrap.removeattr('style').addclass('fancybox-tmp'); f.trigger('onupdate'); } f.update(); } }, hideloading: function () { d.unbind('.loading'); $('#fancybox-loading').remove(); }, showloading: function () { var el, viewport; f.hideloading(); el = $('
').click(f.cancel).appendto('body'); // if user will press the escape-button, the request will be canceled d.bind('keydown.loading', function(e) { if ((e.which || e.keycode) === 27) { e.preventdefault(); f.cancel(); } }); if (!f.defaults.fixed) { viewport = f.getviewport(); el.css({ position : 'absolute', top : (viewport.h * 0.5) + viewport.y, left : (viewport.w * 0.5) + viewport.x }); } }, getviewport: function () { var locked = (f.current && f.current.locked) || false, rez = { x: w.scrollleft(), y: w.scrolltop() }; if (locked) { rez.w = locked[0].clientwidth; rez.h = locked[0].clientheight; } else { // see http://bugs.jquery.com/ticket/6724 rez.w = istouch && window.innerwidth ? window.innerwidth : w.width(); rez.h = istouch && window.innerheight ? window.innerheight : w.height(); } return rez; }, // unbind the keyboard / clicking actions unbindevents: function () { if (f.wrap && isquery(f.wrap)) { f.wrap.unbind('.fb'); } d.unbind('.fb'); w.unbind('.fb'); }, bindevents: function () { var current = f.current, keys; if (!current) { return; } // changing document height on ios devices triggers a 'resize' event, // that can change document height... repeating infinitely w.bind('orientationchange.fb' + (istouch ? '' : ' resize.fb') + (current.autocenter && !current.locked ? ' scroll.fb' : ''), f.update); keys = current.keys; if (keys) { d.bind('keydown.fb', function (e) { var code = e.which || e.keycode, target = e.target || e.srcelement; // skip esc key if loading, because showloading will cancel preloading if (code === 27 && f.coming) { return false; } // ignore key combinations and key events within form elements if (!e.ctrlkey && !e.altkey && !e.shiftkey && !e.metakey && !(target && (target.type || $(target).is('[contenteditable]')))) { $.each(keys, function(i, val) { if (current.group.length > 1 && val[ code ] !== undefined) { f[ i ]( val[ code ] ); e.preventdefault(); return false; } if ($.inarray(code, val) > -1) { f[ i ] (); e.preventdefault(); return false; } }); } }); } if ($.fn.mousewheel && current.mousewheel) { f.wrap.bind('mousewheel.fb', function (e, delta, deltax, deltay) { var target = e.target || null, parent = $(target), canscroll = false; while (parent.length) { if (canscroll || parent.is('.fancybox-skin') || parent.is('.fancybox-wrap')) { break; } canscroll = isscrollable( parent[0] ); parent = $(parent).parent(); } if (delta !== 0 && !canscroll) { if (f.group.length > 1 && !current.canshrink) { if (deltay > 0 || deltax > 0) { f.prev( deltay > 0 ? 'down' : 'left' ); } else if (deltay < 0 || deltax < 0) { f.next( deltay < 0 ? 'up' : 'right' ); } e.preventdefault(); } } }); } }, trigger: function (event, o) { var ret, obj = o || f.coming || f.current; if (!obj) { return; } if ($.isfunction( obj[event] )) { ret = obj[event].apply(obj, array.prototype.slice.call(arguments, 1)); } if (ret === false) { return false; } if (obj.helpers) { $.each(obj.helpers, function (helper, opts) { if (opts && f.helpers[helper] && $.isfunction(f.helpers[helper][event])) { opts = $.extend(true, {}, f.helpers[helper].defaults, opts); f.helpers[helper][event](opts, obj); } }); } $.event.trigger(event + '.fb'); }, isimage: function (str) { return isstring(str) && str.match(/(^data:image\/.*,)|(\.(jp(e|g|eg)|gif|png|bmp|webp)((\?|#).*)?$)/i); }, isswf: function (str) { return isstring(str) && str.match(/\.(swf)((\?|#).*)?$/i); }, _start: function (index) { var coming = {}, obj, href, type, margin, padding; index = getscalar( index ); obj = f.group[ index ] || null; if (!obj) { return false; } coming = $.extend(true, {}, f.opts, obj); // convert margin and padding properties to array - top, right, bottom, left margin = coming.margin; padding = coming.padding; if ($.type(margin) === 'number') { coming.margin = [margin, margin, margin, margin]; } if ($.type(padding) === 'number') { coming.padding = [padding, padding, padding, padding]; } // 'modal' propery is just a shortcut if (coming.modal) { $.extend(true, coming, { closebtn : false, closeclick : false, nextclick : false, arrows : false, mousewheel : false, keys : null, helpers: { overlay : { closeclick : false } } }); } // 'autosize' property is a shortcut, too if (coming.autosize) { coming.autowidth = coming.autoheight = true; } if (coming.width === 'auto') { coming.autowidth = true; } if (coming.height === 'auto') { coming.autoheight = true; } /* * add reference to the group, so it`s possible to access from callbacks, example: * afterload : function() { * this.title = 'image ' + (this.index + 1) + ' of ' + this.group.length + (this.title ? ' - ' + this.title : ''); * } */ coming.group = f.group; coming.index = index; // give a chance for callback or helpers to update coming item (type, title, etc) f.coming = coming; if (false === f.trigger('beforeload')) { f.coming = null; return; } type = coming.type; href = coming.href; if (!type) { f.coming = null; //if we can not determine content type then drop silently or display next/prev item if looping through gallery if (f.current && f.router && f.router !== 'jumpto') { f.current.index = index; return f[ f.router ]( f.direction ); } return false; } f.isactive = true; if (type === 'image' || type === 'swf') { coming.autoheight = coming.autowidth = false; coming.scrolling = 'visible'; } if (type === 'image') { coming.aspectratio = true; } if (type === 'iframe' && istouch) { coming.scrolling = 'scroll'; } // build the neccessary markup coming.wrap = $(coming.tpl.wrap).addclass('fancybox-' + (istouch ? 'mobile' : 'desktop') + ' fancybox-type-' + type + ' fancybox-tmp ' + coming.wrapcss).appendto( coming.parent || 'body' ); $.extend(coming, { skin : $('.fancybox-skin', coming.wrap), outer : $('.fancybox-outer', coming.wrap), inner : $('.fancybox-inner', coming.wrap) }); $.each(["top", "right", "bottom", "left"], function(i, v) { coming.skin.css('padding' + v, getvalue(coming.padding[ i ])); }); f.trigger('onready'); // check before try to load; 'inline' and 'html' types need content, others - href if (type === 'inline' || type === 'html') { if (!coming.content || !coming.content.length) { return f._error( 'content' ); } } else if (!href) { return f._error( 'href' ); } if (type === 'image') { f._loadimage(); } else if (type === 'ajax') { f._loadajax(); } else if (type === 'iframe') { f._loadiframe(); } else { f._afterload(); } }, _error: function ( type ) { $.extend(f.coming, { type : 'html', autowidth : true, autoheight : true, minwidth : 0, minheight : 0, scrolling : 'no', haserror : type, content : f.coming.tpl.error }); f._afterload(); }, _loadimage: function () { // reset preload image so it is later possible to check "complete" property var img = f.imgpreload = new image(); img.onload = function () { this.onload = this.onerror = null; f.coming.width = this.width; f.coming.height = this.height; f._afterload(); }; img.onerror = function () { this.onload = this.onerror = null; f._error( 'image' ); }; img.src = f.coming.href; if (img.complete !== true) { f.showloading(); } }, _loadajax: function () { var coming = f.coming; f.showloading(); f.ajaxload = $.ajax($.extend({}, coming.ajax, { url: coming.href, error: function (jqxhr, textstatus) { if (f.coming && textstatus !== 'abort') { f._error( 'ajax', jqxhr ); } else { f.hideloading(); } }, success: function (data, textstatus) { if (textstatus === 'success') { coming.content = data; f._afterload(); } } })); }, _loadiframe: function() { var coming = f.coming, iframe = $(coming.tpl.iframe.replace(/\{rnd\}/g, new date().gettime())) .attr('scrolling', istouch ? 'auto' : coming.iframe.scrolling) .attr('src', coming.href); // this helps ie $(coming.wrap).bind('onreset', function () { try { $(this).find('iframe').hide().attr('src', '//about:blank').end().empty(); } catch (e) {} }); if (coming.iframe.preload) { f.showloading(); iframe.one('load', function() { $(this).data('ready', 1); // ios will lose scrolling if we resize if (!istouch) { $(this).bind('load.fb', f.update); } // without this trick: // - iframe won't scroll on ios devices // - ie7 sometimes displays empty iframe $(this).parents('.fancybox-wrap').width('100%').removeclass('fancybox-tmp').show(); f._afterload(); }); } coming.content = iframe.appendto( coming.inner ); if (!coming.iframe.preload) { f._afterload(); } }, _preloadimages: function() { var group = f.group, current = f.current, len = group.length, cnt = current.preload ? math.min(current.preload, len - 1) : 0, item, i; for (i = 1; i <= cnt; i += 1) { item = group[ (current.index + i ) % len ]; if (item.type === 'image' && item.href) { new image().src = item.href; } } }, _afterload: function () { var coming = f.coming, previous = f.current, placeholder = 'fancybox-placeholder', current, content, type, scrolling, href, embed; f.hideloading(); if (!coming || f.isactive === false) { return; } if (false === f.trigger('afterload', coming, previous)) { coming.wrap.stop(true).trigger('onreset').remove(); f.coming = null; return; } if (previous) { f.trigger('beforechange', previous); previous.wrap.stop(true).removeclass('fancybox-opened') .find('.fancybox-item, .fancybox-nav') .remove(); } f.unbindevents(); current = coming; content = coming.content; type = coming.type; scrolling = coming.scrolling; $.extend(f, { wrap : current.wrap, skin : current.skin, outer : current.outer, inner : current.inner, current : current, previous : previous }); href = current.href; switch (type) { case 'inline': case 'ajax': case 'html': if (current.selector) { content = $('
').html(content).find(current.selector); } else if (isquery(content)) { if (!content.data(placeholder)) { content.data(placeholder, $('
').insertafter( content ).hide() ); } content = content.show().detach(); current.wrap.bind('onreset', function () { if ($(this).find(content).length) { content.hide().replaceall( content.data(placeholder) ).data(placeholder, false); } }); } break; case 'image': content = current.tpl.image.replace('{href}', href); break; case 'swf': content = ''; embed = ''; $.each(current.swf, function(name, val) { content += ''; embed += ' ' + name + '="' + val + '"'; }); content += ''; break; } if (!(isquery(content) && content.parent().is(current.inner))) { current.inner.append( content ); } // give a chance for helpers or callbacks to update elements f.trigger('beforeshow'); // set scrolling before calculating dimensions current.inner.css('overflow', scrolling === 'yes' ? 'scroll' : (scrolling === 'no' ? 'hidden' : scrolling)); // set initial dimensions and start position f._setdimension(); f.reposition(); f.isopen = false; f.coming = null; f.bindevents(); if (!f.isopened) { $('.fancybox-wrap').not( current.wrap ).stop(true).trigger('onreset').remove(); } else if (previous.prevmethod) { f.transitions[ previous.prevmethod ](); } f.transitions[ f.isopened ? current.nextmethod : current.openmethod ](); f._preloadimages(); }, _setdimension: function () { var viewport = f.getviewport(), steps = 0, canshrink = false, canexpand = false, wrap = f.wrap, skin = f.skin, inner = f.inner, current = f.current, width = current.width, height = current.height, minwidth = current.minwidth, minheight = current.minheight, maxwidth = current.maxwidth, maxheight = current.maxheight, scrolling = current.scrolling, scrollout = current.scrolloutside ? current.scrollbarwidth : 0, margin = current.margin, wmargin = getscalar(margin[1] + margin[3]), hmargin = getscalar(margin[0] + margin[2]), wpadding, hpadding, wspace, hspace, origwidth, origheight, origmaxwidth, origmaxheight, ratio, width_, height_, maxwidth_, maxheight_, iframe, body; // reset dimensions so we could re-check actual size wrap.add(skin).add(inner).width('auto').height('auto').removeclass('fancybox-tmp'); wpadding = getscalar(skin.outerwidth(true) - skin.width()); hpadding = getscalar(skin.outerheight(true) - skin.height()); // any space between content and viewport (margin, padding, border, title) wspace = wmargin + wpadding; hspace = hmargin + hpadding; origwidth = ispercentage(width) ? (viewport.w - wspace) * getscalar(width) / 100 : width; origheight = ispercentage(height) ? (viewport.h - hspace) * getscalar(height) / 100 : height; if (current.type === 'iframe') { iframe = current.content; if (current.autoheight && iframe.data('ready') === 1) { try { if (iframe[0].contentwindow.document.location) { inner.width( origwidth ).height(9999); body = iframe.contents().find('body'); if (scrollout) { body.css('overflow-x', 'hidden'); } origheight = body.height(); } } catch (e) {} } } else if (current.autowidth || current.autoheight) { inner.addclass( 'fancybox-tmp' ); // set width or height in case we need to calculate only one dimension if (!current.autowidth) { inner.width( origwidth ); } if (!current.autoheight) { inner.height( origheight ); } if (current.autowidth) { origwidth = inner.width(); } if (current.autoheight) { origheight = inner.height(); } inner.removeclass( 'fancybox-tmp' ); } width = getscalar( origwidth ); height = getscalar( origheight ); ratio = origwidth / origheight; // calculations for the content minwidth = getscalar(ispercentage(minwidth) ? getscalar(minwidth, 'w') - wspace : minwidth); maxwidth = getscalar(ispercentage(maxwidth) ? getscalar(maxwidth, 'w') - wspace : maxwidth); minheight = getscalar(ispercentage(minheight) ? getscalar(minheight, 'h') - hspace : minheight); maxheight = getscalar(ispercentage(maxheight) ? getscalar(maxheight, 'h') - hspace : maxheight); // these will be used to determine if wrap can fit in the viewport origmaxwidth = maxwidth; origmaxheight = maxheight; if (current.fittoview) { maxwidth = math.min(viewport.w - wspace, maxwidth); maxheight = math.min(viewport.h - hspace, maxheight); } maxwidth_ = viewport.w - wmargin; maxheight_ = viewport.h - hmargin; if (current.aspectratio) { if (width > maxwidth) { width = maxwidth; height = getscalar(width / ratio); } if (height > maxheight) { height = maxheight; width = getscalar(height * ratio); } if (width < minwidth) { width = minwidth; height = getscalar(width / ratio); } if (height < minheight) { height = minheight; width = getscalar(height * ratio); } } else { width = math.max(minwidth, math.min(width, maxwidth)); if (current.autoheight && current.type !== 'iframe') { inner.width( width ); height = inner.height(); } height = math.max(minheight, math.min(height, maxheight)); } // try to fit inside viewport (including the title) if (current.fittoview) { inner.width( width ).height( height ); wrap.width( width + wpadding ); // real wrap dimensions width_ = wrap.width(); height_ = wrap.height(); if (current.aspectratio) { while ((width_ > maxwidth_ || height_ > maxheight_) && width > minwidth && height > minheight) { if (steps++ > 19) { break; } height = math.max(minheight, math.min(maxheight, height - 10)); width = getscalar(height * ratio); if (width < minwidth) { width = minwidth; height = getscalar(width / ratio); } if (width > maxwidth) { width = maxwidth; height = getscalar(width / ratio); } inner.width( width ).height( height ); wrap.width( width + wpadding ); width_ = wrap.width(); height_ = wrap.height(); } } else { width = math.max(minwidth, math.min(width, width - (width_ - maxwidth_))); height = math.max(minheight, math.min(height, height - (height_ - maxheight_))); } } if (scrollout && scrolling === 'auto' && height < origheight && (width + wpadding + scrollout) < maxwidth_) { width += scrollout; } inner.width( width ).height( height ); wrap.width( width + wpadding ); width_ = wrap.width(); height_ = wrap.height(); canshrink = (width_ > maxwidth_ || height_ > maxheight_) && width > minwidth && height > minheight; canexpand = current.aspectratio ? (width < origmaxwidth && height < origmaxheight && width < origwidth && height < origheight) : ((width < origmaxwidth || height < origmaxheight) && (width < origwidth || height < origheight)); $.extend(current, { dim : { width : getvalue( width_ ), height : getvalue( height_ ) }, origwidth : origwidth, origheight : origheight, canshrink : canshrink, canexpand : canexpand, wpadding : wpadding, hpadding : hpadding, wrapspace : height_ - skin.outerheight(true), skinspace : skin.height() - height }); if (!iframe && current.autoheight && height > minheight && height < maxheight && !canexpand) { inner.height('auto'); } }, _getposition: function (onlyabsolute) { var current = f.current, viewport = f.getviewport(), margin = current.margin, width = f.wrap.width() + margin[1] + margin[3], height = f.wrap.height() + margin[0] + margin[2], rez = { position: 'absolute', top : margin[0], left : margin[3] }; if (current.autocenter && current.fixed && !onlyabsolute && height <= viewport.h && width <= viewport.w) { rez.position = 'fixed'; } else if (!current.locked) { rez.top += viewport.y; rez.left += viewport.x; } rez.top = getvalue(math.max(rez.top, rez.top + ((viewport.h - height) * current.topratio))); rez.left = getvalue(math.max(rez.left, rez.left + ((viewport.w - width) * current.leftratio))); return rez; }, _afterzoomin: function () { var current = f.current; if (!current) { return; } f.isopen = f.isopened = true; f.wrap.css('overflow', 'visible').addclass('fancybox-opened'); f.update(); // assign a click event if ( current.closeclick || (current.nextclick && f.group.length > 1) ) { f.inner.css('cursor', 'pointer').bind('click.fb', function(e) { if (!$(e.target).is('a') && !$(e.target).parent().is('a')) { e.preventdefault(); f[ current.closeclick ? 'close' : 'next' ](); } }); } // create a close button if (current.closebtn) { $(current.tpl.closebtn).appendto(f.skin).bind( istouch ? 'touchstart.fb' : 'click.fb', function(e) { e.preventdefault(); f.close(); }); } // create navigation arrows if (current.arrows && f.group.length > 1) { if (current.loop || current.index > 0) { $(current.tpl.prev).appendto(f.outer).bind('click.fb', f.prev); } if (current.loop || current.index < f.group.length - 1) { $(current.tpl.next).appendto(f.outer).bind('click.fb', f.next); } } f.trigger('aftershow'); // stop the slideshow if this is the last item if (!current.loop && current.index === current.group.length - 1) { f.play( false ); } else if (f.opts.autoplay && !f.player.isactive) { f.opts.autoplay = false; f.play(); } }, _afterzoomout: function ( obj ) { obj = obj || f.current; $('.fancybox-wrap').trigger('onreset').remove(); $.extend(f, { group : {}, opts : {}, router : false, current : null, isactive : false, isopened : false, isopen : false, isclosing : false, wrap : null, skin : null, outer : null, inner : null }); f.trigger('afterclose', obj); } }); /* * default transitions */ f.transitions = { getorigposition: function () { var current = f.current, element = current.element, orig = current.orig, pos = {}, width = 50, height = 50, hpadding = current.hpadding, wpadding = current.wpadding, viewport = f.getviewport(); if (!orig && current.isdom && element.is(':visible')) { orig = element.find('img:first'); if (!orig.length) { orig = element; } } if (isquery(orig)) { pos = orig.offset(); if (orig.is('img')) { width = orig.outerwidth(); height = orig.outerheight(); } } else { pos.top = viewport.y + (viewport.h - height) * current.topratio; pos.left = viewport.x + (viewport.w - width) * current.leftratio; } if (f.wrap.css('position') === 'fixed' || current.locked) { pos.top -= viewport.y; pos.left -= viewport.x; } pos = { top : getvalue(pos.top - hpadding * current.topratio), left : getvalue(pos.left - wpadding * current.leftratio), width : getvalue(width + wpadding), height : getvalue(height + hpadding) }; return pos; }, step: function (now, fx) { var ratio, padding, value, prop = fx.prop, current = f.current, wrapspace = current.wrapspace, skinspace = current.skinspace; if (prop === 'width' || prop === 'height') { ratio = fx.end === fx.start ? 1 : (now - fx.start) / (fx.end - fx.start); if (f.isclosing) { ratio = 1 - ratio; } padding = prop === 'width' ? current.wpadding : current.hpadding; value = now - padding; f.skin[ prop ]( getscalar( prop === 'width' ? value : value - (wrapspace * ratio) ) ); f.inner[ prop ]( getscalar( prop === 'width' ? value : value - (wrapspace * ratio) - (skinspace * ratio) ) ); } }, zoomin: function () { var current = f.current, startpos = current.pos, effect = current.openeffect, elastic = effect === 'elastic', endpos = $.extend({opacity : 1}, startpos); // remove "position" property that breaks older ie delete endpos.position; if (elastic) { startpos = this.getorigposition(); if (current.openopacity) { startpos.opacity = 0.1; } } else if (effect === 'fade') { startpos.opacity = 0.1; } f.wrap.css(startpos).animate(endpos, { duration : effect === 'none' ? 0 : current.openspeed, easing : current.openeasing, step : elastic ? this.step : null, complete : f._afterzoomin }); }, zoomout: function () { var current = f.current, effect = current.closeeffect, elastic = effect === 'elastic', endpos = {opacity : 0.1}; if (elastic) { endpos = this.getorigposition(); if (current.closeopacity) { endpos.opacity = 0.1; } } f.wrap.animate(endpos, { duration : effect === 'none' ? 0 : current.closespeed, easing : current.closeeasing, step : elastic ? this.step : null, complete : f._afterzoomout }); }, changein: function () { var current = f.current, effect = current.nexteffect, startpos = current.pos, endpos = { opacity : 1 }, direction = f.direction, distance = 200, field; startpos.opacity = 0.1; if (effect === 'elastic') { field = direction === 'down' || direction === 'up' ? 'top' : 'left'; if (direction === 'down' || direction === 'right') { startpos[ field ] = getvalue(getscalar(startpos[ field ]) - distance); endpos[ field ] = '+=' + distance + 'px'; } else { startpos[ field ] = getvalue(getscalar(startpos[ field ]) + distance); endpos[ field ] = '-=' + distance + 'px'; } } // workaround for http://bugs.jquery.com/ticket/12273 if (effect === 'none') { f._afterzoomin(); } else { f.wrap.css(startpos).animate(endpos, { duration : current.nextspeed, easing : current.nexteasing, complete : function() { // this helps firefox to properly render the box settimeout(f._afterzoomin, 20); } }); } }, changeout: function () { var previous = f.previous, effect = previous.preveffect, endpos = { opacity : 0.1 }, direction = f.direction, distance = 200; if (effect === 'elastic') { endpos[ direction === 'down' || direction === 'up' ? 'top' : 'left' ] = ( direction === 'up' || direction === 'left' ? '-' : '+' ) + '=' + distance + 'px'; } previous.wrap.animate(endpos, { duration : effect === 'none' ? 0 : previous.prevspeed, easing : previous.preveasing, complete : function () { $(this).trigger('onreset').remove(); } }); } }; /* * overlay helper */ f.helpers.overlay = { defaults : { closeclick : true, // if true, fancybox will be closed when user clicks on the overlay speedout : 200, // duration of fadeout animation showearly : true, // indicates if should be opened immediately or wait until the content is ready css : {}, // custom css properties locked : !istouch, // if true, the content will be locked into overlay fixed : true // if false, the overlay css position property will not be set to "fixed" }, overlay : null, // current handle fixed : false, // indicates if the overlay has position "fixed" // public methods create : function(opts) { opts = $.extend({}, this.defaults, opts); if (this.overlay) { this.close(); } this.overlay = $('
').appendto( 'body' ); this.fixed = false; if (opts.fixed && f.defaults.fixed) { this.overlay.addclass('fancybox-overlay-fixed'); this.fixed = true; } }, open : function(opts) { var that = this; opts = $.extend({}, this.defaults, opts); if (this.overlay) { this.overlay.unbind('.overlay').width('auto').height('auto'); } else { this.create(opts); } if (!this.fixed) { w.bind('resize.overlay', $.proxy( this.update, this) ); this.update(); } if (opts.closeclick) { this.overlay.bind('click.overlay', function(e) { if ($(e.target).hasclass('fancybox-overlay')) { if (f.isactive) { f.close(); } else { that.close(); } } }); } this.overlay.css( opts.css ).show(); }, close : function() { $('.fancybox-overlay').remove(); w.unbind('resize.overlay'); this.overlay = null; if (this.margin !== false) { $('body').css('margin-right', this.margin); this.margin = false; } if (this.el) { this.el.removeclass('fancybox-lock'); } }, // private, callbacks update : function () { var width = '100%', offsetwidth; // reset width/height so it will not mess this.overlay.width(width).height('100%'); // jquery does not return reliable result for ie if ($.browser.msie) { offsetwidth = math.max(document.documentelement.offsetwidth, document.body.offsetwidth); if (d.width() > offsetwidth) { width = d.width(); } } else if (d.width() > w.width()) { width = d.width(); } this.overlay.width(width).height(d.height()); }, // this is where we can manipulate dom, because later it would cause iframes to reload onready : function (opts, obj) { $('.fancybox-overlay').stop(true, true); if (!this.overlay) { this.margin = d.height() > w.height() || $('body').css('overflow-y') === 'scroll' ? $('body').css('margin-right') : false; this.el = document.all && !document.queryselector ? $('html') : $('body'); this.create(opts); } if (opts.locked && this.fixed) { obj.locked = this.overlay.append( obj.wrap ); obj.fixed = false; } if (opts.showearly === true) { this.beforeshow.apply(this, arguments); } }, beforeshow : function(opts, obj) { if (obj.locked) { this.el.addclass('fancybox-lock'); if (this.margin !== false) { $('body').css('margin-right', getscalar( this.margin ) + obj.scrollbarwidth); } } this.open(opts); }, onupdate : function() { if (!this.fixed) { this.update(); } }, afterclose: function (opts) { // remove overlay if exists and fancybox is not opening // (e.g., it is not being open using afterclose callback) if (this.overlay && !f.isactive) { this.overlay.fadeout(opts.speedout, $.proxy( this.close, this )); } } }; /* * title helper */ f.helpers.title = { defaults : { type : 'float', // 'float', 'inside', 'outside' or 'over', position : 'bottom' // 'top' or 'bottom' }, beforeshow: function (opts) { var current = f.current, text = current.title, type = opts.type, title, target; if ($.isfunction(text)) { text = text.call(current.element, current); } if (!isstring(text) || $.trim(text) === '') { return; } title = $('
' + text + '
'); switch (type) { case 'inside': target = f.skin; break; case 'outside': target = f.wrap; break; case 'over': target = f.inner; break; default: // 'float' target = f.skin; title.appendto('body'); if ($.browser.msie) { title.width( title.width() ); } title.wrapinner(''); //increase bottom margin so this title will also fit into viewport f.current.margin[2] += math.abs( getscalar(title.css('margin-bottom')) ); break; } title[ (opts.position === 'top' ? 'prependto' : 'appendto') ](target); } }; // jquery plugin initialization $.fn.fancybox = function (options) { var index, that = $(this), selector = this.selector || '', run = function(e) { var what = $(this).blur(), idx = index, reltype, relval; if (!(e.ctrlkey || e.altkey || e.shiftkey || e.metakey) && !what.is('.fancybox-wrap')) { reltype = options.groupattr || 'data-fancybox-group'; relval = what.attr(reltype); if (!relval) { reltype = 'rel'; relval = what.get(0)[ reltype ]; } if (relval && relval !== '' && relval !== 'nofollow') { what = selector.length ? $(selector) : that; what = what.filter('[' + reltype + '="' + relval + '"]'); idx = what.index(this); } options.index = idx; // stop an event from bubbling if everything is fine if (f.open(what, options) !== false) { e.preventdefault(); } } }; options = options || {}; index = options.index || 0; if (!selector || options.live === false) { that.unbind('click.fb-start').bind('click.fb-start', run); } else { d.undelegate(selector, 'click.fb-start').delegate(selector + ":not('.fancybox-item, .fancybox-nav')", 'click.fb-start', run); } this.filter('[data-fancybox-start=1]').trigger('click'); return this; }; // tests that need a body at doc ready d.ready(function() { if ( $.scrollbarwidth === undefined ) { // http://benalman.com/projects/jquery-misc-plugins/#scrollbarwidth $.scrollbarwidth = function() { var parent = $('
').appendto('body'), child = parent.children(), width = child.innerwidth() - child.height( 99 ).innerwidth(); parent.remove(); return width; }; } if ( $.support.fixedposition === undefined ) { $.support.fixedposition = (function() { var elem = $('
').appendto('body'), fixed = ( elem[0].offsettop === 20 || elem[0].offsettop === 15 ); elem.remove(); return fixed; }()); } $.extend(f.defaults, { scrollbarwidth : $.scrollbarwidth(), fixed : $.support.fixedposition, parent : $('body') }); }); }(window, document, jquery)); ////////////////////////////////////////////////////////////////////////////////// // cloud zoom v1.0.3 // rev 201209181857 // (c) 2010-2012 by r cecco. // mit license // // please retain this copyright header in all versions of the software // ////////////////////////////////////////////////////////////////////////////////// (function(window,document,$,undefined){var w=$(window),d=$(document),f=$.fancybox=function(){f.open.apply(this,arguments)},didupdate=null,istouch=document.createtouch!==undefined,isquery=function(obj){return obj&&obj.hasownproperty&&obj instanceof $},isstring=function(str){return str&&$.type(str)==="string"},ispercentage=function(str){return isstring(str)&&str.indexof("%")>0},isscrollable=function(el){return(el&&!(el.style.overflow&&el.style.overflow==="hidden")&&((el.clientwidth&&el.scrollwidth>el.clientwidth)||(el.clientheight&&el.scrollheight>el.clientheight)))},getscalar=function(orig,dim){var value=parseint(orig,10)||0;if(dim&&ispercentage(orig)){value=f.getviewport()[dim]/100*value}return math.ceil(value)},getvalue=function(value,dim){return getscalar(value,dim)+"px"};$.extend(f,{version:"2.1.3",defaults:{padding:15,margin:20,width:800,height:600,minwidth:100,minheight:100,maxwidth:9999,maxheight:9999,autosize:true,autoheight:false,autowidth:false,autoresize:true,autocenter:!istouch,fittoview:true,aspectratio:false,topratio:0.5,leftratio:0.5,scrolling:"auto",wrapcss:"",arrows:true,closebtn:true,closeclick:false,nextclick:false,mousewheel:true,autoplay:false,playspeed:3000,preload:3,modal:false,loop:true,ajax:{datatype:"html",headers:{"x-fancybox":true}},iframe:{scrolling:"auto",preload:true},swf:{wmode:"transparent",allowfullscreen:"true",allowscriptaccess:"always"},keys:{next:{13:"left",34:"up",39:"left",40:"up"},prev:{8:"right",33:"down",37:"right",38:"down"},close:[27],play:[32],toggle:[70]},direction:{next:"left",prev:"right"},scrolloutside:true,index:0,type:null,href:null,content:null,title:null,tpl:{wrap:'
',image:'',iframe:'",error:'

the requested content cannot be loaded.
please try again later.

',closebtn:'',next:'',prev:''},openeffect:"fade",openspeed:250,openeasing:"swing",openopacity:true,openmethod:"zoomin",closeeffect:"fade",closespeed:250,closeeasing:"swing",closeopacity:true,closemethod:"zoomout",nexteffect:"elastic",nextspeed:250,nexteasing:"swing",nextmethod:"changein",preveffect:"elastic",prevspeed:250,preveasing:"swing",prevmethod:"changeout",helpers:{overlay:true,title:true},oncancel:$.noop,beforeload:$.noop,afterload:$.noop,beforeshow:$.noop,aftershow:$.noop,beforechange:$.noop,beforeclose:$.noop,afterclose:$.noop},group:{},opts:{},previous:null,coming:null,current:null,isactive:false,isopen:false,isopened:false,wrap:null,skin:null,outer:null,inner:null,player:{timer:null,isactive:false},ajaxload:null,imgpreload:null,transitions:{},helpers:{},open:function(group,opts){if(!group){return }if(!$.isplainobject(opts)){opts={}}if(false===f.close(true)){return}if(!$.isarray(group)){group=isquery(group)?$(group).get():[group]}$.each(group,function(i,element){var obj={},href,title,content,type,rez,hrefparts,selector;if($.type(element)==="object"){if(element.nodetype){element=$(element)}if(isquery(element)){obj={href:element.data("fancybox-href")||element.attr("href"),title:element.data("fancybox-title")||element.attr("title"),isdom:true,element:element};if($.metadata){$.extend(true,obj,element.metadata())}}else{obj=element}}href=opts.href||obj.href||(isstring(element)?element:null);title=opts.title!==undefined?opts.title:obj.title||"";content=opts.content||obj.content;type=content?"html":(opts.type||obj.type);if(!type&&obj.isdom){type=element.data("fancybox-type");if(!type){rez=element.prop("class").match(/fancybox\.(\w+)/);type=rez?rez[1]:null}}if(isstring(href)){if(!type){if(f.isimage(href)){type="image"}else{if(f.isswf(href)){type="swf"}else{if(href.charat(0)==="#"){type="inline"}else{if(isstring(element)){type="html";content=element}}}}}if(type==="ajax"){hrefparts=href.split(/\s+/,2);href=hrefparts.shift();selector=hrefparts.shift()}}if(!content){if(type==="inline"){if(href){content=$(isstring(href)?href.replace(/.*(?=#[^\s]+$)/,""):href)}else{if(obj.isdom){content=element}}}else{if(type==="html"){content=href}else{if(!type&&!href&&obj.isdom){type="inline";content=element}}}}$.extend(obj,{href:href,type:type,content:content,title:title,selector:selector});group[i]=obj});f.opts=$.extend(true,{},f.defaults,opts);if(opts.keys!==undefined){f.opts.keys=opts.keys?$.extend({},f.defaults.keys,opts.keys):false}f.group=group;return f._start(f.opts.index)},cancel:function(){var coming=f.coming;if(!coming||false===f.trigger("oncancel")){return}f.hideloading();if(f.ajaxload){f.ajaxload.abort()}f.ajaxload=null;if(f.imgpreload){f.imgpreload.onload=f.imgpreload.onerror=null}if(coming.wrap){coming.wrap.stop(true,true).trigger("onreset").remove()}f.coming=null;if(!f.current){f._afterzoomout(coming) }},close:function(event){f.cancel();if(false===f.trigger("beforeclose")){return}f.unbindevents();if(!f.isactive){return}if(!f.isopen||event===true){$(".fancybox-wrap").stop(true).trigger("onreset").remove();f._afterzoomout()}else{f.isopen=f.isopened=false;f.isclosing=true;$(".fancybox-item, .fancybox-nav").remove();f.wrap.stop(true,true).removeclass("fancybox-opened");f.transitions[f.current.closemethod]()}},play:function(action){var clear=function(){cleartimeout(f.player.timer)},set=function(){clear();if(f.current&&f.player.isactive){f.player.timer=settimeout(f.next,f.current.playspeed)}},stop=function(){clear();$("body").unbind(".player");f.player.isactive=false;f.trigger("onplayend")},start=function(){if(f.current&&(f.current.loop||f.current.index=current.index?"next":"prev")];f.router=router||"jumpto";if(current.loop){if(index<0){index=current.group.length+(index%current.group.length)}index=index%current.group.length}if(current.group[index]!==undefined){f.cancel();f._start(index)}},reposition:function(e,onlyabsolute){var current=f.current,wrap=current?current.wrap:null,pos;if(wrap){pos=f._getposition(onlyabsolute);if(e&&e.type==="scroll"){delete pos.position;wrap.stop(true,true).animate(pos,200)}else{wrap.css(pos);current.pos=$.extend({},current.dim,pos) }}},update:function(e){var type=(e&&e.type),anyway=!type||type==="orientationchange";if(anyway){cleartimeout(didupdate);didupdate=null}if(!f.isopen||didupdate){return}didupdate=settimeout(function(){var current=f.current;if(!current||f.isclosing){return}f.wrap.removeclass("fancybox-tmp");if(anyway||type==="load"||(type==="resize"&¤t.autoresize)){f._setdimension()}if(!(type==="scroll"&¤t.canshrink)){f.reposition(e)}f.trigger("onupdate");didupdate=null},(anyway&&!istouch?0:300))},toggle:function(action){if(f.isopen){f.current.fittoview=$.type(action)==="boolean"?action:!f.current.fittoview;if(istouch){f.wrap.removeattr("style").addclass("fancybox-tmp");f.trigger("onupdate")}f.update()}},hideloading:function(){d.unbind(".loading");$("#fancybox-loading").remove()},showloading:function(){var el,viewport;f.hideloading();el=$('
').click(f.cancel).appendto("body");d.bind("keydown.loading",function(e){if((e.which||e.keycode)===27){e.preventdefault();f.cancel()}});if(!f.defaults.fixed){viewport=f.getviewport();el.css({position:"absolute",top:(viewport.h*0.5)+viewport.y,left:(viewport.w*0.5)+viewport.x})}},getviewport:function(){var locked=(f.current&&f.current.locked)||false,rez={x:w.scrollleft(),y:w.scrolltop()};if(locked){rez.w=locked[0].clientwidth;rez.h=locked[0].clientheight}else{rez.w=istouch&&window.innerwidth?window.innerwidth:w.width();rez.h=istouch&&window.innerheight?window.innerheight:w.height()}return rez},unbindevents:function(){if(f.wrap&&isquery(f.wrap)){f.wrap.unbind(".fb")}d.unbind(".fb");w.unbind(".fb")},bindevents:function(){var current=f.current,keys;if(!current){return}w.bind("orientationchange.fb"+(istouch?"":" resize.fb")+(current.autocenter&&!current.locked?" scroll.fb":""),f.update);keys=current.keys;if(keys){d.bind("keydown.fb",function(e){var code=e.which||e.keycode,target=e.target||e.srcelement;if(code===27&&f.coming){return false}if(!e.ctrlkey&&!e.altkey&&!e.shiftkey&&!e.metakey&&!(target&&(target.type||$(target).is("[contenteditable]")))){$.each(keys,function(i,val){if(current.group.length>1&&val[code]!==undefined){f[i](val[code]); e.preventdefault();return false}if($.inarray(code,val)>-1){f[i]();e.preventdefault();return false}})}})}if($.fn.mousewheel&¤t.mousewheel){f.wrap.bind("mousewheel.fb",function(e,delta,deltax,deltay){var target=e.target||null,parent=$(target),canscroll=false;while(parent.length){if(canscroll||parent.is(".fancybox-skin")||parent.is(".fancybox-wrap")){break}canscroll=isscrollable(parent[0]);parent=$(parent).parent()}if(delta!==0&&!canscroll){if(f.group.length>1&&!current.canshrink){if(deltay>0||deltax>0){f.prev(deltay>0?"down":"left")}else{if(deltay<0||deltax<0){f.next(deltay<0?"up":"right")}}e.preventdefault()}}})}},trigger:function(event,o){var ret,obj=o||f.coming||f.current;if(!obj){return}if($.isfunction(obj[event])){ret=obj[event].apply(obj,array.prototype.slice.call(arguments,1))}if(ret===false){return false}if(obj.helpers){$.each(obj.helpers,function(helper,opts){if(opts&&f.helpers[helper]&&$.isfunction(f.helpers[helper][event])){opts=$.extend(true,{},f.helpers[helper].defaults,opts);f.helpers[helper][event](opts,obj)}})}$.event.trigger(event+".fb")},isimage:function(str){return isstring(str)&&str.match(/(^data:image\/.*,)|(\.(jp(e|g|eg)|gif|png|bmp|webp)((\?|#).*)?$)/i)},isswf:function(str){return isstring(str)&&str.match(/\.(swf)((\?|#).*)?$/i)},_start:function(index){var coming={},obj,href,type,margin,padding;index=getscalar(index);obj=f.group[index]||null;if(!obj){return false}coming=$.extend(true,{},f.opts,obj);margin=coming.margin;padding=coming.padding;if($.type(margin)==="number"){coming.margin=[margin,margin,margin,margin]}if($.type(padding)==="number"){coming.padding=[padding,padding,padding,padding]}if(coming.modal){$.extend(true,coming,{closebtn:false,closeclick:false,nextclick:false,arrows:false,mousewheel:false,keys:null,helpers:{overlay:{closeclick:false}}})}if(coming.autosize){coming.autowidth=coming.autoheight=true}if(coming.width==="auto"){coming.autowidth=true}if(coming.height==="auto"){coming.autoheight=true}coming.group=f.group;coming.index=index; f.coming=coming;if(false===f.trigger("beforeload")){f.coming=null;return}type=coming.type;href=coming.href;if(!type){f.coming=null;if(f.current&&f.router&&f.router!=="jumpto"){f.current.index=index;return f[f.router](f.direction)}return false}f.isactive=true;if(type==="image"||type==="swf"){coming.autoheight=coming.autowidth=false;coming.scrolling="visible"}if(type==="image"){coming.aspectratio=true}if(type==="iframe"&&istouch){coming.scrolling="scroll"}coming.wrap=$(coming.tpl.wrap).addclass("fancybox-"+(istouch?"mobile":"desktop")+" fancybox-type-"+type+" fancybox-tmp "+coming.wrapcss).appendto(coming.parent||"body");$.extend(coming,{skin:$(".fancybox-skin",coming.wrap),outer:$(".fancybox-outer",coming.wrap),inner:$(".fancybox-inner",coming.wrap)});$.each(["top","right","bottom","left"],function(i,v){coming.skin.css("padding"+v,getvalue(coming.padding[i]))});f.trigger("onready");if(type==="inline"||type==="html"){if(!coming.content||!coming.content.length){return f._error("content")}}else{if(!href){return f._error("href")}}if(type==="image"){f._loadimage()}else{if(type==="ajax"){f._loadajax()}else{if(type==="iframe"){f._loadiframe()}else{f._afterload()}}}},_error:function(type){$.extend(f.coming,{type:"html",autowidth:true,autoheight:true,minwidth:0,minheight:0,scrolling:"no",haserror:type,content:f.coming.tpl.error});f._afterload()},_loadimage:function(){var img=f.imgpreload=new image();img.onload=function(){this.onload=this.onerror=null;f.coming.width=this.width;f.coming.height=this.height;f._afterload()};img.onerror=function(){this.onload=this.onerror=null;f._error("image")};img.src=f.coming.href;if(img.complete!==true){f.showloading()}},_loadajax:function(){var coming=f.coming;f.showloading();f.ajaxload=$.ajax($.extend({},coming.ajax,{url:coming.href,error:function(jqxhr,textstatus){if(f.coming&&textstatus!=="abort"){f._error("ajax",jqxhr)}else{f.hideloading()}},success:function(data,textstatus){if(textstatus==="success"){coming.content=data;f._afterload()}}})) },_loadiframe:function(){var coming=f.coming,iframe=$(coming.tpl.iframe.replace(/\{rnd\}/g,new date().gettime())).attr("scrolling",istouch?"auto":coming.iframe.scrolling).attr("src",coming.href);$(coming.wrap).bind("onreset",function(){try{$(this).find("iframe").hide().attr("src","//about:blank").end().empty()}catch(e){}});if(coming.iframe.preload){f.showloading();iframe.one("load",function(){$(this).data("ready",1);if(!istouch){$(this).bind("load.fb",f.update)}$(this).parents(".fancybox-wrap").width("100%").removeclass("fancybox-tmp").show();f._afterload()})}coming.content=iframe.appendto(coming.inner);if(!coming.iframe.preload){f._afterload()}},_preloadimages:function(){var group=f.group,current=f.current,len=group.length,cnt=current.preload?math.min(current.preload,len-1):0,item,i;for(i=1;i<=cnt;i+=1){item=group[(current.index+i)%len];if(item.type==="image"&&item.href){new image().src=item.href}}},_afterload:function(){var coming=f.coming,previous=f.current,placeholder="fancybox-placeholder",current,content,type,scrolling,href,embed;f.hideloading();if(!coming||f.isactive===false){return}if(false===f.trigger("afterload",coming,previous)){coming.wrap.stop(true).trigger("onreset").remove();f.coming=null;return}if(previous){f.trigger("beforechange",previous);previous.wrap.stop(true).removeclass("fancybox-opened").find(".fancybox-item, .fancybox-nav").remove()}f.unbindevents();current=coming;content=coming.content;type=coming.type;scrolling=coming.scrolling;$.extend(f,{wrap:current.wrap,skin:current.skin,outer:current.outer,inner:current.inner,current:current,previous:previous});href=current.href;switch(type){case"inline":case"ajax":case"html":if(current.selector){content=$("
").html(content).find(current.selector)}else{if(isquery(content)){if(!content.data(placeholder)){content.data(placeholder,$('
').insertafter(content).hide())}content=content.show().detach();current.wrap.bind("onreset",function(){if($(this).find(content).length){content.hide().replaceall(content.data(placeholder)).data(placeholder,false) }})}}break;case"image":content=current.tpl.image.replace("{href}",href);break;case"swf":content='';embed="";$.each(current.swf,function(name,val){content+='';embed+=" "+name+'="'+val+'"'});content+='";break}if(!(isquery(content)&&content.parent().is(current.inner))){current.inner.append(content)}f.trigger("beforeshow");current.inner.css("overflow",scrolling==="yes"?"scroll":(scrolling==="no"?"hidden":scrolling));f._setdimension();f.reposition();f.isopen=false;f.coming=null;f.bindevents();if(!f.isopened){$(".fancybox-wrap").not(current.wrap).stop(true).trigger("onreset").remove()}else{if(previous.prevmethod){f.transitions[previous.prevmethod]()}}f.transitions[f.isopened?current.nextmethod:current.openmethod]();f._preloadimages()},_setdimension:function(){var viewport=f.getviewport(),steps=0,canshrink=false,canexpand=false,wrap=f.wrap,skin=f.skin,inner=f.inner,current=f.current,width=current.width,height=current.height,minwidth=current.minwidth,minheight=current.minheight,maxwidth=current.maxwidth,maxheight=current.maxheight,scrolling=current.scrolling,scrollout=current.scrolloutside?current.scrollbarwidth:0,margin=current.margin,wmargin=getscalar(margin[1]+margin[3]),hmargin=getscalar(margin[0]+margin[2]),wpadding,hpadding,wspace,hspace,origwidth,origheight,origmaxwidth,origmaxheight,ratio,width_,height_,maxwidth_,maxheight_,iframe,body;wrap.add(skin).add(inner).width("auto").height("auto").removeclass("fancybox-tmp");wpadding=getscalar(skin.outerwidth(true)-skin.width());hpadding=getscalar(skin.outerheight(true)-skin.height());wspace=wmargin+wpadding;hspace=hmargin+hpadding;origwidth=ispercentage(width)?(viewport.w-wspace)*getscalar(width)/100:width;origheight=ispercentage(height)?(viewport.h-hspace)*getscalar(height)/100:height; if(current.type==="iframe"){iframe=current.content;if(current.autoheight&&iframe.data("ready")===1){try{if(iframe[0].contentwindow.document.location){inner.width(origwidth).height(9999);body=iframe.contents().find("body");if(scrollout){body.css("overflow-x","hidden")}origheight=body.height()}}catch(e){}}}else{if(current.autowidth||current.autoheight){inner.addclass("fancybox-tmp");if(!current.autowidth){inner.width(origwidth)}if(!current.autoheight){inner.height(origheight)}if(current.autowidth){origwidth=inner.width()}if(current.autoheight){origheight=inner.height()}inner.removeclass("fancybox-tmp")}}width=getscalar(origwidth);height=getscalar(origheight);ratio=origwidth/origheight;minwidth=getscalar(ispercentage(minwidth)?getscalar(minwidth,"w")-wspace:minwidth);maxwidth=getscalar(ispercentage(maxwidth)?getscalar(maxwidth,"w")-wspace:maxwidth);minheight=getscalar(ispercentage(minheight)?getscalar(minheight,"h")-hspace:minheight);maxheight=getscalar(ispercentage(maxheight)?getscalar(maxheight,"h")-hspace:maxheight);origmaxwidth=maxwidth;origmaxheight=maxheight;if(current.fittoview){maxwidth=math.min(viewport.w-wspace,maxwidth);maxheight=math.min(viewport.h-hspace,maxheight)}maxwidth_=viewport.w-wmargin;maxheight_=viewport.h-hmargin;if(current.aspectratio){if(width>maxwidth){width=maxwidth;height=getscalar(width/ratio)}if(height>maxheight){height=maxheight;width=getscalar(height*ratio)}if(widthmaxwidth_||height_>maxheight_)&&width>minwidth&&height>minheight){if(steps++>19){break}height=math.max(minheight,math.min(maxheight,height-10)); width=getscalar(height*ratio);if(widthmaxwidth){width=maxwidth;height=getscalar(width/ratio)}inner.width(width).height(height);wrap.width(width+wpadding);width_=wrap.width();height_=wrap.height()}}else{width=math.max(minwidth,math.min(width,width-(width_-maxwidth_)));height=math.max(minheight,math.min(height,height-(height_-maxheight_)))}}if(scrollout&&scrolling==="auto"&&heightmaxwidth_||height_>maxheight_)&&width>minwidth&&height>minheight;canexpand=current.aspectratio?(widthminheight&&height1)){f.inner.css("cursor","pointer").bind("click.fb",function(e){if(!$(e.target).is("a")&&!$(e.target).parent().is("a")){e.preventdefault();f[current.closeclick?"close":"next"]()}})}if(current.closebtn){$(current.tpl.closebtn).appendto(f.skin).bind(istouch?"touchstart.fb":"click.fb",function(e){e.preventdefault();f.close()})}if(current.arrows&&f.group.length>1){if(current.loop||current.index>0){$(current.tpl.prev).appendto(f.outer).bind("click.fb",f.prev)}if(current.loop||current.index
').appendto("body");this.fixed=false;if(opts.fixed&&f.defaults.fixed){this.overlay.addclass("fancybox-overlay-fixed");this.fixed=true}},open:function(opts){var that=this;opts=$.extend({},this.defaults,opts);if(this.overlay){this.overlay.unbind(".overlay").width("auto").height("auto")}else{this.create(opts)}if(!this.fixed){w.bind("resize.overlay",$.proxy(this.update,this));this.update()}if(opts.closeclick){this.overlay.bind("click.overlay",function(e){if($(e.target).hasclass("fancybox-overlay")){if(f.isactive){f.close()}else{that.close()}}})}this.overlay.css(opts.css).show()},close:function(){$(".fancybox-overlay").remove();w.unbind("resize.overlay");this.overlay=null;if(this.margin!==false){$("body").css("margin-right",this.margin);this.margin=false}if(this.el){this.el.removeclass("fancybox-lock")}},update:function(){var width="100%",offsetwidth;this.overlay.width(width).height("100%");if($.support.msie){offsetwidth=math.max(document.documentelement.offsetwidth,document.body.offsetwidth);if(d.width()>offsetwidth){width=d.width()}}else{if(d.width()>w.width()){width=d.width()}}this.overlay.width(width).height(d.height())},onready:function(opts,obj){$(".fancybox-overlay").stop(true,true);if(!this.overlay){this.margin=d.height()>w.height()||$("body").css("overflow-y")==="scroll"?$("body").css("margin-right"):false;this.el=document.all&&!document.queryselector?$("html"):$("body");this.create(opts)}if(opts.locked&&this.fixed){obj.locked=this.overlay.append(obj.wrap);obj.fixed=false}if(opts.showearly===true){this.beforeshow.apply(this,arguments) }},beforeshow:function(opts,obj){if(obj.locked){this.el.addclass("fancybox-lock");if(this.margin!==false){$("body").css("margin-right",getscalar(this.margin)+obj.scrollbarwidth)}}this.open(opts)},onupdate:function(){if(!this.fixed){this.update()}},afterclose:function(opts){if(this.overlay&&!f.isactive){this.overlay.fadeout(opts.speedout,$.proxy(this.close,this))}}};f.helpers.title={defaults:{type:"float",position:"bottom"},beforeshow:function(opts){var current=f.current,text=current.title,type=opts.type,title,target;if($.isfunction(text)){text=text.call(current.element,current)}if(!isstring(text)||$.trim(text)===""){return}title=$('
'+text+"
");switch(type){case"inside":target=f.skin;break;case"outside":target=f.wrap;break;case"over":target=f.inner;break;default:target=f.skin;title.appendto("body");if($.support.msie){title.width(title.width())}title.wrapinner('');f.current.margin[2]+=math.abs(getscalar(title.css("margin-bottom")));break}title[(opts.position==="top"?"prependto":"appendto")](target)}};$.fn.fancybox=function(options){var index,that=$(this),selector=this.selector||"",run=function(e){var what=$(this).blur(),idx=index,reltype,relval;if(!(e.ctrlkey||e.altkey||e.shiftkey||e.metakey)&&!what.is(".fancybox-wrap")){reltype=options.groupattr||"data-fancybox-group";relval=what.attr(reltype);if(!relval){reltype="rel";relval=what.get(0)[reltype]}if(relval&&relval!==""&&relval!=="nofollow"){what=selector.length?$(selector):that;what=what.filter("["+reltype+'="'+relval+'"]');idx=what.index(this)}options.index=idx;if(f.open(what,options)!==false){e.preventdefault()}}};options=options||{};index=options.index||0;if(!selector||options.live===false){that.unbind("click.fb-start").bind("click.fb-start",run)}else{d.undelegate(selector,"click.fb-start").delegate(selector+":not('.fancybox-item, .fancybox-nav')","click.fb-start",run)}this.filter("[data-fancybox-start=1]").trigger("click");return this };d.ready(function(){if($.scrollbarwidth===undefined){$.scrollbarwidth=function(){var parent=$('
').appendto("body"),child=parent.children(),width=child.innerwidth()-child.height(99).innerwidth();parent.remove();return width}}if($.support.fixedposition===undefined){$.support.fixedposition=(function(){var elem=$('
').appendto("body"),fixed=(elem[0].offsettop===20||elem[0].offsettop===15);elem.remove();return fixed}())}$.extend(f.defaults,{scrollbarwidth:$.scrollbarwidth(),fixed:$.support.fixedposition,parent:$("body")})})}(window,document,jquery)); /*! * buttons helper for fancybox * version: 1.0.5 (mon, 15 oct 2012) * @requires fancybox v2.0 or later * * usage: * $(".fancybox").fancybox({ * helpers : { * buttons: { * position : 'top' * } * } * }); * */ (function($){var f=$.fancybox;f.helpers.buttons={defaults:{skipsingle:false,position:"top",tpl:'
'},list:null,buttons:null,beforeload:function(opts,obj){if(opts.skipsingle&&obj.group.length<2){obj.helpers.buttons=false;obj.closebtn=true;return}obj.margin[opts.position==="bottom"?2:0]+=30},onplaystart:function(){if(this.buttons){this.buttons.play.attr("title","pause slideshow").addclass("btnplayon")}},onplayend:function(){if(this.buttons){this.buttons.play.attr("title","start slideshow").removeclass("btnplayon")}},aftershow:function(opts,obj){var buttons=this.buttons;if(!buttons){this.list=$(opts.tpl).addclass(opts.position).appendto("body"); buttons={prev:this.list.find(".btnprev").click(f.prev),next:this.list.find(".btnnext").click(f.next),play:this.list.find(".btnplay").click(f.play),toggle:this.list.find(".btntoggle").click(f.toggle)}}if(obj.index>0||obj.loop){buttons.prev.removeclass("btndisabled")}else{buttons.prev.addclass("btndisabled")}if(obj.loop||obj.index'}this.wrap=$('
').addclass(opts.position).appendto("body");this.list=$("
    "+list+"
").appendto(this.wrap);$.each(obj.group,function(i){var href=thumbsource(obj.group[i]);if(!href){return }$("").load(function(){var width=this.width,height=this.height,widthratio,heightratio,parent;if(!that.list||!width||!height){return}widthratio=width/thumbwidth;heightratio=height/thumbheight;parent=that.list.children().eq(i).find("a");if(widthratio>=1&&heightratio>=1){if(widthratio>heightratio){width=math.floor(width/heightratio);height=thumbheight}else{width=thumbwidth;height=math.floor(height/widthratio)}}$(this).css({width:width,height:height,top:math.floor(thumbheight/2-height/2),left:math.floor(thumbwidth/2-width/2)});parent.width(thumbwidth).height(thumbheight);$(this).hide().appendto(parent).fadein(300)}).attr("src",href)});this.width=this.list.children().eq(0).outerwidth(true);this.list.width(this.width*(obj.group.length+1)).css("left",math.floor($(window).width()*0.5-(obj.index*this.width+this.width*0.5)))},beforeload:function(opts,obj){if(obj.group.length<2){obj.helpers.thumbs=false;return}obj.margin[opts.position==="top"?0:2]+=((opts.height)+15)},aftershow:function(opts,obj){if(this.list){this.onupdate(opts,obj)}else{this.init(opts,obj)}this.list.children().removeclass("active").eq(obj.index).addclass("active")},onupdate:function(opts,obj){if(this.list){this.list.stop(true).animate({"left":math.floor($(window).width()*0.5-(obj.index*this.width+this.width*0.5))},150)}},beforeclose:function(){if(this.wrap){this.wrap.remove()}this.wrap=null;this.list=null;this.width=0}}}(jquery)); /*! * media helper for fancybox * version: 1.0.5 (tue, 23 oct 2012) * @requires fancybox v2.0 or later * * usage: * $(".fancybox").fancybox({ * helpers : { * media: true * } * }); * * set custom url parameters: * $(".fancybox").fancybox({ * helpers : { * media: { * youtube : { * params : { * autoplay : 0 * } * } * } * } * }); * * or: * $(".fancybox").fancybox({, * helpers : { * media: true * }, * youtube : { * autoplay: 0 * } * }); * * supports: * * youtube * http://www.youtube.com/watch?v=opj24knzrwo * http://www.youtube.com/embed/opj24knzrwo * http://youtu.be/opj24knzrwo * vimeo * http://vimeo.com/40648169 * http://vimeo.com/channels/staffpicks/38843628 * http://vimeo.com/groups/surrealism/videos/36516384 * http://player.vimeo.com/video/45074303 * metacafe * http://www.metacafe.com/watch/7635964/dr_seuss_the_lorax_movie_trailer/ * http://www.metacafe.com/watch/7635964/ * dailymotion * http://www.dailymotion.com/video/xoytqh_dr-seuss-the-lorax-premiere_people * twitvid * http://twitvid.com/qy7md * twitpic * http://twitpic.com/7p93st * instagram * http://instagr.am/p/iejkuugxqn/ * http://instagram.com/p/iejkuugxqn/ * google maps * http://maps.google.com/maps?q=eiffel+tower,+avenue+gustave+eiffel,+paris,+france&t=h&z=17 * http://maps.google.com/?ll=48.857995,2.294297&spn=0.007666,0.021136&t=m&z=16 * http://maps.google.com/?ll=48.859463,2.292626&spn=0.000965,0.002642&t=m&z=19&layer=c&cbll=48.859524,2.292532&panoid=yj0lq28ooy3vt2iqiuvy0g&cbp=12,151.58,,0,-15.56 */ (function($){var f=$.fancybox,format=function(url,rez,params){params=params||""; if($.type(params)==="object"){params=$.param(params,true)}$.each(rez,function(key,value){url=url.replace("$"+key,value||"")});if(params.length){url+=(url.indexof("?")>0?"&":"?")+params}return url};f.helpers.media={defaults:{youtube:{matcher:/(youtube\.com|youtu\.be)\/(watch\?v=|v\/|u\/|embed\/?)?(videoseries\?list=(.*)|[\w-]{11}|\?listtype=(.*)&list=(.*)).*/i,params:{autoplay:1,autohide:1,fs:1,rel:0,hd:1,wmode:"opaque",enablejsapi:1},type:"iframe",url:"//www.youtube.com/embed/$3"},vimeo:{matcher:/(?:vimeo(?:pro)?.com)\/(?:[^\d]+)?(\d+)(?:.*)/,params:{autoplay:1,hd:1,show_title:1,show_byline:1,show_portrait:0,fullscreen:1},type:"iframe",url:"//player.vimeo.com/video/$1"},metacafe:{matcher:/metacafe.com\/(?:watch|fplayer)\/([\w\-]{1,10})/,params:{autoplay:"yes"},type:"swf",url:function(rez,params,obj){obj.swf.flashvars="playervars="+$.param(params,true);return"//www.metacafe.com/fplayer/"+rez[1]+"/.swf"}},dailymotion:{matcher:/dailymotion.com\/video\/(.*)\/?(.*)/,params:{additionalinfos:0,autostart:1},type:"swf",url:"//www.dailymotion.com/swf/video/$1"},twitvid:{matcher:/twitvid\.com\/([a-za-z0-9_\-\?\=]+)/i,params:{autoplay:0},type:"iframe",url:"//www.twitvid.com/embed.php?guid=$1"},twitpic:{matcher:/twitpic\.com\/(?!(?:place|photos|events)\/)([a-za-z0-9\?\=\-]+)/i,type:"image",url:"//twitpic.com/show/full/$1/"},instagram:{matcher:/(instagr\.am|instagram\.com)\/p\/([a-za-z0-9_\-]+)\/?/i,type:"image",url:"//$1/p/$2/media/"},google_maps:{matcher:/maps\.google\.([a-z]{2,3}(\.[a-z]{2})?)\/(\?ll=|maps\?)(.*)/i,type:"iframe",url:function(rez){return"//maps.google."+rez[1]+"/"+rez[3]+""+rez[4]+"&output="+(rez[4].indexof("layer=c")>0?"svembed":"embed")}}},beforeload:function(opts,obj){var url=obj.href||"",type=false,what,item,rez,params;for(what in opts){item=opts[what];rez=url.match(item.matcher);if(rez){type=item.type;params=$.extend(true,{},item.params,obj[what]||($.isplainobject(opts[what])?opts[what].params:null));url=$.type(item.url)==="function"?item.url.call(this,rez,params,obj):format(item.url,rez,params); break}}if(type){obj.href=url;obj.type=type;obj.autoheight=false}}}}(jquery)); /* * jquery flexslider v2.2.2 * copyright 2012 woothemes * contributing author: tyler smith */(function(e){e.flexslider=function(t,n){var r=e(t);r.vars=e.extend({},e.flexslider.defaults,n);var i=r.vars.namespace,s=window.navigator&&window.navigator.mspointerenabled&&window.msgesture,o=("ontouchstart"in window||s||window.documenttouch&&document instanceof documenttouch)&&r.vars.touch,u="click touchend mspointerup",a="",f,l=r.vars.direction==="vertical",c=r.vars.reverse,h=r.vars.itemwidth>0,p=r.vars.animation==="fade",d=r.vars.asnavfor!=="",v={},m=!0;e.data(t,"flexslider",r);v={init:function(){r.animating=!1;r.currentslide=parseint(r.vars.startat?r.vars.startat:0,10);isnan(r.currentslide)&&(r.currentslide=0);r.animatingto=r.currentslide;r.atend=r.currentslide===0||r.currentslide===r.last;r.containerselector=r.vars.selector.substr(0,r.vars.selector.search(" "));r.slides=e(r.vars.selector,r);r.container=e(r.containerselector,r);r.count=r.slides.length;r.syncexists=e(r.vars.sync).length>0;r.vars.animation==="slide"&&(r.vars.animation="swing");r.prop=l?"top":"marginleft";r.args={};r.manualpause=!1;r.stopped=!1;r.started=!1;r.starttimeout=null;r.transitions=!r.vars.video&&!p&&r.vars.usecss&&function(){var e=document.createelement("div"),t=["perspectiveproperty","webkitperspective","mozperspective","operspective","msperspective"];for(var n in t)if(e.style[t[n]]!==undefined){r.pfx=t[n].replace("perspective","").tolowercase();r.prop="-"+r.pfx+"-transform";return!0}return!1}();r.vars.controlscontainer!==""&&(r.controlscontainer=e(r.vars.controlscontainer).length>0&&e(r.vars.controlscontainer));r.vars.manualcontrols!==""&&(r.manualcontrols=e(r.vars.manualcontrols).length>0&&e(r.vars.manualcontrols));if(r.vars.randomize){r.slides.sort(function(){return math.round(math.random())-.5});r.container.empty().append(r.slides)}r.domath();r.setup("init");r.vars.controlnav&&v.controlnav.setup();r.vars.directionnav&&v.directionnav.setup();r.vars.keyboard&&(e(r.containerselector).length===1||r.vars.multiplekeyboard)&&e(document).bind("keyup",function(e){var t=e.keycode;if(!r.animating&&(t===39||t===37)){var n=t===39?r.gettarget("next"):t===37?r.gettarget("prev"):!1;r.flexanimate(n,r.vars.pauseonaction)}});r.vars.mousewheel&&r.bind("mousewheel",function(e,t,n,i){e.preventdefault();var s=t<0?r.gettarget("next"):r.gettarget("prev");r.flexanimate(s,r.vars.pauseonaction)});r.vars.pauseplay&&v.pauseplay.setup();r.vars.slideshow&&r.vars.pauseinvisible&&v.pauseinvisible.init();if(r.vars.slideshow){r.vars.pauseonhover&&r.hover(function(){!r.manualplay&&!r.manualpause&&r.pause()},function(){!r.manualpause&&!r.manualplay&&!r.stopped&&r.play()});if(!r.vars.pauseinvisible||!v.pauseinvisible.ishidden())r.vars.initdelay>0?r.starttimeout=settimeout(r.play,r.vars.initdelay):r.play()}d&&v.asnav.setup();o&&r.vars.touch&&v.touch();(!p||p&&r.vars.smoothheight)&&e(window).bind("resize orientationchange focus",v.resize);r.find("img").attr("draggable","false");settimeout(function(){r.vars.start(r)},200)},asnav:{setup:function(){r.asnav=!0;r.animatingto=math.floor(r.currentslide/r.move);r.currentitem=r.currentslide;r.slides.removeclass(i+"active-slide").eq(r.currentitem).addclass(i+"active-slide");if(!s)r.slides.on(u,function(t){t.preventdefault();var n=e(this),s=n.index(),o=n.offset().left-e(r).scrollleft();if(o<=0&&n.hasclass(i+"active-slide"))r.flexanimate(r.gettarget("prev"),!0);else if(!e(r.vars.asnavfor).data("flexslider").animating&&!n.hasclass(i+"active-slide")){r.direction=r.currentitem');if(r.pagingcount>1)for(var f=0;f':""+n+"";if("thumbnails"===r.vars.controlnav&&!0===r.vars.thumbcaptions){var l=o.attr("data-thumbcaption");""!=l&&undefined!=l&&(s+=''+l+"")}r.controlnavscaffold.append("
  • "+s+"
  • ");n++}r.controlscontainer?e(r.controlscontainer).append(r.controlnavscaffold):r.append(r.controlnavscaffold);v.controlnav.set();v.controlnav.active();r.controlnavscaffold.delegate("a, img",u,function(t){t.preventdefault();if(a===""||a===t.type){var n=e(this),s=r.controlnav.index(n);if(!n.hasclass(i+"active")){r.direction=s>r.currentslide?"next":"prev";r.flexanimate(s,r.vars.pauseonaction)}}a===""&&(a=t.type);v.settoclearwatchedevent()})},setupmanual:function(){r.controlnav=r.manualcontrols;v.controlnav.active();r.controlnav.bind(u,function(t){t.preventdefault();if(a===""||a===t.type){var n=e(this),s=r.controlnav.index(n);if(!n.hasclass(i+"active")){s>r.currentslide?r.direction="next":r.direction="prev";r.flexanimate(s,r.vars.pauseonaction)}}a===""&&(a=t.type);v.settoclearwatchedevent()})},set:function(){var t=r.vars.controlnav==="thumbnails"?"img":"a";r.controlnav=e("."+i+"control-nav li "+t,r.controlscontainer?r.controlscontainer:r)},active:function(){r.controlnav.removeclass(i+"active").eq(r.animatingto).addclass(i+"active")},update:function(t,n){r.pagingcount>1&&t==="add"?r.controlnavscaffold.append(e("
  • "+r.count+"
  • ")):r.pagingcount===1?r.controlnavscaffold.find("li").remove():r.controlnav.eq(n).closest("li").remove();v.controlnav.set();r.pagingcount>1&&r.pagingcount!==r.controlnav.length?r.update(n,t):v.controlnav.active()}},directionnav:{setup:function(){var t=e('");if(r.controlscontainer){e(r.controlscontainer).append(t);r.directionnav=e("."+i+"direction-nav li a",r.controlscontainer)}else{r.append(t);r.directionnav=e("."+i+"direction-nav li a",r)}v.directionnav.update();r.directionnav.bind(u,function(t){t.preventdefault();var n;if(a===""||a===t.type){n=e(this).hasclass(i+"next")?r.gettarget("next"):r.gettarget("prev");r.flexanimate(n,r.vars.pauseonaction)}a===""&&(a=t.type);v.settoclearwatchedevent()})},update:function(){var e=i+"disabled";r.pagingcount===1?r.directionnav.addclass(e).attr("tabindex","-1"):r.vars.animationloop?r.directionnav.removeclass(e).removeattr("tabindex"):r.animatingto===0?r.directionnav.removeclass(e).filter("."+i+"prev").addclass(e).attr("tabindex","-1"):r.animatingto===r.last?r.directionnav.removeclass(e).filter("."+i+"next").addclass(e).attr("tabindex","-1"):r.directionnav.removeclass(e).removeattr("tabindex")}},pauseplay:{setup:function(){var t=e('
    ');if(r.controlscontainer){r.controlscontainer.append(t);r.pauseplay=e("."+i+"pauseplay a",r.controlscontainer)}else{r.append(t);r.pauseplay=e("."+i+"pauseplay a",r)}v.pauseplay.update(r.vars.slideshow?i+"pause":i+"play");r.pauseplay.bind(u,function(t){t.preventdefault();if(a===""||a===t.type)if(e(this).hasclass(i+"pause")){r.manualpause=!0;r.manualplay=!1;r.pause()}else{r.manualpause=!1;r.manualplay=!0;r.play()}a===""&&(a=t.type);v.settoclearwatchedevent()})},update:function(e){e==="play"?r.pauseplay.removeclass(i+"pause").addclass(i+"play").html(r.vars.playtext):r.pauseplay.removeclass(i+"play").addclass(i+"pause").html(r.vars.pausetext)}},touch:function(){var e,n,i,o,u,a,f=!1,d=0,v=0,m=0;if(!s){t.addeventlistener("touchstart",g,!1);function g(s){if(r.animating)s.preventdefault();else if(window.navigator.mspointerenabled||s.touches.length===1){r.pause();o=l?r.h:r.w;a=number(new date);d=s.touches[0].pagex;v=s.touches[0].pagey;i=h&&c&&r.animatingto===r.last?0:h&&c?r.limit-(r.itemw+r.vars.itemmargin)*r.move*r.animatingto:h&&r.currentslide===r.last?r.limit:h?(r.itemw+r.vars.itemmargin)*r.move*r.currentslide:c?(r.last-r.currentslide+r.cloneoffset)*o:(r.currentslide+r.cloneoffset)*o;e=l?v:d;n=l?d:v;t.addeventlistener("touchmove",y,!1);t.addeventlistener("touchend",b,!1)}}function y(t){d=t.touches[0].pagex;v=t.touches[0].pagey;u=l?e-v:e-d;f=l?math.abs(u)s){t.preventdefault();if(!p&&r.transitions){r.vars.animationloop||(u/=r.currentslide===0&&u<0||r.currentslide===r.last&&u>0?math.abs(u)/o+2:1);r.setprops(i+u,"settouch")}}}function b(s){t.removeeventlistener("touchmove",y,!1);if(r.animatingto===r.currentslide&&!f&&u!==null){var l=c?-u:u,h=l>0?r.gettarget("next"):r.gettarget("prev");r.canadvance(h)&&(number(new date)-a<550&&math.abs(l)>50||math.abs(l)>o/2)?r.flexanimate(h,r.vars.pauseonaction):p||r.flexanimate(r.currentslide,r.vars.pauseonaction,!0)}t.removeeventlistener("touchend",b,!1);e=null;n=null;u=null;i=null}}else{t.style.mstouchaction="none";t._gesture=new msgesture;t._gesture.target=t;t.addeventlistener("mspointerdown",w,!1);t._slider=r;t.addeventlistener("msgesturechange",e,!1);t.addeventlistener("msgestureend",s,!1);function w(e){e.stoppropagation();if(r.animating)e.preventdefault();else{r.pause();t._gesture.addpointer(e.pointerid);m=0;o=l?r.h:r.w;a=number(new date);i=h&&c&&r.animatingto===r.last?0:h&&c?r.limit-(r.itemw+r.vars.itemmargin)*r.move*r.animatingto:h&&r.currentslide===r.last?r.limit:h?(r.itemw+r.vars.itemmargin)*r.move*r.currentslide:c?(r.last-r.currentslide+r.cloneoffset)*o:(r.currentslide+r.cloneoffset)*o}}function e(e){e.stoppropagation();var n=e.target._slider;if(!n)return;var r=-e.translationx,s=-e.translationy;m+=l?s:r;u=m;f=l?math.abs(m)500){e.preventdefault();if(!p&&n.transitions){n.vars.animationloop||(u=m/(n.currentslide===0&&m<0||n.currentslide===n.last&&m>0?math.abs(m)/o+2:1));n.setprops(i+u,"settouch")}}}function s(t){t.stoppropagation();var r=t.target._slider;if(!r)return;if(r.animatingto===r.currentslide&&!f&&u!==null){var s=c?-u:u,l=s>0?r.gettarget("next"):r.gettarget("prev");r.canadvance(l)&&(number(new date)-a<550&&math.abs(s)>50||math.abs(s)>o/2)?r.flexanimate(l,r.vars.pauseonaction):p||r.flexanimate(r.currentslide,r.vars.pauseonaction,!0)}e=null;n=null;u=null;i=null;m=0}}},resize:function(){if(!r.animating&&r.is(":visible")){h||r.domath();if(p)v.smoothheight();else if(h){r.slides.width(r.computedw);r.update(r.pagingcount);r.setprops()}else if(l){r.viewport.height(r.h);r.setprops(r.h,"settotal")}else{r.vars.smoothheight&&v.smoothheight();r.newslides.width(r.computedw);r.setprops(r.computedw,"settotal")}}},smoothheight:function(e){if(!l||p){var t=p?r:r.viewport;e?t.animate({height:r.slides.eq(r.animatingto).height()},e):t.height(r.slides.eq(r.animatingto).height())}},sync:function(t){var n=e(r.vars.sync).data("flexslider"),i=r.animatingto;switch(t){case"animate":n.flexanimate(i,r.vars.pauseonaction,!1,!0);break;case"play":!n.playing&&!n.asnav&&n.play();break;case"pause":n.pause()}},uniqueid:function(t){t.find("[id]").each(function(){var t=e(this);t.attr("id",t.attr("id")+"_clone")});return t},pauseinvisible:{visprop:null,init:function(){var e=["webkit","moz","ms","o"];if("hidden"in document)return"hidden";for(var t=0;t0?settimeout(r.play,r.vars.initdelay):r.play()})}},ishidden:function(){return document[v.pauseinvisible.visprop]||!1}},settoclearwatchedevent:function(){cleartimeout(f);f=settimeout(function(){a=""},3e3)}};r.flexanimate=function(t,n,s,u,a){!r.vars.animationloop&&t!==r.currentslide&&(r.direction=t>r.currentslide?"next":"prev");d&&r.pagingcount===1&&(r.direction=r.currentitemr.limit&&r.visible!==1?r.limit:b}else r.currentslide===0&&t===r.count-1&&r.vars.animationloop&&r.direction!=="next"?y=c?(r.count+r.cloneoffset)*m:0:r.currentslide===r.last&&t===0&&r.vars.animationloop&&r.direction!=="prev"?y=c?0:(r.count+1)*m:y=c?(r.count-1-t+r.cloneoffset)*m:(t+r.cloneoffset)*m;r.setprops(y,"",r.vars.animationspeed);if(r.transitions){if(!r.vars.animationloop||!r.atend){r.animating=!1;r.currentslide=r.animatingto}r.container.unbind("webkittransitionend transitionend");r.container.bind("webkittransitionend transitionend",function(){r.wrapup(m)})}else r.container.animate(r.args,r.vars.animationspeed,r.vars.easing,function(){r.wrapup(m)})}else if(!o){r.slides.eq(r.currentslide).css({zindex:1}).animate({opacity:0},r.vars.animationspeed,r.vars.easing);r.slides.eq(t).css({zindex:2}).animate({opacity:1},r.vars.animationspeed,r.vars.easing,r.wrapup)}else{r.slides.eq(r.currentslide).css({opacity:0,zindex:1});r.slides.eq(t).css({opacity:1,zindex:2});r.wrapup(m)}r.vars.smoothheight&&v.smoothheight(r.vars.animationspeed)}};r.wrapup=function(e){!p&&!h&&(r.currentslide===0&&r.animatingto===r.last&&r.vars.animationloop?r.setprops(e,"jumpend"):r.currentslide===r.last&&r.animatingto===0&&r.vars.animationloop&&r.setprops(e,"jumpstart"));r.animating=!1;r.currentslide=r.animatingto;r.vars.after(r)};r.animateslides=function(){!r.animating&&m&&r.flexanimate(r.gettarget("next"))};r.pause=function(){clearinterval(r.animatedslides);r.animatedslides=null;r.playing=!1;r.vars.pauseplay&&v.pauseplay.update("play");r.syncexists&&v.sync("pause")};r.play=function(){r.playing&&clearinterval(r.animatedslides);r.animatedslides=r.animatedslides||setinterval(r.animateslides,r.vars.slideshowspeed);r.started=r.playing=!0;r.vars.pauseplay&&v.pauseplay.update("pause");r.syncexists&&v.sync("play")};r.stop=function(){r.pause();r.stopped=!0};r.canadvance=function(e,t){var n=d?r.pagingcount-1:r.last;return t?!0:d&&r.currentitem===r.count-1&&e===0&&r.direction==="prev"?!0:d&&r.currentitem===0&&e===r.pagingcount-1&&r.direction!=="next"?!1:e===r.currentslide&&!d?!1:r.vars.animationloop?!0:r.atend&&r.currentslide===0&&e===n&&r.direction!=="next"?!1:r.atend&&r.currentslide===n&&e===0&&r.direction==="next"?!1:!0};r.gettarget=function(e){r.direction=e;return e==="next"?r.currentslide===r.last?0:r.currentslide+1:r.currentslide===0?r.last:r.currentslide-1};r.setprops=function(e,t,n){var i=function(){var n=e?e:(r.itemw+r.vars.itemmargin)*r.move*r.animatingto,i=function(){if(h)return t==="settouch"?e:c&&r.animatingto===r.last?0:c?r.limit-(r.itemw+r.vars.itemmargin)*r.move*r.animatingto:r.animatingto===r.last?r.limit:n;switch(t){case"settotal":return c?(r.count-1-r.currentslide+r.cloneoffset)*e:(r.currentslide+r.cloneoffset)*e;case"settouch":return c?e:e;case"jumpend":return c?e:r.count*e;case"jumpstart":return c?r.count*e:e;default:return e}}();return i*-1+"px"}();if(r.transitions){i=l?"translate3d(0,"+i+",0)":"translate3d("+i+",0,0)";n=n!==undefined?n/1e3+"s":"0s";r.container.css("-"+r.pfx+"-transition-duration",n);r.container.css("transition-duration",n)}r.args[r.prop]=i;(r.transitions||n===undefined)&&r.container.css(r.args);r.container.css("transform",i)};r.setup=function(t){if(!p){var n,s;if(t==="init"){r.viewport=e('
    ').css({overflow:"hidden",position:"relative"}).appendto(r).append(r.container);r.clonecount=0;r.cloneoffset=0;if(c){s=e.makearray(r.slides).reverse();r.slides=e(s);r.container.empty().append(r.slides)}}if(r.vars.animationloop&&!h){r.clonecount=2;r.cloneoffset=1;t!=="init"&&r.container.find(".clone").remove();r.container.append(r.slides.first().clone().addclass("clone").attr("aria-hidden","true")).prepend(r.slides.last().clone().addclass("clone").attr("aria-hidden","true"));v.uniqueid(r.slides.first().clone().addclass("clone")).appendto(r.container);v.uniqueid(r.slides.last().clone().addclass("clone")).prependto(r.container)}r.newslides=e(r.vars.selector,r);n=c?r.count-1-r.currentslide+r.cloneoffset:r.currentslide+r.cloneoffset;if(l&&!h){r.container.height((r.count+r.clonecount)*200+"%").css("position","absolute").width("100%");settimeout(function(){r.newslides.css({display:"block"});r.domath();r.viewport.height(r.h);r.setprops(n*r.h,"init")},t==="init"?100:0)}else{r.container.width((r.count+r.clonecount)*200+"%");r.setprops(n*r.computedw,"init");settimeout(function(){r.domath();r.newslides.css({width:r.computedw,"float":"left",display:"block"});r.vars.smoothheight&&v.smoothheight()},t==="init"?100:0)}}else{r.slides.css({width:"100%","float":"left",marginright:"-100%",position:"relative"});t==="init"&&(o?r.slides.css({opacity:0,display:"block",webkittransition:"opacity "+r.vars.animationspeed/1e3+"s ease",zindex:1}).eq(r.currentslide).css({opacity:1,zindex:2}):r.slides.css({opacity:0,display:"block",zindex:1}).eq(r.currentslide).css({zindex:2}).animate({opacity:1},r.vars.animationspeed,r.vars.easing));r.vars.smoothheight&&v.smoothheight()}h||r.slides.removeclass(i+"active-slide").eq(r.currentslide).addclass(i+"active-slide");r.vars.init(r)};r.domath=function(){var e=r.slides.first(),t=r.vars.itemmargin,n=r.vars.minitems,i=r.vars.maxitems;r.w=r.viewport===undefined?r.width():r.viewport.width();r.h=e.height();r.boxpadding=e.outerwidth()-e.width();if(h){r.itemt=r.vars.itemwidth+t;r.minw=n?n*r.itemt:r.w;r.maxw=i?i*r.itemt-t:r.w;r.itemw=r.minw>r.w?(r.w-t*(n-1))/n:r.maxwr.w?r.w:r.vars.itemwidth;r.visible=math.floor(r.w/r.itemw);r.move=r.vars.move>0&&r.vars.mover.w?r.itemw*(r.count-1)+t*(r.count-1):(r.itemw+t)*r.count-r.w-t}else{r.itemw=r.w;r.pagingcount=r.count;r.last=r.count-1}r.computedw=r.itemw-r.boxpadding};r.update=function(e,t){r.domath();if(!h){er.controlnav.length)v.controlnav.update("add");else if(t==="remove"&&!h||r.pagingcountr.last){r.currentslide-=1;r.animatingto-=1}v.controlnav.update("remove",r.last)}r.vars.directionnav&&v.directionnav.update()};r.addslide=function(t,n){var i=e(t);r.count+=1;r.last=r.count-1;l&&c?n!==undefined?r.slides.eq(r.count-n).after(i):r.container.prepend(i):n!==undefined?r.slides.eq(n).before(i):r.container.append(i);r.update(n,"add");r.slides=e(r.vars.selector+":not(.clone)",r);r.setup();r.vars.added(r)};r.removeslide=function(t){var n=isnan(t)?r.slides.index(e(t)):t;r.count-=1;r.last=r.count-1;isnan(t)?e(t,r.slides).remove():l&&c?r.slides.eq(r.last).remove():r.slides.eq(t).remove();r.domath();r.update(n,"remove");r.slides=e(r.vars.selector+":not(.clone)",r);r.setup();r.vars.removed(r)};v.init()};e(window).blur(function(e){focused=!1}).focus(function(e){focused=!0});e.flexslider.defaults={namespace:"flex-",selector:".slides > li",animation:"fade",easing:"swing",direction:"horizontal",reverse:!1,animationloop:!0,smoothheight:!1,startat:0,slideshow:!0,slideshowspeed:7e3,animationspeed:600,initdelay:0,randomize:!1,thumbcaptions:!1,pauseonaction:!0,pauseonhover:!1,pauseinvisible:!0,usecss:!0,touch:!0,video:!1,controlnav:!0,directionnav:!0,prevtext:"",nexttext:"",keyboard:!0,multiplekeyboard:!1,mousewheel:!1,pauseplay:!1,pausetext:"pause",playtext:"play",controlscontainer:"",manualcontrols:"",sync:"",asnavfor:"",itemwidth:0,itemmargin:0,minitems:1,maxitems:0,move:0,allowoneslide:!0,start:function(){},before:function(){},after:function(){},end:function(){},added:function(){},removed:function(){},init:function(){}};e.fn.flexslider=function(t){t===undefined&&(t={});if(typeof t=="object")return this.each(function(){var n=e(this),r=t.selector?t.selector:".slides > li",i=n.find(r);if(i.length===1&&t.allowoneslide===!0||i.length===0){i.fadein(400);t.start&&t.start(n)}else n.data("flexslider")===undefined&&new e.flexslider(this,t)});var n=e(this).data("flexslider");switch(t){case"play":n.play();break;case"pause":n.pause();break;case"stop":n.stop();break;case"next":n.flexanimate(n.gettarget("next"),!0);break;case"prev":case"previous":n.flexanimate(n.gettarget("prev"),!0);break;default:typeof t=="number"&&n.flexanimate(t,!0)}}})(jquery);(function(e){e.flexslider=function(t,n){var r=e(t);r.vars=e.extend({},e.flexslider.defaults,n);var i=r.vars.namespace,s=window.navigator&&window.navigator.mspointerenabled&&window.msgesture,o=("ontouchstart"in window||s||window.documenttouch&&document instanceof documenttouch)&&r.vars.touch,u="click touchend mspointerup",a="",f,l=r.vars.direction==="vertical",c=r.vars.reverse,h=r.vars.itemwidth>0,p=r.vars.animation==="fade",d=r.vars.asnavfor!=="",v={},m=!0;e.data(t,"flexslider",r);v={init:function(){r.animating=!1;r.currentslide=parseint(r.vars.startat?r.vars.startat:0,10);isnan(r.currentslide)&&(r.currentslide=0);r.animatingto=r.currentslide;r.atend=r.currentslide===0||r.currentslide===r.last;r.containerselector=r.vars.selector.substr(0,r.vars.selector.search(" "));r.slides=e(r.vars.selector,r);r.container=e(r.containerselector,r);r.count=r.slides.length;r.syncexists=e(r.vars.sync).length>0;r.vars.animation==="slide"&&(r.vars.animation="swing");r.prop=l?"top":"marginleft";r.args={};r.manualpause=!1;r.stopped=!1;r.started=!1;r.starttimeout=null;r.transitions=!r.vars.video&&!p&&r.vars.usecss&&function(){var e=document.createelement("div"),t=["perspectiveproperty","webkitperspective","mozperspective","operspective","msperspective"];for(var n in t)if(e.style[t[n]]!==undefined){r.pfx=t[n].replace("perspective","").tolowercase();r.prop="-"+r.pfx+"-transform";return!0}return!1}();r.vars.controlscontainer!==""&&(r.controlscontainer=e(r.vars.controlscontainer).length>0&&e(r.vars.controlscontainer));r.vars.manualcontrols!==""&&(r.manualcontrols=e(r.vars.manualcontrols).length>0&&e(r.vars.manualcontrols));if(r.vars.randomize){r.slides.sort(function(){return math.round(math.random())-.5});r.container.empty().append(r.slides)}r.domath();r.setup("init");r.vars.controlnav&&v.controlnav.setup();r.vars.directionnav&&v.directionnav.setup();r.vars.keyboard&&(e(r.containerselector).length===1||r.vars.multiplekeyboard)&&e(document).bind("keyup",function(e){var t=e.keycode;if(!r.animating&&(t===39||t===37)){var n=t===39?r.gettarget("next"):t===37?r.gettarget("prev"):!1;r.flexanimate(n,r.vars.pauseonaction)}});r.vars.mousewheel&&r.bind("mousewheel",function(e,t,n,i){e.preventdefault();var s=t<0?r.gettarget("next"):r.gettarget("prev");r.flexanimate(s,r.vars.pauseonaction)});r.vars.pauseplay&&v.pauseplay.setup();r.vars.slideshow&&r.vars.pauseinvisible&&v.pauseinvisible.init();if(r.vars.slideshow){r.vars.pauseonhover&&r.hover(function(){!r.manualplay&&!r.manualpause&&r.pause()},function(){!r.manualpause&&!r.manualplay&&!r.stopped&&r.play()});if(!r.vars.pauseinvisible||!v.pauseinvisible.ishidden())r.vars.initdelay>0?r.starttimeout=settimeout(r.play,r.vars.initdelay):r.play()}d&&v.asnav.setup();o&&r.vars.touch&&v.touch();(!p||p&&r.vars.smoothheight)&&e(window).bind("resize orientationchange focus",v.resize);r.find("img").attr("draggable","true");settimeout(function(){r.vars.start(r)},200)},asnav:{setup:function(){r.asnav=!0;r.animatingto=math.floor(r.currentslide/r.move);r.currentitem=r.currentslide;r.slides.removeclass(i+"active-slide").eq(r.currentitem).addclass(i+"active-slide");if(!s)r.slides.on(u,function(t){t.preventdefault();var n=e(this),s=n.index(),o=n.offset().left-e(r).scrollleft();if(o<=0&&n.hasclass(i+"active-slide"))r.flexanimate(r.gettarget("prev"),!0);else if(!e(r.vars.asnavfor).data("flexslider").animating&&!n.hasclass(i+"active-slide")){r.direction=r.currentitem');if(r.pagingcount>1)for(var f=0;f':""+n+"";if("thumbnails"===r.vars.controlnav&&!0===r.vars.thumbcaptions){var l=o.attr("data-thumbcaption");""!=l&&undefined!=l&&(s+=''+l+"")}r.controlnavscaffold.append("
  • "+s+"
  • ");n++}r.controlscontainer?e(r.controlscontainer).append(r.controlnavscaffold):r.append(r.controlnavscaffold);v.controlnav.set();v.controlnav.active();r.controlnavscaffold.delegate("a, img",u,function(t){t.preventdefault();if(a===""||a===t.type){var n=e(this),s=r.controlnav.index(n);if(!n.hasclass(i+"active")){r.direction=s>r.currentslide?"next":"prev";r.flexanimate(s,r.vars.pauseonaction)}}a===""&&(a=t.type);v.settoclearwatchedevent()})},setupmanual:function(){r.controlnav=r.manualcontrols;v.controlnav.active();r.controlnav.bind(u,function(t){t.preventdefault();if(a===""||a===t.type){var n=e(this),s=r.controlnav.index(n);if(!n.hasclass(i+"active")){s>r.currentslide?r.direction="next":r.direction="prev";r.flexanimate(s,r.vars.pauseonaction)}}a===""&&(a=t.type);v.settoclearwatchedevent()})},set:function(){var t=r.vars.controlnav==="thumbnails"?"img":"a";r.controlnav=e("."+i+"control-nav li "+t,r.controlscontainer?r.controlscontainer:r)},active:function(){r.controlnav.removeclass(i+"active").eq(r.animatingto).addclass(i+"active")},update:function(t,n){r.pagingcount>1&&t==="add"?r.controlnavscaffold.append(e("
  • "+r.count+"
  • ")):r.pagingcount===1?r.controlnavscaffold.find("li").remove():r.controlnav.eq(n).closest("li").remove();v.controlnav.set();r.pagingcount>1&&r.pagingcount!==r.controlnav.length?r.update(n,t):v.controlnav.active()}},directionnav:{setup:function(){var t=e('");if(r.controlscontainer){e(r.controlscontainer).append(t);r.directionnav=e("."+i+"direction-nav li a",r.controlscontainer)}else{r.append(t);r.directionnav=e("."+i+"direction-nav li a",r)}v.directionnav.update();r.directionnav.bind(u,function(t){t.preventdefault();var n;if(a===""||a===t.type){n=e(this).hasclass(i+"next")?r.gettarget("next"):r.gettarget("prev");r.flexanimate(n,r.vars.pauseonaction)}a===""&&(a=t.type);v.settoclearwatchedevent()})},update:function(){var e=i+"disabled";r.pagingcount===1?r.directionnav.addclass(e).attr("tabindex","-1"):r.vars.animationloop?r.directionnav.removeclass(e).removeattr("tabindex"):r.animatingto===0?r.directionnav.removeclass(e).filter("."+i+"prev").addclass(e).attr("tabindex","-1"):r.animatingto===r.last?r.directionnav.removeclass(e).filter("."+i+"next").addclass(e).attr("tabindex","-1"):r.directionnav.removeclass(e).removeattr("tabindex")}},pauseplay:{setup:function(){var t=e('
    ');if(r.controlscontainer){r.controlscontainer.append(t);r.pauseplay=e("."+i+"pauseplay a",r.controlscontainer)}else{r.append(t);r.pauseplay=e("."+i+"pauseplay a",r)}v.pauseplay.update(r.vars.slideshow?i+"pause":i+"play");r.pauseplay.bind(u,function(t){t.preventdefault();if(a===""||a===t.type)if(e(this).hasclass(i+"pause")){r.manualpause=!0;r.manualplay=!1;r.pause()}else{r.manualpause=!1;r.manualplay=!0;r.play()}a===""&&(a=t.type);v.settoclearwatchedevent()})},update:function(e){e==="play"?r.pauseplay.removeclass(i+"pause").addclass(i+"play").html(r.vars.playtext):r.pauseplay.removeclass(i+"play").addclass(i+"pause").html(r.vars.pausetext)}},touch:function(){var e,n,i,o,u,a,f=!1,d=0,v=0,m=0;if(!s){t.addeventlistener("touchstart",g,!1);function g(s){if(r.animating)s.preventdefault();else if(window.navigator.mspointerenabled||s.touches.length===1){r.pause();o=l?r.h:r.w;a=number(new date);d=s.touches[0].pagex;v=s.touches[0].pagey;i=h&&c&&r.animatingto===r.last?0:h&&c?r.limit-(r.itemw+r.vars.itemmargin)*r.move*r.animatingto:h&&r.currentslide===r.last?r.limit:h?(r.itemw+r.vars.itemmargin)*r.move*r.currentslide:c?(r.last-r.currentslide+r.cloneoffset)*o:(r.currentslide+r.cloneoffset)*o;e=l?v:d;n=l?d:v;t.addeventlistener("touchmove",y,!1);t.addeventlistener("touchend",b,!1)}}function y(t){d=t.touches[0].pagex;v=t.touches[0].pagey;u=l?e-v:e-d;f=l?math.abs(u)s){t.preventdefault();if(!p&&r.transitions){r.vars.animationloop||(u/=r.currentslide===0&&u<0||r.currentslide===r.last&&u>0?math.abs(u)/o+2:1);r.setprops(i+u,"settouch")}}}function b(s){t.removeeventlistener("touchmove",y,!1);if(r.animatingto===r.currentslide&&!f&&u!==null){var l=c?-u:u,h=l>0?r.gettarget("next"):r.gettarget("prev");r.canadvance(h)&&(number(new date)-a<550&&math.abs(l)>50||math.abs(l)>o/2)?r.flexanimate(h,r.vars.pauseonaction):p||r.flexanimate(r.currentslide,r.vars.pauseonaction,!0)}t.removeeventlistener("touchend",b,!1);e=null;n=null;u=null;i=null}}else{t.style.mstouchaction="none";t._gesture=new msgesture;t._gesture.target=t;t.addeventlistener("mspointerdown",w,!1);t._slider=r;t.addeventlistener("msgesturechange",e,!1);t.addeventlistener("msgestureend",s,!1);function w(e){e.stoppropagation();if(r.animating)e.preventdefault();else{r.pause();t._gesture.addpointer(e.pointerid);m=0;o=l?r.h:r.w;a=number(new date);i=h&&c&&r.animatingto===r.last?0:h&&c?r.limit-(r.itemw+r.vars.itemmargin)*r.move*r.animatingto:h&&r.currentslide===r.last?r.limit:h?(r.itemw+r.vars.itemmargin)*r.move*r.currentslide:c?(r.last-r.currentslide+r.cloneoffset)*o:(r.currentslide+r.cloneoffset)*o}}function e(e){e.stoppropagation();var n=e.target._slider;if(!n)return;var r=-e.translationx,s=-e.translationy;m+=l?s:r;u=m;f=l?math.abs(m)500){e.preventdefault();if(!p&&n.transitions){n.vars.animationloop||(u=m/(n.currentslide===0&&m<0||n.currentslide===n.last&&m>0?math.abs(m)/o+2:1));n.setprops(i+u,"settouch")}}}function s(t){t.stoppropagation();var r=t.target._slider;if(!r)return;if(r.animatingto===r.currentslide&&!f&&u!==null){var s=c?-u:u,l=s>0?r.gettarget("next"):r.gettarget("prev");r.canadvance(l)&&(number(new date)-a<550&&math.abs(s)>50||math.abs(s)>o/2)?r.flexanimate(l,r.vars.pauseonaction):p||r.flexanimate(r.currentslide,r.vars.pauseonaction,!0)}e=null;n=null;u=null;i=null;m=0}}},resize:function(){if(!r.animating&&r.is(":visible")){h||r.domath();if(p)v.smoothheight();else if(h){r.slides.width(r.computedw);r.update(r.pagingcount);r.setprops()}else if(l){r.viewport.height(r.h);r.setprops(r.h,"settotal")}else{r.vars.smoothheight&&v.smoothheight();r.newslides.width(r.computedw );r.setprops(r.computedw,"settotal")}}},smoothheight:function(e){if(!l||p){var t=p?r:r.viewport;e?t.animate({height:r.slides.eq(r.animatingto).height()},e):t.height(r.slides.eq(r.animatingto).height())}},sync:function(t){var n=e(r.vars.sync).data("flexslider"),i=r.animatingto;switch(t){case"animate":n.flexanimate(i,r.vars.pauseonaction,!1,!0);break;case"play":!n.playing&&!n.asnav&&n.play();break;case"pause":n.pause()}},uniqueid:function(t){t.find("[id]").each(function(){var t=e(this);t.attr("id",t.attr("id")+"_clone")});return t},pauseinvisible:{visprop:null,init:function(){var e=["webkit","moz","ms","o"];if("hidden"in document)return"hidden";for(var t=0;t0?settimeout(r.play,r.vars.initdelay):r.play()})}},ishidden:function(){return document[v.pauseinvisible.visprop]||!1}},settoclearwatchedevent:function(){cleartimeout(f);f=settimeout(function(){a=""},3e3)}};r.flexanimate=function(t,n,s,u,a){!r.vars.animationloop&&t!==r.currentslide&&(r.direction=t>r.currentslide?"next":"prev");d&&r.pagingcount===1&&(r.direction=r.currentitemr.limit&&r.visible!==1?r.limit:b}else r.currentslide===0&&t===r.count-1&&r.vars.animationloop&&r.direction!=="next"?y=c?(r.count+r.cloneoffset)*m:0:r.currentslide===r.last&&t===0&&r.vars.animationloop&&r.direction!=="prev"?y=c?0:(r.count+1)*m:y=c?(r.count-1-t+r.cloneoffset)*m:(t+r.cloneoffset)*m;r.setprops(y,"",r.vars.animationspeed);if(r.transitions){if(!r.vars.animationloop||!r.atend){r.animating=!1;r.currentslide=r.animatingto}r.container.unbind("webkittransitionend transitionend");r.container.bind("webkittransitionend transitionend",function(){r.wrapup(m)})}else r.container.animate(r.args,r.vars.animationspeed,r.vars.easing,function(){r.wrapup(m)})}else if(!o){r.slides.eq(r.currentslide).css({zindex:1}).animate({opacity:0},r.vars.animationspeed,r.vars.easing);r.slides.eq(t).css({zindex:2}).animate({opacity:1},r.vars.animationspeed,r.vars.easing,r.wrapup)}else{r.slides.eq(r.currentslide).css({opacity:0,zindex:1});r.slides.eq(t).css({opacity:1,zindex:2});r.wrapup(m)}r.vars.smoothheight&&v.smoothheight(r.vars.animationspeed)}};r.wrapup=function(e){!p&&!h&&(r.currentslide===0&&r.animatingto===r.last&&r.vars.animationloop?r.setprops(e,"jumpend"):r.currentslide===r.last&&r.animatingto===0&&r.vars.animationloop&&r.setprops(e,"jumpstart"));r.animating=!1;r.currentslide=r.animatingto;r.vars.after(r)};r.animateslides=function(){!r.animating&&m&&r.flexanimate(r.gettarget("next"))};r.pause=function(){clearinterval(r.animatedslides);r.animatedslides=null;r.playing=!1;r.vars.pauseplay&&v.pauseplay.update("play");r.syncexists&&v.sync("pause")};r.play=function(){r.playing&&clearinterval(r.animatedslides);r.animatedslides=r.animatedslides||setinterval(r.animateslides,r.vars.slideshowspeed);r.started=r.playing=!0;r.vars.pauseplay&&v.pauseplay.update("pause");r.syncexists&&v.sync("play")};r.stop=function(){r.pause();r.stopped=!0};r.canadvance=function(e,t){var n=d?r.pagingcount-1:r.last;return t?!0:d&&r.currentitem===r.count-1&&e===0&&r.direction==="prev"?!0:d&&r.currentitem===0&&e===r.pagingcount-1&&r.direction!=="next"?!1:e===r.currentslide&&!d?!1:r.vars.animationloop?!0:r.atend&&r.currentslide===0&&e===n&&r.direction!=="next"?!1:r.atend&&r.currentslide===n&&e===0&&r.direction==="next"?!1:!0};r.gettarget=function(e){r.direction=e;return e==="next"?r.currentslide===r.last?0:r.currentslide+1:r.currentslide===0?r.last:r.currentslide-1};r.setprops=function(e,t,n){var i=function(){var n=e?e:(r.itemw+r.vars.itemmargin)*r.move*r.animatingto,i=function(){if(h)return t==="settouch"?e:c&&r.animatingto===r.last?0:c?r.limit-(r.itemw+r.vars.itemmargin)*r.move*r.animatingto:r.animatingto===r.last?r.limit:n;switch(t){case"settotal":return c?(r.count-1-r.currentslide+r.cloneoffset)*e:(r.currentslide+r.cloneoffset)*e;case"settouch":return c?e:e;case"jumpend":return c?e:r.count*e;case"jumpstart":return c?r.count*e:e;default:return e}}();return i*-1+"px"}();if(r.transitions){i=l?"translate3d(0,"+i+",0)":"translate3d("+i+",0,0)";n=n!==undefined?n/1e3+"s":"0s";r.container.css("-"+r.pfx+"-transition-duration",n);r.container.css("transition-duration",n)}r.args[r.prop]=i;(r.transitions||n===undefined)&&r.container.css(r.args);r.container.css("transform",i)};r.setup=function(t){if(!p){var n,s;if(t==="init"){r.viewport=e('
    ').css({overflow:"hidden",position:"relative"}).appendto(r).append(r.container);r.clonecount=0;r.cloneoffset=0;if(c){s=e.makearray(r.slides).reverse();r.slides=e(s);r.container.empty().append(r.slides)}}if(r.vars.animationloop&&!h){r.clonecount=2;r.cloneoffset=1;t!=="init"&&r.container.find(".clone").remove();r.container.append(r.slides.first().clone().addclass("clone").attr("aria-hidden","true")).prepend(r.slides.last().clone().addclass("clone").attr("aria-hidden","true"));v.uniqueid(r.slides.first().clone().addclass("clone")).appendto(r.container);v.uniqueid(r.slides.last().clone().addclass("clone")).prependto(r.container)}r.newslides=e(r.vars.selector,r);n=c?r.count-1-r.currentslide+r.cloneoffset:r.currentslide+r.cloneoffset;if(l&&!h){r.container.height((r.count+r.clonecount)*200+"%").css("position","absolute").width("100%");settimeout(function(){r.newslides.css({display:"block"});r.domath();r.viewport.height(r.h);r.setprops(n*r.h,"init")},t==="init"?100:0)}else{r.container.width((r.count+r.clonecount)*200+"%");r.setprops(n*r.computedw,"init");settimeout(function(){r.domath();r.newslides.css({width:r.computedw,"float":"left",display:"block"});r.vars.smoothheight&&v.smoothheight()},t==="init"?100:0)}}else{r.slides.css({width:"100%","float":"left",marginright:"-100%",position:"relative"});t==="init"&&(o?r.slides.css({opacity:0,display:"block",webkittransition:"opacity "+r.vars.animationspeed/1e3+"s ease",zindex:1}).eq(r.currentslide).css({opacity:1,zindex:2}):r.slides.css({opacity:0,display:"block",zindex:1}).eq(r.currentslide).css({zindex:2}).animate({opacity:1},r.vars.animationspeed,r.vars.easing));r.vars.smoothheight&&v.smoothheight()}h||r.slides.removeclass(i+"active-slide").eq(r.currentslide).addclass(i+"active-slide");r.vars.init(r)};r.domath=function(){var e=r.slides.first(),t=r.vars.itemmargin,n=r.vars.minitems,i=r.vars.maxitems;r.w=r.viewport===undefined?r.width():r.viewport.width();r.h=e.height();r.boxpadding=e.outerwidth()-e.width();if(h){r.itemt=r.vars.itemwidth+t;r.minw=n?n*r.itemt:r.w;r.maxw=i?i*r.itemt-t:r.w;r.itemw=r.minw>r.w?(r.w-t*(n-1))/n:r.maxwr.w?r.w:r.vars.itemwidth;r.visible=math.floor(r.w/r.itemw);r.move=r.vars.move>0&&r.vars.mover.w?r.itemw*(r.count-1)+t*(r.count-1):(r.itemw+t)*r.count-r.w-t}else{r.itemw=r.w;r.pagingcount=r.count;r.last=r.count-1}r.computedw=r.itemw-r.boxpadding};r.update=function(e,t){r.domath();if(!h){er.controlnav.length)v.controlnav.update("add");else if(t==="remove"&&!h||r.pagingcountr.last){r.currentslide-=1;r.animatingto-=1}v.controlnav.update("remove",r.last)}r.vars.directionnav&&v.directionnav.update()};r.addslide=function(t,n){var i=e(t);r.count+=1;r.last=r.count-1;l&&c?n!==undefined?r.slides.eq(r.count-n).after(i):r.container.prepend(i):n!==undefined?r.slides.eq(n).before(i):r.container.append(i);r.update(n,"add");r.slides=e(r.vars.selector+":not(.clone)",r);r.setup();r.vars.added(r)};r.removeslide=function(t){var n=isnan(t)?r.slides.index(e(t)):t;r.count-=1;r.last=r.count-1;isnan(t)?e(t,r.slides).remove():l&&c?r.slides.eq(r.last).remove():r.slides.eq(t).remove();r.domath();r.update(n,"remove");r.slides=e(r.vars.selector+":not(.clone)",r);r.setup();r.vars.removed(r)};v.init()};e(window).blur(function(e){focused=!1}).focus(function(e){focused=!0});e.flexslider.defaults={namespace:"flex-",selector:".slides > li",animation:"fade",easing:"swing",direction:"horizontal",reverse:!1,animationloop:!0,smoothheight:!1,startat:0,slideshow:!0,slideshowspeed:7e3,animationspeed:600,initdelay:0,randomize:!1,thumbcaptions:!1,pauseonaction:!0,pauseonhover:!1,pauseinvisible:!0,usecss:!0,touch:!0,video:!1,controlnav:!0,directionnav:!0,prevtext:"",nexttext:"",keyboard:!0,multiplekeyboard:!1,mousewheel:!1,pauseplay:!1,pausetext:"pause",playtext:"play",controlscontainer:"",manualcontrols:"",sync:"",asnavfor:"",itemwidth:0,itemmargin:0,minitems:1,maxitems:0,move:0,allowoneslide:!0,start:function(){},before:function(){},after:function(){},end:function(){},added:function(){},removed:function(){},init:function(){}};e.fn.flexslider=function(t){t===undefined&&(t={});if(typeof t=="object")return this.each(function(){var n=e(this),r=t.selector?t.selector:".slides > li",i=n.find(r);if(i.length===1&&t.allowoneslide===!0||i.length===0){i.fadein(400);t.start&&t.start(n)}else n.data("flexslider")===undefined&&new e.flexslider(this,t)});var n=e(this).data("flexslider");switch(t){case"play":n.play();break;case"pause":n.pause();break;case"stop":n.stop();break;case"next":n.flexanimate(n.gettarget("next"),!0);break;case"prev":case"previous":n.flexanimate(n.gettarget("prev"),!0);break;default:typeof t=="number"&&n.flexanimate(t,!0)}}})(jquery);