You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

16 lines
180 KiB

/*
* # Semantic UI
* https://github.com/Semantic-Org/Semantic-UI
* http://www.semantic-ui.com/
*
* Copyright 2014 Contributors
* Released under the MIT license
* http://opensource.org/licenses/MIT
*
*/
!function(e,t,n,i){e.site=e.fn.site=function(o){var r,a,s=(new Date).getTime(),c=[],l=arguments[0],u="string"==typeof l,d=[].slice.call(arguments,1),m=e.isPlainObject(o)?e.extend(!0,{},e.site.settings,o):e.extend({},e.site.settings),f=m.namespace,p=m.error,g="module-"+f,b=e(n),v=b,h=this,y=v.data(g);return r={initialize:function(){r.instantiate()},instantiate:function(){r.verbose("Storing instance of site",r),y=r,v.data(g,r)},normalize:function(){r.fix.console(),r.fix.requestAnimationFrame()},fix:{console:function(){r.debug("Normalizing window.console"),(console===i||console.log===i)&&(r.verbose("Console not available, normalizing events"),r.disable.console()),("undefined"==typeof console.group||"undefined"==typeof console.groupEnd||"undefined"==typeof console.groupCollapsed)&&(r.verbose("Console group not available, normalizing events"),t.console.group=function(){},t.console.groupEnd=function(){},t.console.groupCollapsed=function(){}),"undefined"==typeof console.markTimeline&&(r.verbose("Mark timeline not available, normalizing events"),t.console.markTimeline=function(){})},consoleClear:function(){r.debug("Disabling programmatic console clearing"),t.console.clear=function(){}},requestAnimationFrame:function(){r.debug("Normalizing requestAnimationFrame"),t.requestAnimationFrame===i&&(r.debug("RequestAnimationFrame not available, normailizing event"),t.requestAnimationFrame=t.requestAnimationFrame||t.mozRequestAnimationFrame||t.webkitRequestAnimationFrame||t.msRequestAnimationFrame||function(e){setTimeout(e,0)})}},moduleExists:function(t){return e.fn[t]!==i&&e.fn[t].settings!==i},enabled:{modules:function(t){var n=[];return t=t||m.modules,e.each(t,function(e,t){r.moduleExists(t)&&n.push(t)}),n}},disabled:{modules:function(t){var n=[];return t=t||m.modules,e.each(t,function(e,t){r.moduleExists(t)||n.push(t)}),n}},change:{setting:function(t,n,o,a){o="string"==typeof o?"all"===o?m.modules:[o]:o||m.modules,a=a!==i?a:!0,e.each(o,function(i,o){var s,c=r.moduleExists(o)?e.fn[o].settings.namespace||!1:!0;r.moduleExists(o)&&(r.verbose("Changing default setting",t,n,o),e.fn[o].settings[t]=n,a&&c&&(s=e(":data(module-"+c+")"),s.size()>0&&(r.verbose("Modifying existing settings",s),s[o]("setting",t,n))))})},settings:function(t,n,o){n="string"==typeof n?[n]:n||m.modules,o=o!==i?o:!0,e.each(n,function(n,i){var a;r.moduleExists(i)&&(r.verbose("Changing default setting",t,i),e.extend(!0,e.fn[i].settings,t),o&&f&&(a=e(":data(module-"+f+")"),a.size()>0&&(r.verbose("Modifying existing settings",a),a[i]("setting",t))))})}},enable:{console:function(){r.console(!0)},debug:function(e,t){e=e||m.modules,r.debug("Enabling debug for modules",e),r.change.setting("debug",!0,e,t)},verbose:function(e,t){e=e||m.modules,r.debug("Enabling verbose debug for modules",e),r.change.setting("verbose",!0,e,t)}},disable:{console:function(){r.console(!1)},debug:function(e,t){e=e||m.modules,r.debug("Disabling debug for modules",e),r.change.setting("debug",!1,e,t)},verbose:function(e,t){e=e||m.modules,r.debug("Disabling verbose debug for modules",e),r.change.setting("verbose",!1,e,t)}},console:function(e){if(e){if(y.cache.console===i)return void r.error(p.console);r.debug("Restoring console function"),t.console=y.cache.console}else r.debug("Disabling console function"),y.cache.console=t.console,t.console={clear:function(){},error:function(){},group:function(){},groupCollapsed:function(){},groupEnd:function(){},info:function(){},log:function(){},markTimeline:function(){},warn:function(){}}},destroy:function(){r.verbose("Destroying previous site for",v),v.removeData(g)},cache:{},setting:function(t,n){if(e.isPlainObject(t))e.extend(!0,m,t);else{if(n===i)return m[t];m[t]=n}},internal:function(t,n){if(e.isPlainObject(t))e.extend(!0,r,t);else{if(n===i)return r[t];r[t]=n}},debug:function(){m.debug&&(m.performance?r.performance.log(arguments):(r.debug=Function.prototype.bind.call(console.info,console,m.name+":"),r.debug.apply(console,arguments)))},verbose:function(){m.verbose&&m.debug&&(m.performance?r.performance.log(arguments):(r.verbose=Function.prototype.bind.call(console.info,console,m.name+":"),r.verbose.apply(console,arguments)))},error:function(){r.error=Function.prototype.bind.call(console.error,console,m.name+":"),r.error.apply(console,arguments)},performance:{log:function(e){var t,n,i;m.performance&&(t=(new Date).getTime(),i=s||t,n=t-i,s=t,c.push({Element:h,Name:e[0],Arguments:[].slice.call(e,1)||"","Execution Time":n})),clearTimeout(r.performance.timer),r.performance.timer=setTimeout(r.performance.display,100)},display:function(){var t=m.name+":",n=0;s=!1,clearTimeout(r.performance.timer),e.each(c,function(e,t){n+=t["Execution Time"]}),t+=" "+n+"ms",(console.group!==i||console.table!==i)&&c.length>0&&(console.groupCollapsed(t),console.table?console.table(c):e.each(c,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),c=[]}},invoke:function(t,n,o){var s,c,l,u=y;return n=n||d,o=h||o,"string"==typeof t&&u!==i&&(t=t.split(/[\. ]/),s=t.length-1,e.each(t,function(n,o){var a=n!=s?o+t[n+1].charAt(0).toUpperCase()+t[n+1].slice(1):t;if(e.isPlainObject(u[a])&&n!=s)u=u[a];else{if(u[a]!==i)return c=u[a],!1;if(!e.isPlainObject(u[o])||n==s)return u[o]!==i?(c=u[o],!1):(r.error(p.method,t),!1);u=u[o]}})),e.isFunction(c)?l=c.apply(o,n):c!==i&&(l=c),e.isArray(a)?a.push(l):a!==i?a=[a,l]:l!==i&&(a=l),c}},u?(y===i&&r.initialize(),r.invoke(l)):(y!==i&&r.destroy(),r.initialize()),a!==i?a:this},e.site.settings={name:"Site",namespace:"site",error:{console:"Console cannot be restored, most likely it was overwritten outside of module",method:"The method you called is not defined."},debug:!1,verbose:!0,performance:!0,modules:["accordion","api","checkbox","dimmer","dropdown","form","modal","nag","popup","rating","shape","sidebar","state","sticky","tab","transition","video","visit","visibility"],siteNamespace:"site",namespaceStub:{cache:{},config:{},sections:{},section:{},utilities:{}}},e.extend(e.expr[":"],{data:e.expr.createPseudo?e.expr.createPseudo(function(t){return function(n){return!!e.data(n,t)}}):function(t,n,i){return!!e.data(t,i[3])}})}(jQuery,window,document),function(e,t,n,i){e.fn.form=function(t,o){var r,a=e(this),s=e.extend(!0,{},e.fn.form.settings,o),c=e.extend({},e.fn.form.settings.defaults,t),l=s.namespace,u=s.metadata,d=s.selector,m=s.className,f=(s.error,"."+l),p="module-"+l,g=a.selector||"",b=(new Date).getTime(),v=[],h=arguments[0],y="string"==typeof h,x=[].slice.call(arguments,1);return a.each(function(){var t,o=e(this),l=e(this).find(d.field),w=e(this).find(d.group),C=e(this).find(d.message),T=(e(this).find(d.prompt),e(this).find(d.submit)),k=[],S=this,z=o.data(p);t={initialize:function(){t.verbose("Initializing form validation",o,c,s),t.bindEvents(),t.instantiate()},instantiate:function(){t.verbose("Storing instance of module",t),z=t,o.data(p,t)},destroy:function(){t.verbose("Destroying previous module",z),t.removeEvents(),o.removeData(p)},refresh:function(){t.verbose("Refreshing selector cache"),l=o.find(d.field)},submit:function(){t.verbose("Submitting form",o),o.submit()},attachEvents:function(n,i){i=i||"submit",e(n).on("click",function(e){t[i](),e.preventDefault()})},bindEvents:function(){s.keyboardShortcuts&&l.on("keydown"+f,t.event.field.keydown),o.on("submit"+f,t.validate.form),l.on("blur"+f,t.event.field.blur),t.attachEvents(T,"submit"),l.each(function(){var n=e(this).prop("type"),i=t.get.changeEvent(n);e(this).on(i+f,t.event.field.change)})},removeEvents:function(){o.off(f),l.off(f),T.off(f),l.off(f)},event:{field:{keydown:function(n){var i=e(this),o=n.which,r={enter:13,escape:27};o==r.escape&&(t.verbose("Escape key pressed blurring field"),i.blur()),!n.ctrlKey&&o==r.enter&&i.is(d.input)&&i.not(d.checkbox).size()>0&&(t.debug("Enter key pressed, submitting form"),T.addClass(m.down),i.one("keyup"+f,t.event.field.keyup))},keyup:function(){t.verbose("Doing keyboard shortcut form submit"),T.removeClass(m.down),t.submit()},blur:function(){var n=e(this),i=n.closest(w);i.hasClass(m.error)?(t.debug("Revalidating field",n,t.get.validation(n)),t.validate.field(t.get.validation(n))):("blur"==s.on||"change"==s.on)&&t.validate.field(t.get.validation(n))},change:function(){var n=e(this),i=n.closest(w);("change"==s.on||i.hasClass(m.error)&&s.revalidate)&&(clearTimeout(t.timer),t.timer=setTimeout(function(){t.debug("Revalidating field",n,t.get.validation(n)),t.validate.field(t.get.validation(n))},s.delay))}}},get:{changeEvent:function(e){return"checkbox"==e||"radio"==e||"hidden"==e?"change":n.createElement("input").oninput!==i?"input":n.createElement("input").onpropertychange!==i?"propertychange":"keyup"},field:function(n){return t.verbose("Finding field with identifier",n),l.filter("#"+n).size()>0?l.filter("#"+n):l.filter('[name="'+n+'"]').size()>0?l.filter('[name="'+n+'"]'):l.filter("[data-"+u.validate+'="'+n+'"]').size()>0?l.filter("[data-"+u.validate+'="'+n+'"]'):e("<input/>")},validation:function(n){var i;return e.each(c,function(e,o){t.get.field(o.identifier).get(0)==n.get(0)&&(i=o)}),i||!1}},has:{field:function(e){return t.verbose("Checking for existence of a field with identifier",e),l.filter("#"+e).size()>0?!0:l.filter('[name="'+e+'"]').size()>0?!0:l.filter("[data-"+u.validate+'="'+e+'"]').size()>0?!0:!1}},add:{prompt:function(n,r){var a=t.get.field(n),c=a.closest(w),l=c.find(d.prompt),u=0!==l.size();r="string"==typeof r?[r]:r,t.verbose("Adding field error state",n),c.addClass(m.error),s.inline&&(u||(l=s.templates.prompt(r),l.appendTo(c)),l.html(r[0]),u?t.verbose("Inline errors are disabled, no inline error added",n):s.transition&&e.fn.transition!==i&&o.transition("is supported")?(t.verbose("Displaying error with css transition",s.transition),l.transition(s.transition+" in",s.duration)):(t.verbose("Displaying error with fallback javascript animation"),l.fadeIn(s.duration)))},errors:function(e){t.debug("Adding form error messages",e),C.html(s.templates.error(e))}},remove:{prompt:function(n){var r=t.get.field(n.identifier),a=r.closest(w),c=a.find(d.prompt);a.removeClass(m.error),s.inline&&c.is(":visible")&&(t.verbose("Removing prompt for field",n),s.transition&&e.fn.transition!==i&&o.transition("is supported")?c.transition(s.transition+" out",s.duration,function(){c.remove()}):c.fadeOut(s.duration,function(){c.remove()}))}},set:{success:function(){o.removeClass(m.error).addClass(m.success)},error:function(){o.removeClass(m.success).addClass(m.error)}},validate:{form:function(n){var r=!0;return k=[],e.each(c,function(e,n){t.validate.field(n)||(r=!1)}),r?(t.debug("Form has no validation errors, submitting"),t.set.success(),e.proxy(s.onSuccess,this)(n)):(t.debug("Form has errors"),t.set.error(),s.inline||t.add.errors(k),o.data("moduleApi")!==i&&n.stopImmediatePropagation(),e.proxy(s.onFailure,this)(k))},field:function(n){var o=t.get.field(n.identifier),r=!0,a=[];return n.optional&&""===e.trim(o.val())?(t.debug("Field is optional and empty. Skipping",n.identifier),r=!0):n.rules!==i&&e.each(n.rules,function(e,i){t.has.field(n.identifier)&&!t.validate.rule(n,i)&&(t.debug("Field is invalid",n.identifier,i.type),a.push(i.prompt),r=!1)}),r?(t.remove.prompt(n,a),e.proxy(s.onValid,o)(),!0):(k=k.concat(a),t.add.prompt(n.identifier,a),e.proxy(s.onInvalid,o)(a),!1)},rule:function(n,r){var a,c,l=t.get.field(n.identifier),u=r.type,d=e.trim(l.val()+""),m=/\[(.*)\]/i,f=m.exec(u),p=!0;return f!==i&&null!==f?(a=""+f[1],c=u.replace(f[0],""),p=e.proxy(s.rules[c],o)(d,a)):p=e.proxy(s.rules[u],l)(d),p}},setting:function(t,n){if(e.isPlainObject(t))e.extend(!0,s,t);else{if(n===i)return s[t];s[t]=n}},internal:function(n,o){if(e.isPlainObject(n))e.extend(!0,t,n);else{if(o===i)return t[n];t[n]=o}},debug:function(){s.debug&&(s.performance?t.performance.log(arguments):(t.debug=Function.prototype.bind.call(console.info,console,s.name+":"),t.debug.apply(console,arguments)))},verbose:function(){s.verbose&&s.debug&&(s.performance?t.performance.log(arguments):(t.verbose=Function.prototype.bind.call(console.info,console,s.name+":"),t.verbose.apply(console,arguments)))},error:function(){t.error=Function.prototype.bind.call(console.error,console,s.name+":"),t.error.apply(console,arguments)},performance:{log:function(e){var n,i,o;s.performance&&(n=(new Date).getTime(),o=b||n,i=n-o,b=n,v.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:S,"Execution Time":i})),clearTimeout(t.performance.timer),t.performance.timer=setTimeout(t.performance.display,100)},display:function(){var n=s.name+":",o=0;b=!1,clearTimeout(t.performance.timer),e.each(v,function(e,t){o+=t["Execution Time"]}),n+=" "+o+"ms",g&&(n+=" '"+g+"'"),a.size()>1&&(n+=" ("+a.size()+")"),(console.group!==i||console.table!==i)&&v.length>0&&(console.groupCollapsed(n),console.table?console.table(v):e.each(v,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),v=[]}},invoke:function(t,n,o){var a,s,c,l=z;return n=n||x,o=S||o,"string"==typeof t&&l!==i&&(t=t.split(/[\. ]/),a=t.length-1,e.each(t,function(n,o){var r=n!=a?o+t[n+1].charAt(0).toUpperCase()+t[n+1].slice(1):t;if(e.isPlainObject(l[r])&&n!=a)l=l[r];else{if(l[r]!==i)return s=l[r],!1;if(!e.isPlainObject(l[o])||n==a)return l[o]!==i?(s=l[o],!1):!1;l=l[o]}})),e.isFunction(s)?c=s.apply(o,n):s!==i&&(c=s),e.isArray(r)?r.push(c):r!==i?r=[r,c]:c!==i&&(r=c),s}},y?(z===i&&t.initialize(),t.invoke(h)):(z!==i&&t.destroy(),t.initialize())}),r!==i?r:this},e.fn.form.settings={name:"Form",namespace:"form",debug:!1,verbose:!0,performance:!0,keyboardShortcuts:!0,on:"submit",inline:!1,delay:200,revalidate:!0,transition:"scale",duration:200,onValid:function(){},onInvalid:function(){},onSuccess:function(){return!0},onFailure:function(){return!1},metadata:{validate:"validate"},selector:{message:".error.message",field:"input, textarea, select",group:".field",checkbox:'input[type="checkbox"], input[type="radio"]',input:"input",prompt:".prompt",submit:".submit"},className:{error:"error",success:"success",down:"down",label:"ui prompt label"},error:{method:"The method you called is not defined."},templates:{error:function(t){var n='<ul class="list">';return e.each(t,function(e,t){n+="<li>"+t+"</li>"}),n+="</ul>",e(n)},prompt:function(t){return e("<div/>").addClass("ui red pointing prompt label").html(t[0])}},rules:{checked:function(){return e(this).filter(":checked").size()>0},contains:function(e,t){return t=t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),-1!==e.search(t)},email:function(e){var t=new RegExp("[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?","i");return t.test(e)},empty:function(e){return!(e===i||""===e)},integer:function(e,t){var n,o,r,a=/^\-?\d+$/;return t===i||""===t||".."===t||(-1==t.indexOf("..")?a.test(t)&&(n=o=t-0):(r=t.split("..",2),a.test(r[0])&&(n=r[0]-0),a.test(r[1])&&(o=r[1]-0))),a.test(e)&&(n===i||e>=n)&&(o===i||o>=e)},is:function(e,t){return e==t},length:function(e,t){return e!==i?e.length>=t:!1},match:function(t,n){var o,r=e(this);return r.find("#"+n).size()>0?o=r.find("#"+n).val():r.find('[name="'+n+'"]').size()>0?o=r.find('[name="'+n+'"]').val():r.find('[data-validate="'+n+'"]').size()>0&&(o=r.find('[data-validate="'+n+'"]').val()),o!==i?t.toString()==o.toString():!1},maxLength:function(e,t){return e!==i?e.length<=t:!1},not:function(e,t){return e!=t},url:function(e){var t=/(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/;return t.test(e)}}}}(jQuery,window,document),function(e,t,n,i){"use strict";e.fn.accordion=function(n){{var o,r=e(this),a=(new Date).getTime(),s=[],c=arguments[0],l="string"==typeof c,u=[].slice.call(arguments,1);t.requestAnimationFrame||t.mozRequestAnimationFrame||t.webkitRequestAnimationFrame||t.msRequestAnimationFrame||function(e){setTimeout(e,0)}}return r.each(function(){var d,m,f=e.isPlainObject(n)?e.extend(!0,{},e.fn.accordion.settings,n):e.extend({},e.fn.accordion.settings),p=f.className,g=f.namespace,b=f.selector,v=(f.error,"."+g),h="module-"+g,y=r.selector||"",x=e(this),w=x.find(b.title),C=x.find(b.content),T=this,k=x.data(h);m={initialize:function(){m.debug("Initializing accordion with bound events",x),x.on("click"+v,b.title,m.event.click),m.observeChanges(),m.instantiate()},instantiate:function(){k=m,x.data(h,m)},destroy:function(){m.debug("Destroying previous accordion for",x),x.removeData(h),w.off(v)},refresh:function(){w=x.find(b.title),C=x.find(b.content)},observeChanges:function(){"MutationObserver"in t&&(d=new MutationObserver(function(){m.debug("DOM tree modified, updating selector cache"),m.refresh()}),d.observe(T,{childList:!0,subtree:!0}),m.debug("Setting up mutation observer",d))},event:{click:function(){e.proxy(m.toggle,this)()}},toggle:function(t){var n=t!==i?"number"==typeof t?w.eq(t):e(t):e(this),o=n.next(C),r=o.is(":visible");m.debug("Toggling visibility of content",n),r?f.collapsible?e.proxy(m.close,n)():m.debug("Cannot close accordion content collapsing is disabled"):e.proxy(m.open,n)()},open:function(t){var n=t!==i?"number"==typeof t?w.eq(t):e(t):e(this),o=n.next(C),r=o.is(":animated"),a=o.hasClass(p.active);r||a||(m.debug("Opening accordion content",n),f.exclusive&&e.proxy(m.closeOthers,n)(),n.addClass(p.active),o.stop().children().stop().animate({opacity:1},f.duration,m.reset.display).end().slideDown(f.duration,f.easing,function(){o.addClass(p.active),e.proxy(m.reset.display,this)(),e.proxy(f.onOpen,this)(),e.proxy(f.onChange,this)()}))},close:function(t){var n=t!==i?"number"==typeof t?w.eq(t):e(t):e(this),o=n.next(C),r=o.hasClass(p.active);r&&(m.debug("Closing accordion content",o),n.removeClass(p.active),o.removeClass(p.active).show().stop().children().stop().animate({opacity:0},f.duration,m.reset.opacity).end().slideUp(f.duration,f.easing,function(){e.proxy(m.reset.display,this)(),e.proxy(f.onClose,this)(),e.proxy(f.onChange,this)()}))},closeOthers:function(t){var n,o,r,a=t!==i?w.eq(t):e(this),s=a.parents(b.content).prev(b.title),c=a.closest(b.accordion),l=b.title+"."+p.active+":visible",u=b.content+"."+p.active+":visible";f.closeNested?(n=c.find(l).not(s),r=n.next(C)):(n=c.find(l).not(s),o=c.find(u).find(l).not(s),n=n.not(o),r=n.next(C)),n.size()>0&&(m.debug("Exclusive enabled, closing other content",n),n.removeClass(p.active),r.stop().children().stop().animate({opacity:0},f.duration,m.resetOpacity).end().slideUp(f.duration,f.easing,function(){e(this).removeClass(p.active),e.proxy(m.reset.display,this)()}))},reset:{display:function(){m.verbose("Removing inline display from element",this),e(this).css("display",""),""===e(this).attr("style")&&e(this).attr("style","").removeAttr("style")},opacity:function(){m.verbose("Removing inline opacity from element",this),e(this).css("opacity",""),""===e(this).attr("style")&&e(this).attr("style","").removeAttr("style")}},setting:function(t,n){if(m.debug("Changing setting",t,n),e.isPlainObject(t))e.extend(!0,f,t);else{if(n===i)return f[t];f[t]=n}},internal:function(t,n){return m.debug("Changing internal",t,n),n===i?m[t]:void(e.isPlainObject(t)?e.extend(!0,m,t):m[t]=n)},debug:function(){f.debug&&(f.performance?m.performance.log(arguments):(m.debug=Function.prototype.bind.call(console.info,console,f.name+":"),m.debug.apply(console,arguments)))},verbose:function(){f.verbose&&f.debug&&(f.performance?m.performance.log(arguments):(m.verbose=Function.prototype.bind.call(console.info,console,f.name+":"),m.verbose.apply(console,arguments)))},error:function(){m.error=Function.prototype.bind.call(console.error,console,f.name+":"),m.error.apply(console,arguments)},performance:{log:function(e){var t,n,i;f.performance&&(t=(new Date).getTime(),i=a||t,n=t-i,a=t,s.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:T,"Execution Time":n})),clearTimeout(m.performance.timer),m.performance.timer=setTimeout(m.performance.display,100)},display:function(){var t=f.name+":",n=0;a=!1,clearTimeout(m.performance.timer),e.each(s,function(e,t){n+=t["Execution Time"]}),t+=" "+n+"ms",y&&(t+=" '"+y+"'"),(console.group!==i||console.table!==i)&&s.length>0&&(console.groupCollapsed(t),console.table?console.table(s):e.each(s,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),s=[]}},invoke:function(t,n,r){var a,s,c,l=k;return n=n||u,r=T||r,"string"==typeof t&&l!==i&&(t=t.split(/[\. ]/),a=t.length-1,e.each(t,function(n,o){var r=n!=a?o+t[n+1].charAt(0).toUpperCase()+t[n+1].slice(1):t;if(e.isPlainObject(l[r])&&n!=a)l=l[r];else{if(l[r]!==i)return s=l[r],!1;if(!e.isPlainObject(l[o])||n==a)return l[o]!==i?(s=l[o],!1):!1;l=l[o]}})),e.isFunction(s)?c=s.apply(r,n):s!==i&&(c=s),e.isArray(o)?o.push(c):o!==i?o=[o,c]:c!==i&&(o=c),s}},l?(k===i&&m.initialize(),m.invoke(c)):(k!==i&&m.destroy(),m.initialize())}),o!==i?o:this},e.fn.accordion.settings={name:"Accordion",namespace:"accordion",debug:!1,verbose:!0,performance:!0,exclusive:!0,collapsible:!0,closeNested:!1,duration:500,easing:"easeInOutQuint",onOpen:function(){},onClose:function(){},onChange:function(){},error:{method:"The method you called is not defined"},className:{active:"active"},selector:{accordion:".accordion",title:".title",content:".content"}},e.extend(e.easing,{easeInOutQuint:function(e,t,n,i,o){return(t/=o/2)<1?i/2*t*t*t*t*t+n:i/2*((t-=2)*t*t*t*t+2)+n}})}(jQuery,window,document),function(e,t,n,i){"use strict";e.fn.checkbox=function(n){var o,r=e(this),a=r.selector||"",s=(new Date).getTime(),c=[],l=arguments[0],u="string"==typeof l,d=[].slice.call(arguments,1);return r.each(function(){var r,m,f=e.extend(!0,{},e.fn.checkbox.settings,n),p=f.className,g=f.namespace,b=f.selector,v=f.error,h="."+g,y="module-"+g,x=e(this),w=e(this).find(b.label).first(),C=e(this).find(b.input),T=x.data(y),k=this;m={initialize:function(){m.verbose("Initializing checkbox",f),m.create.label(),m.add.events(),m.is.checked()?(m.set.checked(),f.fireOnInit&&e.proxy(f.onChecked,C.get())()):(m.remove.checked(),f.fireOnInit&&e.proxy(f.onUnchecked,C.get())()),m.observeChanges(),m.instantiate()},instantiate:function(){m.verbose("Storing instance of module",m),T=m,x.data(y,m)},destroy:function(){m.verbose("Destroying module"),m.remove.events(),x.removeData(y)},refresh:function(){x=e(this),w=e(this).find(b.label).first(),C=e(this).find(b.input)},observeChanges:function(){"MutationObserver"in t&&(r=new MutationObserver(function(){m.debug("DOM tree modified, updating selector cache"),m.refresh()}),r.observe(k,{childList:!0,subtree:!0}),m.debug("Setting up mutation observer",r))},attachEvents:function(t,n){var i=e(t);n=e.isFunction(m[n])?m[n]:m.toggle,i.size()>0?(m.debug("Attaching checkbox events to element",t,n),i.on("click"+h,n)):m.error(v.notFound)},event:{keydown:function(t){var n=t.which,i={enter:13,escape:27};n==i.escape&&(m.verbose("Escape key pressed blurring field"),x.blur()),t.ctrlKey||n!=i.enter||(m.verbose("Enter key pressed, toggling checkbox"),e.proxy(m.toggle,this)(),t.preventDefault())}},is:{radio:function(){return x.hasClass(p.radio)},checked:function(){return C.prop("checked")!==i&&C.prop("checked")},unchecked:function(){return!m.is.checked()}},can:{change:function(){return!(x.hasClass(p.disabled)||x.hasClass(p.readOnly)||C.prop("disabled"))},uncheck:function(){return"boolean"==typeof f.uncheckable?f.uncheckable:!m.is.radio()}},set:{checked:function(){x.addClass(p.checked)},tab:function(){C.attr("tabindex")===i&&C.attr("tabindex",0)}},create:{label:function(){C.prevAll(b.label).size()>0?(C.prev(b.label).detach().insertAfter(C),m.debug("Moving existing label",w)):m.has.label()||(w=e("<label>").insertAfter(C),m.debug("Creating label",w))}},has:{label:function(){return w.size()>0}},add:{events:function(){m.verbose("Attaching checkbox events"),x.on("click"+h,m.toggle).on("keydown"+h,b.input,m.event.keydown)}},remove:{checked:function(){x.removeClass(p.checked)},events:function(){m.debug("Removing events"),x.off(h).removeData(y),C.off(h,m.event.keydown),w.off(h)}},enable:function(){m.debug("Enabling checkbox functionality"),x.removeClass(p.disabled),C.prop("disabled",!1),e.proxy(f.onEnabled,C.get())()},disable:function(){m.debug("Disabling checkbox functionality"),x.addClass(p.disabled),C.prop("disabled","disabled"),e.proxy(f.onDisabled,C.get())()},check:function(){m.debug("Enabling checkbox",C),C.prop("checked",!0).trigger("change"),m.set.checked(),e.proxy(f.onChange,C.get())(),e.proxy(f.onChecked,C.get())()},uncheck:function(){m.debug("Disabling checkbox"),C.prop("checked",!1).trigger("change"),m.remove.checked(),e.proxy(f.onChange,C.get())(),e.proxy(f.onUnchecked,C.get())()},toggle:function(){return m.can.change()?(m.verbose("Determining new checkbox state"),void(m.is.unchecked()?m.check():m.is.checked()&&m.can.uncheck()&&m.uncheck())):(console.log(m.can.change()),void m.debug("Checkbox is read-only or disabled, ignoring toggle"))},setting:function(t,n){if(m.debug("Changing setting",t,n),e.isPlainObject(t))e.extend(!0,f,t);else{if(n===i)return f[t];f[t]=n}},internal:function(t,n){if(e.isPlainObject(t))e.extend(!0,m,t);else{if(n===i)return m[t];m[t]=n}},debug:function(){f.debug&&(f.performance?m.performance.log(arguments):(m.debug=Function.prototype.bind.call(console.info,console,f.name+":"),m.debug.apply(console,arguments)))},verbose:function(){f.verbose&&f.debug&&(f.performance?m.performance.log(arguments):(m.verbose=Function.prototype.bind.call(console.info,console,f.name+":"),m.verbose.apply(console,arguments)))},error:function(){m.error=Function.prototype.bind.call(console.error,console,f.name+":"),m.error.apply(console,arguments)},performance:{log:function(e){var t,n,i;f.performance&&(t=(new Date).getTime(),i=s||t,n=t-i,s=t,c.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:k,"Execution Time":n})),clearTimeout(m.performance.timer),m.performance.timer=setTimeout(m.performance.display,100)},display:function(){var t=f.name+":",n=0;s=!1,clearTimeout(m.performance.timer),e.each(c,function(e,t){n+=t["Execution Time"]}),t+=" "+n+"ms",a&&(t+=" '"+a+"'"),(console.group!==i||console.table!==i)&&c.length>0&&(console.groupCollapsed(t),console.table?console.table(c):e.each(c,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),c=[]}},invoke:function(t,n,r){var a,s,c,l=T;return n=n||d,r=k||r,"string"==typeof t&&l!==i&&(t=t.split(/[\. ]/),a=t.length-1,e.each(t,function(n,o){var r=n!=a?o+t[n+1].charAt(0).toUpperCase()+t[n+1].slice(1):t;if(e.isPlainObject(l[r])&&n!=a)l=l[r];else{if(l[r]!==i)return s=l[r],!1;if(!e.isPlainObject(l[o])||n==a)return l[o]!==i?(s=l[o],!1):!1;l=l[o]}})),e.isFunction(s)?c=s.apply(r,n):s!==i&&(c=s),e.isArray(o)?o.push(c):o!==i?o=[o,c]:c!==i&&(o=c),s}},u?(T===i&&m.initialize(),m.invoke(l)):(T!==i&&m.destroy(),m.initialize())}),o!==i?o:this},e.fn.checkbox.settings={name:"Checkbox",namespace:"checkbox",debug:!1,verbose:!0,performance:!0,uncheckable:"auto",fireOnInit:!0,onChange:function(){},onChecked:function(){},onUnchecked:function(){},onEnabled:function(){},onDisabled:function(){},className:{checked:"checked",disabled:"disabled",radio:"radio",readOnly:"read-only"},error:{method:"The method you called is not defined."},selector:{input:"input[type=checkbox], input[type=radio]",label:"label"}}}(jQuery,window,document),function(e,t,n,i){e.fn.dimmer=function(t){var o,r=e(this),a=(new Date).getTime(),s=[],c=arguments[0],l="string"==typeof c,u=[].slice.call(arguments,1);return r.each(function(){var d,m,f,p=e.isPlainObject(t)?e.extend(!0,{},e.fn.dimmer.settings,t):e.extend({},e.fn.dimmer.settings),g=p.selector,b=p.namespace,v=p.className,h=(p.error,"."+b),y="module-"+b,x=r.selector||"",w="ontouchstart"in n.documentElement?"touchstart":"click",C=e(this),T=this,k=C.data(y);f={preinitialize:function(){f.is.dimmer()?(m=C.parent(),d=C):(m=C,d=f.has.dimmer()?p.dimmerName?m.children(g.dimmer).filter("."+p.dimmerName):m.children(g.dimmer):f.create())},initialize:function(){f.debug("Initializing dimmer",p),"hover"==p.on?m.on("mouseenter"+h,f.show).on("mouseleave"+h,f.hide):"click"==p.on&&m.on(w+h,f.toggle),f.is.page()&&(f.debug("Setting as a page dimmer",m),f.set.pageDimmer()),f.is.closable()&&(f.verbose("Adding dimmer close event",d),d.on(w+h,f.event.click)),f.set.dimmable(),f.instantiate()},instantiate:function(){f.verbose("Storing instance of module",f),k=f,C.data(y,k)},destroy:function(){f.verbose("Destroying previous module",d),C.removeData(y),m.off(h),d.off(h)},event:{click:function(t){f.verbose("Determining if event occured on dimmer",t),(0===d.find(t.target).size()||e(t.target).is(g.content))&&(f.hide(),t.stopImmediatePropagation())}},addContent:function(t){var n=e(t);f.debug("Add content to dimmer",n),n.parent()[0]!==d[0]&&n.detach().appendTo(d)},create:function(){var t=e(p.template.dimmer());return p.variation&&(f.debug("Creating dimmer with variation",p.variation),t.addClass(v.variation)),p.dimmerName&&(f.debug("Creating named dimmer",p.dimmerName),t.addClass(p.dimmerName)),t.appendTo(m),t},show:function(t){t=e.isFunction(t)?t:function(){},f.debug("Showing dimmer",d,p),f.is.dimmed()&&!f.is.animating()||!f.is.enabled()?f.debug("Dimmer is already shown or disabled"):(f.animate.show(t),e.proxy(p.onShow,T)(),e.proxy(p.onChange,T)())},hide:function(t){t=e.isFunction(t)?t:function(){},f.is.dimmed()||f.is.animating()?(f.debug("Hiding dimmer",d),f.animate.hide(t),e.proxy(p.onHide,T)(),e.proxy(p.onChange,T)()):f.debug("Dimmer is not visible")},toggle:function(){f.verbose("Toggling dimmer visibility",d),f.is.dimmed()?f.hide():f.show()},animate:{show:function(t){t=e.isFunction(t)?t:function(){},p.useCSS&&e.fn.transition!==i&&d.transition("is supported")?d.transition({animation:p.transition+" in",queue:!1,duration:f.get.duration(),onStart:function(){f.set.dimmed()},onComplete:function(){f.set.active(),t()}}):(f.verbose("Showing dimmer animation with javascript"),f.set.dimmed(),d.stop().css({opacity:0,width:"100%",height:"100%"}).fadeTo(f.get.duration(),1,function(){d.removeAttr("style"),f.set.active(),t()}))},hide:function(t){t=e.isFunction(t)?t:function(){},p.useCSS&&e.fn.transition!==i&&d.transition("is supported")?(f.verbose("Hiding dimmer with css"),d.transition({animation:p.transition+" out",queue:!1,duration:f.get.duration(),onStart:function(){f.remove.dimmed()},onComplete:function(){f.remove.active(),t()}})):(f.verbose("Hiding dimmer with javascript"),f.remove.dimmed(),d.stop().fadeOut(f.get.duration(),function(){f.remove.active(),d.removeAttr("style"),t()}))}},get:{dimmer:function(){return d},duration:function(){return"object"==typeof p.duration?f.is.active()?p.duration.hide:p.duration.show:p.duration}},has:{dimmer:function(){return p.dimmerName?C.children(g.dimmer).filter("."+p.dimmerName).size()>0:C.children(g.dimmer).size()>0}},is:{active:function(){return d.hasClass(v.active)},animating:function(){return d.is(":animated")||d.hasClass(v.animating)},closable:function(){return"auto"==p.closable?"hover"==p.on?!1:!0:p.closable},dimmer:function(){return C.is(g.dimmer)},dimmable:function(){return C.is(g.dimmable)},dimmed:function(){return m.hasClass(v.dimmed)},disabled:function(){return m.hasClass(v.disabled)},enabled:function(){return!f.is.disabled()},page:function(){return m.is("body")},pageDimmer:function(){return d.hasClass(v.pageDimmer)}},can:{show:function(){return!d.hasClass(v.disabled)}},set:{active:function(){d.addClass(v.active)},dimmable:function(){m.addClass(v.dimmable)},dimmed:function(){m.addClass(v.dimmed)},pageDimmer:function(){d.addClass(v.pageDimmer)},disabled:function(){d.addClass(v.disabled)}},remove:{active:function(){d.removeClass(v.active)},dimmed:function(){m.removeClass(v.dimmed)},disabled:function(){d.removeClass(v.disabled)}},setting:function(t,n){if(f.debug("Changing setting",t,n),e.isPlainObject(t))e.extend(!0,p,t);else{if(n===i)return p[t];p[t]=n}},internal:function(t,n){if(e.isPlainObject(t))e.extend(!0,f,t);else{if(n===i)return f[t];f[t]=n}},debug:function(){p.debug&&(p.performance?f.performance.log(arguments):(f.debug=Function.prototype.bind.call(console.info,console,p.name+":"),f.debug.apply(console,arguments)))},verbose:function(){p.verbose&&p.debug&&(p.performance?f.performance.log(arguments):(f.verbose=Function.prototype.bind.call(console.info,console,p.name+":"),f.verbose.apply(console,arguments)))
},error:function(){f.error=Function.prototype.bind.call(console.error,console,p.name+":"),f.error.apply(console,arguments)},performance:{log:function(e){var t,n,i;p.performance&&(t=(new Date).getTime(),i=a||t,n=t-i,a=t,s.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:T,"Execution Time":n})),clearTimeout(f.performance.timer),f.performance.timer=setTimeout(f.performance.display,100)},display:function(){var t=p.name+":",n=0;a=!1,clearTimeout(f.performance.timer),e.each(s,function(e,t){n+=t["Execution Time"]}),t+=" "+n+"ms",x&&(t+=" '"+x+"'"),r.size()>1&&(t+=" ("+r.size()+")"),(console.group!==i||console.table!==i)&&s.length>0&&(console.groupCollapsed(t),console.table?console.table(s):e.each(s,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),s=[]}},invoke:function(t,n,r){var a,s,c,l=k;return n=n||u,r=T||r,"string"==typeof t&&l!==i&&(t=t.split(/[\. ]/),a=t.length-1,e.each(t,function(n,o){var r=n!=a?o+t[n+1].charAt(0).toUpperCase()+t[n+1].slice(1):t;if(e.isPlainObject(l[r])&&n!=a)l=l[r];else{if(l[r]!==i)return s=l[r],!1;if(!e.isPlainObject(l[o])||n==a)return l[o]!==i?(s=l[o],!1):!1;l=l[o]}})),e.isFunction(s)?c=s.apply(r,n):s!==i&&(c=s),e.isArray(o)?o.push(c):o!==i?o=[o,c]:c!==i&&(o=c),s}},f.preinitialize(),l?(k===i&&f.initialize(),f.invoke(c)):(k!==i&&f.destroy(),f.initialize())}),o!==i?o:this},e.fn.dimmer.settings={name:"Dimmer",namespace:"dimmer",debug:!1,verbose:!0,performance:!0,dimmerName:!1,variation:!1,closable:"auto",transition:"fade",useCSS:!0,on:!1,duration:{show:500,hide:500},onChange:function(){},onShow:function(){},onHide:function(){},error:{method:"The method you called is not defined."},selector:{dimmable:".dimmable",dimmer:".ui.dimmer",content:".ui.dimmer > .content, .ui.dimmer > .content > .center"},template:{dimmer:function(){return e("<div />").attr("class","ui dimmer")}},className:{active:"active",animating:"animating",dimmable:"dimmable",dimmed:"dimmed",disabled:"disabled",hide:"hide",pageDimmer:"page",show:"show"}}}(jQuery,window,document),function(e,t,n,i){"use strict";e.fn.dropdown=function(o){var r,a=e(this),s=e(n),c=a.selector||"",l="ontouchstart"in n.documentElement,u=(new Date).getTime(),d=[],m=arguments[0],f="string"==typeof m,p=[].slice.call(arguments,1);return a.each(function(){var n,g,b=e.isPlainObject(o)?e.extend(!0,{},e.fn.dropdown.settings,o):e.extend({},e.fn.dropdown.settings),v=b.className,h=b.metadata,y=b.namespace,x=b.selector,w=b.error,C="."+y,T="module-"+y,k=e(this),S=k.find(x.text),z=k.find(x.search),A=k.find(x.input),E=k.prev().find(x.text).size()>0?k.prev().find(x.text):k.prev(),F=k.children(x.menu),D=F.find(x.item),O=!1,P=!1,R=this,j=k.data(T);g={initialize:function(){g.debug("Initializing dropdown",b),g.setup.layout(),g.save.defaults(),g.set.selected(),l&&g.bind.touchEvents(),g.bind.mouseEvents(),g.bind.keyboardEvents(),g.observeChanges(),g.instantiate()},instantiate:function(){g.verbose("Storing instance of dropdown",g),j=g,k.data(T,g)},destroy:function(){g.verbose("Destroying previous dropdown for",k),g.remove.tabbable(),k.off(C).removeData(T)},observeChanges:function(){"MutationObserver"in t&&(n=new MutationObserver(function(){g.debug("DOM tree modified, updating selector cache"),g.refresh()}),n.observe(R,{childList:!0,subtree:!0}),g.debug("Setting up mutation observer",n))},setup:{layout:function(){k.is("select")&&g.setup.select(),g.is.search()&&!g.is.searchable()&&(z=e("<input />").addClass(v.search).insertBefore(S)),b.allowTab&&g.set.tabbable()},select:function(){var t=g.get.selectValues();g.debug("Dropdown initialized on a select",t),A=k,A.parents(x.dropdown).size()>0?(g.debug("Creating dropdown menu only from template"),k=A.closest(x.dropdown),0===k.find("."+v.dropdown).size()&&e("<div />").addClass(v.menu).html(b.templates.menu(t)).appendTo(k)):(g.debug("Creating entire dropdown from template"),k=e("<div />").attr("class",A.attr("class")).addClass(v.selection).addClass(v.dropdown).html(b.templates.dropdown(t)).insertBefore(A),A.removeAttr("class").prependTo(k)),g.refresh()}},refresh:function(){S=k.find(x.text),z=k.find(x.search),A=k.find(x.input),F=k.children(x.menu),D=F.find(x.item)},toggle:function(){g.verbose("Toggling menu visibility"),g.is.active()?g.hide():g.show()},show:function(){g.debug("Checking if dropdown can show"),g.is.active()||(g.animate.show(function(){g.can.click()&&g.bind.intent(),g.set.visible()}),e.proxy(b.onShow,R)())},hide:function(){g.is.active()&&(g.debug("Hiding dropdown"),g.animate.hide(function(){g.remove.visible()}),e.proxy(b.onHide,R)())},hideOthers:function(){g.verbose("Finding other dropdowns to hide"),a.not(k).has(x.menu+":visible:not(."+v.animating+")").dropdown("hide")},hideSubMenus:function(){var e=F.find(x.menu);e.transition("hide")},bind:{keyboardEvents:function(){g.debug("Binding keyboard events"),k.on("keydown"+C,g.event.keydown),g.is.searchable()&&k.on(g.get.inputEvent(),x.search,g.event.input)},touchEvents:function(){g.debug("Touch device detected binding additional touch events"),g.is.searchSelection()||k.on("touchstart"+C,g.event.test.toggle),F.on("touchstart"+C,x.item,g.event.item.mouseenter)},mouseEvents:function(){g.verbose("Mouse detected binding mouse events"),g.is.searchSelection()?k.on("mousedown"+C,x.menu,g.event.menu.activate).on("mouseup"+C,x.menu,g.event.menu.deactivate).on("focus"+C,x.search,g.event.searchFocus).on("click"+C,x.search,g.show).on("blur"+C,x.search,g.event.searchBlur):("click"==b.on?k.on("click"+C,g.event.test.toggle):"hover"==b.on?k.on("mouseenter"+C,g.delay.show).on("mouseleave"+C,g.delay.hide):k.on(b.on+C,g.toggle),k.on("mousedown"+C,g.event.mousedown).on("mouseup"+C,g.event.mouseup).on("focus"+C,g.event.focus).on("blur"+C,g.event.blur)),F.on("mouseenter"+C,x.item,g.event.item.mouseenter).on("mouseleave"+C,x.item,g.event.item.mouseleave).on("click"+C,x.item,g.event.item.click)},intent:function(){g.verbose("Binding hide intent event to document"),l&&s.on("touchstart"+C,g.event.test.touch).on("touchmove"+C,g.event.test.touch),s.on("click"+C,g.event.test.hide)}},unbind:{intent:function(){g.verbose("Removing hide intent event from document"),l&&s.off("touchstart"+C).off("touchmove"+C),s.off("click"+C)}},filter:function(t){var n,o,r=e(),a=new RegExp("(?:s|^)"+t,"i"),s=new RegExp(t,"i");D.each(function(){var t=e(this),n=t.data(h.text)!==i?t.data(h.text):b.preserveHTML?t.html():t.text(),o=t.data(h.value)!==i?t.data(h.value):"string"==typeof n?n.toLowerCase():n;a.test(n)||a.test(o)?r=r.add(t):b.fullTextSearch&&(s.test(n)||s.test(o))&&(r=r.add(t))}),o=D.not(r),n=o.size()==D.size(),g.remove.filteredItem(),g.remove.selectedItem(),o.addClass(v.filtered),D.not("."+v.filtered).eq(0).addClass(v.selected),n&&g.hide()},focusSearch:function(){g.is.search()&&z.focus()},event:{mousedown:function(){O=!0},mouseup:function(){O=!1},focus:function(){!O&&g.is.hidden()&&g.show()},blur:function(){O||g.hide()},searchFocus:function(){O=!0,g.show()},searchBlur:function(){P||g.hide()},input:function(){var e=z.val();g.is.searchSelection()&&(g.can.show()&&g.show(),g.set.filtered()),g.filter(e)},keydown:function(t){var n,i=D.not(v.filtered).filter("."+v.selected).eq(0),o=D.not("."+v.filtered),r=t.which,a={enter:13,escape:27,upArrow:38,downArrow:40},s=v.selected,c=o.index(i),l=i.size()>0;if(l||(i=D.filter("."+v.active).eq(0),l=i.size()>0),r==a.escape&&(g.verbose("Escape key pressed, closing dropdown"),g.hide()),g.is.visible()){if(r==a.enter&&l)return g.verbose("Enter key pressed, choosing selected item"),e.proxy(g.event.item.click,i)(t),t.preventDefault(),!1;r==a.upArrow?(n=l?i.prevAll(x.item+":not(."+v.filtered+")").eq(0):o.eq(0),0!==c&&(g.verbose("Up key pressed, changing active item"),D.removeClass(s),n.addClass(s),g.set.scrollPosition(n)),t.preventDefault()):r==a.downArrow&&(n=l?i.nextAll(x.item+":not(."+v.filtered+")").eq(0):o.eq(0),c+1<o.size()&&(g.verbose("Down key pressed, changing active item"),D.removeClass(s),n.addClass(s),g.set.scrollPosition(n)),t.preventDefault())}else r==a.enter&&g.show()},test:{toggle:function(e){g.determine.eventInMenu(e,g.toggle)&&e.preventDefault()},touch:function(e){g.determine.eventInMenu(e,function(){"touchstart"==e.type?g.timer=setTimeout(g.hide,b.delay.touch):"touchmove"==e.type&&clearTimeout(g.timer)}),e.stopPropagation()},hide:function(e){g.determine.eventInModule(e,g.hide)}},menu:{activate:function(){P=!0},deactivate:function(){P=!1}},item:{mouseenter:function(t){var n=e(this).children(x.menu),i=e(this).siblings(x.item).children(x.menu);n.size()>0&&(clearTimeout(g.itemTimer),g.itemTimer=setTimeout(function(){e.each(i,function(){g.animate.hide(!1,e(this))}),g.verbose("Showing sub-menu",n),g.animate.show(!1,n)},b.delay.show),t.preventDefault())},mouseleave:function(){var t=e(this).children(x.menu);t.size()>0&&(clearTimeout(g.itemTimer),g.itemTimer=setTimeout(function(){g.verbose("Hiding sub-menu",t),g.animate.hide(!1,t)},b.delay.hide))},click:function(){var t=e(this),n=t.data(h.text)!==i?t.data(h.text):b.preserveHTML?t.html():t.text(),o=t.data(h.value)!==i?t.data(h.value):"string"==typeof n?n.toLowerCase():n,r=function(){g.remove.searchTerm(),g.remove.filteredItem(),g.determine.selectAction(n,o)},a=t.find(x.menu).size()>0;a||r()}},resetStyle:function(){e(this).removeAttr("style")}},determine:{selectAction:function(t,n){g.verbose("Determining action",b.action),e.isFunction(g.action[b.action])?(g.verbose("Triggering preset action",b.action,t,n),g.action[b.action](t,n)):e.isFunction(b.action)?(g.verbose("Triggering user action",b.action,t,n),b.action(t,n)):g.error(w.action,b.action)},eventInModule:function(t,n){return n=n||function(){},0===e(t.target).closest(k).size()?(g.verbose("Triggering event",n),n(),!0):(g.verbose("Event occurred in dropdown, canceling callback"),!1)},eventInMenu:function(t,n){return n=n||function(){},0===e(t.target).closest(F).size()?(g.verbose("Triggering event",n),n(),!0):(g.verbose("Event occurred in dropdown menu, canceling callback"),!1)}},action:{nothing:function(){},hide:function(){g.hide()},select:function(e,t){t=t!==i?t:e,g.set.selected(t),g.set.value(t),g.hide()},activate:function(e,t){t=t!==i?t:e,g.set.selected(t),g.set.value(t),g.hide()},combo:function(e,t){t=t!==i?t:e,g.set.selected(t),g.set.value(t),g.hide()}},get:{text:function(){return S.text()},value:function(){return A.size()>0?A.val():k.data(h.value)},inputEvent:function(){var e=z[0];return e?e.oninput!==i?"input":e.onpropertychange!==i?"propertychange":"keyup":!1},selectValues:function(){var t={values:{}};return k.find("option").each(function(){var n=e(this).html(),o=e(this).attr("value")!==i?e(this).attr("value"):n;""===o?t.placeholder=n:t.values[o]=n}),g.debug("Retrieved values from select",t),t},item:function(t,n){var o=!1;return t=t!==i?t:g.get.value()!==i?g.get.value():g.get.text(),n=""===t||0===t?!0:n||!1,t!==i?D.each(function(){var r=e(this),a=r.data(h.text)!==i?r.data(h.text):b.preserveHTML?r.html():r.text(),s=r.data(h.value)!==i?r.data(h.value):"string"==typeof a?a.toLowerCase():a;n?(g.verbose("Ambiguous dropdown value using strict type check",r,t),s===t?o=e(this):o||a!==t||(o=e(this))):s==t?(g.verbose("Found select item by value",s,t),o=e(this)):o||a!=t||(g.verbose("Found select item by text",a,t),o=e(this))}):t=g.get.text(),o||!1}},restore:{defaults:function(){g.restore.defaultText(),g.restore.defaultValue()},defaultText:function(){var e=k.data(h.defaultText);g.debug("Restoring default text",e),g.set.text(e)},defaultValue:function(){var e=k.data(h.defaultValue);e!==i&&(g.debug("Restoring default value",e),g.set.selected(e),g.set.value(e))}},save:{defaults:function(){g.save.defaultText(),g.save.defaultValue()},defaultValue:function(){k.data(h.defaultValue,g.get.value())},defaultText:function(){k.data(h.defaultText,S.text())}},set:{filtered:function(){S.addClass(v.filtered)},tabbable:function(){g.is.searchable()?(g.debug("Searchable dropdown initialized"),z.val("").attr("tabindex",0),F.attr("tabindex","-1")):(g.debug("Simple selection dropdown initialized"),k.attr("tabindex")||(k.attr("tabindex",0),F.attr("tabindex","-1")))},scrollPosition:function(e){var t,n,i,o,r,a,s,c,e=e||g.get.item(),l=e&&e.size()>0,u=5;e&&l&&(a=F.height(),n=e.height(),r=F.scrollTop(),o=F.offset().top,i=e.offset().top,t=r-o+i,c=t+u>r+a,s=r>t-u,(s||c)&&(g.debug("Scrolling to active item"),F.scrollTop(t)))},text:function(e){"combo"==b.action?(g.debug("Changing combo button text",e,E),b.preserveHTML?E.html(e):E.text(e)):"select"!==b.action&&(g.debug("Changing text",e,S),S.removeClass(v.filtered).removeClass(v.placeholder),b.preserveHTML?S.html(e):S.text(e))},value:function(e){g.debug("Adding selected value to hidden input",e,A),A.size()>0?A.val(e).trigger("change"):k.data(h.value,e)},active:function(){k.addClass(v.active)},visible:function(){k.addClass(v.visible)},selected:function(t){var n,o=g.get.item(t);o&&(g.debug("Setting selected menu item to",o),n=o.data(h.text)!==i?o.data(h.text):b.preserveHTML?o.html():o.text(),g.remove.activeItem(),g.remove.selectedItem(),o.addClass(v.active).addClass(v.selected),g.set.text(n),e.proxy(b.onChange,R)(t,n,o))}},remove:{active:function(){k.removeClass(v.active)},visible:function(){k.removeClass(v.visible)},activeItem:function(){D.removeClass(v.active)},filteredItem:function(){D.removeClass(v.filtered)},searchTerm:function(){z.val("")},selectedItem:function(){D.removeClass(v.selected)},tabbable:function(){g.is.searchable()?(g.debug("Searchable dropdown initialized"),z.attr("tabindex","-1"),F.attr("tabindex","-1")):(g.debug("Simple selection dropdown initialized"),k.attr("tabindex","-1"),F.attr("tabindex","-1"))}},is:{search:function(){return k.hasClass(v.search)},searchable:function(){return z.size()>0},searchSelection:function(){return g.is.searchable()&&z.parent().is(k)},selection:function(){return k.hasClass(v.selection)},animating:function(e){return e?e.is(":animated")||e.transition&&e.transition("is animating"):F.is(":animated")||F.transition&&F.transition("is animating")},active:function(){return k.hasClass(v.active)},visible:function(e){return e?e.is(":visible"):F.is(":visible")},hidden:function(e){return e?e.is(":hidden"):F.is(":hidden")}},can:{click:function(){return l||"click"==b.on},show:function(){return!k.hasClass(v.disabled)}},animate:{show:function(t,n){var o=n||F,r=n?function(){}:function(){g.hideSubMenus(),g.hideOthers(),g.set.active(),g.set.scrollPosition()};t=t||function(){},g.verbose("Doing menu show animation",o),(g.is.hidden(o)||g.is.animating(o))&&("none"==b.transition?e.proxy(t,R)():e.fn.transition!==i&&k.transition("is supported")?o.transition({animation:b.transition+" in",debug:b.debug,verbose:b.verbose,duration:b.duration,queue:!0,onStart:r,onComplete:function(){e.proxy(t,R)()}}):"slide down"==b.transition?(r(),o.hide().clearQueue().children().clearQueue().css("opacity",0).delay(50).animate({opacity:1},b.duration,"easeOutQuad",g.event.resetStyle).end().slideDown(100,"easeOutQuad",function(){e.proxy(g.event.resetStyle,this)(),e.proxy(t,R)()})):"fade"==b.transition?(r(),o.hide().clearQueue().fadeIn(b.duration,function(){e.proxy(g.event.resetStyle,this)(),e.proxy(t,R)()})):g.error(w.transition,b.transition))},hide:function(t,n){var o=n||F,r=(n?.9*b.duration:b.duration,n?function(){}:function(){g.can.click()&&g.unbind.intent(),g.focusSearch(),g.remove.active()});t=t||function(){},(g.is.visible(o)||g.is.animating(o))&&(g.verbose("Doing menu hide animation",o),"none"==b.transition?e.proxy(t,R)():e.fn.transition!==i&&k.transition("is supported")?o.transition({animation:b.transition+" out",duration:b.duration,debug:b.debug,verbose:b.verbose,queue:!0,onStart:r,onComplete:function(){e.proxy(t,R)()}}):"slide down"==b.transition?(r(),o.show().clearQueue().children().clearQueue().css("opacity",1).animate({opacity:0},100,"easeOutQuad",g.event.resetStyle).end().delay(50).slideUp(100,"easeOutQuad",function(){e.proxy(g.event.resetStyle,this)(),e.proxy(t,R)()})):"fade"==b.transition?(r(),o.show().clearQueue().fadeOut(150,function(){e.proxy(g.event.resetStyle,this)(),e.proxy(t,R)()})):g.error(w.transition))}},delay:{show:function(){g.verbose("Delaying show event to ensure user intent"),clearTimeout(g.timer),g.timer=setTimeout(g.show,b.delay.show)},hide:function(){g.verbose("Delaying hide event to ensure user intent"),clearTimeout(g.timer),g.timer=setTimeout(g.hide,b.delay.hide)}},setting:function(t,n){if(g.debug("Changing setting",t,n),e.isPlainObject(t))e.extend(!0,b,t);else{if(n===i)return b[t];b[t]=n}},internal:function(t,n){if(e.isPlainObject(t))e.extend(!0,g,t);else{if(n===i)return g[t];g[t]=n}},debug:function(){b.debug&&(b.performance?g.performance.log(arguments):(g.debug=Function.prototype.bind.call(console.info,console,b.name+":"),g.debug.apply(console,arguments)))},verbose:function(){b.verbose&&b.debug&&(b.performance?g.performance.log(arguments):(g.verbose=Function.prototype.bind.call(console.info,console,b.name+":"),g.verbose.apply(console,arguments)))},error:function(){g.error=Function.prototype.bind.call(console.error,console,b.name+":"),g.error.apply(console,arguments)},performance:{log:function(e){var t,n,i;b.performance&&(t=(new Date).getTime(),i=u||t,n=t-i,u=t,d.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:R,"Execution Time":n})),clearTimeout(g.performance.timer),g.performance.timer=setTimeout(g.performance.display,100)},display:function(){var t=b.name+":",n=0;u=!1,clearTimeout(g.performance.timer),e.each(d,function(e,t){n+=t["Execution Time"]}),t+=" "+n+"ms",c&&(t+=" '"+c+"'"),(console.group!==i||console.table!==i)&&d.length>0&&(console.groupCollapsed(t),console.table?console.table(d):e.each(d,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),d=[]}},invoke:function(t,n,o){var a,s,c,l=j;return n=n||p,o=R||o,"string"==typeof t&&l!==i&&(t=t.split(/[\. ]/),a=t.length-1,e.each(t,function(n,o){var r=n!=a?o+t[n+1].charAt(0).toUpperCase()+t[n+1].slice(1):t;if(e.isPlainObject(l[r])&&n!=a)l=l[r];else{if(l[r]!==i)return s=l[r],!1;if(!e.isPlainObject(l[o])||n==a)return l[o]!==i?(s=l[o],!1):(g.error(w.method,t),!1);l=l[o]}})),e.isFunction(s)?c=s.apply(o,n):s!==i&&(c=s),e.isArray(r)?r.push(c):r!==i?r=[r,c]:c!==i&&(r=c),s}},f?(j===i&&g.initialize(),g.invoke(m)):(j!==i&&g.destroy(),g.initialize())}),r!==i?r:this},e.fn.dropdown.settings={debug:!1,verbose:!0,performance:!0,on:"click",action:"activate",allowTab:!0,fullTextSearch:!0,preserveHTML:!0,delay:{show:200,hide:300,touch:50},transition:"slide down",duration:250,onChange:function(){},onShow:function(){},onHide:function(){},name:"Dropdown",namespace:"dropdown",error:{action:"You called a dropdown action that was not defined",method:"The method you called is not defined.",transition:"The requested transition was not found"},metadata:{defaultText:"defaultText",defaultValue:"defaultValue",text:"text",value:"value"},selector:{dropdown:".ui.dropdown",text:"> .text:not(.icon)",input:'> input[type="hidden"], > select',search:"> input.search, .menu > .search > input, .menu > input.search",menu:".menu",item:".item"},className:{active:"active",animating:"animating",disabled:"disabled",dropdown:"ui dropdown",filtered:"filtered",menu:"menu",placeholder:"default",search:"search",selected:"selected",selection:"selection",visible:"visible"}},e.fn.dropdown.settings.templates={menu:function(t){var n=(t.placeholder||!1,t.values||{},"");return e.each(t.values,function(e,t){n+='<div class="item" data-value="'+e+'">'+t+"</div>"}),n},dropdown:function(t){var n=t.placeholder||!1,i=(t.values||{},"");return i+='<i class="dropdown icon"></i>',i+=t.placeholder?'<div class="default text">'+n+"</div>":'<div class="text"></div>',i+='<div class="menu">',e.each(t.values,function(e,t){i+='<div class="item" data-value="'+e+'">'+t+"</div>"}),i+="</div>"}},e.extend(e.easing,{easeOutQuad:function(e,t,n,i,o){return-i*(t/=o)*(t-2)+n}})}(jQuery,window,document),function(e,t,n,i){"use strict";e.fn.modal=function(o){var r,a=e(this),s=e(t),c=e(n),l=e("body"),u=a.selector||"",d=(new Date).getTime(),m=[],f=arguments[0],p="string"==typeof f,g=[].slice.call(arguments,1),b=t.requestAnimationFrame||t.mozRequestAnimationFrame||t.webkitRequestAnimationFrame||t.msRequestAnimationFrame||function(e){setTimeout(e,0)};return a.each(function(){var a,v,h,y,x,w,C,T,k,S=e.isPlainObject(o)?e.extend(!0,{},e.fn.modal.settings,o):e.extend({},e.fn.modal.settings),z=S.selector,A=S.className,E=S.namespace,F=S.error,D="."+E,O="module-"+E,P=e(this),R=e(S.context),j=P.find(z.close),q=this,N=P.data(O);k={initialize:function(){return k.verbose("Initializing dimmer",R),e.fn.dimmer===i?void k.error(F.dimmer):(C=k.get.uniqueID(),w="."+C,y=R.dimmer({debug:S.debug,dimmerName:"modals",closable:!1,useCSS:!0,duration:{show:.9*S.duration,hide:1.1*S.duration}}),S.detachable&&y.dimmer("add content",P),x=y.dimmer("get dimmer"),k.refreshModals(),k.verbose("Attaching close events",j),k.bind.events(),k.observeChanges(),void k.instantiate())},instantiate:function(){k.verbose("Storing instance of modal"),N=k,P.data(O,N)},destroy:function(){k.verbose("Destroying previous modal"),P.removeData(O).off(D),s.off(w),j.off(D),R.dimmer("destroy")},observeChanges:function(){"MutationObserver"in t&&(T=new MutationObserver(function(){k.debug("DOM tree modified, refreshing"),k.refresh()}),T.observe(q,{childList:!0,subtree:!0}),k.debug("Setting up mutation observer",T))},refresh:function(){k.remove.scrolling(),k.cacheSizes(),k.set.screenHeight(),k.set.type(),k.set.position()},refreshModals:function(){v=P.siblings(z.modal),a=v.add(P)},attachEvents:function(t,n){var i=e(t);n=e.isFunction(k[n])?k[n]:k.toggle,i.size()>0?(k.debug("Attaching modal events to element",t,n),i.off(D).on("click"+D,n)):k.error(F.notFound,t)},bind:{events:function(){j.on("click"+D,k.event.close),s.on("resize"+w,k.event.resize)}},get:{uniqueID:function(){return(Math.random().toString(16)+"000000000").substr(2,8)}},event:{close:function(){k.verbose("Closing element pressed"),e(this).is(z.approve)?e.proxy(S.onApprove,q)()!==!1?k.hide():k.verbose("Approve callback returned false cancelling hide"):e(this).is(z.deny)?e.proxy(S.onDeny,q)()!==!1?k.hide():k.verbose("Deny callback returned false cancelling hide"):k.hide()},click:function(t){0===e(t.target).closest(P).size()&&(k.debug("Dimmer clicked, hiding all modals"),k.is.active()&&(k.remove.clickaway(),S.allowMultiple?k.hide():k.hideAll()))},debounce:function(e,t){clearTimeout(k.timer),k.timer=setTimeout(e,t)},keyboard:function(e){var t=e.which,n=27;t==n&&(S.closable?(k.debug("Escape key pressed hiding modal"),k.hide()):k.debug("Escape key pressed, but closable is set to false"),e.preventDefault())},resize:function(){y.dimmer("is active")&&b(k.refresh)}},toggle:function(){k.is.active()||k.is.animating()?k.hide():k.show()},show:function(t){t=e.isFunction(t)?t:function(){},k.refreshModals(),k.showDimmer(),k.showModal(t)},hide:function(t){t=e.isFunction(t)?t:function(){},k.refreshModals(),k.othersActive()||k.hideDimmer(),k.hideModal(t)},showModal:function(t){t=e.isFunction(t)?t:function(){},k.is.active()?k.debug("Modal is already visible"):!S.allowMultiple&&v.filter(":visible").size()>0?(k.debug("Other modals visible, queueing show animation"),k.hideOthers(k.showModal)):(e.proxy(S.onShow,q)(),S.transition&&e.fn.transition!==i&&P.transition("is supported")?(k.debug("Showing modal with css animations"),k.cacheSizes(),k.set.position(),k.set.screenHeight(),k.set.type(),k.set.clickaway(),P.transition({debug:S.debug,animation:S.transition+" in",queue:!1,duration:S.duration,onComplete:function(){e.proxy(S.onVisible,q)(),k.add.keyboardShortcuts(),k.save.focus(),k.set.active(),k.set.autofocus(),t()}})):(k.debug("Showing modal with javascript"),P.fadeIn(S.duration,S.easing,function(){e.proxy(S.onVisible,q)(),k.add.keyboardShortcuts(),k.save.focus(),k.set.active(),t()})))},showDimmer:function(){y.dimmer("is active")?k.debug("Dimmer already visible"):(k.debug("Showing dimmer"),y.dimmer("show"))},hideDimmer:function(){return y.dimmer("is active")||y.dimmer("is animating")?(k.debug("Hiding dimmer"),void y.dimmer("hide",function(){S.transition&&e.fn.transition!==i&&P.transition("is supported")&&(k.remove.clickaway(),k.remove.screenHeight())})):void k.debug("Dimmer is not visible cannot hide")},hideModal:function(t){t=e.isFunction(t)?t:function(){},k.debug("Hiding modal"),e.proxy(S.onHide,q)(),S.transition&&e.fn.transition!==i&&P.transition("is supported")?(k.remove.active(),P.transition({debug:S.debug,animation:S.transition+" out",queue:!1,duration:S.duration,onStart:function(){k.remove.keyboardShortcuts()},onComplete:function(){e.proxy(S.onHidden,q)(),k.restore.focus(),t()}})):(k.remove.active(),k.remove.keyboardShortcuts(),P.fadeOut(S.duration,S.easing,function(){e.proxy(S.onHidden,q)(),k.restore.focus(),t()}))},hideAll:function(t){t=e.isFunction(t)?t:function(){},a.is(":visible")&&(k.debug("Hiding all visible modals"),k.hideDimmer(),a.filter(":visible").modal("hide modal",t))},hideOthers:function(t){t=e.isFunction(t)?t:function(){},v.is(":visible")&&(k.debug("Hiding other modals",v),v.filter(":visible").modal("hide modal",t))},othersActive:function(){return v.filter("."+A.active).size()>0},add:{keyboardShortcuts:function(){k.verbose("Adding keyboard shortcuts"),c.on("keyup"+D,k.event.keyboard)}},save:{focus:function(){h=e(n.activeElement).blur()}},restore:{focus:function(){h&&h.size()>0&&h.focus()}},remove:{active:function(){P.removeClass(A.active)},clickaway:function(){S.closable&&x.off("click"+w)},screenHeight:function(){k.cache.height>k.cache.pageHeight&&(k.debug("Removing page height"),l.css("height",""))},keyboardShortcuts:function(){k.verbose("Removing keyboard shortcuts"),c.off("keyup"+D)},scrolling:function(){y.removeClass(A.scrolling),P.removeClass(A.scrolling)}},cacheSizes:function(){var o=P.outerHeight();(k.cache===i||0!==o)&&(k.cache={pageHeight:e(n).outerHeight(),height:o+S.offset,contextHeight:"body"==S.context?e(t).height():y.height()}),k.debug("Caching modal and container sizes",k.cache)},can:{fit:function(){return k.cache.height<k.cache.contextHeight}},is:{active:function(){return P.hasClass(A.active)},animating:function(){return P.transition("is supported")?P.transition("is animating"):P.is(":visible")},scrolling:function(){return y.hasClass(A.scrolling)},modernBrowser:function(){return!(t.ActiveXObject||"ActiveXObject"in t)}},set:{autofocus:function(){if(S.autofocus){var e=P.find(":input:visible"),t=e.filter("[autofocus]"),n=t.size()>0?t:e;n.first().focus()}},clickaway:function(){S.closable&&x.on("click"+w,k.event.click)},screenHeight:function(){k.cache.height>k.cache.pageHeight?(k.debug("Modal is taller than page content, resizing page height"),l.css("height",k.cache.height+S.padding)):l.css("height","")},active:function(){P.addClass(A.active)},scrolling:function(){y.addClass(A.scrolling),P.addClass(A.scrolling)},type:function(){k.can.fit()?(k.verbose("Modal fits on screen"),k.othersActive||k.remove.scrolling()):(k.verbose("Modal cannot fit on screen setting to scrolling"),k.set.scrolling())},position:function(){k.verbose("Centering modal on page",k.cache),P.css(k.can.fit()?{top:"",marginTop:-(k.cache.height/2)}:{marginTop:"",top:c.scrollTop()})}},setting:function(t,n){if(k.debug("Changing setting",t,n),e.isPlainObject(t))e.extend(!0,S,t);else{if(n===i)return S[t];S[t]=n}},internal:function(t,n){if(e.isPlainObject(t))e.extend(!0,k,t);else{if(n===i)return k[t];k[t]=n}},debug:function(){S.debug&&(S.performance?k.performance.log(arguments):(k.debug=Function.prototype.bind.call(console.info,console,S.name+":"),k.debug.apply(console,arguments)))},verbose:function(){S.verbose&&S.debug&&(S.performance?k.performance.log(arguments):(k.verbose=Function.prototype.bind.call(console.info,console,S.name+":"),k.verbose.apply(console,arguments)))},error:function(){k.error=Function.prototype.bind.call(console.error,console,S.name+":"),k.error.apply(console,arguments)},performance:{log:function(e){var t,n,i;S.performance&&(t=(new Date).getTime(),i=d||t,n=t-i,d=t,m.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:q,"Execution Time":n})),clearTimeout(k.performance.timer),k.performance.timer=setTimeout(k.performance.display,100)},display:function(){var t=S.name+":",n=0;d=!1,clearTimeout(k.performance.timer),e.each(m,function(e,t){n+=t["Execution Time"]}),t+=" "+n+"ms",u&&(t+=" '"+u+"'"),(console.group!==i||console.table!==i)&&m.length>0&&(console.groupCollapsed(t),console.table?console.table(m):e.each(m,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),m=[]}},invoke:function(t,n,o){var a,s,c,l=N;return n=n||g,o=q||o,"string"==typeof t&&l!==i&&(t=t.split(/[\. ]/),a=t.length-1,e.each(t,function(n,o){var r=n!=a?o+t[n+1].charAt(0).toUpperCase()+t[n+1].slice(1):t;if(e.isPlainObject(l[r])&&n!=a)l=l[r];else{if(l[r]!==i)return s=l[r],!1;if(!e.isPlainObject(l[o])||n==a)return l[o]!==i?(s=l[o],!1):!1;l=l[o]}})),e.isFunction(s)?c=s.apply(o,n):s!==i&&(c=s),e.isArray(r)?r.push(c):r!==i?r=[r,c]:c!==i&&(r=c),s}},p?(N===i&&k.initialize(),k.invoke(f)):(N!==i&&k.destroy(),k.initialize())}),r!==i?r:this},e.fn.modal.settings={name:"Modal",namespace:"modal",debug:!1,verbose:!0,performance:!0,allowMultiple:!1,detachable:!0,closable:!0,autofocus:!0,context:"body",duration:500,easing:"easeOutExpo",offset:0,transition:"scale",padding:30,onShow:function(){},onHide:function(){},onVisible:function(){},onHidden:function(){},onApprove:function(){return!0},onDeny:function(){return!0},selector:{close:".close, .actions .button",approve:".actions .positive, .actions .approve, .actions .ok",deny:".actions .negative, .actions .deny, .actions .cancel",modal:".ui.modal"},error:{dimmer:"UI Dimmer, a required component is not included in this page",method:"The method you called is not defined.",notFound:"The element you specified could not be found"},className:{active:"active",scrolling:"scrolling"}}}(jQuery,window,document),function(e,t,n,i){"use strict";e.fn.nag=function(n){var o,r=e(this),a=r.selector||"",s=(new Date).getTime(),c=[],l=arguments[0],u="string"==typeof l,d=[].slice.call(arguments,1);return r.each(function(){{var r,m=e.isPlainObject(n)?e.extend(!0,{},e.fn.nag.settings,n):e.extend({},e.fn.nag.settings),f=(m.className,m.selector),p=m.error,g=m.namespace,b="."+g,v=g+"-module",h=e(this),y=h.find(f.close),x=e(m.context?m.context:"body"),w=this,C=h.data(v);t.requestAnimationFrame||t.mozRequestAnimationFrame||t.webkitRequestAnimationFrame||t.msRequestAnimationFrame||function(e){setTimeout(e,0)}}r={initialize:function(){r.verbose("Initializing element"),h.data(v,r),y.on("click"+b,r.dismiss),m.detachable&&h.parent()[0]!==x[0]&&h.detach().prependTo(x),m.displayTime>0&&setTimeout(r.hide,m.displayTime),r.show()},destroy:function(){r.verbose("Destroying instance"),h.removeData(v).off(b)},show:function(){r.should.show()&&!h.is(":visible")&&(r.debug("Showing nag",m.animation.show),"fade"==m.animation.show?h.fadeIn(m.duration,m.easing):h.slideDown(m.duration,m.easing))},hide:function(){r.debug("Showing nag",m.animation.hide),"fade"==m.animation.show?h.fadeIn(m.duration,m.easing):h.slideUp(m.duration,m.easing)},onHide:function(){r.debug("Removing nag",m.animation.hide),h.remove(),m.onHide&&m.onHide()},dismiss:function(e){m.storageMethod&&r.storage.set(m.key,m.value),r.hide(),e.stopImmediatePropagation(),e.preventDefault()},should:{show:function(){return m.persist?(r.debug("Persistent nag is set, can show nag"),!0):r.storage.get(m.key)!=m.value.toString()?(r.debug("Stored value is not set, can show nag",r.storage.get(m.key)),!0):(r.debug("Stored value is set, cannot show nag",r.storage.get(m.key)),!1)}},get:{storageOptions:function(){var e={};return m.expires&&(e.expires=m.expires),m.domain&&(e.domain=m.domain),m.path&&(e.path=m.path),e}},clear:function(){r.storage.remove(m.key)},storage:{set:function(n,o){var a=r.get.storageOptions();if("localstorage"==m.storageMethod&&t.localStorage!==i)t.localStorage.setItem(n,o),r.debug("Value stored using local storage",n,o);else{if(e.cookie===i)return void r.error(p.noCookieStorage);e.cookie(n,o,a),r.debug("Value stored using cookie",n,o,a)}},get:function(n){var o;
return"localstorage"==m.storageMethod&&t.localStorage!==i?o=t.localStorage.getItem(n):e.cookie!==i?o=e.cookie(n):r.error(p.noCookieStorage),("undefined"==o||"null"==o||o===i||null===o)&&(o=i),o},remove:function(n){var o=r.get.storageOptions();"local"==m.storageMethod&&t.store!==i?t.localStorage.removeItem(n):e.cookie!==i?e.removeCookie(n,o):r.error(p.noStorage)}},setting:function(t,n){if(r.debug("Changing setting",t,n),e.isPlainObject(t))e.extend(!0,m,t);else{if(n===i)return m[t];m[t]=n}},internal:function(t,n){if(e.isPlainObject(t))e.extend(!0,r,t);else{if(n===i)return r[t];r[t]=n}},debug:function(){m.debug&&(m.performance?r.performance.log(arguments):(r.debug=Function.prototype.bind.call(console.info,console,m.name+":"),r.debug.apply(console,arguments)))},verbose:function(){m.verbose&&m.debug&&(m.performance?r.performance.log(arguments):(r.verbose=Function.prototype.bind.call(console.info,console,m.name+":"),r.verbose.apply(console,arguments)))},error:function(){r.error=Function.prototype.bind.call(console.error,console,m.name+":"),r.error.apply(console,arguments)},performance:{log:function(e){var t,n,i;m.performance&&(t=(new Date).getTime(),i=s||t,n=t-i,s=t,c.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:w,"Execution Time":n})),clearTimeout(r.performance.timer),r.performance.timer=setTimeout(r.performance.display,100)},display:function(){var t=m.name+":",n=0;s=!1,clearTimeout(r.performance.timer),e.each(c,function(e,t){n+=t["Execution Time"]}),t+=" "+n+"ms",a&&(t+=" '"+a+"'"),(console.group!==i||console.table!==i)&&c.length>0&&(console.groupCollapsed(t),console.table?console.table(c):e.each(c,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),c=[]}},invoke:function(t,n,a){var s,c,l,u=C;return n=n||d,a=w||a,"string"==typeof t&&u!==i&&(t=t.split(/[\. ]/),s=t.length-1,e.each(t,function(n,o){var a=n!=s?o+t[n+1].charAt(0).toUpperCase()+t[n+1].slice(1):t;if(e.isPlainObject(u[a])&&n!=s)u=u[a];else{if(u[a]!==i)return c=u[a],!1;if(!e.isPlainObject(u[o])||n==s)return u[o]!==i?(c=u[o],!1):(r.error(p.method,t),!1);u=u[o]}})),e.isFunction(c)?l=c.apply(a,n):c!==i&&(l=c),e.isArray(o)?o.push(l):o!==i?o=[o,l]:l!==i&&(o=l),c}},u?(C===i&&r.initialize(),r.invoke(l)):(C!==i&&r.destroy(),r.initialize())}),o!==i?o:this},e.fn.nag.settings={name:"Nag",debug:!1,verbose:!0,performance:!0,namespace:"Nag",persist:!1,displayTime:0,animation:{show:"slide",hide:"slide"},context:!1,detachable:!1,expires:30,domain:!1,path:"/",storageMethod:"cookie",key:"nag",value:"dismiss",error:{noStorage:"Neither $.cookie or store is defined. A storage solution is required for storing state",method:"The method you called is not defined."},className:{bottom:"bottom",fixed:"fixed"},selector:{close:".close.icon"},speed:500,easing:"easeOutQuad",onHide:function(){}}}(jQuery,window,document),function(e,t,n,i){"use strict";e.fn.popup=function(o){var r,a=e(this),s=e(n),c=a.selector||"",l=("ontouchstart"in n.documentElement,(new Date).getTime()),u=[],d=arguments[0],m="string"==typeof d,f=[].slice.call(arguments,1);return a.each(function(){var n,a,p,g=e.isPlainObject(o)?e.extend(!0,{},e.fn.popup.settings,o):e.extend({},e.fn.popup.settings),b=g.selector,v=g.className,h=g.error,y=g.metadata,x=g.namespace,w="."+g.namespace,C="module-"+x,T=e(this),k=e(g.context),S=g.target?e(g.target):T,z=e(t),A=e("body"),E=0,F=!1,D=this,O=T.data(C);p={initialize:function(){p.debug("Initializing module",T),p.refresh(),"click"==g.on?T.on("click"+w,p.toggle):p.get.startEvent()&&T.on(p.get.startEvent()+w,p.event.start).on(p.get.endEvent()+w,p.event.end),g.target&&p.debug("Target set to element",S),z.on("resize"+w,p.event.resize),p.exists()?g.hoverable&&p.bind.popup():p.create(),p.instantiate()},instantiate:function(){p.verbose("Storing instance of module",p),O=p,T.data(C,O)},refresh:function(){g.popup?n=e(g.popup):g.inline&&(n=S.next(g.selector.popup)),g.popup?(n.addClass(v.loading),a=n.offsetParent(),n.removeClass(v.loading)):a=g.inline?S.offsetParent():A,a.is("html")&&(p.debug("Page is popups offset parent"),a=A)},reposition:function(){p.refresh(),p.set.position()},destroy:function(){p.debug("Destroying previous module"),n&&!g.preserve&&p.removePopup(),T.off(w).removeData(C)},event:{start:function(){var t=e.isPlainObject(g.delay)?g.delay.show:g.delay;clearTimeout(p.hideTimer),p.showTimer=setTimeout(function(){!p.is.hidden()||p.is.active()&&p.is.dropdown()||p.show()},t)},end:function(){var t=e.isPlainObject(g.delay)?g.delay.hide:g.delay;clearTimeout(p.showTimer),p.hideTimer=setTimeout(function(){p.is.visible()&&p.hide()},t)},resize:function(){p.is.visible()&&p.set.position()}},create:function(){var t=T.data(y.html)||g.html,i=T.data(y.variation)||g.variation,o=T.data(y.title)||g.title,r=T.data(y.content)||T.attr("title")||g.content;t||r||o?(p.debug("Creating pop-up html"),t||(t=g.templates.popup({title:o,content:r})),n=e("<div/>").addClass(v.popup).addClass(i).html(t),i&&n.addClass(i),g.inline?(p.verbose("Inserting popup element inline",n),n.insertAfter(T)):(p.verbose("Appending popup element to body",n),n.appendTo(k)),g.hoverable&&p.bind.popup(),e.proxy(g.onCreate,n)(D)):0!==S.next(g.selector.popup).size()?(p.verbose("Pre-existing popup found, reverting to inline"),g.inline=!0,p.refresh(),g.hoverable&&p.bind.popup()):p.debug("No content specified skipping display",D)},toggle:function(){p.debug("Toggling pop-up"),p.is.hidden()?(p.debug("Popup is hidden, showing pop-up"),p.unbind.close(),p.hideAll(),p.show()):(p.debug("Popup is visible, hiding pop-up"),p.hide())},show:function(t){t=e.isFunction(t)?t:function(){},p.debug("Showing pop-up",g.transition),g.preserve||g.popup||p.refresh(),p.exists()||p.create(),n&&p.set.position()&&(p.save.conditions(),p.animate.show(t))},hide:function(t){t=e.isFunction(t)?t:function(){},p.remove.visible(),p.unbind.close(),p.is.visible()&&(p.restore.conditions(),p.animate.hide(t))},hideAll:function(){e(b.popup).filter(":visible").popup("hide")},hideGracefully:function(t){t&&0===e(t.target).closest(b.popup).size()?(p.debug("Click occurred outside popup hiding popup"),p.hide()):p.debug("Click was inside popup, keeping popup open")},exists:function(){return n?g.inline||g.popup?0!==n.size():n.closest(k).size():!1},removePopup:function(){p.debug("Removing popup"),e.proxy(g.onRemove,n)(D),n.remove()},save:{conditions:function(){p.cache={title:T.attr("title")},p.cache.title&&T.removeAttr("title"),p.verbose("Saving original attributes",p.cache.title)}},restore:{conditions:function(){return D.blur(),p.cache&&p.cache.title&&(T.attr("title",p.cache.title),p.verbose("Restoring original attributes",p.cache.title)),!0}},animate:{show:function(t){t=e.isFunction(t)?t:function(){},g.transition&&e.fn.transition!==i&&T.transition("is supported")?(p.set.visible(),n.transition({animation:g.transition+" in",queue:!1,debug:g.debug,verbose:g.verbose,duration:g.duration,onComplete:function(){p.bind.close(),e.proxy(t,n)(D),e.proxy(g.onVisible,n)(D)}})):(p.set.visible(),n.stop().fadeIn(g.duration,g.easing,function(){p.bind.close(),e.proxy(t,D)()})),e.proxy(g.onShow,n)(D)},hide:function(t){t=e.isFunction(t)?t:function(){},p.debug("Hiding pop-up"),g.transition&&e.fn.transition!==i&&T.transition("is supported")?n.transition({animation:g.transition+" out",queue:!1,duration:g.duration,debug:g.debug,verbose:g.verbose,onComplete:function(){p.reset(),e.proxy(t,n)(D),e.proxy(g.onHidden,n)(D)}}):n.stop().fadeOut(g.duration,g.easing,function(){p.reset(),t()}),e.proxy(g.onHide,n)(D)}},get:{startEvent:function(){return"hover"==g.on?"mouseenter":"focus"==g.on?"focus":!1},endEvent:function(){return"hover"==g.on?"mouseleave":"focus"==g.on?"blur":!1},offstagePosition:function(i){var i=i||!1,o={top:e(t).scrollTop(),bottom:e(t).scrollTop()+e(t).height(),left:0,right:e(t).width()},r={width:n.width(),height:n.height(),offset:n.offset()},a={},s=[];return r.offset&&i&&(p.verbose("Checking if outside viewable area",r.offset),a={top:r.offset.top<o.top,bottom:r.offset.top+r.height>o.bottom,right:r.offset.left+r.width>o.right,left:r.offset.left<o.left}),e.each(a,function(e,t){t&&s.push(e)}),s.length>0?s.join(" "):!1},positions:function(){return{"top left":!1,"top center":!1,"top right":!1,"bottom left":!1,"bottom center":!1,"bottom right":!1,"left center":!1,"right center":!1}},nextPosition:function(e){var t=e.split(" "),n=t[0],i=t[1],o={top:"bottom",bottom:"top",left:"right",right:"left"},r={left:"center",center:"right",right:"left"},a={"top left":"top center","top center":"top right","top right":"right center","right center":"bottom right","bottom right":"bottom center","bottom center":"bottom left","bottom left":"left center","left center":"top left"},s="top"==n||"bottom"==n,c=!1,l=!1,u=!1;return F||(p.verbose("All available positions available"),F=p.get.positions()),p.debug("Recording last position tried",e),F[e]=!0,"opposite"===g.prefer&&(u=[o[n],i],u=u.join(" "),c=F[u]===!0,p.debug("Trying opposite strategy",u)),"adjacent"===g.prefer&&s&&(u=[n,r[i]],u=u.join(" "),l=F[u]===!0,p.debug("Trying adjacent strategy",u)),(l||c)&&(p.debug("Using backup position",u),u=a[e]),u}},set:{position:function(o,r){var s,c,l=(e(t).width(),e(t).height(),S.outerWidth()),u=S.outerHeight(),d=n.outerWidth(),m=n.outerHeight(),f=a.outerWidth(),b=a.outerHeight(),x=g.distanceAway,w=S[0],C=g.inline?parseInt(t.getComputedStyle(w).getPropertyValue("margin-top"),10):0,k=g.inline?parseInt(t.getComputedStyle(w).getPropertyValue("margin-left"),10):0,z=g.inline||g.popup?S.position():S.offset();switch(o=o||T.data(y.position)||g.position,r=r||T.data(y.offset)||g.offset,E==g.maxSearchDepth&&g.lastResort&&(p.debug("Using last resort position to display",g.lastResort),o=g.lastResort),g.inline&&(p.debug("Adding targets margin to calculation"),"left center"==o||"right center"==o?(r+=C,x+=-k):"top left"==o||"top center"==o||"top right"==o?(r+=k,x-=C):(r+=k,x+=C)),p.debug("Calculating popup positioning",o),o){case"top left":s={top:"auto",bottom:b-z.top+x,left:z.left+r,right:"auto"};break;case"top center":s={bottom:b-z.top+x,left:z.left+l/2-d/2+r,top:"auto",right:"auto"};break;case"top right":s={bottom:b-z.top+x,right:f-z.left-l-r,top:"auto",left:"auto"};break;case"left center":s={top:z.top+u/2-m/2+r,right:f-z.left+x,left:"auto",bottom:"auto"};break;case"right center":s={top:z.top+u/2-m/2+r,left:z.left+l+x,bottom:"auto",right:"auto"};break;case"bottom left":s={top:z.top+u+x,left:z.left+r,bottom:"auto",right:"auto"};break;case"bottom center":s={top:z.top+u+x,left:z.left+l/2-d/2+r,bottom:"auto",right:"auto"};break;case"bottom right":s={top:z.top+u+x,right:f-z.left-l-r,left:"auto",bottom:"auto"}}if(s===i&&p.error(h.invalidPosition,o),n.css(s).removeClass(v.position).addClass(o).addClass(v.loading),c=p.get.offstagePosition(o)){if(p.debug("Popup cant fit into viewport",c),E<g.maxSearchDepth)return E++,o=p.get.nextPosition(o),p.debug("Trying new position",o),n?p.set.position(o):!1;if(!g.lastResort)return p.debug("Popup could not find a position in view",n),p.error(h.cannotPlace),p.remove.attempts(),p.remove.loading(),p.reset(),!1}return p.debug("Position is on stage",o),p.remove.attempts(),p.set.fluidWidth(),p.remove.loading(),!0},fluidWidth:function(){g.setFluidWidth&&n.hasClass(v.fluid)&&n.css("width",a.width())},visible:function(){T.addClass(v.visible)}},remove:{loading:function(){n.removeClass(v.loading)},visible:function(){T.removeClass(v.visible)},attempts:function(){p.verbose("Resetting all searched positions"),E=0,F=!1}},bind:{popup:function(){p.verbose("Allowing hover events on popup to prevent closing"),n&&n.size()>0&&n.on("mouseenter"+w,p.event.start).on("mouseleave"+w,p.event.end)},close:function(){(g.hideOnScroll===!0||"auto"==g.hideOnScroll&&"click"!=g.on)&&(s.one("touchmove"+w,p.hideGracefully).one("scroll"+w,p.hideGracefully),k.one("touchmove"+w,p.hideGracefully).one("scroll"+w,p.hideGracefully)),"click"==g.on&&g.closable&&(p.verbose("Binding popup close event to document"),s.on("click"+w,function(t){p.verbose("Pop-up clickaway intent detected"),e.proxy(p.hideGracefully,D)(t)}))}},unbind:{close:function(){(g.hideOnScroll===!0||"auto"==g.hideOnScroll&&"click"!=g.on)&&(s.off("scroll"+w,p.hide),k.off("scroll"+w,p.hide)),"click"==g.on&&g.closable&&(p.verbose("Removing close event from document"),s.off("click"+w))}},is:{active:function(){return T.hasClass(v.active)},animating:function(){return n&&n.is(":animated")||n.hasClass(v.animating)},visible:function(){return n&&n.is(":visible")},dropdown:function(){return T.hasClass(v.dropdown)},hidden:function(){return!p.is.visible()}},reset:function(){p.remove.visible(),g.preserve||g.popup?e.fn.transition!==i&&n.transition("remove transition"):p.removePopup()},setting:function(t,n){if(e.isPlainObject(t))e.extend(!0,g,t);else{if(n===i)return g[t];g[t]=n}},internal:function(t,n){if(e.isPlainObject(t))e.extend(!0,p,t);else{if(n===i)return p[t];p[t]=n}},debug:function(){g.debug&&(g.performance?p.performance.log(arguments):(p.debug=Function.prototype.bind.call(console.info,console,g.name+":"),p.debug.apply(console,arguments)))},verbose:function(){g.verbose&&g.debug&&(g.performance?p.performance.log(arguments):(p.verbose=Function.prototype.bind.call(console.info,console,g.name+":"),p.verbose.apply(console,arguments)))},error:function(){p.error=Function.prototype.bind.call(console.error,console,g.name+":"),p.error.apply(console,arguments)},performance:{log:function(e){var t,n,i;g.performance&&(t=(new Date).getTime(),i=l||t,n=t-i,l=t,u.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:D,"Execution Time":n})),clearTimeout(p.performance.timer),p.performance.timer=setTimeout(p.performance.display,100)},display:function(){var t=g.name+":",n=0;l=!1,clearTimeout(p.performance.timer),e.each(u,function(e,t){n+=t["Execution Time"]}),t+=" "+n+"ms",c&&(t+=" '"+c+"'"),(console.group!==i||console.table!==i)&&u.length>0&&(console.groupCollapsed(t),console.table?console.table(u):e.each(u,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),u=[]}},invoke:function(t,n,o){var a,s,c,l=O;return n=n||f,o=D||o,"string"==typeof t&&l!==i&&(t=t.split(/[\. ]/),a=t.length-1,e.each(t,function(n,o){var r=n!=a?o+t[n+1].charAt(0).toUpperCase()+t[n+1].slice(1):t;if(e.isPlainObject(l[r])&&n!=a)l=l[r];else{if(l[r]!==i)return s=l[r],!1;if(!e.isPlainObject(l[o])||n==a)return l[o]!==i?(s=l[o],!1):!1;l=l[o]}})),e.isFunction(s)?c=s.apply(o,n):s!==i&&(c=s),e.isArray(r)?r.push(c):r!==i?r=[r,c]:c!==i&&(r=c),s}},m?(O===i&&p.initialize(),p.invoke(d)):(O!==i&&p.destroy(),p.initialize())}),r!==i?r:this},e.fn.popup.settings={name:"Popup",debug:!1,verbose:!0,performance:!0,namespace:"popup",onCreate:function(){},onRemove:function(){},onShow:function(){},onVisible:function(){},onHide:function(){},onHidden:function(){},variation:"",content:!1,html:!1,title:!1,on:"hover",closable:!0,hideOnScroll:"auto",context:"body",position:"top left",prefer:"opposite",lastResort:!1,delay:{show:30,hide:0},setFluidWidth:!0,target:!1,popup:!1,inline:!1,preserve:!0,hoverable:!1,duration:200,easing:"easeOutQuint",transition:"scale",distanceAway:0,offset:0,maxSearchDepth:20,error:{invalidPosition:"The position you specified is not a valid position",cannotPlace:"No visible position could be found for the popup",method:"The method you called is not defined."},metadata:{content:"content",html:"html",offset:"offset",position:"position",title:"title",variation:"variation"},className:{active:"active",animating:"animating",dropdown:"dropdown",fluid:"fluid",loading:"loading",popup:"ui popup",position:"top left center bottom right",visible:"visible"},selector:{popup:".ui.popup"},templates:{escape:function(e){var t=/[&<>"'`]/g,n=/[&<>"'`]/,i={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"},o=function(e){return i[e]};return n.test(e)?e.replace(t,o):e},popup:function(t){var n="",o=e.fn.popup.settings.templates.escape;return typeof t!==i&&(typeof t.title!==i&&t.title&&(t.title=o(t.title),n+='<div class="header">'+t.title+"</div>"),typeof t.content!==i&&t.content&&(t.content=o(t.content),n+='<div class="content">'+t.content+"</div>")),n}}},e.extend(e.easing,{easeOutQuad:function(e,t,n,i,o){return-i*(t/=o)*(t-2)+n}})}(jQuery,window,document),function(e,t,n,i){"use strict";e.fn.progress=function(t){var n,o=e(this),r=o.selector||"",a=(new Date).getTime(),s=[],c=arguments[0],l="string"==typeof c,u=[].slice.call(arguments,1);return o.each(function(){var o,d=e.isPlainObject(t)?e.extend(!0,{},e.fn.progress.settings,t):e.extend({},e.fn.progress.settings),m=d.className,f=d.metadata,p=d.namespace,g=d.selector,b=d.error,v="module-"+p,h=e(this),y=e(this).find(g.bar),x=e(this).find(g.progress),w=e(this).find(g.label),C=this,T=h.data(v);o={initialize:function(){o.debug("Initializing progress",d),o.read.metadata(),o.set.initials(),o.instantiate()},instantiate:function(){o.verbose("Storing instance of progress",o),T=o,h.data(v,o)},destroy:function(){o.verbose("Destroying previous progress for",h),o.remove.state(),h.removeData(v),T=i},reset:function(){o.set.percent(0)},complete:function(){(o.percent===i||o.percent<100)&&o.set.percent(100)},read:{metadata:function(){h.data(f.percent)&&(o.verbose("Current percent value set from metadata"),o.percent=h.data(f.percent)),h.data(f.total)&&(o.verbose("Total value set from metadata"),o.total=h.data(f.total)),h.data(f.value)&&(o.verbose("Current value set from metadata"),o.value=h.data(f.value))},currentValue:function(){return o.value!==i?o.value:!1}},increment:function(e){var t,n,i,r=o.total||!1;r?(n=o.value||0,e=e||1,i=n+e,t=o.total,o.debug("Incrementing value by",e,n,t),i>t&&(o.debug("Value cannot increment above total",t),i=t),o.set.progress(i)):(n=o.percent||0,e=e||o.get.randomValue(),i=n+e,t=100,o.debug("Incrementing percentage by",e,n),i>t&&(o.debug("Value cannot increment above 100 percent"),i=t),o.set.progress(i))},decrement:function(e){var t,n,i=o.total||!1,r=0;i?(t=o.value||0,e=e||1,n=t-e,o.debug("Decrementing value by",e,t)):(t=o.percent||0,e=e||o.get.randomValue(),n=t-e,o.debug("Decrementing percentage by",e,t)),r>n&&(o.debug("Value cannot decrement below 0"),n=0),o.set.progress(n)},get:{text:function(e){var t=o.value||0,n=o.total||0,i=o.percent||0;return e=e||"",e=e.replace("{value}",t).replace("{total}",n).replace("{percent}",i),o.debug("Adding variables to progress bar text",e),e},randomValue:function(){return o.debug("Generating random increment percentage"),Math.floor(Math.random()*d.random.max+d.random.min)},percent:function(){return o.percent||0},value:function(){return o.value||!1},total:function(){return o.total||!1}},is:{success:function(){return h.hasClass(m.success)},warning:function(){return h.hasClass(m.warning)},error:function(){return h.hasClass(m.error)}},remove:{state:function(){o.verbose("Removing stored state"),delete o.total,delete o.percent,delete o.value},active:function(){o.verbose("Removing active state"),h.removeClass(m.active)},success:function(){o.verbose("Removing success state"),h.removeClass(m.success)},warning:function(){o.verbose("Removing warning state"),h.removeClass(m.warning)},error:function(){o.verbose("Removing error state"),h.removeClass(m.error)}},set:{barWidth:function(e){e>100?o.error(b.tooHigh,e):0>e?o.error(b.tooLow,e):y.css("width",e+"%")},initials:function(){d.total!==!1&&(o.verbose("Current total set in settings",d.total),o.total=d.total),d.value!==!1&&(o.verbose("Current value set in settings",d.value),o.value=d.value),d.percent!==!1&&(o.verbose("Current percent set in settings",d.percent),o.percent=d.percent),o.percent!==i?o.set.percent(o.percent):o.value!==i&&o.set.progress(o.value)},percent:function(t){t="string"==typeof t?+t.replace("%",""):t,t>0&&1>t&&(o.verbose("Module percentage passed as decimal, converting"),t=100*t),t=Math.round(0===d.precision?t:10*t*d.precision/(10*d.precision)),o.percent=t,o.total&&(o.value=Math.round(t/100*o.total)),d.limitValues&&(o.value=o.value>100?100:o.value<0?0:o.value),o.set.barWidth(t),o.set.barLabel(),100===t?!d.autoSuccess||o.is.warning()||o.is.error()?o.remove.active():(o.set.success(),o.debug("Automatically triggering success at 100%")):t>0&&o.set.active(),e.proxy(d.onChange,C)(t,o.value,o.total)},label:function(e){e=e||"",e&&(e=o.get.text(e),o.debug("Setting label to text",e),w.text(e))},barLabel:function(e){e!==i?x.text(o.get.text(e)):"ratio"==d.label&&o.total?(o.debug("Adding ratio to bar label"),x.text(o.get.text(d.text.ratio))):"percent"==d.label&&(o.debug("Adding percentage to bar label"),x.text(o.get.text(d.text.percent)))},active:function(t){t=t||d.text.active,o.debug("Setting active state"),d.showActivity&&h.addClass(m.active),o.remove.warning(),o.remove.error(),o.remove.success(),t&&o.set.label(t),e.proxy(d.onActive,C)(o.value,o.total)},success:function(t){t=t||d.text.success,o.debug("Setting success state"),h.addClass(m.success),o.remove.active(),o.remove.warning(),o.remove.error(),o.complete(),t&&o.set.label(t),e.proxy(d.onSuccess,C)(o.total)},warning:function(t){t=t||d.text.warning,o.debug("Setting warning state"),h.addClass(m.warning),o.remove.active(),o.remove.success(),o.remove.error(),o.complete(),t&&o.set.label(t),e.proxy(d.onWarning,C)(o.value,o.total)},error:function(t){t=t||d.text.error,o.debug("Setting error state"),h.addClass(m.error),o.remove.active(),o.remove.success(),o.remove.warning(),o.complete(),t&&o.set.label(t),e.proxy(d.onError,C)(o.value,o.total)},total:function(e){o.total=e},progress:function(e){var t,n="string"==typeof e?""!==e.replace(/[^\d.]/g,"")?+e.replace(/[^\d.]/g,""):!1:e;n===!1&&o.error(b.nonNumeric,e),o.total?(o.value=n,t=n/o.total*100,o.debug("Calculating percent complete from total",t),o.set.percent(t)):(t=n,o.debug("Setting value to exact percentage value",t),o.set.percent(t))}},setting:function(t,n){if(o.debug("Changing setting",t,n),e.isPlainObject(t))e.extend(!0,d,t);else{if(n===i)return d[t];d[t]=n}},internal:function(t,n){if(e.isPlainObject(t))e.extend(!0,o,t);else{if(n===i)return o[t];o[t]=n}},debug:function(){d.debug&&(d.performance?o.performance.log(arguments):(o.debug=Function.prototype.bind.call(console.info,console,d.name+":"),o.debug.apply(console,arguments)))},verbose:function(){d.verbose&&d.debug&&(d.performance?o.performance.log(arguments):(o.verbose=Function.prototype.bind.call(console.info,console,d.name+":"),o.verbose.apply(console,arguments)))},error:function(){o.error=Function.prototype.bind.call(console.error,console,d.name+":"),o.error.apply(console,arguments)},performance:{log:function(e){var t,n,i;d.performance&&(t=(new Date).getTime(),i=a||t,n=t-i,a=t,s.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:C,"Execution Time":n})),clearTimeout(o.performance.timer),o.performance.timer=setTimeout(o.performance.display,100)},display:function(){var t=d.name+":",n=0;a=!1,clearTimeout(o.performance.timer),e.each(s,function(e,t){n+=t["Execution Time"]}),t+=" "+n+"ms",r&&(t+=" '"+r+"'"),(console.group!==i||console.table!==i)&&s.length>0&&(console.groupCollapsed(t),console.table?console.table(s):e.each(s,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),s=[]}},invoke:function(t,r,a){var s,c,l,d=T;return r=r||u,a=C||a,"string"==typeof t&&d!==i&&(t=t.split(/[\. ]/),s=t.length-1,e.each(t,function(n,r){var a=n!=s?r+t[n+1].charAt(0).toUpperCase()+t[n+1].slice(1):t;if(e.isPlainObject(d[a])&&n!=s)d=d[a];else{if(d[a]!==i)return c=d[a],!1;if(!e.isPlainObject(d[r])||n==s)return d[r]!==i?(c=d[r],!1):(o.error(b.method,t),!1);d=d[r]}})),e.isFunction(c)?l=c.apply(a,r):c!==i&&(l=c),e.isArray(n)?n.push(l):n!==i?n=[n,l]:l!==i&&(n=l),c}},l?(T===i&&o.initialize(),o.invoke(c)):(T!==i&&o.destroy(),o.initialize())}),n!==i?n:this},e.fn.progress.settings={name:"Progress",namespace:"progress",debug:!1,verbose:!0,performance:!0,random:{min:2,max:5},autoSuccess:!0,showActivity:!0,limitValues:!0,label:"percent",precision:1,percent:!1,total:!1,value:!1,onChange:function(){},onSuccess:function(){},onActive:function(){},onError:function(){},onWarning:function(){},error:{method:"The method you called is not defined.",nonNumeric:"Progress value is non numeric",tooHigh:"Value specified is above 100%",tooLow:"Value specified is below 0%"},regExp:{variable:/\{\$*[A-z0-9]+\}/g},metadata:{percent:"percent",total:"total",value:"value"},selector:{bar:"> .bar",label:"> .label",progress:".bar > .progress"},text:{active:!1,error:!1,success:!1,warning:!1,percent:"{percent}%",ratio:"{value} of {total}"},className:{active:"active",error:"error",success:"success",warning:"warning"}}}(jQuery,window,document),function(e,t,n,i){"use strict";e.fn.rating=function(t){var n,o=e(this),r=o.selector||"",a=(new Date).getTime(),s=[],c=arguments[0],l="string"==typeof c,u=[].slice.call(arguments,1);return o.each(function(){var d,m=e.isPlainObject(t)?e.extend(!0,{},e.fn.rating.settings,t):e.extend({},e.fn.rating.settings),f=m.namespace,p=m.className,g=m.metadata,b=m.selector,v=(m.error,"."+f),h="module-"+f,y=this,x=e(this).data(h),w=e(this),C=w.find(b.icon);d={initialize:function(){d.verbose("Initializing rating module",m),0===C.size()&&d.setup.layout(),m.interactive?d.enable():d.disable(),m.initialRating&&(d.debug("Setting initial rating"),d.setRating(m.initialRating)),w.data(g.rating)&&(d.debug("Rating found in metadata"),d.setRating(w.data(g.rating))),d.instantiate()},instantiate:function(){d.verbose("Instantiating module",m),x=d,w.data(h,d)},destroy:function(){d.verbose("Destroying previous instance",x),w.removeData(h),C.off(v)},refresh:function(){C=w.find(b.icon)},setup:{layout:function(){var t=w.data(g.maxRating)||m.maxRating;d.debug("Generating icon html dynamically"),w.html(e.fn.rating.settings.templates.icon(t)),d.refresh()}},event:{mouseenter:function(){var t=e(this);t.nextAll().removeClass(p.selected),w.addClass(p.selected),t.addClass(p.selected).prevAll().addClass(p.selected)},mouseleave:function(){w.removeClass(p.selected),C.removeClass(p.selected)},click:function(){var t=e(this),n=d.getRating(),i=C.index(t)+1,o="auto"==m.clearable?1===C.size():m.clearable;o&&n==i?d.clearRating():d.setRating(i)}},clearRating:function(){d.debug("Clearing current rating"),d.setRating(0)},getRating:function(){var e=C.filter("."+p.active).size();return d.verbose("Current rating retrieved",e),e},enable:function(){d.debug("Setting rating to interactive mode"),C.on("mouseenter"+v,d.event.mouseenter).on("mouseleave"+v,d.event.mouseleave).on("click"+v,d.event.click),w.removeClass(p.disabled)},disable:function(){d.debug("Setting rating to read-only mode"),C.off(v),w.addClass(p.disabled)},setRating:function(t){var n=t-1>=0?t-1:0,i=C.eq(n);w.removeClass(p.selected),C.removeClass(p.selected).removeClass(p.active),t>0&&(d.verbose("Setting current rating to",t),i.prevAll().andSelf().addClass(p.active)),e.proxy(m.onRate,y)(t)},setting:function(t,n){if(d.debug("Changing setting",t,n),e.isPlainObject(t))e.extend(!0,m,t);else{if(n===i)return m[t];m[t]=n}},internal:function(t,n){if(e.isPlainObject(t))e.extend(!0,d,t);else{if(n===i)return d[t];d[t]=n}},debug:function(){m.debug&&(m.performance?d.performance.log(arguments):(d.debug=Function.prototype.bind.call(console.info,console,m.name+":"),d.debug.apply(console,arguments)))},verbose:function(){m.verbose&&m.debug&&(m.performance?d.performance.log(arguments):(d.verbose=Function.prototype.bind.call(console.info,console,m.name+":"),d.verbose.apply(console,arguments)))},error:function(){d.error=Function.prototype.bind.call(console.error,console,m.name+":"),d.error.apply(console,arguments)},performance:{log:function(e){var t,n,i;m.performance&&(t=(new Date).getTime(),i=a||t,n=t-i,a=t,s.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:y,"Execution Time":n})),clearTimeout(d.performance.timer),d.performance.timer=setTimeout(d.performance.display,100)},display:function(){var t=m.name+":",n=0;a=!1,clearTimeout(d.performance.timer),e.each(s,function(e,t){n+=t["Execution Time"]}),t+=" "+n+"ms",r&&(t+=" '"+r+"'"),o.size()>1&&(t+=" ("+o.size()+")"),(console.group!==i||console.table!==i)&&s.length>0&&(console.groupCollapsed(t),console.table?console.table(s):e.each(s,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),s=[]}},invoke:function(t,o,r){var a,s,c,l=x;return o=o||u,r=y||r,"string"==typeof t&&l!==i&&(t=t.split(/[\. ]/),a=t.length-1,e.each(t,function(n,o){var r=n!=a?o+t[n+1].charAt(0).toUpperCase()+t[n+1].slice(1):t;if(e.isPlainObject(l[r])&&n!=a)l=l[r];else{if(l[r]!==i)return s=l[r],!1;if(!e.isPlainObject(l[o])||n==a)return l[o]!==i?(s=l[o],!1):!1;l=l[o]}})),e.isFunction(s)?c=s.apply(r,o):s!==i&&(c=s),e.isArray(n)?n.push(c):n!==i?n=[n,c]:c!==i&&(n=c),s}},l?(x===i&&d.initialize(),d.invoke(c)):(x!==i&&d.destroy(),d.initialize())}),n!==i?n:this},e.fn.rating.settings={name:"Rating",namespace:"rating",debug:!1,verbose:!0,performance:!0,initialRating:0,interactive:!0,maxRating:4,clearable:"auto",onRate:function(){},error:{method:"The method you called is not defined",noMaximum:"No maximum rating specified. Cannot generate HTML automatically"},metadata:{rating:"rating",maxRating:"maxRating"},className:{active:"active",disabled:"disabled",selected:"selected",loading:"loading"},selector:{icon:".icon"},templates:{icon:function(e){for(var t=1,n="";e>=t;)n+='<i class="icon"></i>',t++;return n}}}}(jQuery,window,document),function(e,t,n,i){"use strict";e.fn.search=function(n){var o,r=e(this),a=r.selector||"",s=(new Date).getTime(),c=[],l=arguments[0],u="string"==typeof l,d=[].slice.call(arguments,1);return e(this).each(function(){var m,f=e.extend(!0,{},e.fn.search.settings,n),p=f.className,g=f.selector,b=f.error,v=f.namespace,h="."+v,y=v+"-module",x=e(this),w=x.find(g.prompt),C=x.find(g.searchButton),T=x.find(g.results),k=(x.find(g.result),x.find(g.category),this),S=x.data(y);m={initialize:function(){m.verbose("Initializing module");var e=w[0],t=e!==i&&e.oninput!==i?"input":e!==i&&e.onpropertychange!==i?"propertychange":"keyup";f.automatic&&w.on(t+h,m.search.throttle),w.on("focus"+h,m.event.focus).on("blur"+h,m.event.blur).on("keydown"+h,m.handleKeyboard),C.on("click"+h,m.search.query),T.on("mousedown"+h,m.event.mousedown).on("mouseup"+h,m.event.mouseup).on("click"+h,g.result,m.results.select),m.instantiate()},instantiate:function(){m.verbose("Storing instance of module",m),S=m,x.data(y,m)},destroy:function(){m.verbose("Destroying instance"),x.removeData(y),w.off(h),C.off(h),T.off(h)},event:{focus:function(){x.addClass(p.focus),clearTimeout(m.timer),m.search.throttle(),m.has.minimum()&&m.results.show()},mousedown:function(){m.resultsClicked=!0},mouseup:function(){m.resultsClicked=!1},blur:function(){m.search.cancel(),x.removeClass(p.focus),m.resultsClicked||(m.timer=setTimeout(m.results.hide,f.hideDelay))}},handleKeyboard:function(t){var n,i=x.find(g.result),o=x.find(g.category),r=t.which,a={backspace:8,enter:13,escape:27,upArrow:38,downArrow:40},s=p.active,c=i.index(i.filter("."+s)),l=i.size();if(r==a.escape&&(m.verbose("Escape key pressed, blurring search field"),w.trigger("blur")),T.filter(":visible").size()>0)if(r==a.enter){if(m.verbose("Enter key pressed, selecting active result"),i.filter("."+s).size()>0)return e.proxy(m.results.select,i.filter("."+s))(t),t.preventDefault(),!1}else r==a.upArrow?(m.verbose("Up key pressed, changing active result"),n=0>c-1?c:c-1,o.removeClass(s),i.removeClass(s).eq(n).addClass(s).closest(o).addClass(s),t.preventDefault()):r==a.downArrow&&(m.verbose("Down key pressed, changing active result"),n=c+1>=l?c:c+1,o.removeClass(s),i.removeClass(s).eq(n).addClass(s).closest(o).addClass(s),t.preventDefault());else r==a.enter&&(m.verbose("Enter key pressed, executing query"),m.search.query(),C.addClass(p.down),w.one("keyup",function(){C.removeClass(p.down)}))},has:{minimum:function(){var e=w.val(),t=e.length;return t>=f.minCharacters}},search:{cancel:function(){var e=x.data("xhr")||!1;e&&"resolved"!=e.state()&&(m.debug("Cancelling last search"),e.abort())},throttle:function(){clearTimeout(m.timer),m.has.minimum()?m.timer=setTimeout(m.search.query,f.searchDelay):m.results.hide()},query:function(){var t=w.val(),n=m.search.cache.read(t);
n?(m.debug("Reading result for '"+t+"' from cache"),m.results.add(n)):(m.debug("Querying for '"+t+"'"),e.isPlainObject(f.source)||e.isArray(f.source)?m.search.local(t):f.apiSettings?m.search.remote(t):e.fn.api!==i&&e.api.settings.api.search!==i?(m.debug("Searching with default search API endpoint"),f.apiSettings={action:"search"},m.search.remote(t)):m.error(b.source),e.proxy(f.onSearchQuery,x)(t))},local:function(t){var n,i=[],o=[],r=e.isArray(f.searchFields)?f.searchFields:[f.searchFields],a=new RegExp("(?:s|^)"+t,"i"),s=new RegExp(t,"i");x.addClass(p.loading),e.each(r,function(t,n){e.each(f.source,function(t,r){var c="string"==typeof r[n],l=-1==e.inArray(r,i)&&-1==e.inArray(r,o);c&&l&&(a.test(r[n])?i.push(r):f.searchFullText&&s.test(r[n])&&o.push(r))})}),n=m.results.generate({results:e.merge(i,o)}),x.removeClass(p.loading),m.search.cache.write(t,n),m.results.add(n)},remote:function(t){var n,i={stateContext:x,urlData:{query:t},onSuccess:function(e){n=m.results.generate(e),m.search.cache.write(t,n),m.results.add(n)},onFailure:m.error};m.search.cancel(),m.debug("Executing search"),e.extend(!0,i,f.apiSettings),e.api(i)},cache:{read:function(e){var t=x.data("cache");return f.cache&&"object"==typeof t&&t[e]!==i?t[e]:!1},write:function(e,t){var n=x.data("cache")!==i?x.data("cache"):{};n[e]=t,x.data("cache",n)}}},results:{generate:function(t){m.debug("Generating html from response",t);var n=f.templates[f.type],i="";return e.isPlainObject(t.results)&&!e.isEmptyObject(t.results)||e.isArray(t.results)&&t.results.length>0?(f.maxResults>0&&(t.results=e.isArray(t.results)?t.results.slice(0,f.maxResults):t.results),e.isFunction(n)?i=n(t):m.error(b.noTemplate,!1)):i=m.message(b.noResults,"empty"),e.proxy(f.onResults,x)(t),i},add:function(t){("default"==f.onResultsAdd||"default"==e.proxy(f.onResultsAdd,T)(t))&&T.html(t),m.results.show()},show:function(){0===T.filter(":visible").size()&&w.filter(":focus").size()>0&&""!==T.html()&&(f.transition&&e.fn.transition!==i&&x.transition("is supported")&&!T.transition("is inward")?(m.debug("Showing results with css animations"),T.transition({animation:f.transition+" in",duration:f.duration,queue:!0})):(m.debug("Showing results with javascript"),T.stop().fadeIn(f.duration,f.easing)),e.proxy(f.onResultsOpen,T)())},hide:function(){T.filter(":visible").size()>0&&(f.transition&&e.fn.transition!==i&&x.transition("is supported")&&!T.transition("is outward")?(m.debug("Hiding results with css animations"),T.transition({animation:f.transition+" out",duration:f.duration,queue:!0})):(m.debug("Hiding results with javascript"),T.stop().fadeIn(f.duration,f.easing)),e.proxy(f.onResultsClose,T)())},select:function(n){m.debug("Search result selected");{var i=e(this),o=i.find(".title");o.html()}if("default"==f.onSelect||"default"==e.proxy(f.onSelect,this)(n)){var r=i.find("a[href]").eq(0),o=i.find(g.title).eq(0),a=r.attr("href")||!1,s=r.attr("target")||!1,c=o.size()>0?o.text():!1;m.results.hide(),c&&w.val(c),a&&("_blank"==s||n.ctrlKey?t.open(a):t.location.href=a)}}},message:function(e,t){return t=t||"standard",m.results.add(f.templates.message(e,t)),f.templates.message(e,t)},setting:function(t,n){if(e.isPlainObject(t))e.extend(!0,f,t);else{if(n===i)return f[t];f[t]=n}},internal:function(t,n){if(e.isPlainObject(t))e.extend(!0,m,t);else{if(n===i)return m[t];m[t]=n}},debug:function(){f.debug&&(f.performance?m.performance.log(arguments):(m.debug=Function.prototype.bind.call(console.info,console,f.name+":"),m.debug.apply(console,arguments)))},verbose:function(){f.verbose&&f.debug&&(f.performance?m.performance.log(arguments):(m.verbose=Function.prototype.bind.call(console.info,console,f.name+":"),m.verbose.apply(console,arguments)))},error:function(){m.error=Function.prototype.bind.call(console.error,console,f.name+":"),m.error.apply(console,arguments)},performance:{log:function(e){var t,n,i;f.performance&&(t=(new Date).getTime(),i=s||t,n=t-i,s=t,c.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:k,"Execution Time":n})),clearTimeout(m.performance.timer),m.performance.timer=setTimeout(m.performance.display,100)},display:function(){var t=f.name+":",n=0;s=!1,clearTimeout(m.performance.timer),e.each(c,function(e,t){n+=t["Execution Time"]}),t+=" "+n+"ms",a&&(t+=" '"+a+"'"),r.size()>1&&(t+=" ("+r.size()+")"),(console.group!==i||console.table!==i)&&c.length>0&&(console.groupCollapsed(t),console.table?console.table(c):e.each(c,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),c=[]}},invoke:function(t,n,r){var a,s,c,l=S;return n=n||d,r=k||r,"string"==typeof t&&l!==i&&(t=t.split(/[\. ]/),a=t.length-1,e.each(t,function(n,o){var r=n!=a?o+t[n+1].charAt(0).toUpperCase()+t[n+1].slice(1):t;if(e.isPlainObject(l[r])&&n!=a)l=l[r];else{if(l[r]!==i)return s=l[r],!1;if(!e.isPlainObject(l[o])||n==a)return l[o]!==i?(s=l[o],!1):!1;l=l[o]}})),e.isFunction(s)?c=s.apply(r,n):s!==i&&(c=s),e.isArray(o)?o.push(c):o!==i?o=[o,c]:c!==i&&(o=c),s}},u?(S===i&&m.initialize(),m.invoke(l)):(S!==i&&m.destroy(),m.initialize())}),o!==i?o:this},e.fn.search.settings={name:"Search Module",namespace:"search",debug:!1,verbose:!0,performance:!0,apiSettings:!1,type:"standard",minCharacters:1,source:!1,searchFields:["title","description"],searchFullText:!0,automatic:"true",hideDelay:0,searchDelay:300,maxResults:7,cache:!0,transition:"scale",duration:300,easing:"easeOutExpo",onSelect:"default",onResultsAdd:"default",onSearchQuery:function(){},onResults:function(){},onResultsOpen:function(){},onResultsClose:function(){},className:{active:"active",down:"down",focus:"focus",empty:"empty",loading:"loading"},error:{source:"Cannot search. No source used, and Semantic API module was not included",noResults:"Your search returned no results",logging:"Error in debug logging, exiting.",noTemplate:"A valid template name was not specified.",serverError:"There was an issue with querying the server.",method:"The method you called is not defined."},selector:{prompt:".prompt",searchButton:".search.button",results:".results",category:".category",result:".result",title:".title, .name"},templates:{escape:function(e){var t=/[&<>"'`]/g,n=/[&<>"'`]/,i={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"},o=function(e){return i[e]};return n.test(e)?e.replace(t,o):e},message:function(e,t){var n="";return e!==i&&t!==i&&(n+='<div class="message '+t+'">',n+="empty"==t?'<div class="header">No Results</div class="header"><div class="description">'+e+'</div class="description">':' <div class="description">'+e+"</div>",n+="</div>"),n},category:function(t){var n="",o=e.fn.search.settings.templates.escape;return t.results!==i?(e.each(t.results,function(t,r){r.results!==i&&r.results.length>0&&(n+='<div class="category"><div class="name">'+r.name+"</div>",e.each(r.results,function(e,t){n+='<div class="result">',t.url&&(n+='<a href="'+t.url+'"></a>'),t.image!==i&&(t.image=o(t.image),n+='<div class="image"> <img src="'+t.image+'" alt=""></div>'),n+='<div class="content">',t.price!==i&&(t.price=o(t.price),n+='<div class="price">'+t.price+"</div>"),t.title!==i&&(t.title=o(t.title),n+='<div class="title">'+t.title+"</div>"),t.description!==i&&(n+='<div class="description">'+t.description+"</div>"),n+="</div></div>"}),n+="</div>")}),t.action&&(n+='<a href="'+t.action.url+'" class="action">'+t.action.text+"</a>"),n):!1},standard:function(t){var n="";return t.results!==i?(e.each(t.results,function(e,t){n+=t.url?'<a class="result" href="'+t.url+'">':'<a class="result">',t.image!==i&&(n+='<div class="image"> <img src="'+t.image+'"></div>'),n+='<div class="content">',t.price!==i&&(n+='<div class="price">'+t.price+"</div>"),t.title!==i&&(n+='<div class="title">'+t.title+"</div>"),t.description!==i&&(n+='<div class="description">'+t.description+"</div>"),n+="</div>",n+="</a>"}),t.action&&(n+='<a href="'+t.action.url+'" class="action">'+t.action.text+"</a>"),n):!1}}}}(jQuery,window,document),function(e,t,n,i){"use strict";e.fn.shape=function(o){var r,a=e(this),s=(e("body"),(new Date).getTime()),c=[],l=arguments[0],u="string"==typeof l,d=[].slice.call(arguments,1),m=t.requestAnimationFrame||t.mozRequestAnimationFrame||t.webkitRequestAnimationFrame||t.msRequestAnimationFrame||function(e){setTimeout(e,0)};return a.each(function(){var t,f,p,g=a.selector||"",b=e.extend(!0,{},e.fn.shape.settings,o),v=b.namespace,h=b.selector,y=b.error,x=b.className,w="."+v,C="module-"+v,T=e(this),k=T.find(h.sides),S=T.find(h.side),z=!1,A=this,E=T.data(C);p={initialize:function(){p.verbose("Initializing module for",A),p.set.defaultSide(),p.instantiate()},instantiate:function(){p.verbose("Storing instance of module",p),E=p,T.data(C,E)},destroy:function(){p.verbose("Destroying previous module for",A),T.removeData(C).off(w)},refresh:function(){p.verbose("Refreshing selector cache for",A),T=e(A),k=e(this).find(h.shape),S=e(this).find(h.side)},repaint:function(){p.verbose("Forcing repaint event");{var e=k.get(0)||n.createElement("div");e.offsetWidth}},animate:function(n,o){p.verbose("Animating box with properties",n),o=o||function(e){p.verbose("Executing animation callback"),e!==i&&e.stopPropagation(),p.reset(),p.set.active()},e.proxy(b.beforeChange,f[0])(),p.get.transitionEvent()?(p.verbose("Starting CSS animation"),T.addClass(x.animating),k.css(n).one(p.get.transitionEvent(),o),p.set.duration(b.duration),m(function(){T.addClass(x.animating),t.addClass(x.hidden)})):o()},queue:function(e){p.debug("Queueing animation of",e),k.one(p.get.transitionEvent(),function(){p.debug("Executing queued animation"),setTimeout(function(){T.shape(e)},0)})},reset:function(){p.verbose("Animating states reset"),T.removeClass(x.animating).attr("style","").removeAttr("style"),k.attr("style","").removeAttr("style"),S.attr("style","").removeAttr("style").removeClass(x.hidden),f.removeClass(x.animating).attr("style","").removeAttr("style")},is:{complete:function(){return S.filter("."+x.active)[0]==f[0]},animating:function(){return T.hasClass(x.animating)}},set:{defaultSide:function(){t=T.find("."+b.className.active),f=t.next(h.side).size()>0?t.next(h.side):T.find(h.side).first(),z=!1,p.verbose("Active side set to",t),p.verbose("Next side set to",f)},duration:function(e){e=e||b.duration,e="number"==typeof e?e+"ms":e,p.verbose("Setting animation duration",e),k.add(S).css({"-webkit-transition-duration":e,"-moz-transition-duration":e,"-ms-transition-duration":e,"-o-transition-duration":e,"transition-duration":e})},stageSize:function(){var e=T.clone().addClass(x.loading),t=e.find("."+b.className.active),n=z?e.find(h.side).eq(z):t.next(h.side).size()>0?t.next(h.side):e.find(h.side).first(),i={};t.removeClass(x.active),n.addClass(x.active),e.insertAfter(T),i={width:n.outerWidth(),height:n.outerHeight()},e.remove(),T.css(i),p.verbose("Resizing stage to fit new content",i)},nextSide:function(e){z=e,f=S.filter(e),z=S.index(f),0===f.size()&&(p.set.defaultSide(),p.error(y.side)),p.verbose("Next side manually set to",f)},active:function(){p.verbose("Setting new side to active",f),S.removeClass(x.active),f.addClass(x.active),e.proxy(b.onChange,f[0])(),p.set.defaultSide()}},flip:{up:function(){return!p.is.complete()||p.is.animating()||b.allowRepeats?void(p.is.animating()?p.queue("flip up"):(p.debug("Flipping up",f),p.set.stageSize(),p.stage.above(),p.animate(p.get.transform.up()))):void p.debug("Side already visible",f)},down:function(){return!p.is.complete()||p.is.animating()||b.allowRepeats?void(p.is.animating()?p.queue("flip down"):(p.debug("Flipping down",f),p.set.stageSize(),p.stage.below(),p.animate(p.get.transform.down()))):void p.debug("Side already visible",f)},left:function(){return!p.is.complete()||p.is.animating()||b.allowRepeats?void(p.is.animating()?p.queue("flip left"):(p.debug("Flipping left",f),p.set.stageSize(),p.stage.left(),p.animate(p.get.transform.left()))):void p.debug("Side already visible",f)},right:function(){return!p.is.complete()||p.is.animating()||b.allowRepeats?void(p.is.animating()?p.queue("flip right"):(p.debug("Flipping right",f),p.set.stageSize(),p.stage.right(),p.animate(p.get.transform.right()))):void p.debug("Side already visible",f)},over:function(){return!p.is.complete()||p.is.animating()||b.allowRepeats?void(p.is.animating()?p.queue("flip over"):(p.debug("Flipping over",f),p.set.stageSize(),p.stage.behind(),p.animate(p.get.transform.over()))):void p.debug("Side already visible",f)},back:function(){return!p.is.complete()||p.is.animating()||b.allowRepeats?void(p.is.animating()?p.queue("flip back"):(p.debug("Flipping back",f),p.set.stageSize(),p.stage.behind(),p.animate(p.get.transform.back()))):void p.debug("Side already visible",f)}},get:{transform:{up:function(){var e={y:-((t.outerHeight()-f.outerHeight())/2),z:-(t.outerHeight()/2)};return{transform:"translateY("+e.y+"px) translateZ("+e.z+"px) rotateX(-90deg)"}},down:function(){var e={y:-((t.outerHeight()-f.outerHeight())/2),z:-(t.outerHeight()/2)};return{transform:"translateY("+e.y+"px) translateZ("+e.z+"px) rotateX(90deg)"}},left:function(){var e={x:-((t.outerWidth()-f.outerWidth())/2),z:-(t.outerWidth()/2)};return{transform:"translateX("+e.x+"px) translateZ("+e.z+"px) rotateY(90deg)"}},right:function(){var e={x:-((t.outerWidth()-f.outerWidth())/2),z:-(t.outerWidth()/2)};return{transform:"translateX("+e.x+"px) translateZ("+e.z+"px) rotateY(-90deg)"}},over:function(){var e={x:-((t.outerWidth()-f.outerWidth())/2)};return{transform:"translateX("+e.x+"px) rotateY(180deg)"}},back:function(){var e={x:-((t.outerWidth()-f.outerWidth())/2)};return{transform:"translateX("+e.x+"px) rotateY(-180deg)"}}},transitionEvent:function(){var e,t=n.createElement("element"),o={transition:"transitionend",OTransition:"oTransitionEnd",MozTransition:"transitionend",WebkitTransition:"webkitTransitionEnd"};for(e in o)if(t.style[e]!==i)return o[e]},nextSide:function(){return t.next(h.side).size()>0?t.next(h.side):T.find(h.side).first()}},stage:{above:function(){var e={origin:(t.outerHeight()-f.outerHeight())/2,depth:{active:f.outerHeight()/2,next:t.outerHeight()/2}};p.verbose("Setting the initial animation position as above",f,e),t.css({transform:"rotateY(0deg) translateZ("+e.depth.active+"px)"}),f.addClass(x.animating).css({display:"block",top:e.origin+"px",transform:"rotateX(90deg) translateZ("+e.depth.next+"px)"})},below:function(){var e={origin:(t.outerHeight()-f.outerHeight())/2,depth:{active:f.outerHeight()/2,next:t.outerHeight()/2}};p.verbose("Setting the initial animation position as below",f,e),t.css({transform:"rotateY(0deg) translateZ("+e.depth.active+"px)"}),f.addClass(x.animating).css({display:"block",top:e.origin+"px",transform:"rotateX(-90deg) translateZ("+e.depth.next+"px)"})},left:function(){var e={origin:(t.outerWidth()-f.outerWidth())/2,depth:{active:f.outerWidth()/2,next:t.outerWidth()/2}};p.verbose("Setting the initial animation position as left",f,e),t.css({transform:"rotateY(0deg) translateZ("+e.depth.active+"px)"}),f.addClass(x.animating).css({display:"block",left:e.origin+"px",transform:"rotateY(-90deg) translateZ("+e.depth.next+"px)"})},right:function(){var e={origin:(t.outerWidth()-f.outerWidth())/2,depth:{active:f.outerWidth()/2,next:t.outerWidth()/2}};p.verbose("Setting the initial animation position as left",f,e),t.css({transform:"rotateY(0deg) translateZ("+e.depth.active+"px)"}),f.addClass(x.animating).css({display:"block",left:e.origin+"px",transform:"rotateY(90deg) translateZ("+e.depth.next+"px)"})},behind:function(){var e={origin:(t.outerWidth()-f.outerWidth())/2,depth:{active:f.outerWidth()/2,next:t.outerWidth()/2}};p.verbose("Setting the initial animation position as behind",f,e),t.css({transform:"rotateY(0deg)"}),f.addClass(x.animating).css({display:"block",left:e.origin+"px",transform:"rotateY(-180deg)"})}},setting:function(t,n){if(p.debug("Changing setting",t,n),e.isPlainObject(t))e.extend(!0,b,t);else{if(n===i)return b[t];b[t]=n}},internal:function(t,n){if(e.isPlainObject(t))e.extend(!0,p,t);else{if(n===i)return p[t];p[t]=n}},debug:function(){b.debug&&(b.performance?p.performance.log(arguments):(p.debug=Function.prototype.bind.call(console.info,console,b.name+":"),p.debug.apply(console,arguments)))},verbose:function(){b.verbose&&b.debug&&(b.performance?p.performance.log(arguments):(p.verbose=Function.prototype.bind.call(console.info,console,b.name+":"),p.verbose.apply(console,arguments)))},error:function(){p.error=Function.prototype.bind.call(console.error,console,b.name+":"),p.error.apply(console,arguments)},performance:{log:function(e){var t,n,i;b.performance&&(t=(new Date).getTime(),i=s||t,n=t-i,s=t,c.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:A,"Execution Time":n})),clearTimeout(p.performance.timer),p.performance.timer=setTimeout(p.performance.display,100)},display:function(){var t=b.name+":",n=0;s=!1,clearTimeout(p.performance.timer),e.each(c,function(e,t){n+=t["Execution Time"]}),t+=" "+n+"ms",g&&(t+=" '"+g+"'"),a.size()>1&&(t+=" ("+a.size()+")"),(console.group!==i||console.table!==i)&&c.length>0&&(console.groupCollapsed(t),console.table?console.table(c):e.each(c,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),c=[]}},invoke:function(t,n,o){var a,s,c,l=E;return n=n||d,o=A||o,"string"==typeof t&&l!==i&&(t=t.split(/[\. ]/),a=t.length-1,e.each(t,function(n,o){var r=n!=a?o+t[n+1].charAt(0).toUpperCase()+t[n+1].slice(1):t;if(e.isPlainObject(l[r])&&n!=a)l=l[r];else{if(l[r]!==i)return s=l[r],!1;if(!e.isPlainObject(l[o])||n==a)return l[o]!==i?(s=l[o],!1):!1;l=l[o]}})),e.isFunction(s)?c=s.apply(o,n):s!==i&&(c=s),e.isArray(r)?r.push(c):r!==i?r=[r,c]:c!==i&&(r=c),s}},u?(E===i&&p.initialize(),p.invoke(l)):(E!==i&&p.destroy(),p.initialize())}),r!==i?r:this},e.fn.shape.settings={name:"Shape",debug:!1,verbose:!0,performance:!0,namespace:"shape",beforeChange:function(){},onChange:function(){},allowRepeats:!1,duration:700,error:{side:"You tried to switch to a side that does not exist.",method:"The method you called is not defined"},className:{animating:"animating",hidden:"hidden",loading:"loading",active:"active"},selector:{sides:".sides",side:".side"}}}(jQuery,window,document),function(e,t,n,i){"use strict";e.fn.sidebar=function(o){var r,a=e(this),s=e(t),c=e(n),l=e("head"),u=a.selector||"",d=(new Date).getTime(),m=[],f=arguments[0],p="string"==typeof f,g=[].slice.call(arguments,1),b=t.requestAnimationFrame||t.mozRequestAnimationFrame||t.webkitRequestAnimationFrame||t.msRequestAnimationFrame||function(e){setTimeout(e,0)};return a.each(function(){var a,v,h,y,x,w,C=e.isPlainObject(o)?e.extend(!0,{},e.fn.sidebar.settings,o):e.extend({},e.fn.sidebar.settings),T=C.selector,k=C.className,S=C.namespace,z=C.error,A="."+S,E="module-"+S,F=e(this),D=e(C.context),O=F.children(T.sidebar),P=D.children(T.pusher),R=this,j=F.data(E);w={initialize:function(){w.debug("Initializing sidebar",o),x=w.get.transitionEvent(),(w.is.legacy()||C.legacy)&&(C.transition="overlay",C.useLegacy=!0),h=w.get.uniqueID(),v="."+h,b(w.setup.layout),w.instantiate()},instantiate:function(){w.verbose("Storing instance of module",w),j=w,F.data(E,w)},destroy:function(){w.verbose("Destroying previous module for",F),w.remove.direction(),F.off(A).removeData(E),D.off(v),s.off(v),c.off(v)},event:{clickaway:function(t){0===e(t.target).closest(T.sidebar).size()&&(w.verbose("User clicked on dimmed page"),w.hide())},touch:function(){},containScroll:function(){R.scrollTop<=0&&(R.scrollTop=1),R.scrollTop+R.offsetHeight>=R.scrollHeight&&(R.scrollTop=R.scrollHeight-R.offsetHeight-1)},scroll:function(t){0===e(t.target).closest(T.sidebar).size()&&t.preventDefault()}},bind:{clickaway:function(){w.verbose("Adding clickaway events to context",D),C.closable&&D.on("click"+v,w.event.clickaway).on("touchend"+v,w.event.clickaway)},scrollLock:function(){C.scrollLock&&(w.debug("Disabling page scroll"),s.on("DOMMouseScroll"+v,w.event.scroll)),w.verbose("Adding events to contain sidebar scroll"),c.on("touchmove"+v,w.event.touch),F.on("scroll"+A,w.event.containScroll)}},unbind:{clickaway:function(){w.verbose("Removing clickaway events from context",D),D.off(v)},scrollLock:function(){w.verbose("Removing scroll lock from page"),c.off(v),s.off(v),F.off("scroll"+A)}},add:{bodyCSS:function(){var t,n=F.outerWidth(),i=F.outerHeight();t='<style title="'+S+'"> .ui.visible.left.sidebar ~ .fixed, .ui.visible.left.sidebar ~ .pusher { -webkit-transform: translate3d('+n+"px, 0, 0); transform: translate3d("+n+"px, 0, 0); } .ui.visible.right.sidebar ~ .fixed, .ui.visible.right.sidebar ~ .pusher { -webkit-transform: translate3d(-"+n+"px, 0, 0); transform: translate3d(-"+n+"px, 0, 0); } .ui.visible.left.sidebar ~ .ui.visible.right.sidebar ~ .fixed, .ui.visible.left.sidebar ~ .ui.visible.right.sidebar ~ .pusher, .ui.visible.right.sidebar ~ .ui.visible.left.sidebar ~ .fixed, .ui.visible.right.sidebar ~ .ui.visible.left.sidebar ~ .pusher { -webkit-transform: translate3d(0px, 0, 0); transform: translate3d(0px, 0, 0); } .ui.visible.top.sidebar ~ .fixed, .ui.visible.top.sidebar ~ .pusher { -webkit-transform: translate3d(0, "+i+"px, 0); transform: translate3d(0, "+i+"px, 0); } .ui.visible.bottom.sidebar ~ .fixed, .ui.visible.bottom.sidebar ~ .pusher { -webkit-transform: translate3d(0, -"+i+"px, 0); transform: translate3d(0, -"+i+"px, 0); }",w.is.ie()&&(t+=" .ui.visible.left.sidebar ~ .pusher:after { -webkit-transform: translate3d("+n+"px, 0, 0); transform: translate3d("+n+"px, 0, 0); } .ui.visible.right.sidebar ~ .pusher:after { -webkit-transform: translate3d(-"+n+"px, 0, 0); transform: translate3d(-"+n+"px, 0, 0); } .ui.visible.left.sidebar ~ .ui.visible.right.sidebar ~ .pusher:after, .ui.visible.right.sidebar ~ .ui.visible.left.sidebar ~ .pusher:after { -webkit-transform: translate3d(0px, 0, 0); transform: translate3d(0px, 0, 0); } .ui.visible.top.sidebar ~ .pusher:after { -webkit-transform: translate3d(0, "+i+"px, 0); transform: translate3d(0, "+i+"px, 0); } .ui.visible.bottom.sidebar ~ .pusher:after { -webkit-transform: translate3d(0, -"+i+"px, 0); transform: translate3d(0, -"+i+"px, 0); }"),t+="</style>",l.append(t),a=e("style[title="+S+"]"),w.debug("Adding sizing css to head",a)}},refresh:function(){w.verbose("Refreshing selector cache"),D=e(C.context),O=D.children(T.sidebar),P=D.children(T.pusher)},refreshSidebars:function(){w.verbose("Refreshing other sidebars"),O=D.children(T.sidebar)},repaint:function(){w.verbose("Forcing repaint event"),R.style.display="none",R.offsetHeight,R.scrollTop=R.scrollTop,R.style.display=""},setup:{layout:function(){0===D.children(T.pusher).size()&&(w.debug("Adding wrapper element for sidebar"),w.error(z.pusher),P=e('<div class="pusher" />'),D.children().not(T.omitted).not(O).wrapAll(P),w.refresh()),(0===F.nextAll(T.pusher).size()||F.nextAll(T.pusher)[0]!==P[0])&&(w.debug("Moved sidebar to correct parent element"),w.error(z.movedSidebar,R),F.detach().prependTo(D),w.refresh()),w.set.pushable(),w.set.direction()}},attachEvents:function(t,n){var i=e(t);n=e.isFunction(w[n])?w[n]:w.toggle,i.size()>0?(w.debug("Attaching sidebar events to element",t,n),i.on("click"+A,n)):w.error(z.notFound,t)},show:function(t){var n=C.useLegacy?w.legacyPushPage:w.pushPage;t=e.isFunction(t)?t:function(){},w.is.hidden()?(w.refreshSidebars(),C.overlay&&(w.error(z.overlay),C.transition="overlay"),w.refresh(),w.othersVisible()&&"overlay"!=w.get.transition()&&(w.debug("Other sidebars currently open"),C.exclusive&&w.hideOthers()),n(function(){e.proxy(t,R)(),e.proxy(C.onShow,R)()}),e.proxy(C.onChange,R)(),e.proxy(C.onVisible,R)()):w.debug("Sidebar is already visible")},hide:function(t){var n=C.useLegacy?w.legacyPullPage:w.pullPage;t=e.isFunction(t)?t:function(){},(w.is.visible()||w.is.animating())&&(w.debug("Hiding sidebar",t),w.refreshSidebars(),n(function(){e.proxy(t,R)(),e.proxy(C.onHidden,R)()}),e.proxy(C.onChange,R)(),e.proxy(C.onHide,R)())},othersVisible:function(){return O.not(F).filter("."+k.visible).size()>0},hideOthers:function(e){var t=O.not(F).filter("."+k.visible),e=e||function(){},n=t.size(),i=0;t.sidebar("hide",function(){i++,i==n&&e()})},toggle:function(){w.verbose("Determining toggled direction"),w.is.hidden()?w.show():w.hide()},pushPage:function(t){var n,i,o=w.get.transition(),r="safe"==o?D:"overlay"==o||w.othersVisible()?F:P;t=e.isFunction(t)?t:function(){},("scale down"==C.transition||w.is.mobile()&&"overlay"!==o)&&w.scrollToTop(),w.set.transition(),w.repaint(),n=function(){w.bind.clickaway(),w.add.bodyCSS(),w.set.animating(),w.set.visible(),w.othersVisible()||C.dimPage&&P.addClass(k.dimmed)},i=function(n){n.target==r[0]&&(r.off(x+v,i),w.remove.animating(),w.bind.scrollLock(),e.proxy(t,R)())},r.off(x+v),r.on(x+v,i),b(n)},pullPage:function(t){var n,i,o=w.get.transition(),r="safe"==o?D:"overlay"==o||w.othersVisible()?F:P;t=e.isFunction(t)?t:function(){},w.verbose("Removing context push state",w.get.direction()),w.unbind.clickaway(),w.unbind.scrollLock(),n=function(){w.set.animating(),w.remove.visible(),C.dimPage&&!w.othersVisible()&&P.removeClass(k.dimmed)},i=function(n){n.target==r[0]&&(r.off(x+v,i),w.remove.animating(),w.remove.transition(),w.remove.bodyCSS(),("scale down"==o||C.returnScroll&&w.is.mobile())&&w.scrollBack(),e.proxy(t,R)())},r.off(x+v),r.on(x+v,i),b(n)},legacyPushPage:function(t){var n=F.width(),i=w.get.direction(),o={};n=n||F.width(),t=e.isFunction(t)?t:function(){},o[i]=n,w.debug("Using javascript to push context",o),w.set.visible(),w.set.transition(),w.set.animating(),C.dimPage&&P.addClass(k.dimmed),D.css("position","relative").animate(o,C.duration,C.easing,function(){w.remove.animating(),w.bind.clickaway(),e.proxy(t,w)()})},legacyPullPage:function(t){var n=0,i=w.get.direction(),o={};n=n||F.width(),t=e.isFunction(t)?t:function(){},o[i]="0px",w.debug("Using javascript to pull context",o),w.unbind.clickaway(),w.set.animating(),w.remove.visible(),C.dimPage&&!w.othersVisible()&&P.removeClass(k.dimmed),D.css("position","relative").animate(o,C.duration,C.easing,function(){w.remove.animating(),e.proxy(t,w)()})},scrollToTop:function(){w.verbose("Scrolling to top of page to avoid animation issues"),y=e(t).scrollTop(),F.scrollTop(0),t.scrollTo(0,0)},scrollBack:function(){w.verbose("Scrolling back to original page position"),t.scrollTo(0,y)},set:{pushed:function(){D.addClass(k.pushed)},pushable:function(){D.addClass(k.pushable)},active:function(){F.addClass(k.active)},animating:function(){F.addClass(k.animating)},transition:function(e){e=e||w.get.transition(),F.addClass(e)},direction:function(e){e=e||w.get.direction(),F.addClass(k[e])},visible:function(){F.addClass(k.visible)},overlay:function(){F.addClass(k.overlay)}},remove:{bodyCSS:function(){w.debug("Removing body css styles",a),a.size()>0&&a.remove()},pushed:function(){D.removeClass(k.pushed)},pushable:function(){D.removeClass(k.pushable)},active:function(){F.removeClass(k.active)},animating:function(){F.removeClass(k.animating)},transition:function(e){e=e||w.get.transition(),F.removeClass(e)},direction:function(e){e=e||w.get.direction(),F.removeClass(k[e])},visible:function(){F.removeClass(k.visible)},overlay:function(){F.removeClass(k.overlay)}},get:{direction:function(){return F.hasClass(k.top)?k.top:F.hasClass(k.right)?k.right:F.hasClass(k.bottom)?k.bottom:k.left},transition:function(){var e=w.get.direction();return w.is.mobile()?"auto"==C.mobileTransition?C.defaultTransition.mobile[e]:C.mobileTransition:"auto"==C.transition?C.defaultTransition.computer[e]:C.transition},transitionEvent:function(){var e,t=n.createElement("element"),o={transition:"transitionend",OTransition:"oTransitionEnd",MozTransition:"transitionend",WebkitTransition:"webkitTransitionEnd"};for(e in o)if(t.style[e]!==i)return o[e]},uniqueID:function(){return(Math.random().toString(16)+"000000000").substr(2,8)}},is:{ie:function(){var e=!t.ActiveXObject&&"ActiveXObject"in t,n="ActiveXObject"in t;return e||n},legacy:function(){var e,o=n.createElement("div"),r={webkitTransform:"-webkit-transform",OTransform:"-o-transform",msTransform:"-ms-transform",MozTransform:"-moz-transform",transform:"transform"};n.body.insertBefore(o,null);for(var a in r)o.style[a]!==i&&(o.style[a]="translate3d(1px,1px,1px)",e=t.getComputedStyle(o).getPropertyValue(r[a]));return n.body.removeChild(o),!(e!==i&&e.length>0&&"none"!==e)},mobile:function(){var e=navigator.userAgent,t=/Mobile|iP(hone|od|ad)|Android|BlackBerry|IEMobile|Kindle|NetFront|Silk-Accelerated|(hpw|web)OS|Fennec|Minimo|Opera M(obi|ini)|Blazer|Dolfin|Dolphin|Skyfire|Zune/,n=t.test(e);return n?(w.verbose("Browser was found to be mobile",e),!0):(w.verbose("Browser is not mobile, using regular transition",e),!1)},hidden:function(){return!w.is.visible()},visible:function(){return F.hasClass(k.visible)},open:function(){return w.is.visible()},closed:function(){return w.is.hidden()},vertical:function(){return F.hasClass(k.top)},animating:function(){return D.hasClass(k.animating)}},setting:function(t,n){if(w.debug("Changing setting",t,n),e.isPlainObject(t))e.extend(!0,C,t);else{if(n===i)return C[t];C[t]=n}},internal:function(t,n){if(e.isPlainObject(t))e.extend(!0,w,t);else{if(n===i)return w[t];w[t]=n}},debug:function(){C.debug&&(C.performance?w.performance.log(arguments):(w.debug=Function.prototype.bind.call(console.info,console,C.name+":"),w.debug.apply(console,arguments)))},verbose:function(){C.verbose&&C.debug&&(C.performance?w.performance.log(arguments):(w.verbose=Function.prototype.bind.call(console.info,console,C.name+":"),w.verbose.apply(console,arguments)))},error:function(){w.error=Function.prototype.bind.call(console.error,console,C.name+":"),w.error.apply(console,arguments)},performance:{log:function(e){var t,n,i;C.performance&&(t=(new Date).getTime(),i=d||t,n=t-i,d=t,m.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:R,"Execution Time":n})),clearTimeout(w.performance.timer),w.performance.timer=setTimeout(w.performance.display,100)},display:function(){var t=C.name+":",n=0;d=!1,clearTimeout(w.performance.timer),e.each(m,function(e,t){n+=t["Execution Time"]}),t+=" "+n+"ms",u&&(t+=" '"+u+"'"),(console.group!==i||console.table!==i)&&m.length>0&&(console.groupCollapsed(t),console.table?console.table(m):e.each(m,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),m=[]}},invoke:function(t,n,o){var a,s,c,l=j;return n=n||g,o=R||o,"string"==typeof t&&l!==i&&(t=t.split(/[\. ]/),a=t.length-1,e.each(t,function(n,o){var r=n!=a?o+t[n+1].charAt(0).toUpperCase()+t[n+1].slice(1):t;if(e.isPlainObject(l[r])&&n!=a)l=l[r];else{if(l[r]!==i)return s=l[r],!1;if(!e.isPlainObject(l[o])||n==a)return l[o]!==i?(s=l[o],!1):(w.error(z.method,t),!1);l=l[o]}})),e.isFunction(s)?c=s.apply(o,n):s!==i&&(c=s),e.isArray(r)?r.push(c):r!==i?r=[r,c]:c!==i&&(r=c),s}},p?(j===i&&w.initialize(),w.invoke(f)):(j!==i&&w.invoke("destroy"),w.initialize())}),r!==i?r:this},e.fn.sidebar.settings={name:"Sidebar",namespace:"sidebar",debug:!1,verbose:!0,performance:!0,transition:"auto",mobileTransition:"auto",defaultTransition:{computer:{left:"uncover",right:"uncover",top:"overlay",bottom:"overlay"},mobile:{left:"uncover",right:"uncover",top:"overlay",bottom:"overlay"}},context:"body",exclusive:!1,closable:!0,dimPage:!0,scrollLock:!1,returnScroll:!1,useLegacy:!1,duration:500,easing:"easeInOutQuint",onChange:function(){},onShow:function(){},onHide:function(){},onHidden:function(){},onVisible:function(){},className:{active:"active",animating:"animating",dimmed:"dimmed",pushable:"pushable",pushed:"pushed",right:"right",top:"top",left:"left",bottom:"bottom",visible:"visible"},selector:{fixed:".fixed",omitted:"script, link, style, .ui.modal, .ui.dimmer, .ui.nag, .ui.fixed",pusher:".pusher",sidebar:".ui.sidebar"},error:{method:"The method you called is not defined.",pusher:"Had to add pusher element. For optimal performance make sure body content is inside a pusher element",movedSidebar:"Had to move sidebar. For optimal performance make sure sidebar and pusher are direct children of your body tag",overlay:"The overlay setting is no longer supported, use animation: overlay",notFound:"There were no elements that matched the specified selector"}},e.extend(e.easing,{easeInOutQuint:function(e,t,n,i,o){return(t/=o/2)<1?i/2*t*t*t*t*t+n:i/2*((t-=2)*t*t*t*t+2)+n
}})}(jQuery,window,document),function(e,t,n,i){"use strict";e.fn.sticky=function(n){var o,r=e(this),a=r.selector||"",s=(new Date).getTime(),c=[],l=arguments[0],u="string"==typeof l,d=[].slice.call(arguments,1);return r.each(function(){var r,m,f,p=e.extend(!0,{},e.fn.sticky.settings,n),g=p.className,b=p.namespace,v=p.error,h="."+b,y="module-"+b,x=e(this),w=e(t),C=x.offsetParent(),T=e(p.scrollContext),k=(x.selector||"",x.data(y)),S=t.requestAnimationFrame||t.mozRequestAnimationFrame||t.webkitRequestAnimationFrame||t.msRequestAnimationFrame||function(e){setTimeout(e,0)},z=this;f={initialize:function(){return r=p.context?e(p.context):C,0===r.size()?void f.error(v.invalidContext,p.context,x):(f.verbose("Initializing sticky",p,C),f.save.positions(),f.is.hidden()&&f.error(v.visible,x),f.cache.element.height>f.cache.context.height?(f.reset(),void f.error(v.elementSize,x)):(w.on("resize"+h,f.event.resize),T.on("scroll"+h,f.event.scroll),f.observeChanges(),void f.instantiate()))},instantiate:function(){f.verbose("Storing instance of module",f),k=f,x.data(y,f)},destroy:function(){f.verbose("Destroying previous module"),f.reset(),w.off("resize"+h,f.event.resize),T.off("scroll"+h,f.event.scroll),x.removeData(y)},observeChanges:function(){var e=r[0];"MutationObserver"in t&&(m=new MutationObserver(function(){clearTimeout(f.timer),f.timer=setTimeout(function(){f.verbose("DOM tree modified, updating sticky menu"),f.refresh()},200)}),m.observe(z,{childList:!0,subtree:!0}),m.observe(e,{childList:!0,subtree:!0}),f.debug("Setting up mutation observer",m))},event:{resize:function(){S(function(){f.refresh(),f.stick()})},scroll:function(){S(function(){f.stick(),e.proxy(p.onScroll,z)()})}},refresh:function(t){f.reset(),t&&(C=x.offsetParent()),f.save.positions(),f.stick(),e.proxy(p.onReposition,z)()},supports:{sticky:function(){{var t=e("<div/>");t.get()}return t.addClass(g.supported),t.css("position").match("sticky")}},save:{scroll:function(e){f.lastScroll=e},positions:function(){var e={height:w.height()},t={margin:{top:parseInt(x.css("margin-top"),10),bottom:parseInt(x.css("margin-bottom"),10)},offset:x.offset(),width:x.outerWidth(),height:x.outerHeight()},n={offset:r.offset(),height:r.outerHeight()};f.cache={fits:t.height<e.height,window:{height:e.height},element:{margin:t.margin,top:t.offset.top-t.margin.top,left:t.offset.left,width:t.width,height:t.height,bottom:t.offset.top+t.height},context:{top:n.offset.top,height:n.height,bottom:n.offset.top+n.height}},f.set.containerSize(),f.set.size(),f.stick(),f.debug("Caching element positions",f.cache)}},get:{direction:function(e){var t="down";return e=e||T.scrollTop(),f.lastScroll!==i&&(f.lastScroll<e?t="down":f.lastScroll>e&&(t="up")),t},scrollChange:function(e){return e=e||T.scrollTop(),f.lastScroll?e-f.lastScroll:0},currentElementScroll:function(){return f.is.top()?Math.abs(parseInt(x.css("top"),10))||0:Math.abs(parseInt(x.css("bottom"),10))||0},elementScroll:function(e){e=e||T.scrollTop();var t,n=f.cache.element,i=f.cache.window,o=f.get.scrollChange(e),r=n.height-i.height+p.offset,a=f.get.currentElementScroll(),s=a+o;return t=f.cache.fits||0>s?0:s>r?r:s}},remove:{offset:function(){x.css("margin-top","")}},set:{offset:function(){f.verbose("Setting offset on element",p.offset),x.css("margin-top",p.offset)},containerSize:function(){var e=C.get(0).tagName;"HTML"===e||"body"==e?C=x.offsetParent():(f.debug("Settings container size",f.cache.context.height),C.height(f.cache.context.height))},scroll:function(e){f.debug("Setting scroll on element",e),f.is.top()&&x.css("bottom","").css("top",-e),f.is.bottom()&&x.css("top","").css("bottom",e)},size:function(){0!==f.cache.element.height&&0!==f.cache.element.width&&x.css({width:f.cache.element.width,height:f.cache.element.height})}},is:{top:function(){return x.hasClass(g.top)},bottom:function(){return x.hasClass(g.bottom)},initialPosition:function(){return!f.is.fixed()&&!f.is.bound()},hidden:function(){return!x.is(":visible")},bound:function(){return x.hasClass(g.bound)},fixed:function(){return x.hasClass(g.fixed)}},stick:function(){var e=f.cache,t=e.fits,n=e.element,i=e.window,o=e.context,r=f.is.bottom()&&p.pushing?p.bottomOffset:p.offset,a={top:T.scrollTop()+r,bottom:T.scrollTop()+r+i.height},s=(f.get.direction(a.top),f.get.elementScroll(a.top)),c=!t,l=0!==n.height;f.save.scroll(a.top),l&&(f.is.initialPosition()?a.top>=n.top&&(f.debug("Element passed, fixing element to page"),f.fixTop()):f.is.fixed()?f.is.top()?a.top<n.top?(f.debug("Fixed element reached top of container"),f.setInitialPosition()):n.height+a.top-s>o.bottom?(f.debug("Fixed element reached bottom of container"),f.bindBottom()):c&&f.set.scroll(s):f.is.bottom()&&(a.bottom-n.height<n.top?(f.debug("Bottom fixed rail has reached top of container"),f.setInitialPosition()):a.bottom>o.bottom?(f.debug("Bottom fixed rail has reached bottom of container"),f.bindBottom()):c&&f.set.scroll(s)):f.is.bottom()&&(p.pushing?f.is.bound()&&a.bottom<o.bottom&&(f.debug("Fixing bottom attached element to bottom of browser."),f.fixBottom()):f.is.bound()&&a.top<o.bottom-n.height&&(f.debug("Fixing bottom attached element to top of browser."),f.fixTop())))},bindTop:function(){f.debug("Binding element to top of parent container"),f.remove.offset(),x.css("left","").css("top","").css("bottom","").removeClass(g.fixed).removeClass(g.bottom).addClass(g.bound).addClass(g.top),e.proxy(p.onTop,z)(),e.proxy(p.onUnstick,z)()},bindBottom:function(){f.debug("Binding element to bottom of parent container"),f.remove.offset(),x.css("left","").css("top","").css("bottom","").removeClass(g.fixed).removeClass(g.top).addClass(g.bound).addClass(g.bottom),e.proxy(p.onBottom,z)(),e.proxy(p.onUnstick,z)()},setInitialPosition:function(){f.unfix(),f.unbind()},fixTop:function(){f.debug("Fixing element to top of page"),f.set.offset(),x.css("left",f.cache.element.left).removeClass(g.bound).removeClass(g.bottom).addClass(g.fixed).addClass(g.top),e.proxy(p.onStick,z)()},fixBottom:function(){f.debug("Sticking element to bottom of page"),f.set.offset(),x.css("left",f.cache.element.left).removeClass(g.bound).removeClass(g.top).addClass(g.fixed).addClass(g.bottom),e.proxy(p.onStick,z)()},unbind:function(){f.debug("Removing absolute position on element"),f.remove.offset(),x.removeClass(g.bound).removeClass(g.top).removeClass(g.bottom)},unfix:function(){f.debug("Removing fixed position on element"),f.remove.offset(),x.removeClass(g.fixed).removeClass(g.top).removeClass(g.bottom),e.proxy(p.onUnstick,this)()},reset:function(){f.debug("Reseting elements position"),f.unbind(),f.unfix(),f.resetCSS()},resetCSS:function(){x.css({top:"",bottom:"",width:"",height:""}),C.css({height:""})},setting:function(t,n){if(e.isPlainObject(t))e.extend(!0,p,t);else{if(n===i)return p[t];p[t]=n}},internal:function(t,n){if(e.isPlainObject(t))e.extend(!0,f,t);else{if(n===i)return f[t];f[t]=n}},debug:function(){p.debug&&(p.performance?f.performance.log(arguments):(f.debug=Function.prototype.bind.call(console.info,console,p.name+":"),f.debug.apply(console,arguments)))},verbose:function(){p.verbose&&p.debug&&(p.performance?f.performance.log(arguments):(f.verbose=Function.prototype.bind.call(console.info,console,p.name+":"),f.verbose.apply(console,arguments)))},error:function(){f.error=Function.prototype.bind.call(console.error,console,p.name+":"),f.error.apply(console,arguments)},performance:{log:function(e){var t,n,i;p.performance&&(t=(new Date).getTime(),i=s||t,n=t-i,s=t,c.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:z,"Execution Time":n})),clearTimeout(f.performance.timer),f.performance.timer=setTimeout(f.performance.display,0)},display:function(){var t=p.name+":",n=0;s=!1,clearTimeout(f.performance.timer),e.each(c,function(e,t){n+=t["Execution Time"]}),t+=" "+n+"ms",a&&(t+=" '"+a+"'"),(console.group!==i||console.table!==i)&&c.length>0&&(console.groupCollapsed(t),console.table?console.table(c):e.each(c,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),c=[]}},invoke:function(t,n,r){var a,s,c,l=k;return n=n||d,r=z||r,"string"==typeof t&&l!==i&&(t=t.split(/[\. ]/),a=t.length-1,e.each(t,function(n,o){var r=n!=a?o+t[n+1].charAt(0).toUpperCase()+t[n+1].slice(1):t;if(e.isPlainObject(l[r])&&n!=a)l=l[r];else{if(l[r]!==i)return s=l[r],!1;if(!e.isPlainObject(l[o])||n==a)return l[o]!==i?(s=l[o],!1):!1;l=l[o]}})),e.isFunction(s)?c=s.apply(r,n):s!==i&&(c=s),e.isArray(o)?o.push(c):o!==i?o=[o,c]:c!==i&&(o=c),s}},u?(k===i&&f.initialize(),f.invoke(l)):(k!==i&&f.destroy(),f.initialize())}),o!==i?o:this},e.fn.sticky.settings={name:"Sticky",namespace:"sticky",debug:!1,verbose:!1,performance:!1,pushing:!1,context:!1,scrollContext:t,offset:0,bottomOffset:0,onReposition:function(){},onScroll:function(){},onStick:function(){},onUnstick:function(){},onTop:function(){},onBottom:function(){},error:{container:"Sticky element must be inside a relative container",visible:"Element is hidden, you must call refresh after element becomes visible",method:"The method you called is not defined.",invalidContext:"Context specified does not exist",elementSize:"Sticky element is larger than its container, cannot create sticky."},className:{bound:"bound",fixed:"fixed",supported:"native",top:"top",bottom:"bottom"}}}(jQuery,window,document),function(e,t,n,i){"use strict";e.tab=e.fn.tab=function(n){var o,r,a=e(e.isFunction(this)?t:this),s=e.isPlainObject(n)?e.extend(!0,{},e.fn.tab.settings,n):e.extend({},e.fn.tab.settings),c=a.selector||"",l=(new Date).getTime(),u=[],d=arguments[0],m="string"==typeof d,f=[].slice.call(arguments,1);return a.each(function(){var n,p,g,b,v,h=s.className,y=s.metadata,x=s.selector,w=s.error,C="."+s.namespace,T="module-"+s.namespace,k=e(this),S={},z=!0,A=0,E=this,F=k.data(T);o={initialize:function(){o.debug("Initializing tab menu item",k),o.determineTabs(),o.debug("Determining tabs",s.context,p),s.auto&&(o.verbose("Setting up automatic tab retrieval from server"),s.apiSettings={url:s.path+"/{$tab}"}),e.isWindow(E)||(o.debug("Attaching tab activation events to element",k),k.on("click"+C,o.event.click)),o.instantiate()},determineTabs:function(){var t;"parent"===s.context?(k.closest(x.ui).size()>0?(t=k.closest(x.ui),o.verbose("Using closest UI element for determining parent",t)):t=k,n=t.parent(),o.verbose("Determined parent element for creating context",n)):s.context?(n=e(s.context),o.verbose("Using selector for tab context",s.context,n)):n=e("body"),s.childrenOnly?(p=n.children(x.tabs),o.debug("Searching tab context children for tabs",n,p)):(p=n.find(x.tabs),o.debug("Searching tab context for tabs",n,p))},initializeHistory:function(){if(s.history){if(o.debug("Initializing page state"),e.address===i)return o.error(w.state),!1;if("state"==s.historyType){if(o.debug("Using HTML5 to manage state"),s.path===!1)return o.error(w.path),!1;e.address.history(!0).state(s.path)}e.address.bind("change",o.event.history.change)}},instantiate:function(){o.verbose("Storing instance of module",o),k.data(T,o)},destroy:function(){o.debug("Destroying tabs",k),k.removeData(T).off(C)},event:{click:function(t){var n=e(this).data(y.tab);n!==i?(s.history?(o.verbose("Updating page state",t),e.address.value(n)):(o.verbose("Changing tab",t),o.changeTab(n)),t.preventDefault()):o.debug("No tab specified")},history:{change:function(t){var n=t.pathNames.join("/")||o.get.initialPath(),r=s.templates.determineTitle(n)||!1;o.performance.display(),o.debug("History change event",n,t),v=t,n!==i&&o.changeTab(n),r&&e.address.title(r)}}},refresh:function(){g&&(o.debug("Refreshing tab",g),o.changeTab(g))},cache:{read:function(e){return e!==i?S[e]:!1},add:function(e,t){e=e||g,o.debug("Adding cached content for",e),S[e]=t},remove:function(e){e=e||g,o.debug("Removing cached content for",e),delete S[e]}},set:{state:function(t){e.address.value(t)}},changeTab:function(i){var r=t.history&&t.history.pushState,a=r&&s.ignoreFirstLoad&&z,c=s.auto||e.isPlainObject(s.apiSettings),l=c&&!a?o.utilities.pathToArray(i):o.get.defaultPathArray(i);i=o.utilities.arrayToPath(l),e.each(l,function(t,r){var u,d,m,f,p=l.slice(0,t+1),h=o.utilities.arrayToPath(p),y=o.is.tab(h),x=t+1==l.length,C=o.get.tabElement(h);if(o.verbose("Looking for tab",r),y){if(o.verbose("Tab was found",r),g=h,b=o.utilities.filterArray(l,p),x?f=!0:(d=l.slice(0,t+2),m=o.utilities.arrayToPath(d),f=!o.is.tab(m),f&&o.verbose("Tab parameters found",d)),f&&c)return a?(o.debug("Ignoring remote content on first tab load",h),z=!1,o.cache.add(i,C.html()),o.activate.all(h),e.proxy(s.onTabInit,C)(h,b,v),e.proxy(s.onTabLoad,C)(h,b,v)):(o.activate.navigation(h),o.content.fetch(h,i)),!1;o.debug("Opened local tab",h),o.activate.all(h),o.cache.read(h)||(o.cache.add(h,!0),o.debug("First time tab loaded calling tab init"),e.proxy(s.onTabInit,C)(h,b,v)),e.proxy(s.onTabLoad,C)(h,b,v)}else{if(-1!=i.search("/"))return o.error(w.missingTab,k,n,h),!1;if(u=e("#"+i+', a[name="'+i+'"]'),h=u.closest("[data-tab]").data("tab"),C=o.get.tabElement(h),u&&u.size()>0&&h)return o.debug("No tab found, but deep anchor link present, opening parent tab"),o.activate.all(h),o.cache.read(h)||(o.cache.add(h,!0),o.debug("First time tab loaded calling tab init"),e.proxy(s.onTabInit,C)(h,b,v)),!1}})},content:{fetch:function(t,n){var r,a,c=o.get.tabElement(t),l={dataType:"html",stateContext:c,onSuccess:function(i){o.cache.add(n,i),o.content.update(t,i),t==g?(o.debug("Content loaded",t),o.activate.tab(t)):o.debug("Content loaded in background",t),e.proxy(s.onTabInit,c)(t,b,v),e.proxy(s.onTabLoad,c)(t,b,v)},urlData:{tab:n}},u=c.data(y.promise)||!1,d=u&&"pending"===u.state();n=n||t,a=o.cache.read(n),s.cache&&a?(o.debug("Showing existing content",n),o.content.update(t,a),o.activate.tab(t),e.proxy(s.onTabLoad,c)(t,b,v)):d?(o.debug("Content is already loading",n),c.addClass(h.loading)):e.api!==i?(r=e.extend(!0,{headers:{"X-Remote":!0}},s.apiSettings,l),o.debug("Retrieving remote content",n,r),e.api(r)):o.error(w.api)},update:function(e,t){o.debug("Updating html for",e);var n=o.get.tabElement(e);n.html(t)}},activate:{all:function(e){o.activate.tab(e),o.activate.navigation(e)},tab:function(e){var t=o.get.tabElement(e);o.verbose("Showing tab content for",t),t.addClass(h.active).siblings(p).removeClass(h.active+" "+h.loading)},navigation:function(e){var t=o.get.navElement(e);o.verbose("Activating tab navigation for",t,e),t.addClass(h.active).siblings(a).removeClass(h.active+" "+h.loading)}},deactivate:{all:function(){o.deactivate.navigation(),o.deactivate.tabs()},navigation:function(){a.removeClass(h.active)},tabs:function(){p.removeClass(h.active+" "+h.loading)}},is:{tab:function(e){return e!==i?o.get.tabElement(e).size()>0:!1}},get:{initialPath:function(){return a.eq(0).data(y.tab)||p.eq(0).data(y.tab)},path:function(){return e.address.value()},defaultPathArray:function(e){return o.utilities.pathToArray(o.get.defaultPath(e))},defaultPath:function(e){var t=a.filter("[data-"+y.tab+'^="'+e+'/"]').eq(0),n=t.data(y.tab)||!1;if(n){if(o.debug("Found default tab",n),A<s.maxDepth)return A++,o.get.defaultPath(n);o.error(w.recursion)}else o.debug("No default tabs found for",e,p);return A=0,e},navElement:function(e){return e=e||g,a.filter("[data-"+y.tab+'="'+e+'"]')},tabElement:function(e){var t,n,i,r;return e=e||g,i=o.utilities.pathToArray(e),r=o.utilities.last(i),t=p.filter("[data-"+y.tab+'="'+r+'"]'),n=p.filter("[data-"+y.tab+'="'+e+'"]'),t.size()>0?t:n},tab:function(){return g}},utilities:{filterArray:function(t,n){return e.grep(t,function(t){return-1==e.inArray(t,n)})},last:function(t){return e.isArray(t)?t[t.length-1]:!1},pathToArray:function(e){return e===i&&(e=g),"string"==typeof e?e.split("/"):[e]},arrayToPath:function(t){return e.isArray(t)?t.join("/"):!1}},setting:function(t,n){if(o.debug("Changing setting",t,n),e.isPlainObject(t))e.extend(!0,s,t);else{if(n===i)return s[t];s[t]=n}},internal:function(t,n){if(e.isPlainObject(t))e.extend(!0,o,t);else{if(n===i)return o[t];o[t]=n}},debug:function(){s.debug&&(s.performance?o.performance.log(arguments):(o.debug=Function.prototype.bind.call(console.info,console,s.name+":"),o.debug.apply(console,arguments)))},verbose:function(){s.verbose&&s.debug&&(s.performance?o.performance.log(arguments):(o.verbose=Function.prototype.bind.call(console.info,console,s.name+":"),o.verbose.apply(console,arguments)))},error:function(){o.error=Function.prototype.bind.call(console.error,console,s.name+":"),o.error.apply(console,arguments)},performance:{log:function(e){var t,n,i;s.performance&&(t=(new Date).getTime(),i=l||t,n=t-i,l=t,u.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:E,"Execution Time":n})),clearTimeout(o.performance.timer),o.performance.timer=setTimeout(o.performance.display,100)},display:function(){var t=s.name+":",n=0;l=!1,clearTimeout(o.performance.timer),e.each(u,function(e,t){n+=t["Execution Time"]}),t+=" "+n+"ms",c&&(t+=" '"+c+"'"),(console.group!==i||console.table!==i)&&u.length>0&&(console.groupCollapsed(t),console.table?console.table(u):e.each(u,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),u=[]}},invoke:function(t,n,a){var s,c,l,u=F;return n=n||f,a=E||a,"string"==typeof t&&u!==i&&(t=t.split(/[\. ]/),s=t.length-1,e.each(t,function(n,r){var a=n!=s?r+t[n+1].charAt(0).toUpperCase()+t[n+1].slice(1):t;if(e.isPlainObject(u[a])&&n!=s)u=u[a];else{if(u[a]!==i)return c=u[a],!1;if(!e.isPlainObject(u[r])||n==s)return u[r]!==i?(c=u[r],!1):(o.error(w.method,t),!1);u=u[r]}})),e.isFunction(c)?l=c.apply(a,n):c!==i&&(l=c),e.isArray(r)?r.push(l):r!==i?r=[r,l]:l!==i&&(r=l),c}},m?(F===i&&o.initialize(),o.invoke(d)):(F!==i&&o.destroy(),o.initialize())}),o&&!m&&o.initializeHistory(),r!==i?r:this},e.tab=function(n){e(t).tab(n)},e.fn.tab.settings={name:"Tab",namespace:"tab",debug:!1,verbose:!0,performance:!0,auto:!1,history:!1,historyType:"hash",path:!1,context:!1,childrenOnly:!1,maxDepth:25,ignoreFirstLoad:!1,alwaysRefresh:!1,cache:!0,apiSettings:!1,onTabInit:function(){},onTabLoad:function(){},templates:{determineTitle:function(){}},error:{api:"You attempted to load content without API module",method:"The method you called is not defined",missingTab:"Activated tab cannot be found for this context.",noContent:"The tab you specified is missing a content url.",path:"History enabled, but no path was specified",recursion:"Max recursive depth reached",state:"History requires Asual's Address library <https://github.com/asual/jquery-address>"},metadata:{tab:"tab",loaded:"loaded",promise:"promise"},className:{loading:"loading",active:"active"},selector:{tabs:".ui.tab",ui:".ui"}}}(jQuery,window,document),function(e,t,n,i){"use strict";e.fn.transition=function(){{var o,r=e(this),a=r.selector||"",s=(new Date).getTime(),c=[],l=arguments,u=l[0],d=[].slice.call(arguments,1),m="string"==typeof u;t.requestAnimationFrame||t.mozRequestAnimationFrame||t.webkitRequestAnimationFrame||t.msRequestAnimationFrame||function(e){setTimeout(e,0)}}return r.each(function(){var t,f,p,g,b,v,h,y,x,w,C,T,k=e(this),S=this;T={initialize:function(){w="module-"+x,t=T.get.settings.apply(S,l),g=t.className,b=t.metadata,v=T.get.animationStartEvent(),h=T.get.animationEndEvent(),y=T.get.animationName(),p=t.error,x=t.namespace,C="."+t.namespace,f=k.data(w)||T,m&&(m=T.invoke(u)),m===!1&&(T.verbose("Converted arguments into settings object",t),T.animate(),T.instantiate())},instantiate:function(){T.verbose("Storing instance of module",T),k.data(w,f)},destroy:function(){T.verbose("Destroying previous module for",S),k.removeData(w)},refresh:function(){T.verbose("Refreshing display type on next animation"),delete T.displayType},forceRepaint:function(){T.verbose("Forcing element repaint");var e=k.parent(),t=k.next();0===t.size()?k.detach().appendTo(e):k.detach().insertBefore(t)},repaint:function(){T.verbose("Repainting element");S.offsetWidth},animate:function(e){return t=e||t,T.is.supported()?(T.debug("Preparing animation",t.animation),T.is.animating()&&t.queue?(!t.allowRepeats&&T.has.direction()&&T.is.occuring()&&T.queuing!==!0?T.error(p.repeated,t.animation,k):T.queue(t.animation),!1):void(T.can.animate()?T.set.animating(t.animation):T.error(p.noAnimation,t.animation))):(T.error(p.support),!1)},reset:function(){T.debug("Resetting animation to beginning conditions"),T.remove.animationEndCallback(),T.restore.conditions(),T.remove.animating()},queue:function(e){T.debug("Queueing animation of",e),T.queuing=!0,k.one(h+C,function(){T.queuing=!1,T.repaint(),T.animate.apply(this,t)})},complete:function(){T.verbose("CSS animation complete",t.animation),T.remove.animationEndCallback(),T.remove.failSafe(),T.is.looping()||(T.is.outward()?(T.verbose("Animation is outward, hiding element"),T.restore.conditions(),T.hide(),e.proxy(t.onHide,this)()):T.is.inward()?(T.verbose("Animation is outward, showing element"),T.restore.conditions(),T.show(),T.set.display(),e.proxy(t.onShow,this)()):T.restore.conditions(),T.remove.animation(),T.remove.animating()),e.proxy(t.onComplete,this)()},has:{direction:function(e){return e=e||t.animation,-1!==e.search(g.inward)||-1!==e.search(g.outward)?(T.debug("Direction already set in animation"),!0):!1},inlineDisplay:function(){var t=k.attr("style")||"";return e.isArray(t.match(/display.*?;/,""))}},set:{animating:function(n){n=n||t.animation,T.is.animating()||T.save.conditions(),T.remove.direction(),T.remove.animationEndCallback(),T.can.transition()&&!T.has.direction()&&T.set.direction(),T.remove.hidden(),T.set.display(),k.addClass(g.animating).addClass(g.transition).addClass(n).one(h+".complete"+C,T.complete),t.useFailSafe&&T.add.failSafe(),T.set.duration(t.duration),e.proxy(t.onStart,this)(),T.debug("Starting tween",n,k.attr("class"))},duration:function(e,n){n=n||t.duration,n="number"==typeof n?n+"ms":n,T.verbose("Setting animation duration",n),k.css({"-webkit-animation-duration":n,"-moz-animation-duration":n,"-ms-animation-duration":n,"-o-animation-duration":n,"animation-duration":n})},display:function(){var e=T.get.style(),t=T.get.displayType(),n=e+"display: "+t+" !important;";k.css("display",""),T.refresh(),k.css("display")!==t&&(T.verbose("Setting inline visibility to",t),k.attr("style",n))},direction:function(){k.is(":visible")&&!T.is.hidden()?(T.debug("Automatically determining the direction of animation","Outward"),k.removeClass(g.inward).addClass(g.outward)):(T.debug("Automatically determining the direction of animation","Inward"),k.removeClass(g.outward).addClass(g.inward))},looping:function(){T.debug("Transition set to loop"),k.addClass(g.looping)},hidden:function(){T.is.hidden()||(k.addClass(g.transition).addClass(g.hidden),"none"!==k.css("display")&&(T.verbose("Overriding default display to hide element"),k.css("display","none")))},visible:function(){k.addClass(g.transition).addClass(g.visible)}},save:{displayType:function(e){k.data(b.displayType,e)},transitionExists:function(t,n){e.fn.transition.exists[t]=n,T.verbose("Saving existence of transition",t,n)},conditions:function(){k.attr("class")||!1,k.attr("style")||"";k.removeClass(t.animation),T.remove.direction(),T.cache={className:k.attr("class"),style:T.get.style()},T.verbose("Saving original attributes",T.cache)}},restore:{conditions:function(){return T.cache===i?!1:(T.cache.className?k.attr("class",T.cache.className):k.removeAttr("class"),T.cache.style&&(T.verbose("Restoring original style attribute",T.cache.style),k.attr("style",T.cache.style)),T.is.looping()&&T.remove.looping(),void T.verbose("Restoring original attributes",T.cache))}},add:{failSafe:function(){var e=T.get.duration();T.timer=setTimeout(T.complete,e+100),T.verbose("Adding fail safe timer",T.timer)}},remove:{animating:function(){k.removeClass(g.animating)},animation:function(){k.css({"-webkit-animation":"","-moz-animation":"","-ms-animation":"","-o-animation":"",animation:""})},animationEndCallback:function(){k.off(".complete")},display:function(){k.css("display","")},direction:function(){k.removeClass(g.inward).removeClass(g.outward)},failSafe:function(){T.verbose("Removing fail safe timer",T.timer),T.timer&&clearTimeout(T.timer)},hidden:function(){k.removeClass(g.hidden)},visible:function(){k.removeClass(g.visible)},looping:function(){T.debug("Transitions are no longer looping"),k.removeClass(g.looping),T.forceRepaint()},transition:function(){k.removeClass(g.visible).removeClass(g.hidden)}},get:{settings:function(t,n,i){return"object"==typeof t?e.extend(!0,{},e.fn.transition.settings,t):"function"==typeof i?e.extend({},e.fn.transition.settings,{animation:t,onComplete:i,duration:n}):"string"==typeof n||"number"==typeof n?e.extend({},e.fn.transition.settings,{animation:t,duration:n}):"object"==typeof n?e.extend({},e.fn.transition.settings,n,{animation:t}):"function"==typeof n?e.extend({},e.fn.transition.settings,{animation:t,onComplete:n}):e.extend({},e.fn.transition.settings,{animation:t})},duration:function(e){return e=e||t.duration,"string"==typeof t.duration?e.indexOf("ms")>-1?parseFloat(e):1e3*parseFloat(e):e},displayType:function(){return t.displayType?t.displayType:(k.data(b.displayType)===i&&T.can.transition(!0),k.data(b.displayType))},style:function(){var e=k.attr("style")||"";return e.replace(/display.*?;/,"")},transitionExists:function(t){return e.fn.transition.exists[t]},animationName:function(){var e,t=n.createElement("div"),o={animation:"animationName",OAnimation:"oAnimationName",MozAnimation:"mozAnimationName",WebkitAnimation:"webkitAnimationName"};for(e in o)if(t.style[e]!==i)return o[e];return!1},animationStartEvent:function(){var e,t=n.createElement("div"),o={animation:"animationstart",OAnimation:"oAnimationStart",MozAnimation:"mozAnimationStart",WebkitAnimation:"webkitAnimationStart"};for(e in o)if(t.style[e]!==i)return o[e];return!1},animationEndEvent:function(){var e,t=n.createElement("div"),o={animation:"animationend",OAnimation:"oAnimationEnd",MozAnimation:"mozAnimationEnd",WebkitAnimation:"webkitAnimationEnd"};for(e in o)if(t.style[e]!==i)return o[e];return!1}},can:{transition:function(n){var o,r,a,s,c,l=k.attr("class"),u=k.prop("tagName"),d=t.animation,m=T.get.transitionExists(d);if(m===i||n){if(T.verbose("Determining whether animation exists"),o=e("<"+u+" />").addClass(l).insertAfter(k),r=o.addClass(d).removeClass(g.inward).removeClass(g.outward).addClass(g.animating).addClass(g.transition).css(y),a=o.addClass(g.inward).css(y),c=o.attr("class",l).removeAttr("style").removeClass(g.hidden).removeClass(g.visible).show().css("display"),T.verbose("Determining final display state",c),o.remove(),r!=a)T.debug("Direction exists for animation",d),s=!0;else{if("none"==r||!r)return void T.debug("No animation defined in css",d);T.debug("Static animation found",d,c),s=!1}T.save.displayType(c),T.save.transitionExists(d,s)}return m!==i?m:s},animate:function(){return T.can.transition()!==i}},is:{animating:function(){return k.hasClass(g.animating)},inward:function(){return k.hasClass(g.inward)},outward:function(){return k.hasClass(g.outward)},looping:function(){return k.hasClass(g.looping)},occuring:function(e){return e=e||t.animation,e=e.replace(" ","."),k.filter(e).size()>0},visible:function(){return k.is(":visible")},hidden:function(){return"hidden"===k.css("visibility")},supported:function(){return y!==!1&&h!==!1}},hide:function(){T.verbose("Hiding element"),T.is.animating()&&T.reset(),T.remove.display(),T.remove.visible(),T.set.hidden(),T.repaint()},show:function(e){T.verbose("Showing element",e),T.remove.hidden(),T.set.visible(),T.repaint()},start:function(){T.verbose("Starting animation"),k.removeClass(g.disabled)},stop:function(){T.debug("Stopping animation"),k.addClass(g.disabled)},toggle:function(){T.debug("Toggling play status"),k.toggleClass(g.disabled)},setting:function(n,o){if(T.debug("Changing setting",n,o),e.isPlainObject(n))e.extend(!0,t,n);else{if(o===i)return t[n];t[n]=o}},internal:function(t,n){if(e.isPlainObject(t))e.extend(!0,T,t);else{if(n===i)return T[t];T[t]=n}},debug:function(){t.debug&&(t.performance?T.performance.log(arguments):(T.debug=Function.prototype.bind.call(console.info,console,t.name+":"),T.debug.apply(console,arguments)))},verbose:function(){t.verbose&&t.debug&&(t.performance?T.performance.log(arguments):(T.verbose=Function.prototype.bind.call(console.info,console,t.name+":"),T.verbose.apply(console,arguments)))},error:function(){T.error=Function.prototype.bind.call(console.error,console,t.name+":"),T.error.apply(console,arguments)},performance:{log:function(e){var n,i,o;t.performance&&(n=(new Date).getTime(),o=s||n,i=n-o,s=n,c.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:S,"Execution Time":i})),clearTimeout(T.performance.timer),T.performance.timer=setTimeout(T.performance.display,600)},display:function(){var n=t.name+":",o=0;s=!1,clearTimeout(T.performance.timer),e.each(c,function(e,t){o+=t["Execution Time"]}),n+=" "+o+"ms",a&&(n+=" '"+a+"'"),r.size()>1&&(n+=" ("+r.size()+")"),(console.group!==i||console.table!==i)&&c.length>0&&(console.groupCollapsed(n),console.table?console.table(c):e.each(c,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),c=[]}},invoke:function(t,n,r){var a,s,c,l=f;return n=n||d,r=S||r,"string"==typeof t&&l!==i&&(t=t.split(/[\. ]/),a=t.length-1,e.each(t,function(n,o){var r=n!=a?o+t[n+1].charAt(0).toUpperCase()+t[n+1].slice(1):t;if(e.isPlainObject(l[r])&&n!=a)l=l[r];else{if(l[r]!==i)return s=l[r],!1;if(!e.isPlainObject(l[o])||n==a)return l[o]!==i?(s=l[o],!1):!1;l=l[o]}})),e.isFunction(s)?c=s.apply(r,n):s!==i&&(c=s),e.isArray(o)?o.push(c):o!==i?o=[o,c]:c!==i&&(o=c),s!==i?s:!1}},T.initialize()}),o!==i?o:this},e.fn.transition.exists={},e.fn.transition.settings={name:"Transition",debug:!1,verbose:!0,performance:!0,namespace:"transition",onStart:function(){},onComplete:function(){},onShow:function(){},onHide:function(){},useFailSafe:!1,allowRepeats:!1,displayType:!1,animation:"fade",duration:"500ms",queue:!0,metadata:{displayType:"display"},className:{animating:"animating",disabled:"disabled",hidden:"hidden",inward:"in",loading:"loading",looping:"looping",outward:"out",transition:"transition",visible:"visible"},error:{noAnimation:"There is no css animation matching the one you specified.",repeated:"That animation is already occurring, cancelling repeated animation",method:"The method you called is not defined",support:"This browser does not support CSS animations"}}}(jQuery,window,document),function(e,t,n,i){"use strict";e.fn.video=function(n){{var o,r=e(this),a=r.selector||"",s=(new Date).getTime(),c=[],l=arguments[0],u="string"==typeof l,d=[].slice.call(arguments,1);t.requestAnimationFrame||t.mozRequestAnimationFrame||t.webkitRequestAnimationFrame||t.msRequestAnimationFrame||function(e){setTimeout(e,0)}}return r.each(function(){var m,f=e.isPlainObject(n)?e.extend(!0,{},e.fn.video.settings,n):e.extend({},e.fn.video.settings),p=f.selector,g=f.className,b=f.error,v=f.metadata,h=f.namespace,y=f.templates,x="."+h,w="module-"+h,C=(e(t),e(this)),T=C.find(p.placeholder),k=C.find(p.playButton),S=C.find(p.embed),z=this,A=C.data(w);m={initialize:function(){m.debug("Initializing video"),m.create(),T.on("click"+x,m.play),k.on("click"+x,m.play),m.instantiate()},instantiate:function(){m.verbose("Storing instance of module",m),A=m,C.data(w,m)},create:function(){var e=C.data(v.image),t=y.video(e);C.html(t),m.refresh(),e||m.play(),m.debug("Creating html for video element",t)},destroy:function(){m.verbose("Destroying previous instance of video"),m.reset(),C.removeData(w).off(x),T.off(x),k.off(x)},refresh:function(){m.verbose("Refreshing selector cache"),T=C.find(p.placeholder),k=C.find(p.playButton),S=C.find(p.embed)},change:function(e,t,n){m.debug("Changing video to ",e,t,n),C.data(v.source,e).data(v.id,t).data(v.url,n),f.onChange()},reset:function(){m.debug("Clearing video embed and showing placeholder"),C.removeClass(g.active),S.html(" "),T.show(),f.onReset()},play:function(){m.debug("Playing video");var e=C.data(v.source)||!1,t=C.data(v.url)||!1,n=C.data(v.id)||!1;S.html(m.generate.html(e,n,t)),C.addClass(g.active),f.onPlay()},get:{source:function(e){return"string"!=typeof e?!1:-1!==e.search("youtube.com")?"youtube":-1!==e.search("vimeo.com")?"vimeo":!1
},id:function(e){return f.regExp.youtube.test(e)?e.match(f.regExp.youtube)[1]:f.regExp.vimeo.test(e)?e.match(f.regExp.vimeo)[2]:!1}},generate:{html:function(e,t,n){m.debug("Generating embed html");var i;return e=e||f.source,t=t||f.id,e&&t||n?(e&&t||(e=m.get.source(n),t=m.get.id(n)),"vimeo"==e?i='<iframe src="http://player.vimeo.com/video/'+t+"?="+m.generate.url(e)+'" width="100%" height="100%" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>':"youtube"==e&&(i='<iframe src="http://www.youtube.com/embed/'+t+"?="+m.generate.url(e)+'" width="100%" height="100%" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>')):m.error(b.noVideo),i},url:function(e){var t=f.api?1:0,n="auto"===f.autoplay?C.data("image")!==i:f.autoplay,o=f.hd?1:0,r=f.showUI?1:0,a=f.showUI?0:1,s="";return"vimeo"==e&&(s="api="+t+"&amp;title="+r+"&amp;byline="+r+"&amp;portrait="+r+"&amp;autoplay="+n,f.color&&(s+="&amp;color="+f.color)),"ustream"==e?(s="autoplay="+n,f.color&&(s+="&amp;color="+f.color)):"youtube"==e&&(s="enablejsapi="+t+"&amp;autoplay="+n+"&amp;autohide="+a+"&amp;hq="+o+"&amp;modestbranding=1",f.color&&(s+="&amp;color="+f.color)),s}},setting:function(t,n){if(m.debug("Changing setting",t,n),e.isPlainObject(t))e.extend(!0,f,t);else{if(n===i)return f[t];f[t]=n}},internal:function(t,n){if(e.isPlainObject(t))e.extend(!0,m,t);else{if(n===i)return m[t];m[t]=n}},debug:function(){f.debug&&(f.performance?m.performance.log(arguments):(m.debug=Function.prototype.bind.call(console.info,console,f.name+":"),m.debug.apply(console,arguments)))},verbose:function(){f.verbose&&f.debug&&(f.performance?m.performance.log(arguments):(m.verbose=Function.prototype.bind.call(console.info,console,f.name+":"),m.verbose.apply(console,arguments)))},error:function(){m.error=Function.prototype.bind.call(console.error,console,f.name+":"),m.error.apply(console,arguments)},performance:{log:function(e){var t,n,i;f.performance&&(t=(new Date).getTime(),i=s||t,n=t-i,s=t,c.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:z,"Execution Time":n})),clearTimeout(m.performance.timer),m.performance.timer=setTimeout(m.performance.display,100)},display:function(){var t=f.name+":",n=0;s=!1,clearTimeout(m.performance.timer),e.each(c,function(e,t){n+=t["Execution Time"]}),t+=" "+n+"ms",a&&(t+=" '"+a+"'"),r.size()>1&&(t+=" ("+r.size()+")"),(console.group!==i||console.table!==i)&&c.length>0&&(console.groupCollapsed(t),console.table?console.table(c):e.each(c,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),c=[]}},invoke:function(t,n,r){var a,s,c,l=A;return n=n||d,r=z||r,"string"==typeof t&&l!==i&&(t=t.split(/[\. ]/),a=t.length-1,e.each(t,function(n,o){var r=n!=a?o+t[n+1].charAt(0).toUpperCase()+t[n+1].slice(1):t;if(e.isPlainObject(l[r])&&n!=a)l=l[r];else{if(l[r]!==i)return s=l[r],!1;if(!e.isPlainObject(l[o])||n==a)return l[o]!==i?(s=l[o],!1):!1;l=l[o]}})),e.isFunction(s)?c=s.apply(r,n):s!==i&&(c=s),e.isArray(o)?o.push(c):o!==i?o=[o,c]:c!==i&&(o=c),s}},u?(A===i&&m.initialize(),m.invoke(l)):(A!==i&&m.destroy(),m.initialize())}),o!==i?o:this},e.fn.video.settings={name:"Video",namespace:"video",debug:!1,verbose:!0,performance:!0,metadata:{id:"id",image:"image",source:"source",url:"url"},source:!1,url:!1,id:!1,aspectRatio:16/9,onPlay:function(){},onReset:function(){},onChange:function(){},onPause:function(){},onStop:function(){},width:"auto",height:"auto",autoplay:"auto",color:"#442359",hd:!0,showUI:!1,api:!0,regExp:{youtube:/^(?:https?:\/\/)?(?:www\.)?(?:youtu\.be\/|youtube\.com\/(?:embed\/|v\/|watch\?v=|watch\?.+&v=))((\w|-){11})(?:\S+)?$/,vimeo:/http:\/\/(www\.)?vimeo.com\/(\d+)($|\/)/},error:{noVideo:"No video specified",method:"The method you called is not defined"},className:{active:"active"},selector:{embed:".embed",placeholder:".placeholder",playButton:".play"}},e.fn.video.settings.templates={video:function(e){var t="";return e&&(t+='<i class="video play icon"></i><img class="placeholder" src="'+e+'">'),t+='<div class="embed"></div>'}}}(jQuery,window,document),function(e,t,n,i){e.api=e.fn.api=function(n){var o,r=e(e.isFunction(this)?t:this),a=r.selector||"",s=(new Date).getTime(),c=[],l=arguments[0],u="string"==typeof l,d=[].slice.call(arguments,1);return r.each(function(){var t,r,m,f,p,g=e.isPlainObject(n)?e.extend(!0,{},e.fn.api.settings,n):e.extend({},e.fn.api.settings),b=g.namespace,v=(g.metadata,g.selector),h=g.error,y=g.className,x="."+b,w="module-"+b,C=e(this),T=C.closest(v.form),k=g.stateContext?e(g.stateContext):C,S=this,z=k.get(),A=C.data(w);p={initialize:function(){var e=p.get.event();u||(e?(p.debug("Attaching API events to element",e),C.on(e+x,p.event.trigger)):p.query()),p.instantiate()},instantiate:function(){p.verbose("Storing instance of module",p),A=p,C.data(w,A)},destroy:function(){p.verbose("Destroying previous module for",S),C.removeData(w).off(x)},query:function(){if(p.is.disabled())return void p.debug("Element is disabled API request aborted");if(p.is.loading()&&0===g.throttle)return void p.debug("Cancelling request, previous request is still pending");if(g.defaultData&&e.extend(!0,g.urlData,p.get.defaultData()),(g.serializeForm!==!1||k.is("form"))&&("json"==g.serializeForm?e.extend(!0,g.data,p.get.formData()):g.data=p.get.formData()),r=p.get.settings(),r===!1)return void p.error(h.beforeSend);if(g.url?(p.debug("Using specified url",m),m=p.add.urlData(g.url)):(m=p.add.urlData(p.get.templateURL()),p.debug("Added URL Data to url",m)),!m){if(!C.is("form"))return void p.error(h.missingURL,g.action);p.debug("No url or action specified, defaulting to form action"),m=C.attr("action")}p.set.loading(),t=e.extend(!0,{},g,{type:g.method||g.type,data:f,url:g.base+m,beforeSend:g.beforeXHR,success:function(){},failure:function(){},complete:function(){}}),p.verbose("Creating AJAX request with settings",t),p.is.loading()?p.timer=setTimeout(function(){p.request=p.create.request(),p.xhr=p.create.xhr()},g.throttle):(p.request=p.create.request(),p.xhr=p.create.xhr())},is:{disabled:function(){return C.filter(g.filter).size()>0},loading:function(){return p.request&&"pending"==p.request.state()}},was:{succesful:function(){return p.request&&"resolved"==p.request.state()},failure:function(){return p.request&&"rejected"==p.request.state()},complete:function(){return p.request&&("resolved"==p.request.state()||"rejected"==p.request.state())}},add:{urlData:function(t,n){var o,r;return t&&(o=t.match(g.regExp.required),r=t.match(g.regExp.optional),n=n||g.urlData,o&&(p.debug("Looking for required URL variables",o),e.each(o,function(o,r){var a=-1!==r.indexOf("$")?r.substr(2,r.length-3):r.substr(1,r.length-2),s=e.isPlainObject(n)&&n[a]!==i?n[a]:C.data(a)!==i?C.data(a):k.data(a)!==i?k.data(a):n[a];return s===i?(p.error(h.requiredParameter,a,t),t=!1,!1):(p.verbose("Found required variable",a,s),void(t=t.replace(r,s)))})),r&&(p.debug("Looking for optional URL variables",o),e.each(r,function(o,r){var a=-1!==r.indexOf("$")?r.substr(3,r.length-4):r.substr(2,r.length-3),s=e.isPlainObject(n)&&n[a]!==i?n[a]:C.data(a)!==i?C.data(a):k.data(a)!==i?k.data(a):n[a];s!==i?(p.verbose("Optional variable Found",a,s),t=t.replace(r,s)):(p.verbose("Optional variable not found",a),t=-1!==t.indexOf("/"+r)?t.replace("/"+r,""):t.replace(r,""))}))),t}},event:{trigger:function(e){p.query(),("submit"==e.type||"click"==e.type)&&e.preventDefault()},xhr:{always:function(){},done:function(e){var t=this,n=(new Date).getTime()-s,i=g.loadingDuration-n;i=i>0?i:0,setTimeout(function(){p.request.resolveWith(t,[e])},i)},fail:function(e,t,n){var i=this,o=(new Date).getTime()-s,r=g.loadingDuration-o;r=r>0?r:0,setTimeout(function(){"abort"!==t?p.request.rejectWith(i,[e,t,n]):p.reset()},r)}},request:{complete:function(t){p.remove.loading(),e.proxy(g.onComplete,z)(t,C)},done:function(t){p.debug("API Response Received",t),"json"==g.dataType&&e.isFunction(g.successTest)?(p.debug("Checking JSON returned success",g.successTest,t),g.successTest(t)?e.proxy(g.onSuccess,z)(t,C):(p.debug("JSON test specified by user and response failed",t),e.proxy(g.onFailure,z)(t,C))):e.proxy(g.onSuccess,z)(t,C)},error:function(t,n,o){var r,a=g.error[n]!==i?g.error[n]:o;if(t!==i)if(t.readyState!==i&&4==t.readyState){if(200!=t.status&&o!==i&&""!==o)p.error(h.statusMessage+o);else if("error"==n&&"json"==g.dataType)try{r=e.parseJSON(t.responseText),r&&r.error!==i&&(a=r.error)}catch(s){p.error(h.JSONParse)}p.remove.loading(),p.set.error(),g.errorDuration&&setTimeout(p.remove.error,g.errorDuration),p.debug("API Request error:",a),e.proxy(g.onError,z)(a,z)}else e.proxy(g.onAbort,z)(a,z),p.debug("Request Aborted (Most likely caused by page change or CORS Policy)",n,o)}}},create:{request:function(){return e.Deferred().always(p.event.request.complete).done(p.event.request.done).fail(p.event.request.error)},xhr:function(){e.ajax(t).always(p.event.xhr.always).done(p.event.xhr.done).fail(p.event.xhr.fail)}},set:{error:function(){p.verbose("Adding error state to element",k),k.addClass(y.error)},loading:function(){p.verbose("Adding loading state to element",k),k.addClass(y.loading)}},remove:{error:function(){p.verbose("Removing error state from element",k),k.removeClass(y.error)},loading:function(){p.verbose("Removing loading state from element",k),k.removeClass(y.loading)}},get:{request:function(){return p.request||!1},xhr:function(){return p.xhr||!1},settings:function(){var t;return t=e.proxy(g.beforeSend,C)(g),t&&(t.success!==i&&(p.debug("Legacy success callback detected",t),p.error(h.legacyParameters,t.success),t.onSuccess=t.success),t.failure!==i&&(p.debug("Legacy failure callback detected",t),p.error(h.legacyParameters,t.failure),t.onFailure=t.failure),t.complete!==i&&(p.debug("Legacy complete callback detected",t),p.error(h.legacyParameters,t.complete),t.onComplete=t.complete)),t===i&&p.error(h.noReturnedValue),t!==i?t:g},defaultData:function(){var t={};return e.isWindow(S)||(C.is("input")?t.value=C.val():C.is("form")||(t.text=C.text())),t},event:function(){return e.isWindow(S)||"now"==g.on?(p.debug("API called without element, no events attached"),!1):"auto"==g.on?C.is("input")?S.oninput!==i?"input":S.onpropertychange!==i?"propertychange":"keyup":C.is("form")?"submit":"click":g.on},formData:function(){var t;return e(this).serializeObject()!==i?t=T.serializeObject():(p.error(h.missingSerialize),t=T.serialize()),p.debug("Retrieved form data",t),t},templateURL:function(e){var t;return e=e||C.data(g.metadata.action)||g.action||!1,e&&(p.debug("Looking up url for action",e,g.api),g.api[e]!==i?(t=g.api[e],p.debug("Found template url",t)):p.error(h.missingAction,g.action,g.api)),t}},reset:function(){p.remove.error(),p.remove.loading()},setting:function(t,n){if(p.debug("Changing setting",t,n),e.isPlainObject(t))e.extend(!0,g,t);else{if(n===i)return g[t];g[t]=n}},internal:function(t,n){if(e.isPlainObject(t))e.extend(!0,p,t);else{if(n===i)return p[t];p[t]=n}},debug:function(){g.debug&&(g.performance?p.performance.log(arguments):(p.debug=Function.prototype.bind.call(console.info,console,g.name+":"),p.debug.apply(console,arguments)))},verbose:function(){g.verbose&&g.debug&&(g.performance?p.performance.log(arguments):(p.verbose=Function.prototype.bind.call(console.info,console,g.name+":"),p.verbose.apply(console,arguments)))},error:function(){p.error=Function.prototype.bind.call(console.error,console,g.name+":"),p.error.apply(console,arguments)},performance:{log:function(e){var t,n,i;g.performance&&(t=(new Date).getTime(),i=s||t,n=t-i,s=t,c.push({Name:e[0],Arguments:[].slice.call(e,1)||"","Execution Time":n})),clearTimeout(p.performance.timer),p.performance.timer=setTimeout(p.performance.display,100)},display:function(){var t=g.name+":",n=0;s=!1,clearTimeout(p.performance.timer),e.each(c,function(e,t){n+=t["Execution Time"]}),t+=" "+n+"ms",a&&(t+=" '"+a+"'"),(console.group!==i||console.table!==i)&&c.length>0&&(console.groupCollapsed(t),console.table?console.table(c):e.each(c,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),c=[]}},invoke:function(t,n,r){var a,s,c,l=A;return n=n||d,r=S||r,"string"==typeof t&&l!==i&&(t=t.split(/[\. ]/),a=t.length-1,e.each(t,function(n,o){var r=n!=a?o+t[n+1].charAt(0).toUpperCase()+t[n+1].slice(1):t;if(e.isPlainObject(l[r])&&n!=a)l=l[r];else{if(l[r]!==i)return s=l[r],!1;if(!e.isPlainObject(l[o])||n==a)return l[o]!==i?(s=l[o],!1):(p.error(h.method,t),!1);l=l[o]}})),e.isFunction(s)?c=s.apply(r,n):s!==i&&(c=s),e.isArray(o)?o.push(c):o!==i?o=[o,c]:c!==i&&(o=c),s}},u?(A===i&&p.initialize(),p.invoke(l)):(A!==i&&p.destroy(),p.initialize())}),o!==i?o:this},e.api.settings={name:"API",namespace:"api",debug:!1,verbose:!0,performance:!0,on:"auto",filter:".disabled",stateContext:!1,loadingDuration:0,errorDuration:2e3,action:!1,url:!1,base:"",urlData:{},defaultData:!0,serializeForm:!1,throttle:0,method:"get",data:{},dataType:"json",beforeSend:function(e){return e},beforeXHR:function(){},onSuccess:function(){},onComplete:function(){},onFailure:function(){},onError:function(){},onAbort:function(){},successTest:!1,error:{beforeSend:"The before send function has aborted the request",error:"There was an error with your request",exitConditions:"API Request Aborted. Exit conditions met",JSONParse:"JSON could not be parsed during error handling",legacyParameters:"You are using legacy API success callback names",missingAction:"API action used but no url was defined",missingSerialize:"Required dependency jquery-serialize-object missing, using basic serialize",missingURL:"No URL specified for api event",noReturnedValue:"The beforeSend callback must return a settings object, beforeSend ignored.",parseError:"There was an error parsing your request",requiredParameter:"Missing a required URL parameter: ",statusMessage:"Server gave an error: ",timeout:"Your request timed out"},regExp:{required:/\{\$*[A-z0-9]+\}/g,optional:/\{\/\$*[A-z0-9]+\}/g},className:{loading:"loading",error:"error"},selector:{form:"form"},metadata:{action:"action",request:"request",xhr:"xhr"}},e.api.settings.api={}}(jQuery,window,document),function(e,t,n,i){e.fn.form=function(t,o){var r,a=e(this),s=e.extend(!0,{},e.fn.form.settings,o),c=e.extend({},e.fn.form.settings.defaults,t),l=s.namespace,u=s.metadata,d=s.selector,m=s.className,f=(s.error,"."+l),p="module-"+l,g=a.selector||"",b=(new Date).getTime(),v=[],h=arguments[0],y="string"==typeof h,x=[].slice.call(arguments,1);return a.each(function(){var t,o=e(this),l=e(this).find(d.field),w=e(this).find(d.group),C=e(this).find(d.message),T=(e(this).find(d.prompt),e(this).find(d.submit)),k=[],S=this,z=o.data(p);t={initialize:function(){t.verbose("Initializing form validation",o,c,s),t.bindEvents(),t.instantiate()},instantiate:function(){t.verbose("Storing instance of module",t),z=t,o.data(p,t)},destroy:function(){t.verbose("Destroying previous module",z),t.removeEvents(),o.removeData(p)},refresh:function(){t.verbose("Refreshing selector cache"),l=o.find(d.field)},submit:function(){t.verbose("Submitting form",o),o.submit()},attachEvents:function(n,i){i=i||"submit",e(n).on("click",function(e){t[i](),e.preventDefault()})},bindEvents:function(){s.keyboardShortcuts&&l.on("keydown"+f,t.event.field.keydown),o.on("submit"+f,t.validate.form),l.on("blur"+f,t.event.field.blur),t.attachEvents(T,"submit"),l.each(function(){var n=e(this).prop("type"),i=t.get.changeEvent(n);e(this).on(i+f,t.event.field.change)})},removeEvents:function(){o.off(f),l.off(f),T.off(f),l.off(f)},event:{field:{keydown:function(n){var i=e(this),o=n.which,r={enter:13,escape:27};o==r.escape&&(t.verbose("Escape key pressed blurring field"),i.blur()),!n.ctrlKey&&o==r.enter&&i.is(d.input)&&i.not(d.checkbox).size()>0&&(t.debug("Enter key pressed, submitting form"),T.addClass(m.down),i.one("keyup"+f,t.event.field.keyup))},keyup:function(){t.verbose("Doing keyboard shortcut form submit"),T.removeClass(m.down),t.submit()},blur:function(){var n=e(this),i=n.closest(w);i.hasClass(m.error)?(t.debug("Revalidating field",n,t.get.validation(n)),t.validate.field(t.get.validation(n))):("blur"==s.on||"change"==s.on)&&t.validate.field(t.get.validation(n))},change:function(){var n=e(this),i=n.closest(w);("change"==s.on||i.hasClass(m.error)&&s.revalidate)&&(clearTimeout(t.timer),t.timer=setTimeout(function(){t.debug("Revalidating field",n,t.get.validation(n)),t.validate.field(t.get.validation(n))},s.delay))}}},get:{changeEvent:function(e){return"checkbox"==e||"radio"==e||"hidden"==e?"change":n.createElement("input").oninput!==i?"input":n.createElement("input").onpropertychange!==i?"propertychange":"keyup"},field:function(n){return t.verbose("Finding field with identifier",n),l.filter("#"+n).size()>0?l.filter("#"+n):l.filter('[name="'+n+'"]').size()>0?l.filter('[name="'+n+'"]'):l.filter("[data-"+u.validate+'="'+n+'"]').size()>0?l.filter("[data-"+u.validate+'="'+n+'"]'):e("<input/>")},validation:function(n){var i;return e.each(c,function(e,o){t.get.field(o.identifier).get(0)==n.get(0)&&(i=o)}),i||!1}},has:{field:function(e){return t.verbose("Checking for existence of a field with identifier",e),l.filter("#"+e).size()>0?!0:l.filter('[name="'+e+'"]').size()>0?!0:l.filter("[data-"+u.validate+'="'+e+'"]').size()>0?!0:!1}},add:{prompt:function(n,r){var a=t.get.field(n),c=a.closest(w),l=c.find(d.prompt),u=0!==l.size();r="string"==typeof r?[r]:r,t.verbose("Adding field error state",n),c.addClass(m.error),s.inline&&(u||(l=s.templates.prompt(r),l.appendTo(c)),l.html(r[0]),u?t.verbose("Inline errors are disabled, no inline error added",n):s.transition&&e.fn.transition!==i&&o.transition("is supported")?(t.verbose("Displaying error with css transition",s.transition),l.transition(s.transition+" in",s.duration)):(t.verbose("Displaying error with fallback javascript animation"),l.fadeIn(s.duration)))},errors:function(e){t.debug("Adding form error messages",e),C.html(s.templates.error(e))}},remove:{prompt:function(n){var r=t.get.field(n.identifier),a=r.closest(w),c=a.find(d.prompt);a.removeClass(m.error),s.inline&&c.is(":visible")&&(t.verbose("Removing prompt for field",n),s.transition&&e.fn.transition!==i&&o.transition("is supported")?c.transition(s.transition+" out",s.duration,function(){c.remove()}):c.fadeOut(s.duration,function(){c.remove()}))}},set:{success:function(){o.removeClass(m.error).addClass(m.success)},error:function(){o.removeClass(m.success).addClass(m.error)}},validate:{form:function(n){var r=!0;return k=[],e.each(c,function(e,n){t.validate.field(n)||(r=!1)}),r?(t.debug("Form has no validation errors, submitting"),t.set.success(),e.proxy(s.onSuccess,this)(n)):(t.debug("Form has errors"),t.set.error(),s.inline||t.add.errors(k),o.data("moduleApi")!==i&&n.stopImmediatePropagation(),e.proxy(s.onFailure,this)(k))},field:function(n){var o=t.get.field(n.identifier),r=!0,a=[];return n.optional&&""===e.trim(o.val())?(t.debug("Field is optional and empty. Skipping",n.identifier),r=!0):n.rules!==i&&e.each(n.rules,function(e,i){t.has.field(n.identifier)&&!t.validate.rule(n,i)&&(t.debug("Field is invalid",n.identifier,i.type),a.push(i.prompt),r=!1)}),r?(t.remove.prompt(n,a),e.proxy(s.onValid,o)(),!0):(k=k.concat(a),t.add.prompt(n.identifier,a),e.proxy(s.onInvalid,o)(a),!1)},rule:function(n,r){var a,c,l=t.get.field(n.identifier),u=r.type,d=e.trim(l.val()+""),m=/\[(.*)\]/i,f=m.exec(u),p=!0;return f!==i&&null!==f?(a=""+f[1],c=u.replace(f[0],""),p=e.proxy(s.rules[c],o)(d,a)):p=e.proxy(s.rules[u],l)(d),p}},setting:function(t,n){if(e.isPlainObject(t))e.extend(!0,s,t);else{if(n===i)return s[t];s[t]=n}},internal:function(n,o){if(e.isPlainObject(n))e.extend(!0,t,n);else{if(o===i)return t[n];t[n]=o}},debug:function(){s.debug&&(s.performance?t.performance.log(arguments):(t.debug=Function.prototype.bind.call(console.info,console,s.name+":"),t.debug.apply(console,arguments)))},verbose:function(){s.verbose&&s.debug&&(s.performance?t.performance.log(arguments):(t.verbose=Function.prototype.bind.call(console.info,console,s.name+":"),t.verbose.apply(console,arguments)))},error:function(){t.error=Function.prototype.bind.call(console.error,console,s.name+":"),t.error.apply(console,arguments)},performance:{log:function(e){var n,i,o;s.performance&&(n=(new Date).getTime(),o=b||n,i=n-o,b=n,v.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:S,"Execution Time":i})),clearTimeout(t.performance.timer),t.performance.timer=setTimeout(t.performance.display,100)},display:function(){var n=s.name+":",o=0;b=!1,clearTimeout(t.performance.timer),e.each(v,function(e,t){o+=t["Execution Time"]}),n+=" "+o+"ms",g&&(n+=" '"+g+"'"),a.size()>1&&(n+=" ("+a.size()+")"),(console.group!==i||console.table!==i)&&v.length>0&&(console.groupCollapsed(n),console.table?console.table(v):e.each(v,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),v=[]}},invoke:function(t,n,o){var a,s,c,l=z;return n=n||x,o=S||o,"string"==typeof t&&l!==i&&(t=t.split(/[\. ]/),a=t.length-1,e.each(t,function(n,o){var r=n!=a?o+t[n+1].charAt(0).toUpperCase()+t[n+1].slice(1):t;if(e.isPlainObject(l[r])&&n!=a)l=l[r];else{if(l[r]!==i)return s=l[r],!1;if(!e.isPlainObject(l[o])||n==a)return l[o]!==i?(s=l[o],!1):!1;l=l[o]}})),e.isFunction(s)?c=s.apply(o,n):s!==i&&(c=s),e.isArray(r)?r.push(c):r!==i?r=[r,c]:c!==i&&(r=c),s}},y?(z===i&&t.initialize(),t.invoke(h)):(z!==i&&t.destroy(),t.initialize())}),r!==i?r:this},e.fn.form.settings={name:"Form",namespace:"form",debug:!1,verbose:!0,performance:!0,keyboardShortcuts:!0,on:"submit",inline:!1,delay:200,revalidate:!0,transition:"scale",duration:200,onValid:function(){},onInvalid:function(){},onSuccess:function(){return!0},onFailure:function(){return!1},metadata:{validate:"validate"},selector:{message:".error.message",field:"input, textarea, select",group:".field",checkbox:'input[type="checkbox"], input[type="radio"]',input:"input",prompt:".prompt",submit:".submit"},className:{error:"error",success:"success",down:"down",label:"ui prompt label"},error:{method:"The method you called is not defined."},templates:{error:function(t){var n='<ul class="list">';return e.each(t,function(e,t){n+="<li>"+t+"</li>"}),n+="</ul>",e(n)},prompt:function(t){return e("<div/>").addClass("ui red pointing prompt label").html(t[0])}},rules:{checked:function(){return e(this).filter(":checked").size()>0},contains:function(e,t){return t=t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),-1!==e.search(t)},email:function(e){var t=new RegExp("[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?","i");return t.test(e)},empty:function(e){return!(e===i||""===e)},integer:function(e,t){var n,o,r,a=/^\-?\d+$/;return t===i||""===t||".."===t||(-1==t.indexOf("..")?a.test(t)&&(n=o=t-0):(r=t.split("..",2),a.test(r[0])&&(n=r[0]-0),a.test(r[1])&&(o=r[1]-0))),a.test(e)&&(n===i||e>=n)&&(o===i||o>=e)},is:function(e,t){return e==t},length:function(e,t){return e!==i?e.length>=t:!1},match:function(t,n){var o,r=e(this);return r.find("#"+n).size()>0?o=r.find("#"+n).val():r.find('[name="'+n+'"]').size()>0?o=r.find('[name="'+n+'"]').val():r.find('[data-validate="'+n+'"]').size()>0&&(o=r.find('[data-validate="'+n+'"]').val()),o!==i?t.toString()==o.toString():!1},maxLength:function(e,t){return e!==i?e.length<=t:!1},not:function(e,t){return e!=t},url:function(e){var t=/(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/;return t.test(e)}}}}(jQuery,window,document);