window.Modernizr=function(t,e,n){function i(t){f.cssText=t}function r(t,e){return typeof t===e}var o,s,a,u="2.6.2",c={},l=!0,h=e.documentElement,d="modernizr",p=e.createElement(d),f=p.style,m={}.toString,g=" -webkit- -moz- -o- -ms- ".split(" "),v={svg:"http://www.w3.org/2000/svg"},y={},_=[],w=_.slice,b=function(t,n,i,r){var o,s,a,u,c=e.createElement("div"),l=e.body,p=l||e.createElement("body");if(parseInt(i,10))for(;i--;)a=e.createElement("div"),a.id=r?r[i]:d+(i+1),c.appendChild(a);return o=["&#173;",'<style id="s',d,'">',t,"</style>"].join(""),c.id=d,(l?c:p).innerHTML+=o,p.appendChild(c),l||(p.style.background="",p.style.overflow="hidden",u=h.style.overflow,h.style.overflow="hidden",h.appendChild(p)),s=n(c,t),l?c.parentNode.removeChild(c):(p.parentNode.removeChild(p),h.style.overflow=u),!!s},C=function(e){var n=t.matchMedia||t.msMatchMedia;if(n)return n(e).matches;var i;return b("@media "+e+" { #"+d+" { position: absolute; } }",function(e){i="absolute"==(t.getComputedStyle?getComputedStyle(e,null):e.currentStyle).position}),i},k={}.hasOwnProperty;a=r(k,"undefined")||r(k.call,"undefined")?function(t,e){return e in t&&r(t.constructor.prototype[e],"undefined")}:function(t,e){return k.call(t,e)},Function.prototype.bind||(Function.prototype.bind=function(t){var e=this;if("function"!=typeof e)throw new TypeError;var n=w.call(arguments,1),i=function(){if(this instanceof i){var r=function(){};r.prototype=e.prototype;var o=new r,s=e.apply(o,n.concat(w.call(arguments)));return Object(s)===s?s:o}return e.apply(t,n.concat(w.call(arguments)))};return i}),y.touch=function(){var n;return"ontouchstart"in t||t.DocumentTouch&&e instanceof DocumentTouch?n=!0:b(["@media (",g.join("touch-enabled),("),d,")","{#modernizr{top:9px;position:absolute}}"].join(""),function(t){n=9===t.offsetTop}),n},y.svg=function(){return!!e.createElementNS&&!!e.createElementNS(v.svg,"svg").createSVGRect},y.inlinesvg=function(){var t=e.createElement("div");return t.innerHTML="<svg/>",(t.firstChild&&t.firstChild.namespaceURI)==v.svg},y.svgclippaths=function(){return!!e.createElementNS&&/SVGClipPath/.test(m.call(e.createElementNS(v.svg,"clipPath")))};for(var $ in y)a(y,$)&&(s=$.toLowerCase(),c[s]=y[$](),_.push((c[s]?"":"no-")+s));return c.addTest=function(t,e){if("object"==typeof t)for(var i in t)a(t,i)&&c.addTest(i,t[i]);else{if(t=t.toLowerCase(),c[t]!==n)return c;e="function"==typeof e?e():e,"undefined"!=typeof l&&l&&(h.className+=" "+(e?"":"no-")+t),c[t]=e}return c},i(""),p=o=null,function(t,e){function n(t,e){var n=t.createElement("p"),i=t.getElementsByTagName("head")[0]||t.documentElement;return n.innerHTML="x<style>"+e+"</style>",i.insertBefore(n.lastChild,i.firstChild)}function i(){var t=v.elements;return"string"==typeof t?t.split(" "):t}function r(t){var e=g[t[f]];return e||(e={},m++,t[f]=m,g[m]=e),e}function o(t,n,i){if(n||(n=e),l)return n.createElement(t);i||(i=r(n));var o;return o=i.cache[t]?i.cache[t].cloneNode():p.test(t)?(i.cache[t]=i.createElem(t)).cloneNode():i.createElem(t),o.canHaveChildren&&!d.test(t)?i.frag.appendChild(o):o}function s(t,n){if(t||(t=e),l)return t.createDocumentFragment();n=n||r(t);for(var o=n.frag.cloneNode(),s=0,a=i(),u=a.length;u>s;s++)o.createElement(a[s]);return o}function a(t,e){e.cache||(e.cache={},e.createElem=t.createElement,e.createFrag=t.createDocumentFragment,e.frag=e.createFrag()),t.createElement=function(n){return v.shivMethods?o(n,t,e):e.createElem(n)},t.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+i().join().replace(/\w+/g,function(t){return e.createElem(t),e.frag.createElement(t),'c("'+t+'")'})+");return n}")(v,e.frag)}function u(t){t||(t=e);var i=r(t);return v.shivCSS&&!c&&!i.hasCSS&&(i.hasCSS=!!n(t,"article,aside,figcaption,figure,footer,header,hgroup,nav,section{display:block}mark{background:#FF0;color:#000}")),l||a(t,i),t}var c,l,h=t.html5||{},d=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,p=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,f="_html5shiv",m=0,g={};!function(){try{var t=e.createElement("a");t.innerHTML="<xyz></xyz>",c="hidden"in t,l=1==t.childNodes.length||function(){e.createElement("a");var t=e.createDocumentFragment();return"undefined"==typeof t.cloneNode||"undefined"==typeof t.createDocumentFragment||"undefined"==typeof t.createElement}()}catch(n){c=!0,l=!0}}();var v={elements:h.elements||"abbr article aside audio bdi canvas data datalist details figcaption figure footer header hgroup mark meter nav output progress section summary time video",shivCSS:h.shivCSS!==!1,supportsUnknownElements:l,shivMethods:h.shivMethods!==!1,type:"default",shivDocument:u,createElement:o,createDocumentFragment:s};t.html5=v,u(e)}(this,e),c._version=u,c._prefixes=g,c.mq=C,c.testStyles=b,h.className=h.className.replace(/(^|\s)no-js(\s|$)/,"$1$2")+(l?" js "+_.join(" "):""),c}(this,this.document),function(t,e,n){function i(t){return"[object Function]"==g.call(t)}function r(t){return"string"==typeof t}function o(){}function s(t){return!t||"loaded"==t||"complete"==t||"uninitialized"==t}function a(){var t=v.shift();y=1,t?t.t?f(function(){("c"==t.t?d.injectCss:d.injectJs)(t.s,0,t.a,t.x,t.e,1)},0):(t(),a()):y=0}function u(t,n,i,r,o,u,c){function l(e){if(!p&&s(h.readyState)&&(_.r=p=1,!y&&a(),h.onload=h.onreadystatechange=null,e)){"img"!=t&&f(function(){b.removeChild(h)},50);for(var i in S[n])S[n].hasOwnProperty(i)&&S[n][i].onload()}}var c=c||d.errorTimeout,h=e.createElement(t),p=0,g=0,_={t:i,s:n,e:o,a:u,x:c};1===S[n]&&(g=1,S[n]=[]),"object"==t?h.data=n:(h.src=n,h.type=t),h.width=h.height="0",h.onerror=h.onload=h.onreadystatechange=function(){l.call(this,g)},v.splice(r,0,_),"img"!=t&&(g||2===S[n]?(b.insertBefore(h,w?null:m),f(l,c)):S[n].push(h))}function c(t,e,n,i,o){return y=0,e=e||"j",r(t)?u("c"==e?k:C,t,e,this.i++,n,i,o):(v.splice(this.i++,0,t),1==v.length&&a()),this}function l(){var t=d;return t.loader={load:c,i:0},t}var h,d,p=e.documentElement,f=t.setTimeout,m=e.getElementsByTagName("script")[0],g={}.toString,v=[],y=0,_="MozAppearance"in p.style,w=_&&!!e.createRange().compareNode,b=w?p:m.parentNode,p=t.opera&&"[object Opera]"==g.call(t.opera),p=!!e.attachEvent&&!p,C=_?"object":p?"script":"img",k=p?"script":C,$=Array.isArray||function(t){return"[object Array]"==g.call(t)},x=[],S={},T={timeout:function(t,e){return e.length&&(t.timeout=e[0]),t}};d=function(t){function e(t){var e,n,i,t=t.split("!"),r=x.length,o=t.pop(),s=t.length,o={url:o,origUrl:o,prefixes:t};for(n=0;s>n;n++)i=t[n].split("="),(e=T[i.shift()])&&(o=e(o,i));for(n=0;r>n;n++)o=x[n](o);return o}function s(t,r,o,s,a){var u=e(t),c=u.autoCallback;u.url.split(".").pop().split("?").shift(),u.bypass||(r&&(r=i(r)?r:r[t]||r[s]||r[t.split("/").pop().split("?")[0]]),u.instead?u.instead(t,r,o,s,a):(S[u.url]?u.noexec=!0:S[u.url]=1,o.load(u.url,u.forceCSS||!u.forceJS&&"css"==u.url.split(".").pop().split("?").shift()?"c":n,u.noexec,u.attrs,u.timeout),(i(r)||i(c))&&o.load(function(){l(),r&&r(u.origUrl,a,s),c&&c(u.origUrl,a,s),S[u.url]=2})))}function a(t,e){function n(t,n){if(t){if(r(t))n||(h=function(){var t=[].slice.call(arguments);d.apply(this,t),p()}),s(t,h,e,0,c);else if(Object(t)===t)for(u in a=function(){var e,n=0;for(e in t)t.hasOwnProperty(e)&&n++;return n}(),t)t.hasOwnProperty(u)&&(!n&&!--a&&(i(h)?h=function(){var t=[].slice.call(arguments);d.apply(this,t),p()}:h[u]=function(t){return function(){var e=[].slice.call(arguments);t&&t.apply(this,e),p()}}(d[u])),s(t[u],h,e,u,c))}else!n&&p()}var a,u,c=!!t.test,l=t.load||t.both,h=t.callback||o,d=h,p=t.complete||o;n(c?t.yep:t.nope,!!l),l&&n(l)}var u,c,h=this.yepnope.loader;if(r(t))s(t,0,h,0);else if($(t))for(u=0;u<t.length;u++)c=t[u],r(c)?s(c,0,h,0):$(c)?d(c):Object(c)===c&&a(c,h);else Object(t)===t&&a(t,h)},d.addPrefix=function(t,e){T[t]=e},d.addFilter=function(t){x.push(t)},d.errorTimeout=1e4,null==e.readyState&&e.addEventListener&&(e.readyState="loading",e.addEventListener("DOMContentLoaded",h=function(){e.removeEventListener("DOMContentLoaded",h,0),e.readyState="complete"},0)),t.yepnope=l(),t.yepnope.executeStack=a,t.yepnope.injectJs=function(t,n,i,r,u,c){var l,h,p=e.createElement("script"),r=r||d.errorTimeout;p.src=t;for(h in i)p.setAttribute(h,i[h]);n=c?a:n||o,p.onreadystatechange=p.onload=function(){!l&&s(p.readyState)&&(l=1,n(),p.onload=p.onreadystatechange=null)},f(function(){l||(l=1,n(1))},r),u?p.onload():m.parentNode.insertBefore(p,m)},t.yepnope.injectCss=function(t,n,i,r,s,u){var c,r=e.createElement("link"),n=u?a:n||o;r.href=t,r.rel="stylesheet",r.type="text/css";for(c in i)r.setAttribute(c,i[c]);s||(m.parentNode.insertBefore(r,m),f(n,0))}}(this,document),Modernizr.load=function(){yepnope.apply(window,[].slice.call(arguments,0))},Modernizr.addTest("ie8compat",function(){return!window.addEventListener&&document.documentMode&&7===document.documentMode}),function(t){var e={isMsie:function(){return/(msie|trident)/i.test(navigator.userAgent)?navigator.userAgent.match(/(msie |rv:)(\d+(.\d+)?)/i)[2]:!1},isBlankString:function(t){return!t||/^\s*$/.test(t)},escapeRegExChars:function(t){return t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")},isString:function(t){return"string"==typeof t},isNumber:function(t){return"number"==typeof t},isArray:t.isArray,isFunction:t.isFunction,isObject:t.isPlainObject,isUndefined:function(t){return"undefined"==typeof t},bind:t.proxy,each:function(e,n){function i(t,e){return n(e,t)}t.each(e,i)},map:t.map,filter:t.grep,every:function(e,n){var i=!0;return e?(t.each(e,function(t,r){return(i=n.call(null,r,t,e))?void 0:!1}),!!i):i},some:function(e,n){var i=!1;return e?(t.each(e,function(t,r){return(i=n.call(null,r,t,e))?!1:void 0}),!!i):i},mixin:t.extend,getUniqueId:function(){var t=0;return function(){return t++}}(),templatify:function(e){function n(){return String(e)}return t.isFunction(e)?e:n},defer:function(t){setTimeout(t,0)},debounce:function(t,e,n){var i,r;return function(){var o,s,a=this,u=arguments;return o=function(){i=null,n||(r=t.apply(a,u))},s=n&&!i,clearTimeout(i),i=setTimeout(o,e),s&&(r=t.apply(a,u)),r}},throttle:function(t,e){var n,i,r,o,s,a;return s=0,a=function(){s=new Date,r=null,o=t.apply(n,i)},function(){var u=new Date,c=e-(u-s);return n=this,i=arguments,0>=c?(clearTimeout(r),r=null,s=u,o=t.apply(n,i)):r||(r=setTimeout(a,c)),o}},noop:function(){}},n="0.10.2",i=function(){function t(t){return t.split(/\s+/)}function e(t){return t.split(/\W+/)}function n(t){return function(e){return function(n){return t(n[e])}}}return{nonword:e,whitespace:t,obj:{nonword:n(e),whitespace:n(t)}}}(),r=function(){function t(t){this.maxSize=t||100,this.size=0,this.hash={},this.list=new n}function n(){this.head=this.tail=null}function i(t,e){this.key=t,this.val=e,this.prev=this.next=null}return e.mixin(t.prototype,{set:function(t,e){var n,r=this.list.tail;this.size>=this.maxSize&&(this.list.remove(r),delete this.hash[r.key]),(n=this.hash[t])?(n.val=e,this.list.moveToFront(n)):(n=new i(t,e),this.list.add(n),this.hash[t]=n,this.size++)},get:function(t){var e=this.hash[t];return e?(this.list.moveToFront(e),e.val):void 0}}),e.mixin(n.prototype,{add:function(t){this.head&&(t.next=this.head,this.head.prev=t),this.head=t,this.tail=this.tail||t},remove:function(t){t.prev?t.prev.next=t.next:this.head=t.next,t.next?t.next.prev=t.prev:this.tail=t.prev},moveToFront:function(t){this.remove(t),this.add(t)}}),t}(),o=function(){function t(t){this.prefix=["__",t,"__"].join(""),this.ttlKey="__ttl__",this.keyMatcher=new RegExp("^"+this.prefix)}function n(){return(new Date).getTime()}function i(t){return JSON.stringify(e.isUndefined(t)?null:t)}function r(t){return JSON.parse(t)}var o,s;try{o=window.localStorage,o.setItem("~~~","!"),o.removeItem("~~~")}catch(a){o=null}return s=o&&window.JSON?{_prefix:function(t){return this.prefix+t},_ttlKey:function(t){return this._prefix(t)+this.ttlKey},get:function(t){return this.isExpired(t)&&this.remove(t),r(o.getItem(this._prefix(t)))},set:function(t,r,s){return e.isNumber(s)?o.setItem(this._ttlKey(t),i(n()+s)):o.removeItem(this._ttlKey(t)),o.setItem(this._prefix(t),i(r))},remove:function(t){return o.removeItem(this._ttlKey(t)),o.removeItem(this._prefix(t)),this},clear:function(){var t,e,n=[],i=o.length;for(t=0;i>t;t++)(e=o.key(t)).match(this.keyMatcher)&&n.push(e.replace(this.keyMatcher,""));for(t=n.length;t--;)this.remove(n[t]);return this},isExpired:function(t){var i=r(o.getItem(this._ttlKey(t)));return e.isNumber(i)&&n()>i?!0:!1}}:{get:e.noop,set:e.noop,remove:e.noop,clear:e.noop,isExpired:e.noop},e.mixin(t.prototype,s),t}(),s=function(){function n(e){e=e||{},this._send=e.transport?i(e.transport):t.ajax,this._get=e.rateLimiter?e.rateLimiter(this._get):this._get}function i(n){return function(i,r){function o(t){e.defer(function(){a.resolve(t)})}function s(t){e.defer(function(){a.reject(t)})}var a=t.Deferred();return n(i,r,o,s),a}}var o=0,s={},a=6,u=new r(10);return n.setMaxPendingRequests=function(t){a=t},n.resetCache=function(){u=new r(10)},e.mixin(n.prototype,{_get:function(t,e,n){function i(e){n&&n(null,e),u.set(t,e)}function r(){n&&n(!0)}function c(){o--,delete s[t],h.onDeckRequestArgs&&(h._get.apply(h,h.onDeckRequestArgs),h.onDeckRequestArgs=null)}var l,h=this;(l=s[t])?l.done(i).fail(r):a>o?(o++,s[t]=this._send(t,e).done(i).fail(r).always(c)):this.onDeckRequestArgs=[].slice.call(arguments,0)},get:function(t,n,i){var r;return e.isFunction(n)&&(i=n,n={}),(r=u.get(t))?e.defer(function(){i&&i(null,r)}):this._get(t,n,i),!!r}}),n}(),a=function(){function n(e){e=e||{},e.datumTokenizer&&e.queryTokenizer||t.error("datumTokenizer and queryTokenizer are both required"),this.datumTokenizer=e.datumTokenizer,this.queryTokenizer=e.queryTokenizer,this.reset()}function i(t){return t=e.filter(t,function(t){return!!t}),t=e.map(t,function(t){return t.toLowerCase()})}function r(){return{ids:[],children:{}}}function o(t){for(var e={},n=[],i=0;i<t.length;i++)e[t[i]]||(e[t[i]]=!0,n.push(t[i]));return n}function s(t,e){function n(t,e){return t-e}var i=0,r=0,o=[];for(t=t.sort(n),e=e.sort(n);i<t.length&&r<e.length;)t[i]<e[r]?i++:t[i]>e[r]?r++:(o.push(t[i]),i++,r++);return o}return e.mixin(n.prototype,{bootstrap:function(t){this.datums=t.datums,this.trie=t.trie},add:function(t){var n=this;t=e.isArray(t)?t:[t],e.each(t,function(t){var o,s;o=n.datums.push(t)-1,s=i(n.datumTokenizer(t)),e.each(s,function(t){var e,i,s;for(e=n.trie,i=t.split("");s=i.shift();)e=e.children[s]||(e.children[s]=r()),e.ids.push(o)})})},get:function(t){var n,r,a=this;return n=i(this.queryTokenizer(t)),e.each(n,function(t){var e,n,i,o;if(r&&0===r.length)return!1;for(e=a.trie,n=t.split("");e&&(i=n.shift());)e=e.children[i];return e&&0===n.length?(o=e.ids.slice(0),void(r=r?s(r,o):o)):(r=[],!1)}),r?e.map(o(r),function(t){return a.datums[t]}):[]},reset:function(){this.datums=[],this.trie=r()},serialize:function(){return{datums:this.datums,trie:this.trie}}}),n}(),u=function(){function i(t){return t.local||null}function r(i){var r,o;return o={url:null,thumbprint:"",ttl:864e5,filter:null,ajax:{}},(r=i.prefetch||null)&&(r=e.isString(r)?{url:r}:r,r=e.mixin(o,r),r.thumbprint=n+r.thumbprint,r.ajax.type=r.ajax.type||"GET",r.ajax.dataType=r.ajax.dataType||"json",!r.url&&t.error("prefetch requires url to be set")),r}function o(n){function i(t){return function(n){return e.debounce(n,t)}}function r(t){return function(n){return e.throttle(n,t)}}var o,s;return s={url:null,wildcard:"%QUERY",replace:null,rateLimitBy:"debounce",rateLimitWait:300,send:null,filter:null,ajax:{}},(o=n.remote||null)&&(o=e.isString(o)?{url:o}:o,o=e.mixin(s,o),o.rateLimiter=/^throttle$/i.test(o.rateLimitBy)?r(o.rateLimitWait):i(o.rateLimitWait),o.ajax.type=o.ajax.type||"GET",o.ajax.dataType=o.ajax.dataType||"json",delete o.rateLimitBy,delete o.rateLimitWait,!o.url&&t.error("remote requires url to be set")),o}return{local:i,prefetch:r,remote:o}}();!function(n){function r(e){e&&(e.local||e.prefetch||e.remote)||t.error("one of local, prefetch, or remote is required"),this.limit=e.limit||5,this.sorter=c(e.sorter),this.dupDetector=e.dupDetector||l,this.local=u.local(e),this.prefetch=u.prefetch(e),this.remote=u.remote(e),this.cacheKey=this.prefetch?this.prefetch.cacheKey||this.prefetch.url:null,this.index=new a({datumTokenizer:e.datumTokenizer,queryTokenizer:e.queryTokenizer}),this.storage=this.cacheKey?new o(this.cacheKey):null}function c(t){function n(e){return e.sort(t)}function i(t){return t}return e.isFunction(t)?n:i}function l(){return!1}var h,d;return h=n.Bloodhound,d={data:"data",protocol:"protocol",thumbprint:"thumbprint"},n.Bloodhound=r,r.noConflict=function(){return n.Bloodhound=h,r},r.tokenizers=i,e.mixin(r.prototype,{_loadPrefetch:function(e){function n(t){o.clear(),o.add(e.filter?e.filter(t):t),o._saveToStorage(o.index.serialize(),e.thumbprint,e.ttl)}var i,r,o=this;return(i=this._readFromStorage(e.thumbprint))?(this.index.bootstrap(i),r=t.Deferred().resolve()):r=t.ajax(e.url,e.ajax).done(n),r},_getFromRemote:function(t,e){function n(t,n){e(t?[]:o.remote.filter?o.remote.filter(n):n)}var i,r,o=this;return t=t||"",r=encodeURIComponent(t),i=this.remote.replace?this.remote.replace(this.remote.url,t):this.remote.url.replace(this.remote.wildcard,r),this.transport.get(i,this.remote.ajax,n)},_saveToStorage:function(t,e,n){this.storage&&(this.storage.set(d.data,t,n),this.storage.set(d.protocol,location.protocol,n),this.storage.set(d.thumbprint,e,n))},_readFromStorage:function(t){var e,n={};return this.storage&&(n.data=this.storage.get(d.data),n.protocol=this.storage.get(d.protocol),n.thumbprint=this.storage.get(d.thumbprint)),e=n.thumbprint!==t||n.protocol!==location.protocol,n.data&&!e?n.data:null},_initialize:function(){function n(){r.add(e.isFunction(o)?o():o)}var i,r=this,o=this.local;return i=this.prefetch?this._loadPrefetch(this.prefetch):t.Deferred().resolve(),o&&i.done(n),this.transport=this.remote?new s(this.remote):null,this.initPromise=i.promise()},initialize:function(t){return!this.initPromise||t?this._initialize():this.initPromise},add:function(t){this.index.add(t)},get:function(t,n){function i(t){var i=o.slice(0);e.each(t,function(t){var n;return n=e.some(i,function(e){return r.dupDetector(t,e)}),!n&&i.push(t),i.length<r.limit}),n&&n(r.sorter(i))}var r=this,o=[],s=!1;o=this.index.get(t),o=this.sorter(o).slice(0,this.limit),o.length<this.limit&&this.transport&&(s=this._getFromRemote(t,i)),s||(o.length>0||!this.transport)&&n&&n(o)},clear:function(){this.index.reset()},clearPrefetchCache:function(){this.storage&&this.storage.clear()},clearRemoteCache:function(){this.transport&&s.resetCache()},ttAdapter:function(){return e.bind(this.get,this)}}),r}(this);var c={wrapper:'<span class="twitter-typeahead"></span>',dropdown:'<span class="tt-dropdown-menu"></span>',dataset:'<div class="tt-dataset-%CLASS%"></div>',suggestions:'<span class="tt-suggestions"></span>',suggestion:'<div class="tt-suggestion"></div>'},l={wrapper:{position:"relative",display:"inline-block"},hint:{position:"absolute",top:"0",left:"0",borderColor:"transparent",boxShadow:"none"},input:{position:"relative",verticalAlign:"top",backgroundColor:"transparent"},inputWithNoHint:{position:"relative",verticalAlign:"top"},dropdown:{position:"absolute",top:"100%",left:"0",zIndex:"100",display:"none"},suggestions:{display:"block"},suggestion:{whiteSpace:"nowrap",cursor:"pointer"},suggestionChild:{whiteSpace:"normal"},ltr:{left:"0",right:"auto"},rtl:{left:"auto",right:" 0"}};e.isMsie()&&e.mixin(l.input,{backgroundImage:"url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)"}),e.isMsie()&&e.isMsie()<=7&&e.mixin(l.input,{marginTop:"-1px"});var h=function(){function n(e){e&&e.el||t.error("EventBus initialized without el"),this.$el=t(e.el)}var i="typeahead:";return e.mixin(n.prototype,{trigger:function(t){var e=[].slice.call(arguments,1);this.$el.trigger(i+t,e)}}),n}(),d=function(){function t(t,e,n,i){var r;if(!n)return this;for(e=e.split(u),n=i?a(n,i):n,this._callbacks=this._callbacks||{};r=e.shift();)this._callbacks[r]=this._callbacks[r]||{sync:[],async:[]},this._callbacks[r][t].push(n);return this}function e(e,n,i){return t.call(this,"async",e,n,i)}function n(e,n,i){return t.call(this,"sync",e,n,i)}function i(t){var e;if(!this._callbacks)return this;for(t=t.split(u);e=t.shift();)delete this._callbacks[e];return this}function r(t){var e,n,i,r,s;if(!this._callbacks)return this;for(t=t.split(u),i=[].slice.call(arguments,1);(e=t.shift())&&(n=this._callbacks[e]);)r=o(n.sync,this,[e].concat(i)),s=o(n.async,this,[e].concat(i)),r()&&c(s);return this}function o(t,e,n){function i(){for(var i,r=0;!i&&r<t.length;r+=1)i=t[r].apply(e,n)===!1;return!i}return i}function s(){var t;return t=window.setImmediate?function(t){setImmediate(function(){t()})}:function(t){setTimeout(function(){t()},0)}}function a(t,e){return t.bind?t.bind(e):function(){t.apply(e,[].slice.call(arguments,0))}}var u=/\s+/,c=s();return{onSync:n,onAsync:e,off:i,trigger:r}}(),p=function(t){function n(t,n,i){for(var r,o=[],s=0;s<t.length;s++)o.push(e.escapeRegExChars(t[s]));return r=i?"\\b("+o.join("|")+")\\b":"("+o.join("|")+")",n?new RegExp(r):new RegExp(r,"i")}var i={node:null,pattern:null,tagName:"strong",className:null,wordsOnly:!1,caseSensitive:!1};return function(r){function o(e){var n,i;return(n=a.exec(e.data))&&(wrapperNode=t.createElement(r.tagName),r.className&&(wrapperNode.className=r.className),i=e.splitText(n.index),i.splitText(n[0].length),wrapperNode.appendChild(i.cloneNode(!0)),e.parentNode.replaceChild(wrapperNode,i)),!!n}function s(t,e){for(var n,i=3,r=0;r<t.childNodes.length;r++)n=t.childNodes[r],n.nodeType===i?r+=e(n)?1:0:s(n,e)}var a;r=e.mixin({},i,r),r.node&&r.pattern&&(r.pattern=e.isArray(r.pattern)?r.pattern:[r.pattern],a=n(r.pattern,r.caseSensitive,r.wordsOnly),s(r.node,o))}}(window.document),f=function(){function n(n){var r,o,a,u,c=this;n=n||{},n.input||t.error("input is missing"),r=e.bind(this._onBlur,this),o=e.bind(this._onFocus,this),a=e.bind(this._onKeydown,this),u=e.bind(this._onInput,this),this.$hint=t(n.hint),this.$input=t(n.input).on("blur.tt",r).on("focus.tt",o).on("keydown.tt",a),0===this.$hint.length&&(this.setHint=this.getHint=this.clearHint=this.clearHintIfInvalid=e.noop),e.isMsie()?this.$input.on("keydown.tt keypress.tt cut.tt paste.tt",function(t){s[t.which||t.keyCode]||e.defer(e.bind(c._onInput,c,t))}):this.$input.on("input.tt",u),this.query=this.$input.val(),this.$overflowHelper=i(this.$input)}function i(e){return t('<pre aria-hidden="true"></pre>').css({position:"absolute",visibility:"hidden",whiteSpace:"pre",fontFamily:e.css("font-family"),fontSize:e.css("font-size"),fontStyle:e.css("font-style"),fontVariant:e.css("font-variant"),fontWeight:e.css("font-weight"),wordSpacing:e.css("word-spacing"),letterSpacing:e.css("letter-spacing"),textIndent:e.css("text-indent"),textRendering:e.css("text-rendering"),textTransform:e.css("text-transform")}).insertAfter(e)}function r(t,e){return n.normalizeQuery(t)===n.normalizeQuery(e)}function o(t){return t.altKey||t.ctrlKey||t.metaKey||t.shiftKey}var s;return s={9:"tab",27:"esc",37:"left",39:"right",13:"enter",38:"up",40:"down"},n.normalizeQuery=function(t){return(t||"").replace(/^\s*/g,"").replace(/\s{2,}/g," ")},e.mixin(n.prototype,d,{_onBlur:function(){this.resetInputValue(),this.trigger("blurred")},_onFocus:function(){this.trigger("focused")},_onKeydown:function(t){var e=s[t.which||t.keyCode];this._managePreventDefault(e,t),e&&this._shouldTrigger(e,t)&&this.trigger(e+"Keyed",t)},_onInput:function(){this._checkInputValue()},_managePreventDefault:function(t,e){var n,i,r;switch(t){case"tab":i=this.getHint(),r=this.getInputValue(),n=i&&i!==r&&!o(e);break;case"up":case"down":n=!o(e);break;default:n=!1}n&&e.preventDefault()},_shouldTrigger:function(t,e){var n;switch(t){case"tab":n=!o(e);break;default:n=!0}return n},_checkInputValue:function(){var t,e,n;t=this.getInputValue(),e=r(t,this.query),n=e?this.query.length!==t.length:!1,e?n&&this.trigger("whitespaceChanged",this.query):this.trigger("queryChanged",this.query=t)},focus:function(){this.$input.focus()},blur:function(){this.$input.blur()},getQuery:function(){return this.query},setQuery:function(t){this.query=t},getInputValue:function(){return this.$input.val()},setInputValue:function(t,e){this.$input.val(t),e?this.clearHint():this._checkInputValue()},resetInputValue:function(){this.setInputValue(this.query,!0)},getHint:function(){return this.$hint.val()},setHint:function(t){this.$hint.val(t)},clearHint:function(){this.setHint("")},clearHintIfInvalid:function(){var t,e,n,i;t=this.getInputValue(),e=this.getHint(),n=t!==e&&0===e.indexOf(t),i=""!==t&&n&&!this.hasOverflow(),!i&&this.clearHint()},getLanguageDirection:function(){return(this.$input.css("direction")||"ltr").toLowerCase()},hasOverflow:function(){var t=this.$input.width()-2;return this.$overflowHelper.text(this.getInputValue()),this.$overflowHelper.width()>=t},isCursorAtEnd:function(){var t,n,i;return t=this.$input.val().length,n=this.$input[0].selectionStart,e.isNumber(n)?n===t:document.selection?(i=document.selection.createRange(),i.moveStart("character",-t),t===i.text.length):!0},destroy:function(){this.$hint.off(".tt"),this.$input.off(".tt"),this.$hint=this.$input=this.$overflowHelper=null}}),n}(),m=function(){function n(n){n=n||{},n.templates=n.templates||{},n.source||t.error("missing source"),n.name&&!o(n.name)&&t.error("invalid dataset name: "+n.name),this.query=null,this.highlight=!!n.highlight,this.name=n.name||e.getUniqueId(),this.source=n.source,this.displayFn=i(n.display||n.displayKey),this.templates=r(n.templates,this.displayFn),this.$el=t(c.dataset.replace("%CLASS%",this.name))}function i(t){function n(e){return e[t]}return t=t||"value",e.isFunction(t)?t:n}function r(t,n){function i(t){return"<p>"+n(t)+"</p>"}return{empty:t.empty&&e.templatify(t.empty),header:t.header&&e.templatify(t.header),footer:t.footer&&e.templatify(t.footer),suggestion:t.suggestion||i}}function o(t){return/^[_a-zA-Z0-9-]+$/.test(t)}var s="ttDataset",a="ttValue",u="ttDatum";return n.extractDatasetName=function(e){return t(e).data(s)},n.extractValue=function(e){return t(e).data(a)},n.extractDatum=function(e){return t(e).data(u)},e.mixin(n.prototype,d,{_render:function(n,i){function r(){return m.templates.empty({query:n,isEmpty:!0})}function o(){function r(e){var n;return n=t(c.suggestion).append(m.templates.suggestion(e)).data(s,m.name).data(a,m.displayFn(e)).data(u,e),n.children().each(function(){t(this).css(l.suggestionChild)}),n}var o,h;return o=t(c.suggestions).css(l.suggestions),h=e.map(i,r),o.append.apply(o,h),m.highlight&&p({node:o[0],pattern:n}),o}function h(){return m.templates.header({query:n,isEmpty:!f})}function d(){return m.templates.footer({query:n,isEmpty:!f})}if(this.$el){var f,m=this;this.$el.empty(),f=i&&i.length,!f&&this.templates.empty?this.$el.html(r()).prepend(m.templates.header?h():null).append(m.templates.footer?d():null):f&&this.$el.html(o()).prepend(m.templates.header?h():null).append(m.templates.footer?d():null),this.trigger("rendered")}},getRoot:function(){return this.$el},update:function(t){function e(e){n.canceled||t!==n.query||n._render(t,e)}var n=this;this.query=t,this.canceled=!1,this.source(t,e)},cancel:function(){this.canceled=!0},clear:function(){this.cancel(),this.$el.empty(),this.trigger("rendered")},isEmpty:function(){return this.$el.is(":empty")},destroy:function(){this.$el=null}}),n}(),g=function(){function n(n){var r,o,s,a=this;n=n||{},n.menu||t.error("menu is required"),this.isOpen=!1,this.isEmpty=!0,this.datasets=e.map(n.datasets,i),r=e.bind(this._onSuggestionClick,this),o=e.bind(this._onSuggestionMouseEnter,this),s=e.bind(this._onSuggestionMouseLeave,this),this.$menu=t(n.menu).on("click.tt",".tt-suggestion",r).on("mouseenter.tt",".tt-suggestion",o).on("mouseleave.tt",".tt-suggestion",s),e.each(this.datasets,function(t){a.$menu.append(t.getRoot()),t.onSync("rendered",a._onRendered,a)})}function i(t){return new m(t)}return e.mixin(n.prototype,d,{_onSuggestionClick:function(e){this.trigger("suggestionClicked",t(e.currentTarget))},_onSuggestionMouseEnter:function(e){this._removeCursor(),this._setCursor(t(e.currentTarget),!0)},_onSuggestionMouseLeave:function(){this._removeCursor()},_onRendered:function(){function t(t){return t.isEmpty()}this.isEmpty=e.every(this.datasets,t),this.isEmpty?this._hide():this.isOpen&&this._show(),this.trigger("datasetRendered")},_hide:function(){this.$menu.hide()},_show:function(){this.$menu.css("display","block")},_getSuggestions:function(){return this.$menu.find(".tt-suggestion")},_getCursor:function(){return this.$menu.find(".tt-cursor").first()},_setCursor:function(t,e){t.first().addClass("tt-cursor"),!e&&this.trigger("cursorMoved")},_removeCursor:function(){this._getCursor().removeClass("tt-cursor")},_moveCursor:function(t){var e,n,i,r;if(this.isOpen){if(n=this._getCursor(),e=this._getSuggestions(),this._removeCursor(),i=e.index(n)+t,i=(i+1)%(e.length+1)-1,-1===i)return void this.trigger("cursorRemoved");-1>i&&(i=e.length-1),this._setCursor(r=e.eq(i)),this._ensureVisible(r)}},_ensureVisible:function(t){var e,n,i,r;e=t.position().top,n=e+t.outerHeight(!0),i=this.$menu.scrollTop(),r=this.$menu.height()+parseInt(this.$menu.css("paddingTop"),10)+parseInt(this.$menu.css("paddingBottom"),10),0>e?this.$menu.scrollTop(i+e):n>r&&this.$menu.scrollTop(i+(n-r))},close:function(){this.isOpen&&(this.isOpen=!1,this._removeCursor(),this._hide(),this.trigger("closed"))},open:function(){this.isOpen||(this.isOpen=!0,!this.isEmpty&&this._show(),this.trigger("opened"))},setLanguageDirection:function(t){this.$menu.css("ltr"===t?l.ltr:l.rtl)},moveCursorUp:function(){this._moveCursor(-1)},moveCursorDown:function(){this._moveCursor(1)},getDatumForSuggestion:function(t){var e=null;return t.length&&(e={raw:m.extractDatum(t),value:m.extractValue(t),datasetName:m.extractDatasetName(t)}),e},getDatumForCursor:function(){return this.getDatumForSuggestion(this._getCursor().first())},getDatumForTopSuggestion:function(){return this.getDatumForSuggestion(this._getSuggestions().first())},update:function(t){function n(e){e.update(t)}e.each(this.datasets,n)},empty:function(){function t(t){t.clear()}e.each(this.datasets,t),this.isEmpty=!0},isVisible:function(){return this.isOpen&&!this.isEmpty},destroy:function(){function t(t){t.destroy()}this.$menu.off(".tt"),this.$menu=null,e.each(this.datasets,t)}}),n}(),v=function(){function n(n){var r,o,s;n=n||{},n.input||t.error("missing input"),this.isActivated=!1,this.autoselect=!!n.autoselect,this.minLength=e.isNumber(n.minLength)?n.minLength:1,this.$node=i(n.input,n.withHint),r=this.$node.find(".tt-dropdown-menu"),o=this.$node.find(".tt-input"),s=this.$node.find(".tt-hint"),o.on("blur.tt",function(t){var n,i,s;n=document.activeElement,i=r.is(n),s=r.has(n).length>0,e.isMsie()&&(i||s)&&(t.preventDefault(),t.stopImmediatePropagation(),e.defer(function(){o.focus()}))}),r.on("mousedown.tt",function(t){t.preventDefault()}),this.eventBus=n.eventBus||new h({el:o}),this.dropdown=new g({menu:r,datasets:n.datasets}).onSync("suggestionClicked",this._onSuggestionClicked,this).onSync("cursorMoved",this._onCursorMoved,this).onSync("cursorRemoved",this._onCursorRemoved,this).onSync("opened",this._onOpened,this).onSync("closed",this._onClosed,this).onAsync("datasetRendered",this._onDatasetRendered,this),this.input=new f({input:o,hint:s}).onSync("focused",this._onFocused,this).onSync("blurred",this._onBlurred,this).onSync("enterKeyed",this._onEnterKeyed,this).onSync("tabKeyed",this._onTabKeyed,this).onSync("escKeyed",this._onEscKeyed,this).onSync("upKeyed",this._onUpKeyed,this).onSync("downKeyed",this._onDownKeyed,this).onSync("leftKeyed",this._onLeftKeyed,this).onSync("rightKeyed",this._onRightKeyed,this).onSync("queryChanged",this._onQueryChanged,this).onSync("whitespaceChanged",this._onWhitespaceChanged,this),this._setLanguageDirection()}function i(e,n){var i,o,a,u;i=t(e),o=t(c.wrapper).css(l.wrapper),a=t(c.dropdown).css(l.dropdown),u=i.clone().css(l.hint).css(r(i)),u.val("").removeData().addClass("tt-hint").removeAttr("id name placeholder").prop("disabled",!0).attr({autocomplete:"off",spellcheck:"false"}),i.data(s,{dir:i.attr("dir"),autocomplete:i.attr("autocomplete"),spellcheck:i.attr("spellcheck"),style:i.attr("style")}),i.addClass("tt-input").attr({autocomplete:"off",spellcheck:!1}).css(n?l.input:l.inputWithNoHint);
try{!i.attr("dir")&&i.attr("dir","auto")}catch(h){}return i.wrap(o).parent().prepend(n?u:null).append(a)}function r(t){return{backgroundAttachment:t.css("background-attachment"),backgroundClip:t.css("background-clip"),backgroundColor:t.css("background-color"),backgroundImage:t.css("background-image"),backgroundOrigin:t.css("background-origin"),backgroundPosition:t.css("background-position"),backgroundRepeat:t.css("background-repeat"),backgroundSize:t.css("background-size")}}function o(t){var n=t.find(".tt-input");e.each(n.data(s),function(t,i){e.isUndefined(t)?n.removeAttr(i):n.attr(i,t)}),n.detach().removeData(s).removeClass("tt-input").insertAfter(t),t.remove()}var s="ttAttrs";return e.mixin(n.prototype,{_onSuggestionClicked:function(t,e){var n;(n=this.dropdown.getDatumForSuggestion(e))&&this._select(n)},_onCursorMoved:function(){var t=this.dropdown.getDatumForCursor();this.input.setInputValue(t.value,!0),this.eventBus.trigger("cursorchanged",t.raw,t.datasetName)},_onCursorRemoved:function(){this.input.resetInputValue(),this._updateHint()},_onDatasetRendered:function(){this._updateHint()},_onOpened:function(){this._updateHint(),this.eventBus.trigger("opened")},_onClosed:function(){this.input.clearHint(),this.eventBus.trigger("closed")},_onFocused:function(){this.isActivated=!0,this.dropdown.open()},_onBlurred:function(){this.isActivated=!1,this.dropdown.empty(),this.dropdown.close()},_onEnterKeyed:function(t,e){var n,i;n=this.dropdown.getDatumForCursor(),i=this.dropdown.getDatumForTopSuggestion(),n?(this._select(n),e.preventDefault()):this.autoselect&&i&&(this._select(i),e.preventDefault())},_onTabKeyed:function(t,e){var n;(n=this.dropdown.getDatumForCursor())?(this._select(n),e.preventDefault()):this._autocomplete(!0)},_onEscKeyed:function(){this.dropdown.close(),this.input.resetInputValue()},_onUpKeyed:function(){var t=this.input.getQuery();this.dropdown.isEmpty&&t.length>=this.minLength?this.dropdown.update(t):this.dropdown.moveCursorUp(),this.dropdown.open()},_onDownKeyed:function(){var t=this.input.getQuery();this.dropdown.isEmpty&&t.length>=this.minLength?this.dropdown.update(t):this.dropdown.moveCursorDown(),this.dropdown.open()},_onLeftKeyed:function(){"rtl"===this.dir&&this._autocomplete()},_onRightKeyed:function(){"ltr"===this.dir&&this._autocomplete()},_onQueryChanged:function(t,e){this.input.clearHintIfInvalid(),e.length>=this.minLength?this.dropdown.update(e):this.dropdown.empty(),this.dropdown.open(),this._setLanguageDirection()},_onWhitespaceChanged:function(){this._updateHint(),this.dropdown.open()},_setLanguageDirection:function(){var t;this.dir!==(t=this.input.getLanguageDirection())&&(this.dir=t,this.$node.css("direction",t),this.dropdown.setLanguageDirection(t))},_updateHint:function(){var t,n,i,r,o,s;t=this.dropdown.getDatumForTopSuggestion(),t&&this.dropdown.isVisible()&&!this.input.hasOverflow()?(n=this.input.getInputValue(),i=f.normalizeQuery(n),r=e.escapeRegExChars(i),o=new RegExp("^(?:"+r+")(.*$)","i"),s=o.exec(t.value),s&&r.length?this.input.setHint(n+s[1]):this.input.clearHint()):this.input.clearHint()},_autocomplete:function(t){var e,n,i,r;e=this.input.getHint(),n=this.input.getQuery(),i=t||this.input.isCursorAtEnd(),e&&n!==e&&i&&(r=this.dropdown.getDatumForTopSuggestion(),r&&this.input.setInputValue(r.value),this.eventBus.trigger("autocompleted",r.raw,r.datasetName))},_select:function(t){this.input.setQuery(t.value),this.input.setInputValue(t.value,!0),this._setLanguageDirection(),this.eventBus.trigger("selected",t.raw,t.datasetName),this.dropdown.close(),e.defer(e.bind(this.dropdown.empty,this.dropdown))},open:function(){this.dropdown.open()},close:function(){this.dropdown.close()},setVal:function(t){this.isActivated?this.input.setInputValue(t):(this.input.setQuery(t),this.input.setInputValue(t,!0)),this._setLanguageDirection()},getVal:function(){return this.input.getQuery()},destroy:function(){this.input.destroy(),this.dropdown.destroy(),o(this.$node),this.$node=null}}),n}();!function(){var n,i,r;n=t.fn.typeahead,i="ttTypeahead",r={initialize:function(n,r){function o(){var o,s,a=t(this);e.each(r,function(t){t.highlight=!!n.highlight}),s=new v({input:a,eventBus:o=new h({el:a}),withHint:e.isUndefined(n.hint)?!0:!!n.hint,minLength:n.minLength,autoselect:n.autoselect,datasets:r}),a.data(i,s)}return r=e.isArray(r)?r:[].slice.call(arguments,1),n=n||{},this.each(o)},open:function(){function e(){var e,n=t(this);(e=n.data(i))&&e.open()}return this.each(e)},close:function(){function e(){var e,n=t(this);(e=n.data(i))&&e.close()}return this.each(e)},val:function(e){function n(){var n,r=t(this);(n=r.data(i))&&n.setVal(e)}function r(t){var e,n;return(e=t.data(i))&&(n=e.getVal()),n}return arguments.length?this.each(n):r(this.first())},destroy:function(){function e(){var e,n=t(this);(e=n.data(i))&&(e.destroy(),n.removeData(i))}return this.each(e)}},t.fn.typeahead=function(t){return r[t]?r[t].apply(this,[].slice.call(arguments,1)):r.initialize.apply(this,arguments)},t.fn.typeahead.noConflict=function(){return t.fn.typeahead=n,this}}()}(window.jQuery),function(t){function e(t,e,r){var o=t[0],s=/er/.test(r)?_indeterminate:/bl/.test(r)?p:h,a=r==_update?{checked:o[h],disabled:o[p],indeterminate:"true"==t.attr(_indeterminate)||"false"==t.attr(_determinate)}:o[s];if(/^(ch|di|in)/.test(r)&&!a)n(t,s);else if(/^(un|en|de)/.test(r)&&a)i(t,s);else if(r==_update)for(var u in a)a[u]?n(t,u,!0):i(t,u,!0);else e&&"toggle"!=r||(e||t[_callback]("ifClicked"),a?o[_type]!==l&&i(t,s):n(t,s))}function n(e,n,r){var f=e[0],m=e.parent(),g=n==h,v=n==_indeterminate,y=n==p,_=v?_determinate:g?d:"enabled",w=o(e,_+s(f[_type])),b=o(e,n+s(f[_type]));if(!0!==f[n]){if(!r&&n==h&&f[_type]==l&&f.name){var C=e.closest("form"),k='input[name="'+f.name+'"]',k=C.length?C.find(k):t(k);k.each(function(){this!==f&&t(this).data(u)&&i(t(this),n)})}v?(f[n]=!0,f[h]&&i(e,h,"force")):(r||(f[n]=!0),g&&f[_indeterminate]&&i(e,_indeterminate,!1)),a(e,g,n,r)}f[p]&&o(e,_cursor,!0)&&m.find("."+c).css(_cursor,"default"),m[_add](b||o(e,n)||""),m.attr("role")&&!v&&m.attr("aria-"+(y?p:h),"true"),m[_remove](w||o(e,_)||"")}function i(t,e,n){var i=t[0],r=t.parent(),u=e==h,l=e==_indeterminate,f=e==p,m=l?_determinate:u?d:"enabled",g=o(t,m+s(i[_type])),v=o(t,e+s(i[_type]));!1!==i[e]&&((l||!n||"force"==n)&&(i[e]=!1),a(t,u,m,n)),!i[p]&&o(t,_cursor,!0)&&r.find("."+c).css(_cursor,"pointer"),r[_remove](v||o(t,e)||""),r.attr("role")&&!l&&r.attr("aria-"+(f?p:h),"false"),r[_add](g||o(t,m)||"")}function r(e,n){e.data(u)&&(e.parent().html(e.attr("style",e.data(u).s||"")),n&&e[_callback](n),e.off(".i").unwrap(),t(_label+'[for="'+e[0].id+'"]').add(e.closest(_label)).off(".i"))}function o(t,e,n){return t.data(u)?t.data(u).o[e+(n?"":"Class")]:void 0}function s(t){return t.charAt(0).toUpperCase()+t.slice(1)}function a(t,e,n,i){i||(e&&t[_callback]("ifToggled"),t[_callback]("ifChanged")[_callback]("if"+s(n)))}var u="iCheck",c=u+"-helper",l="radio",h="checked",d="un"+h,p="disabled";_determinate="determinate",_indeterminate="in"+_determinate,_update="update",_type="type",_click="click",_touch="touchbegin.i touchend.i",_add="addClass",_remove="removeClass",_callback="trigger",_label="label",_cursor="cursor",_mobile=/ipad|iphone|ipod|android|blackberry|windows phone|opera mini|silk/i.test(navigator.userAgent),t.fn[u]=function(o,s){var a='input[type="checkbox"], input[type="'+l+'"]',d=t(),f=function(e){e.each(function(){var e=t(this);d=d.add(e.is(a)?e:e.find(a))})};if(/^(check|uncheck|toggle|indeterminate|determinate|disable|enable|update|destroy)$/i.test(o))return o=o.toLowerCase(),f(this),d.each(function(){var n=t(this);"destroy"==o?r(n,"ifDestroyed"):e(n,!0,o),t.isFunction(s)&&s()});if("object"!=typeof o&&o)return this;var m=t.extend({checkedClass:h,disabledClass:p,indeterminateClass:_indeterminate,labelHover:!0},o),g=m.handle,v=m.hoverClass||"hover",y=m.focusClass||"focus",_=m.activeClass||"active",w=!!m.labelHover,b=m.labelHoverClass||"hover",C=0|(""+m.increaseArea).replace("%","");return("checkbox"==g||g==l)&&(a='input[type="'+g+'"]'),-50>C&&(C=-50),f(this),d.each(function(){var o=t(this);r(o);var s=this,a=s.id,d=-C+"%",f=100+2*C+"%",f={position:"absolute",top:d,left:d,display:"block",width:f,height:f,margin:0,padding:0,background:"#fff",border:0,opacity:0},d=_mobile?{position:"absolute",visibility:"hidden"}:C?f:{position:"absolute",opacity:0},g="checkbox"==s[_type]?m.checkboxClass||"icheckbox":m.radioClass||"i"+l,k=t(_label+'[for="'+a+'"]').add(o.closest(_label)),$=!!m.aria,x=u+"-"+Math.random().toString(36).substr(2,6),S='<div class="'+g+'" '+($?'role="'+s[_type]+'" ':"");$&&k.each(function(){S+='aria-labelledby="',this.id?S+=this.id:(this.id=x,S+=x),S+='"'}),S=o.wrap(S+"/>")[_callback]("ifCreated").parent().append(m.insert),f=t('<ins class="'+c+'"/>').css(f).appendTo(S),o.data(u,{o:m,s:o.attr("style")}).css(d),m.inheritClass&&S[_add](s.className||""),m.inheritID&&a&&S.attr("id",u+"-"+a),"static"==S.css("position")&&S.css("position","relative"),e(o,!0,_update),k.length&&k.on(_click+".i mouseover.i mouseout.i "+_touch,function(n){var i=n[_type],r=t(this);if(!s[p]){if(i==_click){if(t(n.target).is("a"))return;e(o,!1,!0)}else w&&(/ut|nd/.test(i)?(S[_remove](v),r[_remove](b)):(S[_add](v),r[_add](b)));if(!_mobile)return!1;n.stopPropagation()}}),o.on(_click+".i focus.i blur.i keyup.i keydown.i keypress.i",function(t){var e=t[_type];return t=t.keyCode,e==_click?!1:"keydown"==e&&32==t?(s[_type]==l&&s[h]||(s[h]?i(o,h):n(o,h)),!1):void("keyup"==e&&s[_type]==l?!s[h]&&n(o,h):/us|ur/.test(e)&&S["blur"==e?_remove:_add](y))}),f.on(_click+" mousedown mouseup mouseover mouseout "+_touch,function(t){var n=t[_type],i=/wn|up/.test(n)?_:v;if(!s[p]){if(n==_click?e(o,!1,!0):(/wn|er|in/.test(n)?S[_add](i):S[_remove](i+" "+_),k.length&&w&&i==v&&k[/ut|nd/.test(n)?_remove:_add](b)),!_mobile)return!1;t.stopPropagation()}})})}}(window.jQuery||window.Zepto),$(function(){$(".js-tabs").each(function(){function t(t){var e=$(t).attr("data-target");$(n).each(function(){this==t?$(this).addClass("selected"):$(this).removeClass("selected")}),$(i).each(function(){$(this).attr("id")==e?($(this).removeClass("hide"),$(this).trigger("tab:visible",{$tab:$(this)})):$(this).addClass("hide")})}var e=$(this),n=$(".js-tab-link",e),i=$(".js-tab-block",e);$(n).click(function(e){e.preventDefault(),t(this)}),$(i).one("tab:visible",function(t,e){$(this).trigger("tab:init",e)}),t($(n).filter(".selected").get(0)||$(n).get(0))})}),$(window).load(function(){function t(t){function e(){r.scrollLeft()>0?u.addClass("active"):u.removeClass("active");var t=o.width()-r.width();r.scrollLeft()<t?a.addClass("active"):a.removeClass("active")}function n(t){function n(t){return Math.round(t.position().left)}function i(t){return n(t)+t.width()}var o,a=r.scrollLeft(),u=a+r.width();if("right"==t)o=_.find(s,function(t){return u<i($(t))});else if("left"==t){var c=_.find(s.get().reverse(),function(t){return n($(t))<a});if(c){var l=i($(c)),h=l-r.width();o=_.find(s,function(t){return h<=n($(t))})}}o&&r.animate({scrollLeft:n($(o))},200,function(){e()})}var i=$(".grid-scroller-container",t),r=$(".grid-scroller-wrapper",i),o=$(".grid-scroller-row",r),s=$(".grid-scroller-column",o),a=$(".grid-scroller-arrow-right",t),u=$(".grid-scroller-arrow-left",t),c=(s.length,0),l=0,h=0;r.addClass("with-scrolling"),s.each(function(){var t=$(this),e=t.outerHeight(),n=t.outerWidth();l+=n,e>c&&(c=e),n>h&&(h=n)}),i.hasClass("photo-container")||(i.height(c),o.width(l)),o.width()>r.width()&&a.addClass("active"),r.scroll(function(){e()}),a.click(function(){return n("right"),!1}),u.click(function(){return n("left"),!1}),i.hasClass("photo-container")&&$(document).on("keyup",function(t){37==t.which?n("left"):39==t.which&&n("right")}),this.doArrows=e}var e="ot-grid-scroller";$(".grid-scroller").each(function(){$(this).data(e,new t($(this)))})}),$(function(){var t=$("#page-header-hero"),e=$("#page-header-hero-wrapper"),n=$("#page-header-hero-img"),i=$("#page-header-hero-canvas"),r=new Image,o=0,s=!1;if(n.length){var a=document.createElement("canvas");a.getContext&&a.getContext("2d")&&(n.hasClass("with-blur")&&(o=60,s=!0),r.onload=function(){function n(){var n=t.height(),i=t.width(),r=n,o=i,s=o*(1/a),u=r*a;if(s>n){var c=s-n,l=-1*(c/2);e.height(s).width("100%").css({top:l,left:""})}else if(u>i){var c=u-i,h=-1*(c/2);e.width(u).height("100%").css({left:h,top:""})}}var i=r.height,o=r.width,a=o/i;n(),e.css("display","block"),s&&e.addClass("is-using-canvas"),$(window).resize(function(){OT.Common.Helpers.Browser.isIE8()?n():setTimeout(n,100)}).trigger("resize")},r.src=n.attr("src"),n.on("load",function(){var t=function(){i.removeClass("hidden")};s?($(window).load(function(){stackBlurImage("page-header-hero-img","page-header-hero-canvas",o,t)}),i.css({height:"auto",width:"100%"})):$(window).load(function(){$("#page-header-hero-img").removeClass("hidden")})}).each(function(){this.complete&&$(this).load()}))}}),function(t,e){OT.createNS("OT.checkboxes"),OT.checkboxes.check=function(t){e("input.flat",t).iCheck({checkboxClass:"checkbox-flat",radioClass:"radio-flat"})},e(function(){OT.checkboxes.check(document)})}(window,jQuery),$(function(){var t=31536e6;"1"!=OT.Common.Cookies.get("rdHasClosedBanner")&&("1"!=OT.Common.Cookies.get("rdHasSeenBanner")?setTimeout(function(){OT.Common.Cookies.set({rdHasSeenBanner:"1"},t),$("body").addClass("animate-alert show-site-alert")},1500):$("body").addClass("show-site-alert")),$("#site-alert-close").click(function(){$("body").addClass("animate-alert").removeClass("show-site-alert"),OT.Common.Cookies.set({rdHasClosedBanner:"1"},t)}),$("#tour-link").click(function(){OT.Common.Cookies.set({rdHasClosedBanner:"1"},t);var e=window.location.href,n=encodeURIComponent(e),i=$(this).attr("href")+"?url_source="+n;return window.location.href=i,!1})});