
/*! jQuery v1.10.2 | (c) 2005, 2013 jQuery Foundation, Inc. | jquery.org/license
 */
(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.2",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=st(),k=st(),E=st(),S=!1,A=function(e,t){return e===t?(S=!0,0):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=mt(e),(d=t.getAttribute("id"))?m=d.replace(nt,"\\$&"):t.setAttribute("id",m),m="[id='"+m+"'] ",u=c.length;while(u--)c[u]=m+yt(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 kt(e.replace(z,"$1"),t,n,i)}function st(){var e=[];function t(n,r){return e.push(n+=" ")>o.cacheLength&&delete t[e.shift()],t[n]=r}return t}function lt(e){return e[b]=!0,e}function ut(e){var t=f.createElement("div");try{return!!e(t)}catch(n){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function ct(e,t){var n=e.split("|"),r=e.length;while(r--)o.attrHandle[n[r]]=t}function pt(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 ft(e){return function(t){var n=t.nodeName.toLowerCase();return"input"===n&&t.type===e}}function dt(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function ht(e){return lt(function(t){return t=+t,lt(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.defaultView;return n!==f&&9===n.nodeType&&n.documentElement?(f=n,d=n.documentElement,h=!s(n),i&&i.attachEvent&&i!==i.top&&i.attachEvent("onbeforeunload",function(){p()}),r.attributes=ut(function(e){return e.className="i",!e.getAttribute("className")}),r.getElementsByTagName=ut(function(e){return e.appendChild(n.createComment("")),!e.getElementsByTagName("*").length}),r.getElementsByClassName=ut(function(e){return e.innerHTML="<div class='a'></div><div class='a i'></div>",e.firstChild.className="i",2===e.getElementsByClassName("i").length}),r.getById=ut(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=K.test(n.querySelectorAll))&&(ut(function(e){e.innerHTML="<select><option selected=''></option></select>",e.querySelectorAll("[selected]").length||g.push("\\["+P+"*(?:value|"+B+")"),e.querySelectorAll(":checked").length||g.push(":checked")}),ut(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=K.test(y=d.webkitMatchesSelector||d.mozMatchesSelector||d.oMatchesSelector||d.msMatchesSelector))&&ut(function(e){r.disconnectedMatch=y.call(e,"div"),y.call(e,"[s!='']:x"),m.push("!=",I)}),g=g.length&&RegExp(g.join("|")),m=m.length&&RegExp(m.join("|")),v=K.test(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},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 pt(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?pt(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:lt,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=mt(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())?lt(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:lt(function(e){var t=[],n=[],r=l(e.replace(z,"$1"));return r[b]?lt(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:lt(function(e){return function(t){return at(e,t).length>0}}),contains:lt(function(e){return function(t){return(t.textContent||t.innerText||a(t)).indexOf(e)>-1}}),lang:lt(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:ht(function(){return[0]}),last:ht(function(e,t){return[t-1]}),eq:ht(function(e,t,n){return[0>n?n+t:n]}),even:ht(function(e,t){var n=0;for(;t>n;n+=2)e.push(n);return e}),odd:ht(function(e,t){var n=1;for(;t>n;n+=2)e.push(n);return e}),lt:ht(function(e,t,n){var r=0>n?n+t:n;for(;--r>=0;)e.push(r);return e}),gt:ht(function(e,t,n){var r=0>n?n+t:n;for(;t>++r;)e.push(r);return e})}},o.pseudos.nth=o.pseudos.eq;for(n in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})o.pseudos[n]=ft(n);for(n in{submit:!0,reset:!0})o.pseudos[n]=dt(n);function gt(){}gt.prototype=o.filters=o.pseudos,o.setFilters=new gt;function mt(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 yt(e){var t=0,n=e.length,r="";for(;n>t;t++)r+=e[t].value;return r}function vt(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 bt(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 xt(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 wt(e,t,n,r,i,o){return r&&!r[b]&&(r=wt(r)),i&&!i[b]&&(i=wt(i,o)),lt(function(o,a,s,l){var u,c,p,f=[],d=[],h=a.length,g=o||Nt(t||"*",s.nodeType?[s]:s,[]),m=!e||!o&&t?g:xt(g,f,e,s,l),y=n?i||(o?e:h||r)?[]:a:m;if(n&&n(m,y,s,l),r){u=xt(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=xt(y===a?y.splice(h,y.length):y),i?i(null,a,y,l):M.apply(a,y)})}function Tt(e){var t,n,r,i=e.length,a=o.relative[e[0].type],s=a||o.relative[" "],l=a?1:0,c=vt(function(e){return e===t},s,!0),p=vt(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=[vt(bt(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 wt(l>1&&bt(f),l>1&&yt(e.slice(0,l-1).concat({value:" "===e[l-2].type?"*":""})).replace(z,"$1"),n,r>l&&Tt(e.slice(l,r)),i>r&&Tt(e=e.slice(r)),i>r&&yt(e))}f.push(n)}return bt(f)}function Ct(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=xt(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?lt(s):s}l=at.compile=function(e,t){var n,r=[],i=[],o=E[e+" "];if(!o){t||(t=mt(e)),n=t.length;while(n--)o=Tt(t[n]),o[b]?r.push(o):i.push(o);o=E(e,Ct(i,r))}return o};function Nt(e,t,n){var r=0,i=t.length;for(;i>r;r++)at(e,t[r],n);return n}function kt(e,t,n,i){var a,s,u,c,p,f=mt(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&&yt(s),!e)return M.apply(n,i),n;break}}}return l(e,f)(i,t,!h,n,V.test(e)),n}r.sortStable=b.split("").sort(A).join("")===b,r.detectDuplicates=S,p(),r.sortDetached=ut(function(e){return 1&e.compareDocumentPosition(f.createElement("div"))}),ut(function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")})||ct("type|href|height|width",function(e,n,r){return r?t:e.getAttribute(n,"type"===n.toLowerCase()?1:2)}),r.attributes&&ut(function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||ct("value",function(e,n,r){return r||"input"!==e.nodeName.toLowerCase()?t:e.defaultValue}),ut(function(e){return null==e.getAttribute("disabled")})||ct(B,function(e,n,r){var i;return r?t:(i=e.getAttributeNode(n))&&i.specified?i.value:e[n]===!0?n.toLowerCase():null}),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!l||i&&!u||(t=t||[],t=[e,t.slice?t.slice():t],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="  <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",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></: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="<table><tr><td></td><td>t</td></tr></table>",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="<div></div>",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;return"boolean"==typeof t&&"string"===n?t?this.addClass(e):this.removeClass(e):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 t,r=0,o=x(this),a=e.match(T)||[];while(t=a[r++])o.hasClass(t)?o.removeClass(t):o.addClass(t)}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]&&RegExp("(^|\\.)"+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=/<tbody/i,wt=/<|&#?\w+;/,Tt=/<(?:script|style|link)/i,Ct=/^(?:checkbox|radio)$/i,Nt=/checked\s*(?:[^=]|=\s*.checked.)/i,kt=/^$|\/(?:java|ecma)script/i,Et=/^true\/(.*)/,St=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,At={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],area:[1,"<map>","</map>"],param:[1,"<object>","</object>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:x.support.htmlSerialize?[0,"",""]:[1,"X<div>","</div>"]},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></$2>");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></$2>")+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)?"<table>"!==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){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){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,order:!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("<iframe frameborder='0' width='0' height='0'/>").css("cssText","display:block !important")).appendTo(t.documentElement),t=(Pt[0].contentWindow||Pt[0].contentDocument).document,t.write("<!doctype html><html><body>"),t.close(),n=un(e,t),Pt.detach()),Gt[e]=n),n}function un(e,t){var n=x(t.createElement(e)).appendTo(t.body),r=x.css(n[0],"display");return n.remove(),r}x.each(["height","width"],function(e,n){x.cssHooks[n]={get:function(e,r,i){return r?0===e.offsetWidth&&Xt.test(x.css(e,"display"))?x.swap(e,Qt,function(){return sn(e,n,i)}):sn(e,n,i):t},set:function(e,t,r){var i=r&&Rt(e);return on(e,t,r?an(e,n,r,x.support.boxSizing&&"border-box"===x.css(e,"boxSizing",!1,i),i):0)}}}),x.support.opacity||(x.cssHooks.opacity={get:function(e,t){return It.test((t&&e.currentStyle?e.currentStyle.filter:e.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":t?"1":""},set:function(e,t){var n=e.style,r=e.currentStyle,i=x.isNumeric(t)?"alpha(opacity="+100*t+")":"",o=r&&r.filter||n.filter||"";n.zoom=1,(t>=1||""===t)&&""===x.trim(o.replace($t,""))&&n.removeAttribute&&(n.removeAttribute("filter"),""===t||r&&!r.filter)||(n.filter=$t.test(o)?o.replace($t,i):o+" "+i)}}),x(function(){x.support.reliableMarginRight||(x.cssHooks.marginRight={get:function(e,n){return n?x.swap(e,{display:"inline-block"},Wt,[e,"marginRight"]):t}}),!x.support.pixelPosition&&x.fn.position&&x.each(["top","left"],function(e,n){x.cssHooks[n]={get:function(e,r){return r?(r=Wt(e,n),Yt.test(r)?x(e).position()[n]+"px":r):t}}})}),x.expr&&x.expr.filters&&(x.expr.filters.hidden=function(e){return 0>=e.offsetWidth&&0>=e.offsetHeight||!x.support.reliableHiddenOffsets&&"none"===(e.style&&e.style.display||x.css(e,"display"))},x.expr.filters.visible=function(e){return!x.expr.filters.hidden(e)}),x.each({margin:"",padding:"",border:"Width"},function(e,t){x.cssHooks[e+t]={expand:function(n){var r=0,i={},o="string"==typeof n?n.split(" "):[n];for(;4>r;r++)i[e+Zt[r]+t]=o[r]||o[r-2]||o[0];return i}},Ut.test(e)||(x.cssHooks[e+t].set=on)});var cn=/%20/g,pn=/\[\]$/,fn=/\r?\n/g,dn=/^(?:submit|button|image|reset|file)$/i,hn=/^(?:input|select|textarea|keygen)/i;x.fn.extend({serialize:function(){return x.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=x.prop(this,"elements");return e?x.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!x(this).is(":disabled")&&hn.test(this.nodeName)&&!dn.test(e)&&(this.checked||!Ct.test(e))}).map(function(e,t){var n=x(this).val();return null==n?null:x.isArray(n)?x.map(n,function(e){return{name:t.name,value:e.replace(fn,"\r\n")}}):{name:t.name,value:n.replace(fn,"\r\n")}}).get()}}),x.param=function(e,n){var r,i=[],o=function(e,t){t=x.isFunction(t)?t():null==t?"":t,i[i.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};if(n===t&&(n=x.ajaxSettings&&x.ajaxSettings.traditional),x.isArray(e)||e.jquery&&!x.isPlainObject(e))x.each(e,function(){o(this.name,this.value)});else for(r in e)gn(r,e[r],n,o);return i.join("&").replace(cn,"+")};function gn(e,t,n,r){var i;if(x.isArray(t))x.each(t,function(t,i){n||pn.test(e)?r(e,i):gn(e+"["+("object"==typeof i?t:"")+"]",i,n,r)});else if(n||"object"!==x.type(t))r(e,t);else for(i in t)gn(e+"["+i+"]",t[i],n,r)}x.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(e,t){x.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}),x.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)},bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)}});var mn,yn,vn=x.now(),bn=/\?/,xn=/#.*$/,wn=/([?&])_=[^&]*/,Tn=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Cn=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Nn=/^(?:GET|HEAD)$/,kn=/^\/\//,En=/^([\w.+-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,Sn=x.fn.load,An={},jn={},Dn="*/".concat("*");try{yn=o.href}catch(Ln){yn=a.createElement("a"),yn.href="",yn=yn.href}mn=En.exec(yn.toLowerCase())||[];function Hn(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var r,i=0,o=t.toLowerCase().match(T)||[];if(x.isFunction(n))while(r=o[i++])"+"===r[0]?(r=r.slice(1)||"*",(e[r]=e[r]||[]).unshift(n)):(e[r]=e[r]||[]).push(n)}}function qn(e,n,r,i){var o={},a=e===jn;function s(l){var u;return o[l]=!0,x.each(e[l]||[],function(e,l){var c=l(n,r,i);return"string"!=typeof c||a||o[c]?a?!(u=c):t:(n.dataTypes.unshift(c),s(c),!1)}),u}return s(n.dataTypes[0])||!o["*"]&&s("*")}function _n(e,n){var r,i,o=x.ajaxSettings.flatOptions||{};for(i in n)n[i]!==t&&((o[i]?e:r||(r={}))[i]=n[i]);return r&&x.extend(!0,e,r),e}x.fn.load=function(e,n,r){if("string"!=typeof e&&Sn)return Sn.apply(this,arguments);var i,o,a,s=this,l=e.indexOf(" ");return l>=0&&(i=e.slice(l,e.length),e=e.slice(0,l)),x.isFunction(n)?(r=n,n=t):n&&"object"==typeof n&&(a="POST"),s.length>0&&x.ajax({url:e,type:a,dataType:"html",data:n}).done(function(e){o=arguments,s.html(i?x("<div>").append(x.parseHTML(e)).find(i):e)}).complete(r&&function(e,t){s.each(r,o||[e.responseText,t,e])}),this},x.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){x.fn[t]=function(e){return this.on(t,e)}}),x.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:yn,type:"GET",isLocal:Cn.test(mn[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Dn,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":x.parseJSON,"text xml":x.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?_n(_n(e,x.ajaxSettings),t):_n(x.ajaxSettings,e)},ajaxPrefilter:Hn(An),ajaxTransport:Hn(jn),ajax:function(e,n){"object"==typeof e&&(n=e,e=t),n=n||{};var r,i,o,a,s,l,u,c,p=x.ajaxSetup({},n),f=p.context||p,d=p.context&&(f.nodeType||f.jquery)?x(f):x.event,h=x.Deferred(),g=x.Callbacks("once memory"),m=p.statusCode||{},y={},v={},b=0,w="canceled",C={readyState:0,getResponseHeader:function(e){var t;if(2===b){if(!c){c={};while(t=Tn.exec(a))c[t[1].toLowerCase()]=t[2]}t=c[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return 2===b?a:null},setRequestHeader:function(e,t){var n=e.toLowerCase();return b||(e=v[n]=v[n]||e,y[e]=t),this},overrideMimeType:function(e){return b||(p.mimeType=e),this},statusCode:function(e){var t;if(e)if(2>b)for(t in e)m[t]=[m[t],e[t]];else C.always(e[C.status]);return this},abort:function(e){var t=e||w;return u&&u.abort(t),k(0,t),this}};if(h.promise(C).complete=g.add,C.success=C.done,C.error=C.fail,p.url=((e||p.url||yn)+"").replace(xn,"").replace(kn,mn[1]+"//"),p.type=n.method||n.type||p.method||p.type,p.dataTypes=x.trim(p.dataType||"*").toLowerCase().match(T)||[""],null==p.crossDomain&&(r=En.exec(p.url.toLowerCase()),p.crossDomain=!(!r||r[1]===mn[1]&&r[2]===mn[2]&&(r[3]||("http:"===r[1]?"80":"443"))===(mn[3]||("http:"===mn[1]?"80":"443")))),p.data&&p.processData&&"string"!=typeof p.data&&(p.data=x.param(p.data,p.traditional)),qn(An,p,n,C),2===b)return C;l=p.global,l&&0===x.active++&&x.event.trigger("ajaxStart"),p.type=p.type.toUpperCase(),p.hasContent=!Nn.test(p.type),o=p.url,p.hasContent||(p.data&&(o=p.url+=(bn.test(o)?"&":"?")+p.data,delete p.data),p.cache===!1&&(p.url=wn.test(o)?o.replace(wn,"$1_="+vn++):o+(bn.test(o)?"&":"?")+"_="+vn++)),p.ifModified&&(x.lastModified[o]&&C.setRequestHeader("If-Modified-Since",x.lastModified[o]),x.etag[o]&&C.setRequestHeader("If-None-Match",x.etag[o])),(p.data&&p.hasContent&&p.contentType!==!1||n.contentType)&&C.setRequestHeader("Content-Type",p.contentType),C.setRequestHeader("Accept",p.dataTypes[0]&&p.accepts[p.dataTypes[0]]?p.accepts[p.dataTypes[0]]+("*"!==p.dataTypes[0]?", "+Dn+"; q=0.01":""):p.accepts["*"]);for(i in p.headers)C.setRequestHeader(i,p.headers[i]);if(p.beforeSend&&(p.beforeSend.call(f,C,p)===!1||2===b))return C.abort();w="abort";for(i in{success:1,error:1,complete:1})C[i](p[i]);if(u=qn(jn,p,n,C)){C.readyState=1,l&&d.trigger("ajaxSend",[C,p]),p.async&&p.timeout>0&&(s=setTimeout(function(){C.abort("timeout")},p.timeout));try{b=1,u.send(y,k)}catch(N){if(!(2>b))throw N;k(-1,N)}}else k(-1,"No Transport");function k(e,n,r,i){var c,y,v,w,T,N=n;2!==b&&(b=2,s&&clearTimeout(s),u=t,a=i||"",C.readyState=e>0?4:0,c=e>=200&&300>e||304===e,r&&(w=Mn(p,C,r)),w=On(p,w,C,c),c?(p.ifModified&&(T=C.getResponseHeader("Last-Modified"),T&&(x.lastModified[o]=T),T=C.getResponseHeader("etag"),T&&(x.etag[o]=T)),204===e||"HEAD"===p.type?N="nocontent":304===e?N="notmodified":(N=w.state,y=w.data,v=w.error,c=!v)):(v=N,(e||!N)&&(N="error",0>e&&(e=0))),C.status=e,C.statusText=(n||N)+"",c?h.resolveWith(f,[y,N,C]):h.rejectWith(f,[C,N,v]),C.statusCode(m),m=t,l&&d.trigger(c?"ajaxSuccess":"ajaxError",[C,p,c?y:v]),g.fireWith(f,[C,N]),l&&(d.trigger("ajaxComplete",[C,p]),--x.active||x.event.trigger("ajaxStop")))}return C},getJSON:function(e,t,n){return x.get(e,t,n,"json")},getScript:function(e,n){return x.get(e,t,n,"script")}}),x.each(["get","post"],function(e,n){x[n]=function(e,r,i,o){return x.isFunction(r)&&(o=o||i,i=r,r=t),x.ajax({url:e,type:n,dataType:o,data:r,success:i})}});function Mn(e,n,r){var i,o,a,s,l=e.contents,u=e.dataTypes;while("*"===u[0])u.shift(),o===t&&(o=e.mimeType||n.getResponseHeader("Content-Type"));if(o)for(s in l)if(l[s]&&l[s].test(o)){u.unshift(s);break}if(u[0]in r)a=u[0];else{for(s in r){if(!u[0]||e.converters[s+" "+u[0]]){a=s;break}i||(i=s)}a=a||i}return a?(a!==u[0]&&u.unshift(a),r[a]):t}function On(e,t,n,r){var i,o,a,s,l,u={},c=e.dataTypes.slice();if(c[1])for(a in e.converters)u[a.toLowerCase()]=e.converters[a];o=c.shift();while(o)if(e.responseFields[o]&&(n[e.responseFields[o]]=t),!l&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),l=o,o=c.shift())if("*"===o)o=l;else if("*"!==l&&l!==o){if(a=u[l+" "+o]||u["* "+o],!a)for(i in u)if(s=i.split(" "),s[1]===o&&(a=u[l+" "+s[0]]||u["* "+s[0]])){a===!0?a=u[i]:u[i]!==!0&&(o=s[0],c.unshift(s[1]));break}if(a!==!0)if(a&&e["throws"])t=a(t);else try{t=a(t)}catch(p){return{state:"parsererror",error:a?p:"No conversion from "+l+" to "+o}}}return{state:"success",data:t}}x.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(e){return x.globalEval(e),e}}}),x.ajaxPrefilter("script",function(e){e.cache===t&&(e.cache=!1),e.crossDomain&&(e.type="GET",e.global=!1)}),x.ajaxTransport("script",function(e){if(e.crossDomain){var n,r=a.head||x("head")[0]||a.documentElement;return{send:function(t,i){n=a.createElement("script"),n.async=!0,e.scriptCharset&&(n.charset=e.scriptCharset),n.src=e.url,n.onload=n.onreadystatechange=function(e,t){(t||!n.readyState||/loaded|complete/.test(n.readyState))&&(n.onload=n.onreadystatechange=null,n.parentNode&&n.parentNode.removeChild(n),n=null,t||i(200,"success"))},r.insertBefore(n,r.firstChild)},abort:function(){n&&n.onload(t,!0)}}}});var Fn=[],Bn=/(=)\?(?=&|$)|\?\?/;x.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Fn.pop()||x.expando+"_"+vn++;return this[e]=!0,e}}),x.ajaxPrefilter("json jsonp",function(n,r,i){var o,a,s,l=n.jsonp!==!1&&(Bn.test(n.url)?"url":"string"==typeof n.data&&!(n.contentType||"").indexOf("application/x-www-form-urlencoded")&&Bn.test(n.data)&&"data");return l||"jsonp"===n.dataTypes[0]?(o=n.jsonpCallback=x.isFunction(n.jsonpCallback)?n.jsonpCallback():n.jsonpCallback,l?n[l]=n[l].replace(Bn,"$1"+o):n.jsonp!==!1&&(n.url+=(bn.test(n.url)?"&":"?")+n.jsonp+"="+o),n.converters["script json"]=function(){return s||x.error(o+" was not called"),s[0]},n.dataTypes[0]="json",a=e[o],e[o]=function(){s=arguments},i.always(function(){e[o]=a,n[o]&&(n.jsonpCallback=r.jsonpCallback,Fn.push(o)),s&&x.isFunction(a)&&a(s[0]),s=a=t}),"script"):t});var Pn,Rn,Wn=0,$n=e.ActiveXObject&&function(){var e;for(e in Pn)Pn[e](t,!0)};function In(){try{return new e.XMLHttpRequest}catch(t){}}function zn(){try{return new e.ActiveXObject("Microsoft.XMLHTTP")}catch(t){}}x.ajaxSettings.xhr=e.ActiveXObject?function(){return!this.isLocal&&In()||zn()}:In,Rn=x.ajaxSettings.xhr(),x.support.cors=!!Rn&&"withCredentials"in Rn,Rn=x.support.ajax=!!Rn,Rn&&x.ajaxTransport(function(n){if(!n.crossDomain||x.support.cors){var r;return{send:function(i,o){var a,s,l=n.xhr();if(n.username?l.open(n.type,n.url,n.async,n.username,n.password):l.open(n.type,n.url,n.async),n.xhrFields)for(s in n.xhrFields)l[s]=n.xhrFields[s];n.mimeType&&l.overrideMimeType&&l.overrideMimeType(n.mimeType),n.crossDomain||i["X-Requested-With"]||(i["X-Requested-With"]="XMLHttpRequest");try{for(s in i)l.setRequestHeader(s,i[s])}catch(u){}l.send(n.hasContent&&n.data||null),r=function(e,i){var s,u,c,p;try{if(r&&(i||4===l.readyState))if(r=t,a&&(l.onreadystatechange=x.noop,$n&&delete Pn[a]),i)4!==l.readyState&&l.abort();else{p={},s=l.status,u=l.getAllResponseHeaders(),"string"==typeof l.responseText&&(p.text=l.responseText);try{c=l.statusText}catch(f){c=""}s||!n.isLocal||n.crossDomain?1223===s&&(s=204):s=p.text?200:404}}catch(d){i||o(-1,d)}p&&o(s,c,p,u)},n.async?4===l.readyState?setTimeout(r):(a=++Wn,$n&&(Pn||(Pn={},x(e).unload($n)),Pn[a]=r),l.onreadystatechange=r):r()},abort:function(){r&&r(t,!0)}}}});var Xn,Un,Vn=/^(?:toggle|show|hide)$/,Yn=RegExp("^(?:([+-])=|)("+w+")([a-z%]*)$","i"),Jn=/queueHooks$/,Gn=[nr],Qn={"*":[function(e,t){var n=this.createTween(e,t),r=n.cur(),i=Yn.exec(t),o=i&&i[3]||(x.cssNumber[e]?"":"px"),a=(x.cssNumber[e]||"px"!==o&&+r)&&Yn.exec(x.css(n.elem,e)),s=1,l=20;if(a&&a[3]!==o){o=o||a[3],i=i||[],a=+r||1;do s=s||".5",a/=s,x.style(n.elem,e,a+o);while(s!==(s=n.cur()/r)&&1!==s&&--l)}return i&&(a=n.start=+a||+r||0,n.unit=o,n.end=i[1]?a+(i[1]+1)*i[2]:+i[2]),n}]};function Kn(){return setTimeout(function(){Xn=t}),Xn=x.now()}function Zn(e,t,n){var r,i=(Qn[t]||[]).concat(Qn["*"]),o=0,a=i.length;for(;a>o;o++)if(r=i[o].call(n,t,e))return r}function er(e,t,n){var r,i,o=0,a=Gn.length,s=x.Deferred().always(function(){delete l.elem}),l=function(){if(i)return!1;var t=Xn||Kn(),n=Math.max(0,u.startTime+u.duration-t),r=n/u.duration||0,o=1-r,a=0,l=u.tweens.length;for(;l>a;a++)u.tweens[a].run(o);return s.notifyWith(e,[u,o,n]),1>o&&l?n:(s.resolveWith(e,[u]),!1)},u=s.promise({elem:e,props:x.extend({},t),opts:x.extend(!0,{specialEasing:{}},n),originalProperties:t,originalOptions:n,startTime:Xn||Kn(),duration:n.duration,tweens:[],createTween:function(t,n){var r=x.Tween(e,u.opts,t,n,u.opts.specialEasing[t]||u.opts.easing);return u.tweens.push(r),r},stop:function(t){var n=0,r=t?u.tweens.length:0;if(i)return this;for(i=!0;r>n;n++)u.tweens[n].run(1);return t?s.resolveWith(e,[u,t]):s.rejectWith(e,[u,t]),this}}),c=u.props;for(tr(c,u.opts.specialEasing);a>o;o++)if(r=Gn[o].call(u,e,c,u.opts))return r;return x.map(c,Zn,u),x.isFunction(u.opts.start)&&u.opts.start.call(e,u),x.fx.timer(x.extend(l,{elem:e,anim:u,queue:u.opts.queue})),u.progress(u.opts.progress).done(u.opts.done,u.opts.complete).fail(u.opts.fail).always(u.opts.always)}function tr(e,t){var n,r,i,o,a;for(n in e)if(r=x.camelCase(n),i=t[r],o=e[n],x.isArray(o)&&(i=o[1],o=e[n]=o[0]),n!==r&&(e[r]=o,delete e[n]),a=x.cssHooks[r],a&&"expand"in a){o=a.expand(o),delete e[r];for(n in o)n in e||(e[n]=o[n],t[n]=i)}else t[r]=i}x.Animation=x.extend(er,{tweener:function(e,t){x.isFunction(e)?(t=e,e=["*"]):e=e.split(" ");var n,r=0,i=e.length;for(;i>r;r++)n=e[r],Qn[n]=Qn[n]||[],Qn[n].unshift(t)},prefilter:function(e,t){t?Gn.unshift(e):Gn.push(e)}});function nr(e,t,n){var r,i,o,a,s,l,u=this,c={},p=e.style,f=e.nodeType&&nn(e),d=x._data(e,"fxshow");n.queue||(s=x._queueHooks(e,"fx"),null==s.unqueued&&(s.unqueued=0,l=s.empty.fire,s.empty.fire=function(){s.unqueued||l()}),s.unqueued++,u.always(function(){u.always(function(){s.unqueued--,x.queue(e,"fx").length||s.empty.fire()})})),1===e.nodeType&&("height"in t||"width"in t)&&(n.overflow=[p.overflow,p.overflowX,p.overflowY],"inline"===x.css(e,"display")&&"none"===x.css(e,"float")&&(x.support.inlineBlockNeedsLayout&&"inline"!==ln(e.nodeName)?p.zoom=1:p.display="inline-block")),n.overflow&&(p.overflow="hidden",x.support.shrinkWrapBlocks||u.always(function(){p.overflow=n.overflow[0],p.overflowX=n.overflow[1],p.overflowY=n.overflow[2]}));for(r in t)if(i=t[r],Vn.exec(i)){if(delete t[r],o=o||"toggle"===i,i===(f?"hide":"show"))continue;c[r]=d&&d[r]||x.style(e,r)}if(!x.isEmptyObject(c)){d?"hidden"in d&&(f=d.hidden):d=x._data(e,"fxshow",{}),o&&(d.hidden=!f),f?x(e).show():u.done(function(){x(e).hide()}),u.done(function(){var t;x._removeData(e,"fxshow");for(t in c)x.style(e,t,c[t])});for(r in c)a=Zn(f?d[r]:0,r,u),r in d||(d[r]=a.start,f&&(a.end=a.start,a.start="width"===r||"height"===r?1:0))}}function rr(e,t,n,r,i){return new rr.prototype.init(e,t,n,r,i)}x.Tween=rr,rr.prototype={constructor:rr,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||"swing",this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(x.cssNumber[n]?"":"px")},cur:function(){var e=rr.propHooks[this.prop];return e&&e.get?e.get(this):rr.propHooks._default.get(this)},run:function(e){var t,n=rr.propHooks[this.prop];return this.pos=t=this.options.duration?x.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):rr.propHooks._default.set(this),this}},rr.prototype.init.prototype=rr.prototype,rr.propHooks={_default:{get:function(e){var t;return null==e.elem[e.prop]||e.elem.style&&null!=e.elem.style[e.prop]?(t=x.css(e.elem,e.prop,""),t&&"auto"!==t?t:0):e.elem[e.prop]},set:function(e){x.fx.step[e.prop]?x.fx.step[e.prop](e):e.elem.style&&(null!=e.elem.style[x.cssProps[e.prop]]||x.cssHooks[e.prop])?x.style(e.elem,e.prop,e.now+e.unit):e.elem[e.prop]=e.now}}},rr.propHooks.scrollTop=rr.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},x.each(["toggle","show","hide"],function(e,t){var n=x.fn[t];x.fn[t]=function(e,r,i){return null==e||"boolean"==typeof e?n.apply(this,arguments):this.animate(ir(t,!0),e,r,i)}}),x.fn.extend({fadeTo:function(e,t,n,r){return this.filter(nn).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(e,t,n,r){var i=x.isEmptyObject(e),o=x.speed(t,n,r),a=function(){var t=er(this,x.extend({},e),o);(i||x._data(this,"finish"))&&t.stop(!0)};return a.finish=a,i||o.queue===!1?this.each(a):this.queue(o.queue,a)},stop:function(e,n,r){var i=function(e){var t=e.stop;delete e.stop,t(r)};return"string"!=typeof e&&(r=n,n=e,e=t),n&&e!==!1&&this.queue(e||"fx",[]),this.each(function(){var t=!0,n=null!=e&&e+"queueHooks",o=x.timers,a=x._data(this);if(n)a[n]&&a[n].stop&&i(a[n]);else for(n in a)a[n]&&a[n].stop&&Jn.test(n)&&i(a[n]);for(n=o.length;n--;)o[n].elem!==this||null!=e&&o[n].queue!==e||(o[n].anim.stop(r),t=!1,o.splice(n,1));(t||!r)&&x.dequeue(this,e)})},finish:function(e){return e!==!1&&(e=e||"fx"),this.each(function(){var t,n=x._data(this),r=n[e+"queue"],i=n[e+"queueHooks"],o=x.timers,a=r?r.length:0;for(n.finish=!0,x.queue(this,e,[]),i&&i.stop&&i.stop.call(this,!0),t=o.length;t--;)o[t].elem===this&&o[t].queue===e&&(o[t].anim.stop(!0),o.splice(t,1));for(t=0;a>t;t++)r[t]&&r[t].finish&&r[t].finish.call(this);delete n.finish})}});function ir(e,t){var n,r={height:e},i=0;for(t=t?1:0;4>i;i+=2-t)n=Zt[i],r["margin"+n]=r["padding"+n]=e;return t&&(r.opacity=r.width=e),r}x.each({slideDown:ir("show"),slideUp:ir("hide"),slideToggle:ir("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){x.fn[e]=function(e,n,r){return this.animate(t,e,n,r)}}),x.speed=function(e,t,n){var r=e&&"object"==typeof e?x.extend({},e):{complete:n||!n&&t||x.isFunction(e)&&e,duration:e,easing:n&&t||t&&!x.isFunction(t)&&t};return r.duration=x.fx.off?0:"number"==typeof r.duration?r.duration:r.duration in x.fx.speeds?x.fx.speeds[r.duration]:x.fx.speeds._default,(null==r.queue||r.queue===!0)&&(r.queue="fx"),r.old=r.complete,r.complete=function(){x.isFunction(r.old)&&r.old.call(this),r.queue&&x.dequeue(this,r.queue)},r},x.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2}},x.timers=[],x.fx=rr.prototype.init,x.fx.tick=function(){var e,n=x.timers,r=0;for(Xn=x.now();n.length>r;r++)e=n[r],e()||n[r]!==e||n.splice(r--,1);n.length||x.fx.stop(),Xn=t},x.fx.timer=function(e){e()&&x.timers.push(e)&&x.fx.start()},x.fx.interval=13,x.fx.start=function(){Un||(Un=setInterval(x.fx.tick,x.fx.interval))},x.fx.stop=function(){clearInterval(Un),Un=null},x.fx.speeds={slow:600,fast:200,_default:400},x.fx.step={},x.expr&&x.expr.filters&&(x.expr.filters.animated=function(e){return x.grep(x.timers,function(t){return e===t.elem}).length}),x.fn.offset=function(e){if(arguments.length)return e===t?this:this.each(function(t){x.offset.setOffset(this,e,t)});var n,r,o={top:0,left:0},a=this[0],s=a&&a.ownerDocument;if(s)return n=s.documentElement,x.contains(n,a)?(typeof a.getBoundingClientRect!==i&&(o=a.getBoundingClientRect()),r=or(s),{top:o.top+(r.pageYOffset||n.scrollTop)-(n.clientTop||0),left:o.left+(r.pageXOffset||n.scrollLeft)-(n.clientLeft||0)}):o},x.offset={setOffset:function(e,t,n){var r=x.css(e,"position");"static"===r&&(e.style.position="relative");var i=x(e),o=i.offset(),a=x.css(e,"top"),s=x.css(e,"left"),l=("absolute"===r||"fixed"===r)&&x.inArray("auto",[a,s])>-1,u={},c={},p,f;l?(c=i.position(),p=c.top,f=c.left):(p=parseFloat(a)||0,f=parseFloat(s)||0),x.isFunction(t)&&(t=t.call(e,n,o)),null!=t.top&&(u.top=t.top-o.top+p),null!=t.left&&(u.left=t.left-o.left+f),"using"in t?t.using.call(e,u):i.css(u)}},x.fn.extend({position:function(){if(this[0]){var e,t,n={top:0,left:0},r=this[0];return"fixed"===x.css(r,"position")?t=r.getBoundingClientRect():(e=this.offsetParent(),t=this.offset(),x.nodeName(e[0],"html")||(n=e.offset()),n.top+=x.css(e[0],"borderTopWidth",!0),n.left+=x.css(e[0],"borderLeftWidth",!0)),{top:t.top-n.top-x.css(r,"marginTop",!0),left:t.left-n.left-x.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent||s;while(e&&!x.nodeName(e,"html")&&"static"===x.css(e,"position"))e=e.offsetParent;return e||s})}}),x.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,n){var r=/Y/.test(n);x.fn[e]=function(i){return x.access(this,function(e,i,o){var a=or(e);return o===t?a?n in a?a[n]:a.document.documentElement[i]:e[i]:(a?a.scrollTo(r?x(a).scrollLeft():o,r?o:x(a).scrollTop()):e[i]=o,t)},e,i,arguments.length,null)}});function or(e){return x.isWindow(e)?e:9===e.nodeType?e.defaultView||e.parentWindow:!1}x.each({Height:"height",Width:"width"},function(e,n){x.each({padding:"inner"+e,content:n,"":"outer"+e},function(r,i){x.fn[i]=function(i,o){var a=arguments.length&&(r||"boolean"!=typeof i),s=r||(i===!0||o===!0?"margin":"border");return x.access(this,function(n,r,i){var o;return x.isWindow(n)?n.document.documentElement["client"+e]:9===n.nodeType?(o=n.documentElement,Math.max(n.body["scroll"+e],o["scroll"+e],n.body["offset"+e],o["offset"+e],o["client"+e])):i===t?x.css(n,r,s):x.style(n,r,i,s)},n,a?i:t,a,null)}})}),x.fn.size=function(){return this.length},x.fn.andSelf=x.fn.addBack,"object"==typeof module&&module&&"object"==typeof module.exports?module.exports=x:(e.jQuery=e.$=x,"function"==typeof define&&define.amd&&define("jquery",[],function(){return x}))})(window);
/*! jQuery Migrate v1.2.1 | (c) 2005, 2013 jQuery Foundation, Inc. and other contributors | jquery.org/license */
jQuery.migrateMute===void 0&&(jQuery.migrateMute=!0),function(e,t,n){function r(n){var r=t.console;i[n]||(i[n]=!0,e.migrateWarnings.push(n),r&&r.warn&&!e.migrateMute&&(r.warn("JQMIGRATE: "+n),e.migrateTrace&&r.trace&&r.trace()))}function a(t,a,i,o){if(Object.defineProperty)try{return Object.defineProperty(t,a,{configurable:!0,enumerable:!0,get:function(){return r(o),i},set:function(e){r(o),i=e}}),n}catch(s){}e._definePropertyBroken=!0,t[a]=i}var i={};e.migrateWarnings=[],!e.migrateMute&&t.console&&t.console.log&&t.console.log("JQMIGRATE: Logging is active"),e.migrateTrace===n&&(e.migrateTrace=!0),e.migrateReset=function(){i={},e.migrateWarnings.length=0},"BackCompat"===document.compatMode&&r("jQuery is not compatible with Quirks Mode");var o=e("<input/>",{size:1}).attr("size")&&e.attrFn,s=e.attr,u=e.attrHooks.value&&e.attrHooks.value.get||function(){return null},c=e.attrHooks.value&&e.attrHooks.value.set||function(){return n},l=/^(?:input|button)$/i,d=/^[238]$/,p=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,f=/^(?:checked|selected)$/i;a(e,"attrFn",o||{},"jQuery.attrFn is deprecated"),e.attr=function(t,a,i,u){var c=a.toLowerCase(),g=t&&t.nodeType;return u&&(4>s.length&&r("jQuery.fn.attr( props, pass ) is deprecated"),t&&!d.test(g)&&(o?a in o:e.isFunction(e.fn[a])))?e(t)[a](i):("type"===a&&i!==n&&l.test(t.nodeName)&&t.parentNode&&r("Can't change the 'type' of an input or button in IE 6/7/8"),!e.attrHooks[c]&&p.test(c)&&(e.attrHooks[c]={get:function(t,r){var a,i=e.prop(t,r);return i===!0||"boolean"!=typeof i&&(a=t.getAttributeNode(r))&&a.nodeValue!==!1?r.toLowerCase():n},set:function(t,n,r){var a;return n===!1?e.removeAttr(t,r):(a=e.propFix[r]||r,a in t&&(t[a]=!0),t.setAttribute(r,r.toLowerCase())),r}},f.test(c)&&r("jQuery.fn.attr('"+c+"') may use property instead of attribute")),s.call(e,t,a,i))},e.attrHooks.value={get:function(e,t){var n=(e.nodeName||"").toLowerCase();return"button"===n?u.apply(this,arguments):("input"!==n&&"option"!==n&&r("jQuery.fn.attr('value') no longer gets properties"),t in e?e.value:null)},set:function(e,t){var a=(e.nodeName||"").toLowerCase();return"button"===a?c.apply(this,arguments):("input"!==a&&"option"!==a&&r("jQuery.fn.attr('value', val) no longer sets properties"),e.value=t,n)}};var g,h,v=e.fn.init,m=e.parseJSON,y=/^([^<]*)(<[\w\W]+>)([^>]*)$/;e.fn.init=function(t,n,a){var i;return t&&"string"==typeof t&&!e.isPlainObject(n)&&(i=y.exec(e.trim(t)))&&i[0]&&("<"!==t.charAt(0)&&r("$(html) HTML strings must start with '<' character"),i[3]&&r("$(html) HTML text after last tag is ignored"),"#"===i[0].charAt(0)&&(r("HTML string cannot start with a '#' character"),e.error("JQMIGRATE: Invalid selector string (XSS)")),n&&n.context&&(n=n.context),e.parseHTML)?v.call(this,e.parseHTML(i[2],n,!0),n,a):v.apply(this,arguments)},e.fn.init.prototype=e.fn,e.parseJSON=function(e){return e||null===e?m.apply(this,arguments):(r("jQuery.parseJSON requires a valid JSON string"),null)},e.uaMatch=function(e){e=e.toLowerCase();var t=/(chrome)[ \/]([\w.]+)/.exec(e)||/(webkit)[ \/]([\w.]+)/.exec(e)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(e)||/(msie) ([\w.]+)/.exec(e)||0>e.indexOf("compatible")&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(e)||[];return{browser:t[1]||"",version:t[2]||"0"}},e.browser||(g=e.uaMatch(navigator.userAgent),h={},g.browser&&(h[g.browser]=!0,h.version=g.version),h.chrome?h.webkit=!0:h.webkit&&(h.safari=!0),e.browser=h),a(e,"browser",e.browser,"jQuery.browser is deprecated"),e.sub=function(){function t(e,n){return new t.fn.init(e,n)}e.extend(!0,t,this),t.superclass=this,t.fn=t.prototype=this(),t.fn.constructor=t,t.sub=this.sub,t.fn.init=function(r,a){return a&&a instanceof e&&!(a instanceof t)&&(a=t(a)),e.fn.init.call(this,r,a,n)},t.fn.init.prototype=t.fn;var n=t(document);return r("jQuery.sub() is deprecated"),t},e.ajaxSetup({converters:{"text json":e.parseJSON}});var b=e.fn.data;e.fn.data=function(t){var a,i,o=this[0];return!o||"events"!==t||1!==arguments.length||(a=e.data(o,t),i=e._data(o,t),a!==n&&a!==i||i===n)?b.apply(this,arguments):(r("Use of jQuery.fn.data('events') is deprecated"),i)};var j=/\/(java|ecma)script/i,w=e.fn.andSelf||e.fn.addBack;e.fn.andSelf=function(){return r("jQuery.fn.andSelf() replaced by jQuery.fn.addBack()"),w.apply(this,arguments)},e.clean||(e.clean=function(t,a,i,o){a=a||document,a=!a.nodeType&&a[0]||a,a=a.ownerDocument||a,r("jQuery.clean() is deprecated");var s,u,c,l,d=[];if(e.merge(d,e.buildFragment(t,a).childNodes),i)for(c=function(e){return!e.type||j.test(e.type)?o?o.push(e.parentNode?e.parentNode.removeChild(e):e):i.appendChild(e):n},s=0;null!=(u=d[s]);s++)e.nodeName(u,"script")&&c(u)||(i.appendChild(u),u.getElementsByTagName!==n&&(l=e.grep(e.merge([],u.getElementsByTagName("script")),c),d.splice.apply(d,[s+1,0].concat(l)),s+=l.length));return d});var Q=e.event.add,x=e.event.remove,k=e.event.trigger,N=e.fn.toggle,T=e.fn.live,M=e.fn.die,S="ajaxStart|ajaxStop|ajaxSend|ajaxComplete|ajaxError|ajaxSuccess",C=RegExp("\\b(?:"+S+")\\b"),H=/(?:^|\s)hover(\.\S+|)\b/,A=function(t){return"string"!=typeof t||e.event.special.hover?t:(H.test(t)&&r("'hover' pseudo-event is deprecated, use 'mouseenter mouseleave'"),t&&t.replace(H,"mouseenter$1 mouseleave$1"))};e.event.props&&"attrChange"!==e.event.props[0]&&e.event.props.unshift("attrChange","attrName","relatedNode","srcElement"),e.event.dispatch&&a(e.event,"handle",e.event.dispatch,"jQuery.event.handle is undocumented and deprecated"),e.event.add=function(e,t,n,a,i){e!==document&&C.test(t)&&r("AJAX events should be attached to document: "+t),Q.call(this,e,A(t||""),n,a,i)},e.event.remove=function(e,t,n,r,a){x.call(this,e,A(t)||"",n,r,a)},e.fn.error=function(){var e=Array.prototype.slice.call(arguments,0);return r("jQuery.fn.error() is deprecated"),e.splice(0,0,"error"),arguments.length?this.bind.apply(this,e):(this.triggerHandler.apply(this,e),this)},e.fn.toggle=function(t,n){if(!e.isFunction(t)||!e.isFunction(n))return N.apply(this,arguments);r("jQuery.fn.toggle(handler, handler...) is deprecated");var a=arguments,i=t.guid||e.guid++,o=0,s=function(n){var r=(e._data(this,"lastToggle"+t.guid)||0)%o;return e._data(this,"lastToggle"+t.guid,r+1),n.preventDefault(),a[r].apply(this,arguments)||!1};for(s.guid=i;a.length>o;)a[o++].guid=i;return this.click(s)},e.fn.live=function(t,n,a){return r("jQuery.fn.live() is deprecated"),T?T.apply(this,arguments):(e(this.context).on(t,this.selector,n,a),this)},e.fn.die=function(t,n){return r("jQuery.fn.die() is deprecated"),M?M.apply(this,arguments):(e(this.context).off(t,this.selector||"**",n),this)},e.event.trigger=function(e,t,n,a){return n||C.test(e)||r("Global events are undocumented and deprecated"),k.call(this,e,t,n||document,a)},e.each(S.split("|"),function(t,n){e.event.special[n]={setup:function(){var t=this;return t!==document&&(e.event.add(document,n+"."+e.guid,function(){e.event.trigger(n,null,t,!0)}),e._data(this,n,e.guid++)),!1},teardown:function(){return this!==document&&e.event.remove(document,n+"."+e._data(this,n)),!1}}})}(jQuery,window);
/*
 *  Copyright 2011 Twitter, Inc.
 *  Licensed under the Apache License, Version 2.0 (the "License");
 *  you may not use this file except in compliance with the License.
 *  You may obtain a copy of the License at
 *
 *  http://www.apache.org/licenses/LICENSE-2.0
 *
 *  Unless required by applicable law or agreed to in writing, software
 *  distributed under the License is distributed on an "AS IS" BASIS,
 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *  See the License for the specific language governing permissions and
 *  limitations under the License.
 */



var Hogan = {};

(function (Hogan, useArrayBuffer) {
  Hogan.Template = function (renderFunc, text, compiler, options) {
    this.r = renderFunc || this.r;
    this.c = compiler;
    this.options = options;
    this.text = text || '';
    this.buf = (useArrayBuffer) ? [] : '';
  }

  Hogan.Template.prototype = {
    // render: replaced by generated code.
    r: function (context, partials, indent) { return ''; },

    // variable escaping
    v: hoganEscape,

    // triple stache
    t: coerceToString,

    render: function render(context, partials, indent) {
      return this.ri([context], partials || {}, indent);
    },

    // render internal -- a hook for overrides that catches partials too
    ri: function (context, partials, indent) {
      return this.r(context, partials, indent);
    },

    // tries to find a partial in the curent scope and render it
    rp: function(name, context, partials, indent) {
      var partial = partials[name];

      if (!partial) {
        return '';
      }

      if (this.c && typeof partial == 'string') {
        partial = this.c.compile(partial, this.options);
      }

      return partial.ri(context, partials, indent);
    },

    // render a section
    rs: function(context, partials, section) {
      var tail = context[context.length - 1];

      if (!isArray(tail)) {
        section(context, partials, this);
        return;
      }

      for (var i = 0; i < tail.length; i++) {
        context.push(tail[i]);
        section(context, partials, this);
        context.pop();
      }
    },

    // maybe start a section
    s: function(val, ctx, partials, inverted, start, end, tags) {
      var pass;

      if (isArray(val) && val.length === 0) {
        return false;
      }

      if (typeof val == 'function') {
        val = this.ls(val, ctx, partials, inverted, start, end, tags);
      }

      pass = (val === '') || !!val;

      if (!inverted && pass && ctx) {
        ctx.push((typeof val == 'object') ? val : ctx[ctx.length - 1]);
      }

      return pass;
    },

    // find values with dotted names
    d: function(key, ctx, partials, returnFound) {
      var names = key.split('.'),
          val = this.f(names[0], ctx, partials, returnFound),
          cx = null;

      if (key === '.' && isArray(ctx[ctx.length - 2])) {
        return ctx[ctx.length - 1];
      }

      for (var i = 1; i < names.length; i++) {
        if (val && typeof val == 'object' && names[i] in val) {
          cx = val;
          val = val[names[i]];
        } else {
          val = '';
        }
      }

      if (returnFound && !val) {
        return false;
      }

      if (!returnFound && typeof val == 'function') {
        ctx.push(cx);
        val = this.lv(val, ctx, partials);
        ctx.pop();
      }

      return val;
    },

    // find values with normal names
    f: function(key, ctx, partials, returnFound) {
      var val = false,
          v = null,
          found = false;

      for (var i = ctx.length - 1; i >= 0; i--) {
        v = ctx[i];
        if (v && typeof v == 'object' && key in v) {
          val = v[key];
          found = true;
          break;
        }
      }

      if (!found) {
        return (returnFound) ? false : "";
      }

      if (!returnFound && typeof val == 'function') {
        val = this.lv(val, ctx, partials);
      }

      return val;
    },

    // higher order templates
    ho: function(val, cx, partials, text, tags) {
      var compiler = this.c;
      var options = this.options;
      options.delimiters = tags;
      var text = val.call(cx, text);
      text = (text == null) ? String(text) : text.toString();
      this.b(compiler.compile(text, options).render(cx, partials));
      return false;
    },

    // template result buffering
    b: (useArrayBuffer) ? function(s) { this.buf.push(s); } :
                          function(s) { this.buf += s; },
    fl: (useArrayBuffer) ? function() { var r = this.buf.join(''); this.buf = []; return r; } :
                           function() { var r = this.buf; this.buf = ''; return r; },

    // lambda replace section
    ls: function(val, ctx, partials, inverted, start, end, tags) {
      var cx = ctx[ctx.length - 1],
          t = null;

      if (!inverted && this.c && val.length > 0) {
        return this.ho(val, cx, partials, this.text.substring(start, end), tags);
      }

      t = val.call(cx);

      if (typeof t == 'function') {
        if (inverted) {
          return true;
        } else if (this.c) {
          return this.ho(t, cx, partials, this.text.substring(start, end), tags);
        }
      }

      return t;
    },

    // lambda replace variable
    lv: function(val, ctx, partials) {
      var cx = ctx[ctx.length - 1];
      var result = val.call(cx);

      if (typeof result == 'function') {
        result = coerceToString(result.call(cx));
        if (this.c && ~result.indexOf("{\u007B")) {
          return this.c.compile(result, this.options).render(cx, partials);
        }
      }

      return coerceToString(result);
    }

  };

  var rAmp = /&/g,
      rLt = /</g,
      rGt = />/g,
      rApos =/\'/g,
      rQuot = /\"/g,
      hChars =/[&<>\"\']/;


  function coerceToString(val) {
    return String((val === null || val === undefined) ? '' : val);
  }

  function hoganEscape(str) {
    str = coerceToString(str);
    return hChars.test(str) ?
      str
        .replace(rAmp,'&amp;')
        .replace(rLt,'&lt;')
        .replace(rGt,'&gt;')
        .replace(rApos,'&#39;')
        .replace(rQuot, '&quot;') :
      str;
  }

  var isArray = Array.isArray || function(a) {
    return Object.prototype.toString.call(a) === '[object Array]';
  };

})(typeof exports !== 'undefined' ? exports : Hogan);




(function (Hogan) {
  // Setup regex  assignments
  // remove whitespace according to Mustache spec
  var rIsWhitespace = /\S/,
      rQuot = /\"/g,
      rNewline =  /\n/g,
      rCr = /\r/g,
      rSlash = /\\/g,
      tagTypes = {
        '#': 1, '^': 2, '/': 3,  '!': 4, '>': 5,
        '<': 6, '=': 7, '_v': 8, '{': 9, '&': 10
      };

  Hogan.scan = function scan(text, delimiters) {
    var len = text.length,
        IN_TEXT = 0,
        IN_TAG_TYPE = 1,
        IN_TAG = 2,
        state = IN_TEXT,
        tagType = null,
        tag = null,
        buf = '',
        tokens = [],
        seenTag = false,
        i = 0,
        lineStart = 0,
        otag = '{{',
        ctag = '}}';

    function addBuf() {
      if (buf.length > 0) {
        tokens.push(new String(buf));
        buf = '';
      }
    }

    function lineIsWhitespace() {
      var isAllWhitespace = true;
      for (var j = lineStart; j < tokens.length; j++) {
        isAllWhitespace =
          (tokens[j].tag && tagTypes[tokens[j].tag] < tagTypes['_v']) ||
          (!tokens[j].tag && tokens[j].match(rIsWhitespace) === null);
        if (!isAllWhitespace) {
          return false;
        }
      }

      return isAllWhitespace;
    }

    function filterLine(haveSeenTag, noNewLine) {
      addBuf();

      if (haveSeenTag && lineIsWhitespace()) {
        for (var j = lineStart, next; j < tokens.length; j++) {
          if (!tokens[j].tag) {
            if ((next = tokens[j+1]) && next.tag == '>') {
              // set indent to token value
              next.indent = tokens[j].toString()
            }
            tokens.splice(j, 1);
          }
        }
      } else if (!noNewLine) {
        tokens.push({tag:'\n'});
      }

      seenTag = false;
      lineStart = tokens.length;
    }

    function changeDelimiters(text, index) {
      var close = '=' + ctag,
          closeIndex = text.indexOf(close, index),
          delimiters = trim(
            text.substring(text.indexOf('=', index) + 1, closeIndex)
          ).split(' ');

      otag = delimiters[0];
      ctag = delimiters[1];

      return closeIndex + close.length - 1;
    }

    if (delimiters) {
      delimiters = delimiters.split(' ');
      otag = delimiters[0];
      ctag = delimiters[1];
    }

    for (i = 0; i < len; i++) {
      if (state == IN_TEXT) {
        if (tagChange(otag, text, i)) {
          --i;
          addBuf();
          state = IN_TAG_TYPE;
        } else {
          if (text.charAt(i) == '\n') {
            filterLine(seenTag);
          } else {
            buf += text.charAt(i);
          }
        }
      } else if (state == IN_TAG_TYPE) {
        i += otag.length - 1;
        tag = tagTypes[text.charAt(i + 1)];
        tagType = tag ? text.charAt(i + 1) : '_v';
        if (tagType == '=') {
          i = changeDelimiters(text, i);
          state = IN_TEXT;
        } else {
          if (tag) {
            i++;
          }
          state = IN_TAG;
        }
        seenTag = i;
      } else {
        if (tagChange(ctag, text, i)) {
          tokens.push({tag: tagType, n: trim(buf), otag: otag, ctag: ctag,
                       i: (tagType == '/') ? seenTag - ctag.length : i + otag.length});
          buf = '';
          i += ctag.length - 1;
          state = IN_TEXT;
          if (tagType == '{') {
            if (ctag == '}}') {
              i++;
            } else {
              cleanTripleStache(tokens[tokens.length - 1]);
            }
          }
        } else {
          buf += text.charAt(i);
        }
      }
    }

    filterLine(seenTag, true);

    return tokens;
  }

  function cleanTripleStache(token) {
    if (token.n.substr(token.n.length - 1) === '}') {
      token.n = token.n.substring(0, token.n.length - 1);
    }
  }

  function trim(s) {
    if (s.trim) {
      return s.trim();
    }

    return s.replace(/^\s*|\s*$/g, '');
  }

  function tagChange(tag, text, index) {
    if (text.charAt(index) != tag.charAt(0)) {
      return false;
    }

    for (var i = 1, l = tag.length; i < l; i++) {
      if (text.charAt(index + i) != tag.charAt(i)) {
        return false;
      }
    }

    return true;
  }

  function buildTree(tokens, kind, stack, customTags) {
    var instructions = [],
        opener = null,
        token = null;

    while (tokens.length > 0) {
      token = tokens.shift();
      if (token.tag == '#' || token.tag == '^' || isOpener(token, customTags)) {
        stack.push(token);
        token.nodes = buildTree(tokens, token.tag, stack, customTags);
        instructions.push(token);
      } else if (token.tag == '/') {
        if (stack.length === 0) {
          throw new Error('Closing tag without opener: /' + token.n);
        }
        opener = stack.pop();
        if (token.n != opener.n && !isCloser(token.n, opener.n, customTags)) {
          throw new Error('Nesting error: ' + opener.n + ' vs. ' + token.n);
        }
        opener.end = token.i;
        return instructions;
      } else {
        instructions.push(token);
      }
    }

    if (stack.length > 0) {
      throw new Error('missing closing tag: ' + stack.pop().n);
    }

    return instructions;
  }

  function isOpener(token, tags) {
    for (var i = 0, l = tags.length; i < l; i++) {
      if (tags[i].o == token.n) {
        token.tag = '#';
        return true;
      }
    }
  }

  function isCloser(close, open, tags) {
    for (var i = 0, l = tags.length; i < l; i++) {
      if (tags[i].c == close && tags[i].o == open) {
        return true;
      }
    }
  }

  Hogan.generate = function (tree, text, options) {
    var code = 'var _=this;_.b(i=i||"");' + walk(tree) + 'return _.fl();';
    if (options.asString) {
      return 'function(c,p,i){' + code + ';}';
    }

    return new Hogan.Template(new Function('c', 'p', 'i', code), text, Hogan, options);
  }

  function esc(s) {
    return s.replace(rSlash, '\\\\')
            .replace(rQuot, '\\\"')
            .replace(rNewline, '\\n')
            .replace(rCr, '\\r');
  }

  function chooseMethod(s) {
    return (~s.indexOf('.')) ? 'd' : 'f';
  }

  function walk(tree) {
    var code = '';
    for (var i = 0, l = tree.length; i < l; i++) {
      var tag = tree[i].tag;
      if (tag == '#') {
        code += section(tree[i].nodes, tree[i].n, chooseMethod(tree[i].n),
                        tree[i].i, tree[i].end, tree[i].otag + " " + tree[i].ctag);
      } else if (tag == '^') {
        code += invertedSection(tree[i].nodes, tree[i].n,
                                chooseMethod(tree[i].n));
      } else if (tag == '<' || tag == '>') {
        code += partial(tree[i]);
      } else if (tag == '{' || tag == '&') {
        code += tripleStache(tree[i].n, chooseMethod(tree[i].n));
      } else if (tag == '\n') {
        code += text('"\\n"' + (tree.length-1 == i ? '' : ' + i'));
      } else if (tag == '_v') {
        code += variable(tree[i].n, chooseMethod(tree[i].n));
      } else if (tag === undefined) {
        code += text('"' + esc(tree[i]) + '"');
      }
    }
    return code;
  }

  function section(nodes, id, method, start, end, tags) {
    return 'if(_.s(_.' + method + '("' + esc(id) + '",c,p,1),' +
           'c,p,0,' + start + ',' + end + ',"' + tags + '")){' +
           '_.rs(c,p,' +
           'function(c,p,_){' +
           walk(nodes) +
           '});c.pop();}';
  }

  function invertedSection(nodes, id, method) {
    return 'if(!_.s(_.' + method + '("' + esc(id) + '",c,p,1),c,p,1,0,0,"")){' +
           walk(nodes) +
           '};';
  }

  function partial(tok) {
    return '_.b(_.rp("' +  esc(tok.n) + '",c,p,"' + (tok.indent || '') + '"));';
  }

  function tripleStache(id, method) {
    return '_.b(_.t(_.' + method + '("' + esc(id) + '",c,p,0)));';
  }

  function variable(id, method) {
    return '_.b(_.v(_.' + method + '("' + esc(id) + '",c,p,0)));';
  }

  function text(id) {
    return '_.b(' + id + ');';
  }

  Hogan.parse = function(tokens, text, options) {
    options = options || {};
    return buildTree(tokens, '', [], options.sectionTags || []);
  },

  Hogan.cache = {};

  Hogan.compile = function(text, options) {
    // options
    //
    // asString: false (default)
    //
    // sectionTags: [{o: '_foo', c: 'foo'}]
    // An array of object with o and c fields that indicate names for custom
    // section tags. The example above allows parsing of {{_foo}}{{/foo}}.
    //
    // delimiters: A string that overrides the default delimiters.
    // Example: "<% %>"
    //
    options = options || {};

    var key = text + '||' + !!options.asString;

    var t = this.cache[key];

    if (t) {
      return t;
    }

    t = this.generate(this.parse(this.scan(text, options.delimiters), text, options), text, options);
    return this.cache[key] = t;
  };
})(typeof exports !== 'undefined' ? exports : Hogan);


/*!
 * Shuffle.js by @Vestride
 * Categorize, sort, and filter a responsive grid of items.
 * Dependencies: jQuery 1.9+, Modernizr 2.6.2+
 * @license MIT license
 * @version 2.1.1
 */
(function (factory) {
	if (typeof define === 'function' && define.amd) {
		define(['jquery', 'modernizr'], factory);
	} else {
		factory(window.$, window.Modernizr);
	}
})(function($, Modernizr, undefined) {

	'use strict';


// Validate Modernizr exists.
// Shuffle requires `csstransitions`, `csstransforms`, `csstransforms3d`,
// and `prefixed` to exist on the Modernizr object.
	if (typeof Modernizr !== 'object') {
		throw new Error('Shuffle.js requires Modernizr.\n' +
			'http://vestride.github.io/Shuffle/#dependencies');
	}


	/**
	 * Returns css prefixed properties like `-webkit-transition` or `box-sizing`
	 * from `transition` or `boxSizing`, respectively.
	 * @param {(string|boolean)} prop Property to be prefixed.
	 * @return {string} The prefixed css property.
	 */
	function dashify( prop ) {
		if (!prop) {
			return '';
		}

		// Replace upper case with dash-lowercase,
		// then fix ms- prefixes because they're not capitalized.
		return prop.replace(/([A-Z])/g, function( str, m1 ) {
			return '-' + m1.toLowerCase();
		}).replace(/^ms-/,'-ms-');
	}

// Constant, prefixed variables.
	var TRANSITION = Modernizr.prefixed('transition');
	var TRANSITION_DELAY = Modernizr.prefixed('transitionDelay');
	var TRANSITION_DURATION = Modernizr.prefixed('transitionDuration');
	var TRANSITIONEND = {
		'WebkitTransition' : 'webkitTransitionEnd',
		'transition' : 'transitionend'
	}[ TRANSITION ];
	var TRANSFORM = Modernizr.prefixed('transform');
	var CSS_TRANSFORM = dashify(TRANSFORM);

// Constants
	var CAN_TRANSITION_TRANSFORMS = Modernizr.csstransforms && Modernizr.csstransitions;
	var HAS_TRANSFORMS_3D = Modernizr.csstransforms3d;
	var SHUFFLE = 'shuffle';

// Configurable. You can change these constants to fit your application.
// The default scale and concealed scale, however, have to be different values.
	var ALL_ITEMS = 'all';
	var FILTER_ATTRIBUTE_KEY = 'groups';
	var DEFAULT_SCALE = 1;
	var CONCEALED_SCALE = 0.001;


// Underscore's throttle function.
	function throttle(func, wait, options) {
		var context, args, result;
		var timeout = null;
		var previous = 0;
		options = options || {};
		var later = function() {
			previous = options.leading === false ? 0 : $.now();
			timeout = null;
			result = func.apply(context, args);
			context = args = null;
		};
		return function() {
			var now = $.now();
			if (!previous && options.leading === false) {
				previous = now;
			}
			var remaining = wait - (now - previous);
			context = this;
			args = arguments;
			if (remaining <= 0 || remaining > wait) {
				clearTimeout(timeout);
				timeout = null;
				previous = now;
				result = func.apply(context, args);
				context = args = null;
			} else if (!timeout && options.trailing !== false) {
				timeout = setTimeout(later, remaining);
			}
			return result;
		};
	}

// Used for unique instance variables
	var id = 0;


	/**
	 * Categorize, sort, and filter a responsive grid of items.
	 *
	 * @param {Element|jQuery} element An element or a jQuery collection which
	 *     is the parent container for the grid items.
	 * @param {Object} [options=Shuffle.options] Options object.
	 * @constructor
	 */
	var Shuffle = function( element, options ) {
		options = options || {};
		$.extend( this, Shuffle.options, options, Shuffle.settings );

		this.$el = $(element);
		this.$window = $(window);
		this.unique = 'shuffle_' + id++;

		this._fire( Shuffle.EventType.LOADING );
		this._init();

		// Dispatch the done event asynchronously so that people can bind to it after
		// Shuffle has been initialized.
		setTimeout( $.proxy(function() {
			this.initialized = true;
			this._fire( Shuffle.EventType.DONE );
		}, this), 16 );
	};


	/**
	 * Events the container element emits with the .shuffle namespace.
	 * For example, "done.shuffle".
	 * @enum {string}
	 */
	Shuffle.EventType = {
		LOADING: 'loading',
		DONE: 'done',
		SHRINK: 'shrink',
		SHRUNK: 'shrunk',
		FILTER: 'filter',
		FILTERED: 'filtered',
		SORTED: 'sorted',
		LAYOUT: 'layout',
		REMOVED: 'removed'
	};


	Shuffle.prototype = {

		_init : function() {
			var self = this,
				containerCSS,
				containerWidth,
				resizeFunction = $.proxy( self._onResize, self ),
				debouncedResize = self.throttle ?
					self.throttle( resizeFunction, self.throttleTime ) :
					resizeFunction,
				sort = self.initialSort ? self.initialSort : null;


			self._layoutList = [];
			self._shrinkList = [];

			self._setVars();

			// Zero out all columns
			self._resetCols();

			// Add classes and invalidate styles
			self._addClasses();

			// Set initial css for each item
			self._initItems();

			// Bind resize events
			// http://stackoverflow.com/questions/1852751/window-resize-event-firing-in-internet-explorer
			self.$window.on('resize.' + SHUFFLE + '.' + self.unique, debouncedResize);

			// Get container css all in one request. Causes reflow
			containerCSS = self.$el.css(['paddingLeft', 'paddingRight', 'position']);
			containerWidth = self._getOuterWidth( self.$el[0] );

			// Position cannot be static.
			if ( containerCSS.position === 'static' ) {
				self.$el[0].style.position = 'relative';
			}

			// Get offset from container
			self.offset = {
				left: parseInt( containerCSS.paddingLeft, 10 ) || 0,
				top: parseInt( containerCSS.paddingTop, 10 ) || 0
			};

			// We already got the container's width above, no need to cause another reflow getting it again...
			// Calculate the number of columns there will be
			self._setColumns( parseInt( containerWidth, 10 ) );

			// Kick off!
			self.shuffle( self.group, sort );

			// The shuffle items haven't had transitions set on them yet
			// so the user doesn't see the first layout. Set them now that the first layout is done.
			if ( self.supported ) {
				setTimeout(function() {
					self._setTransitions();
					self.$el[0].style[ TRANSITION ] = 'height ' + self.speed + 'ms ' + self.easing;
				}, 0);
			}
		},

		// Will invalidate styles
		_addClasses : function() {
			this.$el.addClass( SHUFFLE );
			this.$items.addClass('shuffle-item filtered');
		},

		_setVars : function() {
			var self = this,
				columnWidth = self.columnWidth;

			self.$items = self._getItems();

			// Column width is the default setting and sizer is not (meaning passed in)
			// Assume they meant column width to be the sizer
			if ( columnWidth === 0 && self.sizer !== null ) {
				columnWidth = self.sizer;
			}

			// If column width is a string, treat is as a selector and search for the
			// sizer element within the outermost container
			if ( typeof columnWidth === 'string' ) {
				self.$sizer = self.$el.find( columnWidth );

				// Check for an element
			} else if ( columnWidth && columnWidth.nodeType && columnWidth.nodeType === 1 ) {
				// Wrap it in jQuery
				self.$sizer = $( columnWidth );

				// Check for jQuery object
			} else if ( columnWidth && columnWidth.jquery ) {
				self.$sizer = columnWidth;
			}

			if ( self.$sizer && self.$sizer.length ) {
				self.useSizer = true;
				self.sizer = self.$sizer[0];
			}
		},


		/**
		 * Filter the elements by a category.
		 * @param {string} [category] Category to filter by. If it's given, the last
		 *     category will be used to filter the items.
		 * @param {jQuery} [$collection] Optionally filter a collection. Defaults to
		 *     all the items.
		 * @return {jQuery} Filtered items.
		 */
		_filter : function( category, $collection ) {
			var self = this,
				isPartialSet = $collection !== undefined,
				$items = isPartialSet ? $collection : self.$items,
				$filtered = $();

			category = category || self.lastFilter;

			self._fire( Shuffle.EventType.FILTER );

			// Loop through each item and use provided function to determine
			// whether to hide it or not.
			if ( $.isFunction( category ) ) {
				$items.each(function() {
					var $item = $(this);
					if ( category.call($item[0], $item, self) ) {
						$filtered = $filtered.add( $item );
					}
				});

				// Otherwise we've been passed a category to filter by
			} else {
				self.group = category;

				// category === 'all', add filtered class to everything
				if ( category === ALL_ITEMS ) {
					$filtered = $items;

					// Check each element's data-groups attribute against the given category.
				} else {
					$items.each(function() {
						var $item = $(this),
							groups = $item.data( FILTER_ATTRIBUTE_KEY ),
							keys = self.delimeter && !$.isArray( groups ) ?
								groups.split( self.delimeter ) :
								groups;

						if ( $.inArray(category, keys) > -1 ) {
							$filtered = $filtered.add( $item );
						}
					});
				}
			}

			// Individually add/remove concealed/filtered classes
			self._toggleFilterClasses( $items, $filtered );

			$items = null;
			$collection = null;

			return $filtered;
		},


		_toggleFilterClasses : function( $items, $filtered ) {
			var concealed = 'concealed',
				filtered = 'filtered';

			$items.filter( $filtered ).each(function() {
				var $filteredItem = $(this);
				// Remove concealed if it's there
				if ( $filteredItem.hasClass( concealed ) ) {
					$filteredItem.removeClass( concealed );
				}
				// Add filtered class if it's not there
				if ( !$filteredItem.hasClass( filtered ) ) {
					$filteredItem.addClass( filtered );
				}
			});

			$items.not( $filtered ).each(function() {
				var $filteredItem = $(this);
				// Add concealed if it's not there
				if ( !$filteredItem.hasClass( concealed ) ) {
					$filteredItem.addClass( concealed );
				}
				// Remove filtered class if it's there
				if ( $filteredItem.hasClass( filtered ) ) {
					$filteredItem.removeClass( filtered );
				}
			});
		},

		/**
		 * Set the initial css for each item
		 * @param {jQuery} [$items] Optionally specifiy at set to initialize
		 */
		_initItems : function( $items ) {
			$items = $items || this.$items;
			$items.css( this.itemCss ).data('position', {x: 0, y: 0});
		},

		_updateItemCount : function() {
			this.visibleItems = this.$items.filter('.filtered').length;
		},

		_setTransition : function( element ) {
			element.style[ TRANSITION ] = CSS_TRANSFORM + ' ' + this.speed + 'ms ' + this.easing + ', opacity ' + this.speed + 'ms ' + this.easing;
		},

		_setTransitions : function( $items ) {
			var self = this;

			$items = $items || self.$items;
			$items.each(function() {
				self._setTransition( this );
			});
		},

		_setSequentialDelay : function( $collection ) {
			var self = this;

			if ( !self.supported ) {
				return;
			}

			// $collection can be an array of dom elements or jquery object
			$.each($collection, function(i, el) {
				// This works because the transition-property: transform, opacity;
				el.style[ TRANSITION_DELAY ] = '0ms,' + ((i + 1) * self.sequentialFadeDelay) + 'ms';

				// Set the delay back to zero after one transition
				$(el).on(TRANSITIONEND + '.' + self.unique, function(evt) {
					var target = evt.currentTarget;
					if ( target === evt.target ) {
						target.style[ TRANSITION_DELAY ] = '0ms';
						$(target).off(TRANSITIONEND + '.' + self.unique);
					}
				});
			});
		},

		_getItems : function() {
			return this.$el.children( this.itemSelector );
		},

		_getPreciseDimension : function( element, style ) {
			var dimension;
			if ( window.getComputedStyle ) {
				dimension = window.getComputedStyle( element, null )[ style ];
			} else {
				dimension = $( element ).css( style );
			}
			return parseFloat( dimension );
		},


		/**
		 * Returns the outer width of an element, optionally including its margins.
		 * @param {Element} element The element.
		 * @param {boolean} [includeMargins] Whether to include margins. Default is false.
		 * @return {number} The width.
		 */
		_getOuterWidth : function( element, includeMargins ) {
			var width = element.offsetWidth;

			// Use jQuery here because it uses getComputedStyle internally and is
			// cross-browser. Using the style property of the element will only work
			// if there are inline styles.
			if (includeMargins) {
				var styles = $(element).css(['marginLeft', 'marginRight']);

				// Defaults to zero if parsing fails because IE will return 'auto' when
				// the element doesn't have margins instead of the computed style.
				var marginLeft = parseFloat(styles.marginLeft) || 0;
				var marginRight = parseFloat(styles.marginRight) || 0;
				width += marginLeft + marginRight;
			}

			return width;
		},


		/**
		 * Returns the outer height of an element, optionally including its margins.
		 * @param {Element} element The element.
		 * @param {boolean} [includeMargins] Whether to include margins. Default is false.
		 * @return {number} The height.
		 */
		_getOuterHeight : function( element, includeMargins ) {
			var height = element.offsetHeight;

			if (includeMargins) {
				var styles = $(element).css(['marginTop', 'marginBottom']);
				var marginTop = parseFloat(styles.marginTop) || 0;
				var marginBottom = parseFloat(styles.marginBottom) || 0;
				height += marginTop + marginBottom;
			}

			return height;
		},


		_getColumnSize : function( gutterSize, containerWidth ) {
			var size;

			// If the columnWidth property is a function, then the grid is fluid
			if ( $.isFunction( this.columnWidth ) ) {
				size = this.columnWidth(containerWidth);

				// columnWidth option isn't a function, are they using a sizing element?
			} else if ( this.useSizer ) {
				size = this._getPreciseDimension(this.sizer, 'width');

				// if not, how about the explicitly set option?
			} else if ( this.columnWidth ) {
				size = this.columnWidth;

				// or use the size of the first item
			} else if ( this.$items.length > 0 ) {
				size = this._getOuterWidth(this.$items[0], true);

				// if there's no items, use size of container
			} else {
				size = containerWidth;
			}

			// Don't let them set a column width of zero.
			if ( size === 0 ) {
				size = containerWidth;
			}

			return size + gutterSize;
		},


		_getGutterSize : function( containerWidth ) {
			var size;
			if ( $.isFunction( this.gutterWidth ) ) {
				size = this.gutterWidth(containerWidth);
			} else if ( this.useSizer ) {
				size = this._getPreciseDimension(this.sizer, 'marginLeft');
			} else {
				size = this.gutterWidth;
			}

			return size;
		},


		/**
		 * Calculate the number of columns to be used. Gets css if using sizer element.
		 * @param {number} [theContainerWidth] Optionally specify a container width if it's already available.
		 */
		_setColumns : function( theContainerWidth ) {
			var containerWidth = theContainerWidth || this._getOuterWidth(this.$el[0]);
			var gutter = this._getGutterSize(containerWidth);
			var columnWidth = this._getColumnSize(gutter, containerWidth);
			var calculatedColumns = (containerWidth + gutter) / columnWidth;

			// Widths given from getComputedStyle are not precise enough...
			if ( Math.abs(Math.round(calculatedColumns) - calculatedColumns) < 0.03 ) {
				// e.g. calculatedColumns = 11.998876
				calculatedColumns = Math.round( calculatedColumns );
			}

			this.cols = Math.max( Math.floor(calculatedColumns), 1 );
			this.containerWidth = containerWidth;
			this.colWidth = columnWidth;
		},

		/**
		 * Adjust the height of the grid
		 */
		_setContainerSize : function() {
			this.$el.css( 'height', Math.max.apply( Math, this.colYs ) );
		},

		/**
		 * Fire events with .shuffle namespace
		 */
		_fire : function( name, args ) {
			this.$el.trigger( name + '.' + SHUFFLE, args && args.length ? args : [ this ] );
		},


		/**
		 * Loops through each item that should be shown and calculates the x, y position.
		 * @param {Array.<Element>} items Array of items that will be shown/layed out in order in their array.
		 *     Because jQuery collection are always ordered in DOM order, we can't pass a jq collection.
		 * @param {function} fn Callback function.
		 * @param {boolean} isOnlyPosition If true this will position the items with zero opacity.
		 */
		_layout : function( items, fn, isOnlyPosition ) {
			var self = this;

			fn = fn || self._filterEnd;

			$.each(items, function(index, item) {
				var $item = $(item);
				var itemData = $item.data();
				var currPos = itemData.position;
				var pos = self._getItemPosition( $item );

				// Save data for shrink
				$item.data( 'position', pos );

				// If the item will not change its position, do not add it to the render
				// queue. Transitions don't fire when setting a property to the same value.
				if ( pos.x === currPos.x && pos.y === currPos.y && itemData.scale === DEFAULT_SCALE ) {
					return;
				}

				var transitionObj = {
					$item: $item,
					x: pos.x,
					y: pos.y,
					scale: DEFAULT_SCALE
				};

				if ( isOnlyPosition ) {
					transitionObj.skipTransition = true;
					transitionObj.opacity = 0;
				} else {
					transitionObj.opacity = 1;
					transitionObj.callback = fn;
				}

				self.styleQueue.push( transitionObj );
				self._layoutList.push( $item[0] );
			});

			// `_layout` always happens after `_shrink`, so it's safe to process the style
			// queue here with styles from the shrink method
			self._processStyleQueue();

			// Adjust the height of the container
			self._setContainerSize();
		},

		// Reset columns.
		_resetCols : function() {
			var i = this.cols;
			this.colYs = [];
			while (i--) {
				this.colYs.push( 0 );
			}
		},

		_reLayout : function() {
			this._resetCols();

			// If we've already sorted the elements, keep them sorted
			if ( this.lastSort ) {
				this.sort( this.lastSort, true );
			} else {
				this._layout( this.$items.filter('.filtered').get(), this._filterEnd );
			}
		},

		_getItemPosition : function( $item ) {
			var self = this;
			var itemWidth = self._getOuterWidth( $item[0], true );
			var columnSpan = itemWidth / self.colWidth;

			// If the difference between the rounded column span number and the
			// calculated column span number is really small, round the number to
			// make it fit.
			if ( Math.abs(Math.round(columnSpan) - columnSpan) < 0.03 ) {
				// e.g. columnSpan = 4.0089945390298745
				columnSpan = Math.round( columnSpan );
			}

			// How many columns does this item span. Ensure it's not more than the
			// amount of columns in the whole layout.
			var colSpan = Math.min( Math.ceil(columnSpan), self.cols );

			// The item spans only one column.
			if ( colSpan === 1 ) {
				return self._placeItem( $item, self.colYs );

				// The item spans more than one column, figure out how many different
				// places it could fit horizontally
			} else {
				var groupCount = self.cols + 1 - colSpan,
					groupY = [],
					groupColY,
					i;

				// for each group potential horizontal position
				for ( i = 0; i < groupCount; i++ ) {
					// make an array of colY values for that one group
					groupColY = self.colYs.slice( i, i + colSpan );
					// and get the max value of the array
					groupY[i] = Math.max.apply( Math, groupColY );
				}

				return self._placeItem( $item, groupY );
			}
		},

		// worker method that places item in the columnSet with the the minY
		_placeItem : function( $item, setY ) {
			// get the minimum Y value from the columns
			var self = this,
				minimumY = Math.min.apply( Math, setY ),
				shortCol = 0;

			// Find index of short column, the first from the left where this item will go
			// if ( setY[i] === minimumY ) requires items' height to be exact every time.
			// The buffer value is very useful when the height is a percentage of the width
			for (var i = 0, len = setY.length; i < len; i++) {
				if ( setY[i] >= minimumY - self.buffer && setY[i] <= minimumY + self.buffer ) {
					shortCol = i;
					break;
				}
			}

			// Position the item
			var position = {
				x: Math.round( (self.colWidth * shortCol) + self.offset.left ),
				y: Math.round( minimumY + self.offset.top )
			};

			// Apply setHeight to necessary columns
			var setHeight = minimumY + self._getOuterHeight( $item[0], true ),
				setSpan = self.cols + 1 - len;
			for ( i = 0; i < setSpan; i++ ) {
				self.colYs[ shortCol + i ] = setHeight;
			}

			return position;
		},

		/**
		 * Hides the elements that don't match our filter.
		 * @param {jQuery} $collection jQuery collection to shrink.
		 * @param {Function} fn Callback function.
		 * @private
		 */
		_shrink : function( $collection, fn ) {
			var self = this,
				$concealed = $collection || self.$items.filter('.concealed');

			fn = fn || self._shrinkEnd;

			// Abort if no items
			if ( !$concealed.length ) {
				return;
			}

			self._fire( Shuffle.EventType.SHRINK );

			$concealed.each(function() {
				var $item = $(this);
				var itemData = $item.data();
				var alreadyShrunk = itemData.scale === CONCEALED_SCALE;

				// Continuing would add a transitionend event listener to the element, but
				// that listener would execute because the transform and opacity would
				// stay the same.
				if ( alreadyShrunk ) {
					return;
				}

				var transitionObj = {
					$item: $item,
					x: itemData.position.x,
					y: itemData.position.y,
					scale : CONCEALED_SCALE,
					opacity: 0,
					callback: fn
				};

				self.styleQueue.push( transitionObj );
				self._shrinkList.push( $item[0] );
			});
		},

		_onResize : function() {
			// If shuffle is disabled, destroyed, don't do anything
			if ( !this.enabled || this.destroyed ) {
				return;
			}

			// Will need to check height in the future if it's layed out horizontaly
			var containerWidth = this._getOuterWidth(this.$el[0]);

			// containerWidth hasn't changed, don't do anything
			if ( containerWidth === this.containerWidth ) {
				return;
			}

			this.resized();
		},


		/**
		 * If the browser has 3d transforms available, build a string with those,
		 * otherwise use 2d transforms.
		 * @param {number} x X position.
		 * @param {number} y Y position.
		 * @param {number} scale Scale amount.
		 * @return {string} A normalized string which can be used with the transform style.
		 * @private
		 */
		_getItemTransformString : function(x, y, scale) {
			if ( HAS_TRANSFORMS_3D ) {
				return 'translate3d(' + x + 'px, ' + y + 'px, 0) scale3d(' + scale + ', ' + scale + ', 1)';
			} else {
				return 'translate(' + x + 'px, ' + y + 'px) scale(' + scale + ', ' + scale + ')';
			}
		},

		_getStylesForTransition : function( opts ) {
			var styles = {
				opacity: opts.opacity
			};

			if ( this.supported ) {
				if ( opts.x !== undefined ) {
					styles[ TRANSFORM ] = this._getItemTransformString( opts.x, opts.y, opts.scale );
				}
			} else {
				styles.left = opts.x;
				styles.top = opts.y;
			}


			// Show the item if its opacity will be 1.
			if ( opts.opacity === 1 ) {
				styles.visibility = 'visible';
			}

			return styles;
		},

		/**
		 * Transitions an item in the grid
		 *
		 * @param {Object}   opts options
		 * @param {jQuery}   opts.$item jQuery object representing the current item
		 * @param {number}   opts.x translate's x
		 * @param {number}   opts.y translate's y
		 * @param {number}   opts.scale amount to scale the item
		 * @param {number}   opts.opacity opacity of the item
		 * @param {Function} opts.callback complete function for the animation
		 * @private
		 */
		_transition : function( opts ) {
			opts.$item.data('scale', opts.scale);

			var styles = this._getStylesForTransition( opts );
			this._startItemAnimation( opts.$item, styles, opts.callback );
		},


		_startItemAnimation : function( $item, styles, callback ) {
			var willBeVisible = styles.opacity === 1;
			var complete = $.proxy( this._handleItemAnimationEnd, this,
				callback || $.noop, $item[0], willBeVisible );

			// Use CSS Transforms if we have them
			if ( this.supported ) {

				$item.css( styles );

				// Transitions are not set until shuffle has loaded to avoid the initial transition.
				if ( this.initialized ) {
					// Namespaced because the reveal appended function also wants to know
					// about the transition end event.
					$item.on( TRANSITIONEND + '.shuffleitem', complete );
				} else {
					complete();
				}

				// Use jQuery to animate left/top
			} else {
				// jQuery cannot animate visibility, set it immediately.
				if ( 'visibility' in styles ) {
					$item.css('visibility', styles.visibility);
					delete styles.visibility;
				}
				$item.stop( true ).animate( styles, this.speed, 'swing', complete );
			}
		},


		_handleItemAnimationEnd : function( callback, item, willBeVisible, evt ) {
			// Make sure this event handler has not bubbled up from a child.
			if ( evt ) {
				if ( evt.target === item ) {
					$( item ).off( '.shuffleitem' );
				} else {
					return;
				}
			}

			if ( this._layoutList.length > 0 && $.inArray( item, this._layoutList ) > -1 ) {
				this._fire( Shuffle.EventType.LAYOUT );
				callback.call( this );
				this._layoutList.length = 0;
			} else if ( this._shrinkList.length > 0 && $.inArray( item, this._shrinkList ) > -1 ) {
				callback.call( this );
				this._shrinkList.length = 0;
			}

			if ( !willBeVisible ) {
				item.style.visibility = 'hidden';
			}
		},

		_processStyleQueue : function() {
			var self = this;

			$.each(this.styleQueue, function(i, transitionObj) {

				if ( transitionObj.skipTransition ) {
					self._skipTransition(transitionObj.$item[0], function() {
						transitionObj.$item.css( self._getStylesForTransition( transitionObj ) );
					});
				} else {
					self._transition( transitionObj );
				}
			});

			// Remove everything in the style queue
			self.styleQueue.length = 0;
		},

		_shrinkEnd : function() {
			this._fire( Shuffle.EventType.SHRUNK );
		},

		_filterEnd : function() {
			this._fire( Shuffle.EventType.FILTERED );
		},

		_sortEnd : function() {
			this._fire( Shuffle.EventType.SORTED );
		},

		/**
		 * Change a property or execute a function which will not have a transition
		 * @param {Element} element DOM element that won't be transitioned
		 * @param {(string|Function)} property The new style property which will be set or a function which will be called
		 * @param {string} [value] The value that `property` should be.
		 * @private
		 */
		_skipTransition : function( element, property, value ) {
			var duration = element.style[ TRANSITION_DURATION ];

			// Set the duration to zero so it happens immediately
			element.style[ TRANSITION_DURATION ] = '0ms'; // ms needed for firefox!

			if ( $.isFunction( property ) ) {
				property();
			} else {
				element.style[ property ] = value;
			}

			// Force reflow
			var reflow = element.offsetWidth;
			// Avoid jshint warnings: unused variables and expressions.
			reflow = null;

			// Put the duration back
			element.style[ TRANSITION_DURATION ] = duration;
		},

		_addItems : function( $newItems, animateIn, isSequential ) {
			var self = this;

			if ( !self.supported ) {
				animateIn = false;
			}

			$newItems.addClass('shuffle-item');
			self._initItems( $newItems );
			self._setTransitions( $newItems );
			self.$items = self._getItems();

			// Hide all items
			$newItems.css('opacity', 0);

			// Get ones that passed the current filter
			var $passed = self._filter( undefined, $newItems );
			var passed = $passed.get();

			// How many filtered elements?
			self._updateItemCount();

			if ( animateIn ) {
				self._layout( passed, null, true );

				if ( isSequential ) {
					self._setSequentialDelay( $passed );
				}

				self._revealAppended( $passed );
			} else {
				self._layout( passed );
			}
		},

		_revealAppended : function( $newFilteredItems ) {
			var self = this;

			setTimeout(function() {
				$newFilteredItems.each(function(i, el) {
					self._transition({
						$item: $(el),
						opacity: 1,
						scale: DEFAULT_SCALE
					});
				});
			}, self.revealAppendedDelay);
		},


		/**
		 * Public Methods
		 */

		/**
		 * The magic. This is what makes the plugin 'shuffle'
		 * @param {(string|Function)} [category] Category to filter by. Can be a function
		 * @param {Object} [sortObj] A sort object which can sort the filtered set
		 */
		shuffle : function( category, sortObj ) {
			var self = this;

			if ( !self.enabled ) {
				return;
			}

			if ( !category ) {
				category = ALL_ITEMS;
			}

			self._filter( category );
			// Save the last filter in case elements are appended.
			self.lastFilter = category;

			// How many filtered elements?
			self._updateItemCount();

			// Shrink each concealed item
			self._shrink();

			// If given a valid sort object, save it so that _reLayout() will sort the items
			if ( sortObj ) {
				self.lastSort = sortObj;
			}
			// Update transforms on .filtered elements so they will animate to their new positions
			self._reLayout();
		},

		/**
		 * Gets the .filtered elements, sorts them, and passes them to layout
		 *
		 * @param {Object} opts the options object for the sorted plugin
		 * @param {boolean} [fromFilter] was called from Shuffle.filter method.
		 */
		sort : function( opts, fromFilter ) {
			var self = this,
				items = self.$items.filter('.filtered').sorted(opts);

			if ( !fromFilter ) {
				self._resetCols();
			}

			self._layout(items, function() {
				if (fromFilter) {
					self._filterEnd();
				}
				self._sortEnd();
			});

			self.lastSort = opts;
		},

		/**
		 * Relayout everything
		 */
		resized : function( isOnlyLayout ) {
			if ( this.enabled ) {

				if ( !isOnlyLayout ) {
					// Get updated colCount
					this._setColumns();
				}

				// Layout items
				this._reLayout();
			}
		},

		/**
		 * Use this instead of `update()` if you don't need the columns and gutters updated
		 * Maybe an image inside `shuffle` loaded (and now has a height), which means calculations
		 * could be off.
		 */
		layout : function() {
			this.update( true );
		},

		update : function( isOnlyLayout ) {
			this.resized( isOnlyLayout );
		},

		/**
		 * New items have been appended to shuffle. Fade them in sequentially
		 * @param {jQuery} $newItems jQuery collection of new items
		 * @param {boolean} [animateIn] If false, the new items won't animate in
		 * @param {boolean} [isSequential] If false, new items won't sequentially fade in
		 */
		appended : function( $newItems, animateIn, isSequential ) {
			// True if undefined
			animateIn = animateIn === false ? false : true;
			isSequential = isSequential === false ? false : true;

			this._addItems( $newItems, animateIn, isSequential );
		},

		/**
		 * Disables shuffle from updating dimensions and layout on resize
		 */
		disable : function() {
			this.enabled = false;
		},

		/**
		 * Enables shuffle again
		 * @param {boolean} [isUpdateLayout=true] if undefined, shuffle will update columns and gutters
		 */
		enable : function( isUpdateLayout ) {
			this.enabled = true;
			if ( isUpdateLayout !== false ) {
				this.update();
			}
		},

		/**
		 * Remove 1 or more shuffle items
		 * @param {jQuery} $collection A jQuery object containing one or more element in shuffle
		 * @return {Shuffle} The shuffle object
		 */
		remove : function( $collection ) {

			// If this isn't a jquery object, exit
			if ( !$collection.length || !$collection.jquery ) {
				return;
			}

			var self = this;

			// Hide collection first
			self._shrink( $collection, function() {
				var shuffle = this;

				// Remove the collection in the callback
				$collection.remove();

				// Update the items, layout, count and fire off `removed` event
				setTimeout(function() {
					shuffle.$items = shuffle._getItems();
					shuffle.layout();
					shuffle._updateItemCount();
					shuffle._fire( Shuffle.EventType.REMOVED, [ $collection, shuffle ] );

					// Let it get garbage collected
					$collection = null;
				}, 0);
			});

			// Process changes
			self._processStyleQueue();

			return self;
		},

		/**
		 * Destroys shuffle, removes events, styles, and classes
		 */
		destroy : function() {
			var self = this;

			// If there is more than one shuffle instance on the page,
			// removing the resize handler from the window would remove them
			// all. This is why a unique value is needed.
			self.$window.off('.' + self.unique);

			// Reset container styles
			self.$el
				.removeClass( SHUFFLE )
				.removeAttr('style')
				.removeData( SHUFFLE );

			// Reset individual item styles
			self.$items
				.removeAttr('style')
				.removeClass('concealed filtered shuffle-item');

			// Null DOM references
			self.$window = null;
			self.$items = null;
			self.$el = null;
			self.$sizer = null;
			self.sizer = null;

			// Set a flag so if a debounced resize has been triggered,
			// it can first check if it is actually destroyed and not doing anything
			self.destroyed = true;
		}
	};


// Overrideable options
	Shuffle.options = {
		group: ALL_ITEMS, // Filter group
		speed: 250, // Transition/animation speed (milliseconds)
		easing: 'ease-out', // css easing function to use
		itemSelector: '', // e.g. '.picture-item'
		sizer: null, // sizer element. Can be anything columnWidth is
		gutterWidth: 0, // a static number or function that tells the plugin how wide the gutters between columns are (in pixels)
		columnWidth: 0, // a static number or function that returns a number which tells the plugin how wide the columns are (in pixels)
		delimeter: null, // if your group is not json, and is comma delimeted, you could set delimeter to ','
		buffer: 0, // useful for percentage based heights when they might not always be exactly the same (in pixels)
		initialSort: null, // Shuffle can be initialized with a sort object. It is the same object given to the sort method
		throttle: throttle, // By default, shuffle will try to throttle the resize event. This option will change the method it uses
		throttleTime: 300, // How often shuffle can be called on resize (in milliseconds)
		sequentialFadeDelay: 150, // Delay between each item that fades in when adding items
		supported: CAN_TRANSITION_TRANSFORMS // supports transitions and transforms
	};


// Not overrideable
	Shuffle.settings = {
		$sizer: null,
		useSizer: false,
		itemCss : { // default CSS for each item
			position: 'absolute',
			top: 0,
			left: 0
		},
		offset: { top: 0, left: 0 },
		revealAppendedDelay: 300,
		enabled: true,
		destroyed: false,
		initialized: false,
		styleQueue: []
	};


// Plugin definition
	$.fn.shuffle = function( opts ) {
		var args = Array.prototype.slice.call( arguments, 1 );
		return this.each(function() {
			var $this = $( this ),
				shuffle = $this.data( SHUFFLE );

			// If we don't have a stored shuffle, make a new one and save it
			if ( !shuffle ) {
				shuffle = new Shuffle( $this, opts );
				$this.data( SHUFFLE, shuffle );
			}

			if ( typeof opts === 'string' && shuffle[ opts ] ) {
				shuffle[ opts ].apply( shuffle, args );
			}
		});
	};


// You can return `undefined` from the `by` function to revert to DOM order
// This plugin does NOT return a jQuery object. It returns a plain array because
// jQuery sorts everything in DOM order.
	$.fn.sorted = function(options) {
		var opts = $.extend({}, $.fn.sorted.defaults, options),
			arr = this.get(),
			revert = false;

		if ( !arr.length ) {
			return [];
		}

		if ( opts.randomize ) {
			return $.fn.sorted.randomize( arr );
		}

		// Sort the elements by the opts.by function.
		// If we don't have opts.by, default to DOM order
		if (opts.by !== $.noop && opts.by !== null && opts.by !== undefined) {
			arr.sort(function(a, b) {

				// Exit early if we already know we want to revert
				if ( revert ) {
					return 0;
				}

				var valA = opts.by($(a)),
					valB = opts.by($(b));

				// If both values are undefined, use the DOM order
				if ( valA === undefined && valB === undefined ) {
					revert = true;
					return 0;
				}

				if ( valA === 'sortFirst' || valB === 'sortLast' ) {
					return -1;
				}

				if ( valA === 'sortLast' || valB === 'sortFirst' ) {
					return 1;
				}

				return (valA < valB) ? -1 :
					(valA > valB) ? 1 : 0;
			});
		}

		// Revert to the original array if necessary
		if ( revert ) {
			return this.get();
		}

		if ( opts.reverse ) {
			arr.reverse();
		}

		return arr;
	};


	$.fn.sorted.defaults = {
		reverse: false, // Use array.reverse() to reverse the results
		by: null, // Sorting function
		randomize: false // If true, this will skip the sorting and return a randomized order in the array
	};


// http://stackoverflow.com/a/962890/373422
	$.fn.sorted.randomize = function( array ) {
		var top = array.length,
			tmp, current;

		if ( !top ) {
			return array;
		}

		while ( --top ) {
			current = Math.floor( Math.random() * (top + 1) );
			tmp = array[ current ];
			array[ current ] = array[ top ];
			array[ top ] = tmp;
		}

		return array;
	};

	return Shuffle;

});
(function(b,c){var $=b.jQuery||b.Cowboy||(b.Cowboy={}),a;$.throttle=a=function(e,f,j,i){var h,d=0;if(typeof f!=="boolean"){i=j;j=f;f=c}function g(){var o=this,m=+new Date()-d,n=arguments;function l(){d=+new Date();j.apply(o,n)}function k(){h=c}if(i&&!h){l()}h&&clearTimeout(h);if(i===c&&m>e){l()}else{if(f!==true){h=setTimeout(i?k:l,i===c?e-m:e)}}}if($.guid){g.guid=j.guid=j.guid||$.guid++}return g};$.debounce=function(d,e,f){return f===c?a(d,e,false):a(d,f,e!==false)}})(this);



var DEMO = (function( $ ) {
	'use strict';

	var $grid = $('#grid'),
		$filterOptions = $('.filter-options'),
		$sizer = $grid.find('.shuffle__sizer'),

		init = function() {


			// None of these need to be executed synchronously
			setTimeout(function() {
				listen();
				setupFilters();
				setupSorting();
				setupSearching();
			}, 100);

			// You can subscribe to custom events.
			// shrink, shrunk, filter, filtered, sorted, load, done
			$grid.on('loading.shuffle done.shuffle shrink.shuffle shrunk.shuffle filter.shuffle filtered.shuffle sorted.shuffle layout.shuffle', function(evt, shuffle) {
				// Make sure the browser has a console
				if ( window.console && window.console.log && typeof window.console.log === 'function' ) {
					console.log( 'Shuffle:', evt.type );
				}
			});

			// instantiate the plugin
			$grid.shuffle({
				itemSelector: '.picture-item',
				sizer: $sizer
			});

			// Destroy it! o_O
			// $grid.shuffle('destroy');
		},

	// Set up button clicks
		setupFilters = function() {
			var $btns = $filterOptions.children();
			$btns.on('click', function() {
				var $this = $(this),
					isActive = $this.hasClass( 'active' ),
					group = isActive ? 'all' : $this.data('group');

				// Hide current label, show current label in title
				if ( !isActive ) {
					$('.filter-options .active').removeClass('active');
				}

				$this.toggleClass('active');

				// Filter elements
				$grid.shuffle( 'shuffle', group );
			});

			$btns = null;
		},

		setupSorting = function() {
			// Sorting options
			$('.sort-options').on('change', function() {
				var sort = this.value,
					opts = {};

				// We're given the element wrapped in jQuery
				if ( sort === 'date-created' ) {
					opts = {
						reverse: true,
						by: function($el) {
							return $el.data('date-created');
						}
					};
				} else if ( sort === 'title' ) {
					opts = {
						by: function($el) {
							return $el.data('title').toLowerCase();
						}
					};
				}

				// Filter elements
				$grid.shuffle('sort', opts);
			});
		},

		setupSearching = function() {
			// Advanced filtering
			$('.js-shuffle-search').on('keyup change', function() {
				var val = this.value.toLowerCase();
				$grid.shuffle('shuffle', function($el, shuffle) {

					// Only search elements in the current group
					if (shuffle.group !== 'all' && $.inArray(shuffle.group, $el.data('groups')) === -1) {
						return false;
					}

					var text = $.trim( $el.find('.picture-item__title').text() ).toLowerCase();
					return text.indexOf(val) !== -1;
				});
			});
		},

	// Re layout shuffle when images load. This is only needed
	// below 768 pixels because the .picture-item height is auto and therefore
	// the height of the picture-item is dependent on the image
	// I recommend using imagesloaded to determine when an image is loaded
	// but that doesn't support IE7
		listen = function() {
			var debouncedLayout = $.throttle(300, function() {
				$grid.shuffle('update');
			});

			// Get all images inside shuffle
			$grid.find('img').each(function() {
				var proxyImage;

				// Image already loaded
				if ( this.complete && this.naturalWidth !== undefined ) {
					return;
				}

				// If none of the checks above matched, simulate loading on detached element.
				proxyImage = new Image();
				$( proxyImage ).on('load', function() {
					$(this).off('load');
					debouncedLayout();
				});

				proxyImage.src = this.src;
			});

			// Because this method doesn't seem to be perfect.
			setTimeout(function() {
				debouncedLayout();
			}, 500);
		};

	return {
		init: init
	};
}( jQuery ));
/** Minified JS for Menufication jQuery plugin **/
"use strict";
(function (e) {
	// e("body").hide(),
	e.fn.extend({menufication: function (n) {
		return v[n] && p ? v[n].apply(this, Array.prototype.slice.call(arguments, 1)) : "object" != typeof n && n ? (e.error("Method " + n + " does not exist for menufication"), void 0) : v.init.apply(this, arguments)
	}, hasClasses: function (e) {
		var n = e.replace(/\s/g, "").split(","), i = this;
		for (var t in n)if (jQuery(i).hasClass(n[t]))return!0;
		return!1
	}, addClasses: function (e) {
		var n = e.replace(/\s/g, "").split(","), i = this;
		for (var t in n)jQuery(i).addClass(n[t])
	}});
	var n, i, t, o, r, s, a, l, d, c, u, g = !1, p = !1, f = !1, h = "menufication", m = 0;
	i = {toggleElement: null, enableSwipe: !0, hideDefaultMenu: !1, showHeader: !0, customFixedHeader: null, menuText: "", headerLogo: "", triggerWidth: 770, addHomeLink: !0, addHomeText: "Home", childMenuSupport: !0, childMenuSelector: "sub-menu, child-menu, children", activeClassSelector: "active-class, active", supportAndroidAbove: 3.5, onlyMobile: !1, transitionDuration: 600, scrollSpeed: .6, allowedTags: "DIV, NAV, UL, LI, A, P, H1, H2, H3, H4, SPAN", wrapTagsInList: "", addToFixedHolder: "", direction: "left", theme: "dark", menuLogo: "", disableSlideScaling: !1};
	var v = {init: function (o) {
		p || w.utils.isBB() || w.utils.isOldIE(9) || (n = e(this), o || (o = {}), t = e.extend({}, i, o), (!t.onlyMobile || w.utils.isMobile()) && ((!w.utils.hasTranslate3d() || w.utils.androidVersionIsBelow(t.supportAndroidAbove) || w.utils.isIE()) && (h += "-non-css3"), t.gestures = w.utils.isMobile() && !w.utils.isIE() ? {start: "touchstart", move: "touchmove", end: "touchend", click: "click", fastClick: "touchend"} : {start: "mousedown", move: "mousemove", end: "mouseup", click: "click", fastClick: "click"}, w.utils.androidVersionIsBelow(t.supportAndroidAbove) && (t.gestures.fastClick = "click"), w.scrolling.setScrollHandlers(), t.triggerWidth ? (e(window).bind("resize", function () {
			w.utils.checkTriggerWidth(e(window).width())
		}), w.utils.checkTriggerWidth(e(window).width())) : w.init()))
	}, openMenu: function () {
		r.addClass(h + "-transition-in"), g = !0, o.bind(t.gestures.move, function (e) {
			e.preventDefault()
		})
	}, closeMenu: function () {
		r.removeClass(h + "-transition-in"), g = !1, o.unbind()
	}, toggleMenu: function () {
		g ? v.closeMenu() : v.openMenu()
	}}, w = {init: function () {
		w.utils.wrapBody([h + "-page-holder", h + "-inner-wrap", h + "-outer-wrap"]), r.addClass(t.theme).addClass(t.direction + "-direction"), t.customFixedHeader ? w.buildCustomFixedHeader() : t.showHeader && w.buildHeader(), w.buildFixedHolder(), w.buildMenu(), w.addEvents(), w.utils.isMobile() ? w.scrolling.addBouncyScroll() : a.addClass(h + "-scroll"), p = !0, e(document).trigger("menufication-done", ["done"])
	}, buildHeader: function () {
		var n = e('<div id="' + h + '-top" />').append('<div id="' + h + '-btn"><p>' + t.menuText + "</p></div>");
		r.prepend(n).addClass(h + "-add-padding"), t.toggleElement = "#" + h + "-btn", t.headerLogo.length > 0 && w.addHeaderLogo(n)
	}, addHeaderLogo: function (n) {
		var i = e('<center><img src="' + t.headerLogo + '" id="' + h + '-header-logo" /></center>');
		n.append(i)
	}, buildCustomFixedHeader: function () {
		e(t.customFixedHeader).hide().addClass(h + "-original-custom-fixed-header");
		var n = e(t.customFixedHeader).clone();
		n.css("position", "static");
		var i = e('<div class="' + h + '-custom-top" />');
		n.show().removeClass(h + "-original-custom-fixed-header"), r.prepend(i.append(n)).addClass(h + "-add-padding")
	}, buildFixedHolder: function () {
		if (t.addToFixedHolder && t.addToFixedHolder.length > 0) {
			d = e('<div id="' + h + '-fixed-holder" />');
			var n = t.addToFixedHolder.replace(/\s/g, "").split(",");
			for (var i in n)d.append(e(n[i]));
			r.prepend(d)
		}
	}, buildMenu: function () {
		t.hideDefaultMenu && n.hide();
		var i = n.clone().removeAttr("id class");
		i = w.trimMenu(i), t.addHomeLink && i.prepend('<li><a href="http://' + window.location.hostname + '">' + t.addHomeText + "</a></li>"), "UL" === i.prop("tagName") ? i.addClass(h + "-menu-level-0") : i.find("ul").first().addClass(h + "-menu-level-0").siblings("ul").addClass(h + "-menu-level-0"), t.childMenuSelector && t.childMenuSupport ? w.buildChildMenus(i) : w.removeChildMenus(i), t.menuLogo.length > 0 && w.addMenuLogo(i), r.prepend(i), i.wrap('<div id="' + h + '-scroll-container" />'), !w.utils.isIOS() && w.utils.isMobile() || t.disableSlideScaling || i.wrap('<div id="' + h + '-transform-container" />'), i.wrap('<nav id="' + h + '-nav" />').show(), s = e("#" + h + "-nav"), a = e("#" + h + "-scroll-container")
	}, trimMenu: function (n) {
		var o = t.activeClassSelector ? t.activeClassSelector : "", r = t.childMenuSelector ? t.childMenuSelector : "", s = t.allowedTags ? t.allowedTags.replace(/\s/g, "").split(",") : i.allowedTags;
		return n.find("*").each(function () {
			var n = e(this), i = n.prop("tagName");
			if (-1 === s.indexOf(i) || n.hasClass("skip-link"))return n.remove(), void 0;
			if ("A" === i) {
				var a = n.text().toLowerCase(), l = a.charAt(0).toUpperCase() + a.slice(1);
				n.text(l)
			}
			t.wrapTagsInList === i && n.wrap("li"), n.hasClasses(r) ? (n.removeAttr("class id"), n.addClasses(r)) : n.hasClasses(o) ? (n.removeAttr("class id"), n.addClass(h + "-active-class")) : n.removeAttr("class id")
		}), n
	}, addMenuLogo: function (n) {
		var i = e('<center><img src="' + t.menuLogo + '" id="' + h + '-menu-logo" /></center>');
		n.prepend(i)
	}, buildChildMenus: function (n) {
		var i = t.childMenuSelector.replace(/\s/g, "").split(",");
		for (var o in i)n.find("." + i[o]).each(function () {
			var n = e(this);
			n.removeAttr("id class"), n.addClass(h + "-child-menu"), n.parent().addClass(h + "-has-child-menu").bind(t.gestures.click, function (i) {
				"A" !== i.target.nodeName && (i.preventDefault(), e(this).toggleClass(h + "-child-menu-open"), n.toggle(), i.stopPropagation())
			})
		}), t.activeClassSelector && w.toggleActiveClasses(n);
		w.countMenuLevel(n)
	}, countMenuLevel: function (n) {
		n.find("." + h + "-child-menu").each(function () {
			var n = e(this), i = n.parents("." + h + "-child-menu").length + 1;
			n.addClass(h + "-menu-level-" + i)
		})
	}, removeChildMenus: function (n) {
		if (!t.childMenuSupport) {
			if (!t.childMenuSelector || t.childMenuSelector === i.childMenuSelector)return n.find("." + h + "-menu-level-0").children().each(function () {
				e(this).find("ul").remove()
			}), void 0;
			var o = t.childMenuSelector.replace(/\s/g, "").split(",");
			for (var r in o)n.find("." + o[r]).each(function () {
				e(this).remove()
			})
		}
	}, toggleActiveClasses: function (n) {
		n.find("." + h + "-has-child-menu").each(function () {
			var n = e(this);
			n.find("*").children("." + h + "-active-class").length > 0 && (n.toggleClass(h + "-child-menu-open"), setTimeout(function () {
				n.addClass(h + "-child-menu-open"), n.find("." + h + "-child-menu").first().show()
			}, t.transitionDuration))
		})
	}, addEvents: function () {
		t.toggleElement && e(t.toggleElement).bind(t.gestures.fastClick, function (e) {
			e.preventDefault(), e.stopPropagation(), v.toggleMenu()
		}), t.enableSwipe && w.utils.isMobile() && w.enableSwipeEvent()
	}, removeEvents: function () {
		e(t.toggleElement).unbind(), a.unbind()
	}, enableSwipeEvent: function () {
		var n, i, o, r, s, a = e("#" + h + "-outer-wrap");
		a.bind(t.gestures.start, function (e) {
			o = (new Date).getTime(), n = e.originalEvent.touches[0].pageX, i = e.originalEvent.touches[0].clientY
		}), a.bind(t.gestures.move, function (e) {
			r = e.originalEvent.touches[0].pageX, s = e.originalEvent.touches[0].clientY
		}), a.bind(t.gestures.end, function () {
			var e = r > n ? "right" : "left", a = s - i > 40 || -40 > s - i, l = r - n > 90 || -90 > r - n, d = (new Date).getTime();
			if (!(d - o > 600 || a) && l)switch (e) {
				case"left":
					"left" === t.direction ? v.closeMenu() : v.openMenu();
					break;
				case"right":
					"left" === t.direction ? v.openMenu() : v.closeMenu()
			}
		})
	}, prevDefault: function (e) {
		e.preventDefault(), e.stopPropagation()
	}, scrolling: {scrollHandlers: {}, addBouncyScroll: function () {
		c = document.getElementById(h + "-nav"), a.bind(t.gestures.start, function (e) {
			m = w.scrolling.scrollHandlers.getTop(c);
			var n = e.originalEvent.touches[0].pageY;
			u = n
		}), a.bind(t.gestures.move, function (e) {
			e.preventDefault(), w.scrolling.checkTouchMove(e)
		}), a.bind(t.gestures.end, function () {
			w.scrolling.checkScrollEffect()
		})
	}, checkTouchMove: function (e) {
		var n = e.originalEvent.touches[0].pageY;
		m = w.scrolling.scrollHandlers.getTop(), w.scrolling.scrollHandlers.setTop(n), u = n
	}, checkScrollEffect: function () {
		w.scrolling.setScrollData(), w.scrolling.scrollHandlers.bounceBack()
	}, setScrollHandlers: function () {
		w.scrolling.scrollHandlers = !w.utils.hasTranslate3d() || w.utils.androidVersionIsBelow(t.supportAndroidAbove) || w.utils.isIE() ? {getTop: function () {
			return parseInt(getComputedStyle(c).top, 10)
		}, setTop: function (e) {
			c.style.top = u >= e ? m + 1.1 * (e - u) + "px" : m - 1.1 * (u - e) + "px"
		}, bounceBack: function (e, n, i) {
			if (w.scrolling.isAtBottom()) {
				var i = w.utils.isAndroid() ? 15 : 20;
				s.animate({top: -(l.navHeight - l.windowHeight - i)}, t.transitionDuration)
			} else w.scrolling.isAtTop() && s.animate({top: 0}, t.transitionDuration)
		}} : {getTop: function () {
			return new WebKitCSSMatrix(window.getComputedStyle(c).webkitTransform).m42
		}, setTop: function (e) {
			c.style.webkitTransform = u >= e ? "translateY(" + (m + (e - u) * t.scrollSpeed) + "px)" : "translateY(" + (m - (u - e) * t.scrollSpeed) + "px)"
		}, bounceBack: function (e, n, i) {
			if (w.scrolling.isAtBottom()) {
				s.addClass(h + "-add-transition");
				var i = w.utils.isAndroid() ? 15 : 20;
				c.style.webkitTransform = "translateY(" + -(l.navHeight - l.windowHeight - i) + "px)", w.scrolling.removeTransitionClass(t.transitionDuration)
			} else w.scrolling.isAtTop() && (s.addClass(h + "-add-transition"), c.style.webkitTransform = "translateY(0px)", w.scrolling.removeTransitionClass(t.transitionDuration))
		}}
	}, setScrollData: function () {
		l = {navHeight: s.height(), windowHeight: e(window).height()}
	}, isAtTop: function () {
		return m > 0 || 0 > m && l.navHeight < l.windowHeight
	}, isAtBottom: function () {
		return l.navHeight + m < l.windowHeight && l.navHeight > l.windowHeight
	}, removeTransitionClass: function (e) {
		setTimeout(function () {
			s.removeClass(h + "-add-transition")
		}, e)
	}}, utils: {reset: function () {
		e("." + h + "-custom-top").hide(), e("#" + h + "-top").hide(), r.removeClass(h + "-add-padding"), n.show(), w.removeEvents(), v.closeMenu(), e("." + h + "-original-custom-fixed-header").show(), e(document).trigger("menufication-reset", ["done"])
	}, reapply: function () {
		e("." + h + "-custom-top").show(), e("#" + h + "-top").show(), r.addClass(h + "-add-padding"), t.hideDefaultMenu && n.hide(), w.addEvents(), e("." + h + "-original-custom-fixed-header").hide(), e(document).trigger("menufication-reapply", ["done"])
	}, checkTriggerWidth: function (e) {
		t.triggerWidth >= e && !f ? (p ? w.utils.reapply() : w.init(), f = !0) : e > t.triggerWidth && f && (f = !1, w.utils.reset())
	}, wrapBody: function (n) {
		for (var i in n) {
			var t = document.createElement("div");
			for (t.id = n[i]; document.body.firstChild;)t.appendChild(document.body.firstChild);
			document.body.appendChild(t)
		}
		// e("body").show(),
		o = e("#" + h + "-inner-wrap"), r = e("#" + h + "-outer-wrap")
	}, hasTranslate3d: function () {
		var e, n = document.createElement("p"), i = {webkitTransform: "-webkit-transform", OTransform: "-o-transform", msTransform: "-ms-transform", MozTransform: "-moz-transform", transform: "transform"};
		document.body.insertBefore(n, null);
		for (var t in i)void 0 !== n.style[t] && (n.style[t] = "translate3d(1px,1px,1px)", e = window.getComputedStyle(n).getPropertyValue(i[t]));
		return document.body.removeChild(n), void 0 !== e && e.length > 0 && "none" !== e
	}, isMobile: function () {
		return navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)
	}, isAndroid: function () {
		return navigator.userAgent.match(/Android/i)
	}, isIOS: function () {
		return navigator.userAgent.match(/iPhone|iPad|iPod/i)
	}, isIE: function () {
		return navigator.userAgent.match(/IEMobile/i) || -1 != navigator.appVersion.indexOf("MSIE")
	}, isBB: function () {
		return navigator.userAgent.match(/BlackBerry|BB10|RIM/i)
	}, isOldIE: function (e) {
		var n = -1 != navigator.appVersion.indexOf("MSIE");
		return n && e > parseFloat(navigator.appVersion.split("MSIE")[1])
	}, androidVersionIsBelow: function (e) {
		var n = navigator.userAgent;
		if (n.indexOf("Android") >= 0) {
			var i = parseFloat(n.slice(n.indexOf("Android") + 8));
			if (e > i)return!0
		}
		return!1
	}}}
})(jQuery);
/*!
* Bootstrap.js by @fat & @mdo
* Copyright 2013 Twitter, Inc.
* http://www.apache.org/licenses/LICENSE-2.0.txt
*/
!function(e){"use strict";e(function(){e.support.transition=function(){var e=function(){var e=document.createElement("bootstrap"),t={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"},n;for(n in t)if(e.style[n]!==undefined)return t[n]}();return e&&{end:e}}()})}(window.jQuery),!function(e){"use strict";var t='[data-dismiss="alert"]',n=function(n){e(n).on("click",t,this.close)};n.prototype.close=function(t){function s(){i.trigger("closed").remove()}var n=e(this),r=n.attr("data-target"),i;r||(r=n.attr("href"),r=r&&r.replace(/.*(?=#[^\s]*$)/,"")),i=e(r),t&&t.preventDefault(),i.length||(i=n.hasClass("alert")?n:n.parent()),i.trigger(t=e.Event("close"));if(t.isDefaultPrevented())return;i.removeClass("in"),e.support.transition&&i.hasClass("fade")?i.on(e.support.transition.end,s):s()};var r=e.fn.alert;e.fn.alert=function(t){return this.each(function(){var r=e(this),i=r.data("alert");i||r.data("alert",i=new n(this)),typeof t=="string"&&i[t].call(r)})},e.fn.alert.Constructor=n,e.fn.alert.noConflict=function(){return e.fn.alert=r,this},e(document).on("click.alert.data-api",t,n.prototype.close)}(window.jQuery),!function(e){"use strict";var t=function(t,n){this.$element=e(t),this.options=e.extend({},e.fn.button.defaults,n)};t.prototype.setState=function(e){var t="disabled",n=this.$element,r=n.data(),i=n.is("input")?"val":"html";e+="Text",r.resetText||n.data("resetText",n[i]()),n[i](r[e]||this.options[e]),setTimeout(function(){e=="loadingText"?n.addClass(t).attr(t,t):n.removeClass(t).removeAttr(t)},0)},t.prototype.toggle=function(){var e=this.$element.closest('[data-toggle="buttons-radio"]');e&&e.find(".active").removeClass("active"),this.$element.toggleClass("active")};var n=e.fn.button;e.fn.button=function(n){return this.each(function(){var r=e(this),i=r.data("button"),s=typeof n=="object"&&n;i||r.data("button",i=new t(this,s)),n=="toggle"?i.toggle():n&&i.setState(n)})},e.fn.button.defaults={loadingText:"loading..."},e.fn.button.Constructor=t,e.fn.button.noConflict=function(){return e.fn.button=n,this},e(document).on("click.button.data-api","[data-toggle^=button]",function(t){var n=e(t.target);n.hasClass("btn")||(n=n.closest(".btn")),n.button("toggle")})}(window.jQuery),!function(e){"use strict";var t=function(t,n){this.$element=e(t),this.$indicators=this.$element.find(".carousel-indicators"),this.options=n,this.options.pause=="hover"&&this.$element.on("mouseenter",e.proxy(this.pause,this)).on("mouseleave",e.proxy(this.cycle,this))};t.prototype={cycle:function(t){return t||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(e.proxy(this.next,this),this.options.interval)),this},getActiveIndex:function(){return this.$active=this.$element.find(".item.active"),this.$items=this.$active.parent().children(),this.$items.index(this.$active)},to:function(t){var n=this.getActiveIndex(),r=this;if(t>this.$items.length-1||t<0)return;return this.sliding?this.$element.one("slid",function(){r.to(t)}):n==t?this.pause().cycle():this.slide(t>n?"next":"prev",e(this.$items[t]))},pause:function(t){return t||(this.paused=!0),this.$element.find(".next, .prev").length&&e.support.transition.end&&(this.$element.trigger(e.support.transition.end),this.cycle(!0)),clearInterval(this.interval),this.interval=null,this},next:function(){if(this.sliding)return;return this.slide("next")},prev:function(){if(this.sliding)return;return this.slide("prev")},slide:function(t,n){var r=this.$element.find(".item.active"),i=n||r[t](),s=this.interval,o=t=="next"?"left":"right",u=t=="next"?"first":"last",a=this,f;this.sliding=!0,s&&this.pause(),i=i.length?i:this.$element.find(".item")[u](),f=e.Event("slide",{relatedTarget:i[0],direction:o});if(i.hasClass("active"))return;this.$indicators.length&&(this.$indicators.find(".active").removeClass("active"),this.$element.one("slid",function(){var t=e(a.$indicators.children()[a.getActiveIndex()]);t&&t.addClass("active")}));if(e.support.transition&&this.$element.hasClass("slide")){this.$element.trigger(f);if(f.isDefaultPrevented())return;i.addClass(t),i[0].offsetWidth,r.addClass(o),i.addClass(o),this.$element.one(e.support.transition.end,function(){i.removeClass([t,o].join(" ")).addClass("active"),r.removeClass(["active",o].join(" ")),a.sliding=!1,setTimeout(function(){a.$element.trigger("slid")},0)})}else{this.$element.trigger(f);if(f.isDefaultPrevented())return;r.removeClass("active"),i.addClass("active"),this.sliding=!1,this.$element.trigger("slid")}return s&&this.cycle(),this}};var n=e.fn.carousel;e.fn.carousel=function(n){return this.each(function(){var r=e(this),i=r.data("carousel"),s=e.extend({},e.fn.carousel.defaults,typeof n=="object"&&n),o=typeof n=="string"?n:s.slide;i||r.data("carousel",i=new t(this,s)),typeof n=="number"?i.to(n):o?i[o]():s.interval&&i.pause().cycle()})},e.fn.carousel.defaults={interval:5e3,pause:"hover"},e.fn.carousel.Constructor=t,e.fn.carousel.noConflict=function(){return e.fn.carousel=n,this},e(document).on("click.carousel.data-api","[data-slide], [data-slide-to]",function(t){var n=e(this),r,i=e(n.attr("data-target")||(r=n.attr("href"))&&r.replace(/.*(?=#[^\s]+$)/,"")),s=e.extend({},i.data(),n.data()),o;i.carousel(s),(o=n.attr("data-slide-to"))&&i.data("carousel").pause().to(o).cycle(),t.preventDefault()})}(window.jQuery),!function(e){"use strict";var t=function(t,n){this.$element=e(t),this.options=e.extend({},e.fn.collapse.defaults,n),this.options.parent&&(this.$parent=e(this.options.parent)),this.options.toggle&&this.toggle()};t.prototype={constructor:t,dimension:function(){var e=this.$element.hasClass("width");return e?"width":"height"},show:function(){var t,n,r,i;if(this.transitioning||this.$element.hasClass("in"))return;t=this.dimension(),n=e.camelCase(["scroll",t].join("-")),r=this.$parent&&this.$parent.find("> .accordion-group > .in");if(r&&r.length){i=r.data("collapse");if(i&&i.transitioning)return;r.collapse("hide"),i||r.data("collapse",null)}this.$element[t](0),this.transition("addClass",e.Event("show"),"shown"),e.support.transition&&this.$element[t](this.$element[0][n])},hide:function(){var t;if(this.transitioning||!this.$element.hasClass("in"))return;t=this.dimension(),this.reset(this.$element[t]()),this.transition("removeClass",e.Event("hide"),"hidden"),this.$element[t](0)},reset:function(e){var t=this.dimension();return this.$element.removeClass("collapse")[t](e||"auto")[0].offsetWidth,this.$element[e!==null?"addClass":"removeClass"]("collapse"),this},transition:function(t,n,r){var i=this,s=function(){n.type=="show"&&i.reset(),i.transitioning=0,i.$element.trigger(r)};this.$element.trigger(n);if(n.isDefaultPrevented())return;this.transitioning=1,this.$element[t]("in"),e.support.transition&&this.$element.hasClass("collapse")?this.$element.one(e.support.transition.end,s):s()},toggle:function(){this[this.$element.hasClass("in")?"hide":"show"]()}};var n=e.fn.collapse;e.fn.collapse=function(n){return this.each(function(){var r=e(this),i=r.data("collapse"),s=e.extend({},e.fn.collapse.defaults,r.data(),typeof n=="object"&&n);i||r.data("collapse",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.collapse.defaults={toggle:!0},e.fn.collapse.Constructor=t,e.fn.collapse.noConflict=function(){return e.fn.collapse=n,this},e(document).on("click.collapse.data-api","[data-toggle=collapse]",function(t){var n=e(this),r,i=n.attr("data-target")||t.preventDefault()||(r=n.attr("href"))&&r.replace(/.*(?=#[^\s]+$)/,""),s=e(i).data("collapse")?"toggle":n.data();n[e(i).hasClass("in")?"addClass":"removeClass"]("collapsed"),e(i).collapse(s)})}(window.jQuery),!function(e){"use strict";function r(){e(".dropdown-backdrop").remove(),e(t).each(function(){i(e(this)).removeClass("open")})}function i(t){var n=t.attr("data-target"),r;n||(n=t.attr("href"),n=n&&/#/.test(n)&&n.replace(/.*(?=#[^\s]*$)/,"")),r=n&&e(n);if(!r||!r.length)r=t.parent();return r}var t="[data-toggle=dropdown]",n=function(t){var n=e(t).on("click.dropdown.data-api",this.toggle);e("html").on("click.dropdown.data-api",function(){n.parent().removeClass("open")})};n.prototype={constructor:n,toggle:function(t){var n=e(this),s,o;if(n.is(".disabled, :disabled"))return;return s=i(n),o=s.hasClass("open"),r(),o||("ontouchstart"in document.documentElement&&e('<div class="dropdown-backdrop"/>').insertBefore(e(this)).on("click",r),s.toggleClass("open")),n.focus(),!1},keydown:function(n){var r,s,o,u,a,f;if(!/(38|40|27)/.test(n.keyCode))return;r=e(this),n.preventDefault(),n.stopPropagation();if(r.is(".disabled, :disabled"))return;u=i(r),a=u.hasClass("open");if(!a||a&&n.keyCode==27)return n.which==27&&u.find(t).focus(),r.click();s=e("[role=menu] li:not(.divider):visible a",u);if(!s.length)return;f=s.index(s.filter(":focus")),n.keyCode==38&&f>0&&f--,n.keyCode==40&&f<s.length-1&&f++,~f||(f=0),s.eq(f).focus()}};var s=e.fn.dropdown;e.fn.dropdown=function(t){return this.each(function(){var r=e(this),i=r.data("dropdown");i||r.data("dropdown",i=new n(this)),typeof t=="string"&&i[t].call(r)})},e.fn.dropdown.Constructor=n,e.fn.dropdown.noConflict=function(){return e.fn.dropdown=s,this},e(document).on("click.dropdown.data-api",r).on("click.dropdown.data-api",".dropdown form",function(e){e.stopPropagation()}).on("click.dropdown.data-api",t,n.prototype.toggle).on("keydown.dropdown.data-api",t+", [role=menu]",n.prototype.keydown)}(window.jQuery),!function(e){"use strict";var t=function(t,n){this.options=n,this.$element=e(t).delegate('[data-dismiss="modal"]',"click.dismiss.modal",e.proxy(this.hide,this)),this.options.remote&&this.$element.find(".modal-body").load(this.options.remote)};t.prototype={constructor:t,toggle:function(){return this[this.isShown?"hide":"show"]()},show:function(){var t=this,n=e.Event("show");this.$element.trigger(n);if(this.isShown||n.isDefaultPrevented())return;this.isShown=!0,this.escape(),this.backdrop(function(){var n=e.support.transition&&t.$element.hasClass("fade");t.$element.parent().length||t.$element.appendTo(document.body),t.$element.show(),n&&t.$element[0].offsetWidth,t.$element.addClass("in").attr("aria-hidden",!1),t.enforceFocus(),n?t.$element.one(e.support.transition.end,function(){t.$element.focus().trigger("shown")}):t.$element.focus().trigger("shown")})},hide:function(t){t&&t.preventDefault();var n=this;t=e.Event("hide"),this.$element.trigger(t);if(!this.isShown||t.isDefaultPrevented())return;this.isShown=!1,this.escape(),e(document).off("focusin.modal"),this.$element.removeClass("in").attr("aria-hidden",!0),e.support.transition&&this.$element.hasClass("fade")?this.hideWithTransition():this.hideModal()},enforceFocus:function(){var t=this;e(document).on("focusin.modal",function(e){t.$element[0]!==e.target&&!t.$element.has(e.target).length&&t.$element.focus()})},escape:function(){var e=this;this.isShown&&this.options.keyboard?this.$element.on("keyup.dismiss.modal",function(t){t.which==27&&e.hide()}):this.isShown||this.$element.off("keyup.dismiss.modal")},hideWithTransition:function(){var t=this,n=setTimeout(function(){t.$element.off(e.support.transition.end),t.hideModal()},500);this.$element.one(e.support.transition.end,function(){clearTimeout(n),t.hideModal()})},hideModal:function(){var e=this;this.$element.hide(),this.backdrop(function(){e.removeBackdrop(),e.$element.trigger("hidden")})},removeBackdrop:function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},backdrop:function(t){var n=this,r=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var i=e.support.transition&&r;this.$backdrop=e('<div class="modal-backdrop '+r+'" />').appendTo(document.body),this.$backdrop.click(this.options.backdrop=="static"?e.proxy(this.$element[0].focus,this.$element[0]):e.proxy(this.hide,this)),i&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in");if(!t)return;i?this.$backdrop.one(e.support.transition.end,t):t()}else!this.isShown&&this.$backdrop?(this.$backdrop.removeClass("in"),e.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one(e.support.transition.end,t):t()):t&&t()}};var n=e.fn.modal;e.fn.modal=function(n){return this.each(function(){var r=e(this),i=r.data("modal"),s=e.extend({},e.fn.modal.defaults,r.data(),typeof n=="object"&&n);i||r.data("modal",i=new t(this,s)),typeof n=="string"?i[n]():s.show&&i.show()})},e.fn.modal.defaults={backdrop:!0,keyboard:!0,show:!0},e.fn.modal.Constructor=t,e.fn.modal.noConflict=function(){return e.fn.modal=n,this},e(document).on("click.modal.data-api",'[data-toggle="modal"]',function(t){var n=e(this),r=n.attr("href"),i=e(n.attr("data-target")||r&&r.replace(/.*(?=#[^\s]+$)/,"")),s=i.data("modal")?"toggle":e.extend({remote:!/#/.test(r)&&r},i.data(),n.data());t.preventDefault(),i.modal(s).one("hide",function(){n.focus()})})}(window.jQuery),!function(e){"use strict";var t=function(e,t){this.init("tooltip",e,t)};t.prototype={constructor:t,init:function(t,n,r){var i,s,o,u,a;this.type=t,this.$element=e(n),this.options=this.getOptions(r),this.enabled=!0,o=this.options.trigger.split(" ");for(a=o.length;a--;)u=o[a],u=="click"?this.$element.on("click."+this.type,this.options.selector,e.proxy(this.toggle,this)):u!="manual"&&(i=u=="hover"?"mouseenter":"focus",s=u=="hover"?"mouseleave":"blur",this.$element.on(i+"."+this.type,this.options.selector,e.proxy(this.enter,this)),this.$element.on(s+"."+this.type,this.options.selector,e.proxy(this.leave,this)));this.options.selector?this._options=e.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},getOptions:function(t){return t=e.extend({},e.fn[this.type].defaults,this.$element.data(),t),t.delay&&typeof t.delay=="number"&&(t.delay={show:t.delay,hide:t.delay}),t},enter:function(t){var n=e.fn[this.type].defaults,r={},i;this._options&&e.each(this._options,function(e,t){n[e]!=t&&(r[e]=t)},this),i=e(t.currentTarget)[this.type](r).data(this.type);if(!i.options.delay||!i.options.delay.show)return i.show();clearTimeout(this.timeout),i.hoverState="in",this.timeout=setTimeout(function(){i.hoverState=="in"&&i.show()},i.options.delay.show)},leave:function(t){var n=e(t.currentTarget)[this.type](this._options).data(this.type);this.timeout&&clearTimeout(this.timeout);if(!n.options.delay||!n.options.delay.hide)return n.hide();n.hoverState="out",this.timeout=setTimeout(function(){n.hoverState=="out"&&n.hide()},n.options.delay.hide)},show:function(){var t,n,r,i,s,o,u=e.Event("show");if(this.hasContent()&&this.enabled){this.$element.trigger(u);if(u.isDefaultPrevented())return;t=this.tip(),this.setContent(),this.options.animation&&t.addClass("fade"),s=typeof this.options.placement=="function"?this.options.placement.call(this,t[0],this.$element[0]):this.options.placement,t.detach().css({top:0,left:0,display:"block"}),this.options.container?t.appendTo(this.options.container):t.insertAfter(this.$element),n=this.getPosition(),r=t[0].offsetWidth,i=t[0].offsetHeight;switch(s){case"bottom":o={top:n.top+n.height,left:n.left+n.width/2-r/2};break;case"top":o={top:n.top-i,left:n.left+n.width/2-r/2};break;case"left":o={top:n.top+n.height/2-i/2,left:n.left-r};break;case"right":o={top:n.top+n.height/2-i/2,left:n.left+n.width}}this.applyPlacement(o,s),this.$element.trigger("shown")}},applyPlacement:function(e,t){var n=this.tip(),r=n[0].offsetWidth,i=n[0].offsetHeight,s,o,u,a;n.offset(e).addClass(t).addClass("in"),s=n[0].offsetWidth,o=n[0].offsetHeight,t=="top"&&o!=i&&(e.top=e.top+i-o,a=!0),t=="bottom"||t=="top"?(u=0,e.left<0&&(u=e.left*-2,e.left=0,n.offset(e),s=n[0].offsetWidth,o=n[0].offsetHeight),this.replaceArrow(u-r+s,s,"left")):this.replaceArrow(o-i,o,"top"),a&&n.offset(e)},replaceArrow:function(e,t,n){this.arrow().css(n,e?50*(1-e/t)+"%":"")},setContent:function(){var e=this.tip(),t=this.getTitle();e.find(".tooltip-inner")[this.options.html?"html":"text"](t),e.removeClass("fade in top bottom left right")},hide:function(){function i(){var t=setTimeout(function(){n.off(e.support.transition.end).detach()},500);n.one(e.support.transition.end,function(){clearTimeout(t),n.detach()})}var t=this,n=this.tip(),r=e.Event("hide");this.$element.trigger(r);if(r.isDefaultPrevented())return;return n.removeClass("in"),e.support.transition&&this.$tip.hasClass("fade")?i():n.detach(),this.$element.trigger("hidden"),this},fixTitle:function(){var e=this.$element;(e.attr("title")||typeof e.attr("data-original-title")!="string")&&e.attr("data-original-title",e.attr("title")||"").attr("title","")},hasContent:function(){return this.getTitle()},getPosition:function(){var t=this.$element[0];return e.extend({},typeof t.getBoundingClientRect=="function"?t.getBoundingClientRect():{width:t.offsetWidth,height:t.offsetHeight},this.$element.offset())},getTitle:function(){var e,t=this.$element,n=this.options;return e=t.attr("data-original-title")||(typeof n.title=="function"?n.title.call(t[0]):n.title),e},tip:function(){return this.$tip=this.$tip||e(this.options.template)},arrow:function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},validate:function(){this.$element[0].parentNode||(this.hide(),this.$element=null,this.options=null)},enable:function(){this.enabled=!0},disable:function(){this.enabled=!1},toggleEnabled:function(){this.enabled=!this.enabled},toggle:function(t){var n=t?e(t.currentTarget)[this.type](this._options).data(this.type):this;n.tip().hasClass("in")?n.hide():n.show()},destroy:function(){this.hide().$element.off("."+this.type).removeData(this.type)}};var n=e.fn.tooltip;e.fn.tooltip=function(n){return this.each(function(){var r=e(this),i=r.data("tooltip"),s=typeof n=="object"&&n;i||r.data("tooltip",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.tooltip.Constructor=t,e.fn.tooltip.defaults={animation:!0,placement:"top",selector:!1,template:'<div class="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,container:!1},e.fn.tooltip.noConflict=function(){return e.fn.tooltip=n,this}}(window.jQuery),!function(e){"use strict";var t=function(e,t){this.init("popover",e,t)};t.prototype=e.extend({},e.fn.tooltip.Constructor.prototype,{constructor:t,setContent:function(){var e=this.tip(),t=this.getTitle(),n=this.getContent();e.find(".popover-title")[this.options.html?"html":"text"](t),e.find(".popover-content")[this.options.html?"html":"text"](n),e.removeClass("fade top bottom left right in")},hasContent:function(){return this.getTitle()||this.getContent()},getContent:function(){var e,t=this.$element,n=this.options;return e=(typeof n.content=="function"?n.content.call(t[0]):n.content)||t.attr("data-content"),e},tip:function(){return this.$tip||(this.$tip=e(this.options.template)),this.$tip},destroy:function(){this.hide().$element.off("."+this.type).removeData(this.type)}});var n=e.fn.popover;e.fn.popover=function(n){return this.each(function(){var r=e(this),i=r.data("popover"),s=typeof n=="object"&&n;i||r.data("popover",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.popover.Constructor=t,e.fn.popover.defaults=e.extend({},e.fn.tooltip.defaults,{placement:"right",trigger:"click",content:"",template:'<div class="popover"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'}),e.fn.popover.noConflict=function(){return e.fn.popover=n,this}}(window.jQuery),!function(e){"use strict";function t(t,n){var r=e.proxy(this.process,this),i=e(t).is("body")?e(window):e(t),s;this.options=e.extend({},e.fn.scrollspy.defaults,n),this.$scrollElement=i.on("scroll.scroll-spy.data-api",r),this.selector=(this.options.target||(s=e(t).attr("href"))&&s.replace(/.*(?=#[^\s]+$)/,"")||"")+" .nav li > a",this.$body=e("body"),this.refresh(),this.process()}t.prototype={constructor:t,refresh:function(){var t=this,n;this.offsets=e([]),this.targets=e([]),n=this.$body.find(this.selector).map(function(){var n=e(this),r=n.data("target")||n.attr("href"),i=/^#\w/.test(r)&&e(r);return i&&i.length&&[[i.position().top+(!e.isWindow(t.$scrollElement.get(0))&&t.$scrollElement.scrollTop()),r]]||null}).sort(function(e,t){return e[0]-t[0]}).each(function(){t.offsets.push(this[0]),t.targets.push(this[1])})},process:function(){var e=this.$scrollElement.scrollTop()+this.options.offset,t=this.$scrollElement[0].scrollHeight||this.$body[0].scrollHeight,n=t-this.$scrollElement.height(),r=this.offsets,i=this.targets,s=this.activeTarget,o;if(e>=n)return s!=(o=i.last()[0])&&this.activate(o);for(o=r.length;o--;)s!=i[o]&&e>=r[o]&&(!r[o+1]||e<=r[o+1])&&this.activate(i[o])},activate:function(t){var n,r;this.activeTarget=t,e(this.selector).parent(".active").removeClass("active"),r=this.selector+'[data-target="'+t+'"],'+this.selector+'[href="'+t+'"]',n=e(r).parent("li").addClass("active"),n.parent(".dropdown-menu").length&&(n=n.closest("li.dropdown").addClass("active")),n.trigger("activate")}};var n=e.fn.scrollspy;e.fn.scrollspy=function(n){return this.each(function(){var r=e(this),i=r.data("scrollspy"),s=typeof n=="object"&&n;i||r.data("scrollspy",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.scrollspy.Constructor=t,e.fn.scrollspy.defaults={offset:10},e.fn.scrollspy.noConflict=function(){return e.fn.scrollspy=n,this},e(window).on("load",function(){e('[data-spy="scroll"]').each(function(){var t=e(this);t.scrollspy(t.data())})})}(window.jQuery),!function(e){"use strict";var t=function(t){this.element=e(t)};t.prototype={constructor:t,show:function(){var t=this.element,n=t.closest("ul:not(.dropdown-menu)"),r=t.attr("data-target"),i,s,o;r||(r=t.attr("href"),r=r&&r.replace(/.*(?=#[^\s]*$)/,""));if(t.parent("li").hasClass("active"))return;i=n.find(".active:last a")[0],o=e.Event("show",{relatedTarget:i}),t.trigger(o);if(o.isDefaultPrevented())return;s=e(r),this.activate(t.parent("li"),n),this.activate(s,s.parent(),function(){t.trigger({type:"shown",relatedTarget:i})})},activate:function(t,n,r){function o(){i.removeClass("active").find("> .dropdown-menu > .active").removeClass("active"),t.addClass("active"),s?(t[0].offsetWidth,t.addClass("in")):t.removeClass("fade"),t.parent(".dropdown-menu")&&t.closest("li.dropdown").addClass("active"),r&&r()}var i=n.find("> .active"),s=r&&e.support.transition&&i.hasClass("fade");s?i.one(e.support.transition.end,o):o(),i.removeClass("in")}};var n=e.fn.tab;e.fn.tab=function(n){return this.each(function(){var r=e(this),i=r.data("tab");i||r.data("tab",i=new t(this)),typeof n=="string"&&i[n]()})},e.fn.tab.Constructor=t,e.fn.tab.noConflict=function(){return e.fn.tab=n,this},e(document).on("click.tab.data-api",'[data-toggle="tab"], [data-toggle="pill"]',function(t){t.preventDefault(),e(this).tab("show")})}(window.jQuery),!function(e){"use strict";var t=function(t,n){this.$element=e(t),this.options=e.extend({},e.fn.typeahead.defaults,n),this.matcher=this.options.matcher||this.matcher,this.sorter=this.options.sorter||this.sorter,this.highlighter=this.options.highlighter||this.highlighter,this.updater=this.options.updater||this.updater,this.source=this.options.source,this.$menu=e(this.options.menu),this.shown=!1,this.listen()};t.prototype={constructor:t,select:function(){var e=this.$menu.find(".active").attr("data-value");return this.$element.val(this.updater(e)).change(),this.hide()},updater:function(e){return e},show:function(){var t=e.extend({},this.$element.position(),{height:this.$element[0].offsetHeight});return this.$menu.insertAfter(this.$element).css({top:t.top+t.height,left:t.left}).show(),this.shown=!0,this},hide:function(){return this.$menu.hide(),this.shown=!1,this},lookup:function(t){var n;return this.query=this.$element.val(),!this.query||this.query.length<this.options.minLength?this.shown?this.hide():this:(n=e.isFunction(this.source)?this.source(this.query,e.proxy(this.process,this)):this.source,n?this.process(n):this)},process:function(t){var n=this;return t=e.grep(t,function(e){return n.matcher(e)}),t=this.sorter(t),t.length?this.render(t.slice(0,this.options.items)).show():this.shown?this.hide():this},matcher:function(e){return~e.toLowerCase().indexOf(this.query.toLowerCase())},sorter:function(e){var t=[],n=[],r=[],i;while(i=e.shift())i.toLowerCase().indexOf(this.query.toLowerCase())?~i.indexOf(this.query)?n.push(i):r.push(i):t.push(i);return t.concat(n,r)},highlighter:function(e){var t=this.query.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&");return e.replace(new RegExp("("+t+")","ig"),function(e,t){return"<strong>"+t+"</strong>"})},render:function(t){var n=this;return t=e(t).map(function(t,r){return t=e(n.options.item).attr("data-value",r),t.find("a").html(n.highlighter(r)),t[0]}),t.first().addClass("active"),this.$menu.html(t),this},next:function(t){var n=this.$menu.find(".active").removeClass("active"),r=n.next();r.length||(r=e(this.$menu.find("li")[0])),r.addClass("active")},prev:function(e){var t=this.$menu.find(".active").removeClass("active"),n=t.prev();n.length||(n=this.$menu.find("li").last()),n.addClass("active")},listen:function(){this.$element.on("focus",e.proxy(this.focus,this)).on("blur",e.proxy(this.blur,this)).on("keypress",e.proxy(this.keypress,this)).on("keyup",e.proxy(this.keyup,this)),this.eventSupported("keydown")&&this.$element.on("keydown",e.proxy(this.keydown,this)),this.$menu.on("click",e.proxy(this.click,this)).on("mouseenter","li",e.proxy(this.mouseenter,this)).on("mouseleave","li",e.proxy(this.mouseleave,this))},eventSupported:function(e){var t=e in this.$element;return t||(this.$element.setAttribute(e,"return;"),t=typeof this.$element[e]=="function"),t},move:function(e){if(!this.shown)return;switch(e.keyCode){case 9:case 13:case 27:e.preventDefault();break;case 38:e.preventDefault(),this.prev();break;case 40:e.preventDefault(),this.next()}e.stopPropagation()},keydown:function(t){this.suppressKeyPressRepeat=~e.inArray(t.keyCode,[40,38,9,13,27]),this.move(t)},keypress:function(e){if(this.suppressKeyPressRepeat)return;this.move(e)},keyup:function(e){switch(e.keyCode){case 40:case 38:case 16:case 17:case 18:break;case 9:case 13:if(!this.shown)return;this.select();break;case 27:if(!this.shown)return;this.hide();break;default:this.lookup()}e.stopPropagation(),e.preventDefault()},focus:function(e){this.focused=!0},blur:function(e){this.focused=!1,!this.mousedover&&this.shown&&this.hide()},click:function(e){e.stopPropagation(),e.preventDefault(),this.select(),this.$element.focus()},mouseenter:function(t){this.mousedover=!0,this.$menu.find(".active").removeClass("active"),e(t.currentTarget).addClass("active")},mouseleave:function(e){this.mousedover=!1,!this.focused&&this.shown&&this.hide()}};var n=e.fn.typeahead;e.fn.typeahead=function(n){return this.each(function(){var r=e(this),i=r.data("typeahead"),s=typeof n=="object"&&n;i||r.data("typeahead",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.typeahead.defaults={source:[],items:8,menu:'<ul class="typeahead dropdown-menu"></ul>',item:'<li><a href="#"></a></li>',minLength:1},e.fn.typeahead.Constructor=t,e.fn.typeahead.noConflict=function(){return e.fn.typeahead=n,this},e(document).on("focus.typeahead.data-api",'[data-provide="typeahead"]',function(t){var n=e(this);if(n.data("typeahead"))return;n.typeahead(n.data())})}(window.jQuery),!function(e){"use strict";var t=function(t,n){this.options=e.extend({},e.fn.affix.defaults,n),this.$window=e(window).on("scroll.affix.data-api",e.proxy(this.checkPosition,this)).on("click.affix.data-api",e.proxy(function(){setTimeout(e.proxy(this.checkPosition,this),1)},this)),this.$element=e(t),this.checkPosition()};t.prototype.checkPosition=function(){if(!this.$element.is(":visible"))return;var t=e(document).height(),n=this.$window.scrollTop(),r=this.$element.offset(),i=this.options.offset,s=i.bottom,o=i.top,u="affix affix-top affix-bottom",a;typeof i!="object"&&(s=o=i),typeof o=="function"&&(o=i.top()),typeof s=="function"&&(s=i.bottom()),a=this.unpin!=null&&n+this.unpin<=r.top?!1:s!=null&&r.top+this.$element.height()>=t-s?"bottom":o!=null&&n<=o?"top":!1;if(this.affixed===a)return;this.affixed=a,this.unpin=a=="bottom"?r.top-n:null,this.$element.removeClass(u).addClass("affix"+(a?"-"+a:""))};var n=e.fn.affix;e.fn.affix=function(n){return this.each(function(){var r=e(this),i=r.data("affix"),s=typeof n=="object"&&n;i||r.data("affix",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.affix.Constructor=t,e.fn.affix.defaults={offset:0},e.fn.affix.noConflict=function(){return e.fn.affix=n,this},e(window).on("load",function(){e('[data-spy="affix"]').each(function(){var t=e(this),n=t.data();n.offset=n.offset||{},n.offsetBottom&&(n.offset.bottom=n.offsetBottom),n.offsetTop&&(n.offset.top=n.offsetTop),t.affix(n)})})}(window.jQuery);
/**
 * MBP - Mobile boilerplate helper functions
 */

(function(document) {

	window.MBP = window.MBP || {};

	/**
	 * Fix for iPhone viewport scale bug
	 * http://www.blog.highub.com/mobile-2/a-fix-for-iphone-viewport-scale-bug/
	 */

	MBP.viewportmeta = document.querySelector && document.querySelector('meta[name="viewport"]');
	MBP.ua = navigator.userAgent;

	MBP.scaleFix = function() {
		if (MBP.viewportmeta && /iPhone|iPad|iPod/.test(MBP.ua) && !/Opera Mini/.test(MBP.ua)) {
			MBP.viewportmeta.content = 'width=device-width, minimum-scale=1.0, maximum-scale=1.0';
			document.addEventListener('gesturestart', MBP.gestureStart, false);
		}
	};

	MBP.gestureStart = function() {
		MBP.viewportmeta.content = 'width=device-width, minimum-scale=0.25, maximum-scale=1.6';
	};

	/**
	 * Normalized hide address bar for iOS & Android
	 * (c) Scott Jehl, scottjehl.com
	 * MIT License
	 */

		// If we split this up into two functions we can reuse
		// this function if we aren't doing full page reloads.

		// If we cache this we don't need to re-calibrate everytime we call
		// the hide url bar
	MBP.BODY_SCROLL_TOP = false;

	// So we don't redefine this function everytime we
	// we call hideUrlBar
	MBP.getScrollTop = function() {
		var win = window;
		var doc = document;

		return win.pageYOffset || doc.compatMode === 'CSS1Compat' && doc.documentElement.scrollTop || doc.body.scrollTop || 0;
	};

	// It should be up to the mobile
	MBP.hideUrlBar = function() {
		var win = window;

		// if there is a hash, or MBP.BODY_SCROLL_TOP hasn't been set yet, wait till that happens
		if (!location.hash && MBP.BODY_SCROLL_TOP !== false) {
			win.scrollTo( 0, MBP.BODY_SCROLL_TOP === 1 ? 0 : 1 );
		}
	};

	MBP.hideUrlBarOnLoad = function() {
		var win = window;
		var doc = win.document;
		var bodycheck;

		// If there's a hash, or addEventListener is undefined, stop here
		if ( !location.hash && win.addEventListener ) {

			// scroll to 1
			window.scrollTo( 0, 1 );
			MBP.BODY_SCROLL_TOP = 1;

			// reset to 0 on bodyready, if needed
			bodycheck = setInterval(function() {
				if ( doc.body ) {
					clearInterval( bodycheck );
					MBP.BODY_SCROLL_TOP = MBP.getScrollTop();
					MBP.hideUrlBar();
				}
			}, 15 );

			win.addEventListener('load', function() {
				setTimeout(function() {
					// at load, if user hasn't scrolled more than 20 or so...
					if (MBP.getScrollTop() < 20) {
						// reset to hide addr bar at onload
						MBP.hideUrlBar();
					}
				}, 0);
			});
		}
	};

	/**
	 * Fast Buttons - read wiki below before using
	 * https://github.com/h5bp/mobile-boilerplate/wiki/JavaScript-Helper
	 */

	MBP.fastButton = function(element, handler, pressedClass) {
		this.handler = handler;
		// styling of .pressed is defined in the project's CSS files
		this.pressedClass = typeof pressedClass === 'undefined' ? 'pressed' : pressedClass;

		if (element.length && element.length > 1) {
			for (var singleElIdx in element) {
				this.addClickEvent(element[singleElIdx]);
			}
		} else {
			this.addClickEvent(element);
		}
	};

	MBP.fastButton.prototype.handleEvent = function(event) {
		event = event || window.event;

		switch (event.type) {
			case 'touchstart': this.onTouchStart(event); break;
			case 'touchmove': this.onTouchMove(event); break;
			case 'touchend': this.onClick(event); break;
			case 'click': this.onClick(event); break;
		}
	};

	MBP.fastButton.prototype.onTouchStart = function(event) {
		var element = event.target || event.srcElement;
		event.stopPropagation();
		element.addEventListener('touchend', this, false);
		document.body.addEventListener('touchmove', this, false);
		this.startX = event.touches[0].clientX;
		this.startY = event.touches[0].clientY;

		element.className+= ' ' + this.pressedClass;
	};

	MBP.fastButton.prototype.onTouchMove = function(event) {
		if (Math.abs(event.touches[0].clientX - this.startX) > 10 ||
			Math.abs(event.touches[0].clientY - this.startY) > 10) {
			this.reset(event);
		}
	};

	MBP.fastButton.prototype.onClick = function(event) {
		event = event || window.event;
		var element = event.target || event.srcElement;
		if (event.stopPropagation) {
			event.stopPropagation();
		}
		this.reset(event);
		this.handler.apply(event.currentTarget, [event]);
		if (event.type == 'touchend') {
			MBP.preventGhostClick(this.startX, this.startY);
		}
		var pattern = new RegExp(' ?' + this.pressedClass, 'gi');
		element.className = element.className.replace(pattern, '');
	};

	MBP.fastButton.prototype.reset = function(event) {
		var element = event.target || event.srcElement;
		rmEvt(element, 'touchend', this, false);
		rmEvt(document.body, 'touchmove', this, false);

		var pattern = new RegExp(' ?' + this.pressedClass, 'gi');
		element.className = element.className.replace(pattern, '');
	};

	MBP.fastButton.prototype.addClickEvent = function(element) {
		addEvt(element, 'touchstart', this, false);
		addEvt(element, 'click', this, false);
	};

	MBP.preventGhostClick = function(x, y) {
		MBP.coords.push(x, y);
		window.setTimeout(function() {
			MBP.coords.splice(0, 2);
		}, 2500);
	};

	MBP.ghostClickHandler = function(event) {
		if (!MBP.hadTouchEvent && MBP.dodgyAndroid) {
			// This is a bit of fun for Android 2.3...
			// If you change window.location via fastButton, a click event will fire
			// on the new page, as if the events are continuing from the previous page.
			// We pick that event up here, but MBP.coords is empty, because it's a new page,
			// so we don't prevent it. Here's we're assuming that click events on touch devices
			// that occur without a preceding touchStart are to be ignored.
			event.stopPropagation();
			event.preventDefault();
			return;
		}
		for (var i = 0, len = MBP.coords.length; i < len; i += 2) {
			var x = MBP.coords[i];
			var y = MBP.coords[i + 1];
			if (Math.abs(event.clientX - x) < 25 && Math.abs(event.clientY - y) < 25) {
				event.stopPropagation();
				event.preventDefault();
			}
		}
	};

	// This bug only affects touch Android 2.3 devices, but a simple ontouchstart test creates a false positive on
	// some Blackberry devices. https://github.com/Modernizr/Modernizr/issues/372
	// The browser sniffing is to avoid the Blackberry case. Bah
	MBP.dodgyAndroid = ('ontouchstart' in window) && (navigator.userAgent.indexOf('Android 2.3') != -1);

	if (document.addEventListener) {
		document.addEventListener('click', MBP.ghostClickHandler, true);
	}

	addEvt(document.documentElement, 'touchstart', function() {
		MBP.hadTouchEvent = true;
	}, false);

	MBP.coords = [];

	// fn arg can be an object or a function, thanks to handleEvent
	// read more about the explanation at: http://www.thecssninja.com/javascript/handleevent
	function addEvt(el, evt, fn, bubble) {
		if ('addEventListener' in el) {
			// BBOS6 doesn't support handleEvent, catch and polyfill
			try {
				el.addEventListener(evt, fn, bubble);
			} catch(e) {
				if (typeof fn == 'object' && fn.handleEvent) {
					el.addEventListener(evt, function(e){
						// Bind fn as this and set first arg as event object
						fn.handleEvent.call(fn,e);
					}, bubble);
				} else {
					throw e;
				}
			}
		} else if ('attachEvent' in el) {
			// check if the callback is an object and contains handleEvent
			if (typeof fn == 'object' && fn.handleEvent) {
				el.attachEvent('on' + evt, function(){
					// Bind fn as this
					fn.handleEvent.call(fn);
				});
			} else {
				el.attachEvent('on' + evt, fn);
			}
		}
	}

	function rmEvt(el, evt, fn, bubble) {
		if ('removeEventListener' in el) {
			// BBOS6 doesn't support handleEvent, catch and polyfill
			try {
				el.removeEventListener(evt, fn, bubble);
			} catch(e) {
				if (typeof fn == 'object' && fn.handleEvent) {
					el.removeEventListener(evt, function(e){
						// Bind fn as this and set first arg as event object
						fn.handleEvent.call(fn,e);
					}, bubble);
				} else {
					throw e;
				}
			}
		} else if ('detachEvent' in el) {
			// check if the callback is an object and contains handleEvent
			if (typeof fn == 'object' && fn.handleEvent) {
				el.detachEvent("on" + evt, function() {
					// Bind fn as this
					fn.handleEvent.call(fn);
				});
			} else {
				el.detachEvent('on' + evt, fn);
			}
		}
	}

	/**
	 * Autogrow
	 * http://googlecode.blogspot.com/2009/07/gmail-for-mobile-html5-series.html
	 */

	MBP.autogrow = function(element, lh) {
		function handler(e) {
			var newHeight = this.scrollHeight;
			var currentHeight = this.clientHeight;
			if (newHeight > currentHeight) {
				this.style.height = newHeight + 3 * textLineHeight + 'px';
			}
		}

		var setLineHeight = (lh) ? lh : 12;
		var textLineHeight = element.currentStyle ? element.currentStyle.lineHeight : getComputedStyle(element, null).lineHeight;

		textLineHeight = (textLineHeight.indexOf('px') == -1) ? setLineHeight : parseInt(textLineHeight, 10);

		element.style.overflow = 'hidden';
		element.addEventListener ? element.addEventListener('input', handler, false) : element.attachEvent('onpropertychange', handler);
	};

	/**
	 * Enable CSS active pseudo styles in Mobile Safari
	 * http://alxgbsn.co.uk/2011/10/17/enable-css-active-pseudo-styles-in-mobile-safari/
	 */

	MBP.enableActive = function() {
		document.addEventListener('touchstart', function() {}, false);
	};

	/**
	 * Prevent default scrolling on document window
	 */

	MBP.preventScrolling = function() {
		document.addEventListener('touchmove', function(e) {
			if (e.target.type === 'range') { return; }
			e.preventDefault();
		}, false);
	};

	/**
	 * Prevent iOS from zooming onfocus
	 * https://github.com/h5bp/mobile-boilerplate/pull/108
	 * Adapted from original jQuery code here: http://nerd.vasilis.nl/prevent-ios-from-zooming-onfocus/
	 */

	MBP.preventZoom = function() {
		var formFields = document.querySelectorAll('input, select, textarea');
		var contentString = 'width=device-width,initial-scale=1,maximum-scale=';
		var i = 0;

		for (i = 0; i < formFields.length; i++) {
			formFields[i].onfocus = function() {
				MBP.viewportmeta.content = contentString + '1';
			};
			formFields[i].onblur = function() {
				MBP.viewportmeta.content = contentString + '10';
			};
		}
	};

	/**
	 * iOS Startup Image helper
	 */

	MBP.startupImage = function() {
		var portrait;
		var landscape;
		var pixelRatio;
		var head;
		var link1;
		var link2;

		pixelRatio = window.devicePixelRatio;
		head = document.getElementsByTagName('head')[0];

		if (navigator.platform === 'iPad') {
			portrait = pixelRatio === 2 ? 'img/startup/startup-tablet-portrait-retina.png' : 'img/startup/startup-tablet-portrait.png';
			landscape = pixelRatio === 2 ? 'img/startup/startup-tablet-landscape-retina.png' : 'img/startup/startup-tablet-landscape.png';

			link1 = document.createElement('link');
			link1.setAttribute('rel', 'apple-touch-startup-image');
			link1.setAttribute('media', 'screen and (orientation: portrait)');
			link1.setAttribute('href', portrait);
			head.appendChild(link1);

			link2 = document.createElement('link');
			link2.setAttribute('rel', 'apple-touch-startup-image');
			link2.setAttribute('media', 'screen and (orientation: landscape)');
			link2.setAttribute('href', landscape);
			head.appendChild(link2);
		} else {
			portrait = pixelRatio === 2 ? "img/startup/startup-retina.png" : "img/startup/startup.png";
			portrait = screen.height === 568 ? "img/startup/startup-retina-4in.png" : portrait;
			link1 = document.createElement('link');
			link1.setAttribute('rel', 'apple-touch-startup-image');
			link1.setAttribute('href', portrait);
			head.appendChild(link1);
		}

		//hack to fix letterboxed full screen web apps on 4" iPhone / iPod
		if ((navigator.platform === 'iPhone' || 'iPod') && (screen.height === 568)) {
			if (MBP.viewportmeta) {
				MBP.viewportmeta.content = MBP.viewportmeta.content
					.replace(/\bwidth\s*=\s*320\b/, 'width=320.1')
					.replace(/\bwidth\s*=\s*device-width\b/, '');
			}
		}
	};

})(document);

// Avoid `console` errors in browsers that lack a console.
(function() {
	var method;
	var noop = function () {};
	var methods = [
		'assert', 'clear', 'count', 'debug', 'dir', 'dirxml', 'error',
		'exception', 'group', 'groupCollapsed', 'groupEnd', 'info', 'log',
		'markTimeline', 'profile', 'profileEnd', 'table', 'time', 'timeEnd',
		'timeStamp', 'trace', 'warn'
	];
	var length = methods.length;
	var console = (window.console = window.console || {});

	while (length--) {
		method = methods[length];

		// Only stub undefined methods.
		if (!console[method]) {
			console[method] = noop;
		}
	}
}());
/**************************************************************************
 * jquery.themepunch.revolution.js - jQuery Plugin for Revolution Slider
 * @version: 3.0.8 (06.08.2013)
 * @requires jQuery v1.7 or later (tested on 1.9)
 * @author ThemePunch
 **************************************************************************/


/********************************************
 -    THEMEPUNCH TOOLS Ver. 1.0     -
 Last Update of Tools 28.03.2013
 *********************************************/

/*!
 * jQuery Transit - CSS3 transitions and transformations
 * Copyright(c) 2011 Rico Sta. Cruz <rico@ricostacruz.com>
 * MIT Licensed.
 *
 * http://ricostacruz.com/jquery.transit
 * http://github.com/rstacruz/jquery.transit
 */

/*!
 jQuery WaitForImages

 Copyright (c) 2012 Alex Dickson

 Permission is hereby granted, free of charge, to any person
 obtaining a copy of this software and associated documentation
 files (the "Software"), to deal in the Software without
 restriction, including without limitation the rights to use,
 copy, modify, merge, publish, distribute, sublicense, and/or sell
 copies of the Software, and to permit persons to whom the
 Software is furnished to do so, subject to the following
 conditions:

 The above copyright notice and this permission notice shall be
 included in all copies or substantial portions of the Software.

 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
 OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
 NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
 HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
 WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
 FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
 OTHER DEALINGS IN THE SOFTWARE.


 https://github.com/alexanderdickson/waitForImages


 */

// WAIT FOR IMAGES
/*
 * waitForImages 1.4
 * -----------------
 * Provides a callback when all images have loaded in your given selector.
 * http://www.alexanderdickson.com/
 *
 *
 * Copyright (c) 2011 Alex Dickson
 * Licensed under the MIT licenses.
 * See website for more info.
 *
 */

// EASINGS

/*!
 * jQuery Transit - CSS3 transitions and transformations
 * (c) 2011-2012 Rico Sta. Cruz <rico@ricostacruz.com>
 * MIT Licensed.
 *
 * http://ricostacruz.com/jquery.transit
 * http://github.com/rstacruz/jquery.transit
 */
function revslider_showDoubleJqueryError(e) {
	var t = "Revolution Slider Error: You have some jquery.js library include that comes after the revolution files js include.";
	t += "<br> This includes make eliminates the revolution slider libraries, and make it not work.";
	t += "<br><br> To fix it you can:<br>    1. In the Slider Settings -> Troubleshooting set option:  <strong><b>Put JS Includes To Body</b></strong> option to true.";
	t += "<br>    2. Find the double jquery.js include and remove it.";
	t = "<span style='font-size:16px;color:#BC0C06;'>" + t + "</span>";
	jQuery(e).show().html(t)
}
(function (e) {
	function r(e) {
		if (e in t.style) {
			return e;
		}
		var n = ["Moz", "Webkit", "O", "ms"];
		var r = e.charAt(0).toUpperCase() + e.substr(1);
		if (e in t.style) {
			return e
		}
		for (var i = 0; i < n.length; ++i) {
			var s = n[i] + r;
			if (s in t.style) {
				return s
			}
		}
	}

	function i() {
		t.style[n.transform] = "";
		t.style[n.transform] = "rotateY(90deg)";
		return t.style[n.transform] !== ""
	}

	function f(e) {
		if (typeof e === "string") {
			this.parse(e)
		}
		return this
	}

	function l(e, t, n) {
		if (t === true) {
			e.queue(n)
		} else if (t) {
			e.queue(t, n)
		} else {
			n()
		}
	}

	function c(t) {
		var n = [];
		e.each(t, function (t) {
			t = e.camelCase(t);
			t = e.transit.propertyMap[t] || e.cssProps[t] || t;
			t = d(t);
			if (e.inArray(t, n) === -1) {
				n.push(t)
			}
		});
		return n
	}

	function h(t, n, r, i) {
		var s = c(t);
		if (e.cssEase[r]) {
			r = e.cssEase[r]
		}
		var o = "" + m(n) + " " + r;
		if (parseInt(i, 10) > 0) {
			o += " " + m(i)
		}
		var u = [];
		e.each(s, function (e, t) {
			u.push(t + " " + o)
		});
		return u.join(", ")
	}

	function p(t, r) {
		if (!r) {
			e.cssNumber[t] = true
		}
		e.transit.propertyMap[t] = n.transform;
		e.cssHooks[t] = {get: function (n) {
			var r = e(n).css("transit:transform");
			return r.get(t)
		}, set: function (n, r) {
			var i = e(n).css("transit:transform");
			i.setFromString(t, r);
			e(n).css({"transit:transform": i})
		}}
	}

	function d(e) {
		return e.replace(/([A-Z])/g, function (e) {
			return"-" + e.toLowerCase()
		})
	}

	function v(e, t) {
		if (typeof e === "string" && !e.match(/^[\-0-9\.]+$/)) {
			return e
		} else {
			return"" + e + t
		}
	}

	function m(t) {
		var n = t;
		if (typeof n === "string" && !n.match(/^[\-0-9\.]+/)) {
			n = e.fx.speeds[n] || e.fx.speeds._default
		}
		return v(n, "ms")
	}

	e.transit = {version: "0.9.9", propertyMap: {marginLeft: "margin", marginRight: "margin", marginBottom: "margin", marginTop: "margin", paddingLeft: "padding", paddingRight: "padding", paddingBottom: "padding", paddingTop: "padding"}, enabled: true, useTransitionEnd: false};
	var t = document.createElement("div");
	var n = {};
	var s = navigator.userAgent.toLowerCase().indexOf("chrome") > -1;
	n.transition = r("transition");
	n.transitionDelay = r("transitionDelay");
	n.transform = r("transform");
	n.transformOrigin = r("transformOrigin");
	n.transform3d = i();
	var o = {transition: "transitionEnd", MozTransition: "transitionend", OTransition: "oTransitionEnd", WebkitTransition: "webkitTransitionEnd", msTransition: "MSTransitionEnd"};
	var u = n.transitionEnd = o[n.transition] || null;
	for (var a in n) {
		if (n.hasOwnProperty(a) && typeof e.support[a] === "undefined") {
			e.support[a] = n[a]
		}
	}
	t = null;
	e.cssEase = {_default: "ease", "in": "ease-in", out: "ease-out", "in-out": "ease-in-out", snap: "cubic-bezier(0,1,.5,1)", easeInCubic: "cubic-bezier(.55, .055, .675, .19)", easeOutCubic: "cubic-bezier(.215,.61,.355,1)", easeInOutCubic: "cubic-bezier(.645,.045,.355,1)", easeInCirc: "cubic-bezier(.6,.04,.98,.335)", easeOutCirc: "cubic-bezier(.075,.82,.165,1)", easeInOutCirc: "cubic-bezier(.785,.135,.15,.86)", easeInExpo: "cubic-bezier(.95,.05,.795,.035)", easeOutExpo: "cubic-bezier(.19,1,.22,1)", easeInOutExpo: "cubic-bezier(1,0,0,1)", easeInQuad: "cubic-bezier(.55,.085,.68,.53)", easeOutQuad: "cubic-bezier(.25,.46,.45,.94)", easeInOutQuad: "cubic-bezier(.455,.03,.515,.955)", easeInQuart: "cubic-bezier(.895,.03,.685,.22)", easeOutQuart: "cubic-bezier(.165,.84,.44,1)", easeInOutQuart: "cubic-bezier(.77,0,.175,1)", easeInQuint: "cubic-bezier(.755,.05,.855,.06)", easeOutQuint: "cubic-bezier(.23,1,.32,1)", easeInOutQuint: "cubic-bezier(.86,0,.07,1)", easeInSine: "cubic-bezier(.47,0,.745,.715)", easeOutSine: "cubic-bezier(.39,.575,.565,1)", easeInOutSine: "cubic-bezier(.445,.05,.55,.95)", easeInBack: "cubic-bezier(.6,-.28,.735,.045)", easeOutBack: "cubic-bezier(.175, .885,.32,1.275)", easeInOutBack: "cubic-bezier(.68,-.55,.265,1.55)"};
	e.cssHooks["transit:transform"] = {get: function (t) {
		return e(t).data("transform") || new f
	}, set: function (t, r) {
		var i = r;
		if (!(i instanceof f)) {
			i = new f(i)
		}
		if (n.transform === "WebkitTransform" && !s) {
			t.style[n.transform] = i.toString(true)
		} else {
			t.style[n.transform] = i.toString()
		}
		e(t).data("transform", i)
	}};
	e.cssHooks.transform = {set: e.cssHooks["transit:transform"].set};
	if (e.fn.jquery < "1.8") {
		e.cssHooks.transformOrigin = {get: function (e) {
			return e.style[n.transformOrigin]
		}, set: function (e, t) {
			e.style[n.transformOrigin] = t
		}};
		e.cssHooks.transition = {get: function (e) {
			return e.style[n.transition]
		}, set: function (e, t) {
			e.style[n.transition] = t
		}}
	}
	p("scale");
	p("translate");
	p("rotate");
	p("rotateX");
	p("rotateY");
	p("rotate3d");
	p("perspective");
	p("skewX");
	p("skewY");
	p("x", true);
	p("y", true);
	f.prototype = {setFromString: function (e, t) {
		var n = typeof t === "string" ? t.split(",") : t.constructor === Array ? t : [t];
		n.unshift(e);
		f.prototype.set.apply(this, n)
	}, set: function (e) {
		var t = Array.prototype.slice.apply(arguments, [1]);
		if (this.setter[e]) {
			this.setter[e].apply(this, t)
		} else {
			this[e] = t.join(",")
		}
	}, get: function (e) {
		if (this.getter[e]) {
			return this.getter[e].apply(this)
		} else {
			return this[e] || 0
		}
	}, setter: {rotate: function (e) {
		this.rotate = v(e, "deg")
	}, rotateX: function (e) {
		this.rotateX = v(e, "deg")
	}, rotateY: function (e) {
		this.rotateY = v(e, "deg")
	}, scale: function (e, t) {
		if (t === undefined) {
			t = e
		}
		this.scale = e + "," + t
	}, skewX: function (e) {
		this.skewX = v(e, "deg")
	}, skewY: function (e) {
		this.skewY = v(e, "deg")
	}, perspective: function (e) {
		this.perspective = v(e, "px")
	}, x: function (e) {
		this.set("translate", e, null)
	}, y: function (e) {
		this.set("translate", null, e)
	}, translate: function (e, t) {
		if (this._translateX === undefined) {
			this._translateX = 0
		}
		if (this._translateY === undefined) {
			this._translateY = 0
		}
		if (e !== null && e !== undefined) {
			this._translateX = v(e, "px")
		}
		if (t !== null && t !== undefined) {
			this._translateY = v(t, "px")
		}
		this.translate = this._translateX + "," + this._translateY
	}}, getter: {x: function () {
		return this._translateX || 0
	}, y: function () {
		return this._translateY || 0
	}, scale: function () {
		var e = (this.scale || "1,1").split(",");
		if (e[0]) {
			e[0] = parseFloat(e[0])
		}
		if (e[1]) {
			e[1] = parseFloat(e[1])
		}
		return e[0] === e[1] ? e[0] : e
	}, rotate3d: function () {
		var e = (this.rotate3d || "0,0,0,0deg").split(",");
		for (var t = 0; t <= 3; ++t) {
			if (e[t]) {
				e[t] = parseFloat(e[t])
			}
		}
		if (e[3]) {
			e[3] = v(e[3], "deg")
		}
		return e
	}}, parse: function (e) {
		var t = this;
		e.replace(/([a-zA-Z0-9]+)\((.*?)\)/g, function (e, n, r) {
			t.setFromString(n, r)
		})
	}, toString: function (e) {
		var t = [];
		for (var r in this) {
			if (this.hasOwnProperty(r)) {
				if (!n.transform3d && (r === "rotateX" || r === "rotateY" || r === "perspective" || r === "transformOrigin")) {
					continue
				}
				if (r[0] !== "_") {
					if (e && r === "scale") {
						t.push(r + "3d(" + this[r] + ",1)")
					} else if (e && r === "translate") {
						t.push(r + "3d(" + this[r] + ",0)")
					} else {
						t.push(r + "(" + this[r] + ")")
					}
				}
			}
		}
		return t.join(" ")
	}};
	e.fn.transition = e.fn.transit = function (t, r, i, s) {
		var o = this;
		var a = 0;
		var f = true;
		var c = e.extend(true, {}, t);
		if (typeof r === "function") {
			s = r;
			r = undefined
		}
		if (typeof r === "object") {
			i = r.easing;
			a = r.delay || 0;
			f = r.queue || true;
			s = r.complete;
			r = r.duration
		}
		if (typeof i === "function") {
			s = i;
			i = undefined
		}
		if (typeof c.easing !== "undefined") {
			i = c.easing;
			delete c.easing
		}
		if (typeof c.duration !== "undefined") {
			r = c.duration;
			delete c.duration
		}
		if (typeof c.complete !== "undefined") {
			s = c.complete;
			delete c.complete
		}
		if (typeof c.queue !== "undefined") {
			f = c.queue;
			delete c.queue
		}
		if (typeof c.delay !== "undefined") {
			a = c.delay;
			delete c.delay
		}
		if (typeof r === "undefined") {
			r = e.fx.speeds._default
		}
		if (typeof i === "undefined") {
			i = e.cssEase._default
		}
		r = m(r);
		var p = h(c, r, i, a);
		var d = e.transit.enabled && n.transition;
		var v = d ? parseInt(r, 10) + parseInt(a, 10) : 0;
		if (v === 0) {
			var g = function (e) {
				o.css(c);
				if (s) {
					s.apply(o)
				}
				if (e) {
					e()
				}
			};
			l(o, f, g);
			return o
		}
		var y = {};
		var b = function (r) {
			var i = false;
			var a = function () {
				if (i) {
					o.unbind(u, a)
				}
				if (v > 0) {
					o.each(function () {
						this.style[n.transition] = y[this] || null
					})
				}
				if (typeof s === "function") {
					s.apply(o)
				}
				if (typeof r === "function") {
					r()
				}
			};
			if (v > 0 && u && e.transit.useTransitionEnd) {
				i = true;
				o.bind(u, a)
			} else {
				window.setTimeout(a, v)
			}
			o.each(function () {
				if (v > 0) {
					this.style[n.transition] = p
				}
				e(this).css(t)
			})
		};
		var w = function (e) {
			this.offsetWidth;
			b(e)
		};
		l(o, f, w);
		return this
	};
	e.transit.getTransitionValue = h
})(jQuery);
(function (e, t) {
	jQuery.easing["jswing"] = jQuery.easing["swing"];
	jQuery.extend(jQuery.easing, {def: "easeOutQuad", swing: function (e, t, n, r, i) {
		return jQuery.easing[jQuery.easing.def](e, t, n, r, i)
	}, easeInQuad: function (e, t, n, r, i) {
		return r * (t /= i) * t + n
	}, easeOutQuad: function (e, t, n, r, i) {
		return-r * (t /= i) * (t - 2) + n
	}, easeInOutQuad: function (e, t, n, r, i) {
		if ((t /= i / 2) < 1) {
			return r / 2 * t * t + n;
		}
		return-r / 2 * (--t * (t - 2) - 1) + n
	}, easeInCubic: function (e, t, n, r, i) {
		return r * (t /= i) * t * t + n
	}, easeOutCubic: function (e, t, n, r, i) {
		return r * ((t = t / i - 1) * t * t + 1) + n
	}, easeInOutCubic: function (e, t, n, r, i) {
		if ((t /= i / 2) < 1) {
			return r / 2 * t * t * t + n;
		}
		return r / 2 * ((t -= 2) * t * t + 2) + n
	}, easeInQuart: function (e, t, n, r, i) {
		return r * (t /= i) * t * t * t + n
	}, easeOutQuart: function (e, t, n, r, i) {
		return-r * ((t = t / i - 1) * t * t * t - 1) + n
	}, easeInOutQuart: function (e, t, n, r, i) {
		if ((t /= i / 2) < 1) {
			return r / 2 * t * t * t * t + n;
		}
		return-r / 2 * ((t -= 2) * t * t * t - 2) + n
	}, easeInQuint: function (e, t, n, r, i) {
		return r * (t /= i) * t * t * t * t + n
	}, easeOutQuint: function (e, t, n, r, i) {
		return r * ((t = t / i - 1) * t * t * t * t + 1) + n
	}, easeInOutQuint: function (e, t, n, r, i) {
		if ((t /= i / 2) < 1) {
			return r / 2 * t * t * t * t * t + n;
		}
		return r / 2 * ((t -= 2) * t * t * t * t + 2) + n
	}, easeInSine: function (e, t, n, r, i) {
		return-r * Math.cos(t / i * (Math.PI / 2)) + r + n
	}, easeOutSine: function (e, t, n, r, i) {
		return r * Math.sin(t / i * (Math.PI / 2)) + n
	}, easeInOutSine: function (e, t, n, r, i) {
		return-r / 2 * (Math.cos(Math.PI * t / i) - 1) + n
	}, easeInExpo: function (e, t, n, r, i) {
		return t == 0 ? n : r * Math.pow(2, 10 * (t / i - 1)) + n
	}, easeOutExpo: function (e, t, n, r, i) {
		return t == i ? n + r : r * (-Math.pow(2, -10 * t / i) + 1) + n
	}, easeInOutExpo: function (e, t, n, r, i) {
		if (t == 0) {
			return n;
		}
		if (t == i) {
			return n + r;
		}
		if ((t /= i / 2) < 1) {
			return r / 2 * Math.pow(2, 10 * (t - 1)) + n;
		}
		return r / 2 * (-Math.pow(2, -10 * --t) + 2) + n
	}, easeInCirc: function (e, t, n, r, i) {
		return-r * (Math.sqrt(1 - (t /= i) * t) - 1) + n
	}, easeOutCirc: function (e, t, n, r, i) {
		return r * Math.sqrt(1 - (t = t / i - 1) * t) + n
	}, easeInOutCirc: function (e, t, n, r, i) {
		if ((t /= i / 2) < 1) {
			return-r / 2 * (Math.sqrt(1 - t * t) - 1) + n;
		}
		return r / 2 * (Math.sqrt(1 - (t -= 2) * t) + 1) + n
	}, easeInElastic: function (e, t, n, r, i) {
		var s = 1.70158;
		var o = 0;
		var u = r;
		if (t == 0) {
			return n;
		}
		if ((t /= i) == 1) {
			return n + r;
		}
		if (!o) {
			o = i * .3;
		}
		if (u < Math.abs(r)) {
			u = r;
			var s = o / 4
		} else {
			var s = o / (2 * Math.PI) * Math.asin(r / u);
		}
		return-(u * Math.pow(2, 10 * (t -= 1)) * Math.sin((t * i - s) * 2 * Math.PI / o)) + n
	}, easeOutElastic: function (e, t, n, r, i) {
		var s = 1.70158;
		var o = 0;
		var u = r;
		if (t == 0) {
			return n;
		}
		if ((t /= i) == 1) {
			return n + r;
		}
		if (!o) {
			o = i * .3;
		}
		if (u < Math.abs(r)) {
			u = r;
			var s = o / 4
		} else {
			var s = o / (2 * Math.PI) * Math.asin(r / u);
		}
		return u * Math.pow(2, -10 * t) * Math.sin((t * i - s) * 2 * Math.PI / o) + r + n
	}, easeInOutElastic: function (e, t, n, r, i) {
		var s = 1.70158;
		var o = 0;
		var u = r;
		if (t == 0) {
			return n;
		}
		if ((t /= i / 2) == 2) {
			return n + r;
		}
		if (!o) {
			o = i * .3 * 1.5;
		}
		if (u < Math.abs(r)) {
			u = r;
			var s = o / 4
		} else {
			var s = o / (2 * Math.PI) * Math.asin(r / u);
		}
		if (t < 1) {
			return-.5 * u * Math.pow(2, 10 * (t -= 1)) * Math.sin((t * i - s) * 2 * Math.PI / o) + n;
		}
		return u * Math.pow(2, -10 * (t -= 1)) * Math.sin((t * i - s) * 2 * Math.PI / o) * .5 + r + n
	}, easeInBack: function (e, t, n, r, i, s) {
		if (s == undefined) {
			s = 1.70158;
		}
		return r * (t /= i) * t * ((s + 1) * t - s) + n
	}, easeOutBack: function (e, t, n, r, i, s) {
		if (s == undefined) {
			s = 1.70158;
		}
		return r * ((t = t / i - 1) * t * ((s + 1) * t + s) + 1) + n
	}, easeInOutBack: function (e, t, n, r, i, s) {
		if (s == undefined) {
			s = 1.70158;
		}
		if ((t /= i / 2) < 1) {
			return r / 2 * t * t * (((s *= 1.525) + 1) * t - s) + n;
		}
		return r / 2 * ((t -= 2) * t * (((s *= 1.525) + 1) * t + s) + 2) + n
	}, easeInBounce: function (e, t, n, r, i) {
		return r - jQuery.easing.easeOutBounce(e, i - t, 0, r, i) + n
	}, easeOutBounce: function (e, t, n, r, i) {
		if ((t /= i) < 1 / 2.75) {
			return r * 7.5625 * t * t + n
		} else if (t < 2 / 2.75) {
			return r * (7.5625 * (t -= 1.5 / 2.75) * t + .75) + n
		} else if (t < 2.5 / 2.75) {
			return r * (7.5625 * (t -= 2.25 / 2.75) * t + .9375) + n
		} else {
			return r * (7.5625 * (t -= 2.625 / 2.75) * t + .984375) + n
		}
	}, easeInOutBounce: function (e, t, n, r, i) {
		if (t < i / 2) {
			return jQuery.easing.easeInBounce(e, t * 2, 0, r, i) * .5 + n;
		}
		return jQuery.easing.easeOutBounce(e, t * 2 - i, 0, r, i) * .5 + r * .5 + n
	}});
	e.waitForImages = {hasImageProperties: ["backgroundImage", "listStyleImage", "borderImage", "borderCornerImage"]};
	e.expr[":"].uncached = function (t) {
		var n = document.createElement("img");
		n.src = t.src;
		return e(t).is('img[src!=""]') && !n.complete
	};
	e.fn.waitForImages = function (t, n, r) {
		if (e.isPlainObject(arguments[0])) {
			n = t.each;
			r = t.waitForAll;
			t = t.finished
		}
		t = t || e.noop;
		n = n || e.noop;
		r = !!r;
		if (!e.isFunction(t) || !e.isFunction(n)) {
			throw new TypeError("An invalid callback was supplied.")
		}
		return this.each(function () {
			var i = e(this), s = [];
			if (r) {
				var o = e.waitForImages.hasImageProperties || [], u = /url\((['"]?)(.*?)\1\)/g;
				i.find("*").each(function () {
					var t = e(this);
					if (t.is("img:uncached")) {
						s.push({src: t.attr("src"), element: t[0]})
					}
					e.each(o, function (e, n) {
						var r = t.css(n);
						if (!r) {
							return true
						}
						var i;
						while (i = u.exec(r)) {
							s.push({src: i[2], element: t[0]})
						}
					})
				})
			} else {
				i.find("img:uncached").each(function () {
					s.push({src: this.src, element: this})
				})
			}
			var a = s.length, f = 0;
			if (a == 0) {
				t.call(i[0])
			}
			e.each(s, function (r, s) {
				var o = new Image;
				e(o).bind("load error", function (e) {
					f++;
					n.call(s.element, f, a, e.type == "load");
					if (f == a) {
						t.call(i[0]);
						return false
					}
				});
				o.src = s.src
			})
		})
	};
	e.fn.swipe = function (t) {
		if (!this) {
			return false;
		}
		var n = {fingers: 1, threshold: 75, swipe: null, swipeLeft: null, swipeRight: null, swipeUp: null, swipeDown: null, swipeStatus: null, click: null, triggerOnTouchEnd: true, allowPageScroll: "auto"};
		var r = "left";
		var i = "right";
		var s = "up";
		var o = "down";
		var u = "none";
		var a = "horizontal";
		var f = "vertical";
		var l = "auto";
		var c = "start";
		var h = "move";
		var p = "end";
		var d = "cancel";
		var v = "ontouchstart"in window, m = v ? "touchstart" : "mousedown", g = v ? "touchmove" : "mousemove", y = v ? "touchend" : "mouseup", b = "touchcancel";
		var w = "start";
		if (t.allowPageScroll == undefined && (t.swipe != undefined || t.swipeStatus != undefined)) {
			t.allowPageScroll = u;
		}
		if (t) {
			e.extend(n, t);
		}
		return this.each(function () {
			function t() {
				var e = S();
				if (e <= 45 && e >= 0) {
					return r;
				} else if (e <= 360 && e >= 315) {
					return r;
				} else if (e >= 135 && e <= 225) {
					return i;
				} else if (e > 45 && e < 135) {
					return o;
				} else {
					return s
				}
			}

			function S() {
				var e = P.x - H.x;
				var t = H.y - P.y;
				var n = Math.atan2(t, e);
				var r = Math.round(n * 180 / Math.PI);
				if (r < 0) {
					r = 360 - Math.abs(r);
				}
				return r
			}

			function x() {
				return Math.round(Math.sqrt(Math.pow(H.x - P.x, 2) + Math.pow(H.y - P.y, 2)))
			}

			function T(e, t) {
				if (n.allowPageScroll == u) {
					e.preventDefault()
				} else {
					var c = n.allowPageScroll == l;
					switch (t) {
						case r:
							if (n.swipeLeft && c || !c && n.allowPageScroll != a) {
								e.preventDefault();
							}
							break;
						case i:
							if (n.swipeRight && c || !c && n.allowPageScroll != a) {
								e.preventDefault();
							}
							break;
						case s:
							if (n.swipeUp && c || !c && n.allowPageScroll != f) {
								e.preventDefault();
							}
							break;
						case o:
							if (n.swipeDown && c || !c && n.allowPageScroll != f) {
								e.preventDefault();
							}
							break
					}
				}
			}

			function N(e, t) {
				if (n.swipeStatus) {
					n.swipeStatus.call(M, e, t, direction || null, distance || 0);
				}
				if (t == d) {
					if (n.click && (D == 1 || !v) && (isNaN(distance) || distance == 0)) {
						n.click.call(M, e, e.target)
					}
				}
				if (t == p) {
					if (n.swipe) {
						n.swipe.call(M, e, direction, distance)
					}
					switch (direction) {
						case r:
							if (n.swipeLeft) {
								n.swipeLeft.call(M, e, direction, distance);
							}
							break;
						case i:
							if (n.swipeRight) {
								n.swipeRight.call(M, e, direction, distance);
							}
							break;
						case s:
							if (n.swipeUp) {
								n.swipeUp.call(M, e, direction, distance);
							}
							break;
						case o:
							if (n.swipeDown) {
								n.swipeDown.call(M, e, direction, distance);
							}
							break
					}
				}
			}

			function C(e) {
				D = 0;
				P.x = 0;
				P.y = 0;
				H.x = 0;
				H.y = 0;
				B.x = 0;
				B.y = 0
			}

			function k(e) {
				e.preventDefault();
				distance = x();
				direction = t();
				if (n.triggerOnTouchEnd) {
					w = p;
					if ((D == n.fingers || !v) && H.x != 0) {
						if (distance >= n.threshold) {
							N(e, w);
							C(e)
						} else {
							w = d;
							N(e, w);
							C(e)
						}
					} else {
						w = d;
						N(e, w);
						C(e)
					}
				} else if (w == h) {
					w = d;
					N(e, w);
					C(e)
				}
				O.removeEventListener(g, L, false);
				O.removeEventListener(y, k, false)
			}

			function L(e) {
				if (w == p || w == d) {
					return;
				}
				var r = v ? e.touches[0] : e;
				H.x = r.pageX;
				H.y = r.pageY;
				direction = t();
				if (v) {
					D = e.touches.length
				}
				w = h;
				T(e, direction);
				if (D == n.fingers || !v) {
					distance = x();
					if (n.swipeStatus) {
						N(e, w, direction, distance);
					}
					if (!n.triggerOnTouchEnd) {
						if (distance >= n.threshold) {
							w = p;
							N(e, w);
							C(e)
						}
					}
				} else {
					w = d;
					N(e, w);
					C(e)
				}
			}

			function A(e) {
				var t = v ? e.touches[0] : e;
				w = c;
				if (v) {
					D = e.touches.length
				}
				distance = 0;
				direction = null;
				if (D == n.fingers || !v) {
					P.x = H.x = t.pageX;
					P.y = H.y = t.pageY;
					if (n.swipeStatus) {
						N(e, w)
					}
				} else {
					C(e)
				}
				O.addEventListener(g, L, false);
				O.addEventListener(y, k, false)
			}

			var O = this;
			var M = e(this);
			var _ = null;
			var D = 0;
			var P = {x: 0, y: 0};
			var H = {x: 0, y: 0};
			var B = {x: 0, y: 0};
			try {
				this.addEventListener(m, A, false);
				this.addEventListener(b, C)
			} catch (j) {
			}
		})
	}
})(jQuery);
(function (e, t) {
	function n(e) {
		var t = [], n;
		var r = window.location.href.slice(window.location.href.indexOf(e) + 1).split("_");
		for (var i = 0; i < r.length; i++) {
			r[i] = r[i].replace("%3D", "=");
			n = r[i].split("=");
			t.push(n[0]);
			t[n[0]] = n[1]
		}
		return t
	}

	function r(n, r) {
		n.find(".defaultimg").each(function (i) {
			var s = e(this);
			if (s.data("lazyload") != t && s.data("lazydone") == 1 || s.data("lazyload") === t) {
				g(s, r);
			}
			r.height = Math.round(r.startheight * (r.width / r.startwidth));
			n.height(r.height);
			if (s.data("lazyload") != t && s.data("lazydone") == 1 || s.data("lazyload") === t) {
				g(s, r);
			}
			try {
				n.parent().find(".tp-bannershadow").css({width: r.width})
			} catch (u) {
			}
			var a = n.find(">ul >li:eq(" + r.act + ") .slotholder");
			var f = n.find(">ul >li:eq(" + r.next + ") .slotholder");
			S(n, r);
			f.find(".defaultimg").css({opacity: 0});
			a.find(".defaultimg").css({opacity: 1});
			x(n, r);
			var l = n.find(">ul >li:eq(" + r.next + ")");
			n.find(".tp-caption").each(function () {
				e(this).stop(true, true)
			});
			D(l, r);
			o(r, n)
		})
	}

	function s() {
		var e = ["android", "webos", "iphone", "ipad", "blackberry", "Android", "webos", , "iPod", "iPhone", "iPad", "Blackberry", "BlackBerry"];
		var t = false;
		for (i in e) {
			if (navigator.userAgent.split(e[i]).length > 1) {
				t = true
			}
		}
		return t
	}

	function o(e, t) {
		e.cd = 0;
		if (e.videoplaying != true) {
			var n = t.find(".tp-bannertimer");
			if (n.length > 0) {
				n.stop();
				n.css({width: "0%"});
				n.animate({width: "100%"}, {duration: e.delay - 100, queue: false, easing: "linear"})
			}
			clearTimeout(e.thumbtimer);
			e.thumbtimer = setTimeout(function () {
				l(t);
				m(t, e)
			}, 200)
		}
	}

	function u(e, t) {
		e.cd = 0;
		var n = t.find(".tp-bannertimer");
		if (n.length > 0) {
			n.stop(true, true);
			n.css({width: "0%"})
		}
		clearTimeout(e.thumbtimer)
	}

	function a(e, t) {
		e.cd = 0;
		T(t, e);
		var n = t.find(".tp-bannertimer");
		if (n.length > 0) {
			n.stop();
			n.css({width: "0%"});
			n.animate({width: "100%"}, {duration: e.delay - 100, queue: false, easing: "linear"})
		}
	}

	function f(n, r) {
		var i = n.parent();
		if (r.navigationType == "thumb" || r.navsecond == "both") {
			i.append('<div class="tp-bullets tp-thumbs ' + r.navigationStyle + '"><div class="tp-mask"><div class="tp-thumbcontainer"></div></div></div>')
		}
		var s = i.find(".tp-bullets.tp-thumbs .tp-mask .tp-thumbcontainer");
		var o = s.parent();
		o.width(r.thumbWidth * r.thumbAmount);
		o.height(r.thumbHeight);
		o.parent().width(r.thumbWidth * r.thumbAmount);
		o.parent().height(r.thumbHeight);
		n.find(">ul:first >li").each(function (e) {
			var r = n.find(">ul:first >li:eq(" + e + ")");
			if (r.data("thumb") != t) {
				var i = r.data("thumb");
			} else {
				var i = r.find("img:first").attr("src");
			}
			s.append('<div class="bullet thumb"><img src="' + i + '"></div>');
			var o = s.find(".bullet:first")
		});
		var u = 100;
		s.find(".bullet").each(function (t) {
			var i = e(this);
			if (t == r.slideamount - 1) {
				i.addClass("last");
			}
			if (t == 0) {
				i.addClass("first");
			}
			i.width(r.thumbWidth);
			i.height(r.thumbHeight);
			if (u > i.outerWidth(true)) {
				u = i.outerWidth(true);
			}
			i.click(function () {
				if (r.transition == 0 && i.index() != r.act) {
					r.next = i.index();
					a(r, n)
				}
			})
		});
		var f = u * n.find(">ul:first >li").length;
		var h = s.parent().width();
		r.thumbWidth = u;
		if (h < f) {
			e(document).mousemove(function (t) {
				e("body").data("mousex", t.pageX)
			});
			s.parent().mouseenter(function () {
				var t = e(this);
				t.addClass("over");
				var r = t.offset();
				var i = e("body").data("mousex") - r.left;
				var s = t.width();
				var o = t.find(".bullet:first").outerWidth(true);
				var u = o * n.find(">ul:first >li").length;
				var a = u - s + 15;
				var f = a / s;
				i = i - 30;
				var l = 0 - i * f;
				if (l > 0) {
					l = 0;
				}
				if (l < 0 - u + s) {
					l = 0 - u + s;
				}
				c(t, l, 200)
			});
			s.parent().mousemove(function () {
				var t = e(this);
				var r = t.offset();
				var i = e("body").data("mousex") - r.left;
				var s = t.width();
				var o = t.find(".bullet:first").outerWidth(true);
				var u = o * n.find(">ul:first >li").length;
				var a = u - s + 15;
				var f = a / s;
				i = i - 30;
				var l = 0 - i * f;
				if (l > 0) {
					l = 0;
				}
				if (l < 0 - u + s) {
					l = 0 - u + s;
				}
				c(t, l, 0)
			});
			s.parent().mouseleave(function () {
				var t = e(this);
				t.removeClass("over");
				l(n)
			})
		}
	}

	function l(e) {
		var t = e.parent().find(".tp-bullets.tp-thumbs .tp-mask .tp-thumbcontainer");
		var n = t.parent();
		var r = n.offset();
		var i = n.find(".bullet:first").outerWidth(true);
		var s = n.find(".bullet.selected").index() * i;
		var o = n.width();
		var i = n.find(".bullet:first").outerWidth(true);
		var u = i * e.find(">ul:first >li").length;
		var a = u - o;
		var f = a / o;
		var l = 0 - s;
		if (l > 0) {
			l = 0;
		}
		if (l < 0 - u + o) {
			l = 0 - u + o;
		}
		if (!n.hasClass("over")) {
			c(n, l, 200)
		}
	}

	function c(e, t, n) {
		e.stop();
		e.find(".tp-thumbcontainer").animate({left: t + "px"}, {duration: n, queue: false})
	}

	function h(t, n) {
		if (n.navigationType == "bullet" || n.navigationType == "both") {
			t.parent().append('<div class="tp-bullets simplebullets ' + n.navigationStyle + '"></div>')
		}
		var r = t.parent().find(".tp-bullets");
		t.find(">ul:first >li").each(function (e) {
			var n = t.find(">ul:first >li:eq(" + e + ") img:first").attr("src");
			r.append('<div class="bullet"></div>');
			var i = r.find(".bullet:first")
		});
		r.find(".bullet").each(function (r) {
			var i = e(this);
			if (r == n.slideamount - 1) {
				i.addClass("last");
			}
			if (r == 0) {
				i.addClass("first");
			}
			i.click(function () {
				var e = false;
				if (n.navigationArrows == "withbullet" || n.navigationArrows == "nexttobullets") {
					if (i.index() - 1 == n.act) {
						e = true
					}
				} else {
					if (i.index() == n.act) {
						e = true
					}
				}
				if (n.transition == 0 && !e) {
					if (n.navigationArrows == "withbullet" || n.navigationArrows == "nexttobullets") {
						n.next = i.index() - 1
					} else {
						n.next = i.index()
					}
					a(n, t)
				}
			})
		});
		r.append('<div class="tpclear"></div>');
		m(t, n)
	}

	function p(e, n) {
		var r = e.find(".tp-bullets");
		var i = "";
		var s = n.navigationStyle;
		if (n.navigationArrows == "none") {
			i = "visibility:none";
		}
		n.soloArrowStyle = "default";
		if (n.navigationArrows != "none" && n.navigationArrows != "nexttobullets") {
			s = n.soloArrowStyle;
		}
		e.parent().append('<div style="' + i + '" class="tp-leftarrow tparrows ' + s + '"></div>');
		e.parent().append('<div style="' + i + '" class="tp-rightarrow tparrows ' + s + '"></div>');
		e.parent().find(".tp-rightarrow").click(function () {
			if (n.transition == 0) {
				if (e.data("showus") != t && e.data("showus") != -1) {
					n.next = e.data("showus") - 1;
				} else {
					n.next = n.next + 1;
				}
				e.data("showus", -1);
				if (n.next >= n.slideamount) {
					n.next = 0;
				}
				if (n.next < 0) {
					n.next = 0;
				}
				if (n.act != n.next) {
					a(n, e)
				}
			}
		});
		e.parent().find(".tp-leftarrow").click(function () {
			if (n.transition == 0) {
				n.next = n.next - 1;
				n.leftarrowpressed = 1;
				if (n.next < 0) {
					n.next = n.slideamount - 1;
				}
				a(n, e)
			}
		});
		m(e, n)
	}

	function d(e, t) {
		if (t.touchenabled == "on") {
			e.swipe({data: e, swipeRight: function () {
				if (t.transition == 0) {
					t.next = t.next - 1;
					t.leftarrowpressed = 1;
					if (t.next < 0) {
						t.next = t.slideamount - 1;
					}
					a(t, e)
				}
			}, swipeLeft: function () {
				if (t.transition == 0) {
					t.next = t.next + 1;
					if (t.next == t.slideamount) {
						t.next = 0;
					}
					a(t, e)
				}
			}, allowPageScroll: "auto"})
		}
	}

	function v(e, t) {
		var n = e.parent().find(".tp-bullets");
		var r = e.parent().find(".tparrows");
		if (n == null) {
			e.append('<div class=".tp-bullets"></div>');
			var n = e.parent().find(".tp-bullets")
		}
		if (r == null) {
			e.append('<div class=".tparrows"></div>');
			var r = e.parent().find(".tparrows")
		}
		e.data("hidethumbs", t.hideThumbs);
		n.addClass("hidebullets");
		r.addClass("hidearrows");
		n.hover(function () {
			n.addClass("hovered");
			clearTimeout(e.data("hidethumbs"));
			n.removeClass("hidebullets");
			r.removeClass("hidearrows")
		}, function () {
			n.removeClass("hovered");
			if (!e.hasClass("hovered") && !n.hasClass("hovered")) {
				e.data("hidethumbs", setTimeout(function () {
					n.addClass("hidebullets");
					r.addClass("hidearrows")
				}, t.hideThumbs))
			}
		});
		r.hover(function () {
			n.addClass("hovered");
			clearTimeout(e.data("hidethumbs"));
			n.removeClass("hidebullets");
			r.removeClass("hidearrows")
		}, function () {
			n.removeClass("hovered")
		});
		e.on("mouseenter", function () {
			e.addClass("hovered");
			clearTimeout(e.data("hidethumbs"));
			n.removeClass("hidebullets");
			r.removeClass("hidearrows")
		});
		e.on("mouseleave", function () {
			e.removeClass("hovered");
			if (!e.hasClass("hovered") && !n.hasClass("hovered")) {
				e.data("hidethumbs", setTimeout(function () {
					n.addClass("hidebullets");
					r.addClass("hidearrows")
				}, t.hideThumbs))
			}
		})
	}

	function m(e, t) {
		var n = e.parent();
		var r = n.find(".tp-bullets");
		var i = n.find(".tp-leftarrow");
		var s = n.find(".tp-rightarrow");
		if (t.navigationType == "thumb" && t.navigationArrows == "nexttobullets") {
			t.navigationArrows = "solo";
		}
		if (t.navigationArrows == "nexttobullets") {
			i.prependTo(r).css({"float": "left"});
			s.insertBefore(r.find(".tpclear")).css({"float": "left"})
		}
		if (t.navigationArrows != "none" && t.navigationArrows != "nexttobullets") {
			i.css({position: "absolute"});
			s.css({position: "absolute"});
			if (t.soloArrowLeftValign == "center") {
				i.css({top: "50%", marginTop: t.soloArrowLeftVOffset - Math.round(i.innerHeight() / 2) + "px"});
			}
			if (t.soloArrowLeftValign == "bottom") {
				i.css({top: "auto", bottom: 0 + t.soloArrowLeftVOffset + "px"});
			}
			if (t.soloArrowLeftValign == "top") {
				i.css({bottom: "auto", top: 0 + t.soloArrowLeftVOffset + "px"});
			}
			if (t.soloArrowLeftHalign == "center") {
				i.css({left: "50%", marginLeft: t.soloArrowLeftHOffset - Math.round(i.innerWidth() / 2) + "px"});
			}
			if (t.soloArrowLeftHalign == "left") {
				i.css({left: 0 + t.soloArrowLeftHOffset + "px"});
			}
			if (t.soloArrowLeftHalign == "right") {
				i.css({right: 0 + t.soloArrowLeftHOffset + "px"});
			}
			if (t.soloArrowRightValign == "center") {
				s.css({top: "50%", marginTop: t.soloArrowRightVOffset - Math.round(s.innerHeight() / 2) + "px"});
			}
			if (t.soloArrowRightValign == "bottom") {
				s.css({top: "auto", bottom: 0 + t.soloArrowRightVOffset + "px"});
			}
			if (t.soloArrowRightValign == "top") {
				s.css({bottom: "auto", top: 0 + t.soloArrowRightVOffset + "px"});
			}
			if (t.soloArrowRightHalign == "center") {
				s.css({left: "50%", marginLeft: t.soloArrowRightHOffset - Math.round(s.innerWidth() / 2) + "px"});
			}
			if (t.soloArrowRightHalign == "left") {
				s.css({left: 0 + t.soloArrowRightHOffset + "px"});
			}
			if (t.soloArrowRightHalign == "right") {
				s.css({right: 0 + t.soloArrowRightHOffset + "px"});
			}
			if (i.position() != null) {
				i.css({top: Math.round(parseInt(i.position().top, 0)) + "px"});
			}
			if (s.position() != null) {
				s.css({top: Math.round(parseInt(s.position().top, 0)) + "px"})
			}
		}
		if (t.navigationArrows == "none") {
			i.css({visibility: "hidden"});
			s.css({visibility: "hidden"})
		}
		if (t.navigationVAlign == "center") {
			r.css({top: "50%", marginTop: t.navigationVOffset - Math.round(r.innerHeight() / 2) + "px"});
		}
		if (t.navigationVAlign == "bottom") {
			r.css({bottom: 0 + t.navigationVOffset + "px"});
		}
		if (t.navigationVAlign == "top") {
			r.css({top: 0 + t.navigationVOffset + "px"});
		}
		if (t.navigationHAlign == "center") {
			r.css({left: "50%", marginLeft: t.navigationHOffset - Math.round(r.innerWidth() / 2) + "px"});
		}
		if (t.navigationHAlign == "left") {
			r.css({left: 0 + t.navigationHOffset + "px"});
		}
		if (t.navigationHAlign == "right") {
			r.css({right: 0 + t.navigationHOffset + "px"})
		}
	}

	function g(n, r) {
		r.width = parseInt(r.container.width(), 0);
		r.height = parseInt(r.container.height(), 0);
		r.bw = r.width / r.startwidth;
		if (r.fullScreen == "on") {
			r.height = r.bw * r.startheight
		}
		r.bh = r.height / r.startheight;
		if (r.bh > 1) {
			r.bh = 1;
			r.bw = 1
		}
		if (n.data("lazyload") != t && n.data("lazydone") == 1 || n.data("lazyload") === t) {
			if (n.data("orgw") != t && n.data("orgw") != 0) {
				n.width(n.data("orgw"));
				n.height(n.data("orgh"))
			}
		}
		var i = r.width / n.width();
		var s = r.height / n.height();
		r.fw = i;
		r.fh = s;
		if (n.data("lazyload") != t && n.data("lazydone") == 1 || n.data("lazyload") === t) {
			if (n.data("orgw") == t || n.data("orgw") == 0) {
				n.data("orgw", n.width());
				n.data("orgh", n.height())
			}
		}
		if (r.fullWidth == "on" && r.fullScreen != "on") {
			var o = r.container.parent().width();
			var u = r.container.parent().height();
			var a = u / n.data("orgh");
			var f = o / n.data("orgw");
			if (n.data("lazyload") != t && n.data("lazydone") == 1 || n.data("lazyload") === t) {
				n.width(n.width() * a);
				n.height(u)
			}
			if (n.width() < o) {
				n.width(o + 50);
				var f = n.width() / n.data("orgw");
				n.height(n.data("orgh") * f)
			}
			if (n.width() > o) {
				n.data("fxof", o / 2 - n.width() / 2);
				n.css({position: "absolute", left: n.data("fxof") + "px"})
			}
			if (n.height() <= u) {
				n.data("fyof", 0);
				n.data("fxof", o / 2 - n.width() / 2);
				n.css({position: "absolute", top: n.data("fyof") + "px", left: n.data("fxof") + "px"})
			}
			if (n.height() > u && n.data("fullwidthcentering") == "on") {
				n.data("fyof", u / 2 - n.height() / 2);
				n.data("fxof", o / 2 - n.width() / 2);
				n.css({position: "absolute", top: n.data("fyof") + "px", left: n.data("fxof") + "px"})
			}
		} else if (r.fullScreen == "on") {
			var o = r.container.parent().width();
			var u = e(window).height();
			var l = u / 2 - r.startheight * r.bh / 2;
			if (l < 0) {
				u = r.startheight * r.bh;
			}
			if (r.fullScreenOffsetContainer != t) {
				try {
					u = u - e(r.fullScreenOffsetContainer).outerHeight(true)
				} catch (c) {
				}
			}
			r.container.parent().height(u);
			r.container.css({height: "100%"});
			r.height = u;
			var a = u / n.data("orgh");
			var f = o / n.data("orgw");
			if (n.data("lazyload") != t && n.data("lazydone") == 1 || n.data("lazyload") === t) {
				n.width(n.width() * a);
				n.height(u)
			}
			if (n.width() < o) {
				n.width(o + 50);
				var f = n.width() / n.data("orgw");
				n.height(n.data("orgh") * f)
			}
			if (n.width() > o) {
				n.data("fxof", o / 2 - n.width() / 2);
				n.css({position: "absolute", left: n.data("fxof") + "px"})
			}
			if (n.height() <= u) {
				n.data("fyof", 0);
				n.data("fxof", o / 2 - n.width() / 2);
				n.css({position: "absolute", top: n.data("fyof") + "px", left: n.data("fxof") + "px"})
			}
			if (n.height() > u && n.data("fullwidthcentering") == "on") {
				n.data("fyof", u / 2 - n.height() / 2);
				n.data("fxof", o / 2 - n.width() / 2);
				n.css({position: "absolute", top: n.data("fyof") + "px", left: n.data("fxof") + "px"})
			}
		} else {
			if (n.data("lazyload") != t && n.data("lazydone") == 1 || n.data("lazyload") === t) {
				n.width(r.width);
				n.height(n.height() * i)
			}
			if (n.height() < r.height && n.height() != 0 && n.height() != null) {
				if (n.data("lazyload") != t && n.data("lazydone") == 1 || n.data("lazyload") === t) {
					n.height(r.height);
					n.width(n.data("orgw") * s)
				}
			}
		}
		if (n.data("lazyload") != t && n.data("lazydone") == 1 || n.data("lazyload") === t) {
			n.data("neww", n.width());
			n.data("newh", n.height())
		}
		if (r.fullWidth == "on") {
			r.slotw = Math.ceil(n.width() / r.slots)
		} else {
			r.slotw = Math.ceil(r.width / r.slots)
		}
		if (r.fullSreen == "on") {
			r.sloth = Math.ceil(e(window).height() / r.slots);
		} else {
			r.sloth = Math.ceil(r.height / r.slots)
		}
	}

	function y(n, r) {
		n.find(".tp-caption").each(function () {
			e(this).addClass(e(this).data("transition"));
			e(this).addClass("start")
		});
		n.find(">ul:first").css({overflow: "hidden", width: "100%", height: "100%", maxHeight: n.parent().css("maxHeight")});
		n.find(">ul:first >li").each(function (n) {
			var r = e(this);
			r.css({width: "100%", height: "100%", overflow: "hidden"});
			if (r.data("link") != t) {
				var i = r.data("link");
				var s = "_self";
				var o = 2;
				if (r.data("slideindex") == "back") {
					o = 0;
				}
				var u = r.data("linktoslide");
				if (r.data("target") != t) {
					s = r.data("target");
				}
				if (i == "slide") {
					r.append('<div class="tp-caption sft slidelink" style="z-index:' + o + ';" data-x="0" data-y="0" data-linktoslide="' + u + '" data-start="0"><a><div></div></a></div>')
				} else {
					u = "no";
					r.append('<div class="tp-caption sft slidelink" style="z-index:' + o + ';" data-x="0" data-y="0" data-linktoslide="' + u + '" data-start="0"><a target="' + s + '" href="' + i + '"><div></div></a></div>')
				}
			}
		});
		n.parent().css({overflow: "visible"});
		n.find(">ul:first >li >img").each(function (n) {
			var i = e(this);
			i.addClass("defaultimg");
			if (i.data("lazyload") != t && i.data("lazydone") != 1) {
			} else {
				g(i, r);
				g(i, r)
			}
			i.wrap('<div class="slotholder"></div>');
			i.css({opacity: 0});
			i.data("li-id", n)
		})
	}

	function b(e, n, r) {
		var i = e;
		var s = i.find("img");
		g(s, n);
		var o = s.attr("src");
		var u = s.css("background-color");
		var a = s.data("neww");
		var f = s.data("newh");
		var l = s.data("fxof");
		if (l == t) {
			l = 0;
		}
		var c = s.data("fyof");
		if (s.data("fullwidthcentering") != "on" || c == t) {
			c = 0;
		}
		var h = 0;
		if (!r) {
			var h = 0 - n.slotw;
		}
		for (var p = 0; p < n.slots; p++) {
			i.append('<div class="slot" style="position:absolute;top:' + (0 + c) + "px;left:" + (l + p * n.slotw) + "px;overflow:hidden;width:" + n.slotw + "px;height:" + f + 'px"><div class="slotslide" style="position:absolute;top:0px;left:' + h + "px;width:" + n.slotw + "px;height:" + f + 'px;overflow:hidden;"><img style="background-color:' + u + ";position:absolute;top:0px;left:" + (0 - p * n.slotw) + "px;width:" + a + "px;height:" + f + 'px" src="' + o + '"></div></div>')
		}
	}

	function w(e, n, r) {
		var i = e;
		var s = i.find("img");
		g(s, n);
		var o = s.attr("src");
		var u = s.css("background-color");
		var a = s.data("neww");
		var f = s.data("newh");
		var l = s.data("fxof");
		if (l == t) {
			l = 0;
		}
		var c = s.data("fyof");
		if (s.data("fullwidthcentering") != "on" || c == t) {
			c = 0;
		}
		var h = 0;
		if (!r) {
			var h = 0 - n.sloth;
		}
		for (var p = 0; p < n.slots + 2; p++) {
			i.append('<div class="slot" style="position:absolute;' + "top:" + (c + p * n.sloth) + "px;" + "left:" + l + "px;" + "overflow:hidden;" + "width:" + a + "px;" + "height:" + n.sloth + 'px"' + '><div class="slotslide" style="position:absolute;' + "top:" + h + "px;" + "left:0px;width:" + a + "px;" + "height:" + n.sloth + "px;" + 'overflow:hidden;"><img style="position:absolute;' + "background-color:" + u + ";" + "top:" + (0 - p * n.sloth) + "px;" + "left:0px;width:" + a + "px;" + "height:" + f + 'px" src="' + o + '"></div></div>')
		}
	}

	function E(e, n, r) {
		var i = e;
		var s = i.find("img");
		g(s, n);
		var o = s.attr("src");
		var u = s.css("background-color");
		var a = s.data("neww");
		var f = s.data("newh");
		var l = s.data("fxof");
		if (l == t) {
			l = 0;
		}
		var c = s.data("fyof");
		if (s.data("fullwidthcentering") != "on" || c == t) {
			c = 0;
		}
		var h = 0;
		var p = 0;
		if (n.sloth > n.slotw) {
			p = n.sloth;
		} else {
			p = n.slotw;
		}
		if (!r) {
			var h = 0 - p
		}
		n.slotw = p;
		n.sloth = p;
		var d = 0;
		var v = 0;
		for (var m = 0; m < n.slots; m++) {
			v = 0;
			for (var y = 0; y < n.slots; y++) {
				i.append('<div class="slot" ' + 'style="position:absolute;' + "top:" + (c + v) + "px;" + "left:" + (l + d) + "px;" + "width:" + p + "px;" + "height:" + p + "px;" + 'overflow:hidden;">' + '<div class="slotslide" data-x="' + d + '" data-y="' + v + '" ' + 'style="position:absolute;' + "top:" + 0 + "px;" + "left:" + 0 + "px;" + "width:" + p + "px;" + "height:" + p + "px;" + 'overflow:hidden;">' + '<img style="position:absolute;' + "top:" + (0 - v) + "px;" + "left:" + (0 - d) + "px;" + "width:" + a + "px;" + "height:" + f + "px" + "background-color:" + u + ';"' + 'src="' + o + '"></div></div>');
				v = v + p
			}
			d = d + p
		}
	}

	function S(n, r, i) {
		if (i == t) {
			i == 80;
		}
		setTimeout(function () {
			n.find(".slotholder .slot").each(function () {
				clearTimeout(e(this).data("tout"));
				e(this).remove()
			});
			r.transition = 0
		}, i)
	}

	function x(e, t) {
		var n = e.find(">li:eq(" + t.act + ")");
		var r = e.find(">li:eq(" + t.next + ")");
		var i = r.find(".tp-caption");
		if (i.find("iframe") == 0) {
			if (i.hasClass("hcenter")) {
				i.css({height: t.height + "px", top: "0px", left: t.width / 2 - i.outerWidth() / 2 + "px"});
			} else if (i.hasClass("vcenter")) {
				i.css({width: t.width + "px", left: "0px", top: t.height / 2 - i.outerHeight() / 2 + "px"})
			}
		}
	}

	function T(e, n) {
		try {
			var r = e.find(">ul:first-child >li:eq(" + n.act + ")")
		} catch (i) {
			var r = e.find(">ul:first-child >li:eq(1)")
		}
		n.lastslide = n.act;
		var s = e.find(">ul:first-child >li:eq(" + n.next + ")");
		var a = s.find(".defaultimg");
		if (a.data("lazyload") != t && a.data("lazydone") != 1) {
			a.attr("src", s.find(".defaultimg").data("lazyload")), a.data("orgw", 0);
			e.find(".tp-loader").css({display: "block"}).transition({opacity: 1, duration: 300});
			setTimeout(function () {
				u(n, e)
			}, 180);
			s.waitForImages(function () {
				a.data("lazydone", 1);
				setTimeout(function () {
					o(n, e)
				}, 190);
				g(a, n);
				m(e, n);
				g(a, n);
				N(e, n);
				e.find(".tp-loader").transition({opacity: 0, duration: 300});
				setTimeout(function () {
					e.find(".tp-loader").css({display: "none"})
				}, 2200)
			})
		} else {
			N(e, n)
		}
	}

	function N(n, r) {
		n.trigger("revolution.slide.onbeforeswap");
		r.transition = 1;
		r.videoplaying = false;
		try {
			var i = n.find(">ul:first-child >li:eq(" + r.act + ")")
		} catch (s) {
			var i = n.find(">ul:first-child >li:eq(1)")
		}
		r.lastslide = r.act;
		var o = n.find(">ul:first-child >li:eq(" + r.next + ")");
		var u = i.find(".slotholder");
		var a = o.find(".slotholder");
		i.css({visibility: "visible"});
		o.css({visibility: "visible"});
		if (r.ie) {
			if (p == "boxfade") {
				p = "boxslide";
			}
			if (p == "slotfade-vertical") {
				p = "slotzoom-vertical";
			}
			if (p == "slotfade-horizontal") {
				p = "slotzoom-horizontal"
			}
		}
		if (o.data("delay") != t) {
			r.cd = 0;
			r.delay = o.data("delay")
		} else {
			r.delay = r.origcd
		}
		i.css({left: "0px", top: "0px"});
		o.css({left: "0px", top: "0px"});
		if (o.data("differentissplayed") == "prepared") {
			o.data("differentissplayed", "done");
			o.data("transition", o.data("savedtransition"));
			o.data("slotamount", o.data("savedslotamount"));
			o.data("masterspeed", o.data("savedmasterspeed"))
		}
		if (o.data("fstransition") != t && o.data("differentissplayed") != "done") {
			o.data("savedtransition", o.data("transition"));
			o.data("savedslotamount", o.data("slotamount"));
			o.data("savedmasterspeed", o.data("masterspeed"));
			o.data("transition", o.data("fstransition"));
			o.data("slotamount", o.data("fsslotamount"));
			o.data("masterspeed", o.data("fsmasterspeed"));
			o.data("differentissplayed", "prepared")
		}
		var f = 0;
		var c = o.data("transition").split(",");
		var h = o.data("nexttransid");
		if (h == t) {
			h = 0;
			o.data("nexttransid", h)
		} else {
			h = h + 1;
			if (h == c.length) {
				h = 0;
			}
			o.data("nexttransid", h)
		}
		var p = c[h];
		if (p == "boxslide") {
			f = 0;
		} else if (p == "boxfade") {
			f = 1;
		} else if (p == "slotslide-horizontal") {
			f = 2;
		} else if (p == "slotslide-vertical") {
			f = 3;
		} else if (p == "curtain-1") {
			f = 4;
		} else if (p == "curtain-2") {
			f = 5;
		} else if (p == "curtain-3") {
			f = 6;
		} else if (p == "slotzoom-horizontal") {
			f = 7;
		} else if (p == "slotzoom-vertical") {
			f = 8;
		} else if (p == "slotfade-horizontal") {
			f = 9;
		} else if (p == "slotfade-vertical") {
			f = 10;
		} else if (p == "fade") {
			f = 11;
		} else if (p == "slideleft") {
			f = 12;
		} else if (p == "slideup") {
			f = 13;
		} else if (p == "slidedown") {
			f = 14;
		} else if (p == "slideright") {
			f = 15;
		} else if (p == "papercut") {
			f = 16;
		} else if (p == "3dcurtain-horizontal") {
			f = 17;
		} else if (p == "3dcurtain-vertical") {
			f = 18;
		} else if (p == "cubic" || p == "cube") {
			f = 19;
		} else if (p == "flyin") {
			f = 20;
		} else if (p == "turnoff") {
			f = 21;
		} else {
			f = Math.round(Math.random() * 21);
			o.data("slotamount", Math.round(Math.random() * 12 + 4))
		}
		if (p == "random-static") {
			f = Math.round(Math.random() * 16);
			if (f > 15) {
				f = 15;
			}
			if (f < 0) {
				f = 0
			}
		}
		if (p == "random-premium") {
			f = Math.round(Math.random() * 6 + 16);
			if (f > 21) {
				f = 21;
			}
			if (f < 16) {
				f = 16
			}
		}
		var d = -1;
		if (r.leftarrowpressed == 1 || r.act > r.next) {
			d = 1;
		}
		if (p == "slidehorizontal") {
			f = 12;
			if (r.leftarrowpressed == 1) {
				f = 15
			}
		}
		if (p == "slidevertical") {
			f = 13;
			if (r.leftarrowpressed == 1) {
				f = 14
			}
		}
		r.leftarrowpressed = 0;
		if (f > 21) {
			f = 21;
		}
		if (f < 0) {
			f = 0;
		}
		if ((r.ie || r.ie9) && f > 18) {
			f = Math.round(Math.random() * 16);
			o.data("slotamount", Math.round(Math.random() * 12 + 4))
		}
		if (r.ie && (f == 17 || f == 16 || f == 2 || f == 3 || f == 9 || f == 10)) {
			f = Math.round(Math.random() * 3 + 12);
		}
		if (r.ie9 && f == 3) {
			f = 4;
		}
		var v = 300;
		if (o.data("masterspeed") != t && o.data("masterspeed") > 99 && o.data("masterspeed") < 4001) {
			v = o.data("masterspeed");
		}
		n.parent().find(".bullet").each(function () {
			var t = e(this);
			t.removeClass("selected");
			if (r.navigationArrows == "withbullet" || r.navigationArrows == "nexttobullets") {
				if (t.index() - 1 == r.next) {
					t.addClass("selected")
				}
			} else {
				if (t.index() == r.next) {
					t.addClass("selected")
				}
			}
		});
		n.find(">li").each(function () {
			var t = e(this);
			if (t.index != r.act && t.index != r.next) {
				t.css({"z-index": 16})
			}
		});
		i.css({"z-index": 18});
		o.css({"z-index": 20});
		o.css({opacity: 0});
		if (i.index() != o.index()) {
			H(i, r)
		}
		D(o, r);
		if (o.data("slotamount") == t || o.data("slotamount") < 1) {
			r.slots = Math.round(Math.random() * 12 + 4);
			if (p == "boxslide") {
				r.slots = Math.round(Math.random() * 6 + 3)
			}
		} else {
			r.slots = o.data("slotamount")
		}
		if (o.data("rotate") == t) {
			r.rotate = 0;
		} else if (o.data("rotate") == 999) {
			r.rotate = Math.round(Math.random() * 360);
		} else {
			r.rotate = o.data("rotate");
		}
		if (!e.support.transition || r.ie || r.ie9) {
			r.rotate = 0;
		}
		if (r.firststart == 1) {
			i.css({opacity: 0});
			r.firststart = 0
		}
		if (f == 0) {
			v = v + 100;
			if (r.slots > 10) {
				r.slots = 10;
			}
			o.css({opacity: 1});
			E(u, r, true);
			E(a, r, false);
			a.find(".defaultimg").css({opacity: 0});
			a.find(".slotslide").each(function (t) {
				var s = e(this);
				if (r.ie9) {
					s.transition({top: 0 - r.sloth, left: 0 - r.slotw}, 0);
				} else {
					s.transition({top: 0 - r.sloth, left: 0 - r.slotw, rotate: r.rotate}, 0);
				}
				setTimeout(function () {
					s.transition({top: 0, left: 0, scale: 1, rotate: 0}, v * 1.5, function () {
						if (t == r.slots * r.slots - 1) {
							S(n, r);
							a.find(".defaultimg").css({opacity: 1});
							if (o.index() != i.index()) {
								u.find(".defaultimg").css({opacity: 0});
							}
							r.act = r.next;
							l(n)
						}
					})
				}, t * 15)
			})
		}
		if (f == 1) {
			if (r.slots > 5) {
				r.slots = 5;
			}
			o.css({opacity: 1});
			E(a, r, false);
			a.find(".defaultimg").css({opacity: 0});
			a.find(".slotslide").each(function (t) {
				var s = e(this);
				s.css({opacity: 0});
				s.find("img").css({opacity: 0});
				if (r.ie9) {
					s.find("img").transition({top: Math.random() * r.slotw - r.slotw + "px", left: Math.random() * r.slotw - r.slotw + "px"}, 0);
				} else {
					s.find("img").transition({top: Math.random() * r.slotw - r.slotw + "px", left: Math.random() * r.slotw - r.slotw + "px", rotate: r.rotate}, 0);
				}
				var f = Math.random() * 1e3 + (v + 200);
				if (t == r.slots * r.slots - 1) {
					f = 1500;
				}
				s.find("img").transition({opacity: 1, top: 0 - s.data("y") + "px", left: 0 - s.data("x") + "px", rotate: 0}, f);
				s.transition({opacity: 1}, f, function () {
					if (t == r.slots * r.slots - 1) {
						S(n, r);
						a.find(".defaultimg").css({opacity: 1});
						if (o.index() != i.index()) {
							u.find(".defaultimg").css({opacity: 0});
						}
						r.act = r.next;
						l(n)
					}
				})
			})
		}
		if (f == 2) {
			v = v + 200;
			o.css({opacity: 1});
			b(u, r, true);
			b(a, r, false);
			a.find(".defaultimg").css({opacity: 0});
			u.find(".slotslide").each(function () {
				var t = e(this);
				t.transit({left: r.slotw + "px", rotate: 0 - r.rotate}, v, function () {
					S(n, r);
					a.find(".defaultimg").css({opacity: 1});
					if (o.index() != i.index()) {
						u.find(".defaultimg").css({opacity: 0});
					}
					r.act = r.next;
					l(n)
				})
			});
			a.find(".slotslide").each(function () {
				var t = e(this);
				if (r.ie9) {
					t.transit({left: 0 - r.slotw + "px"}, 0);
				} else {
					t.transit({left: 0 - r.slotw + "px", rotate: r.rotate}, 0);
				}
				t.transit({left: "0px", rotate: 0}, v, function () {
					S(n, r);
					a.find(".defaultimg").css({opacity: 1});
					if (o.index() != i.index()) {
						u.find(".defaultimg").css({opacity: 0});
					}
					if (r.ie) {
						u.find(".defaultimg").css({opacity: 1});
					}
					r.act = r.next;
					l(n)
				})
			})
		}
		if (f == 3) {
			v = v + 200;
			o.css({opacity: 1});
			w(u, r, true);
			w(a, r, false);
			a.find(".defaultimg").css({opacity: 0});
			u.find(".slotslide").each(function () {
				var t = e(this);
				t.transit({top: r.sloth + "px", rotate: r.rotate}, v, function () {
					S(n, r);
					a.find(".defaultimg").css({opacity: 1});
					if (o.index() != i.index()) {
						u.find(".defaultimg").css({opacity: 0});
					}
					r.act = r.next;
					l(n)
				})
			});
			a.find(".slotslide").each(function () {
				var t = e(this);
				if (r.ie9) {
					t.transit({top: 0 - r.sloth + "px"}, 0);
				} else {
					t.transit({top: 0 - r.sloth + "px", rotate: r.rotate}, 0);
				}
				t.transit({top: "0px", rotate: 0}, v, function () {
					S(n, r);
					a.find(".defaultimg").css({opacity: 1});
					if (o.index() != i.index()) {
						u.find(".defaultimg").css({opacity: 0});
					}
					r.act = r.next;
					l(n)
				})
			})
		}
		if (f == 4) {
			o.css({opacity: 1});
			b(u, r, true);
			b(a, r, true);
			a.find(".defaultimg").css({opacity: 0});
			u.find(".defaultimg").css({opacity: 0});
			u.find(".slotslide").each(function (t) {
				var n = e(this);
				n.transit({top: 0 + r.height + "px", opacity: 1, rotate: r.rotate}, v + t * (70 - r.slots))
			});
			a.find(".slotslide").each(function (t) {
				var s = e(this);
				if (r.ie9) {
					s.transition({top: 0 - r.height + "px", opacity: 0}, 0);
				} else {
					s.transition({top: 0 - r.height + "px", opacity: 0, rotate: r.rotate}, 0);
				}
				s.transition({top: "0px", opacity: 1, rotate: 0}, v + t * (70 - r.slots), function () {
					if (t == r.slots - 1) {
						S(n, r);
						a.find(".defaultimg").css({opacity: 1});
						if (o.index() != i.index()) {
							u.find(".defaultimg").css({opacity: 0});
						}
						r.act = r.next;
						l(n)
					}
				})
			})
		}
		if (f == 5) {
			o.css({opacity: 1});
			b(u, r, true);
			b(a, r, true);
			a.find(".defaultimg").css({opacity: 0});
			u.find(".defaultimg").css({opacity: 0});
			u.find(".slotslide").each(function (t) {
				var n = e(this);
				n.transition({top: 0 + r.height + "px", opacity: 1, rotate: r.rotate}, v + (r.slots - t) * (70 - r.slots))
			});
			a.find(".slotslide").each(function (t) {
				var s = e(this);
				if (r.ie9) {
					s.transition({top: 0 - r.height + "px", opacity: 0}, 0);
				} else {
					s.transition({top: 0 - r.height + "px", opacity: 0, rotate: r.rotate}, 0);
				}
				s.transition({top: "0px", opacity: 1, rotate: 0}, v + (r.slots - t) * (70 - r.slots), function () {
					if (t == 0) {
						S(n, r);
						a.find(".defaultimg").css({opacity: 1});
						if (o.index() != i.index()) {
							u.find(".defaultimg").css({opacity: 0});
						}
						r.act = r.next;
						l(n)
					}
				})
			})
		}
		if (f == 6) {
			o.css({opacity: 1});
			if (r.slots < 2) {
				r.slots = 2;
			}
			b(u, r, true);
			b(a, r, true);
			a.find(".defaultimg").css({opacity: 0});
			u.find(".defaultimg").css({opacity: 0});
			u.find(".slotslide").each(function (t) {
				var n = e(this);
				if (t < r.slots / 2) {
					var i = (t + 2) * 60;
				} else {
					var i = (2 + r.slots - t) * 60;
				}
				n.transition({top: 0 + r.height + "px", opacity: 1}, v + i)
			});
			a.find(".slotslide").each(function (t) {
				var s = e(this);
				if (r.ie9) {
					s.transition({top: 0 - r.height + "px", opacity: 0}, 0);
				} else {
					s.transition({top: 0 - r.height + "px", opacity: 0, rotate: r.rotate}, 0);
				}
				if (t < r.slots / 2) {
					var f = (t + 2) * 60;
				} else {
					var f = (2 + r.slots - t) * 60;
				}
				s.transition({top: "0px", opacity: 1, rotate: 0}, v + f, function () {
					if (t == Math.round(r.slots / 2)) {
						S(n, r);
						a.find(".defaultimg").css({opacity: 1});
						if (o.index() != i.index()) {
							u.find(".defaultimg").css({opacity: 0});
						}
						r.act = r.next;
						l(n)
					}
				})
			})
		}
		if (f == 7) {
			v = v * 3;
			o.css({opacity: 1});
			b(u, r, true);
			b(a, r, true);
			a.find(".defaultimg").css({opacity: 0});
			u.find(".slotslide").each(function () {
				var t = e(this).find("img");
				t.transition({left: 0 - r.slotw / 2 + "px", top: 0 - r.height / 2 + "px", width: r.slotw * 2 + "px", height: r.height * 2 + "px", opacity: 0, rotate: r.rotate}, v, function () {
					S(n, r);
					a.find(".defaultimg").css({opacity: 1});
					if (o.index() != i.index()) {
						u.find(".defaultimg").css({opacity: 0});
					}
					r.act = r.next;
					l(n)
				})
			});
			/						/;
			a.find(".slotslide").each(function (t) {
				var s = e(this).find("img");
				if (r.ie9) {
					s.transition({left: 0 + "px", top: 0 + "px", opacity: 0}, 0);
				} else {
					s.transition({left: 0 + "px", top: 0 + "px", opacity: 0, rotate: r.rotate}, 0);
				}
				s.transition({left: 0 - t * r.slotw + "px", top: 0 + "px", width: a.find(".defaultimg").data("neww") + "px", height: a.find(".defaultimg").data("newh") + "px", opacity: 1, rotate: 0}, v, function () {
					S(n, r);
					a.find(".defaultimg").css({opacity: 1});
					if (o.index() != i.index()) {
						u.find(".defaultimg").css({opacity: 0});
					}
					r.act = r.next;
					l(n)
				})
			})
		}
		if (f == 8) {
			v = v * 3;
			o.css({opacity: 1});
			w(u, r, true);
			w(a, r, true);
			a.find(".defaultimg").css({opacity: 0});
			u.find(".slotslide").each(function () {
				var t = e(this).find("img");
				t.transition({left: 0 - r.width / 2 + "px", top: 0 - r.sloth / 2 + "px", width: r.width * 2 + "px", height: r.sloth * 2 + "px", opacity: 0, rotate: r.rotate}, v, function () {
					S(n, r);
					a.find(".defaultimg").css({opacity: 1});
					if (o.index() != i.index()) {
						u.find(".defaultimg").css({opacity: 0});
					}
					r.act = r.next;
					l(n)
				})
			});
			a.find(".slotslide").each(function (t) {
				var s = e(this).find("img");
				if (r.ie9) {
					s.transition({left: 0 + "px", top: 0 + "px", opacity: 0}, 0);
				} else {
					s.transition({left: 0 + "px", top: 0 + "px", opacity: 0, rotate: r.rotate}, 0);
				}
				s.transition({left: 0 + "px", top: 0 - t * r.sloth + "px", width: a.find(".defaultimg").data("neww") + "px", height: a.find(".defaultimg").data("newh") + "px", opacity: 1, rotate: 0}, v, function () {
					S(n, r);
					a.find(".defaultimg").css({opacity: 1});
					if (o.index() != i.index()) {
						u.find(".defaultimg").css({opacity: 0});
					}
					r.act = r.next;
					l(n)
				})
			})
		}
		if (f == 9) {
			o.css({opacity: 1});
			r.slots = r.width / 20;
			b(a, r, true);
			a.find(".defaultimg").css({opacity: 0});
			var m = 0;
			a.find(".slotslide").each(function (t) {
				var n = e(this);
				m++;
				n.transition({opacity: 0, x: 0, y: 0}, 0);
				n.data("tout", setTimeout(function () {
					n.transition({x: 0, y: 0, opacity: 1}, v)
				}, t * 4))
			});
			setTimeout(function () {
				S(n, r);
				a.find(".defaultimg").css({opacity: 1});
				if (o.index() != i.index()) {
					u.find(".defaultimg").css({opacity: 0});
				}
				if (r.ie) {
					u.find(".defaultimg").css({opacity: 1});
				}
				r.act = r.next;
				l(n)
			}, v + m * 4)
		}
		if (f == 10) {
			o.css({opacity: 1});
			r.slots = r.height / 20;
			w(a, r, true);
			a.find(".defaultimg").css({opacity: 0});
			var m = 0;
			a.find(".slotslide").each(function (t) {
				var n = e(this);
				m++;
				n.transition({opacity: 0, x: 0, y: 0}, 0);
				n.data("tout", setTimeout(function () {
					n.transition({x: 0, y: 0, opacity: 1}, v)
				}, t * 4))
			});
			setTimeout(function () {
				S(n, r);
				a.find(".defaultimg").css({opacity: 1});
				if (o.index() != i.index()) {
					u.find(".defaultimg").css({opacity: 0});
				}
				if (r.ie) {
					u.find(".defaultimg").css({opacity: 1});
				}
				r.act = r.next;
				l(n)
			}, v + m * 4)
		}
		if (f == 11) {
			o.css({opacity: 1});
			r.slots = 1;
			b(a, r, true);
			a.find(".defaultimg").css({opacity: 0, position: "relative"});
			var m = 0;
			a.find(".slotslide").each(function (t) {
				var n = e(this);
				m++;
				if (r.ie9 || r.ie) {
					if (r.ie) {
						o.css({opacity: "0"});
					}
					n.css({opacity: 0})
				} else {
					n.transition({opacity: 0, rotate: r.rotate}, 0);
				}
				setTimeout(function () {
					if (r.ie9 || r.ie) {
						if (r.ie) {
							o.animate({opacity: 1}, {duration: v});
						} else {
							n.transition({opacity: 1}, v)
						}
					} else {
						n.transition({opacity: 1, rotate: 0}, v)
					}
				}, 10)
			});
			setTimeout(function () {
				S(n, r);
				a.find(".defaultimg").css({opacity: 1});
				if (o.index() != i.index()) {
					u.find(".defaultimg").css({opacity: 0});
				}
				if (r.ie) {
					u.find(".defaultimg").css({opacity: 1});
				}
				r.act = r.next;
				l(n)
			}, v + 15)
		}
		if (f == 12 || f == 13 || f == 14 || f == 15) {
			v = v * 3;
			o.css({opacity: 1});
			r.slots = 1;
			b(a, r, true);
			b(u, r, true);
			u.find(".defaultimg").css({opacity: 0});
			a.find(".defaultimg").css({opacity: 0});
			var g = r.width;
			var y = r.height;
			var x = a.find(".slotslide");
			if (r.fullWidth == "on" || r.fullSreen == "on") {
				g = x.width();
				y = x.height()
			}
			if (f == 12) {
				if (r.ie9) {
					x.transition({left: g + "px"}, 0)
				} else {
					x.transition({left: g + "px", rotate: r.rotate}, 0)
				}
			} else if (f == 15) {
				if (r.ie9) {
					x.transition({left: 0 - g + "px"}, 0);
				} else {
					x.transition({left: 0 - g + "px", rotate: r.rotate}, 0);
				}
			} else if (f == 13) {
				if (r.ie9) {
					x.transition({top: y + "px"}, 0);
				} else {
					x.transition({top: y + "px", rotate: r.rotate}, 0);
				}
			} else if (f == 14) {
				if (r.ie9) {
					x.transition({top: 0 - y + "px"}, 0);
				} else {
					x.transition({top: 0 - y + "px", rotate: r.rotate}, 0);
				}
			}
			x.transition({left: "0px", top: "0px", opacity: 1, rotate: 0}, v, function () {
				S(n, r, 0);
				if (o.index() != i.index()) {
					u.find(".defaultimg").css({opacity: 0});
				}
				a.find(".defaultimg").css({opacity: 1});
				r.act = r.next;
				l(n)
			});
			var T = u.find(".slotslide");
			if (f == 12) {
				T.transition({left: 0 - g + "px", opacity: 1, rotate: 0}, v);
			} else if (f == 15) {
				T.transition({left: g + "px", opacity: 1, rotate: 0}, v);
			} else if (f == 13) {
				T.transition({top: 0 - y + "px", opacity: 1, rotate: 0}, v);
			} else if (f == 14) {
				T.transition({top: y + "px", opacity: 1, rotate: 0}, v)
			}
		}
		if (f == 16) {
			if (v < 600) {
				v = 600;
			}
			i.css({position: "absolute", "z-index": 20});
			o.css({position: "absolute", "z-index": 15});
			i.wrapInner('<div class="tp-half-one"></div>');
			i.find(".tp-half-one").clone(true).appendTo(i).addClass("tp-half-two");
			i.find(".tp-half-two").removeClass("tp-half-one");
			i.find(".tp-half-two").wrapInner('<div class="tp-offset"></div>');
			var g = r.width;
			var y = r.height;
			if (r.fullWidth == "on" || r.fullSreen == "on") {
				g = r.container.parent().width();
				y = r.container.parent().height()
			}
			var N = i.find(".defaultimg");
			if (N.length > 0 && N.data("fullwidthcentering") == "on") {
				var C = y / 2;
				var k = N.position().top
			} else {
				var C = y / 2;
				var k = 0
			}
			i.find(".tp-half-one").css({width: g + "px", height: C + "px", overflow: "hidden", position: "absolute", top: "0px", left: "0px"});
			i.find(".tp-half-two").css({width: g + "px", height: C + "px", overflow: "hidden", position: "absolute", top: C + "px", left: "0px"});
			i.find(".tp-half-two .tp-offset").css({position: "absolute", top: 0 - C + "px", left: "0px"});
			if (!e.support.transition) {
				i.find(".tp-half-one").animate({opacity: 0, top: 0 - y / 2 + "px"}, {duration: v, queue: false});
				i.find(".tp-half-two").animate({opacity: 0, top: y + "px"}, {duration: v, queue: false})
			} else {
				var L = Math.round(Math.random() * 40 - 20);
				var A = Math.round(Math.random() * 40 - 20);
				var O = Math.random() * 1 + 1;
				var M = Math.random() * 1 + 1;
				i.find(".tp-half-one").transition({opacity: 1, scale: O, rotate: L, y: 0 - y / 1.4 + "px"}, v, "in");
				i.find(".tp-half-two").transition({opacity: 1, scale: M, rotate: A, y: 0 + y / 1.4 + "px"}, v, "in");
				if (i.html() != null) {
					o.transition({scale: .8, x: r.width * .1, y: y * .1, rotate: L}, 0).transition({rotate: 0, scale: 1, x: 0, y: 0}, v - 100, "snap")
				}
			}
			a.find(".defaultimg").css({opacity: 1});
			setTimeout(function () {
				i.css({position: "absolute", "z-index": 18});
				o.css({position: "absolute", "z-index": 20});
				a.find(".defaultimg").css({opacity: 1});
				u.find(".defaultimg").css({opacity: 0});
				if (i.find(".tp-half-one").length > 0) {
					i.find(".tp-half-one >img, .tp-half-one >div").unwrap()
				}
				i.find(".tp-half-two").remove();
				r.transition = 0;
				r.act = r.next
			}, v);
			o.css({opacity: 1})
		}
		if (f == 17) {
			v = v + 100;
			if (r.slots > 10) {
				r.slots = 10;
			}
			o.css({opacity: 1});
			w(u, r, true);
			w(a, r, false);
			a.find(".defaultimg").css({opacity: 0});
			a.find(".slotslide").each(function (t) {
				var s = e(this);
				s.transition({opacity: 0, rotateY: 350, rotateX: 40, perspective: "1400px"}, 0);
				setTimeout(function () {
					s.transition({opacity: 1, top: 0, left: 0, scale: 1, perspective: "150px", rotate: 0, rotateY: 0, rotateX: 0}, v * 2, function () {
						if (t == r.slots - 1) {
							S(n, r);
							a.find(".defaultimg").css({opacity: 1});
							if (o.index() != i.index()) {
								u.find(".defaultimg").css({opacity: 0});
							}
							r.act = r.next;
							l(n)
						}
					})
				}, t * 100)
			})
		}
		if (f == 18) {
			v = v + 100;
			if (r.slots > 10) {
				r.slots = 10;
			}
			o.css({opacity: 1});
			b(u, r, true);
			b(a, r, false);
			a.find(".defaultimg").css({opacity: 0});
			a.find(".slotslide").each(function (t) {
				var s = e(this);
				s.transition({rotateX: 10, rotateY: 310, perspective: "1400px", rotate: 0, opacity: 0}, 0);
				setTimeout(function () {
					s.transition({top: 0, left: 0, scale: 1, perspective: "150px", rotate: 0, rotateY: 0, rotateX: 0, opacity: 1}, v * 2, function () {
						if (t == r.slots - 1) {
							S(n, r);
							a.find(".defaultimg").css({opacity: 1});
							if (o.index() != i.index()) {
								u.find(".defaultimg").css({opacity: 0});
							}
							r.act = r.next;
							l(n)
						}
					})
				}, t * 100)
			})
		}
		if (f == 19) {
			v = v + 100;
			if (r.slots > 10) {
				r.slots = 10;
			}
			o.css({opacity: 1});
			b(u, r, true);
			b(a, r, false);
			a.find(".defaultimg").css({opacity: 0});
			var _ = o.css("z-index");
			var P = i.css("z-index");
			a.find(".slotslide").each(function (t) {
				var s = e(this);
				s.parent().css({overflow: "visible"});
				s.css({background: "#333"});
				if (d == 1) {
					s.transition({opacity: 0, left: 0, top: r.height / 2, rotate3d: "1, 0, 0, -90deg "}, 0);
				} else {
					s.transition({opacity: 0, left: 0, top: 0 - r.height / 2, rotate3d: "1, 0, 0, 90deg "}, 0);
				}
				setTimeout(function () {
					s.transition({opacity: 1, top: 0, perspective: r.height * 2, rotate3d: " 1, 0, 0, 0deg "}, v * 2, function () {
						if (t == r.slots - 1) {
							S(n, r);
							a.find(".defaultimg").css({opacity: 1});
							if (o.index() != i.index()) {
								u.find(".defaultimg").css({opacity: 0});
							}
							r.act = r.next;
							l(n)
						}
					})
				}, t * 150)
			});
			u.find(".slotslide").each(function (t) {
				var n = e(this);
				n.parent().css({overflow: "visible"});
				n.css({background: "#333"});
				n.transition({top: 0, rotate3d: "1, 0, 0, 0deg"}, 0);
				u.find(".defaultimg").css({opacity: 0});
				setTimeout(function () {
					if (d == 1) {
						n.transition({opacity: .6, left: 0, perspective: r.height * 2, top: 0 - r.height / 2, rotate3d: "1, 0, 0, 90deg"}, v * 2, function () {
						});
					} else {
						n.transition({opacity: .6, left: 0, perspective: r.height * 2, top: 0 + r.height / 2, rotate3d: "1, 0, 0, -90deg"}, v * 2, function () {
						})
					}
				}, t * 150)
			})
		}
		if (f == 20) {
			v = v + 100;
			if (r.slots > 10) {
				r.slots = 10;
			}
			o.css({opacity: 1});
			w(u, r, true);
			w(a, r, false);
			a.find(".defaultimg").css({opacity: 0});
			a.find(".slotslide").each(function (t) {
				var s = e(this);
				s.parent().css({overflow: "visible"});
				if (d == 1) {
					s.transition({scale: .8, top: 0, left: 0 - r.width, rotate3d: "2, 5, 0, 110deg"}, 0);
				} else {
					s.transition({scale: .8, top: 0, left: 0 + r.width, rotate3d: "2, 5, 0, -110deg"}, 0);
				}
				setTimeout(function () {
					s.transition({scale: .8, left: 0, perspective: r.width, rotate3d: "1, 5, 0, 0deg"}, v * 2, "ease").transition({scale: 1}, 200, "out", function () {
						if (t == r.slots - 1) {
							S(n, r);
							a.find(".defaultimg").css({opacity: 1});
							if (o.index() != i.index()) {
								u.find(".defaultimg").css({opacity: 0});
							}
							r.act = r.next;
							l(n)
						}
					})
				}, t * 100)
			});
			u.find(".slotslide").each(function (t) {
				var n = e(this);
				n.transition({scale: .5, left: 0, rotate3d: "1, 5, 0, 5deg"}, 300, "in-out");
				u.find(".defaultimg").css({opacity: 0});
				setTimeout(function () {
					if (d == 1) {
						n.transition({top: 0, left: r.width / 2, perspective: r.width, rotate3d: "0, -3, 0, 70deg", opacity: 0}, v * 2, "out", function () {
						});
					} else {
						n.transition({top: 0, left: 0 - r.width / 2, perspective: r.width, rotate3d: "0, -3, 0, -70deg", opacity: 0}, v * 2, "out", function () {
						})
					}
				}, t * 100)
			})
		}
		if (f == 21) {
			v = v + 100;
			if (r.slots > 10) {
				r.slots = 10;
			}
			o.css({opacity: 1});
			w(u, r, true);
			w(a, r, false);
			a.find(".defaultimg").css({opacity: 0});
			a.find(".slotslide").each(function (t) {
				var s = e(this);
				if (d == 1) {
					s.transition({top: 0, left: 0 - r.width, rotate3d: "0, 1, 0, 90deg"}, 0);
				} else {
					s.transition({top: 0, left: 0 + r.width, rotate3d: "0, 1, 0, -90deg"}, 0);
				}
				setTimeout(function () {
					s.transition({left: 0, perspective: r.width * 2, rotate3d: "0, 0, 0, 0deg"}, v * 2, function () {
						if (t == r.slots - 1) {
							S(n, r);
							a.find(".defaultimg").css({opacity: 1});
							if (o.index() != i.index()) {
								u.find(".defaultimg").css({opacity: 0});
							}
							r.act = r.next;
							l(n)
						}
					})
				}, t * 100)
			});
			u.find(".slotslide").each(function (t) {
				var n = e(this);
				n.transition({left: 0, rotate3d: "0, 0, 0, 0deg"}, 0);
				u.find(".defaultimg").css({opacity: 0});
				setTimeout(function () {
					if (d == 1) {
						n.transition({top: 0, left: r.width / 2, perspective: r.width, rotate3d: "0, 1, 0, -90deg"}, v * 1.5, function () {
						});
					} else {
						n.transition({top: 0, left: 0 - r.width / 2, perspective: r.width, rotate3d: "0, 1, 0, +90deg"}, v * 1.5, function () {
						})
					}
				}, t * 100)
			})
		}
		var B = {};
		B.slideIndex = r.next + 1;
		n.trigger("revolution.slide.onchange", B);
		setTimeout(function () {
			n.trigger("revolution.slide.onafterswap")
		}, v);
		n.trigger("revolution.slide.onvideostop")
	}

	function C() {
	}

	function k(t) {
		var n = t.target.getVideoEmbedCode();
		var r = e("#" + n.split('id="')[1].split('"')[0]).closest(".tp-simpleresponsive");
		if (t.data == YT.PlayerState.PLAYING) {
			var i = r.find(".tp-bannertimer");
			var s = i.data("opt");
			i.stop();
			s.videoplaying = true;
			s.videostartednow = 1
		} else {
			var i = r.find(".tp-bannertimer");
			var s = i.data("opt");
			if (t.data != -1) {
				if (s.conthover == 0) {
					i.animate({width: "100%"}, {duration: s.delay - s.cd - 100, queue: false, easing: "linear"});
				}
				s.videoplaying = false;
				s.videostoppednow = 1
			}
		}
		if (t.data == 0 && s.nextslideatend == true) {
			s.container.revnext()
		}
	}

	function L(e) {
		e.target.playVideo()
	}

	function A(e, t, n) {
		if (e.addEventListener) {
			e.addEventListener(t, n, false)
		} else {
			e.attachEvent(t, n, false)
		}
	}

	function O(t) {
		var n = $f(t);
		var r = e("#" + t).closest(".tp-simpleresponsive");
		n.addEvent("ready", function (e) {
			n.addEvent("play", function (e) {
				var t = r.find(".tp-bannertimer");
				var n = t.data("opt");
				t.stop();
				n.videoplaying = true
			});
			n.addEvent("finish", function (e) {
				var t = r.find(".tp-bannertimer");
				var n = t.data("opt");
				if (n.conthover == 0) {
					t.animate({width: "100%"}, {duration: n.delay - n.cd - 100, queue: false, easing: "linear"});
				}
				n.videoplaying = false;
				n.videostartednow = 1;
				if (n.nextslideatend == true) {
					n.container.revnext()
				}
			});
			n.addEvent("pause", function (e) {
				var t = r.find(".tp-bannertimer");
				var n = t.data("opt");
				if (n.conthover == 0) {
					t.animate({width: "100%"}, {duration: n.delay - n.cd - 100, queue: false, easing: "linear"});
				}
				n.videoplaying = false;
				n.videostoppednow = 1
			})
		})
	}

	function M(t) {
		var n = $f(t);
		var r = e("#" + t).closest(".tp-simpleresponsive");
		n.addEvent("ready", function (e) {
			n.api("play")
		});
		n.addEvent("play", function (e) {
			var t = r.find(".tp-bannertimer");
			var n = t.data("opt");
			t.stop();
			n.videoplaying = true
		});
		n.addEvent("finish", function (e) {
			var t = r.find(".tp-bannertimer");
			var n = t.data("opt");
			if (n.conthover == 0) {
				t.animate({width: "100%"}, {duration: n.delay - n.cd - 100, queue: false, easing: "linear"});
			}
			n.videoplaying = false;
			n.videostartednow = 1;
			if (n.nextslideatend == true) {
				n.container.revnext()
			}
		});
		n.addEvent("pause", function (e) {
			var t = r.find(".tp-bannertimer");
			var n = t.data("opt");
			if (n.conthover == 0) {
				t.animate({width: "100%"}, {duration: n.delay - n.cd - 100, queue: false, easing: "linear"});
			}
			n.videoplaying = false;
			n.videostoppednow = 1
		})
	}

	function _(t) {
		t.on("play", function () {
			var t = e("body").find(".tp-bannertimer");
			var n = t.data("opt");
			t.stop();
			try {
				n.videoplaying = true
			} catch (r) {
			}
		});
		t.on("pause", function () {
			var t = e("body").find(".tp-bannertimer");
			var n = t.data("opt");
			if (n.conthover == 0) {
				t.animate({width: "100%"}, {duration: n.delay - n.cd - 100, queue: false, easing: "linear"});
			}
			n.videoplaying = false;
			n.videostoppednow = 1
		});
		t.on("ended", function () {
			var t = e("body").find(".tp-bannertimer");
			var n = t.data("opt");
			if (n.conthover == 0) {
				t.animate({width: "100%"}, {duration: n.delay - n.cd - 100, queue: false, easing: "linear"});
			}
			n.videoplaying = false;
			n.videostoppednow = 1;
			if (n.nextslideatend == true) {
				n.container.revnext()
			}
		})
	}

	function D(n, r, i) {
		var s = 0;
		var o = 0;
		n.find(".tp-caption").each(function (i) {
			s = r.width / 2 - r.startwidth / 2;
			if (r.bh > 1) {
				r.bw = 1;
				r.bh = 1
			}
			if (r.bw > 1) {
				r.bw = 1;
				r.bh = 1
			}
			var u = r.bw;
			var a = r.bh;
			if (r.fullScreen == "on") {
				o = r.height / 2 - r.startheight * r.bh / 2;
			}
			if (o < 0) {
				o = 0;
			}
			var f = n.find(".tp-caption:eq(" + i + ")");
			var l = 0;
			if (r.width < r.hideCaptionAtLimit && f.data("captionhidden") == "on") {
				f.addClass("tp-hidden-caption");
				l = 1
			} else {
				if (r.width < r.hideAllCaptionAtLilmit) {
					f.addClass("tp-hidden-caption");
					l = 1
				} else {
					f.removeClass("tp-hidden-caption")
				}
			}
			f.stop(true, true);
			if (l == 0) {
				if (f.data("linktoslide") != t) {
					f.css({cursor: "pointer"});
					if (f.data("linktoslide") != "no") {
						f.click(function () {
							var t = e(this);
							var n = t.data("linktoslide");
							if (n != "next" && n != "prev") {
								r.container.data("showus", n);
								r.container.parent().find(".tp-rightarrow").click()
							} else if (n == "next") {
								r.container.parent().find(".tp-rightarrow").click();
							} else if (n == "prev") {
								r.container.parent().find(".tp-leftarrow").click()
							}
						})
					}
				}
				if (f.hasClass("coloredbg")) {
					s = 0;
				}
				if (s < 0) {
					s = 0;
				}
				clearTimeout(f.data("timer"));
				clearTimeout(f.data("timer-end"));
				var c = "iframe" + Math.round(Math.random() * 1e3 + 1);
				if (f.find("iframe").length > 0) {
					f.find("iframe").each(function () {
						var n = e(this);
						if (n.attr("src").toLowerCase().indexOf("youtube") >= 0) {
							r.nextslideatend = f.data("nextslideatend");
							if (!n.hasClass("HasListener")) {
								try {
									n.attr("id", c);
									var i;
									if (f.data("autoplay") == true) {
										i = new YT.Player(c, {events: {onStateChange: k, onReady: L}});
									} else {
										i = new YT.Player(c, {events: {onStateChange: k}});
									}
									n.addClass("HasListener");
									f.data("player", i);
									if (f.data("autoplay") == true) {
										var s = e("body").find("#" + r.container.attr("id")).find(".tp-bannertimer");
										setTimeout(function () {
											s.stop();
											r.videoplaying = true
										}, 200)
									}
								} catch (o) {
								}
							} else {
								if (f.data("autoplay") == true) {
									var i = f.data("player");
									f.data("timerplay", setTimeout(function () {
										i.playVideo()
									}, f.data("start")));
									var s = e("body").find("#" + r.container.attr("id")).find(".tp-bannertimer");
									setTimeout(function () {
										s.stop();
										r.videoplaying = true
									}, 200)
								}
							}
						} else {
							if (n.attr("src").toLowerCase().indexOf("vimeo") >= 0) {
								r.nextslideatend = f.data("nextslideatend");
								if (!n.hasClass("HasListener")) {
									n.addClass("HasListener");
									n.attr("id", c);
									var u = n.attr("src");
									var a = {}, l = u, h = /([^&=]+)=([^&]*)/g, p;
									while (p = h.exec(l)) {
										a[decodeURIComponent(p[1])] = decodeURIComponent(p[2])
									}
									if (a["player_id"] != t) {
										u = u.replace(a["player_id"], c)
									} else {
										u = u + "&player_id=" + c
									}
									try {
										u = u.replace("api=0", "api=1")
									} catch (o) {
									}
									u = u + "&api=1";
									n.attr("src", u);
									var i = f.find("iframe")[0];
									if (f.data("autoplay") == true) {
										$f(i).addEvent("ready", M);
										var s = e("body").find("#" + r.container.attr("id")).find(".tp-bannertimer");
										setTimeout(function () {
											s.stop();
											r.videoplaying = true
										}, 200)
									} else {
										$f(i).addEvent("ready", O)
									}
								} else {
									if (f.data("autoplay") == true) {
										var n = f.find("iframe");
										var d = n.attr("id");
										var v = $f(d);
										f.data("timerplay", setTimeout(function () {
											v.api("play")
										}, f.data("start")));
										var s = e("body").find("#" + r.container.attr("id")).find(".tp-bannertimer");
										setTimeout(function () {
											s.stop();
											r.videoplaying = true
										}, 200)
									}
								}
							}
						}
					})
				}
				if (f.find("video").length > 0) {
					f.find("video").each(function (n) {
						var i = e(this).parent();
						if (i.hasClass("video-js")) {
							r.nextslideatend = f.data("nextslideatend");
							if (!i.hasClass("HasListener")) {
								i.addClass("HasListener");
								var s = "videoid_" + Math.round(Math.random() * 1e3 + 1);
								i.attr("id", s);
								videojs(s).ready(function () {
									_(this)
								})
							} else {
								s = i.attr("id")
							}
							if (f.data("autoplay") == true) {
								var o = e("body").find("#" + r.container.attr("id")).find(".tp-bannertimer");
								setTimeout(function () {
									o.stop();
									r.videoplaying = true
								}, 200);
								videojs(s).ready(function () {
									var e = this;
									i.data("timerplay", setTimeout(function () {
										e.play()
									}, f.data("start")))
								})
							}
							if (i.data("ww") == t) {
								i.data("ww", i.width());
							}
							if (i.data("hh") == t) {
								i.data("hh", i.height());
							}
							videojs(s).ready(function () {
								if (!f.hasClass("fullscreenvideo")) {
									var e = videojs(s);
									try {
										e.width(i.data("ww") * r.bw);
										e.height(i.data("hh") * r.bh)
									} catch (t) {
									}
								}
							})
						}
					})
				}
				if (f.hasClass("randomrotate") && (r.ie || r.ie9)) {
					f.removeClass("randomrotate").addClass("sfb");
				}
				f.removeClass("noFilterClass");
				var h = 0;
				var p = 0;
				if (f.find("img").length > 0) {
					var d = f.find("img");
					if (d.data("ww") == t) {
						d.data("ww", d.width());
					}
					if (d.data("hh") == t) {
						d.data("hh", d.height());
					}
					var v = d.data("ww");
					var m = d.data("hh");
					d.width(v * r.bw);
					d.height(m * r.bh);
					h = d.width();
					p = d.height()
				} else {
					if (f.find("iframe").length > 0) {
						var d = f.find("iframe");
						if (f.data("ww") == t) {
							f.data("ww", d.width())
						}
						if (f.data("hh") == t) {
							f.data("hh", d.height());
						}
						var v = f.data("ww");
						var m = f.data("hh");
						var g = f;
						if (g.data("fsize") == t) {
							g.data("fsize", parseInt(g.css("font-size"), 0) || 0);
						}
						if (g.data("pt") == t) {
							g.data("pt", parseInt(g.css("paddingTop"), 0) || 0);
						}
						if (g.data("pb") == t) {
							g.data("pb", parseInt(g.css("paddingBottom"), 0) || 0);
						}
						if (g.data("pl") == t) {
							g.data("pl", parseInt(g.css("paddingLeft"), 0) || 0);
						}
						if (g.data("pr") == t) {
							g.data("pr", parseInt(g.css("paddingRight"), 0) || 0);
						}
						if (g.data("mt") == t) {
							g.data("mt", parseInt(g.css("marginTop"), 0) || 0);
						}
						if (g.data("mb") == t) {
							g.data("mb", parseInt(g.css("marginBottom"), 0) || 0);
						}
						if (g.data("ml") == t) {
							g.data("ml", parseInt(g.css("marginLeft"), 0) || 0);
						}
						if (g.data("mr") == t) {
							g.data("mr", parseInt(g.css("marginRight"), 0) || 0);
						}
						if (g.data("bt") == t) {
							g.data("bt", parseInt(g.css("borderTop"), 0) || 0);
						}
						if (g.data("bb") == t) {
							g.data("bb", parseInt(g.css("borderBottom"), 0) || 0);
						}
						if (g.data("bl") == t) {
							g.data("bl", parseInt(g.css("borderLeft"), 0) || 0);
						}
						if (g.data("br") == t) {
							g.data("br", parseInt(g.css("borderRight"), 0) || 0);
						}
						if (g.data("lh") == t) {
							g.data("lh", parseInt(g.css("lineHeight"), 0) || 0);
						}
						var y = r.width;
						var b = r.height;
						if (y > r.startwidth) {
							y = r.startwidth;
						}
						if (b > r.startheight) {
							b = r.startheight;
						}
						if (!f.hasClass("fullscreenvideo")) {
							f.css({"font-size": g.data("fsize") * r.bw + "px", "padding-top": g.data("pt") * r.bh + "px", "padding-bottom": g.data("pb") * r.bh + "px", "padding-left": g.data("pl") * r.bw + "px", "padding-right": g.data("pr") * r.bw + "px", "margin-top": g.data("mt") * r.bh + "px", "margin-bottom": g.data("mb") * r.bh + "px", "margin-left": g.data("ml") * r.bw + "px", "margin-right": g.data("mr") * r.bw + "px", "border-top": g.data("bt") * r.bh + "px", "border-bottom": g.data("bb") * r.bh + "px", "border-left": g.data("bl") * r.bw + "px", "border-right": g.data("br") * r.bw + "px", "line-height": g.data("lh") * r.bh + "px", height: m * r.bh + "px", "white-space": "nowrap"});
						} else {
							s = 0;
							o = 0;
							f.css({width: r.width, height: r.height})
						}
						d.width(v * r.bw);
						d.height(m * r.bh);
						h = d.width();
						p = d.height()
					} else {
						f.find(".tp-resizeme, .tp-resizeme *").each(function () {
							P(e(this), r)
						});
						if (f.hasClass("tp-resizeme")) {
							f.find("*").each(function () {
								P(e(this), r)
							})
						}
						P(f, r);
						p = f.outerHeight(true);
						h = f.outerWidth(true);
						var w = f.outerHeight();
						var E = f.css("backgroundColor");
						f.find(".frontcorner").css({borderWidth: w + "px", left: 0 - w + "px", borderRight: "0px solid transparent", borderTopColor: E});
						f.find(".frontcornertop").css({borderWidth: w + "px", left: 0 - w + "px", borderRight: "0px solid transparent", borderBottomColor: E});
						f.find(".backcorner").css({borderWidth: w + "px", right: 0 - w + "px", borderLeft: "0px solid transparent", borderBottomColor: E});
						f.find(".backcornertop").css({borderWidth: w + "px", right: 0 - w + "px", borderLeft: "0px solid transparent", borderTopColor: E})
					}
				}
				if (f.data("voffset") == t) {
					f.data("voffset", 0);
				}
				if (f.data("hoffset") == t) {
					f.data("hoffset", 0);
				}
				var S = f.data("voffset") * u;
				var x = f.data("hoffset") * u;
				var T = r.startwidth * u;
				var N = r.startheight * u;
				if (f.data("x") == "center" || f.data("xcenter") == "center") {
					f.data("xcenter", "center");
					f.data("x", (T / 2 - f.outerWidth(true) / 2) / u + x)
				}
				if (f.data("x") == "left" || f.data("xleft") == "left") {
					f.data("xleft", "left");
					f.data("x", 0 / u + x)
				}
				if (f.data("x") == "right" || f.data("xright") == "right") {
					f.data("xright", "right");
					f.data("x", (T - f.outerWidth(true) + x) / u)
				}
				if (f.data("y") == "center" || f.data("ycenter") == "center") {
					f.data("ycenter", "center");
					f.data("y", (N / 2 - f.outerHeight(true) / 2) / r.bh + S)
				}
				if (f.data("y") == "top" || f.data("ytop") == "top") {
					f.data("ytop", "top");
					f.data("y", 0 / r.bh + S)
				}
				if (f.data("y") == "bottom" || f.data("ybottom") == "bottom") {
					f.data("ybottom", "bottom");
					f.data("y", (N - f.outerHeight(true) + S) / u)
				}
				if (f.hasClass("fade")) {
					f.css({opacity: 0, left: u * f.data("x") + s + "px", top: r.bh * f.data("y") + o + "px"})
				}
				if (f.hasClass("randomrotate")) {
					f.css({left: u * f.data("x") + s + "px", top: a * f.data("y") + o + "px"});
					var C = Math.random() * 2 + 1;
					var A = Math.round(Math.random() * 200 - 100);
					var D = Math.round(Math.random() * 200 - 100);
					var H = Math.round(Math.random() * 200 - 100);
					f.data("repx", D);
					f.data("repy", H);
					f.data("repo", f.css("opacity"));
					f.data("rotate", A);
					f.data("scale", C);
					f.transition({opacity: 0, scale: C, rotate: A, x: D, y: H, duration: "0ms"})
				} else {
					if (r.ie || r.ie9) {
					} else {
						if (f.find("iframe").length == 0) {
							f.transition({scale: 1, rotate: 0})
						}
					}
				}
				if (f.hasClass("lfr")) {
					f.css({opacity: 1, left: 15 + r.width + "px", top: r.bh * f.data("y") + o + "px"})
				}
				if (f.hasClass("lfl")) {
					f.css({opacity: 1, left: -15 - h + "px", top: r.bh * f.data("y") + o + "px"})
				}
				if (f.hasClass("sfl")) {
					f.css({opacity: 0, left: u * f.data("x") - 50 + s + "px", top: r.bh * f.data("y") + o + "px"})
				}
				if (f.hasClass("sfr")) {
					f.css({opacity: 0, left: u * f.data("x") + 50 + s + "px", top: r.bh * f.data("y") + o + "px"})
				}
				if (f.hasClass("lft")) {
					f.css({opacity: 1, left: u * f.data("x") + s + "px", top: -25 - p + "px"})
				}
				if (f.hasClass("lfb")) {
					f.css({opacity: 1, left: u * f.data("x") + s + "px", top: 25 + r.height + "px"})
				}
				if (f.hasClass("sft")) {
					f.css({opacity: 0, left: u * f.data("x") + s + "px", top: r.bh * f.data("y") + o - 50 + "px"})
				}
				if (f.hasClass("sfb")) {
					f.css({opacity: 0, left: u * f.data("x") + s + "px", top: r.bh * f.data("y") + o + 50 + "px"})
				}
				if (f.data("start") == t) {
					f.data("start", 1e3);
				}
				f.data("timer", setTimeout(function () {
					var n = f.data("easing");
					if (n == t) {
						n = "linear";
					}
					if (f.hasClass("fullscreenvideo")) {
						f.css({display: "block"});
					}
					f.css({visibility: "visible"});
					if (f.hasClass("fade")) {
						f.data("repo", f.css("opacity"));
						f.transition({opacity: 1, duration: f.data("speed")})
					}
					if (f.hasClass("randomrotate")) {
						n = n.replace("Elastic", "Back");
						n = n.replace("Bounce", "Back");
						f.transition({opacity: 1, scale: 1, left: u * f.data("x") + s + "px", top: a * f.data("y") + o + "px", rotate: 0, x: 0, y: 0, duration: f.data("speed"), easing: n});
						if (r.ie) {
							f.addClass("noFilterClass")
						}
					}
					if (f.hasClass("lfr") || f.hasClass("lfl") || f.hasClass("sfr") || f.hasClass("sfl") || f.hasClass("lft") || f.hasClass("lfb") || f.hasClass("sft") || f.hasClass("sfb")) {
						f.data("repx", f.position().left);
						f.data("repy", f.position().top);
						f.data("repo", f.css("opacity"));
						if (n.indexOf("Bounce") >= 0 || n.indexOf("Elastic") >= 0) {
							f.animate({opacity: 1, left: u * f.data("x") + s + "px", top: r.bh * f.data("y") + o + "px"}, {duration: f.data("speed"), easing: n, complete: function () {
								if (r.ie) {
									e(this).addClass("noFilterClass")
								}
							}});
						} else {
							f.transition({opacity: 1, left: u * f.data("x") + s + "px", top: r.bh * f.data("y") + o + "px", duration: f.data("speed"), easing: n})
						}
					}
				}, f.data("start")));
				if (f.data("end") != t) {
					f.data("timer-end", setTimeout(function () {
						if ((r.ie || r.ie9) && (f.hasClass("randomrotate") || f.hasClass("randomrotateout"))) {
							f.removeClass("randomrotate").removeClass("randomrotateout").addClass("fadeout")
						}
						B(f, r)
					}, f.data("end")))
				}
			}
		});
		var u = e("body").find("#" + r.container.attr("id")).find(".tp-bannertimer");
		u.data("opt", r)
	}

	function P(e, n) {
		if (e.data("fsize") == t) {
			e.data("fsize", parseInt(e.css("font-size"), 0) || 0);
		}
		if (e.data("pt") == t) {
			e.data("pt", parseInt(e.css("paddingTop"), 0) || 0);
		}
		if (e.data("pb") == t) {
			e.data("pb", parseInt(e.css("paddingBottom"), 0) || 0);
		}
		if (e.data("pl") == t) {
			e.data("pl", parseInt(e.css("paddingLeft"), 0) || 0);
		}
		if (e.data("pr") == t) {
			e.data("pr", parseInt(e.css("paddingRight"), 0) || 0);
		}
		if (e.data("mt") == t) {
			e.data("mt", parseInt(e.css("marginTop"), 0) || 0);
		}
		if (e.data("mb") == t) {
			e.data("mb", parseInt(e.css("marginBottom"), 0) || 0);
		}
		if (e.data("ml") == t) {
			e.data("ml", parseInt(e.css("marginLeft"), 0) || 0);
		}
		if (e.data("mr") == t) {
			e.data("mr", parseInt(e.css("marginRight"), 0) || 0);
		}
		if (e.data("bt") == t) {
			e.data("bt", parseInt(e.css("borderTopWidth"), 0) || 0);
		}
		if (e.data("bb") == t) {
			e.data("bb", parseInt(e.css("borderBottomWidth"), 0) || 0);
		}
		if (e.data("bl") == t) {
			e.data("bl", parseInt(e.css("borderLeftWidth"), 0) || 0);
		}
		if (e.data("br") == t) {
			e.data("br", parseInt(e.css("borderRightWidth"), 0) || 0);
		}
		if (e.data("lh") == t) {
			e.data("lh", parseInt(e.css("lineHeight"), 0) || 0);
		}
		if (e.data("minwidth") == t) {
			e.data("minwidth", parseInt(e.css("minWidth"), 0) || 0);
		}
		if (e.data("minheight") == t) {
			e.data("minheight", parseInt(e.css("minHeight"), 0) || 0);
		}
		if (e.data("maxwidth") == t) {
			e.data("maxwidth", parseInt(e.css("maxWidth"), 0) || "none");
		}
		if (e.data("maxheight") == t) {
			e.data("maxheight", parseInt(e.css("maxHeight"), 0) || "none");
		}
		e.css({"font-size": Math.round(e.data("fsize") * n.bw) + "px", "padding-top": Math.round(e.data("pt") * n.bh) + "px", "padding-bottom": Math.round(e.data("pb") * n.bh) + "px", "padding-left": Math.round(e.data("pl") * n.bw) + "px", "padding-right": Math.round(e.data("pr") * n.bw) + "px", "margin-top": e.data("mt") * n.bh + "px", "margin-bottom": e.data("mb") * n.bh + "px", "margin-left": e.data("ml") * n.bw + "px", "margin-right": e.data("mr") * n.bw + "px", borderTopWidth: Math.round(e.data("bt") * n.bh) + "px", borderBottomWidth: Math.round(e.data("bb") * n.bh) + "px", borderLeftWidth: Math.round(e.data("bl") * n.bw) + "px", borderRightWidth: Math.round(e.data("br") * n.bw) + "px", "line-height": Math.round(e.data("lh") * n.bh) + "px", "white-space": "nowrap", minWidth: e.data("minwidth") * n.bw + "px", minHeight: e.data("minheight") * n.bh + "px"});
		if (e.data("maxheight") != "none") {
			e.css({maxHeight: e.data("maxheight") * n.bh + "px"});
		}
		if (e.data("maxwidth") != "none") {
			e.css({maxWidth: e.data("maxwidth") * n.bw + "px"})
		}
	}

	function H(t, n) {
		t.find(".tp-caption").each(function (r) {
			var i = t.find(".tp-caption:eq(" + r + ")");
			i.stop(true, true);
			clearTimeout(i.data("timer"));
			clearTimeout(i.data("timer-end"));
			var s = i.data("easing");
			s = "easeInOutSine";
			var o = i.data("repx");
			var u = i.data("repy");
			var a = i.data("repo");
			var f = i.data("rotate");
			var l = i.data("scale");
			if (i.find("iframe").length > 0) {
				try {
					var c = i.find("iframe");
					var h = c.attr("id");
					var p = $f(h);
					p.api("pause");
					clearTimeout(i.data("timerplay"))
				} catch (d) {
				}
				try {
					var v = i.data("player");
					v.stopVideo();
					clearTimeout(i.data("timerplay"))
				} catch (d) {
				}
			}
			if (i.find("video").length > 0) {
				try {
					i.find("video").each(function (t) {
						var n = e(this).parent();
						var r = n.attr("id");
						clearTimeout(n.data("timerplay"));
						videojs(r).ready(function () {
							var e = this;
							e.pause()
						})
					})
				} catch (d) {
				}
			}
			try {
				B(i, n)
			} catch (d) {
			}
		})
	}

	function B(n, r) {
		if (n.hasClass("randomrotate") && (r.ie || r.ie9)) {
			n.removeClass("randomrotate").addClass("sfb");
		}
		if (n.hasClass("randomrotateout") && (r.ie || r.ie9)) {
			n.removeClass("randomrotateout").addClass("stb");
		}
		var i = n.data("endspeed");
		if (i == t) {
			i = n.data("speed");
		}
		var s = n.data("repx");
		var o = n.data("repy");
		var u = n.data("repo");
		if (r.ie) {
			n.css({opacity: "inherit", filter: "inherit"})
		}
		if (n.hasClass("ltr") || n.hasClass("ltl") || n.hasClass("str") || n.hasClass("stl") || n.hasClass("ltt") || n.hasClass("ltb") || n.hasClass("stt") || n.hasClass("stb")) {
			s = n.position().left;
			o = n.position().top;
			if (n.hasClass("ltr")) {
				s = r.width + 60;
			} else if (n.hasClass("ltl")) {
				s = 0 - n.width() - 60;
			} else if (n.hasClass("ltt")) {
				o = 0 - n.height() - 60;
			} else if (n.hasClass("ltb")) {
				o = r.height + 60;
			} else if (n.hasClass("str")) {
				s = s + 50;
				u = 0
			} else if (n.hasClass("stl")) {
				s = s - 50;
				u = 0
			} else if (n.hasClass("stt")) {
				o = o - 50;
				u = 0
			} else if (n.hasClass("stb")) {
				o = o + 50;
				u = 0
			}
			var a = n.data("endeasing");
			if (a == t) {
				a = "linear";
			}
			if (a.indexOf("Bounce") >= 0 || a.indexOf("Elastic") >= 0) {
				n.animate({opacity: u, left: s + "px", top: o + "px"}, {duration: n.data("endspeed"), easing: a, complete: function () {
					e(this).css({visibility: "hidden"})
				}});
			} else {
				n.transition({opacity: u, left: s + "px", top: o + "px", duration: n.data("endspeed"), easing: a});
			}
			if (r.ie) {
				n.removeClass("noFilterClass")
			}
		} else if (n.hasClass("randomrotateout")) {
			n.transition({opacity: 0, scale: Math.random() * 2 + .3, left: Math.random() * r.width + "px", top: Math.random() * r.height + "px", rotate: Math.random() * 40, duration: i, easing: a, complete: function () {
				e(this).css({visibility: "hidden"})
			}});
			if (r.ie) {
				n.removeClass("noFilterClass")
			}
		} else if (n.hasClass("fadeout")) {
			if (r.ie) {
				n.removeClass("noFilterClass");
			}
			n.transition({opacity: 0, duration: 200})
		} else if (n.hasClass("lfr") || n.hasClass("lfl") || n.hasClass("sfr") || n.hasClass("sfl") || n.hasClass("lft") || n.hasClass("lfb") || n.hasClass("sft") || n.hasClass("sfb")) {
			if (n.hasClass("lfr")) {
				s = r.width + 60;
			} else if (n.hasClass("lfl")) {
				s = 0 - n.width() - 60;
			} else if (n.hasClass("lft")) {
				o = 0 - n.height() - 60;
			} else if (n.hasClass("lfb")) {
				o = r.height + 60;
			}
			var a = n.data("endeasing");
			if (a == t) {
				a = "linear";
			}
			if (a.indexOf("Bounce") >= 0 || a.indexOf("Elastic") >= 0) {
				n.animate({opacity: u, left: s + "px", top: o + "px"}, {duration: n.data("endspeed"), easing: a, complete: function () {
					e(this).css({visibility: "hidden"})
				}});
			} else {
				n.transition({opacity: u, left: s + "px", top: o + "px", duration: n.data("endspeed"), easing: a});
			}
			if (r.ie) {
				n.removeClass("noFilterClass")
			}
		} else if (n.hasClass("fade")) {
			n.transition({opacity: 0, duration: i});
			if (r.ie) {
				n.removeClass("noFilterClass")
			}
		} else if (n.hasClass("randomrotate")) {
			n.transition({opacity: 0, scale: Math.random() * 2 + .3, left: Math.random() * r.width + "px", top: Math.random() * r.height + "px", rotate: Math.random() * 40, duration: i, easing: a});
			if (r.ie) {
				n.removeClass("noFilterClass")
			}
		}
	}

	function j(t, n) {
		t.children().each(function () {
			try {
				e(this).die("click")
			} catch (t) {
			}
			try {
				e(this).die("mouseenter")
			} catch (t) {
			}
			try {
				e(this).die("mouseleave")
			} catch (t) {
			}
			try {
				e(this).unbind("hover")
			} catch (t) {
			}
		});
		try {
			t.die("click", "mouseenter", "mouseleave")
		} catch (r) {
		}
		clearInterval(n.cdint);
		t = null
	}

	function F(n, r) {
		r.cd = 0;
		r.loop = 0;
		if (r.stopAfterLoops != t && r.stopAfterLoops > -1) {
			r.looptogo = r.stopAfterLoops;
		} else {
			r.looptogo = 9999999;
		}
		if (r.stopAtSlide != t && r.stopAtSlide > -1) {
			r.lastslidetoshow = r.stopAtSlide;
		} else {
			r.lastslidetoshow = 999;
		}
		r.stopLoop = "off";
		if (r.looptogo == 0) {
			r.stopLoop = "on";
		}
		if (r.slideamount > 1 && !(r.stopAfterLoops == 0 && r.stopAtSlide == 1)) {
			var i = n.find(".tp-bannertimer");
			if (i.length > 0) {
				i.css({width: "0%"});
				i.animate({width: "100%"}, {duration: r.delay - 100, queue: false, easing: "linear"})
			}
			i.data("opt", r);
			r.cdint = setInterval(function () {
				if (e("body").find(n).length == 0) {
					j(n, r);
				}
				if (n.data("conthover-changed") == 1) {
					r.conthover = n.data("conthover");
					n.data("conthover-changed", 0)
				}
				if (r.conthover != 1 && r.videoplaying != true && r.width > r.hideSliderAtLimit) {
					r.cd = r.cd + 100;
				}
				if (r.fullWidth != "on") {
					if (r.width > r.hideSliderAtLimit) {
						n.parent().removeClass("tp-hide-revslider");
					} else {
						n.parent().addClass("tp-hide-revslider");
					}
				}
				if (r.videostartednow == 1) {
					n.trigger("revolution.slide.onvideoplay");
					r.videostartednow = 0
				}
				if (r.videostoppednow == 1) {
					n.trigger("revolution.slide.onvideostop");
					r.videostoppednow = 0
				}
				if (r.cd >= r.delay) {
					r.cd = 0;
					r.act = r.next;
					r.next = r.next + 1;
					if (r.next > n.find(">ul >li").length - 1) {
						r.next = 0;
						r.looptogo = r.looptogo - 1;
						if (r.looptogo <= 0) {
							r.stopLoop = "on"
						}
					}
					if (r.stopLoop == "on" && r.next == r.lastslidetoshow - 1) {
						clearInterval(r.cdint);
						n.find(".tp-bannertimer").css({visibility: "hidden"});
						n.trigger("revolution.slide.onstop")
					}
					T(n, r);
					if (i.length > 0) {
						i.css({width: "0%"});
						i.animate({width: "100%"}, {duration: r.delay - 100, queue: false, easing: "linear"})
					}
				}
			}, 100);
			n.hover(function () {
				if (r.onHoverStop == "on") {
					r.conthover = 1;
					i.stop();
					n.trigger("revolution.slide.onpause")
				}
			}, function () {
				if (n.data("conthover") != 1) {
					n.trigger("revolution.slide.onresume");
					r.conthover = 0;
					if (r.onHoverStop == "on" && r.videoplaying != true) {
						i.animate({width: "100%"}, {duration: r.delay - r.cd - 100, queue: false, easing: "linear"})
					}
				}
			})
		}
	}

	e.fn.extend({revolution: function (i) {
		e.fn.revolution.defaults = {delay: 9e3, startheight: 500, startwidth: 960, hideThumbs: 200, thumbWidth: 100, thumbHeight: 50, thumbAmount: 5, navigationType: "bullet", navigationArrows: "withbullet", navigationStyle: "round", navigationHAlign: "center", navigationVAlign: "bottom", navigationHOffset: 0, navigationVOffset: 20, soloArrowLeftHalign: "left", soloArrowLeftValign: "center", soloArrowLeftHOffset: 20, soloArrowLeftVOffset: 0, soloArrowRightHalign: "right", soloArrowRightValign: "center", soloArrowRightHOffset: 20, soloArrowRightVOffset: 0, touchenabled: "on", onHoverStop: "on", stopAtSlide: -1, stopAfterLoops: -1, hideCaptionAtLimit: 0, hideAllCaptionAtLilmit: 0, hideSliderAtLimit: 0, shadow: 1, fullWidth: "off", fullScreen: "off"};
		i = e.extend({}, e.fn.revolution.defaults, i);
		return this.each(function () {
			var o = i;
			var u = e(this);
			if (!u.hasClass("revslider-initialised")) {
				u.addClass("revslider-initialised");
				if (u.attr("id") == t) {
					u.attr("id", "revslider-" + Math.round(Math.random() * 1e3 + 5));
				}
				o.firefox13 = false;
				o.ie = !e.support.opacity;
				o.ie9 = document.documentMode == 9;
				var a = e.fn.jquery.split("."), l = parseFloat(a[0]), c = parseFloat(a[1]), m = parseFloat(a[2] || "0");
				if (l == 1 && c < 7) {
					u.html('<div style="text-align:center; padding:40px 0px; font-size:20px; color:#992222;"> The Current Version of jQuery:' + a + " <br>Please update your jQuery Version to min. 1.7 in Case you wish to use the Revolution Slider Plugin</div>")
				}
				if (l > 1) {
					o.ie = false;
				}
				if (!e.support.transition) {
					e.fn.transition = e.fn.animate;
				}
				e.cssEase["Bounce"] = "cubic-bezier(0,1,0.5,1.3)";
				u.find(".caption").each(function () {
					e(this).addClass("tp-caption")
				});
				if (s()) {
					u.find(".tp-caption").each(function () {
						if (e(this).data("autoplay") == true) {
							e(this).data("autoplay", false)
						}
					})
				}
				var g = 0;
				var b = 0;
				var w = 0;
				u.find(".tp-caption iframe").each(function (t) {
					try {
						if (e(this).attr("src").indexOf("you") > 0 && g == 0) {
							g = 1;
							var n = document.createElement("script");
							n.src = "http://www.youtube.com/player_api";
							var r = document.getElementsByTagName("script")[0];
							r.parentNode.insertBefore(n, r)
						}
					} catch (i) {
					}
				});
				u.find(".tp-caption iframe").each(function (t) {
					try {
						if (e(this).attr("src").indexOf("vim") > 0 && b == 0) {
							b = 1;
							var n = document.createElement("script");
							n.src = "http://a.vimeocdn.com/js/froogaloop2.min.js";
							var r = document.getElementsByTagName("script")[0];
							r.parentNode.insertBefore(n, r)
						}
					} catch (i) {
					}
				});
				u.find(".tp-caption video").each(function (t) {
					try {
						if (e(this).hasClass("video-js") && w == 0) {
							w = 1;
							var n = document.createElement("script");
							n.src = o.videoJsPath + "video.js";
							var r = document.getElementsByTagName("script")[0];
							r.parentNode.insertBefore(n, r);
							e("head").append('<link rel="stylesheet" type="text/css" href="' + o.videoJsPath + 'video-js.min.css" media="screen" />');
							e("head").append('<script> videojs.options.flash.swf = "' + o.videoJsPath + 'video-js.swf";</script>')
						}
					} catch (i) {
					}
				});
				if (o.shuffle == "on") {
					for (var E = 0; E < u.find(">ul:first-child >li").length; E++) {
						var S = Math.round(Math.random() * u.find(">ul:first-child >li").length);
						u.find(">ul:first-child >li:eq(" + S + ")").prependTo(u.find(">ul:first-child"))
					}
				}
				o.slots = 4;
				o.act = -1;
				o.next = 0;
				if (o.startWithSlide != t) {
					o.next = o.startWithSlide;
				}
				var x = n("#")[0];
				if (x.length < 9) {
					if (x.split("slide").length > 1) {
						var N = parseInt(x.split("slide")[1], 0);
						if (N < 1) {
							N = 1;
						}
						if (N > u.find(">ul:first >li").length) {
							N = u.find(">ul:first >li").length;
						}
						o.next = N - 1
					}
				}
				o.origcd = o.delay;
				o.firststart = 1;
				if (o.navigationHOffset == t) {
					o.navOffsetHorizontal = 0;
				}
				if (o.navigationVOffset == t) {
					o.navOffsetVertical = 0;
				}
				u.append('<div class="tp-loader"></div>');
				if (u.find(".tp-bannertimer").length == 0) {
					u.append('<div class="tp-bannertimer" style="visibility:hidden"></div>');
				}
				var C = u.find(".tp-bannertimer");
				if (C.length > 0) {
					C.css({width: "0%"})
				}
				u.addClass("tp-simpleresponsive");
				o.container = u;
				o.slideamount = u.find(">ul:first >li").length;
				if (u.height() == 0) {
					u.height(o.startheight);
				}
				if (o.startwidth == t || o.startwidth == 0) {
					o.startwidth = u.width();
				}
				if (o.startheight == t || o.startheight == 0) {
					o.startheight = u.height();
				}
				o.width = u.width();
				o.height = u.height();
				o.bw = o.startwidth / u.width();
				o.bh = o.startheight / u.height();
				if (o.width != o.startwidth) {
					o.height = Math.round(o.startheight * (o.width / o.startwidth));
					u.height(o.height)
				}
				if (o.shadow != 0) {
					u.parent().append('<div class="tp-bannershadow tp-shadow' + o.shadow + '"></div>');
					u.parent().find(".tp-bannershadow").css({width: o.width})
				}
				u.find("ul").css({display: "none"});
				if (o.lazyLoad != "on") {
					u.waitForImages(function () {
						u.find("ul").css({display: "block"});
						y(u, o);
						if (o.slideamount > 1) {
							h(u, o);
						}
						if (o.slideamount > 1) {
							f(u, o);
						}
						if (o.slideamount > 1) {
							p(u, o);
						}
						e("#unvisible_button").click(function () {
							o.navigationArrows = e(".selectnavarrows").val();
							o.navigationType = e(".selectnavtype").val();
							o.navigationStyle = e(".selectnavstyle").val();
							o.soloArrowStyle = "default";
							e(".tp-bullets").remove();
							e(".tparrows").remove();
							if (o.slideamount > 1) {
								h(u, o);
							}
							if (o.slideamount > 1) {
								f(u, o);
							}
							if (o.slideamount > 1) {
								p(u, o)
							}
						});
						d(u, o);
						if (o.hideThumbs > 0) {
							v(u, o);
						}
						u.waitForImages(function () {
							u.find(".tp-loader").fadeOut(600);
							setTimeout(function () {
								T(u, o);
								if (o.slideamount > 1) {
									F(u, o);
								}
								u.trigger("revolution.slide.onloaded")
							}, 600)
						})
					})
				} else {
					var k = u.find("ul >li >img").first();
					if (k.data("lazyload") != t) {
						k.attr("src", k.data("lazyload"));
					}
					k.data("lazydone", 1);
					k.parent().waitForImages(function () {
						u.find("ul").css({display: "block"});
						y(u, o);
						if (o.slideamount > 1) {
							h(u, o);
						}
						if (o.slideamount > 1) {
							f(u, o);
						}
						if (o.slideamount > 1) {
							p(u, o);
						}
						d(u, o);
						if (o.hideThumbs > 0) {
							v(u, o);
						}
						k.parent().waitForImages(function () {
							u.find(".tp-loader").fadeOut(600);
							setTimeout(function () {
								T(u, o);
								if (o.slideamount > 1) {
									F(u, o);
								}
								u.trigger("revolution.slide.onloaded")
							}, 600)
						})
					})
				}
				e(window).resize(function () {
					if (e("body").find(u) != 0) {
						if (u.outerWidth(true) != o.width) {
							r(u, o)
						}
					}
				});
				u.find(".tp-scrollbelowslider").on("click", function () {
					var t = 0;
					try {
						t = e("body").find(o.fullScreenOffsetContainer).height()
					} catch (n) {
					}
					try {
						t = t - e(this).data("scrolloffset")
					} catch (n) {
					}
					e("body,html").animate({scrollTop: u.offset().top + u.find(">ul >li").height() - t + "px"}, {duration: 400})
				})
			}
		})
	}, revscroll: function (t) {
		return this.each(function () {
			var n = e(this);
			e("body,html").animate({scrollTop: n.offset().top + n.find(">ul >li").height() - t + "px"}, {duration: 400})
		})
	}, revpause: function (t) {
		return this.each(function () {
			var t = e(this);
			t.data("conthover", 1);
			t.data("conthover-changed", 1);
			t.trigger("revolution.slide.onpause");
			var n = t.parent().find(".tp-bannertimer");
			n.stop()
		})
	}, revresume: function (t) {
		return this.each(function () {
			var t = e(this);
			t.data("conthover", 0);
			t.data("conthover-changed", 1);
			t.trigger("revolution.slide.onresume");
			var n = t.parent().find(".tp-bannertimer");
			var r = n.data("opt");
			n.animate({width: "100%"}, {duration: r.delay - r.cd - 100, queue: false, easing: "linear"})
		})
	}, revnext: function (t) {
		return this.each(function () {
			var t = e(this);
			t.parent().find(".tp-rightarrow").click()
		})
	}, revprev: function (t) {
		return this.each(function () {
			var t = e(this);
			t.parent().find(".tp-leftarrow").click()
		})
	}, revmaxslide: function (t) {
		return e(this).find(">ul:first-child >li").length
	}, revcurrentslide: function (t) {
		var n = e(this);
		var r = n.parent().find(".tp-bannertimer");
		var i = r.data("opt");
		return i.act
	}, revlastslide: function (t) {
		var n = e(this);
		var r = n.parent().find(".tp-bannertimer");
		var i = r.data("opt");
		return i.lastslide
	}, revshowslide: function (t) {
		return this.each(function () {
			var n = e(this);
			n.data("showus", t);
			n.parent().find(".tp-rightarrow").click()
		})
	}})
})(jQuery)
/*---------------------------------------------------------------------------------------------

 @author       Constantin Saguin - @brutaldesign
 @link            http://csag.co
 @github        http://github.com/brutaldesign/swipebox
 @version     1.2.1
 @license      MIT License

 ----------------------------------------------------------------------------------------------*/
!function (window, document, $, undefined) {
	$.swipebox = function (elem, options) {
		var defaults = {useCSS: true, initialIndexOnArray: 0, hideBarsDelay: 3e3, videoMaxWidth: 1140, vimeoColor: "CCCCCC", beforeOpen: null, afterClose: null}, plugin = this, elements = [], elem = elem, selector = elem.selector, $selector = $(selector), isTouch = document.createTouch !== undefined || "ontouchstart"in window || "onmsgesturechange"in window || navigator.msMaxTouchPoints, supportSVG = !!window.SVGSVGElement, winWidth = window.innerWidth ? window.innerWidth : $(window).width(), winHeight = window.innerHeight ? window.innerHeight : $(window).height(), html = '<div id="swipebox-overlay">				<div id="swipebox-slider"></div>				<div id="swipebox-caption"></div>				<div id="swipebox-action">					<a id="swipebox-close"></a>					<a id="swipebox-prev"></a>					<a id="swipebox-next"></a>				</div>		</div>';
		plugin.settings = {};
		plugin.init = function () {
			plugin.settings = $.extend({}, defaults, options);
			if ($.isArray(elem)) {
				elements = elem;
				ui.target = $(window);
				ui.init(plugin.settings.initialIndexOnArray)
			} else {
				$selector.click(function (e) {
					elements = [];
					var index, relType, relVal;
					if (!relVal) {
						relType = "rel";
						relVal = $(this).attr(relType)
					}
					if (relVal && relVal !== "" && relVal !== "nofollow") {
						$elem = $selector.filter("[" + relType + '="' + relVal + '"]')
					} else {
						$elem = $(selector)
					}
					$elem.each(function () {
						var title = null, href = null;
						if ($(this).attr("title")) {
							title = $(this).attr("title");
						}
						if ($(this).attr("href")) {
							href = $(this).attr("href");
						}
						elements.push({href: href, title: title})
					});
					index = $elem.index($(this));
					e.preventDefault();
					e.stopPropagation();
					ui.target = $(e.target);
					ui.init(index)
				})
			}
		};
		plugin.refresh = function () {
			if (!$.isArray(elem)) {
				ui.destroy();
				$elem = $(selector);
				ui.actions()
			}
		};
		var ui = {init: function (index) {
			if (plugin.settings.beforeOpen) {
				plugin.settings.beforeOpen();
			}
			this.target.trigger("swipebox-start");
			$.swipebox.isOpen = true;
			this.build();
			this.openSlide(index);
			this.openMedia(index);
			this.preloadMedia(index + 1);
			this.preloadMedia(index - 1)
		}, build: function () {
			var $this = this;
			$("body").append(html);
			if ($this.doCssTrans()) {
				$("#swipebox-slider").css({"-webkit-transition": "left 0.4s ease", "-moz-transition": "left 0.4s ease", "-o-transition": "left 0.4s ease", "-khtml-transition": "left 0.4s ease", transition: "left 0.4s ease"});
				$("#swipebox-overlay").css({"-webkit-transition": "opacity 1s ease", "-moz-transition": "opacity 1s ease", "-o-transition": "opacity 1s ease", "-khtml-transition": "opacity 1s ease", transition: "opacity 1s ease"});
				$("#swipebox-action, #swipebox-caption").css({"-webkit-transition": "0.5s", "-moz-transition": "0.5s", "-o-transition": "0.5s", "-khtml-transition": "0.5s", transition: "0.5s"})
			}
			if (supportSVG) {
				var bg = $("#swipebox-action #swipebox-close").css("background-image");
				bg = bg.replace("png", "svg");
				$("#swipebox-action #swipebox-prev,#swipebox-action #swipebox-next,#swipebox-action #swipebox-close").css({"background-image": bg})
			}
			$.each(elements, function () {
				$("#swipebox-slider").append('<div class="slide"></div>')
			});
			$this.setDim();
			$this.actions();
			$this.keyboard();
			$this.gesture();
			$this.animBars();
			$this.resize()
		}, setDim: function () {
			var width, height, sliderCss = {};
			if ("onorientationchange"in window) {
				window.addEventListener("orientationchange", function () {
					if (window.orientation == 0) {
						width = winWidth;
						height = winHeight
					} else if (window.orientation == 90 || window.orientation == -90) {
						width = winHeight;
						height = winWidth
					}
				}, false)
			} else {
				width = window.innerWidth ? window.innerWidth : $(window).width();
				height = window.innerHeight ? window.innerHeight : $(window).height()
			}
			sliderCss = {width: width, height: height};
			$("#swipebox-overlay").css(sliderCss)
		}, resize: function () {
			var $this = this;
			$(window).resize(function () {
				$this.setDim()
			}).resize()
		}, supportTransition: function () {
			var prefixes = "transition WebkitTransition MozTransition OTransition msTransition KhtmlTransition".split(" ");
			for (var i = 0; i < prefixes.length; i++) {
				if (document.createElement("div").style[prefixes[i]] !== undefined) {
					return prefixes[i]
				}
			}
			return false
		}, doCssTrans: function () {
			if (plugin.settings.useCSS && this.supportTransition()) {
				return true
			}
		}, gesture: function () {
			if (isTouch) {
				var $this = this, distance = null, swipMinDistance = 10, startCoords = {}, endCoords = {};
				var bars = $("#swipebox-caption, #swipebox-action");
				bars.addClass("visible-bars");
				$this.setTimeout();
				$("body").bind("touchstart",function (e) {
					$(this).addClass("touching");
					endCoords = e.originalEvent.targetTouches[0];
					startCoords.pageX = e.originalEvent.targetTouches[0].pageX;
					$(".touching").bind("touchmove", function (e) {
						e.preventDefault();
						e.stopPropagation();
						endCoords = e.originalEvent.targetTouches[0]
					});
					return false
				}).bind("touchend", function (e) {
					e.preventDefault();
					e.stopPropagation();
					distance = endCoords.pageX - startCoords.pageX;
					if (distance >= swipMinDistance) {
						$this.getPrev()
					} else if (distance <= -swipMinDistance) {
						$this.getNext()
					} else {
						if (!bars.hasClass("visible-bars")) {
							$this.showBars();
							$this.setTimeout()
						} else {
							$this.clearTimeout();
							$this.hideBars()
						}
					}
					$(".touching").off("touchmove").removeClass("touching")
				})
			}
		}, setTimeout: function () {
			if (plugin.settings.hideBarsDelay > 0) {
				var $this = this;
				$this.clearTimeout();
				$this.timeout = window.setTimeout(function () {
					$this.hideBars()
				}, plugin.settings.hideBarsDelay)
			}
		}, clearTimeout: function () {
			window.clearTimeout(this.timeout);
			this.timeout = null
		}, showBars: function () {
			var bars = $("#swipebox-caption, #swipebox-action");
			if (this.doCssTrans()) {
				bars.addClass("visible-bars")
			} else {
				$("#swipebox-caption").animate({top: 0}, 500);
				$("#swipebox-action").animate({bottom: 0}, 500);
				setTimeout(function () {
					bars.addClass("visible-bars")
				}, 1e3)
			}
		}, hideBars: function () {
			var bars = $("#swipebox-caption, #swipebox-action");
			if (this.doCssTrans()) {
				bars.removeClass("visible-bars")
			} else {
				$("#swipebox-caption").animate({top: "-50px"}, 500);
				$("#swipebox-action").animate({bottom: "-50px"}, 500);
				setTimeout(function () {
					bars.removeClass("visible-bars")
				}, 1e3)
			}
		}, animBars: function () {
			var $this = this;
			var bars = $("#swipebox-caption, #swipebox-action");
			bars.addClass("visible-bars");
			$this.setTimeout();
			$("#swipebox-slider").click(function (e) {
				if (!bars.hasClass("visible-bars")) {
					$this.showBars();
					$this.setTimeout()
				}
			});
			$("#swipebox-action").hover(function () {
				$this.showBars();
				bars.addClass("force-visible-bars");
				$this.clearTimeout()
			}, function () {
				bars.removeClass("force-visible-bars");
				$this.setTimeout()
			})
		}, keyboard: function () {
			var $this = this;
			$(window).bind("keyup", function (e) {
				e.preventDefault();
				e.stopPropagation();
				if (e.keyCode == 37) {
					$this.getPrev()
				} else if (e.keyCode == 39) {
					$this.getNext()
				} else if (e.keyCode == 27) {
					$this.closeSlide()
				}
			})
		}, actions: function () {
			var $this = this;
			if (elements.length < 2) {
				$("#swipebox-prev, #swipebox-next").hide()
			} else {
				$("#swipebox-prev").bind("click touchend", function (e) {
					e.preventDefault();
					e.stopPropagation();
					$this.getPrev();
					$this.setTimeout()
				});
				$("#swipebox-next").bind("click touchend", function (e) {
					e.preventDefault();
					e.stopPropagation();
					$this.getNext();
					$this.setTimeout()
				})
			}
			$("#swipebox-close").bind("click touchend", function (e) {
				$this.closeSlide()
			})
		}, setSlide: function (index, isFirst) {
			isFirst = isFirst || false;
			var slider = $("#swipebox-slider");
			if (this.doCssTrans()) {
				slider.css({left: -index * 100 + "%"})
			} else {
				slider.animate({left: -index * 100 + "%"})
			}
			$("#swipebox-slider .slide").removeClass("current");
			$("#swipebox-slider .slide").eq(index).addClass("current");
			this.setTitle(index);
			if (isFirst) {
				slider.fadeIn()
			}
			$("#swipebox-prev, #swipebox-next").removeClass("disabled");
			if (index == 0) {
				$("#swipebox-prev").addClass("disabled")
			} else if (index == elements.length - 1) {
				$("#swipebox-next").addClass("disabled")
			}
		}, openSlide: function (index) {
			$("html").addClass("swipebox");
			$(window).trigger("resize");
			this.setSlide(index, true)
		}, preloadMedia: function (index) {
			var $this = this, src = null;
			if (elements[index] !== undefined) {
				src = elements[index].href;
			}
			if (!$this.isVideo(src)) {
				setTimeout(function () {
					$this.openMedia(index)
				}, 1e3)
			} else {
				$this.openMedia(index)
			}
		}, openMedia: function (index) {
			var $this = this, src = null;
			if (elements[index] !== undefined) {
				src = elements[index].href;
			}
			if (index < 0 || index >= elements.length) {
				return false
			}
			if (!$this.isVideo(src)) {
				$this.loadMedia(src, function () {
					$("#swipebox-slider .slide").eq(index).html(this)
				})
			} else {
				$("#swipebox-slider .slide").eq(index).html($this.getVideo(src))
			}
		}, setTitle: function (index, isFirst) {
			var title = null;
			$("#swipebox-caption").empty();
			if (elements[index] !== undefined) {
				title = elements[index].title;
			}
			if (title) {
				$("#swipebox-caption").append(title)
			}
		}, isVideo: function (src) {
			if (src) {
				if (src.match(/youtube\.com\/watch\?v=([a-zA-Z0-9\-_]+)/) || src.match(/vimeo\.com\/([0-9]*)/)) {
					return true
				}
			}
		}, getVideo: function (url) {
			var iframe = "";
			var output = "";
			var youtubeUrl = url.match(/watch\?v=([a-zA-Z0-9\-_]+)/);
			var vimeoUrl = url.match(/vimeo\.com\/([0-9]*)/);
			if (youtubeUrl) {
				iframe = '<iframe width="560" height="315" src="//www.youtube.com/embed/' + youtubeUrl[1] + '" frameborder="0" allowfullscreen></iframe>'
			} else if (vimeoUrl) {
				iframe = '<iframe width="560" height="315"  src="http://player.vimeo.com/video/' + vimeoUrl[1] + "?byline=0&amp;portrait=0&amp;color=" + plugin.settings.vimeoColor + '" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>'
			}
			return'<div class="swipebox-video-container" style="max-width:' + plugin.settings.videomaxWidth + 'px"><div class="swipebox-video">' + iframe + "</div></div>"
		}, loadMedia: function (src, callback) {
			if (!this.isVideo(src)) {
				var img = $("<img>").on("load", function () {
					callback.call(img)
				});
				img.attr("src", src)
			}
		}, getNext: function () {
			var $this = this;
			index = $("#swipebox-slider .slide").index($("#swipebox-slider .slide.current"));
			if (index + 1 < elements.length) {
				index++;
				$this.setSlide(index);
				$this.preloadMedia(index + 1)
			} else {
				$("#swipebox-slider").addClass("rightSpring");
				setTimeout(function () {
					$("#swipebox-slider").removeClass("rightSpring")
				}, 500)
			}
		}, getPrev: function () {
			index = $("#swipebox-slider .slide").index($("#swipebox-slider .slide.current"));
			if (index > 0) {
				index--;
				this.setSlide(index);
				this.preloadMedia(index - 1)
			} else {
				$("#swipebox-slider").addClass("leftSpring");
				setTimeout(function () {
					$("#swipebox-slider").removeClass("leftSpring")
				}, 500)
			}
		}, closeSlide: function () {
			$("html").removeClass("swipebox");
			$(window).trigger("resize");
			this.destroy()
		}, destroy: function () {
			$(window).unbind("keyup");
			$("body").unbind("touchstart");
			$("body").unbind("touchmove");
			$("body").unbind("touchend");
			$("#swipebox-slider").unbind();
			$("#swipebox-overlay").remove();
			if (!$.isArray(elem)) {
				elem.removeData("_swipebox");
			}
			if (this.target) {
				this.target.trigger("swipebox-destroy");
			}
			$.swipebox.isOpen = false;
			if (plugin.settings.afterClose) {
				plugin.settings.afterClose()
			}
		}};
		plugin.init()
	};
	$.fn.swipebox = function (options) {
		if (!$.data(this, "_swipebox")) {
			var swipebox = new $.swipebox(this, options);
			this.data("_swipebox", swipebox)
		}
		return this.data("_swipebox")
	}
}(window, document, jQuery);
/*
 * FancyBox - jQuery Plugin
 * Simple and fancy lightbox alternative
 *
 * Examples and documentation at: http://fancybox.net
 *
 * Copyright (c) 2008 - 2010 Janis Skarnelis
 * That said, it is hardly a one-person project. Many people have submitted bugs, code, and offered their advice freely. Their support is greatly appreciated.
 *
 * Version: 1.3.4 (11/11/2010)
 * Requires: jQuery v1.3+
 *
 * Dual licensed under the MIT and GPL licenses:
 *   http://www.opensource.org/licenses/mit-license.php
 *   http://www.gnu.org/licenses/gpl.html
 */

;(function($) {
	var tmp, loading, overlay, wrap, outer, content, close, title, nav_left, nav_right,

		selectedIndex = 0, selectedOpts = {}, selectedArray = [], currentIndex = 0, currentOpts = {}, currentArray = [],

		ajaxLoader = null, imgPreloader = new Image(), imgRegExp = /\.(jpg|gif|png|bmp|jpeg)(.*)?$/i, swfRegExp = /[^\.]\.(swf)\s*$/i,

		loadingTimer, loadingFrame = 1,

		titleHeight = 0, titleStr = '', start_pos, final_pos, busy = false, fx = $.extend($('<div/>')[0], { prop: 0 }),

		isIE6 = $.browser.msie && $.browser.version < 7 && !window.XMLHttpRequest,

	/*
	 * Private methods
	 */

		_abort = function() {
			loading.hide();

			imgPreloader.onerror = imgPreloader.onload = null;

			if (ajaxLoader) {
				ajaxLoader.abort();
			}

			tmp.empty();
		},

		_error = function() {
			if (false === selectedOpts.onError(selectedArray, selectedIndex, selectedOpts)) {
				loading.hide();
				busy = false;
				return;
			}

			selectedOpts.titleShow = false;

			selectedOpts.width = 'auto';
			selectedOpts.height = 'auto';

			tmp.html( '<p id="fancybox-error">The requested content cannot be loaded.<br />Please try again later.</p>' );

			_process_inline();
		},

		_start = function() {
			var obj = selectedArray[ selectedIndex ],
				href,
				type,
				title,
				str,
				emb,
				ret;

			_abort();

			selectedOpts = $.extend({}, $.fn.fancybox.defaults, (typeof $(obj).data('fancybox') == 'undefined' ? selectedOpts : $(obj).data('fancybox')));

			ret = selectedOpts.onStart(selectedArray, selectedIndex, selectedOpts);

			if (ret === false) {
				busy = false;
				return;
			} else if (typeof ret == 'object') {
				selectedOpts = $.extend(selectedOpts, ret);
			}

			title = selectedOpts.title || (obj.nodeName ? $(obj).attr('title') : obj.title) || '';

			if (obj.nodeName && !selectedOpts.orig) {
				selectedOpts.orig = $(obj).children("img:first").length ? $(obj).children("img:first") : $(obj);
			}

			if (title === '' && selectedOpts.orig && selectedOpts.titleFromAlt) {
				title = selectedOpts.orig.attr('alt');
			}

			href = selectedOpts.href || (obj.nodeName ? $(obj).attr('href') : obj.href) || null;

			if ((/^(?:javascript)/i).test(href) || href == '#') {
				href = null;
			}

			if (selectedOpts.type) {
				type = selectedOpts.type;

				if (!href) {
					href = selectedOpts.content;
				}

			} else if (selectedOpts.content) {
				type = 'html';

			} else if (href) {
				if (href.match(imgRegExp)) {
					type = 'image';

				} else if (href.match(swfRegExp)) {
					type = 'swf';

				} else if ($(obj).hasClass("iframe")) {
					type = 'iframe';

				} else if (href.indexOf("#") === 0) {
					type = 'inline';

				} else {
					type = 'ajax';
				}
			}

			if (!type) {
				_error();
				return;
			}

			if (type == 'inline') {
				obj	= href.substr(href.indexOf("#"));
				type = $(obj).length > 0 ? 'inline' : 'ajax';
			}

			selectedOpts.type = type;
			selectedOpts.href = href;
			selectedOpts.title = title;

			if (selectedOpts.autoDimensions) {
				if (selectedOpts.type == 'html' || selectedOpts.type == 'inline' || selectedOpts.type == 'ajax') {
					selectedOpts.width = 'auto';
					selectedOpts.height = 'auto';
				} else {
					selectedOpts.autoDimensions = false;
				}
			}

			if (selectedOpts.modal) {
				selectedOpts.overlayShow = true;
				selectedOpts.hideOnOverlayClick = false;
				selectedOpts.hideOnContentClick = false;
				selectedOpts.enableEscapeButton = false;
				selectedOpts.showCloseButton = false;
			}

			selectedOpts.padding = parseInt(selectedOpts.padding, 10);
			selectedOpts.margin = parseInt(selectedOpts.margin, 10);

			tmp.css('padding', (selectedOpts.padding + selectedOpts.margin));

			$('.fancybox-inline-tmp').unbind('fancybox-cancel').bind('fancybox-change', function() {
				$(this).replaceWith(content.children());
			});

			switch (type) {
				case 'html' :
					tmp.html( selectedOpts.content );
					_process_inline();
					break;

				case 'inline' :
					if ( $(obj).parent().is('#fancybox-content') === true) {
						busy = false;
						return;
					}

					$('<div class="fancybox-inline-tmp" />')
						.hide()
						.insertBefore( $(obj) )
						.bind('fancybox-cleanup', function() {
							$(this).replaceWith(content.children());
						}).bind('fancybox-cancel', function() {
							$(this).replaceWith(tmp.children());
						});

					$(obj).appendTo(tmp);

					_process_inline();
					break;

				case 'image':
					busy = false;

					$.fancybox.showActivity();

					imgPreloader = new Image();

					imgPreloader.onerror = function() {
						_error();
					};

					imgPreloader.onload = function() {
						busy = true;

						imgPreloader.onerror = imgPreloader.onload = null;

						_process_image();
					};

					imgPreloader.src = href;
					break;

				case 'swf':
					selectedOpts.scrolling = 'no';

					str = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="' + selectedOpts.width + '" height="' + selectedOpts.height + '"><param name="movie" value="' + href + '"></param>';
					emb = '';

					$.each(selectedOpts.swf, function(name, val) {
						str += '<param name="' + name + '" value="' + val + '"></param>';
						emb += ' ' + name + '="' + val + '"';
					});

					str += '<embed src="' + href + '" type="application/x-shockwave-flash" width="' + selectedOpts.width + '" height="' + selectedOpts.height + '"' + emb + '></embed></object>';

					tmp.html(str);

					_process_inline();
					break;

				case 'ajax':
					busy = false;

					$.fancybox.showActivity();

					selectedOpts.ajax.win = selectedOpts.ajax.success;

					ajaxLoader = $.ajax($.extend({}, selectedOpts.ajax, {
						url	: href,
						data : selectedOpts.ajax.data || {},
						error : function(XMLHttpRequest, textStatus, errorThrown) {
							if ( XMLHttpRequest.status > 0 ) {
								_error();
							}
						},
						success : function(data, textStatus, XMLHttpRequest) {
							var o = typeof XMLHttpRequest == 'object' ? XMLHttpRequest : ajaxLoader;
							if (o.status == 200) {
								if ( typeof selectedOpts.ajax.win == 'function' ) {
									ret = selectedOpts.ajax.win(href, data, textStatus, XMLHttpRequest);

									if (ret === false) {
										loading.hide();
										return;
									} else if (typeof ret == 'string' || typeof ret == 'object') {
										data = ret;
									}
								}

								tmp.html( data );
								_process_inline();
							}
						}
					}));

					break;

				case 'iframe':
					_show();
					break;
			}
		},

		_process_inline = function() {
			var
				w = selectedOpts.width,
				h = selectedOpts.height;

			if (w.toString().indexOf('%') > -1) {
				w = parseInt( ($(window).width() - (selectedOpts.margin * 2)) * parseFloat(w) / 100, 10) + 'px';

			} else {
				w = w == 'auto' ? 'auto' : w + 'px';
			}

			if (h.toString().indexOf('%') > -1) {
				h = parseInt( ($(window).height() - (selectedOpts.margin * 2)) * parseFloat(h) / 100, 10) + 'px';

			} else {
				h = h == 'auto' ? 'auto' : h + 'px';
			}

			tmp.wrapInner('<div style="width:' + w + ';height:' + h + ';overflow: ' + (selectedOpts.scrolling == 'auto' ? 'auto' : (selectedOpts.scrolling == 'yes' ? 'scroll' : 'hidden')) + ';position:relative;"></div>');

			selectedOpts.width = tmp.width();
			selectedOpts.height = tmp.height();

			_show();
		},

		_process_image = function() {
			selectedOpts.width = imgPreloader.width;
			selectedOpts.height = imgPreloader.height;

			$("<img />").attr({
				'id' : 'fancybox-img',
				'src' : imgPreloader.src,
				'alt' : selectedOpts.title
			}).appendTo( tmp );

			_show();
		},

		_show = function() {
			var pos, equal;

			loading.hide();

			if (wrap.is(":visible")) {
				$.event.trigger('fancybox-cancel');

				busy = false;
				return;
			}

			busy = true;

			$(content.add( overlay )).unbind();

			$(window).unbind("resize.fb scroll.fb");
			$(document).unbind('keydown.fb');

			if (wrap.is(":visible") && currentOpts.titlePosition !== 'outside') {
				wrap.css('height', wrap.height());
			}

			currentArray = selectedArray;
			currentIndex = selectedIndex;
			currentOpts = selectedOpts;

			if (currentOpts.overlayShow) {
				overlay.css({
					'background-color' : currentOpts.overlayColor,
					'opacity' : currentOpts.overlayOpacity,
					'cursor' : currentOpts.hideOnOverlayClick ? 'pointer' : 'auto',
					'height' : $(document).height()
				});

				if (!overlay.is(':visible')) {
					if (isIE6) {
						$('select:not(#fancybox-tmp select)').filter(function() {
							return this.style.visibility !== 'hidden';
						}).css({'visibility' : 'hidden'}).one('fancybox-cleanup', function() {
								this.style.visibility = 'inherit';
							});
					}

					overlay.show();
				}
			} else {
				overlay.hide();
			}

			final_pos = _get_zoom_to();

			_process_title();

			if (wrap.is(":visible")) {
				$( close.add( nav_left ).add( nav_right ) ).hide();

				pos = wrap.position(),

					start_pos = {
						top	 : pos.top,
						left : pos.left,
						width : wrap.width(),
						height : wrap.height()
					};

				equal = (start_pos.width == final_pos.width && start_pos.height == final_pos.height);

				content.fadeTo(currentOpts.changeFade, 0.3, function() {
					var finish_resizing = function() {
						content.html( tmp.contents() ).fadeTo(currentOpts.changeFade, 1, _finish);
					};

					$.event.trigger('fancybox-change');

					content
						.empty()
						.removeAttr('filter')
						.css({
							'border-width' : currentOpts.padding,
							'width'	: final_pos.width - currentOpts.padding * 2,
							'height' : selectedOpts.autoDimensions ? 'auto' : final_pos.height - titleHeight - currentOpts.padding * 2
						});

					if (equal) {
						finish_resizing();

					} else {
						fx.prop = 0;

						$(fx).animate({prop: 1}, {
							duration : currentOpts.changeSpeed,
							easing : currentOpts.easingChange,
							step : _draw,
							complete : finish_resizing
						});
					}
				});

				return;
			}

			wrap.removeAttr("style");

			content.css('border-width', currentOpts.padding);

			if (currentOpts.transitionIn == 'elastic') {
				start_pos = _get_zoom_from();

				content.html( tmp.contents() );

				wrap.show();

				if (currentOpts.opacity) {
					final_pos.opacity = 0;
				}

				fx.prop = 0;

				$(fx).animate({prop: 1}, {
					duration : currentOpts.speedIn,
					easing : currentOpts.easingIn,
					step : _draw,
					complete : _finish
				});

				return;
			}

			if (currentOpts.titlePosition == 'inside' && titleHeight > 0) {
				title.show();
			}

			content
				.css({
					'width' : final_pos.width - currentOpts.padding * 2,
					'height' : selectedOpts.autoDimensions ? 'auto' : final_pos.height - titleHeight - currentOpts.padding * 2
				})
				.html( tmp.contents() );

			wrap
				.css(final_pos)
				.fadeIn( currentOpts.transitionIn == 'none' ? 0 : currentOpts.speedIn, _finish );
		},

		_format_title = function(title) {
			if (title && title.length) {
				if (currentOpts.titlePosition == 'float') {
					return '<table id="fancybox-title-float-wrap" cellpadding="0" cellspacing="0"><tr><td id="fancybox-title-float-left"></td><td id="fancybox-title-float-main">' + title + '</td><td id="fancybox-title-float-right"></td></tr></table>';
				}

				return '<div id="fancybox-title-' + currentOpts.titlePosition + '">' + title + '</div>';
			}

			return false;
		},

		_process_title = function() {
			titleStr = currentOpts.title || '';
			titleHeight = 0;

			title
				.empty()
				.removeAttr('style')
				.removeClass();

			if (currentOpts.titleShow === false) {
				title.hide();
				return;
			}

			titleStr = $.isFunction(currentOpts.titleFormat) ? currentOpts.titleFormat(titleStr, currentArray, currentIndex, currentOpts) : _format_title(titleStr);

			if (!titleStr || titleStr === '') {
				title.hide();
				return;
			}

			title
				.addClass('fancybox-title-' + currentOpts.titlePosition)
				.html( titleStr )
				.appendTo( 'body' )
				.show();

			switch (currentOpts.titlePosition) {
				case 'inside':
					title
						.css({
							'width' : final_pos.width - (currentOpts.padding * 2),
							'marginLeft' : currentOpts.padding,
							'marginRight' : currentOpts.padding
						});

					titleHeight = title.outerHeight(true);

					title.appendTo( outer );

					final_pos.height += titleHeight;
					break;

				case 'over':
					title
						.css({
							'marginLeft' : currentOpts.padding,
							'width'	: final_pos.width - (currentOpts.padding * 2),
							'bottom' : currentOpts.padding
						})
						.appendTo( outer );
					break;

				case 'float':
					title
						.css('left', parseInt((title.width() - final_pos.width - 40)/ 2, 10) * -1)
						.appendTo( wrap );
					break;

				default:
					title
						.css({
							'width' : final_pos.width - (currentOpts.padding * 2),
							'paddingLeft' : currentOpts.padding,
							'paddingRight' : currentOpts.padding
						})
						.appendTo( wrap );
					break;
			}

			title.hide();
		},

		_set_navigation = function() {
			if (currentOpts.enableEscapeButton || currentOpts.enableKeyboardNav) {
				$(document).bind('keydown.fb', function(e) {
					if (e.keyCode == 27 && currentOpts.enableEscapeButton) {
						e.preventDefault();
						$.fancybox.close();

					} else if ((e.keyCode == 37 || e.keyCode == 39) && currentOpts.enableKeyboardNav && e.target.tagName !== 'INPUT' && e.target.tagName !== 'TEXTAREA' && e.target.tagName !== 'SELECT') {
						e.preventDefault();
						$.fancybox[ e.keyCode == 37 ? 'prev' : 'next']();
					}
				});
			}

			if (!currentOpts.showNavArrows) {
				nav_left.hide();
				nav_right.hide();
				return;
			}

			if ((currentOpts.cyclic && currentArray.length > 1) || currentIndex !== 0) {
				nav_left.show();
			}

			if ((currentOpts.cyclic && currentArray.length > 1) || currentIndex != (currentArray.length -1)) {
				nav_right.show();
			}
		},

		_finish = function () {
			if (!$.support.opacity) {
				content.get(0).style.removeAttribute('filter');
				wrap.get(0).style.removeAttribute('filter');
			}

			if (selectedOpts.autoDimensions) {
				content.css('height', 'auto');
			}

			wrap.css('height', 'auto');

			if (titleStr && titleStr.length) {
				title.show();
			}

			if (currentOpts.showCloseButton) {
				close.show();
			}

			_set_navigation();

			if (currentOpts.hideOnContentClick)	{
				content.bind('click', $.fancybox.close);
			}

			if (currentOpts.hideOnOverlayClick)	{
				overlay.bind('click', $.fancybox.close);
			}

			$(window).bind("resize.fb", $.fancybox.resize);

			if (currentOpts.centerOnScroll) {
				$(window).bind("scroll.fb", $.fancybox.center);
			}

			if (currentOpts.type == 'iframe') {
				$('<iframe id="fancybox-frame" name="fancybox-frame' + new Date().getTime() + '" frameborder="0" hspace="0" ' + ($.browser.msie ? 'allowtransparency="true""' : '') + ' scrolling="' + selectedOpts.scrolling + '" src="' + currentOpts.href + '"></iframe>').appendTo(content);
			}

			wrap.show();

			busy = false;

			$.fancybox.center();

			currentOpts.onComplete(currentArray, currentIndex, currentOpts);

			_preload_images();
		},

		_preload_images = function() {
			var href,
				objNext;

			if ((currentArray.length -1) > currentIndex) {
				href = currentArray[ currentIndex + 1 ].href;

				if (typeof href !== 'undefined' && href.match(imgRegExp)) {
					objNext = new Image();
					objNext.src = href;
				}
			}

			if (currentIndex > 0) {
				href = currentArray[ currentIndex - 1 ].href;

				if (typeof href !== 'undefined' && href.match(imgRegExp)) {
					objNext = new Image();
					objNext.src = href;
				}
			}
		},

		_draw = function(pos) {
			var dim = {
				width : parseInt(start_pos.width + (final_pos.width - start_pos.width) * pos, 10),
				height : parseInt(start_pos.height + (final_pos.height - start_pos.height) * pos, 10),

				top : parseInt(start_pos.top + (final_pos.top - start_pos.top) * pos, 10),
				left : parseInt(start_pos.left + (final_pos.left - start_pos.left) * pos, 10)
			};

			if (typeof final_pos.opacity !== 'undefined') {
				dim.opacity = pos < 0.5 ? 0.5 : pos;
			}

			wrap.css(dim);

			content.css({
				'width' : dim.width - currentOpts.padding * 2,
				'height' : dim.height - (titleHeight * pos) - currentOpts.padding * 2
			});
		},

		_get_viewport = function() {
			return [
				$(window).width() - (currentOpts.margin * 2),
				$(window).height() - (currentOpts.margin * 2),
				$(document).scrollLeft() + currentOpts.margin,
				$(document).scrollTop() + currentOpts.margin
			];
		},

		_get_zoom_to = function () {
			var view = _get_viewport(),
				to = {},
				resize = currentOpts.autoScale,
				double_padding = currentOpts.padding * 2,
				ratio;

			if (currentOpts.width.toString().indexOf('%') > -1) {
				to.width = parseInt((view[0] * parseFloat(currentOpts.width)) / 100, 10);
			} else {
				to.width = currentOpts.width + double_padding;
			}

			if (currentOpts.height.toString().indexOf('%') > -1) {
				to.height = parseInt((view[1] * parseFloat(currentOpts.height)) / 100, 10);
			} else {
				to.height = currentOpts.height + double_padding;
			}

			if (resize && (to.width > view[0] || to.height > view[1])) {
				if (selectedOpts.type == 'image' || selectedOpts.type == 'swf') {
					ratio = (currentOpts.width ) / (currentOpts.height );

					if ((to.width ) > view[0]) {
						to.width = view[0];
						to.height = parseInt(((to.width - double_padding) / ratio) + double_padding, 10);
					}

					if ((to.height) > view[1]) {
						to.height = view[1];
						to.width = parseInt(((to.height - double_padding) * ratio) + double_padding, 10);
					}

				} else {
					to.width = Math.min(to.width, view[0]);
					to.height = Math.min(to.height, view[1]);
				}
			}

			to.top = parseInt(Math.max(view[3] - 20, view[3] + ((view[1] - to.height - 40) * 0.5)), 10);
			to.left = parseInt(Math.max(view[2] - 20, view[2] + ((view[0] - to.width - 40) * 0.5)), 10);

			return to;
		},

		_get_obj_pos = function(obj) {
			var pos = obj.offset();

			pos.top += parseInt( obj.css('paddingTop'), 10 ) || 0;
			pos.left += parseInt( obj.css('paddingLeft'), 10 ) || 0;

			pos.top += parseInt( obj.css('border-top-width'), 10 ) || 0;
			pos.left += parseInt( obj.css('border-left-width'), 10 ) || 0;

			pos.width = obj.width();
			pos.height = obj.height();

			return pos;
		},

		_get_zoom_from = function() {
			var orig = selectedOpts.orig ? $(selectedOpts.orig) : false,
				from = {},
				pos,
				view;

			if (orig && orig.length) {
				pos = _get_obj_pos(orig);

				from = {
					width : pos.width + (currentOpts.padding * 2),
					height : pos.height + (currentOpts.padding * 2),
					top	: pos.top - currentOpts.padding - 20,
					left : pos.left - currentOpts.padding - 20
				};

			} else {
				view = _get_viewport();

				from = {
					width : currentOpts.padding * 2,
					height : currentOpts.padding * 2,
					top	: parseInt(view[3] + view[1] * 0.5, 10),
					left : parseInt(view[2] + view[0] * 0.5, 10)
				};
			}

			return from;
		},

		_animate_loading = function() {
			if (!loading.is(':visible')){
				clearInterval(loadingTimer);
				return;
			}

			$('div', loading).css('top', (loadingFrame * -40) + 'px');

			loadingFrame = (loadingFrame + 1) % 12;
		};

	/*
	 * Public methods
	 */

	$.fn.fancybox = function(options) {
		if (!$(this).length) {
			return this;
		}

		$(this)
			.data('fancybox', $.extend({}, options, ($.metadata ? $(this).metadata() : {})))
			.unbind('click.fb')
			.bind('click.fb', function(e) {
				e.preventDefault();

				if (busy) {
					return;
				}

				busy = true;

				$(this).blur();

				selectedArray = [];
				selectedIndex = 0;

				var rel = $(this).attr('rel') || '';

				if (!rel || rel == '' || rel === 'nofollow') {
					selectedArray.push(this);

				} else {
					selectedArray = $("a[rel=" + rel + "], area[rel=" + rel + "]");
					selectedIndex = selectedArray.index( this );
				}

				_start();

				return;
			});

		return this;
	};

	$.fancybox = function(obj) {
		var opts;

		if (busy) {
			return;
		}

		busy = true;
		opts = typeof arguments[1] !== 'undefined' ? arguments[1] : {};

		selectedArray = [];
		selectedIndex = parseInt(opts.index, 10) || 0;

		if ($.isArray(obj)) {
			for (var i = 0, j = obj.length; i < j; i++) {
				if (typeof obj[i] == 'object') {
					$(obj[i]).data('fancybox', $.extend({}, opts, obj[i]));
				} else {
					obj[i] = $({}).data('fancybox', $.extend({content : obj[i]}, opts));
				}
			}

			selectedArray = jQuery.merge(selectedArray, obj);

		} else {
			if (typeof obj == 'object') {
				$(obj).data('fancybox', $.extend({}, opts, obj));
			} else {
				obj = $({}).data('fancybox', $.extend({content : obj}, opts));
			}

			selectedArray.push(obj);
		}

		if (selectedIndex > selectedArray.length || selectedIndex < 0) {
			selectedIndex = 0;
		}

		_start();
	};

	$.fancybox.showActivity = function() {
		clearInterval(loadingTimer);

		loading.show();
		loadingTimer = setInterval(_animate_loading, 66);
	};

	$.fancybox.hideActivity = function() {
		loading.hide();
	};

	$.fancybox.next = function() {
		return $.fancybox.pos( currentIndex + 1);
	};

	$.fancybox.prev = function() {
		return $.fancybox.pos( currentIndex - 1);
	};

	$.fancybox.pos = function(pos) {
		if (busy) {
			return;
		}

		pos = parseInt(pos);

		selectedArray = currentArray;

		if (pos > -1 && pos < currentArray.length) {
			selectedIndex = pos;
			_start();

		} else if (currentOpts.cyclic && currentArray.length > 1) {
			selectedIndex = pos >= currentArray.length ? 0 : currentArray.length - 1;
			_start();
		}

		return;
	};

	$.fancybox.cancel = function() {
		if (busy) {
			return;
		}

		busy = true;

		$.event.trigger('fancybox-cancel');

		_abort();

		selectedOpts.onCancel(selectedArray, selectedIndex, selectedOpts);

		busy = false;
	};

	// Note: within an iframe use - parent.$.fancybox.close();
	$.fancybox.close = function() {
		if (busy || wrap.is(':hidden')) {
			return;
		}

		busy = true;

		if (currentOpts && false === currentOpts.onCleanup(currentArray, currentIndex, currentOpts)) {
			busy = false;
			return;
		}

		_abort();

		$(close.add( nav_left ).add( nav_right )).hide();

		$(content.add( overlay )).unbind();

		$(window).unbind("resize.fb scroll.fb");
		$(document).unbind('keydown.fb');

		content.find('iframe').attr('src', isIE6 && /^https/i.test(window.location.href || '') ? 'javascript:void(false)' : 'about:blank');

		if (currentOpts.titlePosition !== 'inside') {
			title.empty();
		}

		wrap.stop();

		function _cleanup() {
			overlay.fadeOut('fast');

			title.empty().hide();
			wrap.hide();

			$.event.trigger('fancybox-cleanup');

			content.empty();

			currentOpts.onClosed(currentArray, currentIndex, currentOpts);

			currentArray = selectedOpts	= [];
			currentIndex = selectedIndex = 0;
			currentOpts = selectedOpts	= {};

			busy = false;
		}

		if (currentOpts.transitionOut == 'elastic') {
			start_pos = _get_zoom_from();

			var pos = wrap.position();

			final_pos = {
				top	 : pos.top ,
				left : pos.left,
				width :	wrap.width(),
				height : wrap.height()
			};

			if (currentOpts.opacity) {
				final_pos.opacity = 1;
			}

			title.empty().hide();

			fx.prop = 1;

			$(fx).animate({ prop: 0 }, {
				duration : currentOpts.speedOut,
				easing : currentOpts.easingOut,
				step : _draw,
				complete : _cleanup
			});

		} else {
			wrap.fadeOut( currentOpts.transitionOut == 'none' ? 0 : currentOpts.speedOut, _cleanup);
		}
	};

	$.fancybox.resize = function() {
		if (overlay.is(':visible')) {
			overlay.css('height', $(document).height());
		}

		$.fancybox.center(true);
	};

	$.fancybox.center = function() {
		var view, align;

		if (busy) {
			return;
		}

		align = arguments[0] === true ? 1 : 0;
		view = _get_viewport();

		if (!align && (wrap.width() > view[0] || wrap.height() > view[1])) {
			return;
		}

		wrap
			.stop()
			.animate({
				'top' : parseInt(Math.max(view[3] - 20, view[3] + ((view[1] - content.height() - 40) * 0.5) - currentOpts.padding)),
				'left' : parseInt(Math.max(view[2] - 20, view[2] + ((view[0] - content.width() - 40) * 0.5) - currentOpts.padding))
			}, typeof arguments[0] == 'number' ? arguments[0] : 200);
	};

	$.fancybox.init = function() {
		if ($("#fancybox-wrap").length) {
			return;
		}

		$('body').append(
			tmp	= $('<div id="fancybox-tmp"></div>'),
			loading	= $('<div id="fancybox-loading"><div></div></div>'),
			overlay	= $('<div id="fancybox-overlay"></div>'),
			wrap = $('<div id="fancybox-wrap"></div>')
		);

		outer = $('<div id="fancybox-outer"></div>')
			.append('<div class="fancybox-bg" id="fancybox-bg-n"></div><div class="fancybox-bg" id="fancybox-bg-ne"></div><div class="fancybox-bg" id="fancybox-bg-e"></div><div class="fancybox-bg" id="fancybox-bg-se"></div><div class="fancybox-bg" id="fancybox-bg-s"></div><div class="fancybox-bg" id="fancybox-bg-sw"></div><div class="fancybox-bg" id="fancybox-bg-w"></div><div class="fancybox-bg" id="fancybox-bg-nw"></div>')
			.appendTo( wrap );

		outer.append(
			content = $('<div id="fancybox-content"></div>'),
			close = $('<a id="fancybox-close"></a>'),
			title = $('<div id="fancybox-title"></div>'),

			nav_left = $('<a href="javascript:;" id="fancybox-left"><span class="fancy-ico" id="fancybox-left-ico"></span></a>'),
			nav_right = $('<a href="javascript:;" id="fancybox-right"><span class="fancy-ico" id="fancybox-right-ico"></span></a>')
		);

		close.click($.fancybox.close);
		loading.click($.fancybox.cancel);

		nav_left.click(function(e) {
			e.preventDefault();
			$.fancybox.prev();
		});

		nav_right.click(function(e) {
			e.preventDefault();
			$.fancybox.next();
		});

		if ($.fn.mousewheel) {
			wrap.bind('mousewheel.fb', function(e, delta) {
				if (busy) {
					e.preventDefault();

				} else if ($(e.target).get(0).clientHeight == 0 || $(e.target).get(0).scrollHeight === $(e.target).get(0).clientHeight) {
					e.preventDefault();
					$.fancybox[ delta > 0 ? 'prev' : 'next']();
				}
			});
		}

		if (!$.support.opacity) {
			wrap.addClass('fancybox-ie');
		}

		if (isIE6) {
			loading.addClass('fancybox-ie6');
			wrap.addClass('fancybox-ie6');

			$('<iframe id="fancybox-hide-sel-frame" src="' + (/^https/i.test(window.location.href || '') ? 'javascript:void(false)' : 'about:blank' ) + '" scrolling="no" border="0" frameborder="0" tabindex="-1"></iframe>').prependTo(outer);
		}
	};

	$.fn.fancybox.defaults = {
		padding : 10,
		margin : 40,
		opacity : false,
		modal : false,
		cyclic : false,
		scrolling : 'auto',	// 'auto', 'yes' or 'no'

		width : 560,
		height : 340,

		autoScale : true,
		autoDimensions : true,
		centerOnScroll : false,

		ajax : {},
		swf : { wmode: 'transparent' },

		hideOnOverlayClick : true,
		hideOnContentClick : false,

		overlayShow : true,
		overlayOpacity : 0.7,
		overlayColor : '#777',

		titleShow : true,
		titlePosition : 'float', // 'float', 'outside', 'inside' or 'over'
		titleFormat : null,
		titleFromAlt : false,

		transitionIn : 'fade', // 'elastic', 'fade' or 'none'
		transitionOut : 'fade', // 'elastic', 'fade' or 'none'

		speedIn : 300,
		speedOut : 300,

		changeSpeed : 300,
		changeFade : 'fast',

		easingIn : 'swing',
		easingOut : 'swing',

		showCloseButton	 : true,
		showNavArrows : true,
		enableEscapeButton : true,
		enableKeyboardNav : true,

		onStart : function(){},
		onCancel : function(){},
		onComplete : function(){},
		onCleanup : function(){},
		onClosed : function(){},
		onError : function(){}
	};

	$(document).ready(function() {
		$.fancybox.init();
	});

})(jQuery);
/*!
 * typeahead.js 0.9.3
 * https://github.com/twitter/typeahead
 * Copyright 2013 Twitter, Inc. and other contributors; Licensed MIT
 */

!function(a){var b="0.9.3",c={isMsie:function(){var a=/(msie) ([\w.]+)/i.exec(navigator.userAgent);return a?parseInt(a[2],10):!1},isBlankString:function(a){return!a||/^\s*$/.test(a)},escapeRegExChars:function(a){return a.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")},isString:function(a){return"string"==typeof a},isNumber:function(a){return"number"==typeof a},isArray:a.isArray,isFunction:a.isFunction,isObject:a.isPlainObject,isUndefined:function(a){return"undefined"==typeof a},bind:a.proxy,bindAll:function(b){var c;for(var d in b)a.isFunction(c=b[d])&&(b[d]=a.proxy(c,b))},indexOf:function(a,b){for(var c=0;c<a.length;c++)if(a[c]===b)return c;return-1},each:a.each,map:a.map,filter:a.grep,every:function(b,c){var d=!0;return b?(a.each(b,function(a,e){return(d=c.call(null,e,a,b))?void 0:!1}),!!d):d},some:function(b,c){var d=!1;return b?(a.each(b,function(a,e){return(d=c.call(null,e,a,b))?!1:void 0}),!!d):d},mixin:a.extend,getUniqueId:function(){var a=0;return function(){return a++}}(),defer:function(a){setTimeout(a,0)},debounce:function(a,b,c){var d,e;return function(){var f,g,h=this,i=arguments;return f=function(){d=null,c||(e=a.apply(h,i))},g=c&&!d,clearTimeout(d),d=setTimeout(f,b),g&&(e=a.apply(h,i)),e}},throttle:function(a,b){var c,d,e,f,g,h;return g=0,h=function(){g=new Date,e=null,f=a.apply(c,d)},function(){var i=new Date,j=b-(i-g);return c=this,d=arguments,0>=j?(clearTimeout(e),e=null,g=i,f=a.apply(c,d)):e||(e=setTimeout(h,j)),f}},tokenizeQuery:function(b){return a.trim(b).toLowerCase().split(/[\s]+/)},tokenizeText:function(b){return a.trim(b).toLowerCase().split(/[\s\-_]+/)},getProtocol:function(){return location.protocol},noop:function(){}},d=function(){var a=/\s+/;return{on:function(b,c){var d;if(!c)return this;for(this._callbacks=this._callbacks||{},b=b.split(a);d=b.shift();)this._callbacks[d]=this._callbacks[d]||[],this._callbacks[d].push(c);return this},trigger:function(b,c){var d,e;if(!this._callbacks)return this;for(b=b.split(a);d=b.shift();)if(e=this._callbacks[d])for(var f=0;f<e.length;f+=1)e[f].call(this,{type:d,data:c});return this}}}(),e=function(){function b(b){b&&b.el||a.error("EventBus initialized without el"),this.$el=a(b.el)}var d="typeahead:";return c.mixin(b.prototype,{trigger:function(a){var b=[].slice.call(arguments,1);this.$el.trigger(d+a,b)}}),b}(),f=function(){function a(a){this.prefix=["__",a,"__"].join(""),this.ttlKey="__ttl__",this.keyMatcher=new RegExp("^"+this.prefix)}function b(){return(new Date).getTime()}function d(a){return JSON.stringify(c.isUndefined(a)?null:a)}function e(a){return JSON.parse(a)}var f,g;try{f=window.localStorage,f.setItem("~~~","!"),f.removeItem("~~~")}catch(h){f=null}return g=f&&window.JSON?{_prefix:function(a){return this.prefix+a},_ttlKey:function(a){return this._prefix(a)+this.ttlKey},get:function(a){return this.isExpired(a)&&this.remove(a),e(f.getItem(this._prefix(a)))},set:function(a,e,g){return c.isNumber(g)?f.setItem(this._ttlKey(a),d(b()+g)):f.removeItem(this._ttlKey(a)),f.setItem(this._prefix(a),d(e))},remove:function(a){return f.removeItem(this._ttlKey(a)),f.removeItem(this._prefix(a)),this},clear:function(){var a,b,c=[],d=f.length;for(a=0;d>a;a++)(b=f.key(a)).match(this.keyMatcher)&&c.push(b.replace(this.keyMatcher,""));for(a=c.length;a--;)this.remove(c[a]);return this},isExpired:function(a){var d=e(f.getItem(this._ttlKey(a)));return c.isNumber(d)&&b()>d?!0:!1}}:{get:c.noop,set:c.noop,remove:c.noop,clear:c.noop,isExpired:c.noop},c.mixin(a.prototype,g),a}(),g=function(){function a(a){c.bindAll(this),a=a||{},this.sizeLimit=a.sizeLimit||10,this.cache={},this.cachedKeysByAge=[]}return c.mixin(a.prototype,{get:function(a){return this.cache[a]},set:function(a,b){var c;this.cachedKeysByAge.length===this.sizeLimit&&(c=this.cachedKeysByAge.shift(),delete this.cache[c]),this.cache[a]=b,this.cachedKeysByAge.push(a)}}),a}(),h=function(){function b(a){c.bindAll(this),a=c.isString(a)?{url:a}:a,i=i||new g,h=c.isNumber(a.maxParallelRequests)?a.maxParallelRequests:h||6,this.url=a.url,this.wildcard=a.wildcard||"%QUERY",this.filter=a.filter,this.replace=a.replace,this.ajaxSettings={type:"get",cache:a.cache,timeout:a.timeout,dataType:a.dataType||"json",beforeSend:a.beforeSend},this._get=(/^throttle$/i.test(a.rateLimitFn)?c.throttle:c.debounce)(this._get,a.rateLimitWait||300)}function d(){j++}function e(){j--}function f(){return h>j}var h,i,j=0,k={};return c.mixin(b.prototype,{_get:function(a,b){function c(c){var e=d.filter?d.filter(c):c;b&&b(e),i.set(a,c)}var d=this;f()?this._sendRequest(a).done(c):this.onDeckRequestArgs=[].slice.call(arguments,0)},_sendRequest:function(b){function c(){e(),k[b]=null,f.onDeckRequestArgs&&(f._get.apply(f,f.onDeckRequestArgs),f.onDeckRequestArgs=null)}var f=this,g=k[b];return g||(d(),g=k[b]=a.ajax(b,this.ajaxSettings).always(c)),g},get:function(a,b){var d,e,f=this,g=encodeURIComponent(a||"");return b=b||c.noop,d=this.replace?this.replace(this.url,g):this.url.replace(this.wildcard,g),(e=i.get(d))?c.defer(function(){b(f.filter?f.filter(e):e)}):this._get(d,b),!!e}}),b}(),i=function(){function d(b){c.bindAll(this),c.isString(b.template)&&!b.engine&&a.error("no template engine specified"),b.local||b.prefetch||b.remote||a.error("one of local, prefetch, or remote is required"),this.name=b.name||c.getUniqueId(),this.limit=b.limit||5,this.minLength=b.minLength||1,this.header=b.header,this.footer=b.footer,this.valueKey=b.valueKey||"value",this.template=e(b.template,b.engine,this.valueKey),this.local=b.local,this.prefetch=b.prefetch,this.remote=b.remote,this.itemHash={},this.adjacencyList={},this.storage=b.name?new f(b.name):null}function e(a,b,d){var e,f;return c.isFunction(a)?e=a:c.isString(a)?(f=b.compile(a),e=c.bind(f.render,f)):e=function(a){return"<p>"+a[d]+"</p>"},e}var g={thumbprint:"thumbprint",protocol:"protocol",itemHash:"itemHash",adjacencyList:"adjacencyList"};return c.mixin(d.prototype,{_processLocalData:function(a){this._mergeProcessedData(this._processData(a))},_loadPrefetchData:function(d){function e(a){var b=d.filter?d.filter(a):a,e=m._processData(b),f=e.itemHash,h=e.adjacencyList;m.storage&&(m.storage.set(g.itemHash,f,d.ttl),m.storage.set(g.adjacencyList,h,d.ttl),m.storage.set(g.thumbprint,n,d.ttl),m.storage.set(g.protocol,c.getProtocol(),d.ttl)),m._mergeProcessedData(e)}var f,h,i,j,k,l,m=this,n=b+(d.thumbprint||"");return this.storage&&(f=this.storage.get(g.thumbprint),h=this.storage.get(g.protocol),i=this.storage.get(g.itemHash),j=this.storage.get(g.adjacencyList)),k=f!==n||h!==c.getProtocol(),d=c.isString(d)?{url:d}:d,d.ttl=c.isNumber(d.ttl)?d.ttl:864e5,i&&j&&!k?(this._mergeProcessedData({itemHash:i,adjacencyList:j}),l=a.Deferred().resolve()):l=a.getJSON(d.url).done(e),l},_transformDatum:function(a){var b=c.isString(a)?a:a[this.valueKey],d=a.tokens||c.tokenizeText(b),e={value:b,tokens:d};return c.isString(a)?(e.datum={},e.datum[this.valueKey]=a):e.datum=a,e.tokens=c.filter(e.tokens,function(a){return!c.isBlankString(a)}),e.tokens=c.map(e.tokens,function(a){return a.toLowerCase()}),e},_processData:function(a){var b=this,d={},e={};return c.each(a,function(a,f){var g=b._transformDatum(f),h=c.getUniqueId(g.value);d[h]=g,c.each(g.tokens,function(a,b){var d=b.charAt(0),f=e[d]||(e[d]=[h]);!~c.indexOf(f,h)&&f.push(h)})}),{itemHash:d,adjacencyList:e}},_mergeProcessedData:function(a){var b=this;c.mixin(this.itemHash,a.itemHash),c.each(a.adjacencyList,function(a,c){var d=b.adjacencyList[a];b.adjacencyList[a]=d?d.concat(c):c})},_getLocalSuggestions:function(a){var b,d=this,e=[],f=[],g=[];return c.each(a,function(a,b){var d=b.charAt(0);!~c.indexOf(e,d)&&e.push(d)}),c.each(e,function(a,c){var e=d.adjacencyList[c];return e?(f.push(e),(!b||e.length<b.length)&&(b=e),void 0):!1}),f.length<e.length?[]:(c.each(b,function(b,e){var h,i,j=d.itemHash[e];h=c.every(f,function(a){return~c.indexOf(a,e)}),i=h&&c.every(a,function(a){return c.some(j.tokens,function(b){return 0===b.indexOf(a)})}),i&&g.push(j)}),g)},initialize:function(){var b;return this.local&&this._processLocalData(this.local),this.transport=this.remote?new h(this.remote):null,b=this.prefetch?this._loadPrefetchData(this.prefetch):a.Deferred().resolve(),this.local=this.prefetch=this.remote=null,this.initialize=function(){return b},b},getSuggestions:function(a,b){function d(a){f=f.slice(0),c.each(a,function(a,b){var d,e=g._transformDatum(b);return d=c.some(f,function(a){return e.value===a.value}),!d&&f.push(e),f.length<g.limit}),b&&b(f)}var e,f,g=this,h=!1;a.length<this.minLength||(e=c.tokenizeQuery(a),f=this._getLocalSuggestions(e).slice(0,this.limit),f.length<this.limit&&this.transport&&(h=this.transport.get(a,d)),!h&&b&&b(f))}}),d}(),j=function(){function b(b){var d=this;c.bindAll(this),this.specialKeyCodeMap={9:"tab",27:"esc",37:"left",39:"right",13:"enter",38:"up",40:"down"},this.$hint=a(b.hint),this.$input=a(b.input).on("blur.tt",this._handleBlur).on("focus.tt",this._handleFocus).on("keydown.tt",this._handleSpecialKeyEvent),c.isMsie()?this.$input.on("keydown.tt keypress.tt cut.tt paste.tt",function(a){d.specialKeyCodeMap[a.which||a.keyCode]||c.defer(d._compareQueryToInputValue)}):this.$input.on("input.tt",this._compareQueryToInputValue),this.query=this.$input.val(),this.$overflowHelper=e(this.$input)}function e(b){return a("<span></span>").css({position:"absolute",left:"-9999px",visibility:"hidden",whiteSpace:"nowrap",fontFamily:b.css("font-family"),fontSize:b.css("font-size"),fontStyle:b.css("font-style"),fontVariant:b.css("font-variant"),fontWeight:b.css("font-weight"),wordSpacing:b.css("word-spacing"),letterSpacing:b.css("letter-spacing"),textIndent:b.css("text-indent"),textRendering:b.css("text-rendering"),textTransform:b.css("text-transform")}).insertAfter(b)}function f(a,b){return a=(a||"").replace(/^\s*/g,"").replace(/\s{2,}/g," "),b=(b||"").replace(/^\s*/g,"").replace(/\s{2,}/g," "),a===b}return c.mixin(b.prototype,d,{_handleFocus:function(){this.trigger("focused")},_handleBlur:function(){this.trigger("blured")},_handleSpecialKeyEvent:function(a){var b=this.specialKeyCodeMap[a.which||a.keyCode];b&&this.trigger(b+"Keyed",a)},_compareQueryToInputValue:function(){var a=this.getInputValue(),b=f(this.query,a),c=b?this.query.length!==a.length:!1;c?this.trigger("whitespaceChanged",{value:this.query}):b||this.trigger("queryChanged",{value:this.query=a})},destroy:function(){this.$hint.off(".tt"),this.$input.off(".tt"),this.$hint=this.$input=this.$overflowHelper=null},focus:function(){this.$input.focus()},blur:function(){this.$input.blur()},getQuery:function(){return this.query},setQuery:function(a){this.query=a},getInputValue:function(){return this.$input.val()},setInputValue:function(a,b){this.$input.val(a),!b&&this._compareQueryToInputValue()},getHintValue:function(){return this.$hint.val()},setHintValue:function(a){this.$hint.val(a)},getLanguageDirection:function(){return(this.$input.css("direction")||"ltr").toLowerCase()},isOverflow:function(){return this.$overflowHelper.text(this.getInputValue()),this.$overflowHelper.width()>this.$input.width()},isCursorAtEnd:function(){var a,b=this.$input.val().length,d=this.$input[0].selectionStart;return c.isNumber(d)?d===b:document.selection?(a=document.selection.createRange(),a.moveStart("character",-b),b===a.text.length):!0}}),b}(),k=function(){function b(b){c.bindAll(this),this.isOpen=!1,this.isEmpty=!0,this.isMouseOverDropdown=!1,this.$menu=a(b.menu).on("mouseenter.tt",this._handleMouseenter).on("mouseleave.tt",this._handleMouseleave).on("click.tt",".tt-suggestion",this._handleSelection).on("mouseover.tt",".tt-suggestion",this._handleMouseover)}function e(a){return a.data("suggestion")}var f={suggestionsList:'<span class="tt-suggestions"></span>'},g={suggestionsList:{display:"block"},suggestion:{whiteSpace:"nowrap",cursor:"pointer"},suggestionChild:{whiteSpace:"normal"}};return c.mixin(b.prototype,d,{_handleMouseenter:function(){this.isMouseOverDropdown=!0},_handleMouseleave:function(){this.isMouseOverDropdown=!1},_handleMouseover:function(b){var c=a(b.currentTarget);this._getSuggestions().removeClass("tt-is-under-cursor"),c.addClass("tt-is-under-cursor")},_handleSelection:function(b){var c=a(b.currentTarget);this.trigger("suggestionSelected",e(c))},_show:function(){this.$menu.css("display","block")},_hide:function(){this.$menu.hide()},_moveCursor:function(a){var b,c,d,f;if(this.isVisible()){if(b=this._getSuggestions(),c=b.filter(".tt-is-under-cursor"),c.removeClass("tt-is-under-cursor"),d=b.index(c)+a,d=(d+1)%(b.length+1)-1,-1===d)return this.trigger("cursorRemoved"),void 0;-1>d&&(d=b.length-1),f=b.eq(d).addClass("tt-is-under-cursor"),this._ensureVisibility(f),this.trigger("cursorMoved",e(f))}},_getSuggestions:function(){return this.$menu.find(".tt-suggestions > .tt-suggestion")},_ensureVisibility:function(a){var b=this.$menu.height()+parseInt(this.$menu.css("paddingTop"),10)+parseInt(this.$menu.css("paddingBottom"),10),c=this.$menu.scrollTop(),d=a.position().top,e=d+a.outerHeight(!0);0>d?this.$menu.scrollTop(c+d):e>b&&this.$menu.scrollTop(c+(e-b))},destroy:function(){this.$menu.off(".tt"),this.$menu=null},isVisible:function(){return this.isOpen&&!this.isEmpty},closeUnlessMouseIsOverDropdown:function(){this.isMouseOverDropdown||this.close()},close:function(){this.isOpen&&(this.isOpen=!1,this.isMouseOverDropdown=!1,this._hide(),this.$menu.find(".tt-suggestions > .tt-suggestion").removeClass("tt-is-under-cursor"),this.trigger("closed"))},open:function(){this.isOpen||(this.isOpen=!0,!this.isEmpty&&this._show(),this.trigger("opened"))},setLanguageDirection:function(a){var b={left:"0",right:"auto"},c={left:"auto",right:" 0"};"ltr"===a?this.$menu.css(b):this.$menu.css(c)},moveCursorUp:function(){this._moveCursor(-1)},moveCursorDown:function(){this._moveCursor(1)},getSuggestionUnderCursor:function(){var a=this._getSuggestions().filter(".tt-is-under-cursor").first();return a.length>0?e(a):null},getFirstSuggestion:function(){var a=this._getSuggestions().first();return a.length>0?e(a):null},renderSuggestions:function(b,d){var e,h,i,j,k,l="tt-dataset-"+b.name,m='<div class="tt-suggestion">%body</div>',n=this.$menu.find("."+l);0===n.length&&(h=a(f.suggestionsList).css(g.suggestionsList),n=a("<div></div>").addClass(l).append(b.header).append(h).append(b.footer).appendTo(this.$menu)),d.length>0?(this.isEmpty=!1,this.isOpen&&this._show(),i=document.createElement("div"),j=document.createDocumentFragment(),c.each(d,function(c,d){d.dataset=b.name,e=b.template(d.datum),i.innerHTML=m.replace("%body",e),k=a(i.firstChild).css(g.suggestion).data("suggestion",d),k.children().each(function(){a(this).css(g.suggestionChild)}),j.appendChild(k[0])}),n.show().find(".tt-suggestions").html(j)):this.clearSuggestions(b.name),this.trigger("suggestionsRendered")},clearSuggestions:function(a){var b=a?this.$menu.find(".tt-dataset-"+a):this.$menu.find('[class^="tt-dataset-"]'),c=b.find(".tt-suggestions");b.hide(),c.empty(),0===this._getSuggestions().length&&(this.isEmpty=!0,this._hide())}}),b}(),l=function(){function b(a){var b,d,f;c.bindAll(this),this.$node=e(a.input),this.datasets=a.datasets,this.dir=null,this.eventBus=a.eventBus,b=this.$node.find(".tt-dropdown-menu"),d=this.$node.find(".tt-query"),f=this.$node.find(".tt-hint"),this.dropdownView=new k({menu:b}).on("suggestionSelected",this._handleSelection).on("cursorMoved",this._clearHint).on("cursorMoved",this._setInputValueToSuggestionUnderCursor).on("cursorRemoved",this._setInputValueToQuery).on("cursorRemoved",this._updateHint).on("suggestionsRendered",this._updateHint).on("opened",this._updateHint).on("closed",this._clearHint).on("opened closed",this._propagateEvent),this.inputView=new j({input:d,hint:f}).on("focused",this._openDropdown).on("blured",this._closeDropdown).on("blured",this._setInputValueToQuery).on("enterKeyed tabKeyed",this._handleSelection).on("queryChanged",this._clearHint).on("queryChanged",this._clearSuggestions).on("queryChanged",this._getSuggestions).on("whitespaceChanged",this._updateHint).on("queryChanged whitespaceChanged",this._openDropdown).on("queryChanged whitespaceChanged",this._setLanguageDirection).on("escKeyed",this._closeDropdown).on("escKeyed",this._setInputValueToQuery).on("tabKeyed upKeyed downKeyed",this._managePreventDefault).on("upKeyed downKeyed",this._moveDropdownCursor).on("upKeyed downKeyed",this._openDropdown).on("tabKeyed leftKeyed rightKeyed",this._autocomplete)}function e(b){var c=a(g.wrapper),d=a(g.dropdown),e=a(b),f=a(g.hint);c=c.css(h.wrapper),d=d.css(h.dropdown),f.css(h.hint).css({backgroundAttachment:e.css("background-attachment"),backgroundClip:e.css("background-clip"),backgroundColor:e.css("background-color"),backgroundImage:e.css("background-image"),backgroundOrigin:e.css("background-origin"),backgroundPosition:e.css("background-position"),backgroundRepeat:e.css("background-repeat"),backgroundSize:e.css("background-size")}),e.data("ttAttrs",{dir:e.attr("dir"),autocomplete:e.attr("autocomplete"),spellcheck:e.attr("spellcheck"),style:e.attr("style")}),e.addClass("tt-query").attr({autocomplete:"off",spellcheck:!1}).css(h.query);try{!e.attr("dir")&&e.attr("dir","auto")}catch(i){}return e.wrap(c).parent().prepend(f).append(d)}function f(a){var b=a.find(".tt-query");c.each(b.data("ttAttrs"),function(a,d){c.isUndefined(d)?b.removeAttr(a):b.attr(a,d)}),b.detach().removeData("ttAttrs").removeClass("tt-query").insertAfter(a),a.remove()}var g={wrapper:'<span class="twitter-typeahead"></span>',hint:'<input class="tt-hint" type="text" autocomplete="off" spellcheck="off" disabled>',dropdown:'<span class="tt-dropdown-menu"></span>'},h={wrapper:{position:"relative",display:"inline-block"},hint:{position:"absolute",top:"0",left:"0",borderColor:"transparent",boxShadow:"none"},query:{position:"relative",verticalAlign:"top",backgroundColor:"transparent"},dropdown:{position:"absolute",top:"100%",left:"0",zIndex:"100",display:"none"}};return c.isMsie()&&c.mixin(h.query,{backgroundImage:"url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)"}),c.isMsie()&&c.isMsie()<=7&&(c.mixin(h.wrapper,{display:"inline",zoom:"1"}),c.mixin(h.query,{marginTop:"-1px"})),c.mixin(b.prototype,d,{_managePreventDefault:function(a){var b,c,d=a.data,e=!1;switch(a.type){case"tabKeyed":b=this.inputView.getHintValue(),c=this.inputView.getInputValue(),e=b&&b!==c;break;case"upKeyed":case"downKeyed":e=!d.shiftKey&&!d.ctrlKey&&!d.metaKey}e&&d.preventDefault()},_setLanguageDirection:function(){var a=this.inputView.getLanguageDirection();a!==this.dir&&(this.dir=a,this.$node.css("direction",a),this.dropdownView.setLanguageDirection(a))},_updateHint:function(){var a,b,d,e,f,g=this.dropdownView.getFirstSuggestion(),h=g?g.value:null,i=this.dropdownView.isVisible(),j=this.inputView.isOverflow();h&&i&&!j&&(a=this.inputView.getInputValue(),b=a.replace(/\s{2,}/g," ").replace(/^\s+/g,""),d=c.escapeRegExChars(b),e=new RegExp("^(?:"+d+")(.*$)","i"),f=e.exec(h),this.inputView.setHintValue(a+(f?f[1]:"")))},_clearHint:function(){this.inputView.setHintValue("")},_clearSuggestions:function(){this.dropdownView.clearSuggestions()},_setInputValueToQuery:function(){this.inputView.setInputValue(this.inputView.getQuery())},_setInputValueToSuggestionUnderCursor:function(a){var b=a.data;this.inputView.setInputValue(b.value,!0)},_openDropdown:function(){this.dropdownView.open()},_closeDropdown:function(a){this.dropdownView["blured"===a.type?"closeUnlessMouseIsOverDropdown":"close"]()},_moveDropdownCursor:function(a){var b=a.data;b.shiftKey||b.ctrlKey||b.metaKey||this.dropdownView["upKeyed"===a.type?"moveCursorUp":"moveCursorDown"]()},_handleSelection:function(a){var b="suggestionSelected"===a.type,d=b?a.data:this.dropdownView.getSuggestionUnderCursor();d&&(this.inputView.setInputValue(d.value),b?this.inputView.focus():a.data.preventDefault(),b&&c.isMsie()?c.defer(this.dropdownView.close):this.dropdownView.close(),this.eventBus.trigger("selected",d.datum,d.dataset))},_getSuggestions:function(){var a=this,b=this.inputView.getQuery();c.isBlankString(b)||c.each(this.datasets,function(c,d){d.getSuggestions(b,function(c){b===a.inputView.getQuery()&&a.dropdownView.renderSuggestions(d,c)})})},_autocomplete:function(a){var b,c,d,e,f;("rightKeyed"!==a.type&&"leftKeyed"!==a.type||(b=this.inputView.isCursorAtEnd(),c="ltr"===this.inputView.getLanguageDirection()?"leftKeyed"===a.type:"rightKeyed"===a.type,b&&!c))&&(d=this.inputView.getQuery(),e=this.inputView.getHintValue(),""!==e&&d!==e&&(f=this.dropdownView.getFirstSuggestion(),this.inputView.setInputValue(f.value),this.eventBus.trigger("autocompleted",f.datum,f.dataset)))},_propagateEvent:function(a){this.eventBus.trigger(a.type)},destroy:function(){this.inputView.destroy(),this.dropdownView.destroy(),f(this.$node),this.$node=null},setQuery:function(a){this.inputView.setQuery(a),this.inputView.setInputValue(a),this._clearHint(),this._clearSuggestions(),this._getSuggestions()}}),b}();!function(){var b,d={},f="ttView";b={initialize:function(b){function g(){var b,d=a(this),g=new e({el:d});b=c.map(h,function(a){return a.initialize()}),d.data(f,new l({input:d,eventBus:g=new e({el:d}),datasets:h})),a.when.apply(a,b).always(function(){c.defer(function(){g.trigger("initialized")})})}var h;return b=c.isArray(b)?b:[b],0===b.length&&a.error("no datasets provided"),h=c.map(b,function(a){var b=d[a.name]?d[a.name]:new i(a);return a.name&&(d[a.name]=b),b}),this.each(g)},destroy:function(){function b(){var b=a(this),c=b.data(f);c&&(c.destroy(),b.removeData(f))}return this.each(b)},setQuery:function(b){function c(){var c=a(this).data(f);c&&c.setQuery(b)}return this.each(c)}},jQuery.fn.typeahead=function(a){return b[a]?b[a].apply(this,[].slice.call(arguments,1)):b.initialize.apply(this,arguments)}}()}(window.jQuery);
/**
 * Retailer search
 *
 * Version: 0.1
 */

(function($) {
	$.fn.of_retailerSearch = function(settings){

		var config = {
			link: 'a.details'
		};

		if (settings) {
			$.extend(config, settings);
		}

		this.each(function(){

			// global object
			var trigger = $(this);

			var items = trigger.find('.item');

			items.each(function(i){

				var thisItem = $(this);
				var thisDesc = thisItem.find('.addinfo');
				var thisName = thisItem.find('.retailername');
				var thisLogo = thisItem.find('.logo');
				var thisAddress = thisItem.find('td.address');
				var thisContact = thisItem.find('td.contact');
				var thisAddressHead = trigger.find('th.address');
				var thisContactHead = trigger.find('th.contact');

				var mapID = 'map-' + thisItem.attr('id');

				thisDesc.show();
				thisLogo.show();

				var type2 = (thisDesc.length > 0 || thisLogo.length > 0) ? false : true;

				var perparedHtml = '<div class="detailscontent">';
				perparedHtml += '<p class="headline">' + thisName.html() + '</p>';

				if(!type2){

					perparedHtml += '<div class="firstrow">';
					perparedHtml += (thisLogo.length > 0) ? thisLogo.html() : '';
					perparedHtml += '<p>';
					perparedHtml += (thisDesc.length > 0) ? thisDesc.html() : '';
					perparedHtml += '</p>';
					perparedHtml += '<div class="clear"></div>';
					perparedHtml += '</div>';
				}

				perparedHtml += (!type2) ? '<div class="secondrow">' : '<div class="secondrow2">';
				perparedHtml += '<div class="address">' + thisAddressHead.html() + '<p>' + thisName.html() + '</p>' + thisAddress.html() + '</div>';
				perparedHtml += '<div class="contact">' + thisContactHead.html() + thisContact.html() + '</div>';
				perparedHtml += '<div class="clear"></div>';
				perparedHtml += '</div>';

				if(!type2){

					perparedHtml += '<div class="thirdrow" id="' + mapID + '"></div>';
				}
				else {
					perparedHtml += '<div class="thirdrow2" id="' + mapID + '"></div>';
				}

				perparedHtml += '</div>';

				thisDesc.remove();
				thisLogo.remove();

				thisItem.data('details',perparedHtml);
			});

			items.find(config.link).on('click',function(e){

				e.preventDefault();

				var thisLink = $(this);
				var parentItem = thisLink.parents('.item');
				var thisDesc = parentItem.data('details');

				var geo = parentItem.attr('class').split(' ');

				var map = {
					id: 'map-' + parentItem.attr('id'),
					center: {
						lat: geo[2].slice(4,geo[2].length),
						lon: geo[1].slice(4,geo[1].length)
					}
				}

				$.fancybox({
					padding: 25,
					margin: 20,
					opacity: true,
					modal: false,
					cyclic: false,
					scrolling: 'no',
					width: 800,
					height: 600,
					autoScale: false,
					autoDimensions: false,
					centerOnScroll: true,
					hideOnOverlayClick: true,
					hideOnContentClick: false,
					overlayShow: true,
					overlayOpacity: 0.7,
					overlayColor: '#000',
					titleShow: false,
					transitionIn: 'elastic',
					transitionOut: 'elastic',
					speedIn: 300,
					speedOut: 300,
					changeSpeed: 300,
					changeFade: 'fast',
					easingIn: 'swing',
					easingOut: 'swing',
					showCloseButton: true,
					showNavArrows: false,
					enableEscapeButton: true,
					type: 'html',
					content: thisDesc,
					orig: thisLink,
					onCleanup: function(){},
					onComplete: function(){

						var mapEl = document.getElementById(map.id);

						var mapCenter = new google.maps.LatLng(map.center.lat,map.center.lon);

						var mapOptions = {
							center: mapCenter,
							mapTypeId: google.maps.MapTypeId.ROADMAP,
							zoom: 15
						};

						var mapObj = new google.maps.Map(mapEl,mapOptions);

						var bubble = new google.maps.InfoWindow();
						var bounds = new google.maps.LatLngBounds();

						var pos = new google.maps.LatLng(map.center.lat,map.center.lon);

						var markerOptions = {
							map: mapObj,
							position: pos
						}

						var marker = new google.maps.Marker(markerOptions);
					}
				});
			});
		});

		return this;
	}
})(jQuery);
/**
 * Reference Extend
 *
 * Version: 0.1
 */

(function($) {
	$( ".showSP" ).click(function() {
		$(this).parent().parent().next( ".contentSP" ).slideToggle( "fast", function() {
			// Animation complete.
		});
	});
})(jQuery);
/*
     _ _      _       _
 ___| (_) ___| | __  (_)___
/ __| | |/ __| |/ /  | / __|
\__ \ | | (__|   < _ | \__ \
|___/_|_|\___|_|\_(_)/ |___/
                   |__/

 Version: 1.3.6
  Author: Ken Wheeler
 Website: http://kenwheeler.github.io
    Docs: http://kenwheeler.github.io/slick
    Repo: http://github.com/kenwheeler/slick
  Issues: http://github.com/kenwheeler/slick/issues

 */

/* global window, document, define, jQuery, setInterval, clearInterval */

(function(factory) {
    'use strict';
    if (typeof define === 'function' && define.amd) {
        define(['jquery'], factory);
    } else {
        factory(jQuery);
    }

}(function($) {
    'use strict';
    var Slick = window.Slick || {};

    Slick = (function() {

        var instanceUid = 0;

        function Slick(element, settings) {

            var _ = this,
                responsiveSettings, breakpoint;

            _.defaults = {
                accessibility: true,
                appendArrows: $(element),
                arrows: true,
                asNavFor: null,
                prevArrow: '<button type="button" class="slick-prev">Previous</button>',
                nextArrow: '<button type="button" class="slick-next">Next</button>',
                autoplay: false,
                autoplaySpeed: 3000,
                centerMode: false,
                centerPadding: '50px',
                cssEase: 'ease',
                customPaging: function(slider, i) {
                    return '<button type="button">' + (i + 1) + '</button>';
                },
                dots: false,
                draggable: true,
                easing: 'linear',
                fade: false,
                focusOnSelect: false,
                infinite: true,
                lazyLoad: 'ondemand',
                onBeforeChange: null,
                onAfterChange: null,
                onInit: null,
                onReInit: null,
                pauseOnHover: true,
                pauseOnDotsHover: false,
                responsive: null,
                slide: 'div',
                slidesToShow: 1,
                slidesToScroll: 1,
                speed: 300,
                swipe: true,
                touchMove: true,
                touchThreshold: 5,
                useCSS: true,
                vertical: false
            };

            _.initials = {
                animating: false,
                dragging: false,
                autoPlayTimer: null,
                currentSlide: 0,
                currentLeft: null,
                direction: 1,
                $dots: null,
                listWidth: null,
                listHeight: null,
                loadIndex: 0,
                $nextArrow: null,
                $prevArrow: null,
                slideCount: null,
                slideWidth: null,
                $slideTrack: null,
                $slides: null,
                sliding: false,
                slideOffset: 0,
                swipeLeft: null,
                $list: null,
                touchObject: {},
                transformsEnabled: false
            };

            $.extend(_, _.initials);

            _.activeBreakpoint = null;
            _.animType = null;
            _.animProp = null;
            _.breakpoints = [];
            _.breakpointSettings = [];
            _.cssTransitions = false;
            _.paused = false;
            _.positionProp = null;
            _.$slider = $(element);
            _.$slidesCache = null;
            _.transformType = null;
            _.transitionType = null;
            _.windowWidth = 0;
            _.windowTimer = null;

            _.options = $.extend({}, _.defaults, settings);

            _.originalSettings = _.options;
            responsiveSettings = _.options.responsive || null;

            if (responsiveSettings && responsiveSettings.length > -1) {
                for (breakpoint in responsiveSettings) {
                    if (responsiveSettings.hasOwnProperty(breakpoint)) {
                        _.breakpoints.push(responsiveSettings[
                            breakpoint].breakpoint);
                        _.breakpointSettings[responsiveSettings[
                            breakpoint].breakpoint] =
                            responsiveSettings[breakpoint].settings;
                    }
                }
                _.breakpoints.sort(function(a, b) {
                    return b - a;
                });
            }

            _.autoPlay = $.proxy(_.autoPlay, _);
            _.autoPlayClear = $.proxy(_.autoPlayClear, _);
            _.changeSlide = $.proxy(_.changeSlide, _);
            _.selectHandler = $.proxy(_.selectHandler, _);
            _.setPosition = $.proxy(_.setPosition, _);
            _.swipeHandler = $.proxy(_.swipeHandler, _);
            _.dragHandler = $.proxy(_.dragHandler, _);
            _.keyHandler = $.proxy(_.keyHandler, _);
            _.autoPlayIterator = $.proxy(_.autoPlayIterator, _);

            _.instanceUid = instanceUid++;

            // A simple way to check for HTML strings
            // Strict HTML recognition (must start with <)
            // Extracted from jQuery v1.11 source
            _.htmlExpr = /^(?:\s*(<[\w\W]+>)[^>]*)$/;

            _.init();

        }

        return Slick;

    }());

    Slick.prototype.addSlide = function(markup, index, addBefore) {

        var _ = this;

        if (typeof(index) === 'boolean') {
            addBefore = index;
            index = null;
        } else if (index < 0 || (index >= _.slideCount)) {
            return false;
        }

        _.unload();

        if (typeof(index) === 'number') {
            if (index === 0 && _.$slides.length === 0) {
                $(markup).appendTo(_.$slideTrack);
            } else if (addBefore) {
                $(markup).insertBefore(_.$slides.eq(index));
            } else {
                $(markup).insertAfter(_.$slides.eq(index));
            }
        } else {
            if (addBefore === true) {
                $(markup).prependTo(_.$slideTrack);
            } else {
                $(markup).appendTo(_.$slideTrack);
            }
        }

        _.$slides = _.$slideTrack.children(this.options.slide);

        _.$slideTrack.children(this.options.slide).remove();

        _.$slideTrack.append(_.$slides);
        
        _.$slides.each(function(index, element) {
            $(element).attr("index",index);
        });

        _.$slidesCache = _.$slides;

        _.reinit();

    };

    Slick.prototype.animateSlide = function(targetLeft,
        callback) {

        var animProps = {}, _ = this;

        if (_.transformsEnabled === false) {
            if (_.options.vertical === false) {
                _.$slideTrack.animate({
                    left: targetLeft
                }, _.options.speed, _.options.easing, callback);
            } else {
                _.$slideTrack.animate({
                    top: targetLeft
                }, _.options.speed, _.options.easing, callback);
            }

        } else {

            if (_.cssTransitions === false) {

                $({
                    animStart: _.currentLeft
                }).animate({
                    animStart: targetLeft
                }, {
                    duration: _.options.speed,
                    easing: _.options.easing,
                    step: function(now) {
                        if (_.options.vertical === false) {
                            animProps[_.animType] = 'translate(' +
                                now + 'px, 0px)';
                            _.$slideTrack.css(animProps);
                        } else {
                            animProps[_.animType] = 'translate(0px,' +
                                now + 'px)';
                            _.$slideTrack.css(animProps);
                        }
                    },
                    complete: function() {
                        if (callback) {
                            callback.call();
                        }
                    }
                });

            } else {

                _.applyTransition();

                if (_.options.vertical === false) {
                    animProps[_.animType] = 'translate3d(' + targetLeft + 'px, 0px, 0px)';
                } else {
                    animProps[_.animType] = 'translate3d(0px,' + targetLeft + 'px, 0px)';
                }
                _.$slideTrack.css(animProps);

                if (callback) {
                    setTimeout(function() {

                        _.disableTransition();

                        callback.call();
                    }, _.options.speed);
                }

            }

        }

    };

    Slick.prototype.applyTransition = function(slide) {

        var _ = this,
            transition = {};

        if (_.options.fade === false) {
            transition[_.transitionType] = _.transformType + ' ' + _.options.speed + 'ms ' + _.options.cssEase;
        } else {
            transition[_.transitionType] = 'opacity ' + _.options.speed + 'ms ' + _.options.cssEase;
        }

        if (_.options.fade === false) {
            _.$slideTrack.css(transition);
        } else {
            _.$slides.eq(slide).css(transition);
        }

    };

    Slick.prototype.autoPlay = function() {

        var _ = this;

        if (_.autoPlayTimer) {
            clearInterval(_.autoPlayTimer);
        }

        if (_.slideCount > _.options.slidesToShow && _.paused !== true) {
            _.autoPlayTimer = setInterval(_.autoPlayIterator,
                _.options.autoplaySpeed);
        }

    };

    Slick.prototype.autoPlayClear = function() {

        var _ = this;

        if (_.autoPlayTimer) {
            clearInterval(_.autoPlayTimer);
        }

    };

    Slick.prototype.autoPlayIterator = function() {

        var _ = this;
        var asNavFor = _.options.asNavFor != null ? $(_.options.asNavFor).getSlick() : null;

        if (_.options.infinite === false) {

            if (_.direction === 1) {

                if ((_.currentSlide + 1) === _.slideCount -
                    1) {
                    _.direction = 0;
                }

                _.slideHandler(_.currentSlide + _.options.slidesToScroll);
                if(asNavFor != null) asNavFor.slideHandler(asNavFor.currentSlide + asNavFor.options.slidesToScroll);

            } else {

                if ((_.currentSlide - 1 === 0)) {

                    _.direction = 1;

                }

                _.slideHandler(_.currentSlide - _.options.slidesToScroll);
                if(asNavFor != null) asNavFor.slideHandler(asNavFor.currentSlide - asNavFor.options.slidesToScroll);
                
            }

        } else {

            _.slideHandler(_.currentSlide + _.options.slidesToScroll);
            if(asNavFor != null) asNavFor.slideHandler(asNavFor.currentSlide + asNavFor.options.slidesToScroll);

        }

    };

    Slick.prototype.buildArrows = function() {

        var _ = this;

        if (_.options.arrows === true && _.slideCount > _.options.slidesToShow) {

            _.$prevArrow = $(_.options.prevArrow);
            _.$nextArrow = $(_.options.nextArrow);

            if (_.htmlExpr.test(_.options.prevArrow)) {
                _.$prevArrow.appendTo(_.options.appendArrows);
            }

            if (_.htmlExpr.test(_.options.nextArrow)) {
                _.$nextArrow.appendTo(_.options.appendArrows);
            }

            if (_.options.infinite !== true) {
                _.$prevArrow.addClass('slick-disabled');
            }

        }

    };

    Slick.prototype.buildDots = function() {

        var _ = this,
            i, dotString;

        if (_.options.dots === true && _.slideCount > _.options.slidesToShow) {

            dotString = '<ul class="slick-dots">';

            for (i = 0; i <= _.getDotCount(); i += 1) {
                dotString += '<li>' + _.options.customPaging.call(this, _, i) + '</li>';
            }

            dotString += '</ul>';

            _.$dots = $(dotString).appendTo(
                _.$slider);

            _.$dots.find('li').first().addClass(
                'slick-active');

        }

    };

    Slick.prototype.buildOut = function() {

        var _ = this;

        _.$slides = _.$slider.children(_.options.slide +
            ':not(.slick-cloned)').addClass(
            'slick-slide');
        _.slideCount = _.$slides.length;
        
        _.$slides.each(function(index, element) {
            $(element).attr("index",index);
        });
        
        _.$slidesCache = _.$slides;

        _.$slider.addClass('slick-slider');

        _.$slideTrack = (_.slideCount === 0) ?
            $('<div class="slick-track"/>').appendTo(_.$slider) :
            _.$slides.wrapAll('<div class="slick-track"/>').parent();

        _.$list = _.$slideTrack.wrap(
            '<div class="slick-list"/>').parent();
        _.$slideTrack.css('opacity', 0);

        if (_.options.centerMode === true) {
            _.options.slidesToScroll = 1;
            if (_.options.slidesToShow % 2 === 0) {
                _.options.slidesToShow = 3;
            }
        }

        $('img[data-lazy]', _.$slider).not('[src]').addClass('slick-loading');

        _.setupInfinite();

        _.buildArrows();

        _.buildDots();

        _.updateDots();

        if (_.options.accessibility === true) {
            _.$list.prop('tabIndex', 0);
        }

        _.setSlideClasses(typeof this.currentSlide === 'number' ? this.currentSlide : 0);

        if (_.options.draggable === true) {
            _.$list.addClass('draggable');
        }

    };

    Slick.prototype.checkResponsive = function() {

        var _ = this,
            breakpoint, targetBreakpoint;

        if (_.originalSettings.responsive && _.originalSettings
            .responsive.length > -1 && _.originalSettings.responsive !== null) {

            targetBreakpoint = null;

            for (breakpoint in _.breakpoints) {
                if (_.breakpoints.hasOwnProperty(breakpoint)) {
                    if ($(window).width() < _.breakpoints[
                        breakpoint]) {
                        targetBreakpoint = _.breakpoints[
                            breakpoint];
                    }
                }
            }

            if (targetBreakpoint !== null) {
                if (_.activeBreakpoint !== null) {
                    if (targetBreakpoint !== _.activeBreakpoint) {
                        _.activeBreakpoint =
                            targetBreakpoint;
                        _.options = $.extend({}, _.options,
                            _.breakpointSettings[
                                targetBreakpoint]);
                        _.refresh();
                    }
                } else {
                    _.activeBreakpoint = targetBreakpoint;
                    _.options = $.extend({}, _.options,
                        _.breakpointSettings[
                            targetBreakpoint]);
                    _.refresh();
                }
            } else {
                if (_.activeBreakpoint !== null) {
                    _.activeBreakpoint = null;
                    _.options = $.extend({}, _.options,
                        _.originalSettings);
                    _.refresh();
                }
            }

        }

    };

    Slick.prototype.changeSlide = function(event) {

        var _ = this,
            $target = $(event.target);
        var asNavFor = _.options.asNavFor != null ? $(_.options.asNavFor).getSlick() : null;

        // If target is a link, prevent default action.
        $target.is('a') && event.preventDefault();

        switch (event.data.message) {

            case 'previous':
                if (_.slideCount > _.options.slidesToShow) {
                  _.slideHandler(_.currentSlide - _.options
                    .slidesToScroll);
                if(asNavFor != null) asNavFor.slideHandler(asNavFor.currentSlide - asNavFor.options.slidesToScroll);
                }
                break;

            case 'next':
                if (_.slideCount > _.options.slidesToShow) {
                  _.slideHandler(_.currentSlide + _.options
                    .slidesToScroll);
                if(asNavFor != null)  asNavFor.slideHandler(asNavFor.currentSlide + asNavFor.options.slidesToScroll);
                }
                break;

            case 'index':
                var index = $(event.target).parent().index() * _.options.slidesToScroll;
                _.slideHandler(index);
                if(asNavFor != null)  asNavFor.slideHandler(index);                break;

            default:
                return false;
        }

    };

    Slick.prototype.destroy = function() {

        var _ = this;

        _.autoPlayClear();

        _.touchObject = {};

        $('.slick-cloned', _.$slider).remove();
        if (_.$dots) {
            _.$dots.remove();
        }
        if (_.$prevArrow) {
            _.$prevArrow.remove();
            _.$nextArrow.remove();
        }
        if (_.$slides.parent().hasClass('slick-track')) {
        	_.$slides.unwrap().unwrap();
        }
        _.$slides.removeClass(
            'slick-slide slick-active slick-visible').removeAttr('style');
        _.$slider.removeClass('slick-slider');
        _.$slider.removeClass('slick-initialized');

        _.$list.off('.slick');
        $(window).off('.slick-' + _.instanceUid);
    };

    Slick.prototype.disableTransition = function(slide) {

        var _ = this,
            transition = {};

        transition[_.transitionType] = "";

        if (_.options.fade === false) {
            _.$slideTrack.css(transition);
        } else {
            _.$slides.eq(slide).css(transition);
        }

    };

    Slick.prototype.fadeSlide = function(slideIndex, callback) {

        var _ = this;

        if (_.cssTransitions === false) {

            _.$slides.eq(slideIndex).css({
                zIndex: 1000
            });

            _.$slides.eq(slideIndex).animate({
                opacity: 1
            }, _.options.speed, _.options.easing, callback);

        } else {

            _.applyTransition(slideIndex);

            _.$slides.eq(slideIndex).css({
                opacity: 1,
                zIndex: 1000
            });

            if (callback) {
                setTimeout(function() {

                    _.disableTransition(slideIndex);

                    callback.call();
                }, _.options.speed);
            }

        }

    };

    Slick.prototype.filterSlides = function(filter) {

        var _ = this;

        if (filter !== null) {

            _.unload();

            _.$slideTrack.children(this.options.slide).remove();

            _.$slidesCache.filter(filter).appendTo(_.$slideTrack);

            _.reinit();

        }

    };

    Slick.prototype.getCurrent = function() {

        var _ = this;

        return _.currentSlide;

    };

    Slick.prototype.getDotCount = function() {

        var _ = this,
            breaker = 0,
            dotCounter = 0,
            dotCount = 0,
            dotLimit;

        dotLimit = _.options.infinite === true ? _.slideCount + _.options.slidesToShow - _.options.slidesToScroll : _.slideCount;

        while (breaker < dotLimit) {
            dotCount++;
            dotCounter += _.options.slidesToScroll;
            breaker = dotCounter + _.options.slidesToShow;
        }

        return dotCount;

    };

    Slick.prototype.getLeft = function(slideIndex) {

        var _ = this,
            targetLeft,
            verticalHeight,
            verticalOffset = 0;

        _.slideOffset = 0;
        verticalHeight = _.$slides.first().outerHeight();

        if (_.options.infinite === true) {
            if (_.slideCount > _.options.slidesToShow) {
                _.slideOffset = (_.slideWidth * _.options.slidesToShow) * -1;
                verticalOffset = (verticalHeight * _.options.slidesToShow) * -1;
            }
            if (_.slideCount % _.options.slidesToScroll !== 0) {
                if (slideIndex + _.options.slidesToScroll > _.slideCount && _.slideCount > _.options.slidesToShow) {
                    _.slideOffset = ((_.slideCount % _.options.slidesToShow) * _.slideWidth) * -1;
                    verticalOffset = ((_.slideCount % _.options.slidesToShow) * verticalHeight) * -1;
                }
            }
        } else {
            if (_.slideCount % _.options.slidesToShow !== 0) {
                if (slideIndex + _.options.slidesToScroll > _.slideCount && _.slideCount > _.options.slidesToShow) {
                    _.slideOffset = (_.options.slidesToShow * _.slideWidth) - ((_.slideCount % _.options.slidesToShow) * _.slideWidth);
                    verticalOffset = ((_.slideCount % _.options.slidesToShow) * verticalHeight);
                }
            }
        }

        if (_.options.centerMode === true && _.options.infinite === true) {
            _.slideOffset += _.slideWidth * Math.floor(_.options.slidesToShow / 2) - _.slideWidth;
        } else if (_.options.centerMode === true) {
            _.slideOffset += _.slideWidth * Math.floor(_.options.slidesToShow / 2);
        }

        if (_.options.vertical === false) {
            targetLeft = ((slideIndex * _.slideWidth) * -1) + _.slideOffset;
        } else {
            targetLeft = ((slideIndex * verticalHeight) * -1) + verticalOffset;
        }

        return targetLeft;

    };

    Slick.prototype.init = function() {

        var _ = this;

        if (!$(_.$slider).hasClass('slick-initialized')) {

            $(_.$slider).addClass('slick-initialized');
            _.buildOut();
            _.setProps();
            _.startLoad();
            _.loadSlider();
            _.initializeEvents();
            _.checkResponsive();
        }

        if (_.options.onInit !== null) {
            _.options.onInit.call(this, _);
        }

    };

    Slick.prototype.initArrowEvents = function() {

        var _ = this;

        if (_.options.arrows === true && _.slideCount > _.options.slidesToShow) {
            _.$prevArrow.on('click.slick', {
                message: 'previous'
            }, _.changeSlide);
            _.$nextArrow.on('click.slick', {
                message: 'next'
            }, _.changeSlide);
        }

    };

    Slick.prototype.initDotEvents = function() {

        var _ = this;

        if (_.options.dots === true && _.slideCount > _.options.slidesToShow) {
            $('li', _.$dots).on('click.slick', {
                message: 'index'
            }, _.changeSlide);
        }

        if (_.options.dots === true && _.options.pauseOnDotsHover === true && _.options.autoplay === true) {
            $('li', _.$dots)
                .on('mouseenter.slick', _.autoPlayClear)
                .on('mouseleave.slick', _.autoPlay);
        }

    };

    Slick.prototype.initializeEvents = function() {

        var _ = this;

        _.initArrowEvents();

        _.initDotEvents();

        _.$list.on('touchstart.slick mousedown.slick', {
            action: 'start'
        }, _.swipeHandler);
        _.$list.on('touchmove.slick mousemove.slick', {
            action: 'move'
        }, _.swipeHandler);
        _.$list.on('touchend.slick mouseup.slick', {
            action: 'end'
        }, _.swipeHandler);
        _.$list.on('touchcancel.slick mouseleave.slick', {
            action: 'end'
        }, _.swipeHandler);

        if (_.options.pauseOnHover === true && _.options.autoplay === true) {
            _.$list.on('mouseenter.slick', _.autoPlayClear);
            _.$list.on('mouseleave.slick', _.autoPlay);
        }

        if(_.options.accessibility === true) {
            _.$list.on('keydown.slick', _.keyHandler);
        }
        
        if(_.options.focusOnSelect === true) {
            $(_.options.slide, _.$slideTrack).on('click.slick', _.selectHandler);
        }

        $(window).on('orientationchange.slick.slick-' + _.instanceUid, function() {
            _.checkResponsive();
            _.setPosition();
        });

        $(window).on('resize.slick.slick-' + _.instanceUid, function() {
            if ($(window).width !== _.windowWidth) {
                clearTimeout(_.windowDelay);
                _.windowDelay = window.setTimeout(function() {
                    _.windowWidth = $(window).width();
                    _.checkResponsive();
                    _.setPosition();
                }, 50);
            }
        });

        $(window).on('load.slick.slick-' + _.instanceUid, _.setPosition);
        $(document).on('ready.slick.slick-' + _.instanceUid, _.setPosition);

    };

    Slick.prototype.initUI = function() {

        var _ = this;

        if (_.options.arrows === true && _.slideCount > _.options.slidesToShow) {

            _.$prevArrow.show();
            _.$nextArrow.show();

        }

        if (_.options.dots === true && _.slideCount > _.options.slidesToShow) {

            _.$dots.show();

        }

        if (_.options.autoplay === true) {

            _.autoPlay();

        }

    };

    Slick.prototype.keyHandler = function(event) {

        var _ = this;

        if (event.keyCode === 37) {
            _.changeSlide({
                data: {
                    message: 'previous'
                }
            });
        } else if (event.keyCode === 39) {
            _.changeSlide({
                data: {
                    message: 'next'
                }
            });
        }

    };

    Slick.prototype.lazyLoad = function() {

        var _ = this,
            loadRange, cloneRange, rangeStart, rangeEnd;

        function loadImages(imagesScope) {
            $('img[data-lazy]', imagesScope).each(function() {
                var image = $(this),
                    imageSource = $(this).attr('data-lazy');

                image
                  .css({ opacity: 0 })
                  .attr('src', imageSource)
                  .removeAttr('data-lazy')
                  .removeClass('slick-loading')
                  .load(function() { image.animate({ opacity: 1 }, 200); });
            });
        }

        if (_.options.centerMode === true || _.options.fade === true ) {
            rangeStart = _.options.slidesToShow + _.currentSlide - 1;
            rangeEnd = rangeStart + _.options.slidesToShow + 2;
        } else {
            rangeStart = _.options.infinite ? _.options.slidesToShow + _.currentSlide : _.currentSlide;
            rangeEnd = rangeStart + _.options.slidesToShow;
        }

        loadRange = _.$slider.find('.slick-slide').slice(rangeStart, rangeEnd);
        loadImages(loadRange);

        if (_.currentSlide >= _.slideCount - _.options.slidesToShow) {
            cloneRange = _.$slider.find('.slick-cloned').slice(0, _.options.slidesToShow);
            loadImages(cloneRange)
        } else if (_.currentSlide === 0) {
            cloneRange = _.$slider.find('.slick-cloned').slice(_.options.slidesToShow * -1);
            loadImages(cloneRange);
        }

    };

    Slick.prototype.loadSlider = function() {

        var _ = this;

        _.setPosition();

        _.$slideTrack.css({
            opacity: 1
        });

        _.$slider.removeClass('slick-loading');

        _.initUI();

        if (_.options.lazyLoad === 'progressive') {
            _.progressiveLazyLoad();
        }

    };

    Slick.prototype.postSlide = function(index) {

        var _ = this;

        if (_.options.onAfterChange !== null) {
            _.options.onAfterChange.call(this, _, index);
        }

        _.animating = false;

        _.setPosition();

        _.swipeLeft = null;

        if (_.options.autoplay === true && _.paused === false) {
            _.autoPlay();
        }

    };

    Slick.prototype.progressiveLazyLoad = function() {

        var _ = this,
            imgCount, targetImage;

        imgCount = $('img[data-lazy]').length;

        if (imgCount > 0) {
            targetImage = $('img[data-lazy]', _.$slider).first();
            targetImage.attr('src', targetImage.attr('data-lazy')).removeClass('slick-loading').load(function() {
                targetImage.removeAttr('data-lazy');
                _.progressiveLazyLoad();
            });
        }

    };

    Slick.prototype.refresh = function() {

        var _ = this,
            currentSlide = _.currentSlide;

        _.destroy();

        $.extend(_, _.initials);

        _.currentSlide = currentSlide;
        _.init();

    };

    Slick.prototype.reinit = function() {

        var _ = this;

        _.$slides = _.$slideTrack.children(_.options.slide).addClass(
            'slick-slide');

        _.slideCount = _.$slides.length;

        if (_.currentSlide >= _.slideCount && _.currentSlide !== 0) {
            _.currentSlide = _.currentSlide - _.options.slidesToScroll;
        }

        _.setProps();

        _.setupInfinite();

        _.buildArrows();

        _.updateArrows();

        _.initArrowEvents();

        _.buildDots();

        _.updateDots();

        _.initDotEvents();
        
        if(_.options.focusOnSelect === true) {
            $(_.options.slide, _.$slideTrack).on('click.slick', _.selectHandler);
        }

        _.setSlideClasses(0);

        _.setPosition();

        if (_.options.onReInit !== null) {
            _.options.onReInit.call(this, _);
        }

    };

    Slick.prototype.removeSlide = function(index, removeBefore) {

        var _ = this;

        if (typeof(index) === 'boolean') {
            removeBefore = index;
            index = removeBefore === true ? 0 : _.slideCount - 1;
        } else {
            index = removeBefore === true ? --index : index;
        }

        if (_.slideCount < 1 || index < 0 || index > _.slideCount - 1) {
            return false;
        }

        _.unload();

        _.$slideTrack.children(this.options.slide).eq(index).remove();

        _.$slides = _.$slideTrack.children(this.options.slide);

        _.$slideTrack.children(this.options.slide).remove();

        _.$slideTrack.append(_.$slides);

        _.$slidesCache = _.$slides;

        _.reinit();

    };

    Slick.prototype.setCSS = function(position) {

        var _ = this,
            positionProps = {}, x, y;

        x = _.positionProp == 'left' ? position + 'px' : '0px';
        y = _.positionProp == 'top' ? position + 'px' : '0px';

        positionProps[_.positionProp] = position;

        if (_.transformsEnabled === false) {
            _.$slideTrack.css(positionProps);
        } else {
            positionProps = {};
            if (_.cssTransitions === false) {
                positionProps[_.animType] = 'translate(' + x + ', ' + y + ')';
                _.$slideTrack.css(positionProps);
            } else {
                positionProps[_.animType] = 'translate3d(' + x + ', ' + y + ', 0px)';
                _.$slideTrack.css(positionProps);
            }
        }

    };

    Slick.prototype.setDimensions = function() {

        var _ = this;

        if (_.options.centerMode === true) {
            _.$slideTrack.children('.slick-slide').width(_.slideWidth);
        } else {
            _.$slideTrack.children('.slick-slide').width(_.slideWidth);
        }


        if (_.options.vertical === false) {
            _.$slideTrack.width(Math.ceil((_.slideWidth * _
                .$slideTrack.children('.slick-slide').length)));
            if (_.options.centerMode === true) {
                _.$list.css({
                    padding: ('0px ' + _.options.centerPadding)
                });
            }
        } else {
            _.$list.height(_.$slides.first().outerHeight() * _.options.slidesToShow);
            _.$slideTrack.height(Math.ceil((_.$slides.first().outerHeight() * _
                .$slideTrack.children('.slick-slide').length)));
            if (_.options.centerMode === true) {
                _.$list.css({
                    padding: (_.options.centerPadding + ' 0px')
                });
            }
        }

    };

    Slick.prototype.setFade = function() {

        var _ = this,
            targetLeft;

        _.$slides.each(function(index, element) {
            targetLeft = (_.slideWidth * index) * -1;
            $(element).css({
                position: 'relative',
                left: targetLeft,
                top: 0,
                zIndex: 800,
                opacity: 0
            });
        });

        _.$slides.eq(_.currentSlide).css({
            zIndex: 900,
            opacity: 1
        });

    };

    Slick.prototype.setPosition = function() {

        var _ = this;

        _.setValues();
        _.setDimensions();

        if (_.options.fade === false) {
            _.setCSS(_.getLeft(_.currentSlide));
        } else {
            _.setFade();
        }

    };

    Slick.prototype.setProps = function() {

        var _ = this;

        _.positionProp = _.options.vertical === true ? 'top' : 'left';

        if (_.positionProp === 'top') {
            _.$slider.addClass('slick-vertical');
        } else {
            _.$slider.removeClass('slick-vertical');
        }

        if (document.body.style.WebkitTransition !== undefined ||
            document.body.style.MozTransition !== undefined ||
            document.body.style.msTransition !== undefined) {
            if(_.options.useCSS === true) {
                _.cssTransitions = true;
            }
        }

        if (document.body.style.MozTransform !== undefined) {
            _.animType = 'MozTransform';
            _.transformType = "-moz-transform";
            _.transitionType = 'MozTransition';
        }
        if (document.body.style.webkitTransform !== undefined) {
            _.animType = 'webkitTransform';
            _.transformType = "-webkit-transform";
            _.transitionType = 'webkitTransition';
        }
        if (document.body.style.msTransform !== undefined) {
            _.animType = 'transform';
            _.transformType = "transform";
            _.transitionType = 'transition';
        }

        _.transformsEnabled = (_.animType !== null);

    };

    Slick.prototype.setValues = function() {

        var _ = this;

        _.listWidth = _.$list.width();
        _.listHeight = _.$list.height();
        if(_.options.vertical === false) {
        _.slideWidth = Math.ceil(_.listWidth / _.options
            .slidesToShow);
        } else {
        _.slideWidth = Math.ceil(_.listWidth);
        }

    };

    Slick.prototype.setSlideClasses = function(index) {

        var _ = this,
            centerOffset, allSlides, indexOffset;

        _.$slider.find('.slick-slide').removeClass('slick-active').removeClass('slick-center');
        allSlides = _.$slider.find('.slick-slide');

        if (_.options.centerMode === true) {

            centerOffset = Math.floor(_.options.slidesToShow / 2);

            if(_.options.infinite === true) {

                if (index >= centerOffset && index <= (_.slideCount - 1) - centerOffset) {
                    _.$slides.slice(index - centerOffset, index + centerOffset + 1).addClass('slick-active');
                } else {
                    indexOffset = _.options.slidesToShow + index;
                    allSlides.slice(indexOffset - centerOffset + 1, indexOffset + centerOffset + 2).addClass('slick-active');
                }

                if (index === 0) {
                    allSlides.eq(allSlides.length - 1 - _.options.slidesToShow).addClass('slick-center');
                } else if (index === _.slideCount - 1) {
                    allSlides.eq(_.options.slidesToShow).addClass('slick-center');
                }

            }

            _.$slides.eq(index).addClass('slick-center');

        } else {

            if (index > 0 && index < (_.slideCount - _.options.slidesToShow)) {
                _.$slides.slice(index, index + _.options.slidesToShow).addClass('slick-active');
            } else if ( allSlides.length <= _.options.slidesToShow ) {
                allSlides.addClass('slick-active');
            } else {
                indexOffset = _.options.infinite === true ? _.options.slidesToShow + index : index;
                allSlides.slice(indexOffset, indexOffset + _.options.slidesToShow).addClass('slick-active');
            }

        }

        if (_.options.lazyLoad === 'ondemand') {
            _.lazyLoad();
        }

    };

    Slick.prototype.setupInfinite = function() {

        var _ = this,
            i, slideIndex, infiniteCount;

        if (_.options.fade === true || _.options.vertical === true) {
            _.options.centerMode = false;
        }

        if (_.options.infinite === true && _.options.fade === false) {

            slideIndex = null;

            if (_.slideCount > _.options.slidesToShow) {

                if (_.options.centerMode === true) {
                    infiniteCount = _.options.slidesToShow + 1;
                } else {
                    infiniteCount = _.options.slidesToShow;
                }

                for (i = _.slideCount; i > (_.slideCount -
                    infiniteCount); i -= 1) {
                    slideIndex = i - 1;
                    $(_.$slides[slideIndex]).clone().attr('id', '').prependTo(
                        _.$slideTrack).addClass('slick-cloned');
                }
                for (i = 0; i < infiniteCount; i += 1) {
                    slideIndex = i;
                    $(_.$slides[slideIndex]).clone().attr('id', '').appendTo(
                        _.$slideTrack).addClass('slick-cloned');
                }
                _.$slideTrack.find('.slick-cloned').find('[id]').each(function() {
                    $(this).attr('id', '');
                });

            }

        }

    };
    
    Slick.prototype.selectHandler = function(event) {

        var _ = this;
        var asNavFor = _.options.asNavFor != null ? $(_.options.asNavFor).getSlick() : null;
        var index = parseInt($(event.target).parent().attr("index"));
        if(!index) index = 0;
        
        if(_.slideCount <= _.options.slidesToShow){
            return;
        }
        _.slideHandler(index);
        
        if(asNavFor != null){
            if(asNavFor.slideCount <= asNavFor.options.slidesToShow){
                return;
            }
            asNavFor.slideHandler(index);
        }
    };

    Slick.prototype.slideHandler = function(index) {

        var targetSlide, animSlide, slideLeft, unevenOffset, targetLeft = null,
            _ = this;

        if (_.animating === true) {
            return false;
        }

        targetSlide = index;
        targetLeft = _.getLeft(targetSlide);
        slideLeft = _.getLeft(_.currentSlide);

        unevenOffset = _.slideCount % _.options.slidesToScroll !== 0 ? _.options.slidesToScroll : 0;

        _.currentLeft = _.swipeLeft === null ? slideLeft : _.swipeLeft;

        if (_.options.infinite === false && _.options.centerMode === false && (index < 0 || index > (_.slideCount - _.options.slidesToShow + unevenOffset))) {
            if(_.options.fade === false) {
                targetSlide = _.currentSlide;
                _.animateSlide(slideLeft, function() {
                    _.postSlide(targetSlide);
                });
            }
            return false;
        } else if (_.options.infinite === false && _.options.centerMode === true && (index < 0 || index > (_.slideCount - _.options.slidesToScroll))) {
            if(_.options.fade === false) {
                targetSlide = _.currentSlide;
                _.animateSlide(slideLeft, function() {
                    _.postSlide(targetSlide);
                });
            }
            return false;
        }

        if (_.options.autoplay === true) {
            clearInterval(_.autoPlayTimer);
        }

        if (targetSlide < 0) {
            if (_.slideCount % _.options.slidesToScroll !== 0) {
                animSlide = _.slideCount - (_.slideCount % _.options.slidesToScroll);
            } else {
                animSlide = _.slideCount - _.options.slidesToScroll;
            }
        } else if (targetSlide > (_.slideCount - 1)) {
            animSlide = 0;
        } else {
            animSlide = targetSlide;
        }

        _.animating = true;

        if (_.options.onBeforeChange !== null && index !== _.currentSlide) {
            _.options.onBeforeChange.call(this, _, _.currentSlide, animSlide);
        }

        _.currentSlide = animSlide;

        _.setSlideClasses(_.currentSlide);

        _.updateDots();
        _.updateArrows();

        if (_.options.fade === true) {
            _.fadeSlide(animSlide, function() {
                _.postSlide(animSlide);
            });
            return false;
        }

        _.animateSlide(targetLeft, function() {
            _.postSlide(animSlide);
        });

    };

    Slick.prototype.startLoad = function() {

        var _ = this;

        if (_.options.arrows === true && _.slideCount > _.options.slidesToShow) {

            _.$prevArrow.hide();
            _.$nextArrow.hide();

        }

        if (_.options.dots === true && _.slideCount > _.options.slidesToShow) {

            _.$dots.hide();

        }

        _.$slider.addClass('slick-loading');

    };

    Slick.prototype.swipeDirection = function() {

        var xDist, yDist, r, swipeAngle, _ = this;

        xDist = _.touchObject.startX - _.touchObject.curX;
        yDist = _.touchObject.startY - _.touchObject.curY;
        r = Math.atan2(yDist, xDist);

        swipeAngle = Math.round(r * 180 / Math.PI);
        if (swipeAngle < 0) {
            swipeAngle = 360 - Math.abs(swipeAngle);
        }

        if ((swipeAngle <= 45) && (swipeAngle >= 0)) {
            return 'left';
        }
        if ((swipeAngle <= 360) && (swipeAngle >= 315)) {
            return 'left';
        }
        if ((swipeAngle >= 135) && (swipeAngle <= 225)) {
            return 'right';
        }

        return 'vertical';

    };

    Slick.prototype.swipeEnd = function(event) {

        var _ = this;
        var asNavFor = _.options.asNavFor != null ? $(_.options.asNavFor).getSlick() : null;

        _.dragging = false;

        if (_.touchObject.curX === undefined) {
            return false;
        }

        if (_.touchObject.swipeLength >= _.touchObject.minSwipe) {
            $(event.target).on('click.slick', function(event) {
                event.stopImmediatePropagation();
                event.stopPropagation();
                event.preventDefault();
                $(event.target).off('click.slick');
            });

            switch (_.swipeDirection()) {
                case 'left':
                    _.slideHandler(_.currentSlide + _.options.slidesToScroll);
                    if(asNavFor != null) asNavFor.slideHandler(asNavFor.currentSlide + asNavFor.options.slidesToScroll);
                    _.touchObject = {};
                    break;

                case 'right':
                    _.slideHandler(_.currentSlide - _.options.slidesToScroll);
                    if(asNavFor != null) asNavFor.slideHandler(asNavFor.currentSlide - asNavFor.options.slidesToScroll);
                    _.touchObject = {};
                    break;
            }
        } else {
            if(_.touchObject.startX !== _.touchObject.curX) {
                _.slideHandler(_.currentSlide);
                if(asNavFor != null) asNavFor.slideHandler(asNavFor.currentSlide);
                _.touchObject = {};
            }
        }

    };

    Slick.prototype.swipeHandler = function(event) {

        var _ = this;

        if ((_.options.swipe === false) || ('ontouchend' in document && _.options.swipe === false)) {
           return;
        } else if ((_.options.draggable === false) || (_.options.draggable === false && !event.originalEvent.touches)) {
           return;
        }

        _.touchObject.fingerCount = event.originalEvent && event.originalEvent.touches !== undefined ?
            event.originalEvent.touches.length : 1;

        _.touchObject.minSwipe = _.listWidth / _.options
            .touchThreshold;

        switch (event.data.action) {

            case 'start':
                _.swipeStart(event);
                break;

            case 'move':
                _.swipeMove(event);
                break;

            case 'end':
                _.swipeEnd(event);
                break;

        }

    };

    Slick.prototype.swipeMove = function(event) {

        var _ = this,
            curLeft, swipeDirection, positionOffset, touches;

        touches = event.originalEvent !== undefined ? event.originalEvent.touches : null;

        curLeft = _.getLeft(_.currentSlide);

        if (!_.dragging || touches && touches.length !== 1) {
            return false;
        }

        _.touchObject.curX = touches !== undefined ? touches[0].pageX : event.clientX;
        _.touchObject.curY = touches !== undefined ? touches[0].pageY : event.clientY;

        _.touchObject.swipeLength = Math.round(Math.sqrt(
            Math.pow(_.touchObject.curX - _.touchObject.startX, 2)));

        swipeDirection = _.swipeDirection();

        if (swipeDirection === 'vertical') {
            return;
        }

        if (event.originalEvent !== undefined && _.touchObject.swipeLength > 4) {
            event.preventDefault();
        }

        positionOffset = _.touchObject.curX > _.touchObject.startX ? 1 : -1;

        if (_.options.vertical === false) {
            _.swipeLeft = curLeft + _.touchObject.swipeLength * positionOffset;
        } else {
            _.swipeLeft = curLeft + (_.touchObject
                .swipeLength * (_.$list.height() / _.listWidth)) * positionOffset;
        }

        if (_.options.fade === true || _.options.touchMove === false) {
            return false;
        }

        if (_.animating === true) {
            _.swipeLeft = null;
            return false;
        }

        _.setCSS(_.swipeLeft);

    };

    Slick.prototype.swipeStart = function(event) {

        var _ = this,
            touches;

        if (_.touchObject.fingerCount !== 1 || _.slideCount <= _.options.slidesToShow) {
            _.touchObject = {};
            return false;
        }

        if (event.originalEvent !== undefined && event.originalEvent.touches !== undefined) {
            touches = event.originalEvent.touches[0];
        }

        _.touchObject.startX = _.touchObject.curX = touches !== undefined ? touches.pageX : event.clientX;
        _.touchObject.startY = _.touchObject.curY = touches !== undefined ? touches.pageY : event.clientY;

        _.dragging = true;

    };

    Slick.prototype.unfilterSlides = function() {

        var _ = this;

        if (_.$slidesCache !== null) {

            _.unload();

            _.$slideTrack.children(this.options.slide).remove();

            _.$slidesCache.appendTo(_.$slideTrack);

            _.reinit();

        }

    };

    Slick.prototype.unload = function() {

        var _ = this;

        $('.slick-cloned', _.$slider).remove();
        if (_.$dots) {
            _.$dots.remove();
        }
        if (_.$prevArrow) {
            _.$prevArrow.remove();
            _.$nextArrow.remove();
        }
        _.$slides.removeClass(
            'slick-slide slick-active slick-visible').removeAttr('style');

    };

    Slick.prototype.updateArrows = function() {

        var _ = this;

        if (_.options.arrows === true && _.options.infinite !==
            true && _.slideCount > _.options.slidesToShow) {
            _.$prevArrow.removeClass('slick-disabled');
            _.$nextArrow.removeClass('slick-disabled');
            if (_.currentSlide === 0) {
                _.$prevArrow.addClass('slick-disabled');
                _.$nextArrow.removeClass('slick-disabled');
            } else if (_.currentSlide >= _.slideCount - _.options.slidesToShow) {
                _.$nextArrow.addClass('slick-disabled');
                _.$prevArrow.removeClass('slick-disabled');
            }
        }

    };

    Slick.prototype.updateDots = function() {

        var _ = this;

        if (_.$dots !== null) {

            _.$dots.find('li').removeClass('slick-active');
            _.$dots.find('li').eq(Math.floor(_.currentSlide / _.options.slidesToScroll)).addClass('slick-active');

        }

    };

    $.fn.slick = function(options) {
        var _ = this;
        return _.each(function(index, element) {

            element.slick = new Slick(element, options);

        });
    };

    $.fn.slickAdd = function(slide, slideIndex, addBefore) {
        var _ = this;
        return _.each(function(index, element) {

            element.slick.addSlide(slide, slideIndex, addBefore);

        });
    };

    $.fn.slickCurrentSlide = function() {
        var _ = this;
        return _.get(0).slick.getCurrent();
    };

    $.fn.slickFilter = function(filter) {
        var _ = this;
        return _.each(function(index, element) {

            element.slick.filterSlides(filter);

        });
    };

    $.fn.slickGoTo = function(slide) {
        var _ = this;
        return _.each(function(index, element) {
            
            var asNavFor = element.slick.options.asNavFor != null ? $(element.slick.options.asNavFor) : null;
            if(asNavFor != null) asNavFor.slickGoTo(slide);
            element.slick.slideHandler(slide);

        });
    };

    $.fn.slickNext = function() {
        var _ = this;
        return _.each(function(index, element) {

            element.slick.changeSlide({
                data: {
                    message: 'next'
                }
            });

        });
    };

    $.fn.slickPause = function() {
        var _ = this;
        return _.each(function(index, element) {

            element.slick.autoPlayClear();
            element.slick.paused = true;

        });
    };

    $.fn.slickPlay = function() {
        var _ = this;
        return _.each(function(index, element) {

            element.slick.paused = false;
            element.slick.autoPlay();

        });
    };

    $.fn.slickPrev = function() {
        var _ = this;
        return _.each(function(index, element) {

            element.slick.changeSlide({
                data: {
                    message: 'previous'
                }
            });

        });
    };

    $.fn.slickRemove = function(slideIndex, removeBefore) {
        var _ = this;
        return _.each(function(index, element) {

            element.slick.removeSlide(slideIndex, removeBefore);

        });
    };

    $.fn.slickGetOption = function(option) {
        var _ = this;
        return _.get(0).slick.options[option];
    };

    $.fn.slickSetOption = function(option, value, refresh) {
        var _ = this;
        return _.each(function(index, element) {

            element.slick.options[option] = value;

            if (refresh === true) {
                element.slick.unload();
                element.slick.reinit();
            }

        });
    };

    $.fn.slickUnfilter = function() {
        var _ = this;
        return _.each(function(index, element) {

            element.slick.unfilterSlides();

        });
    };

    $.fn.unslick = function() {
        var _ = this;
        return _.each(function(index, element) {

          if (element.slick) {
            element.slick.destroy();
          }

        });
    };
    
    $.fn.getSlick = function() {
        var s = null;
        var _ = this;
        _.each(function(index, element) {
            s = element.slick
        });
        
        return s;
    };

}));

/*
 json2.js
 2014-02-04

 Public Domain.

 NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK.

 See http://www.JSON.org/js.html


 This code should be minified before deployment.
 See http://javascript.crockford.com/jsmin.html

 USE YOUR OWN COPY. IT IS EXTREMELY UNWISE TO LOAD CODE FROM SERVERS YOU DO
 NOT CONTROL.


 This file creates a global JSON object containing two methods: stringify
 and parse.

 JSON.stringify(value, replacer, space)
 value       any JavaScript value, usually an object or array.

 replacer    an optional parameter that determines how object
 values are stringified for objects. It can be a
 function or an array of strings.

 space       an optional parameter that specifies the indentation
 of nested structures. If it is omitted, the text will
 be packed without extra whitespace. If it is a number,
 it will specify the number of spaces to indent at each
 level. If it is a string (such as '\t' or '&nbsp;'),
 it contains the characters used to indent at each level.

 This method produces a JSON text from a JavaScript value.

 When an object value is found, if the object contains a toJSON
 method, its toJSON method will be called and the result will be
 stringified. A toJSON method does not serialize: it returns the
 value represented by the name/value pair that should be serialized,
 or undefined if nothing should be serialized. The toJSON method
 will be passed the key associated with the value, and this will be
 bound to the value

 For example, this would serialize Dates as ISO strings.

 Date.prototype.toJSON = function (key) {
 function f(n) {
 // Format integers to have at least two digits.
 return n < 10 ? '0' + n : n;
 }

 return this.getUTCFullYear()   + '-' +
 f(this.getUTCMonth() + 1) + '-' +
 f(this.getUTCDate())      + 'T' +
 f(this.getUTCHours())     + ':' +
 f(this.getUTCMinutes())   + ':' +
 f(this.getUTCSeconds())   + 'Z';
 };

 You can provide an optional replacer method. It will be passed the
 key and value of each member, with this bound to the containing
 object. The value that is returned from your method will be
 serialized. If your method returns undefined, then the member will
 be excluded from the serialization.

 If the replacer parameter is an array of strings, then it will be
 used to select the members to be serialized. It filters the results
 such that only members with keys listed in the replacer array are
 stringified.

 Values that do not have JSON representations, such as undefined or
 functions, will not be serialized. Such values in objects will be
 dropped; in arrays they will be replaced with null. You can use
 a replacer function to replace those with JSON values.
 JSON.stringify(undefined) returns undefined.

 The optional space parameter produces a stringification of the
 value that is filled with line breaks and indentation to make it
 easier to read.

 If the space parameter is a non-empty string, then that string will
 be used for indentation. If the space parameter is a number, then
 the indentation will be that many spaces.

 Example:

 text = JSON.stringify(['e', {pluribus: 'unum'}]);
 // text is '["e",{"pluribus":"unum"}]'


 text = JSON.stringify(['e', {pluribus: 'unum'}], null, '\t');
 // text is '[\n\t"e",\n\t{\n\t\t"pluribus": "unum"\n\t}\n]'

 text = JSON.stringify([new Date()], function (key, value) {
 return this[key] instanceof Date ?
 'Date(' + this[key] + ')' : value;
 });
 // text is '["Date(---current time---)"]'


 JSON.parse(text, reviver)
 This method parses a JSON text to produce an object or array.
 It can throw a SyntaxError exception.

 The optional reviver parameter is a function that can filter and
 transform the results. It receives each of the keys and values,
 and its return value is used instead of the original value.
 If it returns what it received, then the structure is not modified.
 If it returns undefined then the member is deleted.

 Example:

 // Parse the text. Values that look like ISO date strings will
 // be converted to Date objects.

 myData = JSON.parse(text, function (key, value) {
 var a;
 if (typeof value === 'string') {
 a =
 /^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2}(?:\.\d*)?)Z$/.exec(value);
 if (a) {
 return new Date(Date.UTC(+a[1], +a[2] - 1, +a[3], +a[4],
 +a[5], +a[6]));
 }
 }
 return value;
 });

 myData = JSON.parse('["Date(09/09/2001)"]', function (key, value) {
 var d;
 if (typeof value === 'string' &&
 value.slice(0, 5) === 'Date(' &&
 value.slice(-1) === ')') {
 d = new Date(value.slice(5, -1));
 if (d) {
 return d;
 }
 }
 return value;
 });


 This is a reference implementation. You are free to copy, modify, or
 redistribute.
 */

/*jslint evil: true, regexp: true */

/*members "", "\b", "\t", "\n", "\f", "\r", "\"", JSON, "\\", apply,
 call, charCodeAt, getUTCDate, getUTCFullYear, getUTCHours,
 getUTCMinutes, getUTCMonth, getUTCSeconds, hasOwnProperty, join,
 lastIndex, length, parse, prototype, push, replace, slice, stringify,
 test, toJSON, toString, valueOf
 */


// Create a JSON object only if one does not already exist. We create the
// methods in a closure to avoid creating global variables.

if (typeof JSON !== 'object') {
	JSON = {};
}

(function () {
	'use strict';

	function f(n) {
		// Format integers to have at least two digits.
		return n < 10 ? '0' + n : n;
	}

	if (typeof Date.prototype.toJSON !== 'function') {

		Date.prototype.toJSON = function () {

			return isFinite(this.valueOf())
				? this.getUTCFullYear()     + '-' +
				f(this.getUTCMonth() + 1) + '-' +
				f(this.getUTCDate())      + 'T' +
				f(this.getUTCHours())     + ':' +
				f(this.getUTCMinutes())   + ':' +
				f(this.getUTCSeconds())   + 'Z'
				: null;
		};

		String.prototype.toJSON      =
			Number.prototype.toJSON  =
				Boolean.prototype.toJSON = function () {
					return this.valueOf();
				};
	}

	var cx,
		escapable,
		gap,
		indent,
		meta,
		rep;


	function quote(string) {

// If the string contains no control characters, no quote characters, and no
// backslash characters, then we can safely slap some quotes around it.
// Otherwise we must also replace the offending characters with safe escape
// sequences.

		escapable.lastIndex = 0;
		return escapable.test(string) ? '"' + string.replace(escapable, function (a) {
			var c = meta[a];
			return typeof c === 'string'
				? c
				: '\\u' + ('0000' + a.charCodeAt(0).toString(16)).slice(-4);
		}) + '"' : '"' + string + '"';
	}


	function str(key, holder) {

// Produce a string from holder[key].

		var i,          // The loop counter.
			k,          // The member key.
			v,          // The member value.
			length,
			mind = gap,
			partial,
			value = holder[key];

// If the value has a toJSON method, call it to obtain a replacement value.

		if (value && typeof value === 'object' &&
			typeof value.toJSON === 'function') {
			value = value.toJSON(key);
		}

// If we were called with a replacer function, then call the replacer to
// obtain a replacement value.

		if (typeof rep === 'function') {
			value = rep.call(holder, key, value);
		}

// What happens next depends on the value's type.

		switch (typeof value) {
			case 'string':
				return quote(value);

			case 'number':

// JSON numbers must be finite. Encode non-finite numbers as null.

				return isFinite(value) ? String(value) : 'null';

			case 'boolean':
			case 'null':

// If the value is a boolean or null, convert it to a string. Note:
// typeof null does not produce 'null'. The case is included here in
// the remote chance that this gets fixed someday.

				return String(value);

// If the type is 'object', we might be dealing with an object or an array or
// null.

			case 'object':

// Due to a specification blunder in ECMAScript, typeof null is 'object',
// so watch out for that case.

				if (!value) {
					return 'null';
				}

// Make an array to hold the partial results of stringifying this object value.

				gap += indent;
				partial = [];

// Is the value an array?

				if (Object.prototype.toString.apply(value) === '[object Array]') {

// The value is an array. Stringify every element. Use null as a placeholder
// for non-JSON values.

					length = value.length;
					for (i = 0; i < length; i += 1) {
						partial[i] = str(i, value) || 'null';
					}

// Join all of the elements together, separated with commas, and wrap them in
// brackets.

					v = partial.length === 0
						? '[]'
						: gap
						? '[\n' + gap + partial.join(',\n' + gap) + '\n' + mind + ']'
						: '[' + partial.join(',') + ']';
					gap = mind;
					return v;
				}

// If the replacer is an array, use it to select the members to be stringified.

				if (rep && typeof rep === 'object') {
					length = rep.length;
					for (i = 0; i < length; i += 1) {
						if (typeof rep[i] === 'string') {
							k = rep[i];
							v = str(k, value);
							if (v) {
								partial.push(quote(k) + (gap ? ': ' : ':') + v);
							}
						}
					}
				} else {

// Otherwise, iterate through all of the keys in the object.

					for (k in value) {
						if (Object.prototype.hasOwnProperty.call(value, k)) {
							v = str(k, value);
							if (v) {
								partial.push(quote(k) + (gap ? ': ' : ':') + v);
							}
						}
					}
				}

// Join all of the member texts together, separated with commas,
// and wrap them in braces.

				v = partial.length === 0
					? '{}'
					: gap
					? '{\n' + gap + partial.join(',\n' + gap) + '\n' + mind + '}'
					: '{' + partial.join(',') + '}';
				gap = mind;
				return v;
		}
	}

// If the JSON object does not yet have a stringify method, give it one.

	if (typeof JSON.stringify !== 'function') {
		escapable = /[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g;
		meta = {    // table of character substitutions
			'\b': '\\b',
			'\t': '\\t',
			'\n': '\\n',
			'\f': '\\f',
			'\r': '\\r',
			'"' : '\\"',
			'\\': '\\\\'
		};
		JSON.stringify = function (value, replacer, space) {

// The stringify method takes a value and an optional replacer, and an optional
// space parameter, and returns a JSON text. The replacer can be a function
// that can replace values, or an array of strings that will select the keys.
// A default replacer method can be provided. Use of the space parameter can
// produce text that is more easily readable.

			var i;
			gap = '';
			indent = '';

// If the space parameter is a number, make an indent string containing that
// many spaces.

			if (typeof space === 'number') {
				for (i = 0; i < space; i += 1) {
					indent += ' ';
				}

// If the space parameter is a string, it will be used as the indent string.

			} else if (typeof space === 'string') {
				indent = space;
			}

// If there is a replacer, it must be a function or an array.
// Otherwise, throw an error.

			rep = replacer;
			if (replacer && typeof replacer !== 'function' &&
				(typeof replacer !== 'object' ||
					typeof replacer.length !== 'number')) {
				throw new Error('JSON.stringify');
			}

// Make a fake root object containing our value under the key of ''.
// Return the result of stringifying the value.

			return str('', {'': value});
		};
	}


// If the JSON object does not yet have a parse method, give it one.

	if (typeof JSON.parse !== 'function') {
		cx = /[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g;
		JSON.parse = function (text, reviver) {

// The parse method takes a text and an optional reviver function, and returns
// a JavaScript value if the text is a valid JSON text.

			var j;

			function walk(holder, key) {

// The walk method is used to recursively walk the resulting structure so
// that modifications can be made.

				var k, v, value = holder[key];
				if (value && typeof value === 'object') {
					for (k in value) {
						if (Object.prototype.hasOwnProperty.call(value, k)) {
							v = walk(value, k);
							if (v !== undefined) {
								value[k] = v;
							} else {
								delete value[k];
							}
						}
					}
				}
				return reviver.call(holder, key, value);
			}


// Parsing happens in four stages. In the first stage, we replace certain
// Unicode characters with escape sequences. JavaScript handles many characters
// incorrectly, either silently deleting them, or treating them as line endings.

			text = String(text);
			cx.lastIndex = 0;
			if (cx.test(text)) {
				text = text.replace(cx, function (a) {
					return '\\u' +
						('0000' + a.charCodeAt(0).toString(16)).slice(-4);
				});
			}

// In the second stage, we run the text against regular expressions that look
// for non-JSON patterns. We are especially concerned with '()' and 'new'
// because they can cause invocation, and '=' because it can cause mutation.
// But just to be safe, we want to reject all unexpected forms.

// We split the second stage into 4 regexp operations in order to work around
// crippling inefficiencies in IE's and Safari's regexp engines. First we
// replace the JSON backslash pairs with '@' (a non-JSON character). Second, we
// replace all simple value tokens with ']' characters. Third, we delete all
// open brackets that follow a colon or comma or that begin the text. Finally,
// we look to see that the remaining characters are only whitespace or ']' or
// ',' or ':' or '{' or '}'. If that is so, then the text is safe for eval.

			if (/^[\],:{}\s]*$/
				.test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g, '@')
					.replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g, ']')
					.replace(/(?:^|:|,)(?:\s*\[)+/g, ''))) {

// In the third stage we use the eval function to compile the text into a
// JavaScript structure. The '{' operator is subject to a syntactic ambiguity
// in JavaScript: it can begin a block or an object literal. We wrap the text
// in parens to eliminate the ambiguity.

				j = eval('(' + text + ')');

// In the optional fourth stage, we recursively walk the new structure, passing
// each name/value pair to a reviver function for possible transformation.

				return typeof reviver === 'function'
					? walk({'': j}, '')
					: j;
			}

// If the text is not JSON parseable, then a SyntaxError is thrown.

			throw new SyntaxError('JSON.parse');
		};
	}
}());
/*!
 * jQuery Cookie Plugin v1.4.1
 * https://github.com/carhartl/jquery-cookie
 *
 * Copyright 2013 Klaus Hartl
 * Released under the MIT license
 */
(function (factory) {
	if (typeof define === 'function' && define.amd) {
		// AMD
		define(['jquery'], factory);
	} else if (typeof exports === 'object') {
		// CommonJS
		factory(require('jquery'));
	} else {
		// Browser globals
		factory(jQuery);
	}
}(function ($) {

	var pluses = /\+/g;

	function encode(s) {
		return config.raw ? s : encodeURIComponent(s);
	}

	function decode(s) {
		return config.raw ? s : decodeURIComponent(s);
	}

	function stringifyCookieValue(value) {
		return encode(config.json ? JSON.stringify(value) : String(value));
	}

	function parseCookieValue(s) {
		if (s.indexOf('"') === 0) {
			// This is a quoted cookie as according to RFC2068, unescape...
			s = s.slice(1, -1).replace(/\\"/g, '"').replace(/\\\\/g, '\\');
		}

		try {
			// Replace server-side written pluses with spaces.
			// If we can't decode the cookie, ignore it, it's unusable.
			// If we can't parse the cookie, ignore it, it's unusable.
			s = decodeURIComponent(s.replace(pluses, ' '));
			return config.json ? JSON.parse(s) : s;
		} catch(e) {}
	}

	function read(s, converter) {
		var value = config.raw ? s : parseCookieValue(s);
		return $.isFunction(converter) ? converter(value) : value;
	}

	var config = $.cookie = function (key, value, options) {

		// Write

		if (value !== undefined && !$.isFunction(value)) {
			options = $.extend({}, config.defaults, options);

			if (typeof options.expires === 'number') {
				var days = options.expires, t = options.expires = new Date();
				t.setTime(+t + days * 864e+5);
			}

			return (document.cookie = [
				encode(key), '=', stringifyCookieValue(value),
				options.expires ? '; expires=' + options.expires.toUTCString() : '', // use expires attribute, max-age is not supported by IE
				options.path    ? '; path=' + options.path : '',
				options.domain  ? '; domain=' + options.domain : '',
				options.secure  ? '; secure' : ''
			].join(''));
		}

		// Read

		var result = key ? undefined : {};

		// To prevent the for loop in the first place assign an empty array
		// in case there are no cookies at all. Also prevents odd result when
		// calling $.cookie().
		var cookies = document.cookie ? document.cookie.split('; ') : [];

		for (var i = 0, l = cookies.length; i < l; i++) {
			var parts = cookies[i].split('=');
			var name = decode(parts.shift());
			var cookie = parts.join('=');

			if (key && key === name) {
				// If second argument (value) is a function it's a converter...
				result = read(cookie, value);
				break;
			}

			// Prevent storing a cookie that we couldn't decode.
			if (!key && (cookie = read(cookie)) !== undefined) {
				result[name] = cookie;
			}
		}

		return result;
	};

	config.defaults = {};

	$.removeCookie = function (key, options) {
		if ($.cookie(key) === undefined) {
			return false;
		}

		// Must not alter options, thus extending a fresh object...
		$.cookie(key, '', $.extend({}, options, { expires: -1 }));
		return !$.cookie(key);
	};

}));
/**
 * jquery.matchHeight-min.js v0.5.2
 * http://brm.io/jquery-match-height/
 * License: MIT
 */
(function(b){b.fn.matchHeight=function(a){if("remove"===a){var d=this;this.css("height","");b.each(b.fn.matchHeight._groups,function(b,a){a.elements=a.elements.not(d)});return this}if(1>=this.length)return this;a="undefined"!==typeof a?a:!0;b.fn.matchHeight._groups.push({elements:this,byRow:a});b.fn.matchHeight._apply(this,a);return this};b.fn.matchHeight._apply=function(a,d){var c=b(a),f=[c],e=b(window).scrollTop(),h=b("html").outerHeight(!0);d&&(c.each(function(){var a=b(this),c="inline-block"===
	a.css("display")?"inline-block":"block";a.css({display:c,"padding-top":"0","padding-bottom":"0","border-top-width":"0","border-bottom-width":"0",height:"100px"})}),f=m(c),c.css({display:"","padding-top":"","padding-bottom":"","border-top-width":"","border-bottom-width":"",height:""}));b.each(f,function(a,c){var d=b(c),f=0,e=d.parents().add(d).filter(":hidden");e.css({display:"block"});d.each(function(){var a=b(this),c="inline-block"===a.css("display")?"inline-block":"block";a.css({display:c,height:""});
	a.outerHeight(!1)>f&&(f=a.outerHeight(!1));a.css({display:""})});e.css({display:""});d.each(function(){var a=b(this),c=0;"border-box"!==a.css("box-sizing")&&(c+=g(a.css("border-top-width"))+g(a.css("border-bottom-width")),c+=g(a.css("padding-top"))+g(a.css("padding-bottom")));a.css("height",f-c)})});b.fn.matchHeight._maintainScroll&&b(window).scrollTop(e/h*b("html").outerHeight(!0));return this};b.fn.matchHeight._applyDataApi=function(){var a={};b("[data-match-height], [data-mh]").each(function(){var d=
	b(this),c=d.attr("data-match-height")||d.attr("data-mh");a[c]=c in a?a[c].add(d):d});b.each(a,function(){this.matchHeight(!0)})};b.fn.matchHeight._groups=[];b.fn.matchHeight._throttle=80;b.fn.matchHeight._maintainScroll=!1;var l=-1,k=-1;b.fn.matchHeight._update=function(a){if(a&&"resize"===a.type){a=b(window).width();if(a===l)return;l=a}-1===k&&(k=setTimeout(function(){b.each(b.fn.matchHeight._groups,function(){b.fn.matchHeight._apply(this.elements,this.byRow)});k=-1},b.fn.matchHeight._throttle))};
	b(b.fn.matchHeight._applyDataApi);b(window).bind("load resize orientationchange",b.fn.matchHeight._update);var m=function(a){var d=null,c=[];b(a).each(function(){var a=b(this),e=a.offset().top-g(a.css("margin-top")),h=0<c.length?c[c.length-1]:null;null===h?c.push(a):1>=Math.floor(Math.abs(d-e))?c[c.length-1]=h.add(a):c.push(a);d=e});return c},g=function(a){return parseFloat(a)||0}})(jQuery);
/*! jQuery Mobile v1.4.5 | Copyright 2010, 2014 jQuery Foundation, Inc. | jquery.org/license */

(function(e,t,n){typeof define=="function"&&define.amd?define(["jquery"],function(r){return n(r,e,t),r.mobile}):n(e.jQuery,e,t)})(this,document,function(e,t,n,r){(function(e,t,n,r){function T(e){while(e&&typeof e.originalEvent!="undefined")e=e.originalEvent;return e}function N(t,n){var i=t.type,s,o,a,l,c,h,p,d,v;t=e.Event(t),t.type=n,s=t.originalEvent,o=e.event.props,i.search(/^(mouse|click)/)>-1&&(o=f);if(s)for(p=o.length,l;p;)l=o[--p],t[l]=s[l];i.search(/mouse(down|up)|click/)>-1&&!t.which&&(t.which=1);if(i.search(/^touch/)!==-1){a=T(s),i=a.touches,c=a.changedTouches,h=i&&i.length?i[0]:c&&c.length?c[0]:r;if(h)for(d=0,v=u.length;d<v;d++)l=u[d],t[l]=h[l]}return t}function C(t){var n={},r,s;while(t){r=e.data(t,i);for(s in r)r[s]&&(n[s]=n.hasVirtualBinding=!0);t=t.parentNode}return n}function k(t,n){var r;while(t){r=e.data(t,i);if(r&&(!n||r[n]))return t;t=t.parentNode}return null}function L(){g=!1}function A(){g=!0}function O(){E=0,v.length=0,m=!1,A()}function M(){L()}function _(){D(),c=setTimeout(function(){c=0,O()},e.vmouse.resetTimerDuration)}function D(){c&&(clearTimeout(c),c=0)}function P(t,n,r){var i;if(r&&r[t]||!r&&k(n.target,t))i=N(n,t),e(n.target).trigger(i);return i}function H(t){var n=e.data(t.target,s),r;!m&&(!E||E!==n)&&(r=P("v"+t.type,t),r&&(r.isDefaultPrevented()&&t.preventDefault(),r.isPropagationStopped()&&t.stopPropagation(),r.isImmediatePropagationStopped()&&t.stopImmediatePropagation()))}function B(t){var n=T(t).touches,r,i,o;n&&n.length===1&&(r=t.target,i=C(r),i.hasVirtualBinding&&(E=w++,e.data(r,s,E),D(),M(),d=!1,o=T(t).touches[0],h=o.pageX,p=o.pageY,P("vmouseover",t,i),P("vmousedown",t,i)))}function j(e){if(g)return;d||P("vmousecancel",e,C(e.target)),d=!0,_()}function F(t){if(g)return;var n=T(t).touches[0],r=d,i=e.vmouse.moveDistanceThreshold,s=C(t.target);d=d||Math.abs(n.pageX-h)>i||Math.abs(n.pageY-p)>i,d&&!r&&P("vmousecancel",t,s),P("vmousemove",t,s),_()}function I(e){if(g)return;A();var t=C(e.target),n,r;P("vmouseup",e,t),d||(n=P("vclick",e,t),n&&n.isDefaultPrevented()&&(r=T(e).changedTouches[0],v.push({touchID:E,x:r.clientX,y:r.clientY}),m=!0)),P("vmouseout",e,t),d=!1,_()}function q(t){var n=e.data(t,i),r;if(n)for(r in n)if(n[r])return!0;return!1}function R(){}function U(t){var n=t.substr(1);return{setup:function(){q(this)||e.data(this,i,{});var r=e.data(this,i);r[t]=!0,l[t]=(l[t]||0)+1,l[t]===1&&b.bind(n,H),e(this).bind(n,R),y&&(l.touchstart=(l.touchstart||0)+1,l.touchstart===1&&b.bind("touchstart",B).bind("touchend",I).bind("touchmove",F).bind("scroll",j))},teardown:function(){--l[t],l[t]||b.unbind(n,H),y&&(--l.touchstart,l.touchstart||b.unbind("touchstart",B).unbind("touchmove",F).unbind("touchend",I).unbind("scroll",j));var r=e(this),s=e.data(this,i);s&&(s[t]=!1),r.unbind(n,R),q(this)||r.removeData(i)}}}var i="virtualMouseBindings",s="virtualTouchID",o="vmouseover vmousedown vmousemove vmouseup vclick vmouseout vmousecancel".split(" "),u="clientX clientY pageX pageY screenX screenY".split(" "),a=e.event.mouseHooks?e.event.mouseHooks.props:[],f=e.event.props.concat(a),l={},c=0,h=0,p=0,d=!1,v=[],m=!1,g=!1,y="addEventListener"in n,b=e(n),w=1,E=0,S,x;e.vmouse={moveDistanceThreshold:10,clickDistanceThreshold:10,resetTimerDuration:1500};for(x=0;x<o.length;x++)e.event.special[o[x]]=U(o[x]);y&&n.addEventListener("click",function(t){var n=v.length,r=t.target,i,o,u,a,f,l;if(n){i=t.clientX,o=t.clientY,S=e.vmouse.clickDistanceThreshold,u=r;while(u){for(a=0;a<n;a++){f=v[a],l=0;if(u===r&&Math.abs(f.x-i)<S&&Math.abs(f.y-o)<S||e.data(u,s)===f.touchID){t.preventDefault(),t.stopPropagation();return}}u=u.parentNode}}},!0)})(e,t,n),function(e){e.mobile={}}(e),function(e,t){var r={touch:"ontouchend"in n};e.mobile.support=e.mobile.support||{},e.extend(e.support,r),e.extend(e.mobile.support,r)}(e),function(e,t,r){function l(t,n,i,s){var o=i.type;i.type=n,s?e.event.trigger(i,r,t):e.event.dispatch.call(t,i),i.type=o}var i=e(n),s=e.mobile.support.touch,o="touchmove scroll",u=s?"touchstart":"mousedown",a=s?"touchend":"mouseup",f=s?"touchmove":"mousemove";e.each("touchstart touchmove touchend tap taphold swipe swipeleft swiperight scrollstart scrollstop".split(" "),function(t,n){e.fn[n]=function(e){return e?this.bind(n,e):this.trigger(n)},e.attrFn&&(e.attrFn[n]=!0)}),e.event.special.scrollstart={enabled:!0,setup:function(){function s(e,n){r=n,l(t,r?"scrollstart":"scrollstop",e)}var t=this,n=e(t),r,i;n.bind(o,function(t){if(!e.event.special.scrollstart.enabled)return;r||s(t,!0),clearTimeout(i),i=setTimeout(function(){s(t,!1)},50)})},teardown:function(){e(this).unbind(o)}},e.event.special.tap={tapholdThreshold:750,emitTapOnTaphold:!0,setup:function(){var t=this,n=e(t),r=!1;n.bind("vmousedown",function(s){function a(){clearTimeout(u)}function f(){a(),n.unbind("vclick",c).unbind("vmouseup",a),i.unbind("vmousecancel",f)}function c(e){f(),!r&&o===e.target?l(t,"tap",e):r&&e.preventDefault()}r=!1;if(s.which&&s.which!==1)return!1;var o=s.target,u;n.bind("vmouseup",a).bind("vclick",c),i.bind("vmousecancel",f),u=setTimeout(function(){e.event.special.tap.emitTapOnTaphold||(r=!0),l(t,"taphold",e.Event("taphold",{target:o}))},e.event.special.tap.tapholdThreshold)})},teardown:function(){e(this).unbind("vmousedown").unbind("vclick").unbind("vmouseup"),i.unbind("vmousecancel")}},e.event.special.swipe={scrollSupressionThreshold:30,durationThreshold:1e3,horizontalDistanceThreshold:30,verticalDistanceThreshold:30,getLocation:function(e){var n=t.pageXOffset,r=t.pageYOffset,i=e.clientX,s=e.clientY;if(e.pageY===0&&Math.floor(s)>Math.floor(e.pageY)||e.pageX===0&&Math.floor(i)>Math.floor(e.pageX))i-=n,s-=r;else if(s<e.pageY-r||i<e.pageX-n)i=e.pageX-n,s=e.pageY-r;return{x:i,y:s}},start:function(t){var n=t.originalEvent.touches?t.originalEvent.touches[0]:t,r=e.event.special.swipe.getLocation(n);return{time:(new Date).getTime(),coords:[r.x,r.y],origin:e(t.target)}},stop:function(t){var n=t.originalEvent.touches?t.originalEvent.touches[0]:t,r=e.event.special.swipe.getLocation(n);return{time:(new Date).getTime(),coords:[r.x,r.y]}},handleSwipe:function(t,n,r,i){if(n.time-t.time<e.event.special.swipe.durationThreshold&&Math.abs(t.coords[0]-n.coords[0])>e.event.special.swipe.horizontalDistanceThreshold&&Math.abs(t.coords[1]-n.coords[1])<e.event.special.swipe.verticalDistanceThreshold){var s=t.coords[0]>n.coords[0]?"swipeleft":"swiperight";return l(r,"swipe",e.Event("swipe",{target:i,swipestart:t,swipestop:n}),!0),l(r,s,e.Event(s,{target:i,swipestart:t,swipestop:n}),!0),!0}return!1},eventInProgress:!1,setup:function(){var t,n=this,r=e(n),s={};t=e.data(this,"mobile-events"),t||(t={length:0},e.data(this,"mobile-events",t)),t.length++,t.swipe=s,s.start=function(t){if(e.event.special.swipe.eventInProgress)return;e.event.special.swipe.eventInProgress=!0;var r,o=e.event.special.swipe.start(t),u=t.target,l=!1;s.move=function(t){if(!o||t.isDefaultPrevented())return;r=e.event.special.swipe.stop(t),l||(l=e.event.special.swipe.handleSwipe(o,r,n,u),l&&(e.event.special.swipe.eventInProgress=!1)),Math.abs(o.coords[0]-r.coords[0])>e.event.special.swipe.scrollSupressionThreshold&&t.preventDefault()},s.stop=function(){l=!0,e.event.special.swipe.eventInProgress=!1,i.off(f,s.move),s.move=null},i.on(f,s.move).one(a,s.stop)},r.on(u,s.start)},teardown:function(){var t,n;t=e.data(this,"mobile-events"),t&&(n=t.swipe,delete t.swipe,t.length--,t.length===0&&e.removeData(this,"mobile-events")),n&&(n.start&&e(this).off(u,n.start),n.move&&i.off(f,n.move),n.stop&&i.off(a,n.stop))}},e.each({scrollstop:"scrollstart",taphold:"tap",swipeleft:"swipe.left",swiperight:"swipe.right"},function(t,n){e.event.special[t]={setup:function(){e(this).bind(n,e.noop)},teardown:function(){e(this).unbind(n)}}})}(e,this)});
/**
 * document.ready()
 */

$(document).ready(function(){

// Menu
	$('#mnav').menufication({
		hideDefaultMenu: true,
		triggerWidth: 768,
		addHomeLink: true,
		addHomeText: 'Startseite',
		theme: 'dark',
		direction: 'left',
		headerLogo: '/typo3conf/ext/of_design/Resources/Public/Media/logo_inv.png'
	});


	// alert($('body').outerWidth());


	$('.fullscreenbanner').revolution({

			onHoverStop:"on",						// Stop Banner Timet at Hover on Slide on/off

			thumbWidth:150,							// Thumb With and Height and Amount (only if navigation Type set to thumb !)
			thumbHeight:75,
			thumbAmount:5,

			hideThumbs:0,
			navigationType:"thumb",				// bullet, thumb, none
			navigationArrows:"solo",				// nexttobullets, solo (old name verticalcentered), none

			navigationStyle:"square",				// round,square,navbar,round-old,square-old,navbar-old, or any from the list in the docu (choose between 50+ different item), custom

			navigationHAlign:"center",				// Vertical Align top,center,bottom
			navigationVAlign:"bottom",					// Horizontal Align left,center,right
			navigationHOffset:30,
			navigationVOffset:30,

			soloArrowLeftHalign:"left",
			soloArrowLeftValign:"center",
			soloArrowLeftHOffset:20,
			soloArrowLeftVOffset:0,

			soloArrowRightHalign:"right",
			soloArrowRightValign:"center",
			soloArrowRightHOffset:20,
			soloArrowRightVOffset:0,

			touchenabled:"on",						// Enable Swipe Function : on/off


			stopAtSlide:-1,							// Stop Timer if Slide "x" has been Reached. If stopAfterLoops set to 0, then it stops already in the first Loop at slide X which defined. -1 means do not stop at any slide. stopAfterLoops has no sinn in this case.
			stopAfterLoops:-1,						// Stop Timer if All slides has been played "x" times. IT will stop at THe slide which is defined via stopAtSlide:x, if set to -1 slide never stop automatic

			hideCaptionAtLimit:0,					// It Defines if a caption should be shown under a Screen Resolution ( Basod on The Width of Browser)
			hideAllCaptionAtLilmit:0,				// Hide all The Captions if Width of Browser is less then this value
			hideSliderAtLimit:0,					// Hide the whole slider, and stop also functions if Width of Browser is less than this value


			fullWidth:"on",							// Same time only Enable FullScreen of FullWidth !!
			fullScreen:"on",						// Same time only Enable FullScreen of FullWidth !!
			fullScreenOffsetContainer:"#topheader-to-offset",		// The Height of Fullheight will be increased with this Container height !

			shadow:0								//0 = no Shadow, 1,2,3 = 3 Different Art of Shadows -  (No Shadow in Fullwidth Version !)
		});




	var productRevolution = $('.productbanner').revolution({
			delay:9000,
			startheight:328,
			startwidth:1170,

			navigationType:"none",				// bullet, thumb, none
			navigationArrows:"solo",				// nexttobullets, solo (old name verticalcentered), none

			navigationStyle:"navbar",				// round,square,navbar,round-old,square-old,navbar-old, or any from the list in the docu (choose between 50+ different item), custom

			navigationHAlign:"center",				// Vertical Align top,center,bottom
			navigationVAlign:"bottom",					// Horizontal Align left,center,right

			soloArrowLeftHalign:"left",
			soloArrowLeftValign:"center",

			soloArrowRightHalign:"right",
			soloArrowRightValign:"center",

			touchenabled:"on",						// Enable Swipe Function : on/off
			onHoverStop:"on",						// Stop Banner Timet at Hover on Slide on/off

			stopAtSlide:1,							// Stop Timer if Slide "x" has been Reached. If stopAfterLoops set to 0, then it stops already in the first Loop at slide X which defined. -1 means do not stop at any slide. stopAfterLoops has no sinn in this case.
			stopAfterLoops:-1,						// Stop Timer if All slides has been played "x" times. IT will stop at THe slide which is defined via stopAtSlide:x, if set to -1 slide never stop automatic

			hideCaptionAtLimit:0,					// It Defines if a caption should be shown under a Screen Resolution ( Basod on The Width of Browser)
			hideAllCaptionAtLilmit:0,				// Hide all The Captions if Width of Browser is less then this value
			hideSliderAtLimit:0,					// Hide the whole slider, and stop also functions if Width of Browser is less than this value

			shadow:0,								//0 = no Shadow, 1,2,3 = 3 Different Art of Shadows  (No Shadow in Fullwidth Version !)
			fullWidth:"off"							// Turns On or Off the Fullwidth Image Centering in FullWidth Modus

		});

	/**
	 * slickslider for compare of_wineo
	 */
	$('.compare').slick({
		infinite: false,
		dots:false,
		speed: 300,
		slidesToShow: 3,
		slidesToScroll: 1,
		swipe:true,
		touch:true,
		touchMove: true,
		responsive: [
			{
				breakpoint: 1200,
				settings: {
					slidesToShow: 3,
					slidesToScroll: 3,
					infinite: true,
					dots: false
				}
			},
			{
				breakpoint: 970,
				settings: {
					slidesToShow: 2,
					slidesToScroll: 1
				}
			},
			{
				breakpoint: 600,
				settings: {
					slidesToShow: 1,
					slidesToScroll: 1
				}
			}
		]
	});

	/**
	 *
	 */
	var merklisteButton = $('#merklisteButton');
	merklisteButton.on('initialize.of.changeMerklistButton',function(e){
		var that = $(this),
			dekors = $.parseJSON($.cookie('compareList')) || [], // eg [1,3,56,6,8,90]
			dekorsLength = parseInt(dekors.length);

		if(dekorsLength <= 0){
			$('#noDekor').addClass('show');
		}else{
			that.addClass('show');
		}

		$.each(dekors,function(index, value){
			var dekorDiv = $('div#duid'+value);
			dekorDiv.find('a.dekorAdded').addClass('show');
			dekorDiv.find('a.add').removeClass('show');
			$('#dekorInfo'+value).addClass('show');
		});

		that.find('span').text(dekorsLength);
	}).trigger('initialize.of.changeMerklistButton');


	/**
	 * adds an dekor to the compare-cookie
	 */
	$('a.add').on('click.of.addDekorToCompare',function(e){
		var that = $(this),
			dekor = parseInt(that.data('dekor')),
			dekors = $.parseJSON($.cookie('compareList')) || [], // eg [1,3,56,6,8,90]
			dekorInDekors = $.inArray(dekor, dekors),
			dekorDiv = $('div#'+dekor);

		e.preventDefault();

		dekorDiv.find('a.dekorAdded').addClass('show');
		dekorDiv.find('a.add').removeClass('show');
		$('#dekorInfo'+dekor).addClass('show');

		if(!~dekorInDekors){
			dekors.push(dekor);
			$.cookie('compareList',JSON.stringify(dekors),{expires: 365, path: '/'});
			merklisteButton.trigger('initialize.of.changeMerklistButton');
		}
	});


	/**
	 * remove a dekor from compare-cookie // compare-view
	 */
	$(document).on('click.of.removeDekorFromCompare','a.remove',function(e){
		var that = $(this),
			trigger = $(e.target),
			compareList = $('#comparelist'),
			dekor = parseInt(trigger.data('dekor')),
			dekors = $.parseJSON($.cookie('compareList')), // eg [1,3,56,6,8,90]
			dekorInDekors = $.inArray(dekor, dekors),
			activeDekor = $('.slick-slide').index(trigger.closest('.slick-slide'));

		e.preventDefault();
		$('.compare').slickRemove(activeDekor);


		if(~dekorInDekors){
			dekors.splice(dekorInDekors, 1);
			$.cookie('compareList',JSON.stringify(dekors),{expires: 365, path: '/'});
			merklisteButton.trigger('initialize.of.changeMerklistButton');
		}
	});


	// bind to button click
	$("img.dekor").on('click', function (e){
		e.preventDefault();
		var id = $(e.currentTarget).data('id');
		productRevolution.revshowslide(id);
	});

	$(".swipebox").swipebox();

	/**
	 * Retailer search
	 */
	$('.tx-ofretailersearch-pi1').of_retailerSearch();


	/**
	 * Reference Extend
	 */
	// $('.contentSP').of_referenceExtend();

	/**
	 * Solr Results
	 */
	$('.facetbox').find('.active').find('.facet-option').find('a').on('click',function(e){
		e.preventDefault();
	});

	/*
	if($('.facet-wrap.collapse').length <= 1 && !$('.facet-wrap.collapse').hasClass('in')){
		$('.facet-wrap.collapse').collapse('show');
	}
	*/

	$('.facet-wrap.collapse').eq(0).not('.in').collapse('show');

	$('.facet-wrap.collapse').each(function(i){
		if($(this).hasClass('in')){
			$(this).prev('.nav-header').prepend('<i class="chevron icon-chevron-sign-down"></i>&nbsp;');
		}
		else {
			$(this).prev('.nav-header').prepend('<i class="chevron icon-chevron-sign-right"></i>&nbsp;');
		}
	}).on('show',function(e){
		$(this).prev('.nav-header').find('i.chevron').attr('class','chevron icon-chevron-sign-down');
	}).on('hide',function(e){
		$(this).prev('.nav-header').find('i.chevron').attr('class','chevron icon-chevron-sign-right');
	});

	/**
	 *  Solr Search
	 */
	$('input.solr-suggest').typeahead({
		name: 'suggest',
		limit: 10,
		remote: {
			url: '?eID=autosuggest&q=%QUERY'/*,
			filter: function(data){

				$.each(data,function(key,value){

					value.value = value.value.replace('<strong>','').replace('</strong>','').replace(value.q,'<strong>' + value.q + '</strong>');

					data[key] = value;
				});

				return data;
			}*/
		}
	}).on('typeahead:selected',function(e,data){

		$('input.solr-suggest').parents('form').trigger('submit');
	});

	// Accordeon arrows
	$('#collapseOne').on('shown', function () {
		$('#collapseOne').parents('.accordion-group').find(".icon-chevron-down").removeClass("icon-chevron-down").addClass("icon-chevron-up");
	});

	$('#collapseOne').on('hidden', function () {
		$('#collapseOne').parents('.accordion-group').find(".icon-chevron-up").removeClass("icon-chevron-up").addClass("icon-chevron-down");
	});

	$('#collapseTwo').on('shown', function () {
		$('#collapseTwo').parents('.accordion-group').find(".icon-chevron-down").removeClass("icon-chevron-down").addClass("icon-chevron-up");
	});

	$('#collapseTwo').on('hidden', function () {
		$('#collapseTwo').parents('.accordion-group').find(".icon-chevron-up").removeClass("icon-chevron-up").addClass("icon-chevron-down");
	});

	$('#collapseTwohalf').on('shown', function () {
		$('#collapseTwohalf').parents('.accordion-group').find(".icon-chevron-down").removeClass("icon-chevron-down").addClass("icon-chevron-up");
	});

	$('#collapseTwohalf').on('hidden', function () {
		$('#collapseTwohalf').parents('.accordion-group').find(".icon-chevron-up").removeClass("icon-chevron-up").addClass("icon-chevron-down");
	});

	$('#collapseThree').on('shown', function () {
		$('#collapseThree').parents('.accordion-group').find(".icon-chevron-down").removeClass("icon-chevron-down").addClass("icon-chevron-up");
	});

	$('#collapseThree').on('hidden', function () {
		$('#collapseThree').parents('.accordion-group').find(".icon-chevron-up").removeClass("icon-chevron-up").addClass("icon-chevron-down");
	});

	//dropown
	$('.dropdown-toggle').dropdown();

	// Tooltip Contagged
	$('dfn,.tip').tooltip({
		container:'body'
	});

	// shuffle loading
	DEMO.init();

	////MatchHeight
	//$('.matchheight').matchHeight();

	$('#maincarousel').carousel( {
		interval: 8000,
		pause: "hover"
	});

// Produktslider back to top scroll
	var isFF = !!window.sidebar;
	$('.backtotop').click(function () {
		if(isFF)
		{
			$('html,body').animate({
				scrollTop: 0
			}, 400);
		}
		else {
			$('body').animate({
				scrollTop: 0
			}, 400);
		}
	});

	// Swipe to Bootstrap Slider
	$("#produktslider").swiperight(function() {
		$(this).carousel('prev');
	});
	$("#produktslider").swipeleft(function() {
		$(this).carousel('next');
	});

});