/** # Semantic UI * Version: 0.16.1 * http://github.com/jlukic/semantic-ui * * * Copyright 2014 Contributors * Released under the MIT license * http://opensource.org/licenses/MIT * * Release Date: 10/07/2014 */ !function(a,b,c,d){a.api=a.fn.api=function(c){var e,f=a(a.isFunction(this)?b:this),g=f.selector||"",h=(new Date).getTime(),i=[],j=arguments[0],k="string"==typeof j,l=[].slice.call(arguments,1);return f.each(function(){var b,f,m,n,o,p=a.extend(!0,{},a.fn.api.settings,c),q=p.namespace,r=(p.metadata,p.selector),s=p.error,t=p.className,u="."+q,v="module-"+q,w=a(this),x=w.closest(r.form),y=p.stateContext?a(p.stateContext):w,z=this,A=w.data(v);o={initialize:function(){var a=o.get.event();k||(a?(o.debug("Attaching API events to element",a),w.on(a+u,o.event.trigger)):o.query()),o.instantiate()},instantiate:function(){o.verbose("Storing instance of module",o),A=o,w.data(v,A)},destroy:function(){o.verbose("Destroying previous module for",z),w.removeData(v).off(u)},query:function(){if(o.is.disabled())return void o.debug("Element is disabled API request aborted");if(o.is.loading()&&!p.allowMultiple)return void o.debug("Request cancelled previous request is still pending");if(p.defaultData&&a.extend(!0,p.urlData,o.get.defaultData()),(p.serializeForm!==!1||w.is("form"))&&("json"==p.serializeForm?a.extend(!0,p.data,o.get.formData()):p.data=o.get.formData()),f=o.get.settings(),f===!1)return void o.error(s.beforeSend);if(p.url?(o.debug("Using specified url",m),m=o.add.urlData(p.url)):(m=o.add.urlData(o.get.templateURL()),o.debug("API url resolved to",m)),!m){if(!w.is("form"))return void o.error(s.missingURL);o.debug("No url or action specified, defaulting to form action"),m=w.attr("action")}o.set.loading(),b=a.extend(!0,{},p,{type:p.method||p.type,data:n,url:m,beforeSend:p.beforeXHR,success:function(){},failure:function(){},complete:function(){}}),o.verbose("Creating AJAX request with settings",b),o.request=o.create.request(),o.xhr=o.create.xhr()},is:{disabled:function(){return w.filter(p.filter).size()>0},loading:function(){return o.request&&"pending"==o.request.state()}},was:{succesful:function(){return o.request&&"resolved"==o.request.state()},failure:function(){return o.request&&"rejected"==o.request.state()},complete:function(){return o.request&&("resolved"==o.request.state()||"rejected"==o.request.state())}},add:{urlData:function(b,c){var e,f;return b&&(e=b.match(p.regExp.required),f=b.match(p.regExp.optional),c=c||p.urlData,e&&(o.debug("Looking for required URL variables",e),a.each(e,function(e,f){var g=-1!==f.indexOf("$")?f.substr(2,f.length-3):f.substr(1,f.length-2),h=a.isPlainObject(c)&&c[g]!==d?c[g]:w.data(g)!==d?w.data(g):y.data(g)!==d?y.data(g):c[g];return h===d?(o.error(s.requiredParameter,g,b),b=!1,!1):(o.verbose("Found required variable",g,h),void(b=b.replace(f,h)))})),f&&(o.debug("Looking for optional URL variables",e),a.each(f,function(e,f){var g=-1!==f.indexOf("$")?f.substr(3,f.length-4):f.substr(2,f.length-3),h=a.isPlainObject(c)&&c[g]!==d?c[g]:w.data(g)!==d?w.data(g):y.data(g)!==d?y.data(g):c[g];h!==d?(o.verbose("Optional variable Found",g,h),b=b.replace(f,h)):(o.verbose("Optional variable not found",g),b=-1!==b.indexOf("/"+f)?b.replace("/"+f,""):b.replace(f,""))}))),b}},event:{trigger:function(a){o.query(),("submit"==a.type||"click"==a.type)&&a.preventDefault()},xhr:{always:function(){},done:function(a){var b=this,c=(new Date).getTime()-h,d=p.loadingDuration-c;d=d>0?d:0,setTimeout(function(){o.request.resolveWith(b,[a])},d)},fail:function(a,b,c){var d=this,e=(new Date).getTime()-h,f=p.loadingDuration-e;f=f>0?f:0,setTimeout(function(){"abort"!==b?o.request.rejectWith(d,[a,b,c]):o.reset()},f)}},request:{complete:function(b){o.remove.loading(),a.proxy(p.onComplete,y)(b,w)},done:function(b){o.debug("API request received",b),"json"==p.dataType&&a.isFunction(p.successTest)?(o.debug("Checking JSON",p.successTest,b),p.onSuccess(b)?a.proxy(p.onSuccess,y)(b,w):(o.debug("JSON test specified by user and response failed",b),a.proxy(p.onFailure,y)(b,w))):a.proxy(p.onSuccess,y)(b,w)},error:function(b,c,e){var f,g=p.error[c]!==d?p.error[c]:e;if(b!==d)if(b.readyState!==d&&4==b.readyState){if(200!=b.status&&e!==d&&""!==e)o.error(s.statusMessage+e);else if("error"==c&&"json"==p.dataType)try{f=a.parseJSON(b.responseText),f&&f.error!==d&&(g=f.error)}catch(h){o.error(s.JSONParse)}o.remove.loading(),o.set.error(),p.errorDuration&&setTimeout(o.remove.error,p.errorDuration),o.debug("API Request error:",g),a.proxy(p.onFailure,y)(g,w)}else a.proxy(p.onAbort,y)(g,w),o.debug("Request Aborted (Most likely caused by page change or CORS Policy)",c,e)}}},create:{request:function(){return a.Deferred().always(o.event.request.complete).done(o.event.request.done).fail(o.event.request.error)},xhr:function(){a.ajax(b).always(o.event.xhr.always).done(o.event.xhr.done).fail(o.event.xhr.fail)}},set:{error:function(){o.verbose("Adding error state to element",y),y.addClass(t.error)},loading:function(){o.verbose("Adding loading state to element",y),y.addClass(t.loading)}},remove:{error:function(){o.verbose("Removing error state from element",y),y.removeClass(t.error)},loading:function(){o.verbose("Removing loading state from element",y),y.removeClass(t.loading)}},get:{request:function(){return o.request||!1},xhr:function(){return o.xhr||!1},settings:function(){var b;return b=a.proxy(p.beforeSend,w)(p),b.success!==d&&(o.debug("Legacy success callback detected",b),o.error(s.legacyParameters),b.onSuccess=b.success),b.failure!==d&&(o.debug("Legacy failure callback detected",b),o.error(s.legacyParameters),b.onFailure=b.failure),b.complete!==d&&(o.debug("Legacy complete callback detected",b),o.error(s.legacyParameters),b.onComplete=b.complete),b},defaultData:function(){var b={};return a.isWindow(z)||(w.is("input")?b.value=w.val():w.is("form")||(b.text=w.text())),b},event:function(){return a.isWindow(z)||"now"==p.on?(o.debug("API called without element, no events attached"),!1):"auto"==p.on?w.is("input")?z.oninput!==d?"input":z.onpropertychange!==d?"propertychange":"keyup":w.is("form")?"submit":"click":p.on},formData:function(){var b;if("json"==p.serializeForm){if(a(this).toJSON===d)return void o.error(s.missingSerialize);b=x.toJSON()}else b=x.serialize();return o.debug("Retrieving form data",b),b},templateURL:function(a){var b;return a=a||w.data(p.metadata.action)||p.action||!1,a&&(o.debug("Looking up url for action",a),p.api[a]!==d?(b=p.api[a],o.debug("Found template url",b)):o.error(s.missingAction,p.action)),b}},reset:function(){o.remove.error(),o.remove.loading()},setting:function(b,c){if(a.isPlainObject(b))a.extend(!0,p,b);else{if(c===d)return p[b];p[b]=c}},internal:function(b,c){if(a.isPlainObject(b))a.extend(!0,o,b);else{if(c===d)return o[b];o[b]=c}},debug:function(){p.debug&&(p.performance?o.performance.log(arguments):(o.debug=Function.prototype.bind.call(console.info,console,p.name+":"),o.debug.apply(console,arguments)))},verbose:function(){p.verbose&&p.debug&&(p.performance?o.performance.log(arguments):(o.verbose=Function.prototype.bind.call(console.info,console,p.name+":"),o.verbose.apply(console,arguments)))},error:function(){o.error=Function.prototype.bind.call(console.error,console,p.name+":"),o.error.apply(console,arguments)},performance:{log:function(a){var b,c,d;p.performance&&(b=(new Date).getTime(),d=h||b,c=b-d,h=b,i.push({Name:a[0],Arguments:[].slice.call(a,1)||"",Element:z,"Execution Time":c})),clearTimeout(o.performance.timer),o.performance.timer=setTimeout(o.performance.display,100)},display:function(){var b=p.name+":",c=0;h=(new Date).getTime(),clearTimeout(o.performance.timer),a.each(i,function(a,b){c+=b["Execution Time"]}),b+=" "+c+"ms",g&&(b+=" '"+g+"'"),(console.group!==d||console.table!==d)&&i.length>0&&(console.groupCollapsed(b),console.table?console.table(i):a.each(i,function(a,b){console.log(b.Name+": "+b["Execution Time"]+"ms")}),console.groupEnd()),i=[]}},invoke:function(b,c,f){var g,h,i;return c=c||l,f=z||f,"string"==typeof b&&A!==d&&(b=b.split(/[\. ]/),g=b.length-1,a.each(b,function(c,e){var f=c!=g?e+b[c+1].charAt(0).toUpperCase()+b[c+1].slice(1):b;if(a.isPlainObject(A[e])&&c!=g)A=A[e];else{if(!a.isPlainObject(A[f])||c==g)return A[e]!==d?(h=A[e],!1):A[f]!==d?(h=A[f],!1):(o.error(s.method,b),!1);A=A[f]}})),a.isFunction(h)?i=h.apply(f,c):h!==d&&(i=h),a.isArray(e)?e.push(i):e!==d?e=[e,i]:i!==d&&(e=i),h}},k?(A===d&&o.initialize(),o.invoke(j)):(A!==d&&o.destroy(),o.initialize())}),e!==d?e:this},a.api.settings={name:"API",namespace:"api",debug:!1,verbose:!0,performance:!0,on:"auto",filter:".disabled, .loading",context:!1,stateContext:!1,action:!1,regExp:{required:/\{\$*[A-z0-9]+\}/g,optional:/\{\/\$*[A-z0-9]+\}/g},url:!1,urlData:!1,serializeForm:!1,defaultData:!0,throttle:100,allowMultiple:!1,loadingDuration:0,errorDuration:2e3,method:"get",data:{},dataType:"json",cache:!0,beforeSend:function(a){return a},beforeXHR:function(){},onSuccess:function(){},onComplete:function(){},onFailure:function(){},onAbort:function(){},successText:function(){return!0},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:"Serializing a Form requires toJSON to be included",missingURL:"No URL specified for api event",parseError:"There was an error parsing your request",requiredParameter:"Missing a required URL parameter: ",statusMessage:"Server gave an error: ",timeout:"Your request timed out"},className:{loading:"loading",error:"error"},selector:{form:"form"},metadata:{action:"action",request:"request",xhr:"xhr"}},a.api.settings.api={}}(jQuery,window,document),function(a,b,c,d){a.fn.colorize=function(b){var c=a.extend(!0,{},a.fn.colorize.settings,b),e=arguments||!1;return a(this).each(function(b){var f,g,h,i,j,k,l,m,n=a(this),o=a("")[0],p=a("")[0],q=a("")[0],r=new Image,s=c.colors,t=(c.paths,c.namespace),u=c.error,v=n.data("module-"+t);return m={checkPreconditions:function(){return m.debug("Checking pre-conditions"),!a.isPlainObject(s)||a.isEmptyObject(s)?(m.error(u.undefinedColors),!1):!0},async:function(a){c.async?setTimeout(a,0):a()},getMetadata:function(){m.debug("Grabbing metadata"),i=n.data("image")||c.image||d,j=n.data("name")||c.name||b,k=c.width||n.width(),l=c.height||n.height(),(0===k||0===l)&&m.error(u.undefinedSize)},initialize:function(){m.debug("Initializing with colors",s),m.checkPreconditions()&&m.async(function(){m.getMetadata(),m.canvas.create(),m.draw.image(function(){m.draw.colors(),m.canvas.merge()}),n.data("module-"+t,m)})},redraw:function(){m.debug("Redrawing image"),m.async(function(){m.canvas.clear(),m.draw.colors(),m.canvas.merge()})},change:{color:function(a,b){return m.debug("Changing color",a),s[a]===d?(m.error(u.missingColor),!1):(s[a]=b,void m.redraw())}},canvas:{create:function(){m.debug("Creating canvases"),o.width=k,o.height=l,p.width=k,p.height=l,q.width=k,q.height=l,f=o.getContext("2d"),g=p.getContext("2d"),h=q.getContext("2d"),n.append(o),f=n.children("canvas")[0].getContext("2d")},clear:function(){m.debug("Clearing canvas"),h.fillStyle="#FFFFFF",h.fillRect(0,0,k,l)},merge:function(){return a.isFunction(f.blendOnto)?(f.putImageData(g.getImageData(0,0,k,l),0,0),void h.blendOnto(f,"multiply")):void m.error(u.missingPlugin)}},draw:{image:function(a){m.debug("Drawing image"),a=a||function(){},i?(r.src=i,r.onload=function(){g.drawImage(r,0,0),a()}):(m.error(u.noImage),a())},colors:function(){m.debug("Drawing color overlays",s),a.each(s,function(a,b){c.onDraw(h,j,a,b)})}},debug:function(a,b){c.debug&&(b!==d?console.info(c.name+": "+a,b):console.info(c.name+": "+a))},error:function(a){console.warn(c.name+": "+a)},invoke:function(b,e,f){var g;return f=f||Array.prototype.slice.call(arguments,2),"string"==typeof b&&v!==d&&(b=b.split("."),a.each(b,function(b,d){return a.isPlainObject(v[d])?(v=v[d],!0):a.isFunction(v[d])?(g=v[d],!0):(m.error(c.error.method),!1)})),a.isFunction(g)?g.apply(e,f):!1}},v!==d&&e?("invoke"==e[0]&&(e=Array.prototype.slice.call(e,1)),m.invoke(e[0],this,Array.prototype.slice.call(e,1))):void m.initialize()}),this},a.fn.colorize.settings={name:"Image Colorizer",debug:!0,namespace:"colorize",onDraw:function(){},async:!0,colors:{},metadata:{image:"image",name:"name"},error:{noImage:"No tracing image specified",undefinedColors:"No default colors specified.",missingColor:"Attempted to change color that does not exist",missingPlugin:"Blend onto plug-in must be included",undefinedHeight:"The width or height of image canvas could not be automatically determined. Please specify a height."}}}(jQuery,window,document),function(a,b,c,d){a.fn.form=function(b,e){var f,g=a(this),h=a.extend(!0,{},a.fn.form.settings,e),i=a.extend({},a.fn.form.settings.defaults,b),j=h.namespace,k=h.metadata,l=h.selector,m=h.className,n=(h.error,"."+j),o="module-"+j,p=g.selector||"",q=(new Date).getTime(),r=[],s=arguments[0],t="string"==typeof s,u=[].slice.call(arguments,1);return g.each(function(){var b,e=a(this),j=a(this).find(l.field),v=a(this).find(l.group),w=a(this).find(l.message),x=(a(this).find(l.prompt),a(this).find(l.submit)),y=[],z=this,A=e.data(o);b={initialize:function(){b.verbose("Initializing form validation",e,i,h),b.bindEvents(),b.instantiate()},instantiate:function(){b.verbose("Storing instance of module",b),A=b,e.data(o,b)},destroy:function(){b.verbose("Destroying previous module",A),b.removeEvents(),e.removeData(o)},refresh:function(){b.verbose("Refreshing selector cache"),j=e.find(l.field)},submit:function(){b.verbose("Submitting form",e),e.submit()},attachEvents:function(c,d){d=d||"submit",a(c).on("click",function(a){b[d](),a.preventDefault()})},bindEvents:function(){h.keyboardShortcuts&&j.on("keydown"+n,b.event.field.keydown),e.on("submit"+n,b.validate.form),j.on("blur"+n,b.event.field.blur),b.attachEvents(x,"submit"),j.each(function(){var c=a(this).prop("type"),d=b.get.changeEvent(c);a(this).on(d+n,b.event.field.change)})},removeEvents:function(){e.off(n),j.off(n),x.off(n),j.off(n)},event:{field:{keydown:function(c){var d=a(this),e=c.which,f={enter:13,escape:27};e==f.escape&&(b.verbose("Escape key pressed blurring field"),d.blur()),!c.ctrlKey&&e==f.enter&&d.is(l.input)&&d.not(l.checkbox).size()>0&&(b.debug("Enter key pressed, submitting form"),x.addClass(m.down),d.one("keyup"+n,b.event.field.keyup))},keyup:function(){b.verbose("Doing keyboard shortcut form submit"),x.removeClass(m.down),b.submit()},blur:function(){var c=a(this),d=c.closest(v);d.hasClass(m.error)?(b.debug("Revalidating field",c,b.get.validation(c)),b.validate.field(b.get.validation(c))):("blur"==h.on||"change"==h.on)&&b.validate.field(b.get.validation(c))},change:function(){var c=a(this),d=c.closest(v);("change"==h.on||d.hasClass(m.error)&&h.revalidate)&&(clearTimeout(b.timer),b.timer=setTimeout(function(){b.debug("Revalidating field",c,b.get.validation(c)),b.validate.field(b.get.validation(c))},h.delay))}}},get:{changeEvent:function(a){return"checkbox"==a||"radio"==a?"change":c.createElement("input").oninput!==d?"input":c.createElement("input").onpropertychange!==d?"propertychange":"keyup"},field:function(c){return b.verbose("Finding field with identifier",c),j.filter("#"+c).size()>0?j.filter("#"+c):j.filter('[name="'+c+'"]').size()>0?j.filter('[name="'+c+'"]'):j.filter("[data-"+k.validate+'="'+c+'"]').size()>0?j.filter("[data-"+k.validate+'="'+c+'"]'):a("")},validation:function(c){var d;return a.each(i,function(a,e){b.get.field(e.identifier).get(0)==c.get(0)&&(d=e)}),d||!1}},has:{field:function(a){return b.verbose("Checking for existence of a field with identifier",a),j.filter("#"+a).size()>0?!0:j.filter('[name="'+a+'"]').size()>0?!0:j.filter("[data-"+k.validate+'="'+a+'"]').size()>0?!0:!1}},add:{prompt:function(c,f){var g=b.get.field(c),i=g.closest(v),j=i.find(l.prompt),k=0!==j.size();f="string"==typeof f?[f]:f,b.verbose("Adding field error state",c),i.addClass(m.error),h.inline&&(k||(j=h.templates.prompt(f),j.appendTo(i)),j.html(f[0]),k?b.verbose("Inline errors are disabled, no inline error added",c):h.transition&&a.fn.transition!==d&&e.transition("is supported")?(b.verbose("Displaying error with css transition",h.transition),j.transition(h.transition+" in",h.duration)):(b.verbose("Displaying error with fallback javascript animation"),j.fadeIn(h.duration)))},errors:function(a){b.debug("Adding form error messages",a),w.html(h.templates.error(a))}},remove:{prompt:function(c){var f=b.get.field(c.identifier),g=f.closest(v),i=g.find(l.prompt);g.removeClass(m.error),h.inline&&i.is(":visible")&&(b.verbose("Removing prompt for field",c),h.transition&&a.fn.transition!==d&&e.transition("is supported")?i.transition(h.transition+" out",h.duration,function(){i.remove()}):i.fadeOut(h.duration,function(){i.remove()}))}},set:{success:function(){e.removeClass(m.error).addClass(m.success)},error:function(){e.removeClass(m.success).addClass(m.error)}},validate:{form:function(c){var f=!0;return y=[],a.each(i,function(a,c){b.validate.field(c)||(f=!1)}),f?(b.debug("Form has no validation errors, submitting"),b.set.success(),a.proxy(h.onSuccess,this)(c)):(b.debug("Form has errors"),b.set.error(),h.inline||b.add.errors(y),e.data("moduleApi")!==d&&c.stopImmediatePropagation(),a.proxy(h.onFailure,this)(y))},field:function(c){var e=b.get.field(c.identifier),f=!0,g=[];return c.rules!==d&&a.each(c.rules,function(a,d){b.has.field(c.identifier)&&!b.validate.rule(c,d)&&(b.debug("Field is invalid",c.identifier,d.type),g.push(d.prompt),f=!1)}),f?(b.remove.prompt(c,g),a.proxy(h.onValid,e)(),!0):(y=y.concat(g),b.add.prompt(c.identifier,g),a.proxy(h.onInvalid,e)(g),!1)},rule:function(c,f){var g,i,j=b.get.field(c.identifier),k=f.type,l=a.trim(j.val()+""),m=/\[(.*)\]/i,n=m.exec(k),o=!0;return n!==d&&null!==n?(g=""+n[1],i=k.replace(n[0],""),o=a.proxy(h.rules[i],e)(l,g)):o=a.proxy(h.rules[k],j)(l),o}},setting:function(b,c){if(a.isPlainObject(b))a.extend(!0,h,b);else{if(c===d)return h[b];h[b]=c}},internal:function(c,e){if(a.isPlainObject(c))a.extend(!0,b,c);else{if(e===d)return b[c];b[c]=e}},debug:function(){h.debug&&(h.performance?b.performance.log(arguments):(b.debug=Function.prototype.bind.call(console.info,console,h.name+":"),b.debug.apply(console,arguments)))},verbose:function(){h.verbose&&h.debug&&(h.performance?b.performance.log(arguments):(b.verbose=Function.prototype.bind.call(console.info,console,h.name+":"),b.verbose.apply(console,arguments)))},error:function(){b.error=Function.prototype.bind.call(console.error,console,h.name+":"),b.error.apply(console,arguments)},performance:{log:function(a){var c,d,e;h.performance&&(c=(new Date).getTime(),e=q||c,d=c-e,q=c,r.push({Name:a[0],Arguments:[].slice.call(a,1)||"",Element:z,"Execution Time":d})),clearTimeout(b.performance.timer),b.performance.timer=setTimeout(b.performance.display,100)},display:function(){var c=h.name+":",e=0;q=!1,clearTimeout(b.performance.timer),a.each(r,function(a,b){e+=b["Execution Time"]}),c+=" "+e+"ms",p&&(c+=" '"+p+"'"),g.size()>1&&(c+=" ("+g.size()+")"),(console.group!==d||console.table!==d)&&r.length>0&&(console.groupCollapsed(c),console.table?console.table(r):a.each(r,function(a,b){console.log(b.Name+": "+b["Execution Time"]+"ms")}),console.groupEnd()),r=[]}},invoke:function(b,c,e){var g,h,i,j=A;return c=c||u,e=z||e,"string"==typeof b&&j!==d&&(b=b.split(/[\. ]/),g=b.length-1,a.each(b,function(c,e){var f=c!=g?e+b[c+1].charAt(0).toUpperCase()+b[c+1].slice(1):b;if(a.isPlainObject(j[f])&&c!=g)j=j[f];else{if(j[f]!==d)return h=j[f],!1;if(!a.isPlainObject(j[e])||c==g)return j[e]!==d?(h=j[e],!1):!1;j=j[e]}})),a.isFunction(h)?i=h.apply(e,c):h!==d&&(i=h),a.isArray(f)?f.push(i):f!==d?f=[f,i]:i!==d&&(f=i),h}},t?(A===d&&b.initialize(),b.invoke(s)):(A!==d&&b.destroy(),b.initialize())}),f!==d?f:this},a.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:150,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 label prompt"},error:{method:"The method you called is not defined."},templates:{error:function(b){var c='
    ';return a.each(b,function(a,b){c+="
  • "+b+"
  • "}),c+="
",a(c)},prompt:function(b){return a("
").addClass("ui red pointing prompt label").html(b[0])}},rules:{checked:function(){return a(this).filter(":checked").size()>0},empty:function(a){return!(a===d||""===a)},email:function(a){var b=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 b.test(a)},length:function(a,b){return a!==d?a.length>=b:!1},not:function(a,b){return a!=b},contains:function(a,b){return b=b.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),-1!==a.search(b)},is:function(a,b){return a==b},maxLength:function(a,b){return a!==d?a.length<=b:!1},match:function(b,c){var e,f=a(this);return f.find("#"+c).size()>0?e=f.find("#"+c).val():f.find("[name="+c+"]").size()>0?e=f.find("[name="+c+"]").val():f.find('[data-validate="'+c+'"]').size()>0&&(e=f.find('[data-validate="'+c+'"]').val()),e!==d?b.toString()==e.toString():!1},url:function(a){var b=/(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/;return b.test(a)}}}}(jQuery,window,document),function(a,b,c,d){a.fn.state=function(b){var e,f=a(this),g=a.extend(!0,{},a.fn.state.settings,b),h=f.selector||"",i=("ontouchstart"in c.documentElement,(new Date).getTime()),j=[],k=arguments[0],l="string"==typeof k,m=[].slice.call(arguments,1),n=(g.error,g.metadata),o=g.className,p=g.namespace,q=g.states,r=g.text,s="."+p,t=p+"-module";return f.each(function(){var c,p=a(this),u=this,v=p.data(t);c={initialize:function(){c.verbose("Initializing module"),g.automatic&&c.add.defaults(),g.context&&""!==h?a(g.context).on(h,"mouseenter"+s,c.change.text).on(h,"mouseleave"+s,c.reset.text).on(h,"click"+s,c.toggle.state):p.on("mouseenter"+s,c.change.text).on("mouseleave"+s,c.reset.text).on("click"+s,c.toggle.state),c.instantiate()},instantiate:function(){c.verbose("Storing instance of module",c),v=c,p.data(t,c)},destroy:function(){c.verbose("Destroying previous module",v),p.off(s).removeData(t)},refresh:function(){c.verbose("Refreshing selector cache"),p=a(u)},add:{defaults:function(){var e=b&&a.isPlainObject(b.states)?b.states:{};a.each(g.defaults,function(b,f){c.is[b]!==d&&c.is[b]()&&(c.verbose("Adding default states",b,u),a.extend(g.states,f,e))})}},is:{active:function(){return p.hasClass(o.active)},loading:function(){return p.hasClass(o.loading)},inactive:function(){return!p.hasClass(o.active)},state:function(a){return o[a]===d?!1:p.hasClass(o[a])},enabled:function(){return!p.is(g.filter.active)},disabled:function(){return p.is(g.filter.active)},textEnabled:function(){return!p.is(g.filter.text)},button:function(){return p.is(".button:not(a, .submit)")},input:function(){return p.is("input")},progress:function(){return p.is(".ui.progress")}},allow:function(a){c.debug("Now allowing state",a),q[a]=!0},disallow:function(a){c.debug("No longer allowing",a),q[a]=!1},allows:function(a){return q[a]||!1},enable:function(){p.removeClass(o.disabled)},disable:function(){p.addClass(o.disabled)},setState:function(a){c.allows(a)&&p.addClass(o[a])},removeState:function(a){c.allows(a)&&p.removeClass(o[a])},toggle:{state:function(){var b;if(c.allows("active")&&c.is.enabled()){if(c.refresh(),a.fn.api!==d&&(b=p.api("get request")))return void c.listenTo(b);c.change.state()}}},listenTo:function(b){c.debug("API request detected, waiting for state signal",b),b?(r.loading&&c.update.text(r.loading),a.when(b).then(function(){"resolved"==b.state()?(c.debug("API request succeeded"),g.activateTest=function(){return!0},g.deactivateTest=function(){return!0}):(c.debug("API request failed"),g.activateTest=function(){return!1},g.deactivateTest=function(){return!1}),c.change.state()})):(g.activateTest=function(){return!1},g.deactivateTest=function(){return!1})},change:{state:function(){c.debug("Determining state change direction"),c.is.inactive()?c.activate():c.deactivate(),g.sync&&c.sync(),a.proxy(g.onChange,u)()},text:function(){c.is.textEnabled()&&(c.is.disabled()?(c.verbose("Changing text to disabled text",r.hover),c.update.text(r.disabled)):c.is.active()?r.hover?(c.verbose("Changing text to hover text",r.hover),c.update.text(r.hover)):r.disable&&(c.verbose("Changing text to disable text",r.disable),c.update.text(r.disable)):r.hover?(c.verbose("Changing text to hover text",r.disable),c.update.text(r.hover)):r.enable&&(c.verbose("Changing text to enable text",r.enable),c.update.text(r.enable)))}},activate:function(){a.proxy(g.activateTest,u)()&&(c.debug("Setting state to active"),p.addClass(o.active),c.update.text(r.active)),a.proxy(g.onActivate,u)()},deactivate:function(){a.proxy(g.deactivateTest,u)()&&(c.debug("Setting state to inactive"),p.removeClass(o.active),c.update.text(r.inactive)),a.proxy(g.onDeactivate,u)()},sync:function(){c.verbose("Syncing other buttons to current state"),f.not(p).state(c.is.active()?"activate":"deactivate")},get:{text:function(){return g.selector.text?p.find(g.selector.text).text():p.html()},textFor:function(a){return r[a]||!1}},flash:{text:function(b,d,e){var f=c.get.text();c.debug("Flashing text message",b,d),b=b||g.text.flash,d=d||g.flashDuration,e=e||function(){},c.update.text(b),setTimeout(function(){c.update.text(f),a.proxy(e,u)()},d)}},reset:{text:function(){var a=r.active||p.data(n.storedText),b=r.inactive||p.data(n.storedText);c.is.textEnabled()&&(c.is.active()&&a?(c.verbose("Resetting active text",a),c.update.text(a)):b&&(c.verbose("Resetting inactive text",a),c.update.text(b)))}},update:{text:function(a){var b=c.get.text();a&&a!==b?(c.debug("Updating text",a),g.selector.text?p.data(n.storedText,a).find(g.selector.text).text(a):p.data(n.storedText,a).html(a)):c.debug("Text is already sane, ignoring update",a)}},setting:function(b,e){return c.debug("Changing setting",b,e),e===d?g[b]:void(a.isPlainObject(b)?a.extend(!0,g,b):g[b]=e)},internal:function(b,e){return c.debug("Changing internal",b,e),e===d?c[b]:void(a.isPlainObject(b)?a.extend(!0,c,b):c[b]=e)},debug:function(){g.debug&&(g.performance?c.performance.log(arguments):(c.debug=Function.prototype.bind.call(console.info,console,g.name+":"),c.debug.apply(console,arguments)))},verbose:function(){g.verbose&&g.debug&&(g.performance?c.performance.log(arguments):(c.verbose=Function.prototype.bind.call(console.info,console,g.name+":"),c.verbose.apply(console,arguments)))},error:function(){c.error=Function.prototype.bind.call(console.error,console,g.name+":"),c.error.apply(console,arguments)},performance:{log:function(a){var b,d,e;g.performance&&(b=(new Date).getTime(),e=i||b,d=b-e,i=b,j.push({Name:a[0],Arguments:[].slice.call(a,1)||"",Element:u,"Execution Time":d})),clearTimeout(c.performance.timer),c.performance.timer=setTimeout(c.performance.display,100)},display:function(){var b=g.name+":",e=0;i=!1,clearTimeout(c.performance.timer),a.each(j,function(a,b){e+=b["Execution Time"]}),b+=" "+e+"ms",h&&(b+=" '"+h+"'"),f.size()>1&&(b+=" ("+f.size()+")"),(console.group!==d||console.table!==d)&&j.length>0&&(console.groupCollapsed(b),console.table?console.table(j):a.each(j,function(a,b){console.log(b.Name+": "+b["Execution Time"]+"ms")}),console.groupEnd()),j=[]}},invoke:function(b,c,f){var g,h,i,j=v;return c=c||m,f=u||f,"string"==typeof b&&j!==d&&(b=b.split(/[\. ]/),g=b.length-1,a.each(b,function(c,e){var f=c!=g?e+b[c+1].charAt(0).toUpperCase()+b[c+1].slice(1):b;if(a.isPlainObject(j[f])&&c!=g)j=j[f];else{if(j[f]!==d)return h=j[f],!1;if(!a.isPlainObject(j[e])||c==g)return j[e]!==d?(h=j[e],!1):!1;j=j[e]}})),a.isFunction(h)?i=h.apply(f,c):h!==d&&(i=h),a.isArray(e)?e.push(i):e!==d?e=[e,i]:i!==d&&(e=i),h}},l?(v===d&&c.initialize(),c.invoke(k)):(v!==d&&c.destroy(),c.initialize())}),e!==d?e:this},a.fn.state.settings={name:"State",debug:!1,verbose:!0,namespace:"state",performance:!0,onActivate:function(){},onDeactivate:function(){},onChange:function(){},activateTest:function(){return!0},deactivateTest:function(){return!0},automatic:!0,sync:!1,flashDuration:3e3,filter:{text:".loading, .disabled",active:".disabled"},context:!1,error:{method:"The method you called is not defined."},metadata:{promise:"promise",storedText:"stored-text"},className:{active:"active",disabled:"disabled",error:"error",loading:"loading",success:"success",warning:"warning"},selector:{text:!1},defaults:{input:{disabled:!0,loading:!0,active:!0},button:{disabled:!0,loading:!0,active:!0},progress:{active:!0,success:!0,warning:!0,error:!0}},states:{active:!0,disabled:!0,error:!0,loading:!0,success:!0,warning:!0},text:{disabled:!1,flash:!1,hover:!1,active:!1,inactive:!1,enable:!1,disable:!1}}}(jQuery,window,document),function(a,b,c,d){a.fn.visibility=function(e){var f,g=a(this),h=g.selector||"",i=(new Date).getTime(),j=[],k=arguments[0],l="string"==typeof k,m=[].slice.call(arguments,1);return g.each(function(){var g,n=a.extend(!0,{},a.fn.visibility.settings,e),o=(n.className,n.namespace),p=(n.error,"."+o),q="module-"+o,r=a(b),s=a(this),t=a(n.context),u=(s.offsetParent(),s.selector||"",s.data(q)),v=b.requestAnimationFrame||b.mozRequestAnimationFrame||b.webkitRequestAnimationFrame||b.msRequestAnimationFrame||function(a){setTimeout(a,0)},w=this;g={initialize:function(){g.verbose("Initializing visibility",n),g.setup.cache(),g.save.position(),g.bindEvents(),g.instantiate(),"image"==n.type&&g.setup.image(),v(g.checkVisibility)},instantiate:function(){g.verbose("Storing instance of module",g),u=g,s.data(q,g)},destroy:function(){g.verbose("Destroying previous module"),s.off(p).removeData(q)},bindEvents:function(){g.verbose("Binding visibility events to scroll and resize"),r.on("resize"+p,g.event.refresh),t.on("scroll"+p,g.event.scroll)},event:{refresh:function(){v(g.refresh)},scroll:function(){g.verbose("Scroll position changed"),n.throttle?(clearTimeout(g.timer),g.timer=setTimeout(g.checkVisibility,n.throttle)):v(g.checkVisibility)}},precache:function(b,d){b instanceof Array||(b=[b]);for(var e=b.length,f=0,g=[],h=c.createElement("img"),i=function(){f++,f>=b.length&&a.isFunction(d)&&d()};e--;)h=c.createElement("img"),h.onload=i,h.onerror=i,h.src=b[e],g.push(h)},setup:{cache:function(){g.cache={occurred:{},screen:{},element:{}}},image:function(){var a=s.data("src");a&&(g.verbose("Lazy loading image",a),g.topVisible(function(){g.precache(a,function(){g.set.image(a),n.onTopVisible=!1})}))}},set:{image:function(b){var c=g.cache.screen.bottome.pixelsPassed;e.passing&&a.each(n.onPassed,function(a,b){e.bottomVisible||e.pixelsPassed>g.get.pixelsPassed(a)?g.execute(b,a):n.once||g.remove.occurred(b)})}},passing:function(a){var b=g.get.elementCalculations(),c=a||n.onPassing,e="passing";return a&&(g.debug("Adding callback for passing",a),n.onPassing=a),b.passing?g.execute(c,e):n.once||g.remove.occurred(e),a!==d?b.passing:void 0 },topVisible:function(a){var b=g.get.elementCalculations(),c=a||n.onTopVisible,e="topVisible";return a&&(g.debug("Adding callback for top visible",a),n.onTopVisible=a),b.topVisible?g.execute(c,e):n.once||g.remove.occurred(e),a===d?b.topVisible:void 0},bottomVisible:function(a){var b=g.get.elementCalculations(),c=a||n.onBottomVisible,e="bottomVisible";return a&&(g.debug("Adding callback for bottom visible",a),n.onBottomVisible=a),b.bottomVisible?g.execute(c,e):n.once||g.remove.occurred(e),a===d?b.bottomVisible:void 0},topPassed:function(a){var b=g.get.elementCalculations(),c=a||n.onTopPassed,e="topPassed";return a&&(g.debug("Adding callback for top passed",a),n.onTopPassed=a),b.topPassed?g.execute(c,e):n.once||g.remove.occurred(e),a===d?b.onTopPassed:void 0},bottomPassed:function(a){var b=g.get.elementCalculations(),c=a||n.onBottomPassed,e="bottomPassed";return a&&(g.debug("Adding callback for bottom passed",a),n.onBottomPassed=a),b.bottomPassed?g.execute(c,e):n.once||g.remove.occurred(e),a===d?b.bottomPassed:void 0},passingReverse:function(a){var b=g.get.elementCalculations(),c=a||n.onPassingReverse,e="passingReverse";return a&&(g.debug("Adding callback for passing reverse",a),n.onPassingReverse=a),b.passing?n.once||g.remove.occurred(e):g.get.occurred("passing")&&g.execute(c,e),a!==d?!b.passing:void 0},topVisibleReverse:function(a){var b=g.get.elementCalculations(),c=a||n.onTopVisibleReverse,e="topVisibleReverse";return a&&(g.debug("Adding callback for top visible reverse",a),n.onTopVisibleReverse=a),b.topVisible?n.once||g.remove.occurred(e):g.get.occurred("topVisible")&&g.execute(c,e),a===d?!b.topVisible:void 0},bottomVisibleReverse:function(a){var b=g.get.elementCalculations(),c=a||n.onBottomVisibleReverse,e="bottomVisibleReverse";return a&&(g.debug("Adding callback for bottom visible reverse",a),n.onBottomVisibleReverse=a),b.bottomVisible?n.once||g.remove.occurred(e):g.get.occurred("bottomVisible")&&g.execute(c,e),a===d?!b.bottomVisible:void 0},topPassedReverse:function(a){var b=g.get.elementCalculations(),c=a||n.onTopPassedReverse,e="topPassedReverse";return a&&(g.debug("Adding callback for top passed reverse",a),n.onTopPassedReverse=a),b.topPassed?n.once||g.remove.occurred(e):g.get.occurred("topPassed")&&g.execute(c,e),a===d?!b.onTopPassed:void 0},bottomPassedReverse:function(a){var b=g.get.elementCalculations(),c=a||n.onBottomPassedReverse,e="bottomPassedReverse";return a&&(g.debug("Adding callback for bottom passed reverse",a),n.onBottomPassedReverse=a),b.bottomPassed?n.once||g.remove.occurred(e):g.get.occurred("bottomPassed")&&g.execute(c,e),a===d?!b.bottomPassed:void 0},execute:function(b,c){var d=g.get.elementCalculations(),e=g.get.screenCalculations();b=b||!1,b&&(n.continuous?(g.debug("Callback being called continuously",c,d),a.proxy(b,w)(d,e)):g.get.occurred(c)||(g.debug("Conditions met",c,d),a.proxy(b,w)(d,e))),g.save.occurred(c)},remove:{occurred:function(a){a?g.cache.occurred[a]!==d&&g.cache.occurred[a]===!0&&(g.debug("Callback can now be called again",a),g.cache.occurred[a]=!1):g.cache.occurred={}}},save:{occurred:function(a){a&&(g.cache.occurred[a]===d||g.cache.occurred[a]!==!0)&&(g.verbose("Saving callback occurred",a),g.cache.occurred[a]=!0)},scroll:function(){g.cache.scroll=t.scrollTop()+n.offset},direction:function(){var a,b=g.get.scroll(),c=g.get.lastScroll();return a=b>c&&c?"down":c>b&&c?"up":"static",g.cache.direction=a,g.cache.direction},elementPosition:function(){var b=g.get.screenSize();return g.verbose("Saving element position"),a.extend(g.cache.element,{margin:{top:parseInt(s.css("margin-top"),10),bottom:parseInt(s.css("margin-bottom"),10)},fits:w.height=c.top,topPassed:b.top>=c.top,bottomVisible:b.bottom>=c.bottom,bottomPassed:b.top>=c.bottom,pixelsPassed:0,percentagePassed:0}),a.extend(g.cache.element,{visible:g.cache.element.topVisible||g.cache.element.bottomVisible,passing:g.cache.element.topPassed&&!g.cache.element.bottomPassed,hidden:!g.cache.element.topVisible&&!g.cache.element.bottomVisible}),g.cache.element.passing&&(g.cache.element.pixelsPassed=b.top-c.top,g.cache.element.percentagePassed=(b.top-c.top)/c.height),g.verbose("Updated element calculations",g.cache.element)},screenCalculations:function(){var b=t.scrollTop()+n.offset;return g.cache.scroll===d&&(g.cache.scroll=t.scrollTop()+n.offset),g.save.direction(),a.extend(g.cache.screen,{top:b,bottom:b+g.cache.screen.height}),g.cache.screen},screenSize:function(){g.verbose("Saving window position"),g.cache.screen={height:t.height()}},position:function(){g.save.screenSize(),g.save.elementPosition()}},get:{pixelsPassed:function(a){var b=g.get.elementCalculations();return a.search("%")>-1?b.height*(parseInt(a,10)/100):parseInt(a,10)},occurred:function(a){return g.cache.occurred!==d?g.cache.occurred[a]||!1:!1},direction:function(){return g.cache.direction===d&&g.save.direction(),g.cache.direction},elementPosition:function(){return g.cache.element===d&&g.save.elementPosition(),g.cache.element},elementCalculations:function(){return g.cache.element===d&&g.save.elementCalculations(),g.cache.element},screenCalculations:function(){return g.cache.screen===d&&g.save.screenCalculations(),g.cache.screen},screenSize:function(){return g.cache.screen===d&&g.save.screenSize(),g.cache.screen},scroll:function(){return g.cache.scroll===d&&g.save.scroll(),g.cache.scroll},lastScroll:function(){return g.cache.screen===d?(g.debug("First scroll event, no last scroll could be found"),!1):g.cache.screen.top}},setting:function(b,c){if(a.isPlainObject(b))a.extend(!0,n,b);else{if(c===d)return n[b];n[b]=c}},internal:function(b,c){if(a.isPlainObject(b))a.extend(!0,g,b);else{if(c===d)return g[b];g[b]=c}},debug:function(){n.debug&&(n.performance?g.performance.log(arguments):(g.debug=Function.prototype.bind.call(console.info,console,n.name+":"),g.debug.apply(console,arguments)))},verbose:function(){n.verbose&&n.debug&&(n.performance?g.performance.log(arguments):(g.verbose=Function.prototype.bind.call(console.info,console,n.name+":"),g.verbose.apply(console,arguments)))},error:function(){g.error=Function.prototype.bind.call(console.error,console,n.name+":"),g.error.apply(console,arguments)},performance:{log:function(a){var b,c,d;n.performance&&(b=(new Date).getTime(),d=i||b,c=b-d,i=b,j.push({Name:a[0],Arguments:[].slice.call(a,1)||"",Element:w,"Execution Time":c})),clearTimeout(g.performance.timer),g.performance.timer=setTimeout(g.performance.display,100)},display:function(){var b=n.name+":",c=0;i=!1,clearTimeout(g.performance.timer),a.each(j,function(a,b){c+=b["Execution Time"]}),b+=" "+c+"ms",h&&(b+=" '"+h+"'"),(console.group!==d||console.table!==d)&&j.length>0&&(console.groupCollapsed(b),console.table?console.table(j):a.each(j,function(a,b){console.log(b.Name+": "+b["Execution Time"]+"ms")}),console.groupEnd()),j=[]}},invoke:function(b,c,e){var g,h,i,j=u;return c=c||m,e=w||e,"string"==typeof b&&j!==d&&(b=b.split(/[\. ]/),g=b.length-1,a.each(b,function(c,e){var f=c!=g?e+b[c+1].charAt(0).toUpperCase()+b[c+1].slice(1):b;if(a.isPlainObject(j[f])&&c!=g)j=j[f];else{if(j[f]!==d)return h=j[f],!1;if(!a.isPlainObject(j[e])||c==g)return j[e]!==d?(h=j[e],!1):!1;j=j[e]}})),a.isFunction(h)?i=h.apply(e,c):h!==d&&(i=h),a.isArray(f)?f.push(i):f!==d?f=[f,i]:i!==d&&(f=i),h}},l?(u===d&&g.initialize(),g.invoke(k)):(u!==d&&g.destroy(),g.initialize())}),f!==d?f:this},a.fn.visibility.settings={name:"Visibility",namespace:"visibility",debug:!1,verbose:!1,performance:!0,offset:0,includeMargin:!1,context:b,throttle:!1,type:!1,transition:"fade in",duration:500,onPassed:{},onPassing:!1,onTopVisible:!1,onBottomVisible:!1,onTopPassed:!1,onBottomPassed:!1,onPassingReverse:!1,onTopVisibleReverse:!1,onBottomVisibleReverse:!1,onTopPassedReverse:!1,onBottomPassedReverse:!1,once:!0,continuous:!1,onRefresh:function(){},onScroll:function(){},error:{method:"The method you called is not defined."}}}(jQuery,window,document),function(a,b,c,d){a.visit=a.fn.visit=function(c){var e,f=a(a.isFunction(this)?b:this),g=f.selector||"",h=(new Date).getTime(),i=[],j=arguments[0],k="string"==typeof j,l=[].slice.call(arguments,1);return f.each(function(){var m,n=a.extend(!0,{},a.fn.visit.settings,c),o=n.error,p=n.namespace,q=p+"-module",r=a(this),s=a(),t=this,u=r.data(q);m={initialize:function(){n.count?m.store(n.key.count,n.count):n.id?m.add.id(n.id):n.increment&&"increment"!==k&&m.increment(),m.add.display(r),m.instantiate()},instantiate:function(){m.verbose("Storing instance of visit module",m),u=m,r.data(q,m)},destroy:function(){m.verbose("Destroying instance"),r.removeData(q)},increment:function(a){var b=m.get.count(),c=+b+1;a?m.add.id(a):(c>n.limit&&!n.surpass&&(c=n.limit),m.debug("Incrementing visits",c),m.store(n.key.count,c))},decrement:function(a){var b=m.get.count(),c=+b-1;a?m.remove.id(a):(m.debug("Removing visit"),m.store(n.key.count,c))},get:{count:function(){return+m.retrieve(n.key.count)||0},idCount:function(a){return a=a||m.get.ids(),a.length},ids:function(a){var b=[];return a=a||m.retrieve(n.key.ids),"string"==typeof a&&(b=a.split(n.delimiter)),m.verbose("Found visited ID list",b),b},storageOptions:function(){var a={};return n.expires&&(a.expires=n.expires),n.domain&&(a.domain=n.domain),n.path&&(a.path=n.path),a}},has:{visited:function(b,c){var e=!1;return c=c||m.get.ids(),b!==d&&c&&a.each(c,function(a,c){c==b&&(e=!0)}),e}},set:{count:function(a){m.store(n.key.count,a)},ids:function(a){m.store(n.key.ids,a)}},reset:function(){m.store(n.key.count,0),m.store(n.key.ids,null)},add:{id:function(a){var b=m.retrieve(n.key.ids),c=b===d||""===b?a:b+n.delimiter+a;m.has.visited(a)?m.debug("Unique content already visited, not adding visit",a,b):a===d?m.debug("ID is not defined"):(m.debug("Adding visit to unique content",a),m.store(n.key.ids,c)),m.set.count(m.get.idCount())},display:function(b){var c=a(b);c.size()>0&&!a.isWindow(c[0])&&(m.debug("Updating visit count for element",c),s=s.size()>0?s.add(c):c)}},remove:{id:function(b){var c=m.get.ids(),e=[];b!==d&&c!==d&&(m.debug("Removing visit to unique content",b,c),a.each(c,function(a,c){c!==b&&e.push(c)}),e=e.join(n.delimiter),m.store(n.key.ids,e)),m.set.count(m.get.idCount())}},check:{limit:function(b){b=b||m.get.count(),n.limit&&(b>=n.limit&&(m.debug("Pages viewed exceeded limit, firing callback",b,n.limit),a.proxy(n.onLimit,this)(b)),m.debug("Limit not reached",b,n.limit),a.proxy(n.onChange,this)(b)),m.update.display(b)}},update:{display:function(a){a=a||m.get.count(),s.size()>0&&(m.debug("Updating displayed view count",s),s.html(a))}},store:function(c,e){var f=m.get.storageOptions(e);if("localstorage"==n.storageMethod&&b.localStorage!==d)b.localStorage.setItem(c,e),m.debug("Value stored using local storage",c,e);else{if(a.cookie===d)return void m.error(o.noCookieStorage);a.cookie(c,e,f),m.debug("Value stored using cookie",c,e,f)}c==n.key.count&&m.check.limit(e)},retrieve:function(c){var e;return"localstorage"==n.storageMethod&&b.localStorage!==d?e=b.localStorage.getItem(c):a.cookie!==d?e=a.cookie(c):m.error(o.noCookieStorage),("undefined"==e||"null"==e||e===d||null===e)&&(e=d),e},setting:function(b,c){if(a.isPlainObject(b))a.extend(!0,n,b);else{if(c===d)return n[b];n[b]=c}},internal:function(b,c){return m.debug("Changing internal",b,c),c===d?m[b]:void(a.isPlainObject(b)?a.extend(!0,m,b):m[b]=c)},debug:function(){n.debug&&(n.performance?m.performance.log(arguments):(m.debug=Function.prototype.bind.call(console.info,console,n.name+":"),m.debug.apply(console,arguments)))},verbose:function(){n.verbose&&n.debug&&(n.performance?m.performance.log(arguments):(m.verbose=Function.prototype.bind.call(console.info,console,n.name+":"),m.verbose.apply(console,arguments)))},error:function(){m.error=Function.prototype.bind.call(console.error,console,n.name+":"),m.error.apply(console,arguments)},performance:{log:function(a){var b,c,d;n.performance&&(b=(new Date).getTime(),d=h||b,c=b-d,h=b,i.push({Name:a[0],Arguments:[].slice.call(a,1)||"",Element:t,"Execution Time":c})),clearTimeout(m.performance.timer),m.performance.timer=setTimeout(m.performance.display,100)},display:function(){var b=n.name+":",c=0;h=!1,clearTimeout(m.performance.timer),a.each(i,function(a,b){c+=b["Execution Time"]}),b+=" "+c+"ms",g&&(b+=" '"+g+"'"),f.size()>1&&(b+=" ("+f.size()+")"),(console.group!==d||console.table!==d)&&i.length>0&&(console.groupCollapsed(b),console.table?console.table(i):a.each(i,function(a,b){console.log(b.Name+": "+b["Execution Time"]+"ms")}),console.groupEnd()),i=[]}},invoke:function(b,c,f){var g,h,i,j=u;return c=c||l,f=t||f,"string"==typeof b&&j!==d&&(b=b.split(/[\. ]/),g=b.length-1,a.each(b,function(c,e){var f=c!=g?e+b[c+1].charAt(0).toUpperCase()+b[c+1].slice(1):b;if(a.isPlainObject(j[f])&&c!=g)j=j[f];else{if(j[f]!==d)return h=j[f],!1;if(!a.isPlainObject(j[e])||c==g)return j[e]!==d?(h=j[e],!1):!1;j=j[e]}})),a.isFunction(h)?i=h.apply(f,c):h!==d&&(i=h),a.isArray(e)?e.push(i):e!==d?e=[e,i]:i!==d&&(e=i),h}},k?(u===d&&m.initialize(),m.invoke(j)):(u!==d&&m.destroy(),m.initialize())}),e!==d?e:this},a.fn.visit.settings={name:"Visit",debug:!1,verbose:!0,performance:!0,namespace:"visit",increment:!1,surpass:!1,count:!1,limit:!1,delimiter:"&",storageMethod:"localstorage",key:{count:"visit-count",ids:"visit-ids"},expires:30,domain:!1,path:"/",onLimit:function(){},onChange:function(){},error:{method:"The method you called is not defined",missingPersist:"Using the persist setting requires the inclusion of PersistJS",noCookieStorage:"The default storage cookie requires $.cookie to be included."}}}(jQuery,window,document),!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):a("object"==typeof exports?require("jquery"):jQuery)}(function(a){function b(a){return h.raw?a:encodeURIComponent(a)}function c(a){return h.raw?a:decodeURIComponent(a)}function d(a){return b(h.json?JSON.stringify(a):String(a))}function e(a){0===a.indexOf('"')&&(a=a.slice(1,-1).replace(/\\"/g,'"').replace(/\\\\/g,"\\"));try{return a=decodeURIComponent(a.replace(g," ")),h.json?JSON.parse(a):a}catch(b){}}function f(b,c){var d=h.raw?b:e(b);return a.isFunction(c)?c(d):d}var g=/\+/g,h=a.cookie=function(e,g,i){if(void 0!==g&&!a.isFunction(g)){if(i=a.extend({},h.defaults,i),"number"==typeof i.expires){var j=i.expires,k=i.expires=new Date;k.setTime(+k+864e5*j)}return document.cookie=[b(e),"=",d(g),i.expires?"; expires="+i.expires.toUTCString():"",i.path?"; path="+i.path:"",i.domain?"; domain="+i.domain:"",i.secure?"; secure":""].join("")}for(var l=e?void 0:{},m=document.cookie?document.cookie.split("; "):[],n=0,o=m.length;o>n;n++){var p=m[n].split("="),q=c(p.shift()),r=p.join("=");if(e&&e===q){l=f(r,g);break}e||void 0===(r=f(r))||(l[q]=r)}return l};h.defaults={},a.removeCookie=function(b,c){return void 0===a.cookie(b)?!1:(a.cookie(b,"",a.extend({},c,{expires:-1})),!a.cookie(b))}}),function(a,b,c,d){a.site=a.fn.site=function(e){var f,g,h=(new Date).getTime(),i=[],j=arguments[0],k="string"==typeof j,l=[].slice.call(arguments,1),m=a.isPlainObject(e)?a.extend(!0,{},a.site.settings,e):a.extend({},a.site.settings),n=m.namespace,o=m.error,p="module-"+n,q=a(c),r=q,s=this,t=r.data(p);return f={initialize:function(){f.instantiate()},instantiate:function(){f.verbose("Storing instance of site",f),t=f,r.data(p,f)},normalize:function(){f.fix.console(),f.fix.requestAnimationFrame()},fix:{console:function(){f.debug("Normalizing window.console"),(console===d||console.log===d)&&(f.verbose("Console not available, normalizing events"),f.disable.console()),("undefined"==typeof console.group||"undefined"==typeof console.groupEnd||"undefined"==typeof console.groupCollapsed)&&(f.verbose("Console group not available, normalizing events"),b.console.group=function(){},b.console.groupEnd=function(){},b.console.groupCollapsed=function(){}),"undefined"==typeof console.markTimeline&&(f.verbose("Mark timeline not available, normalizing events"),b.console.markTimeline=function(){})},consoleClear:function(){f.debug("Disabling programmatic console clearing"),b.console.clear=function(){}},requestAnimationFrame:function(){f.debug("Normalizing requestAnimationFrame"),b.requestAnimationFrame===d&&(f.debug("RequestAnimationFrame not available, normailizing event"),b.requestAnimationFrame=b.requestAnimationFrame||b.mozRequestAnimationFrame||b.webkitRequestAnimationFrame||b.msRequestAnimationFrame||function(a){setTimeout(a,0)})}},moduleExists:function(b){return a.fn[b]!==d&&a.fn[b].settings!==d},enabled:{modules:function(b){var c=[];return b=b||m.modules,a.each(b,function(a,b){f.moduleExists(b)&&c.push(b)}),c}},disabled:{modules:function(b){var c=[];return b=b||m.modules,a.each(b,function(a,b){f.moduleExists(b)||c.push(b)}),c}},change:{setting:function(b,c,e,g){e="string"==typeof e?"all"===e?m.modules:[e]:e||m.modules,g=g!==d?g:!0,a.each(e,function(d,e){var h,i=f.moduleExists(e)?a.fn[e].settings.namespace||!1:!0;f.moduleExists(e)&&(f.verbose("Changing default setting",b,c,e),a.fn[e].settings[b]=c,g&&i&&(h=a(":data(module-"+i+")"),h.size()>0&&(f.verbose("Modifying existing settings",h),h[e]("setting",b,c))))})},settings:function(b,c,e){c="string"==typeof c?[c]:c||m.modules,e=e!==d?e:!0,a.each(c,function(c,d){var g;f.moduleExists(d)&&(f.verbose("Changing default setting",b,d),a.extend(!0,a.fn[d].settings,b),e&&n&&(g=a(":data(module-"+n+")"),g.size()>0&&(f.verbose("Modifying existing settings",g),g[d]("setting",b))))})}},enable:{console:function(){f.console(!0)},debug:function(a,b){a=a||m.modules,f.debug("Enabling debug for modules",a),f.change.setting("debug",!0,a,b)},verbose:function(a,b){a=a||m.modules,f.debug("Enabling verbose debug for modules",a),f.change.setting("verbose",!0,a,b)}},disable:{console:function(){f.console(!1)},debug:function(a,b){a=a||m.modules,f.debug("Disabling debug for modules",a),f.change.setting("debug",!1,a,b)},verbose:function(a,b){a=a||m.modules,f.debug("Disabling verbose debug for modules",a),f.change.setting("verbose",!1,a,b)}},console:function(a){if(a){if(t.cache.console===d)return void f.error(o.console);f.debug("Restoring console function"),b.console=t.cache.console}else f.debug("Disabling console function"),t.cache.console=b.console,b.console={clear:function(){},error:function(){},group:function(){},groupCollapsed:function(){},groupEnd:function(){},info:function(){},log:function(){},markTimeline:function(){},warn:function(){}}},destroy:function(){f.verbose("Destroying previous site for",r),r.removeData(p)},cache:{},setting:function(b,c){if(a.isPlainObject(b))a.extend(!0,m,b);else{if(c===d)return m[b];m[b]=c}},internal:function(b,c){if(a.isPlainObject(b))a.extend(!0,f,b);else{if(c===d)return f[b];f[b]=c}},debug:function(){m.debug&&(m.performance?f.performance.log(arguments):(f.debug=Function.prototype.bind.call(console.info,console,m.name+":"),f.debug.apply(console,arguments)))},verbose:function(){m.verbose&&m.debug&&(m.performance?f.performance.log(arguments):(f.verbose=Function.prototype.bind.call(console.info,console,m.name+":"),f.verbose.apply(console,arguments)))},error:function(){f.error=Function.prototype.bind.call(console.error,console,m.name+":"),f.error.apply(console,arguments)},performance:{log:function(a){var b,c,d;m.performance&&(b=(new Date).getTime(),d=h||b,c=b-d,h=b,i.push({Element:s,Name:a[0],Arguments:[].slice.call(a,1)||"","Execution Time":c})),clearTimeout(f.performance.timer),f.performance.timer=setTimeout(f.performance.display,100)},display:function(){var b=m.name+":",c=0;h=!1,clearTimeout(f.performance.timer),a.each(i,function(a,b){c+=b["Execution Time"]}),b+=" "+c+"ms",(console.group!==d||console.table!==d)&&i.length>0&&(console.groupCollapsed(b),console.table?console.table(i):a.each(i,function(a,b){console.log(b.Name+": "+b["Execution Time"]+"ms")}),console.groupEnd()),i=[]}},invoke:function(b,c,e){var h,i,j,k=t;return c=c||l,e=s||e,"string"==typeof b&&k!==d&&(b=b.split(/[\. ]/),h=b.length-1,a.each(b,function(c,e){var g=c!=h?e+b[c+1].charAt(0).toUpperCase()+b[c+1].slice(1):b;if(a.isPlainObject(k[g])&&c!=h)k=k[g];else{if(k[g]!==d)return i=k[g],!1;if(!a.isPlainObject(k[e])||c==h)return k[e]!==d?(i=k[e],!1):(f.error(o.method,b),!1);k=k[e]}})),a.isFunction(i)?j=i.apply(e,c):i!==d&&(j=i),a.isArray(g)?g.push(j):g!==d?g=[g,j]:j!==d&&(g=j),i}},k?(t===d&&f.initialize(),f.invoke(j)):(t!==d&&f.destroy(),f.initialize()),g!==d?g:this},a.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:{}}},a.extend(a.expr[":"],{data:a.expr.createPseudo?a.expr.createPseudo(function(b){return function(c){return!!a.data(c,b)}}):function(b,c,d){return!!a.data(b,d[3])}})}(jQuery,window,document),function(a,b,c,d){"use strict";a.fn.accordion=function(c){{var e,f=a(this),g=(new Date).getTime(),h=[],i=arguments[0],j="string"==typeof i,k=[].slice.call(arguments,1);b.requestAnimationFrame||b.mozRequestAnimationFrame||b.webkitRequestAnimationFrame||b.msRequestAnimationFrame||function(a){setTimeout(a,0)}}return f.each(function(){var b,l,m=a.isPlainObject(c)?a.extend(!0,{},a.fn.accordion.settings,c):a.extend({},a.fn.accordion.settings),n=m.className,o=m.namespace,p=m.selector,q=(m.error,"."+o),r="module-"+o,s=f.selector||"",t=a(this),u=t.find(p.title),v=t.find(p.content),w=this,x=t.data(r);l={initialize:function(){l.debug("Initializing accordion with bound events",t),t.on("click"+q,p.title,l.event.click),l.observeChanges(),l.instantiate()},instantiate:function(){x=l,t.data(r,l)},destroy:function(){l.debug("Destroying previous accordion for",t),t.removeData(r),u.off(q)},refresh:function(){u=t.find(p.title),v=t.find(p.content)},observeChanges:function(){MutationObserver!==d&&(b=new MutationObserver(function(){l.debug("DOM tree modified, updating selector cache"),l.refresh()}),b.observe(w,{childList:!0,subtree:!0}),l.debug("Setting up mutation observer",b))},event:{click:function(){a.proxy(l.toggle,this)()}},toggle:function(b){var c=b!==d?"number"==typeof b?u.eq(b):a(b):a(this),e=c.next(v),f=e.is(":visible");l.debug("Toggling visibility of content",c),f?m.collapsible?a.proxy(l.close,c)():l.debug("Cannot close accordion content collapsing is disabled"):a.proxy(l.open,c)()},open:function(b){var c=b!==d?"number"==typeof b?u.eq(b):a(b):a(this),e=c.next(v),f=e.is(":animated"),g=e.hasClass(n.active);f||g||(l.debug("Opening accordion content",c),m.exclusive&&a.proxy(l.closeOthers,c)(),c.addClass(n.active),e.stop().children().stop().animate({opacity:1},m.duration,l.reset.display).end().slideDown(m.duration,m.easing,function(){e.addClass(n.active),a.proxy(l.reset.display,this)(),a.proxy(m.onOpen,this)(),a.proxy(m.onChange,this)()}))},close:function(b){var c=b!==d?"number"==typeof b?u.eq(b):a(b):a(this),e=c.next(v),f=e.hasClass(n.active);f&&(l.debug("Closing accordion content",e),c.removeClass(n.active),e.removeClass(n.active).show().stop().children().stop().animate({opacity:0},m.duration,l.reset.opacity).end().slideUp(m.duration,m.easing,function(){a.proxy(l.reset.display,this)(),a.proxy(m.onClose,this)(),a.proxy(m.onChange,this)()}))},closeOthers:function(b){var c,e,f,g=b!==d?u.eq(b):a(this),h=g.parents(p.content).prev(p.title),i=g.closest(p.accordion),j=p.title+"."+n.active+":visible",k=p.content+"."+n.active+":visible";m.closeNested?(c=i.find(j).not(h),f=c.next(v)):(c=i.find(j).not(h),e=i.find(k).find(j).not(h),c=c.not(e),f=c.next(v)),c.size()>0&&(l.debug("Exclusive enabled, closing other content",c),c.removeClass(n.active),f.stop().children().stop().animate({opacity:0},m.duration,l.resetOpacity).end().slideUp(m.duration,m.easing,function(){a(this).removeClass(n.active),a.proxy(l.reset.display,this)()}))},reset:{display:function(){l.verbose("Removing inline display from element",this),a(this).css("display",""),""===a(this).attr("style")&&a(this).attr("style","").removeAttr("style")},opacity:function(){l.verbose("Removing inline opacity from element",this),a(this).css("opacity",""),""===a(this).attr("style")&&a(this).attr("style","").removeAttr("style")}},setting:function(b,c){if(l.debug("Changing setting",b,c),a.isPlainObject(b))a.extend(!0,m,b);else{if(c===d)return m[b];m[b]=c}},internal:function(b,c){return l.debug("Changing internal",b,c),c===d?l[b]:void(a.isPlainObject(b)?a.extend(!0,l,b):l[b]=c)},debug:function(){m.debug&&(m.performance?l.performance.log(arguments):(l.debug=Function.prototype.bind.call(console.info,console,m.name+":"),l.debug.apply(console,arguments)))},verbose:function(){m.verbose&&m.debug&&(m.performance?l.performance.log(arguments):(l.verbose=Function.prototype.bind.call(console.info,console,m.name+":"),l.verbose.apply(console,arguments)))},error:function(){l.error=Function.prototype.bind.call(console.error,console,m.name+":"),l.error.apply(console,arguments)},performance:{log:function(a){var b,c,d;m.performance&&(b=(new Date).getTime(),d=g||b,c=b-d,g=b,h.push({Name:a[0],Arguments:[].slice.call(a,1)||"",Element:w,"Execution Time":c})),clearTimeout(l.performance.timer),l.performance.timer=setTimeout(l.performance.display,100)},display:function(){var b=m.name+":",c=0;g=!1,clearTimeout(l.performance.timer),a.each(h,function(a,b){c+=b["Execution Time"]}),b+=" "+c+"ms",s&&(b+=" '"+s+"'"),(console.group!==d||console.table!==d)&&h.length>0&&(console.groupCollapsed(b),console.table?console.table(h):a.each(h,function(a,b){console.log(b.Name+": "+b["Execution Time"]+"ms")}),console.groupEnd()),h=[]}},invoke:function(b,c,f){var g,h,i,j=x;return c=c||k,f=w||f,"string"==typeof b&&j!==d&&(b=b.split(/[\. ]/),g=b.length-1,a.each(b,function(c,e){var f=c!=g?e+b[c+1].charAt(0).toUpperCase()+b[c+1].slice(1):b;if(a.isPlainObject(j[f])&&c!=g)j=j[f];else{if(j[f]!==d)return h=j[f],!1;if(!a.isPlainObject(j[e])||c==g)return j[e]!==d?(h=j[e],!1):!1;j=j[e]}})),a.isFunction(h)?i=h.apply(f,c):h!==d&&(i=h),a.isArray(e)?e.push(i):e!==d?e=[e,i]:i!==d&&(e=i),h}},j?(x===d&&l.initialize(),l.invoke(i)):(x!==d&&l.destroy(),l.initialize())}),e!==d?e:this},a.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"}},a.extend(a.easing,{easeInOutQuint:function(a,b,c,d,e){return(b/=e/2)<1?d/2*b*b*b*b*b+c:d/2*((b-=2)*b*b*b*b+2)+c}})}(jQuery,window,document),function(a,b,c,d){"use strict";a.fn.chatroom=function(b){var c,e=a(this),f=e.selector||"",g=(new Date).getTime(),h=[],i=arguments[0],j="string"==typeof i,k=[].slice.call(arguments,1);return a(this).each(function(){var c,e,l,m,n,o,p,q=a.extend(!0,{},a.fn.chatroom.settings,b),r=q.className,s=q.namespace,t=q.selector,u=q.error,v=a(this),w=v.find(t.expandButton),x=v.find(t.userListButton),y=v.find(t.userList),z=(v.find(t.room),v.find(t.userCount)),A=v.find(t.log),B=(v.find(t.message),v.find(t.messageInput)),C=v.find(t.messageButton),D=v.data("module"),E=this,F="",G={};p={width:{log:A.width(),userList:y.outerWidth()},initialize:function(){return Pusher===d&&p.error(u.pusher),q.key===d||q.channelName===d?(p.error(u.key),!1):q.endpoint.message||q.endpoint.authentication?(o=new Pusher(q.key),Pusher.channel_auth_endpoint=q.endpoint.authentication,c=o.subscribe(q.channelName),c.bind("pusher:subscription_succeeded",p.user.list.create),c.bind("pusher:subscription_error",p.error),c.bind("pusher:member_added",p.user.joined),c.bind("pusher:member_removed",p.user.left),c.bind("update_messages",p.message.receive),a.each(q.customEvents,function(a,b){c.bind(a,b)}),x.on("click."+s,p.event.toggleUserList),w.on("click."+s,p.event.toggleExpand),B.on("keydown."+s,p.event.input.keydown).on("keyup."+s,p.event.input.keyup),C.on("mouseenter."+s,p.event.hover).on("mouseleave."+s,p.event.hover).on("click."+s,p.event.submit),A.animate({scrollTop:A.prop("scrollHeight")},400),void v.data("module",p).addClass(r.loading)):(p.error(u.endpoint),!1)},refresh:function(){x.removeClass(r.active),p.width={log:A.width(),userList:y.outerWidth()},x.hasClass(r.active)&&p.user.list.hide(),v.data("module",p)},user:{updateCount:function(){q.userCount&&(G=v.data("users"),m=0,a.each(G,function(){m++}),z.html(q.templates.userCount(m)))},joined:function(b){G=v.data("users"),"anonymous"!=b.id&&G[b.id]===d&&(G[b.id]=b.info,q.randomColor&&b.info.color===d&&(b.info.color=q.templates.color(b.id)),F=q.templates.userList(b.info),b.info.isAdmin?a(F).prependTo(y):a(F).appendTo(y),q.partingMessages&&(A.append(q.templates.joined(b.info)),p.message.scroll.test()),p.user.updateCount())},left:function(a){G=v.data("users"),a!==d&&"anonymous"!==a.id&&(delete G[a.id],v.data("users",G),y.find("[data-id="+a.id+"]").remove(),q.partingMessages&&(A.append(q.templates.left(a.info)),p.message.scroll.test()),p.user.updateCount())},list:{create:function(b){G={},b.each(function(a){"anonymous"!==a.id&&"undefined"!==a.id&&(q.randomColor&&a.info.color===d&&(a.info.color=q.templates.color(a.id)),F=a.info.isAdmin?q.templates.userList(a.info)+F:F+q.templates.userList(a.info),G[a.id]=a.info)}),v.data("users",G).data("user",G[b.me.id]).removeClass(r.loading),y.html(F),p.user.updateCount(),a.proxy(q.onJoin,y.children())()},show:function(){A.animate({width:p.width.log-p.width.userList},{duration:q.speed,easing:q.easing,complete:p.message.scroll.move})},hide:function(){A.stop().animate({width:p.width.log},{duration:q.speed,easing:q.easing,complete:p.message.scroll.move})}}},message:{scroll:{test:function(){n=A.prop("scrollHeight")-A.height(),Math.abs(A.scrollTop()-n)0&&(console.groupCollapsed(b),console.table?console.table(h):a.each(h,function(a,b){console.log(b.Name+": "+b["Execution Time"]+"ms")}),console.groupEnd()),h=[]}},invoke:function(b,c,e){var f,g;return c=c||k,e=E||e,"string"==typeof b&&D!==d&&(b=b.split(/[\. ]/),f=b.length-1,a.each(b,function(c,e){a.isPlainObject(D[e])&&c!=f?D=D[e]:D[e]!==d?g=D[e]:p.error(u.method,b)})),a.isFunction(g)?g.apply(e,c):g||!1}},j?(D===d&&p.initialize(),p.invoke(i)):(D!==d&&p.destroy(),p.initialize())}),c!==d?c:this},a.fn.chatroom.settings={name:"Chat",namespace:"chat",debug:!1,channel:"present-chat",onJoin:function(){},onMessage:function(){},onExpand:function(){},onContract:function(){},customEvents:{},partingMessages:!1,userCount:!0,randomColor:!0,speed:300,easing:"easeOutQuint",scrollArea:9999,endpoint:{message:!1,authentication:!1},error:{method:"The method you called is not defined",endpoint:"Please define a message and authentication endpoint.",key:"You must specify a pusher key and channel.",pusher:"You must include the Pusher library."},className:{expand:"expand",active:"active",hover:"hover",down:"down",loading:"loading"},selector:{userCount:".actions .message",userListButton:".actions .list.button",expandButton:".actions .expand.button",room:".room",userList:".room .list",log:".room .log",message:".room .log .message",author:".room log .message .author",messageInput:".talk input",messageButton:".talk .send.button"},templates:{userCount:function(a){return a+" users in chat"},color:function(){var a=["#000000","#333333","#666666","#999999","#CC9999","#CC6666","#CC3333","#993333","#663333","#CC6633","#CC9966","#CC9933","#999966","#CCCC66","#99CC66","#669933","#669966","#33A3CC","#336633","#33CCCC","#339999","#336666","#336699","#6666CC","#9966CC","#333399","#663366","#996699","#993366","#CC6699"];return a[Math.floor(Math.random()*a.length)]},message:function(a){var b="";return a.user.isAdmin?(a.user.color="#55356A",b+='
',b+=''):b+='
',b+="

",b+=a.user.color!==d?''+a.user.name+": ":''+a.user.name+": ",b+=""+a.text+"

"},joined:function(a){return typeof a.name!==d?'
'+a.name+" has joined the chat.
":!1},left:function(a){return typeof a.name!==d?'
'+a.name+" has left the chat.
":!1},userList:function(a){var b="";return a.isAdmin&&(a.color="#55356A"),b+='
',b+=a.color!==d?'

'+a.name+"

":'

'+a.name+"

",b+="
"}}}}(jQuery,window,document),function(a,b,c,d){"use strict";a.fn.checkbox=function(b){var c,e=a(this),f=e.selector||"",g=(new Date).getTime(),h=[],i=arguments[0],j="string"==typeof i,k=[].slice.call(arguments,1);return e.each(function(){var e,l,m=a.extend(!0,{},a.fn.checkbox.settings,b),n=m.className,o=m.namespace,p=m.selector,q=m.error,r="."+o,s="module-"+o,t=a(this),u=a(this).next(p.label).first(),v=a(this).find(p.input),w=t.data(s),x=this;l={initialize:function(){l.verbose("Initializing checkbox",m),t.on("click"+r,l.toggle).on("keydown"+r,p.input,l.event.keydown),l.is.checked()?(l.set.checked(),m.fireOnInit&&a.proxy(m.onChecked,v.get())()):(l.remove.checked(),m.fireOnInit&&a.proxy(m.onUnchecked,v.get())()),l.observeChanges(),l.instantiate()},instantiate:function(){l.verbose("Storing instance of module",l),w=l,t.data(s,l)},destroy:function(){l.verbose("Destroying previous module"),t.off(r).removeData(s),v.off(r,l.event.keydown),u.off(r)},refresh:function(){t=a(this),u=a(this).next(p.label).first(),v=a(this).find(p.input)},observeChanges:function(){MutationObserver!==d&&(e=new MutationObserver(function(){l.debug("DOM tree modified, updating selector cache"),l.refresh()}),e.observe(x,{childList:!0,subtree:!0}),l.debug("Setting up mutation observer",e))},attachEvents:function(b,c){var d=a(b);c=a.isFunction(l[c])?l[c]:l.toggle,d.size()>0?(l.debug("Attaching checkbox events to element",b,c),d.on("click"+r,c)):l.error(q.notFound)},event:{keydown:function(b){var c=b.which,d={enter:13,escape:27};c==d.escape&&(l.verbose("Escape key pressed blurring field"),t.blur()),b.ctrlKey||c!=d.enter||(l.verbose("Enter key pressed, toggling checkbox"),a.proxy(l.toggle,this)(),b.preventDefault())}},is:{radio:function(){return t.hasClass(n.radio)},checked:function(){return v.prop("checked")!==d&&v.prop("checked")},unchecked:function(){return!l.is.checked()}},can:{change:function(){return!(t.hasClass(n.disabled)||t.hasClass(n.readOnly)||v.prop("disabled"))},uncheck:function(){return"boolean"==typeof m.uncheckable?m.uncheckable:!l.is.radio()}},set:{checked:function(){t.addClass(n.checked)}},remove:{checked:function(){t.removeClass(n.checked)}},disable:function(){l.debug("Enabling checkbox functionality"),t.addClass(n.disabled),v.removeProp("disabled"),a.proxy(m.onDisabled,v.get())()},enable:function(){l.debug("Disabling checkbox functionality"),t.removeClass(n.disabled),v.prop("disabled","disabled"),a.proxy(m.onEnabled,v.get())()},check:function(){l.debug("Enabling checkbox",v),v.prop("checked",!0).trigger("change"),l.set.checked(),a.proxy(m.onChange,v.get())(),a.proxy(m.onChecked,v.get())()},uncheck:function(){l.debug("Disabling checkbox"),v.prop("checked",!1).trigger("change"),l.remove.checked(),a.proxy(m.onChange,v.get())(),a.proxy(m.onUnchecked,v.get())()},toggle:function(){return l.can.change()?(l.verbose("Determining new checkbox state"),void(l.is.unchecked()?l.check():l.is.checked()&&l.can.uncheck()&&l.uncheck())):(console.log(l.can.change()),void l.debug("Checkbox is read-only or disabled, ignoring toggle"))},setting:function(b,c){if(l.debug("Changing setting",b,c),a.isPlainObject(b))a.extend(!0,m,b);else{if(c===d)return m[b];m[b]=c}},internal:function(b,c){if(a.isPlainObject(b))a.extend(!0,l,b);else{if(c===d)return l[b];l[b]=c}},debug:function(){m.debug&&(m.performance?l.performance.log(arguments):(l.debug=Function.prototype.bind.call(console.info,console,m.name+":"),l.debug.apply(console,arguments)))},verbose:function(){m.verbose&&m.debug&&(m.performance?l.performance.log(arguments):(l.verbose=Function.prototype.bind.call(console.info,console,m.name+":"),l.verbose.apply(console,arguments)))},error:function(){l.error=Function.prototype.bind.call(console.error,console,m.name+":"),l.error.apply(console,arguments)},performance:{log:function(a){var b,c,d;m.performance&&(b=(new Date).getTime(),d=g||b,c=b-d,g=b,h.push({Name:a[0],Arguments:[].slice.call(a,1)||"",Element:x,"Execution Time":c})),clearTimeout(l.performance.timer),l.performance.timer=setTimeout(l.performance.display,100)},display:function(){var b=m.name+":",c=0;g=!1,clearTimeout(l.performance.timer),a.each(h,function(a,b){c+=b["Execution Time"]}),b+=" "+c+"ms",f&&(b+=" '"+f+"'"),(console.group!==d||console.table!==d)&&h.length>0&&(console.groupCollapsed(b),console.table?console.table(h):a.each(h,function(a,b){console.log(b.Name+": "+b["Execution Time"]+"ms")}),console.groupEnd()),h=[]}},invoke:function(b,e,f){var g,h,i,j=w;return e=e||k,f=x||f,"string"==typeof b&&j!==d&&(b=b.split(/[\. ]/),g=b.length-1,a.each(b,function(c,e){var f=c!=g?e+b[c+1].charAt(0).toUpperCase()+b[c+1].slice(1):b;if(a.isPlainObject(j[f])&&c!=g)j=j[f];else{if(j[f]!==d)return h=j[f],!1;if(!a.isPlainObject(j[e])||c==g)return j[e]!==d?(h=j[e],!1):!1;j=j[e]}})),a.isFunction(h)?i=h.apply(f,e):h!==d&&(i=h),a.isArray(c)?c.push(i):c!==d?c=[c,i]:i!==d&&(c=i),h}},j?(w===d&&l.initialize(),l.invoke(i)):(w!==d&&l.destroy(),l.initialize())}),c!==d?c:this},a.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(a,b,c,d){a.fn.dimmer=function(b){var e,f=a(this),g=(new Date).getTime(),h=[],i=arguments[0],j="string"==typeof i,k=[].slice.call(arguments,1);return f.each(function(){var l,m,n,o=a.isPlainObject(b)?a.extend(!0,{},a.fn.dimmer.settings,b):a.extend({},a.fn.dimmer.settings),p=o.selector,q=o.namespace,r=o.className,s=(o.error,"."+q),t="module-"+q,u=f.selector||"",v="ontouchstart"in c.documentElement?"touchstart":"click",w=a(this),x=this,y=w.data(t);n={preinitialize:function(){n.is.dimmer()?(m=w.parent(),l=w):(m=w,l=n.has.dimmer()?m.children(p.dimmer).first():n.create())},initialize:function(){n.debug("Initializing dimmer",o),"hover"==o.on?m.on("mouseenter"+s,n.show).on("mouseleave"+s,n.hide):"click"==o.on&&m.on(v+s,n.toggle),n.is.page()&&(n.debug("Setting as a page dimmer",m),n.set.pageDimmer()),"click"==o.on&&o.closable&&(n.verbose("Adding dimmer close event",l),l.on(v+s,n.event.click)),n.set.dimmable(),n.instantiate()},instantiate:function(){n.verbose("Storing instance of module",n),y=n,w.data(t,y)},destroy:function(){n.verbose("Destroying previous module",l),w.removeData(t),m.off(s),l.off(s)},event:{click:function(b){n.verbose("Determining if event occured on dimmer",b),(0===l.find(b.target).size()||a(b.target).is(p.content))&&(n.hide(),b.stopImmediatePropagation())}},addContent:function(b){var c=a(b);n.debug("Add content to dimmer",c),c.parent()[0]!==l[0]&&c.detach().appendTo(l)},create:function(){return a(o.template.dimmer()).appendTo(m)},animate:{show:function(b){b=a.isFunction(b)?b:function(){},n.set.dimmed(),"hover"!=o.on&&o.useCSS&&a.fn.transition!==d&&l.transition("is supported")?l.transition({animation:o.transition+" in",queue:!0,duration:n.get.duration(),complete:function(){n.set.active(),b()}}):(n.verbose("Showing dimmer animation with javascript"),l.stop().css({opacity:0,width:"100%",height:"100%"}).fadeTo(n.get.duration(),1,function(){l.removeAttr("style"),n.set.active(),b()}))},hide:function(b){b=a.isFunction(b)?b:function(){},"hover"!=o.on&&o.useCSS&&a.fn.transition!==d&&l.transition("is supported")?(n.verbose("Hiding dimmer with css"),n.remove.dimmed(),l.transition({animation:o.transition+" out",duration:n.get.duration(),queue:!0,complete:function(){n.remove.active(),b()}})):(n.verbose("Hiding dimmer with javascript"),n.remove.dimmed(),l.stop().fadeOut(n.get.duration(),function(){l.removeAttr("style"),n.remove.active(),b()}))}},get:{dimmer:function(){return l},duration:function(){return"object"==typeof o.duration?n.is.active()?o.duration.hide:o.duration.show:o.duration}},has:{dimmer:function(){return w.children(p.dimmer).size()>0}},is:{active:function(){return l.hasClass(r.active)},animating:function(){return l.is(":animated")||l.hasClass(r.transition)},dimmer:function(){return w.is(p.dimmer)},dimmable:function(){return w.is(p.dimmable)},dimmed:function(){return m.hasClass(r.dimmed)},disabled:function(){return m.hasClass(r.disabled)},enabled:function(){return!n.is.disabled()},page:function(){return m.is("body")},pageDimmer:function(){return l.hasClass(r.pageDimmer)}},can:{show:function(){return!l.hasClass(r.disabled)}},set:{active:function(){n.set.dimmed(),l.removeClass(r.transition).addClass(r.active)},dimmable:function(){m.addClass(r.dimmable)},dimmed:function(){m.addClass(r.dimmed)},pageDimmer:function(){l.addClass(r.pageDimmer)},disabled:function(){l.addClass(r.disabled)}},remove:{active:function(){l.removeClass(r.transition).removeClass(r.active)},dimmed:function(){m.removeClass(r.dimmed)},disabled:function(){l.removeClass(r.disabled)}},show:function(b){b=a.isFunction(b)?b:function(){},n.debug("Showing dimmer",l,o),!n.is.active()&&n.is.enabled()?(n.animate.show(b),a.proxy(o.onShow,x)(),a.proxy(o.onChange,x)()):n.debug("Dimmer is already shown or disabled")},hide:function(b){b=a.isFunction(b)?b:function(){},n.is.active()||n.is.animating()?(n.debug("Hiding dimmer",l),n.animate.hide(b),a.proxy(o.onHide,x)(),a.proxy(o.onChange,x)()):n.debug("Dimmer is not visible")},toggle:function(){n.verbose("Toggling dimmer visibility",l),n.is.dimmed()?n.hide():n.show()},setting:function(b,c){if(n.debug("Changing setting",b,c),a.isPlainObject(b))a.extend(!0,o,b);else{if(c===d)return o[b];o[b]=c}},internal:function(b,c){if(a.isPlainObject(b))a.extend(!0,n,b);else{if(c===d)return n[b];n[b]=c}},debug:function(){o.debug&&(o.performance?n.performance.log(arguments):(n.debug=Function.prototype.bind.call(console.info,console,o.name+":"),n.debug.apply(console,arguments)))},verbose:function(){o.verbose&&o.debug&&(o.performance?n.performance.log(arguments):(n.verbose=Function.prototype.bind.call(console.info,console,o.name+":"),n.verbose.apply(console,arguments)))},error:function(){n.error=Function.prototype.bind.call(console.error,console,o.name+":"),n.error.apply(console,arguments)},performance:{log:function(a){var b,c,d;o.performance&&(b=(new Date).getTime(),d=g||b,c=b-d,g=b,h.push({Name:a[0],Arguments:[].slice.call(a,1)||"",Element:x,"Execution Time":c})),clearTimeout(n.performance.timer),n.performance.timer=setTimeout(n.performance.display,100)},display:function(){var b=o.name+":",c=0;g=!1,clearTimeout(n.performance.timer),a.each(h,function(a,b){c+=b["Execution Time"]}),b+=" "+c+"ms",u&&(b+=" '"+u+"'"),f.size()>1&&(b+=" ("+f.size()+")"),(console.group!==d||console.table!==d)&&h.length>0&&(console.groupCollapsed(b),console.table?console.table(h):a.each(h,function(a,b){console.log(b.Name+": "+b["Execution Time"]+"ms")}),console.groupEnd()),h=[]}},invoke:function(b,c,f){var g,h,i,j=y;return c=c||k,f=x||f,"string"==typeof b&&j!==d&&(b=b.split(/[\. ]/),g=b.length-1,a.each(b,function(c,e){var f=c!=g?e+b[c+1].charAt(0).toUpperCase()+b[c+1].slice(1):b;if(a.isPlainObject(j[f])&&c!=g)j=j[f];else{if(j[f]!==d)return h=j[f],!1;if(!a.isPlainObject(j[e])||c==g)return j[e]!==d?(h=j[e],!1):!1;j=j[e]}})),a.isFunction(h)?i=h.apply(f,c):h!==d&&(i=h),a.isArray(e)?e.push(i):e!==d?e=[e,i]:i!==d&&(e=i),h}},n.preinitialize(),j?(y===d&&n.initialize(),n.invoke(i)):(y!==d&&n.destroy(),n.initialize())}),e!==d?e:this},a.fn.dimmer.settings={name:"Dimmer",namespace:"dimmer",debug:!1,verbose:!0,performance:!0,transition:"fade",useCSS:!0,on:!1,closable:!0,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 a("
").attr("class","ui dimmer")}},className:{active:"active",dimmable:"dimmable",dimmed:"dimmed",disabled:"disabled",pageDimmer:"page",hide:"hide",show:"show",transition:"transition"}}}(jQuery,window,document),function(a,b,c,d){"use strict";a.fn.dropdown=function(b){var e,f=a(this),g=a(c),h=f.selector||"",i="ontouchstart"in c.documentElement,j=(new Date).getTime(),k=[],l=arguments[0],m="string"==typeof l,n=[].slice.call(arguments,1);return f.each(function(){var c,o,p=a.isPlainObject(b)?a.extend(!0,{},a.fn.dropdown.settings,b):a.extend({},a.fn.dropdown.settings),q=p.className,r=p.metadata,s=p.namespace,t=p.selector,u=p.error,v="."+s,w="module-"+s,x=a(this),y=x.find(t.text),z=x.find(t.search),A=x.find(t.input),B=x.prev().find(t.text).size()>0?x.prev().find(t.text):x.prev(),C=x.children(t.menu),D=C.find(t.item),E=!1,F=this,G=x.data(w);o={initialize:function(){o.debug("Initializing dropdown",p),o.setup.layout(),o.save.defaults(),o.set.selected(),i&&o.bind.touchEvents(),o.observeChanges(),o.bind.mouseEvents(),o.bind.keyboardEvents(),o.instantiate()},instantiate:function(){o.verbose("Storing instance of dropdown",o),G=o,x.data(w,o)},destroy:function(){o.verbose("Destroying previous dropdown for",x),x.off(v).removeData(w)},observeChanges:function(){MutationObserver!==d&&(c=new MutationObserver(function(){o.debug("DOM tree modified, updating selector cache"),o.refresh()}),c.observe(F,{childList:!0,subtree:!0}),o.debug("Setting up mutation observer",c))},setup:{layout:function(){x.is("select")&&o.setup.select(),o.is.search()&&!o.is.searchable()&&(z=a("").addClass(q.search).insertBefore(y)),p.allowTab&&(o.is.searchable()?(o.debug("Searchable dropdown initialized"),z.val("").attr("tabindex",0),C.attr("tabindex","-1")):(o.debug("Simple selection dropdown initialized"),x.attr("tabindex")||(x.attr("tabindex",0),C.attr("tabindex","-1"))))},select:function(){var b=o.get.selectValues();o.debug("Dropdown initialized on a select",b),A=x,A.parents(t.dropdown).size()>0?(o.debug("Creating dropdown menu only from template"),x=A.closest(t.dropdown),0===x.find("."+q.dropdown).size()&&a("
").addClass(q.menu).html(p.templates.menu(b)).appendTo(x)):(o.debug("Creating entire dropdown from template"),x=a("
").attr("class",A.attr("class")).addClass(q.selection).addClass(q.dropdown).html(p.templates.dropdown(b)).insertBefore(A),A.removeAttr("class").prependTo(x)),o.refresh()}},refresh:function(){y=x.find(t.text),z=x.find(t.search),A=x.find(t.input),C=x.children(t.menu),D=C.find(t.item)},bind:{keyboardEvents:function(){o.debug("Binding keyboard events"),x.on("keydown"+v,o.event.keydown),o.is.searchable()&&x.on(o.get.inputEvent(),t.search,o.event.input),o.is.searchSelection()?x.on("focus"+v,t.search,o.event.searchFocus).on("blur"+v,t.search,o.event.blur):x.on("mousedown",o.event.mousedown).on("mouseup",o.event.mouseup).on("focus"+v,o.event.focus).on("blur"+v,o.event.blur)},touchEvents:function(){o.debug("Touch device detected binding touch events"),o.is.searchSelection()||x.on("touchstart"+v,o.event.test.toggle),x.on("touchstart"+v,t.item,o.event.item.mouseenter).on("touchstart"+v,t.item,o.event.item.click)},mouseEvents:function(){o.verbose("Mouse detected binding mouse events"),o.is.searchSelection()||("click"==p.on?x.on("click"+v,o.event.test.toggle):"hover"==p.on?x.on("mouseenter"+v,o.delay.show).on("mouseleave"+v,o.delay.hide):x.on(p.on+v,o.toggle)),x.on("mouseenter"+v,t.item,o.event.item.mouseenter).on("mouseleave"+v,t.item,o.event.item.mouseleave).on("click"+v,t.item,o.event.item.click)},intent:function(){o.verbose("Binding hide intent event to document"),i&&g.on("touchstart"+v,o.event.test.touch).on("touchmove"+v,o.event.test.touch),g.on("click"+v,o.event.test.hide)}},unbind:{intent:function(){o.verbose("Removing hide intent event from document"),i&&g.off("touchstart"+v).off("touchmove"+v),g.off("click"+v)}},filter:function(b){var c,e=a(),f=new RegExp("(?:s|^)"+b,"i"),g=new RegExp(b,"i");D.each(function(){var b=a(this),c=b.data(r.text)!==d?b.data(r.text):p.preserveHTML?b.html():b.text(),h=b.data(r.value)!==d?b.data(r.value):"string"==typeof c?c.toLowerCase():c;f.test(c)||f.test(h)?e=e.add(b):p.fullTextSearch&&(g.test(c)||g.test(h))&&(e=e.add(b))}),c=D.not(e),D.removeClass(q.filtered).removeClass(q.selected),c.addClass(q.filtered),D.not("."+q.filtered).eq(0).addClass(q.selected)},event:{mousedown:function(){E=!0},mouseup:function(){E=!1},focus:function(){E||o.show()},searchFocus:function(){E=!0,o.show()},blur:function(){E||o.hide()},input:function(){var a=z.val();y.addClass(q.filtered),o.filter(a)},keydown:function(b){var c,d=D.not(q.filtered).filter("."+q.selected).eq(0),e=D.not("."+q.filtered),f=b.which,g={enter:13,escape:27,upArrow:38,downArrow:40},h=q.selected,i=e.index(d),j=d.size()>0;if(j||(d=D.filter("."+q.active).eq(0),j=d.size()>0),f==g.escape&&(o.verbose("Escape key pressed, closing dropdown"),z.blur(),o.hide()),o.is.visible()){if(f==g.enter&&j)return o.verbose("Enter key pressed, choosing selected item"),o.is.searchable()&&(o.verbose("Removing focus from search input"),z.blur()),a.proxy(o.event.item.click,d)(b),b.preventDefault(),!1;f==g.upArrow?(c=j?d.prevAll(t.item+":not(."+q.filtered+")").eq(0):e.eq(0),0!==i&&(o.verbose("Up key pressed, changing active item"),D.removeClass(h),c.addClass(h),o.set.scrollPosition(c)),b.preventDefault()):f==g.downArrow&&(c=j?d.nextAll(t.item+":not(."+q.filtered+")").eq(0):e.eq(0),i+10&&(clearTimeout(o.itemTimer),o.itemTimer=setTimeout(function(){o.animate.hide(!1,d),o.verbose("Showing sub-menu",c),o.animate.show(!1,c)},2*p.delay.show),b.preventDefault())},mouseleave:function(){var b=a(this).find(t.menu);b.size()>0&&(clearTimeout(o.itemTimer),o.itemTimer=setTimeout(function(){o.verbose("Hiding sub-menu",b),o.animate.hide(!1,b)},p.delay.hide))},click:function(b){var c=a(this),e=c.data(r.text)!==d?c.data(r.text):p.preserveHTML?c.html():c.text(),f=c.data(r.value)!==d?c.data(r.value):"string"==typeof e?e.toLowerCase():e,g=function(){z.val(""),o.determine.selectAction(e,f),a.proxy(p.onChange,F)(f,e,c)},h=c.find(t.menu).size()>0;h||("touchstart"==b.type?c.one("click",g):g())}},resetStyle:function(){a(this).removeAttr("style")}},determine:{selectAction:function(b,c){o.verbose("Determining action",p.action),a.isFunction(o.action[p.action])?(o.verbose("Triggering preset action",p.action,b,c),o.action[p.action](b,c)):a.isFunction(p.action)?(o.verbose("Triggering user action",p.action,b,c),p.action(b,c)):o.error(u.action,p.action)},eventInModule:function(b,c){return c=c||function(){},0===a(b.target).closest(x).size()?(o.verbose("Triggering event",c),c(),!0):(o.verbose("Event occurred in dropdown, canceling callback"),!1)},eventInMenu:function(b,c){return c=c||function(){},0===a(b.target).closest(C).size()?(o.verbose("Triggering event",c),c(),!0):(o.verbose("Event occurred in dropdown menu, canceling callback"),!1)}},action:{nothing:function(){},hide:function(){o.hide()},select:function(a,b){b=b!==d?b:a,o.set.selected(b),o.set.value(b),o.hide()},activate:function(a,b){b=b!==d?b:a,o.set.selected(b),o.set.value(b),o.hide()},combo:function(a,b){b=b!==d?b:a,o.set.selected(b),o.set.value(b),o.hide()}},get:{text:function(){return y.text()},value:function(){return A.size()>0?A.val():x.data(r.value)},inputEvent:function(){var a=z[0];return a?a.oninput!==d?"input":a.onpropertychange!==d?"propertychange":"keyup":!1},selectValues:function(){var b={values:{}};return x.find("option").each(function(){var c=a(this).html(),e=a(this).attr("value")!==d?a(this).attr("value"):c;""===e?b.placeholder=c:b.values[e]=c}),o.debug("Retrieved values from select",b),b},item:function(b,c){var e=!1;return b=b!==d?b:o.get.value()!==d?o.get.value():o.get.text(),c=""===b||0===b?!0:c||!1,b!==d?D.each(function(){var f=a(this),g=f.data(r.text)!==d?f.data(r.text):p.preserveHTML?f.html():f.text(),h=f.data(r.value)!==d?f.data(r.value):"string"==typeof g?g.toLowerCase():g;c?(o.debug("Ambiguous dropdown value using strict type check",b),h===b?e=a(this):e||g!==b||(e=a(this))):h==b?(o.verbose("Found select item by value",h,b),e=a(this)):e||g!=b||(o.verbose("Found select item by text",g,b),e=a(this))}):b=o.get.text(),e||!1}},restore:{defaults:function(){o.restore.defaultText(),o.restore.defaultValue()},defaultText:function(){var a=x.data(r.defaultText);o.debug("Restoring default text",a),o.set.text(a)},defaultValue:function(){var a=x.data(r.defaultValue);a!==d&&(o.debug("Restoring default value",a),o.set.selected(a),o.set.value(a))}},save:{defaults:function(){o.save.defaultText(),o.save.defaultValue()},defaultValue:function(){x.data(r.defaultValue,o.get.value())},defaultText:function(){x.data(r.defaultText,y.text())}},set:{scrollPosition:function(a){var b,c,d,e,f,g,h,i,a=a||o.get.item(),j=a&&a.size()>0,k=5;a&&j&&(g=C.height(),c=a.height(),f=C.scrollTop(),e=C.offset().top,d=a.offset().top,b=f-e+d,i=b+k>f+g,h=f>b-k,(h||i)&&(o.debug("Scrolling to active item"),C.scrollTop(b)))},text:function(a){"combo"==p.action?(o.debug("Changing combo button text",a,B),p.preserveHTML?B.html(a):B.text(a)):"select"!==p.action&&(o.debug("Changing text",a,y),y.removeClass(q.filtered).removeClass(q.placeholder),p.preserveHTML?y.html(a):y.text(a))},value:function(a){o.debug("Adding selected value to hidden input",a,A),A.size()>0?A.val(a).trigger("change"):x.data(r.value,a)},active:function(){x.addClass(q.active)},visible:function(){x.addClass(q.visible)},selected:function(a){var b,c=o.get.item(a);c&&(o.debug("Setting selected menu item to",c),b=c.data(r.text)!==d?c.data(r.text):p.preserveHTML?c.html():c.text(),D.removeClass(q.active).removeClass(q.selected),c.addClass(q.active).addClass(q.selected),o.set.text(b))}},remove:{active:function(){x.removeClass(q.active)},visible:function(){x.removeClass(q.visible)}},is:{search:function(){return x.hasClass(q.search)},searchable:function(){return z.size()>0},searchSelection:function(){return o.is.searchable()&&z.parent().is(x)},selection:function(){return x.hasClass(q.selection)},animated:function(a){return a?a.is(":animated")||a.transition&&a.transition("is animating"):C.is(":animated")||C.transition&&C.transition("is animating")},visible:function(a){return a?a.is(":visible"):C.is(":visible")},hidden:function(a){return a?a.is(":hidden"):C.is(":hidden")}},can:{click:function(){return i||"click"==p.on},show:function(){return!x.hasClass(q.disabled)}},animate:{show:function(b,c){var e=c||C;b=b||function(){},o.is.hidden(e)&&(o.verbose("Doing menu show animation",e),"none"==p.transition?a.proxy(b,F)():a.fn.transition!==d&&x.transition("is supported")?e.transition({animation:p.transition+" in",duration:p.duration,queue:!0,complete:function(){a.proxy(b,F)()}}):"slide down"==p.transition?e.hide().clearQueue().children().clearQueue().css("opacity",0).delay(50).animate({opacity:1},p.duration,"easeOutQuad",o.event.resetStyle).end().slideDown(100,"easeOutQuad",function(){a.proxy(o.event.resetStyle,this)(),a.proxy(b,F)()}):"fade"==p.transition?e.hide().clearQueue().fadeIn(p.duration,function(){a.proxy(o.event.resetStyle,this)(),a.proxy(b,F)()}):o.error(u.transition,p.transition))},hide:function(b,c){var e=c||C;b=b||function(){},o.is.visible(e)&&(o.verbose("Doing menu hide animation",e),"none"==p.transition?a.proxy(b,F)():a.fn.transition!==d&&x.transition("is supported")?e.transition({animation:p.transition+" out",duration:p.duration,queue:!0,complete:function(){a.proxy(b,F)()}}):"slide down"==p.transition?e.show().clearQueue().children().clearQueue().css("opacity",1).animate({opacity:0},100,"easeOutQuad",o.event.resetStyle).end().delay(50).slideUp(100,"easeOutQuad",function(){a.proxy(o.event.resetStyle,this)(),a.proxy(b,F)()}):"fade"==p.transition?e.show().clearQueue().fadeOut(150,function(){a.proxy(o.event.resetStyle,this)(),a.proxy(b,F)()}):o.error(u.transition))}},show:function(){o.debug("Checking if dropdown can show"),o.is.hidden()&&(o.hideOthers(),o.set.active(),o.set.scrollPosition(),o.animate.show(function(){o.can.click()&&o.bind.intent(),o.set.visible()}),a.proxy(p.onShow,F)())},hide:function(){!o.is.animated()&&o.is.visible()&&(o.debug("Hiding dropdown"),o.can.click()&&o.unbind.intent(),o.remove.active(),o.animate.hide(function(){D.removeClass(q.filtered),o.remove.visible()}),a.proxy(p.onHide,F)())},delay:{show:function(){o.verbose("Delaying show event to ensure user intent"),clearTimeout(o.timer),o.timer=setTimeout(o.show,p.delay.show)},hide:function(){o.verbose("Delaying hide event to ensure user intent"),clearTimeout(o.timer),o.timer=setTimeout(o.hide,p.delay.hide)}},hideOthers:function(){o.verbose("Finding other dropdowns to hide"),f.not(x).has(t.menu+":visible").dropdown("hide")},toggle:function(){o.verbose("Toggling menu visibility"),o.is.hidden()?o.show():o.hide()},setting:function(b,c){if(o.debug("Changing setting",b,c),a.isPlainObject(b))a.extend(!0,p,b);else{if(c===d)return p[b];p[b]=c}},internal:function(b,c){if(a.isPlainObject(b))a.extend(!0,o,b);else{if(c===d)return o[b];o[b]=c}},debug:function(){p.debug&&(p.performance?o.performance.log(arguments):(o.debug=Function.prototype.bind.call(console.info,console,p.name+":"),o.debug.apply(console,arguments)))},verbose:function(){p.verbose&&p.debug&&(p.performance?o.performance.log(arguments):(o.verbose=Function.prototype.bind.call(console.info,console,p.name+":"),o.verbose.apply(console,arguments)))},error:function(){o.error=Function.prototype.bind.call(console.error,console,p.name+":"),o.error.apply(console,arguments)},performance:{log:function(a){var b,c,d;p.performance&&(b=(new Date).getTime(),d=j||b,c=b-d,j=b,k.push({Name:a[0],Arguments:[].slice.call(a,1)||"",Element:F,"Execution Time":c})),clearTimeout(o.performance.timer),o.performance.timer=setTimeout(o.performance.display,100)},display:function(){var b=p.name+":",c=0;j=!1,clearTimeout(o.performance.timer),a.each(k,function(a,b){c+=b["Execution Time"]}),b+=" "+c+"ms",h&&(b+=" '"+h+"'"),(console.group!==d||console.table!==d)&&k.length>0&&(console.groupCollapsed(b),console.table?console.table(k):a.each(k,function(a,b){console.log(b.Name+": "+b["Execution Time"]+"ms")}),console.groupEnd()),k=[]}},invoke:function(b,c,f){var g,h,i,j=G;return c=c||n,f=F||f,"string"==typeof b&&j!==d&&(b=b.split(/[\. ]/),g=b.length-1,a.each(b,function(c,e){var f=c!=g?e+b[c+1].charAt(0).toUpperCase()+b[c+1].slice(1):b;if(a.isPlainObject(j[f])&&c!=g)j=j[f];else{if(j[f]!==d)return h=j[f],!1;if(!a.isPlainObject(j[e])||c==g)return j[e]!==d?(h=j[e],!1):(o.error(u.method,b),!1);j=j[e]}})),a.isFunction(h)?i=h.apply(f,c):h!==d&&(i=h),a.isArray(e)?e.push(i):e!==d?e=[e,i]:i!==d&&(e=i),h}},m?(G===d&&o.initialize(),o.invoke(l)):(G!==d&&o.destroy(),o.initialize())}),e!==d?e:this},a.fn.dropdown.settings={name:"Dropdown",namespace:"dropdown",debug:!1,verbose:!0,performance:!0,type:!1,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(){},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:"> .search, .menu > .search > input, .menu > input.search",menu:".menu",item:".item"},className:{active:"active",disabled:"disabled",dropdown:"ui dropdown",filtered:"filtered",menu:"menu",placeholder:"default",search:"search",selected:"selected",selection:"selection",visible:"visible"}},a.fn.dropdown.settings.templates={menu:function(b){var c=(b.placeholder||!1,b.values||{},"");return a.each(b.values,function(a,b){c+=a===b?'
'+b+"
":'
'+b+"
"}),c},dropdown:function(b){var c=b.placeholder||!1,d=(b.values||{},"");return d+='',d+=b.placeholder?'
'+c+"
":'
',d+='"}},a.extend(a.easing,{easeOutQuad:function(a,b,c,d,e){return-d*(b/=e)*(b-2)+c}})}(jQuery,window,document),function(a,b,c,d){"use strict";a.fn.modal=function(e){var f,g=a(this),h=a(b),i=a(c),j=a("body"),k=g.selector||"",l=(new Date).getTime(),m=[],n=arguments[0],o="string"==typeof n,p=[].slice.call(arguments,1),q=b.requestAnimationFrame||b.mozRequestAnimationFrame||b.webkitRequestAnimationFrame||b.msRequestAnimationFrame||function(a){setTimeout(a,0)};return g.each(function(){var g,r,s,t,u,v,w=a.isPlainObject(e)?a.extend(!0,{},a.fn.modal.settings,e):a.extend({},a.fn.modal.settings),x=w.selector,y=w.className,z=w.namespace,A=w.error,B="."+z,C="module-"+z,D=a(this),E=a(w.context),F=D.find(x.close),G=this,H=D.data(C);v={initialize:function(){return v.verbose("Initializing dimmer",E),a.fn.dimmer===d?void v.error(A.dimmer):(t=E.dimmer({closable:!1,useCSS:!0,duration:{show:.9*w.duration,hide:1.1*w.duration}}),w.detachable&&t.dimmer("add content",D),u=t.dimmer("get dimmer"),r=D.siblings(x.modal),g=r.add(D),v.verbose("Attaching close events",F),F.on("click"+B,v.event.close),h.on("resize"+B,v.event.resize),void v.instantiate())},instantiate:function(){v.verbose("Storing instance of modal"),H=v,D.data(C,H)},destroy:function(){v.verbose("Destroying previous modal"),D.removeData(C).off(B),F.off(B),E.dimmer("destroy")},refresh:function(){v.remove.scrolling(),v.cacheSizes(),v.set.screenHeight(),v.set.type(),v.set.position()},attachEvents:function(b,c){var d=a(b);c=a.isFunction(v[c])?v[c]:v.toggle,d.size()>0?(v.debug("Attaching modal events to element",b,c),d.off(B).on("click"+B,c)):v.error(A.notFound)},event:{close:function(){v.verbose("Closing element pressed"),a(this).is(x.approve)?a.proxy(w.onApprove,G)()!==!1?v.hide():v.verbose("Approve callback returned false cancelling hide"):a(this).is(x.deny)?a.proxy(w.onDeny,G)()!==!1?v.hide():v.verbose("Deny callback returned false cancelling hide"):v.hide()},click:function(b){0===a(b.target).closest(x.modal).size()&&(v.debug("Dimmer clicked, hiding all modals"),w.allowMultiple?v.hide():v.hideAll(),b.stopImmediatePropagation())},debounce:function(a,b){clearTimeout(v.timer),v.timer=setTimeout(a,b)},keyboard:function(a){var b=a.which,c=27;b==c&&(w.closable?(v.debug("Escape key pressed hiding modal"),v.hide()):v.debug("Escape key pressed, but closable is set to false"),a.preventDefault())},resize:function(){t.dimmer("is active")&&q(v.refresh)}},toggle:function(){v.is.active()||v.is.animating()?v.hide():v.show()},show:function(b){b=a.isFunction(b)?b:function(){},v.showDimmer(),v.showModal(b)},showModal:function(b){b=a.isFunction(b)?b:function(){},v.is.active()?v.debug("Modal is already visible"):(v.cacheSizes(),v.set.position(),v.set.screenHeight(),v.set.type(),r.filter(":visible").size()>0&&!w.allowMultiple?(v.debug("Other modals visible, queueing show animation"),v.hideOthers(v.showModal)):(a.proxy(w.onShow,G)(),w.transition&&a.fn.transition!==d&&D.transition("is supported")?(v.debug("Showing modal with css animations"),D.transition({animation:w.transition+" in",duration:w.duration,complete:function(){a.proxy(w.onVisible,G)(),v.set.active(),b()}})):(v.debug("Showing modal with javascript"),D.fadeIn(w.duration,w.easing,function(){a.proxy(w.onVisible,G)(),v.set.active(),b()}))))},showDimmer:function(){t.dimmer("is active")?v.debug("Dimmer already visible"):(v.debug("Showing dimmer"),t.dimmer("show"))},hide:function(b){b=a.isFunction(b)?b:function(){},g.filter(":visible").size()<=1&&v.hideDimmer(),v.hideModal(b)},hideDimmer:function(){return t.dimmer("is active")||t.dimmer("is animating")?(v.debug("Hiding dimmer"),w.closable&&u.off("click"+B),void t.dimmer("hide",function(){w.transition&&a.fn.transition!==d&&D.transition("is supported")&&v.remove.screenHeight(),v.remove.active()})):void v.debug("Dimmer is not visible cannot hide")},hideModal:function(b){return b=a.isFunction(b)?b:function(){},v.is.active()||v.is.animating()?(v.debug("Hiding modal"),v.remove.keyboardShortcuts(),a.proxy(w.onHide,G)(),void(w.transition&&a.fn.transition!==d&&D.transition("is supported")?D.transition({animation:w.transition+" out",duration:w.duration,complete:function(){a.proxy(w.onHidden,G)(),v.remove.active(),v.restore.focus(),b()}}):D.fadeOut(w.duration,w.easing,function(){a.proxy(w.onHidden,G)(),v.remove.active(),v.restore.focus(),b()}))):void v.debug("Cannot hide modal it is not active")},hideAll:function(b){b=a.isFunction(b)?b:function(){},g.is(":visible")&&(v.debug("Hiding all visible modals"),v.hideDimmer(),g.filter(":visible").modal("hide modal",b))},hideOthers:function(b){b=a.isFunction(b)?b:function(){},r.is(":visible")&&(v.debug("Hiding other modals"),r.filter(":visible").modal("hide modal",b))},add:{keyboardShortcuts:function(){v.verbose("Adding keyboard shortcuts"),i.on("keyup"+B,v.event.keyboard)}},save:{focus:function(){s=a(c.activeElement).blur()}},restore:{focus:function(){s&&s.size()>0&&s.focus()}},remove:{active:function(){D.removeClass(y.active)},screenHeight:function(){v.cache.height>v.cache.pageHeight&&(v.debug("Removing page height"),j.css("height",""))},keyboardShortcuts:function(){v.verbose("Removing keyboard shortcuts"),i.off("keyup"+B)},scrolling:function(){t.removeClass(y.scrolling),D.removeClass(y.scrolling)}},cacheSizes:function(){var d=D.outerHeight();0!==d&&(v.cache={pageHeight:a(c).outerHeight(),height:d+w.offset,contextHeight:"body"==w.context?a(b).height():t.height()}),v.debug("Caching modal and container sizes",v.cache)},can:{fit:function(){return v.cache.heightv.cache.pageHeight&&(v.debug("Modal is taller than page content, resizing page height"),j.css("height",v.cache.height+w.padding))},active:function(){if(v.add.keyboardShortcuts(),v.save.focus(),D.addClass(y.active),w.closable&&u.off("click"+B).on("click"+B,v.event.click),w.autofocus){var a=D.find(":input:visible"),b=a.filter("[autofocus]"),c=b.size()>0?b:a;c.first().focus()}},scrolling:function(){t.addClass(y.scrolling),D.addClass(y.scrolling)},type:function(){v.can.fit()?(v.verbose("Modal fits on screen"),v.remove.scrolling()):(v.verbose("Modal cannot fit on screen setting to scrolling"),v.set.scrolling())},position:function(){v.verbose("Centering modal on page",v.cache),D.css(v.can.fit()?{top:"",marginTop:-(v.cache.height/2)}:{marginTop:"",top:i.scrollTop()})}},setting:function(b,c){if(v.debug("Changing setting",b,c),a.isPlainObject(b))a.extend(!0,w,b);else{if(c===d)return w[b];w[b]=c}},internal:function(b,c){if(a.isPlainObject(b))a.extend(!0,v,b);else{if(c===d)return v[b];v[b]=c}},debug:function(){w.debug&&(w.performance?v.performance.log(arguments):(v.debug=Function.prototype.bind.call(console.info,console,w.name+":"),v.debug.apply(console,arguments)))},verbose:function(){w.verbose&&w.debug&&(w.performance?v.performance.log(arguments):(v.verbose=Function.prototype.bind.call(console.info,console,w.name+":"),v.verbose.apply(console,arguments)))},error:function(){v.error=Function.prototype.bind.call(console.error,console,w.name+":"),v.error.apply(console,arguments)},performance:{log:function(a){var b,c,d;w.performance&&(b=(new Date).getTime(),d=l||b,c=b-d,l=b,m.push({Name:a[0],Arguments:[].slice.call(a,1)||"",Element:G,"Execution Time":c})),clearTimeout(v.performance.timer),v.performance.timer=setTimeout(v.performance.display,100)},display:function(){var b=w.name+":",c=0;l=!1,clearTimeout(v.performance.timer),a.each(m,function(a,b){c+=b["Execution Time"]}),b+=" "+c+"ms",k&&(b+=" '"+k+"'"),(console.group!==d||console.table!==d)&&m.length>0&&(console.groupCollapsed(b),console.table?console.table(m):a.each(m,function(a,b){console.log(b.Name+": "+b["Execution Time"]+"ms")}),console.groupEnd()),m=[]}},invoke:function(b,c,e){var g,h,i,j=H;return c=c||p,e=G||e,"string"==typeof b&&j!==d&&(b=b.split(/[\. ]/),g=b.length-1,a.each(b,function(c,e){var f=c!=g?e+b[c+1].charAt(0).toUpperCase()+b[c+1].slice(1):b;if(a.isPlainObject(j[f])&&c!=g)j=j[f];else{if(j[f]!==d)return h=j[f],!1;if(!a.isPlainObject(j[e])||c==g)return j[e]!==d?(h=j[e],!1):!1;j=j[e]}})),a.isFunction(h)?i=h.apply(e,c):h!==d&&(i=h),a.isArray(f)?f.push(i):f!==d?f=[f,i]:i!==d&&(f=i),h}},o?(H===d&&v.initialize(),v.invoke(n)):(H!==d&&v.destroy(),v.initialize())}),f!==d?f:this},a.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(a,b,c,d){"use strict";a.fn.nag=function(c){var e,f=a(this),g=f.selector||"",h=(new Date).getTime(),i=[],j=arguments[0],k="string"==typeof j,l=[].slice.call(arguments,1);return f.each(function(){{var f,m=a.isPlainObject(c)?a.extend(!0,{},a.fn.nag.settings,c):a.extend({},a.fn.nag.settings),n=(m.className,m.selector),o=m.error,p=m.namespace,q="."+p,r=p+"-module",s=a(this),t=s.find(n.close),u=a(m.context?m.context:"body"),v=this,w=s.data(r);b.requestAnimationFrame||b.mozRequestAnimationFrame||b.webkitRequestAnimationFrame||b.msRequestAnimationFrame||function(a){setTimeout(a,0)}}f={initialize:function(){f.verbose("Initializing element"),s.data(r,f),t.on("click"+q,f.dismiss),m.detachable&&s.parent()[0]!==u[0]&&s.detach().prependTo(u),m.displayTime>0&&setTimeout(f.hide,m.displayTime),f.show()},destroy:function(){f.verbose("Destroying instance"),s.removeData(r).off(q)},show:function(){f.should.show()&&!s.is(":visible")&&(f.debug("Showing nag",m.animation.show),"fade"==m.animation.show?s.fadeIn(m.duration,m.easing):s.slideDown(m.duration,m.easing))},hide:function(){f.debug("Showing nag",m.animation.hide),"fade"==m.animation.show?s.fadeIn(m.duration,m.easing):s.slideUp(m.duration,m.easing)},onHide:function(){f.debug("Removing nag",m.animation.hide),s.remove(),m.onHide&&m.onHide()},dismiss:function(a){m.storageMethod&&f.storage.set(m.key,m.value),f.hide(),a.stopImmediatePropagation(),a.preventDefault()},should:{show:function(){return m.persist?(f.debug("Persistent nag is set, can show nag"),!0):f.storage.get(m.key)!=m.value.toString()?(f.debug("Stored value is not set, can show nag",f.storage.get(m.key)),!0):(f.debug("Stored value is set, cannot show nag",f.storage.get(m.key)),!1)}},get:{storageOptions:function(){var a={};return m.expires&&(a.expires=m.expires),m.domain&&(a.domain=m.domain),m.path&&(a.path=m.path),a}},clear:function(){f.storage.remove(m.key)},storage:{set:function(c,e){var g=f.get.storageOptions();if("localstorage"==m.storageMethod&&b.localStorage!==d)b.localStorage.setItem(c,e),f.debug("Value stored using local storage",c,e);else{if(a.cookie===d)return void f.error(o.noCookieStorage);a.cookie(c,e,g),f.debug("Value stored using cookie",c,e,g)}},get:function(c){var e;return"localstorage"==m.storageMethod&&b.localStorage!==d?e=b.localStorage.getItem(c):a.cookie!==d?e=a.cookie(c):f.error(o.noCookieStorage),("undefined"==e||"null"==e||e===d||null===e)&&(e=d),e},remove:function(c){var e=f.get.storageOptions();"local"==m.storageMethod&&b.store!==d?b.localStorage.removeItem(c):a.cookie!==d?a.removeCookie(c,e):f.error(o.noStorage)}},setting:function(b,c){if(f.debug("Changing setting",b,c),a.isPlainObject(b))a.extend(!0,m,b);else{if(c===d)return m[b];m[b]=c}},internal:function(b,c){if(a.isPlainObject(b))a.extend(!0,f,b);else{if(c===d)return f[b];f[b]=c}},debug:function(){m.debug&&(m.performance?f.performance.log(arguments):(f.debug=Function.prototype.bind.call(console.info,console,m.name+":"),f.debug.apply(console,arguments)))},verbose:function(){m.verbose&&m.debug&&(m.performance?f.performance.log(arguments):(f.verbose=Function.prototype.bind.call(console.info,console,m.name+":"),f.verbose.apply(console,arguments)))},error:function(){f.error=Function.prototype.bind.call(console.error,console,m.name+":"),f.error.apply(console,arguments)},performance:{log:function(a){var b,c,d;m.performance&&(b=(new Date).getTime(),d=h||b,c=b-d,h=b,i.push({Name:a[0],Arguments:[].slice.call(a,1)||"",Element:v,"Execution Time":c})),clearTimeout(f.performance.timer),f.performance.timer=setTimeout(f.performance.display,100)},display:function(){var b=m.name+":",c=0;h=!1,clearTimeout(f.performance.timer),a.each(i,function(a,b){c+=b["Execution Time"]}),b+=" "+c+"ms",g&&(b+=" '"+g+"'"),(console.group!==d||console.table!==d)&&i.length>0&&(console.groupCollapsed(b),console.table?console.table(i):a.each(i,function(a,b){console.log(b.Name+": "+b["Execution Time"]+"ms")}),console.groupEnd()),i=[]}},invoke:function(b,c,g){var h,i,j,k=w;return c=c||l,g=v||g,"string"==typeof b&&k!==d&&(b=b.split(/[\. ]/),h=b.length-1,a.each(b,function(c,e){var g=c!=h?e+b[c+1].charAt(0).toUpperCase()+b[c+1].slice(1):b;if(a.isPlainObject(k[g])&&c!=h)k=k[g];else{if(k[g]!==d)return i=k[g],!1;if(!a.isPlainObject(k[e])||c==h)return k[e]!==d?(i=k[e],!1):(f.error(o.method,b),!1);k=k[e]}})),a.isFunction(i)?j=i.apply(g,c):i!==d&&(j=i),a.isArray(e)?e.push(j):e!==d?e=[e,j]:j!==d&&(e=j),i}},k?(w===d&&f.initialize(),f.invoke(j)):(w!==d&&f.destroy(),f.initialize())}),e!==d?e:this},a.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(a){"function"==typeof define&&define.amd?define(["jquery"],a):a("object"==typeof exports?require("jquery"):jQuery)}(function(a){function b(a){return h.raw?a:encodeURIComponent(a)}function c(a){return h.raw?a:decodeURIComponent(a)}function d(a){return b(h.json?JSON.stringify(a):String(a))}function e(a){0===a.indexOf('"')&&(a=a.slice(1,-1).replace(/\\"/g,'"').replace(/\\\\/g,"\\"));try{return a=decodeURIComponent(a.replace(g," ")),h.json?JSON.parse(a):a}catch(b){}}function f(b,c){var d=h.raw?b:e(b);return a.isFunction(c)?c(d):d}var g=/\+/g,h=a.cookie=function(e,g,i){if(void 0!==g&&!a.isFunction(g)){if(i=a.extend({},h.defaults,i),"number"==typeof i.expires){var j=i.expires,k=i.expires=new Date;k.setTime(+k+864e5*j)}return document.cookie=[b(e),"=",d(g),i.expires?"; expires="+i.expires.toUTCString():"",i.path?"; path="+i.path:"",i.domain?"; domain="+i.domain:"",i.secure?"; secure":""].join("")}for(var l=e?void 0:{},m=document.cookie?document.cookie.split("; "):[],n=0,o=m.length;o>n;n++){var p=m[n].split("="),q=c(p.shift()),r=p.join("=");if(e&&e===q){l=f(r,g);break}e||void 0===(r=f(r))||(l[q]=r)}return l};h.defaults={},a.removeCookie=function(b,c){return void 0===a.cookie(b)?!1:(a.cookie(b,"",a.extend({},c,{expires:-1})),!a.cookie(b))}}),function(a,b,c,d){"use strict";a.fn.popup=function(e){var f,g=a(this),h=a(c),i=g.selector||"",j=("ontouchstart"in c.documentElement,(new Date).getTime()),k=[],l=arguments[0],m="string"==typeof l,n=[].slice.call(arguments,1);return g.each(function(){var c,g,o,p=a.isPlainObject(e)?a.extend(!0,{},a.fn.popup.settings,e):a.extend({},a.fn.popup.settings),q=p.selector,r=p.className,s=p.error,t=p.metadata,u=p.namespace,v="."+p.namespace,w="module-"+u,x=a(this),y=a(p.context),z=p.target?a(p.target):x,A=a(b),B=a("body"),C=0,D=this,E=x.data(w);o={initialize:function(){o.debug("Initializing module",x),o.refresh(),"click"==p.on?x.on("click"+v,o.toggle):o.get.startEvent()&&x.on(o.get.startEvent()+v,o.event.start).on(o.get.endEvent()+v,o.event.end),p.target&&o.debug("Target set to element",z),A.on("resize"+v,o.event.resize),o.exists()?p.hoverable&&o.bind.popup():o.create(),o.instantiate()},instantiate:function(){o.verbose("Storing instance of module",o),E=o,x.data(w,E)},refresh:function(){c=p.popup?a(p.popup):p.inline?z.next(p.selector.popup):!1,g=p.popup?c.offsetParent():p.inline?z.offsetParent():B},destroy:function(){o.debug("Destroying previous module"),c&&!p.preserve&&o.remove(),x.off(v).removeData(w)},event:{start:function(){var b=a.isPlainObject(p.delay)?p.delay.show:p.delay;clearTimeout(o.hideTimer),o.showTimer=setTimeout(function(){!o.is.hidden()||o.is.active()&&o.is.dropdown()||o.show()},b)},end:function(){var b=a.isPlainObject(p.delay)?p.delay.hide:p.delay;clearTimeout(o.showTimer),o.hideTimer=setTimeout(function(){o.is.visible()&&o.hide()},b)},resize:function(){o.is.visible()&&o.set.position()}},create:function(){var b=x.data(t.html)||p.html,e=x.data(t.variation)||p.variation,f=x.data(t.title)||p.title,g=x.data(t.content)||x.attr("title")||p.content;b||g||f?(o.debug("Creating pop-up html"),b||(b=p.templates.popup({title:f,content:g})),c=a("
").addClass(r.popup).addClass(e).html(b),e&&c.addClass(e),p.inline?(o.verbose("Inserting popup element inline",c),c.insertAfter(x)):(o.verbose("Appending popup element to body",c),c.appendTo(y)),p.hoverable&&o.cache===d&&o.bind.popup(),a.proxy(p.onCreate,c)()):0!==z.next(p.selector.popup).size()?(o.verbose("Pre-existing popup found, reverting to inline"),p.inline=!0,o.refresh()):o.debug("No content specified skipping display",D)},toggle:function(){o.debug("Toggling pop-up"),o.is.hidden()?(o.debug("Popup is hidden, showing pop-up"),o.unbind.close(),o.hideAll(),o.show()):(o.debug("Popup is visible, hiding pop-up"),o.hide())},show:function(a){a=a||function(){},o.debug("Showing pop-up",p.transition),p.preserve||p.popup||o.refresh(),o.exists()||o.create(),c&&o.set.position()&&(o.save.conditions(),o.animate.show(a))},hide:function(a){a=a||function(){},x.removeClass(r.visible),o.unbind.close(),o.is.visible()&&(o.restore.conditions(),o.animate.hide(a))},hideAll:function(){a(q.popup).filter(":visible").popup("hide")},hideGracefully:function(b){b&&0===a(b.target).closest(q.popup).size()?(o.debug("Click occurred outside popup hiding popup"),o.hide()):o.debug("Click was inside popup, keeping popup open")},exists:function(){return c?p.inline||p.popup?0!==c.size():c.closest(y).size():!1},remove:function(){o.debug("Removing popup"),c.remove()},save:{conditions:function(){o.cache={title:x.attr("title")},o.cache.title&&x.removeAttr("title"),o.verbose("Saving original attributes",o.cache.title)}},restore:{conditions:function(){return o.cache&&o.cache.title&&(x.attr("title",o.cache.title),o.verbose("Restoring original attributes",o.cache.title)),!0}},animate:{show:function(b){b=b||function(){},x.addClass(r.visible),p.transition&&a.fn.transition!==d&&x.transition("is supported")?c.transition({animation:p.transition+" in",duration:p.duration,complete:function(){o.bind.close(),a.proxy(b,D)()}}):c.stop().fadeIn(p.duration,p.easing,function(){o.bind.close(),a.proxy(b,D)()}),a.proxy(p.onShow,D)()},hide:function(b){b=b||function(){},o.debug("Hiding pop-up"),p.transition&&a.fn.transition!==d&&x.transition("is supported")?c.transition({animation:p.transition+" out",duration:p.duration,complete:function(){o.reset(),b()}}):c.stop().fadeOut(p.duration,p.easing,function(){o.reset(),b()}),a.proxy(p.onHide,D)()}},get:{startEvent:function(){return"hover"==p.on?"mouseenter":"focus"==p.on?"focus":!1},endEvent:function(){return"hover"==p.on?"mouseleave":"focus"==p.on?"blur":!1},offstagePosition:function(){var d={top:a(b).scrollTop(),bottom:a(b).scrollTop()+a(b).height(),left:0,right:a(b).width()},e={width:c.width(),height:c.outerHeight(),offset:c.offset()},f={},g=[];return e.offset&&(f={top:e.offset.topd.bottom,right:e.offset.left+e.width>d.right,left:e.offset.left0?g.join(" "):!1},nextPosition:function(a){switch(a){case"top left":a="bottom left";break;case"bottom left":a="top right";break;case"top right":a="bottom right";break;case"bottom right":a="top center";break;case"top center":a="bottom center";break;case"bottom center":a="right center";break;case"right center":a="left center";break;case"left center":a="top center"}return a}},set:{position:function(e,f){var h,i,j=(a(b).width(),a(b).height(),z.outerWidth()),k=z.outerHeight(),l=c.outerWidth(),m=c.outerHeight(),n=g.outerWidth(),q=g.outerHeight(),u=p.distanceAway,v=z[0],w=p.inline?parseInt(b.getComputedStyle(v).getPropertyValue("margin-top"),10):0,y=p.inline?parseInt(b.getComputedStyle(v).getPropertyValue("margin-left"),10):0,A=p.inline||p.popup?z.position():z.offset();switch(e=e||x.data(t.position)||p.position,f=f||x.data(t.offset)||p.offset,p.inline&&(o.debug("Adding targets margin to calculation"),"left center"==e||"right center"==e?(f+=w,u+=-y):"top left"==e||"top center"==e||"top right"==e?(f+=y,u-=w):(f+=y,u+=w)),o.debug("Calculating popup positioning",e),e){case"top left":h={top:"auto",bottom:q-A.top+u,left:A.left+f,right:"auto"};break;case"top center":h={bottom:q-A.top+u,left:A.left+j/2-l/2+f,top:"auto",right:"auto"};break;case"top right":h={bottom:q-A.top+u,right:n-A.left-j-f,top:"auto",left:"auto"};break;case"left center":h={top:A.top+k/2-m/2+f,right:n-A.left+u,left:"auto",bottom:"auto"};break;case"right center":h={top:A.top+k/2-m/2+f,left:A.left+j+u,bottom:"auto",right:"auto"};break;case"bottom left":h={top:A.top+k+u,left:A.left+f,bottom:"auto",right:"auto"};break;case"bottom center":h={top:A.top+k+u,left:A.left+j/2-l/2+f,bottom:"auto",right:"auto"};break;case"bottom right":h={top:A.top+k+u,right:n-A.left-j-f,left:"auto",bottom:"auto"}}return h===d&&o.error(s.invalidPosition),c.css(h).removeClass(r.position).addClass(e).addClass(r.loading),i=o.get.offstagePosition(),i?(o.debug("Element is outside boundaries",i),C0&&(console.groupCollapsed(b),console.table?console.table(k):a.each(k,function(a,b){console.log(b.Name+": "+b["Execution Time"]+"ms")}),console.groupEnd()),k=[]}},invoke:function(b,c,e){var g,h,i,j=E;return c=c||n,e=D||e,"string"==typeof b&&j!==d&&(b=b.split(/[\. ]/),g=b.length-1,a.each(b,function(c,e){var f=c!=g?e+b[c+1].charAt(0).toUpperCase()+b[c+1].slice(1):b;if(a.isPlainObject(j[f])&&c!=g)j=j[f];else{if(j[f]!==d)return h=j[f],!1;if(!a.isPlainObject(j[e])||c==g)return j[e]!==d?(h=j[e],!1):!1;j=j[e]}})),a.isFunction(h)?i=h.apply(e,c):h!==d&&(i=h),a.isArray(f)?f.push(i):f!==d?f=[f,i]:i!==d&&(f=i),h}},m?(E===d&&o.initialize(),o.invoke(l)):(E!==d&&o.destroy(),o.initialize())}),f!==d?f:this},a.fn.popup.settings={name:"Popup",debug:!1,verbose:!1,performance:!1,namespace:"popup",onCreate:function(){},onRemove:function(){},onShow:function(){},onHide:function(){},variation:"",content:!1,html:!1,title:!1,on:"hover",closable:!0,context:"body",position:"top left",delay:{show:50,hide:0},target:!1,popup:!1,inline:!1,preserve:!0,hoverable:!1,duration:200,easing:"easeOutQuint",transition:"scale",distanceAway:0,offset:0,maxSearchDepth:10,error:{invalidPosition:"The position you specified is not a valid position",method:"The method you called is not defined.",recursion:"Popup attempted to reposition element to fit, but could not find an adequate position."},metadata:{content:"content",html:"html",offset:"offset",position:"position",title:"title",variation:"variation"},className:{active:"active",animating:"animating",dropdown:"dropdown",loading:"loading",popup:"ui popup",position:"top left center bottom right",visible:"visible"},selector:{popup:".ui.popup"},templates:{escape:function(a){var b=/[&<>"'`]/g,c=/[&<>"'`]/,d={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},e=function(a){return d[a]};return c.test(a)?a.replace(b,e):a},popup:function(b){var c="",e=a.fn.popup.settings.templates.escape;return typeof b!==d&&(typeof b.title!==d&&b.title&&(b.title=e(b.title),c+='
'+b.title+"
"),typeof b.content!==d&&b.content&&(b.content=e(b.content),c+='
'+b.content+"
")),c}}},a.extend(a.easing,{easeOutQuad:function(a,b,c,d,e){return-d*(b/=e)*(b-2)+c}})}(jQuery,window,document),function(a,b,c,d){"use strict";a.fn.progress=function(b){var e,f=a(this),g=f.selector||"",h=("ontouchstart"in c.documentElement,(new Date).getTime()),i=[],j=arguments[0],k="string"==typeof j,l=[].slice.call(arguments,1);return f.each(function(){var c,f=a.isPlainObject(b)?a.extend(!0,{},a.fn.progress.settings,b):a.extend({},a.fn.progress.settings),m=f.className,n=f.metadata,o=f.namespace,p=f.selector,q=f.error,r="module-"+o,s=a(this),t=a(this).find(p.bar),u=a(this).find(p.progress),v=a(this).find(p.label),w=this,x=s.data(r);c={initialize:function(){c.debug("Initializing progress",f),c.read.metadata(),c.set.initials(),c.instantiate()},instantiate:function(){c.verbose("Storing instance of progress",c),x=c,s.data(r,c)},destroy:function(){c.verbose("Destroying previous dropdown for",s),s.removeData(r),x=d},reset:function(){c.set.percent(0)},complete:function(){(c.percent===d||c.percent<100)&&c.set.percent(100)},read:{metadata:function(){s.data(n.percent)&&(c.verbose("Current percent value set from metadata"),c.percent=s.data(n.percent)),s.data(n.total)&&(c.verbose("Total value set from metadata"),c.total=s.data(n.total)),s.data(n.value)&&(c.verbose("Current value set from metadata"),c.value=s.data(n.value))},currentValue:function(){return c.value!==d?c.value:!1}},increment:function(a){var b,d,e,f=c.total||!1;f?(d=c.value||0,a=a||1,e=d+a,b=c.total,c.debug("Incrementing value by",a,d,b),e>b&&(c.debug("Value cannot increment above total",b),e=b),c.set.progress(e)):(d=c.percent||0,a=a||c.get.randomValue(),e=d+a,b=100,c.debug("Incrementing percentage by",a,d),e>b&&(c.debug("Value cannot increment above 100 percent"),e=b),c.set.progress(e))},decrement:function(a){var b,d,e=c.total||!1,f=0;e?(b=c.value||0,a=a||1,d=b-a,c.debug("Decrementing value by",a,b)):(b=c.percent||0,a=a||c.get.randomValue(),d=b-a,c.debug("Decrementing percentage by",a,b)),f>d&&(c.debug("Value cannot decrement below 0"),d=0),c.set.progress(d)},get:{text:function(a){var b=c.value||0,d=c.total||0,e=c.percent||0;return a=a||"",a=a.replace("{value}",b).replace("{total}",d).replace("{percent}",e),c.debug("Adding variables to progress bar text",a),a},randomValue:function(){return c.debug("Generating random increment percentage"),Math.floor(Math.random()*f.random.max+f.random.min)},percent:function(){return c.percent||0},value:function(){return c.value||!1},total:function(){return c.total||!1}},is:{success:function(){return s.hasClass(m.success)},warning:function(){return s.hasClass(m.warning)},error:function(){return s.hasClass(m.error)}},remove:{active:function(){c.verbose("Removing active state"),s.removeClass(m.active)},success:function(){c.verbose("Removing success state"),s.removeClass(m.success)},warning:function(){c.verbose("Removing warning state"),s.removeClass(m.warning)},error:function(){c.verbose("Removing error state"),s.removeClass(m.error)}},set:{barWidth:function(a){a>100&&c.error(q.tooHigh,a),t.css("width",a+"%")},initials:function(){f.value&&(c.verbose("Current value set in settings",f.value),c.value=f.value),f.total&&(c.verbose("Current total set in settings",f.total),c.total=f.total),f.percent&&(c.verbose("Current percent set in settings",f.percent),c.percent=f.percent),c.percent?c.set.percent(c.percent):c.value&&c.set.progress(c.value)},percent:function(b){b="string"==typeof b?+b.replace("%",""):b,b>0&&1>b&&(c.verbose("Module percentage passed as decimal, converting"),b=100*b),b=Math.round(0===f.precision?b:10*b*f.precision/(10*f.precision)),c.percent=b,c.total&&(c.value=Math.round(b/100*c.total)),c.set.barWidth(b),c.set.barLabel(),100===b?!f.autoSuccess||c.is.warning()||c.is.error()?c.remove.active():(c.set.success(),c.debug("Automatically triggering success at 100%")):c.set.active(),a.proxy(f.onChange,w)(b,c.value,c.total)},label:function(a){a=a||"",a&&(a=c.get.text(a),c.debug("Setting label to text",a),v.text(a))},barLabel:function(a){a!==d?u.text(c.get.text(a)):"ratio"==f.label&&c.total?(c.debug("Adding ratio to bar label"),u.text(c.get.text(f.text.ratio))):"percent"==f.label&&(c.debug("Adding percentage to bar label"),u.text(c.get.text(f.text.percent)))},active:function(a){a=a||f.text.active,c.debug("Setting active state"),f.showActivity&&s.addClass(m.active),c.remove.warning(),c.remove.error(),c.remove.success(),a&&c.set.label(a)},success:function(a){a=a||f.text.success,c.debug("Setting success state"),s.addClass(m.success),c.remove.active(),c.remove.warning(),c.remove.error(),c.complete(),a&&c.set.label(a)},warning:function(a){a=a||f.text.warning,c.debug("Setting warning state"),s.addClass(m.warning),c.remove.active(),c.remove.success(),c.remove.error(),c.complete(),a&&c.set.label(a)},error:function(a){a=a||f.text.error,c.debug("Setting error state"),s.addClass(m.error),c.remove.active(),c.remove.success(),c.remove.warning(),c.complete(),a&&c.set.label(a)},total:function(a){c.total=a},progress:function(a){var b,d="string"==typeof a?""!==a.replace(/[^\d.]/g,"")?+a.replace(/[^\d.]/g,""):!1:a;d||c.error(q.nonNumeric),c.total?(c.value=d,b=d/c.total*100,c.debug("Calculating percent complete from total",b),c.set.percent(b)):(b=d,c.debug("Setting value to exact percentage value",b),c.set.percent(b)) }},setting:function(b,e){if(c.debug("Changing setting",b,e),a.isPlainObject(b))a.extend(!0,f,b);else{if(e===d)return f[b];f[b]=e}},internal:function(b,e){if(a.isPlainObject(b))a.extend(!0,c,b);else{if(e===d)return c[b];c[b]=e}},debug:function(){f.debug&&(f.performance?c.performance.log(arguments):(c.debug=Function.prototype.bind.call(console.info,console,f.name+":"),c.debug.apply(console,arguments)))},verbose:function(){f.verbose&&f.debug&&(f.performance?c.performance.log(arguments):(c.verbose=Function.prototype.bind.call(console.info,console,f.name+":"),c.verbose.apply(console,arguments)))},error:function(){c.error=Function.prototype.bind.call(console.error,console,f.name+":"),c.error.apply(console,arguments)},performance:{log:function(a){var b,d,e;f.performance&&(b=(new Date).getTime(),e=h||b,d=b-e,h=b,i.push({Name:a[0],Arguments:[].slice.call(a,1)||"",Element:w,"Execution Time":d})),clearTimeout(c.performance.timer),c.performance.timer=setTimeout(c.performance.display,100)},display:function(){var b=f.name+":",e=0;h=!1,clearTimeout(c.performance.timer),a.each(i,function(a,b){e+=b["Execution Time"]}),b+=" "+e+"ms",g&&(b+=" '"+g+"'"),(console.group!==d||console.table!==d)&&i.length>0&&(console.groupCollapsed(b),console.table?console.table(i):a.each(i,function(a,b){console.log(b.Name+": "+b["Execution Time"]+"ms")}),console.groupEnd()),i=[]}},invoke:function(b,f,g){var h,i,j,k=x;return f=f||l,g=w||g,"string"==typeof b&&k!==d&&(b=b.split(/[\. ]/),h=b.length-1,a.each(b,function(e,f){var g=e!=h?f+b[e+1].charAt(0).toUpperCase()+b[e+1].slice(1):b;if(a.isPlainObject(k[g])&&e!=h)k=k[g];else{if(k[g]!==d)return i=k[g],!1;if(!a.isPlainObject(k[f])||e==h)return k[f]!==d?(i=k[f],!1):(c.error(q.method,b),!1);k=k[f]}})),a.isFunction(i)?j=i.apply(g,f):i!==d&&(j=i),a.isArray(e)?e.push(j):e!==d?e=[e,j]:j!==d&&(e=j),i}},k?(x===d&&c.initialize(),c.invoke(j)):(x!==d&&c.destroy(),c.initialize())}),e!==d?e:this},a.fn.progress.settings={name:"Progress",namespace:"progress",debug:!1,verbose:!0,performance:!0,random:{min:2,max:5},autoSuccess:!0,showActivity:!0,label:"percent",precision:1,percent:!1,total:!1,value:!1,onChange:function(){},error:{method:"The method you called is not defined.",nonNumeric:"Progress value is non numeric"},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(a,b,c,d){"use strict";a.fn.rating=function(b){var c,e=a(this),f=e.selector||"",g=(new Date).getTime(),h=[],i=arguments[0],j="string"==typeof i,k=[].slice.call(arguments,1);return e.each(function(){var l,m=a.isPlainObject(b)?a.extend(!0,{},a.fn.rating.settings,b):a.extend({},a.fn.rating.settings),n=m.namespace,o=m.className,p=m.metadata,q=m.selector,r=(m.error,"."+n),s="module-"+n,t=this,u=a(this).data(s),v=a(this),w=v.find(q.icon);l={initialize:function(){l.verbose("Initializing rating module",m),0===w.size()&&l.setup.layout(),m.interactive?l.enable():l.disable(),m.initialRating&&(l.debug("Setting initial rating"),l.setRating(m.initialRating)),v.data(p.rating)&&(l.debug("Rating found in metadata"),l.setRating(v.data(p.rating))),l.instantiate()},instantiate:function(){l.verbose("Instantiating module",m),u=l,v.data(s,l)},destroy:function(){l.verbose("Destroying previous instance",u),v.removeData(s),w.off(r)},refresh:function(){w=v.find(q.icon)},setup:{layout:function(){var b=v.data(p.maxRating)||m.maxRating;l.debug("Generating icon html dynamically"),v.html(a.fn.rating.settings.templates.icon(b)),l.refresh()}},event:{mouseenter:function(){var b=a(this);b.nextAll().removeClass(o.selected),v.addClass(o.selected),b.addClass(o.selected).prevAll().addClass(o.selected)},mouseleave:function(){v.removeClass(o.selected),w.removeClass(o.selected)},click:function(){var b=a(this),c=l.getRating(),d=w.index(b)+1,e="auto"==m.clearable?1===w.size():m.clearable;e&&c==d?l.clearRating():l.setRating(d)}},clearRating:function(){l.debug("Clearing current rating"),l.setRating(0)},getRating:function(){var a=w.filter("."+o.active).size();return l.verbose("Current rating retrieved",a),a},enable:function(){l.debug("Setting rating to interactive mode"),w.on("mouseenter"+r,l.event.mouseenter).on("mouseleave"+r,l.event.mouseleave).on("click"+r,l.event.click),v.removeClass(o.disabled)},disable:function(){l.debug("Setting rating to read-only mode"),w.off(r),v.addClass(o.disabled)},setRating:function(b){var c=b-1>=0?b-1:0,d=w.eq(c);v.removeClass(o.selected),w.removeClass(o.selected).removeClass(o.active),b>0&&(l.verbose("Setting current rating to",b),d.prevAll().andSelf().addClass(o.active)),a.proxy(m.onRate,t)(b)},setting:function(b,c){if(l.debug("Changing setting",b,c),a.isPlainObject(b))a.extend(!0,m,b);else{if(c===d)return m[b];m[b]=c}},internal:function(b,c){if(a.isPlainObject(b))a.extend(!0,l,b);else{if(c===d)return l[b];l[b]=c}},debug:function(){m.debug&&(m.performance?l.performance.log(arguments):(l.debug=Function.prototype.bind.call(console.info,console,m.name+":"),l.debug.apply(console,arguments)))},verbose:function(){m.verbose&&m.debug&&(m.performance?l.performance.log(arguments):(l.verbose=Function.prototype.bind.call(console.info,console,m.name+":"),l.verbose.apply(console,arguments)))},error:function(){l.error=Function.prototype.bind.call(console.error,console,m.name+":"),l.error.apply(console,arguments)},performance:{log:function(a){var b,c,d;m.performance&&(b=(new Date).getTime(),d=g||b,c=b-d,g=b,h.push({Name:a[0],Arguments:[].slice.call(a,1)||"",Element:t,"Execution Time":c})),clearTimeout(l.performance.timer),l.performance.timer=setTimeout(l.performance.display,100)},display:function(){var b=m.name+":",c=0;g=!1,clearTimeout(l.performance.timer),a.each(h,function(a,b){c+=b["Execution Time"]}),b+=" "+c+"ms",f&&(b+=" '"+f+"'"),e.size()>1&&(b+=" ("+e.size()+")"),(console.group!==d||console.table!==d)&&h.length>0&&(console.groupCollapsed(b),console.table?console.table(h):a.each(h,function(a,b){console.log(b.Name+": "+b["Execution Time"]+"ms")}),console.groupEnd()),h=[]}},invoke:function(b,e,f){var g,h,i,j=u;return e=e||k,f=t||f,"string"==typeof b&&j!==d&&(b=b.split(/[\. ]/),g=b.length-1,a.each(b,function(c,e){var f=c!=g?e+b[c+1].charAt(0).toUpperCase()+b[c+1].slice(1):b;if(a.isPlainObject(j[f])&&c!=g)j=j[f];else{if(j[f]!==d)return h=j[f],!1;if(!a.isPlainObject(j[e])||c==g)return j[e]!==d?(h=j[e],!1):!1;j=j[e]}})),a.isFunction(h)?i=h.apply(f,e):h!==d&&(i=h),a.isArray(c)?c.push(i):c!==d?c=[c,i]:i!==d&&(c=i),h}},j?(u===d&&l.initialize(),l.invoke(i)):(u!==d&&l.destroy(),l.initialize())}),c!==d?c:this},a.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(a){for(var b=1,c="";a>=b;)c+='',b++;return c}}}}(jQuery,window,document),function(a,b,c,d){"use strict";a.fn.search=function(c){var e,f=a(this),g=f.selector||"",h=(new Date).getTime(),i=[],j=arguments[0],k="string"==typeof j,l=[].slice.call(arguments,1);return a(this).each(function(){var m,n=a.extend(!0,{},a.fn.search.settings,c),o=n.className,p=n.selector,q=n.error,r=n.namespace,s="."+r,t=r+"-module",u=a(this),v=u.find(p.prompt),w=u.find(p.searchButton),x=u.find(p.results),y=(u.find(p.result),u.find(p.category),this),z=u.data(t);m={initialize:function(){m.verbose("Initializing module");var a=v[0],b=a!==d&&a.oninput!==d?"input":a!==d&&a.onpropertychange!==d?"propertychange":"keyup";v.on("focus"+s,m.event.focus).on("blur"+s,m.event.blur).on("keydown"+s,m.handleKeyboard),n.automatic&&v.on(b+s,m.search.throttle),w.on("click"+s,m.search.query),x.on("click"+s,p.result,m.results.select),m.instantiate()},instantiate:function(){m.verbose("Storing instance of module",m),z=m,u.data(t,m)},destroy:function(){m.verbose("Destroying instance"),u.removeData(t),v.off(s),w.off(s),x.off(s)},event:{focus:function(){u.addClass(o.focus),clearTimeout(m.timer),m.search.throttle(),m.results.show()},blur:function(){m.search.cancel(),u.removeClass(o.focus),m.timer=setTimeout(m.results.hide,n.hideDelay)}},handleKeyboard:function(b){var c,d=u.find(p.result),e=u.find(p.category),f=b.which,g={backspace:8,enter:13,escape:27,upArrow:38,downArrow:40},h=o.active,i=d.index(d.filter("."+h)),j=d.size();if(f==g.escape&&(m.verbose("Escape key pressed, blurring search field"),v.trigger("blur")),x.filter(":visible").size()>0)if(f==g.enter){if(m.verbose("Enter key pressed, selecting active result"),d.filter("."+h).size()>0)return a.proxy(m.results.select,d.filter("."+h))(b),b.preventDefault(),!1}else f==g.upArrow?(m.verbose("Up key pressed, changing active result"),c=0>i-1?i:i-1,e.removeClass(h),d.removeClass(h).eq(c).addClass(h).closest(e).addClass(h),b.preventDefault()):f==g.downArrow&&(m.verbose("Down key pressed, changing active result"),c=i+1>=j?i:i+1,e.removeClass(h),d.removeClass(h).eq(c).addClass(h).closest(e).addClass(h),b.preventDefault());else f==g.enter&&(m.verbose("Enter key pressed, executing query"),m.search.query(),w.addClass(o.down),v.one("keyup",function(){w.removeClass(o.down)}))},search:{cancel:function(){var a=u.data("xhr")||!1;a&&"resolved"!=a.state()&&(m.debug("Cancelling last search"),a.abort())},throttle:function(){var a=v.val(),b=a.length;clearTimeout(m.timer),b>=n.minCharacters?m.timer=setTimeout(m.search.query,n.searchThrottle):m.results.hide()},query:function(){var b=v.val(),c=m.search.cache.read(b);c?(m.debug("Reading result for '"+b+"' from cache"),m.results.add(c)):(m.debug("Querying for '"+b+"'"),a.isPlainObject(n.source)||a.isArray(n.source)?m.search.local(b):n.apiSettings?m.search.remote(b):a.api!==d&&a.api.settings.api.search!==d?(m.debug("Searching with default search API endpoint"),n.apiSettings={action:"search"},m.search.remote(b)):m.error(q.source),a.proxy(n.onSearchQuery,u)(b))},local:function(b){var c,d=[],e=[],f=a.isArray(n.searchFields)?n.searchFields:[n.searchFields],g=new RegExp("(?:s|^)"+b,"i"),h=new RegExp(b,"i");u.addClass(o.loading),a.each(f,function(b,c){a.each(n.source,function(b,f){var i="string"==typeof f[c],j=-1==a.inArray(f,d)&&-1==a.inArray(f,e);i&&j&&(g.test(f[c])?d.push(f):h.test(f[c])&&e.push(f))})}),c=m.results.generate({results:a.merge(d,e)}),u.removeClass(o.loading),m.search.cache.write(b,c),m.results.add(c)},remote:function(b){var c,d={stateContext:u,urlData:{query:b},onSuccess:function(a){c=m.results.generate(a),m.search.cache.write(b,c),m.results.add(c)},failure:m.error};m.search.cancel(),m.debug("Executing search"),a.extend(!0,d,n.apiSettings),a.api(d)},cache:{read:function(a){var b=u.data("cache");return n.cache&&"object"==typeof b&&b[a]!==d?b[a]:!1},write:function(a,b){var c=u.data("cache")!==d?u.data("cache"):{};c[a]=b,u.data("cache",c)}}},results:{generate:function(b){m.debug("Generating html from response",b);var c=n.templates[n.type],d="";return a.isPlainObject(b.results)&&!a.isEmptyObject(b.results)||a.isArray(b.results)&&b.results.length>0?(n.maxResults>0&&(b.results=a.makeArray(b.results).slice(0,n.maxResults)),a.isFunction(c)?d=c(b):m.error(q.noTemplate,!1)):d=m.message(q.noResults,"empty"),a.proxy(n.onResults,u)(b),d},add:function(b){("default"==n.onResultsAdd||"default"==a.proxy(n.onResultsAdd,x)(b))&&x.html(b),m.results.show()},show:function(){0===x.filter(":visible").size()&&v.filter(":focus").size()>0&&""!==x.html()&&(n.transition&&a.fn.transition!==d&&u.transition("is supported")?(m.debug("Showing results with css animations"),x.transition(n.transition+" in",n.duration)):(m.debug("Showing results with javascript"),x.stop().fadeIn(n.duration,n.easing)),a.proxy(n.onResultsOpen,x)())},hide:function(){x.filter(":visible").size()>0&&(n.transition&&a.fn.transition!==d&&u.transition("is supported")?(m.debug("Hiding results with css animations"),x.transition(n.transition+" out",n.duration)):(m.debug("Hiding results with javascript"),x.stop().fadeIn(n.duration,n.easing)),a.proxy(n.onResultsClose,x)())},select:function(c){m.debug("Search result selected");{var d=a(this),e=d.find(".title");e.html()}if("default"==n.onSelect||"default"==a.proxy(n.onSelect,this)(c)){var f=d.find("a[href]").eq(0),g=f.attr("href")||!1,h=f.attr("target")||!1;m.results.hide(),g&&("_blank"==h||c.ctrlKey?b.open(g):b.location.href=g)}}},message:function(a,b){return b=b||"standard",m.results.add(n.templates.message(a,b)),n.templates.message(a,b)},setting:function(b,c){if(a.isPlainObject(b))a.extend(!0,n,b);else{if(c===d)return n[b];n[b]=c}},internal:function(b,c){if(a.isPlainObject(b))a.extend(!0,m,b);else{if(c===d)return m[b];m[b]=c}},debug:function(){n.debug&&(n.performance?m.performance.log(arguments):(m.debug=Function.prototype.bind.call(console.info,console,n.name+":"),m.debug.apply(console,arguments)))},verbose:function(){n.verbose&&n.debug&&(n.performance?m.performance.log(arguments):(m.verbose=Function.prototype.bind.call(console.info,console,n.name+":"),m.verbose.apply(console,arguments)))},error:function(){m.error=Function.prototype.bind.call(console.error,console,n.name+":"),m.error.apply(console,arguments)},performance:{log:function(a){var b,c,d;n.performance&&(b=(new Date).getTime(),d=h||b,c=b-d,h=b,i.push({Name:a[0],Arguments:[].slice.call(a,1)||"",Element:y,"Execution Time":c})),clearTimeout(m.performance.timer),m.performance.timer=setTimeout(m.performance.display,100)},display:function(){var b=n.name+":",c=0;h=!1,clearTimeout(m.performance.timer),a.each(i,function(a,b){c+=b["Execution Time"]}),b+=" "+c+"ms",g&&(b+=" '"+g+"'"),f.size()>1&&(b+=" ("+f.size()+")"),(console.group!==d||console.table!==d)&&i.length>0&&(console.groupCollapsed(b),console.table?console.table(i):a.each(i,function(a,b){console.log(b.Name+": "+b["Execution Time"]+"ms")}),console.groupEnd()),i=[]}},invoke:function(b,c,f){var g,h,i,j=z;return c=c||l,f=y||f,"string"==typeof b&&j!==d&&(b=b.split(/[\. ]/),g=b.length-1,a.each(b,function(c,e){var f=c!=g?e+b[c+1].charAt(0).toUpperCase()+b[c+1].slice(1):b;if(a.isPlainObject(j[f])&&c!=g)j=j[f];else{if(j[f]!==d)return h=j[f],!1;if(!a.isPlainObject(j[e])||c==g)return j[e]!==d?(h=j[e],!1):!1;j=j[e]}})),a.isFunction(h)?i=h.apply(f,c):h!==d&&(i=h),a.isArray(e)?e.push(i):e!==d?e=[e,i]:i!==d&&(e=i),h}},k?(z===d&&m.initialize(),m.invoke(j)):(z!==d&&m.destroy(),m.initialize())}),e!==d?e:this},a.fn.search.settings={name:"Search Module",namespace:"search",debug:!1,verbose:!0,performance:!0,onSelect:"default",onResultsAdd:"default",onSearchQuery:function(){},onResults:function(){},onResultsOpen:function(){},onResultsClose:function(){},source:!1,automatic:"true",type:"simple",hideDelay:300,minCharacters:3,searchThrottle:300,maxResults:7,cache:!0,searchFields:["title","description"],transition:"scale",duration:300,easing:"easeOutExpo",apiSettings:!1,className:{active:"active",down:"down",focus:"focus",empty:"empty",loading:"loading"},error:{source:"No source or api action specified",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"},templates:{escape:function(a){var b=/[&<>"'`]/g,c=/[&<>"'`]/,d={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},e=function(a){return d[a]};return c.test(a)?a.replace(b,e):a},message:function(a,b){var c="";return a!==d&&b!==d&&(c+='
',c+="empty"==b?'
No Results
'+a+'
':'
'+a+"
",c+="
"),c},categories:function(b){var c="",e=a.fn.search.settings.templates.escape;return b.results!==d?(a.each(b.results,function(b,f){f.results!==d&&f.results.length>0&&(c+='
'+f.name+"
",a.each(f.results,function(a,b){c+='
',c+='',b.image!==d&&(b.image=e(b.image),c+='
'),c+='
',b.price!==d&&(b.price=e(b.price),c+='
'+b.price+"
"),b.title!==d&&(b.title=e(b.title),c+='
'+b.title+"
"),b.description!==d&&(c+='
'+b.description+"
"),c+="
"}),c+="
")}),b.resultPage&&(c+=''+b.resultPage.text+""),c):!1},simple:function(b){var c="";return b.results!==d?(a.each(b.results,function(a,b){c+='',b.image!==d&&(c+='
'),c+='
',b.price!==d&&(c+='
'+b.price+"
"),b.title!==d&&(c+='
'+b.title+"
"),b.description!==d&&(c+='
'+b.description+"
"),c+="
"}),b.resultPage&&(c+=''+b.resultPage.text+""),c):!1}}}}(jQuery,window,document),function(a,b,c,d){"use strict";a.fn.shape=function(e){var f,g=a(this),h=a("body"),i=(new Date).getTime(),j=[],k=arguments[0],l="string"==typeof k,m=[].slice.call(arguments,1),n=b.requestAnimationFrame||b.mozRequestAnimationFrame||b.webkitRequestAnimationFrame||b.msRequestAnimationFrame||function(a){setTimeout(a,0)};return g.each(function(){var b,o,p,q=g.selector||"",r=a.extend(!0,{},a.fn.shape.settings,e),s=r.namespace,t=r.selector,u=r.error,v=r.className,w="."+s,x="module-"+s,y=a(this),z=y.find(t.sides),A=y.find(t.side),B=!1,C=this,D=y.data(x);p={initialize:function(){p.verbose("Initializing module for",C),p.set.defaultSide(),p.instantiate()},instantiate:function(){p.verbose("Storing instance of module",p),D=p,y.data(x,D)},destroy:function(){p.verbose("Destroying previous module for",C),y.removeData(x).off(w)},refresh:function(){p.verbose("Refreshing selector cache for",C),y=a(C),z=a(this).find(t.shape),A=a(this).find(t.side)},repaint:function(){p.verbose("Forcing repaint event");{var a=z.get(0)||c.createElement("div");a.offsetWidth}},animate:function(c,e){p.verbose("Animating box with properties",c),e=e||function(a){p.verbose("Executing animation callback"),a!==d&&a.stopPropagation(),p.reset(),p.set.active()},a.proxy(r.beforeChange,o[0])(),p.get.transitionEvent()?(p.verbose("Starting CSS animation"),y.addClass(v.animating),z.css(c).one(p.get.transitionEvent(),e),p.set.duration(r.duration),n(function(){y.addClass(v.animating),b.addClass(v.hidden)})):e()},queue:function(a){p.debug("Queueing animation of",a),z.one(p.get.transitionEvent(),function(){p.debug("Executing queued animation"),setTimeout(function(){y.shape(a)},0)})},reset:function(){p.verbose("Animating states reset"),y.removeClass(v.animating).attr("style","").removeAttr("style"),z.attr("style","").removeAttr("style"),A.attr("style","").removeAttr("style").removeClass(v.hidden),o.removeClass(v.animating).attr("style","").removeAttr("style")},is:{animating:function(){return y.hasClass(v.animating)}},set:{defaultSide:function(){b=y.find("."+r.className.active),o=b.next(t.side).size()>0?b.next(t.side):y.find(t.side).first(),B=!1,p.verbose("Active side set to",b),p.verbose("Next side set to",o)},duration:function(a){a=a||r.duration,a="number"==typeof a?a+"ms":a,p.verbose("Setting animation duration",a),z.add(A).css({"-webkit-transition-duration":a,"-moz-transition-duration":a,"-ms-transition-duration":a,"-o-transition-duration":a,"transition-duration":a})},stageSize:function(){var a=y.clone().addClass(v.loading),b=a.find("."+r.className.active),c=B?a.find(B):b.next(t.side).size()>0?b.next(t.side):a.find(t.side).first(),d={};b.removeClass(v.active),c.addClass(v.active),a.prependTo(h),d={width:c.outerWidth(),height:c.outerHeight()},a.remove(),y.css(d),p.verbose("Resizing stage to fit new content",d)},nextSide:function(a){B=a,o=y.find(a),0===o.size()&&p.error(u.side),p.verbose("Next side manually set to",o)},active:function(){p.verbose("Setting new side to active",o),A.removeClass(v.active),o.addClass(v.active),a.proxy(r.onChange,o[0])(),p.set.defaultSide()}},flip:{up:function(){p.debug("Flipping up",o),p.is.animating()?p.queue("flip up"):(p.set.stageSize(),p.stage.above(),p.animate(p.get.transform.up()))},down:function(){p.debug("Flipping down",o),p.is.animating()?p.queue("flip down"):(p.set.stageSize(),p.stage.below(),p.animate(p.get.transform.down()))},left:function(){p.debug("Flipping left",o),p.is.animating()?p.queue("flip left"):(p.set.stageSize(),p.stage.left(),p.animate(p.get.transform.left()))},right:function(){p.debug("Flipping right",o),p.is.animating()?p.queue("flip right"):(p.set.stageSize(),p.stage.right(),p.animate(p.get.transform.right()))},over:function(){p.debug("Flipping over",o),p.is.animating()?p.queue("flip over"):(p.set.stageSize(),p.stage.behind(),p.animate(p.get.transform.over()))},back:function(){p.debug("Flipping back",o),p.is.animating()?p.queue("flip back"):(p.set.stageSize(),p.stage.behind(),p.animate(p.get.transform.back()))}},get:{transform:{up:function(){var a={y:-((b.outerHeight()-o.outerHeight())/2),z:-(b.outerHeight()/2)};return{transform:"translateY("+a.y+"px) translateZ("+a.z+"px) rotateX(-90deg)"}},down:function(){var a={y:-((b.outerHeight()-o.outerHeight())/2),z:-(b.outerHeight()/2)};return{transform:"translateY("+a.y+"px) translateZ("+a.z+"px) rotateX(90deg)"}},left:function(){var a={x:-((b.outerWidth()-o.outerWidth())/2),z:-(b.outerWidth()/2)};return{transform:"translateX("+a.x+"px) translateZ("+a.z+"px) rotateY(90deg)"}},right:function(){var a={x:-((b.outerWidth()-o.outerWidth())/2),z:-(b.outerWidth()/2)};return{transform:"translateX("+a.x+"px) translateZ("+a.z+"px) rotateY(-90deg)"}},over:function(){var a={x:-((b.outerWidth()-o.outerWidth())/2)};return{transform:"translateX("+a.x+"px) rotateY(180deg)"}},back:function(){var a={x:-((b.outerWidth()-o.outerWidth())/2)};return{transform:"translateX("+a.x+"px) rotateY(-180deg)"}}},transitionEvent:function(){var a,b=c.createElement("element"),e={transition:"transitionend",OTransition:"oTransitionEnd",MozTransition:"transitionend",WebkitTransition:"webkitTransitionEnd"};for(a in e)if(b.style[a]!==d)return e[a]},nextSide:function(){return b.next(t.side).size()>0?b.next(t.side):y.find(t.side).first()}},stage:{above:function(){var a={origin:(b.outerHeight()-o.outerHeight())/2,depth:{active:o.outerHeight()/2,next:b.outerHeight()/2}};p.verbose("Setting the initial animation position as above",o,a),b.css({transform:"rotateY(0deg) translateZ("+a.depth.active+"px)"}),o.addClass(v.animating).css({display:"block",top:a.origin+"px",transform:"rotateX(90deg) translateZ("+a.depth.next+"px)"})},below:function(){var a={origin:(b.outerHeight()-o.outerHeight())/2,depth:{active:o.outerHeight()/2,next:b.outerHeight()/2}};p.verbose("Setting the initial animation position as below",o,a),b.css({transform:"rotateY(0deg) translateZ("+a.depth.active+"px)"}),o.addClass(v.animating).css({display:"block",top:a.origin+"px",transform:"rotateX(-90deg) translateZ("+a.depth.next+"px)"})},left:function(){var a={origin:(b.outerWidth()-o.outerWidth())/2,depth:{active:o.outerWidth()/2,next:b.outerWidth()/2}};p.verbose("Setting the initial animation position as left",o,a),b.css({transform:"rotateY(0deg) translateZ("+a.depth.active+"px)"}),o.addClass(v.animating).css({display:"block",left:a.origin+"px",transform:"rotateY(-90deg) translateZ("+a.depth.next+"px)"})},right:function(){var a={origin:(b.outerWidth()-o.outerWidth())/2,depth:{active:o.outerWidth()/2,next:b.outerWidth()/2}};p.verbose("Setting the initial animation position as left",o,a),b.css({transform:"rotateY(0deg) translateZ("+a.depth.active+"px)"}),o.addClass(v.animating).css({display:"block",left:a.origin+"px",transform:"rotateY(90deg) translateZ("+a.depth.next+"px)"})},behind:function(){var a={origin:(b.outerWidth()-o.outerWidth())/2,depth:{active:o.outerWidth()/2,next:b.outerWidth()/2}};p.verbose("Setting the initial animation position as behind",o,a),b.css({transform:"rotateY(0deg)"}),o.addClass(v.animating).css({display:"block",left:a.origin+"px",transform:"rotateY(-180deg)"})}},setting:function(b,c){if(p.debug("Changing setting",b,c),a.isPlainObject(b))a.extend(!0,r,b);else{if(c===d)return r[b];r[b]=c}},internal:function(b,c){if(a.isPlainObject(b))a.extend(!0,p,b);else{if(c===d)return p[b];p[b]=c}},debug:function(){r.debug&&(r.performance?p.performance.log(arguments):(p.debug=Function.prototype.bind.call(console.info,console,r.name+":"),p.debug.apply(console,arguments)))},verbose:function(){r.verbose&&r.debug&&(r.performance?p.performance.log(arguments):(p.verbose=Function.prototype.bind.call(console.info,console,r.name+":"),p.verbose.apply(console,arguments)))},error:function(){p.error=Function.prototype.bind.call(console.error,console,r.name+":"),p.error.apply(console,arguments)},performance:{log:function(a){var b,c,d;r.performance&&(b=(new Date).getTime(),d=i||b,c=b-d,i=b,j.push({Name:a[0],Arguments:[].slice.call(a,1)||"",Element:C,"Execution Time":c})),clearTimeout(p.performance.timer),p.performance.timer=setTimeout(p.performance.display,100)},display:function(){var b=r.name+":",c=0;i=!1,clearTimeout(p.performance.timer),a.each(j,function(a,b){c+=b["Execution Time"]}),b+=" "+c+"ms",q&&(b+=" '"+q+"'"),g.size()>1&&(b+=" ("+g.size()+")"),(console.group!==d||console.table!==d)&&j.length>0&&(console.groupCollapsed(b),console.table?console.table(j):a.each(j,function(a,b){console.log(b.Name+": "+b["Execution Time"]+"ms")}),console.groupEnd()),j=[]}},invoke:function(b,c,e){var g,h,i,j=D;return c=c||m,e=C||e,"string"==typeof b&&j!==d&&(b=b.split(/[\. ]/),g=b.length-1,a.each(b,function(c,e){var f=c!=g?e+b[c+1].charAt(0).toUpperCase()+b[c+1].slice(1):b;if(a.isPlainObject(j[f])&&c!=g)j=j[f];else{if(j[f]!==d)return h=j[f],!1;if(!a.isPlainObject(j[e])||c==g)return j[e]!==d?(h=j[e],!1):!1;j=j[e]}})),a.isFunction(h)?i=h.apply(e,c):h!==d&&(i=h),a.isArray(f)?f.push(i):f!==d?f=[f,i]:i!==d&&(f=i),h}},l?(D===d&&p.initialize(),p.invoke(k)):(D!==d&&p.destroy(),p.initialize())}),f!==d?f:this},a.fn.shape.settings={name:"Shape",debug:!1,verbose:!0,performance:!0,namespace:"shape",beforeChange:function(){},onChange:function(){},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(a,b,c,d){"use strict";a.fn.sidebar=function(e){var f,g=a(this),h=(a("head"),g.selector||""),i=(new Date).getTime(),j=[],k=arguments[0],l="string"==typeof k,m=[].slice.call(arguments,1),n=b.requestAnimationFrame||b.mozRequestAnimationFrame||b.webkitRequestAnimationFrame||b.msRequestAnimationFrame||function(a){setTimeout(a,0)};return g.each(function(){var g,o,p,q=a.isPlainObject(e)?a.extend(!0,{},a.fn.sidebar.settings,e):a.extend({},a.fn.sidebar.settings),r=q.selector,s=q.className,t=q.namespace,u=q.error,v="."+t,w="module-"+t,x=a(this),y=a(q.context),z=a("style[title="+t+"]"),A=y.children(r.sidebar),B=y.children(r.pusher),C=B.children(r.page),D=B.find(r.fixed),E=this,F=x.data(w);p={initialize:function(){p.debug("Initializing sidebar",x),o=p.get.transitionEvent(),p.is.legacy()&&(q.useLegacy=!0),p.setup.context(),n(p.setup.layout),p.instantiate()},instantiate:function(){p.verbose("Storing instance of module",p),F=p,x.data(w,p)},destroy:function(){p.verbose("Destroying previous module for",x),x.off(v).removeData(w)},event:{clickaway:function(b){0===x.find(b.target).size()&&0===a(b.target).filter(x).size()&&(p.verbose("User clicked on dimmed page"),p.hide())},scroll:function(b){0===x.find(b.target).size()&&0===a(b.target).filter(x).size()&&b.preventDefault()}},bind:{clickaway:function(){q.scrollLock&&a(b).on("DOMMouseScroll"+v,p.event.scroll),y.on("click"+v,p.event.clickaway).on("touchend"+v,p.event.clickaway)}},unbind:{clickaway:function(){y.off(v),q.scrollLock&&a(b).off("DOMMouseScroll"+v)}},refresh:function(){p.verbose("Refreshing selector cache"),y=a(q.context),z=a("style[title="+t+"]"),A=y.children(r.sidebar),B=y.children(r.pusher),C=B.children(r.page),D=B.find(r.fixed)},repaint:function(){p.verbose("Forcing repaint event");y[0].offsetWidth},setup:{layout:function(){0===y.find(r.pusher).size()&&(p.debug("Adding wrapper element for sidebar"),B=a('
'),C=a('
'),B.append(C),y.children().not(r.omitted).not(A).wrapAll(B)),x.prevAll(C)[0]!==C[0]&&(p.debug("Moved sidebar to correct parent element"),x.detach().prependTo(y)),p.refresh()},context:function(){p.verbose("Adding pusshable class to wrapper"),y.addClass(s.pushable)}},attachEvents:function(b,c){var d=a(b);c=a.isFunction(p[c])?p[c]:p.toggle,d.size()>0?(p.debug("Attaching sidebar events to element",b,c),d.on("click"+v,c)):p.error(u.notFound)},show:function(b){var c=q.useLegacy?p.legacyPushPage:p.pushPage;b=a.isFunction(b)?b:function(){},p.is.closed()||p.is.outward()?(q.overlay&&(p.error(u.overlay),q.transition="overlay"),"overlay"!==q.transition&&p.hideAll(),c(function(){a.proxy(b,E)(),a.proxy(q.onShow,E)()}),a.proxy(q.onChange,E)(),a.proxy(q.onVisible,E)()):p.debug("Sidebar is already visible")},hide:function(b){var c=q.useLegacy?p.legacyPullPage:p.pullPage;b=a.isFunction(b)?b:function(){},(p.is.visible()||p.is.inward())&&(p.debug("Hiding sidebar",b),c(function(){a.proxy(b,E)(),a.proxy(q.onHidden,E)()}),a.proxy(q.onChange,E)(),a.proxy(q.onHide,E)())},hideAll:function(){var a=A.find("."+s.visible);a.sidebar("hide")},toggle:function(){p.verbose("Determining toggled direction"),p.is.closed()||p.is.outward()?p.show():p.hide()},pushPage:function(c){var d,e=p.get.transition(),f="safe"==e?y:"overlay"==e?x:B;c=a.isFunction(c)?c:function(){},d=function(){p.remove.outward(),p.set.visible(),p.set.transition(),p.set.direction(),n(function(){p.set.inward(),p.set.pushed()})},f.off(o+v).on(o+v,function(b){b.target==f[0]&&(f.off(o+v),p.remove.inward(),p.bind.clickaway(),p.set.active(),a.proxy(c,E)())}),p.verbose("Adding context push state",y),"overlay"===e?n(d):(("scale down"==q.transition||p.is.mobile())&&(x.scrollTop(0),g=a(b).scrollTop(),b.scrollTo(0,0)),p.remove.allVisible(),n(d))},pullPage:function(c){var d=p.get.transition(),e="safe"==d?y:"overlay"==d?x:B;c=a.isFunction(c)?c:function(){},p.verbose("Removing context push state",p.get.direction()),p.unbind.clickaway(),e.off(o+v).on(o+v,function(f){f.target==e[0]&&(e.off(o+v),p.remove.transition(),p.remove.direction(),p.remove.outward(),p.remove.visible(),("scale down"==d||q.returnScroll&&"overlay"!==d&&p.is.mobile())&&b.scrollTo(0,g),a.proxy(c,E)())}),n(function(){p.remove.inward(),p.set.outward(),p.remove.active(),p.remove.pushed()})},legacyPushPage:function(b){var c=x.width(),d=p.get.direction(),e={};c=c||x.width(),b=a.isFunction(b)?b:function(){},e[d]=c,p.debug("Using javascript to push context",e),p.set.visible(),p.set.transition(),p.set.direction(),p.set.inward(),p.set.pushed(),y.animate(e,q.duration,q.easing,function(){p.remove.inward(),p.bind.clickaway(),p.set.active(),a.proxy(b,p)()})},legacyPullPage:function(b){var c=0,d=p.get.direction(),e={};c=c||x.width(),b=a.isFunction(b)?b:function(){},e[d]="0px",p.debug("Using javascript to pull context",e),p.unbind.clickaway(),p.set.outward(),p.remove.active(),p.remove.pushed(),y.animate(e,q.duration,q.easing,function(){p.remove.transition(),p.remove.direction(),p.remove.outward(),p.remove.visible(),a.proxy(b,p)()})},set:{active:function(){y.addClass(s.active)},direction:function(a){a=a||p.get.direction(),y.addClass(s[a]) },visible:function(){x.addClass(s.visible)},transition:function(a){a=a||p.get.transition(),y.addClass(a)},inward:function(){y.addClass(s.inward)},outward:function(){y.addClass(s.outward)},pushed:function(){q.dimPage&&C.addClass(s.dimmed),y.addClass(s.pushed)}},remove:{active:function(){y.removeClass(s.active)},visible:function(){x.removeClass(s.visible)},allVisible:function(){A.hasClass(s.visible)&&(p.debug("Other sidebars visible, hiding"),A.removeClass(s.visible))},transition:function(a){a=a||p.get.transition(),y.removeClass(a)},pushed:function(){q.dimPage&&C.removeClass(s.dimmed),y.removeClass(s.pushed)},inward:function(){y.removeClass(s.inward)},outward:function(){y.removeClass(s.outward)},direction:function(a){a=a||p.get.direction(),y.removeClass(s[a])}},get:{direction:function(){return x.hasClass(s.top)?s.top:x.hasClass(s.right)?s.right:x.hasClass(s.bottom)?s.bottom:s.left},transition:function(){var a=p.get.direction();return p.is.mobile()?"auto"==q.mobileTransition?q.defaultTransition.mobile[a]:q.mobileTransition:"auto"==q.transition?q.defaultTransition.computer[a]:q.transition},transitionEvent:function(){var a,b=c.createElement("element"),e={transition:"transitionend",OTransition:"oTransitionEnd",MozTransition:"transitionend",WebkitTransition:"webkitTransitionEnd"};for(a in e)if(b.style[a]!==d)return e[a]}},is:{legacy:function(){var a,e=c.createElement("div"),f={webkitTransform:"-webkit-transform",OTransform:"-o-transform",msTransform:"-ms-transform",MozTransform:"-moz-transform",transform:"transform"};c.body.insertBefore(e,null);for(var g in f)e.style[g]!==d&&(e.style[g]="translate3d(1px,1px,1px)",a=b.getComputedStyle(e).getPropertyValue(f[g]));return c.body.removeChild(e),!(a!==d&&a.length>0&&"none"!==a)},mobile:function(){var a=navigator.userAgent,b=/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/,c=b.test(a);return c?(p.verbose("Browser was found to be mobile",a),!0):(p.verbose("Browser is not mobile, using regular transition",a),!1)},closed:function(){return!p.is.visible()},visible:function(){return x.hasClass(s.visible)},vertical:function(){return x.hasClass(s.top)},inward:function(){return y.hasClass(s.inward)},outward:function(){return y.hasClass(s.outward)},animating:function(){return p.is.inward()||p.is.outward()}},setting:function(b,c){if(p.debug("Changing setting",b,c),a.isPlainObject(b))a.extend(!0,q,b);else{if(c===d)return q[b];q[b]=c}},internal:function(b,c){if(a.isPlainObject(b))a.extend(!0,p,b);else{if(c===d)return p[b];p[b]=c}},debug:function(){q.debug&&(q.performance?p.performance.log(arguments):(p.debug=Function.prototype.bind.call(console.info,console,q.name+":"),p.debug.apply(console,arguments)))},verbose:function(){q.verbose&&q.debug&&(q.performance?p.performance.log(arguments):(p.verbose=Function.prototype.bind.call(console.info,console,q.name+":"),p.verbose.apply(console,arguments)))},error:function(){p.error=Function.prototype.bind.call(console.error,console,q.name+":"),p.error.apply(console,arguments)},performance:{log:function(a){var b,c,d;q.performance&&(b=(new Date).getTime(),d=i||b,c=b-d,i=b,j.push({Name:a[0],Arguments:[].slice.call(a,1)||"",Element:E,"Execution Time":c})),clearTimeout(p.performance.timer),p.performance.timer=setTimeout(p.performance.display,100)},display:function(){var b=q.name+":",c=0;i=!1,clearTimeout(p.performance.timer),a.each(j,function(a,b){c+=b["Execution Time"]}),b+=" "+c+"ms",h&&(b+=" '"+h+"'"),(console.group!==d||console.table!==d)&&j.length>0&&(console.groupCollapsed(b),console.table?console.table(j):a.each(j,function(a,b){console.log(b.Name+": "+b["Execution Time"]+"ms")}),console.groupEnd()),j=[]}},invoke:function(b,c,e){var g,h,i,j=F;return c=c||m,e=E||e,"string"==typeof b&&j!==d&&(b=b.split(/[\. ]/),g=b.length-1,a.each(b,function(c,e){var f=c!=g?e+b[c+1].charAt(0).toUpperCase()+b[c+1].slice(1):b;if(a.isPlainObject(j[f])&&c!=g)j=j[f];else{if(j[f]!==d)return h=j[f],!1;if(!a.isPlainObject(j[e])||c==g)return j[e]!==d?(h=j[e],!1):(p.error(u.method,b),!1);j=j[e]}})),a.isFunction(h)?i=h.apply(e,c):h!==d&&(i=h),a.isArray(f)?f.push(i):f!==d?f=[f,i]:i!==d&&(f=i),h}},l?(F===d&&p.initialize(),p.invoke(k)):(F!==d&&p.destroy(),p.initialize())}),f!==d?f:this},a.fn.sidebar.settings={name:"Sidebar",namespace:"sidebar",debug:!1,verbose:!1,performance:!1,workaround:!1,transition:"auto",mobileTransition:"auto",defaultTransition:{computer:{left:"uncover",right:"uncover",top:"overlay",bottom:"overlay"},mobile:{left:"overlay",right:"overlay",top:"overlay",bottom:"overlay"}},context:"body",exclusive:!0,dimPage:!0,scrollLock:!1,returnScroll:!0,useLegacy:!1,duration:500,easing:"easeInOutQuint",onChange:function(){},onShow:function(){},onHide:function(){},onHidden:function(){},onVisible:function(){},className:{active:"active",bottom:"bottom",dimmed:"dimmed",inward:"show",left:"left",outward:"hide",pushable:"pushable",pushed:"pushed",right:"right",top:"top",visible:"visible"},selector:{fixed:".ui.fixed",omitted:"script, link, style, .ui.modal, .ui.dimmer, .ui.nag, .ui.fixed",page:".page",pusher:".pusher",sidebar:".ui.sidebar"},error:{method:"The method you called is not defined.",overlay:"The overlay setting is no longer supported, use animation: overlay",notFound:"There were no elements that matched the specified selector"}},a.extend(a.easing,{easeInOutQuint:function(a,b,c,d,e){return(b/=e/2)<1?d/2*b*b*b*b*b+c:d/2*((b-=2)*b*b*b*b+2)+c}})}(jQuery,window,document),function(a,b,c,d){"use strict";a.fn.sticky=function(c){var e,f=a(this),g=f.selector||"",h=(new Date).getTime(),i=[],j=arguments[0],k="string"==typeof j,l=[].slice.call(arguments,1);return f.each(function(){var f,m,n,o=a.extend(!0,{},a.fn.sticky.settings,c),p=o.className,q=o.namespace,r=o.error,s="."+q,t="module-"+q,u=a(this),v=a(b),w=u.offsetParent(),x=a(o.scrollContext),y=(u.selector||"",u.data(t)),z=b.requestAnimationFrame||b.mozRequestAnimationFrame||b.webkitRequestAnimationFrame||b.msRequestAnimationFrame||function(a){setTimeout(a,0)},A=this;n={initialize:function(){return f=o.context?a(o.context):w,0===f.size()?void n.error(r.invalidContext,o.context,u):(n.verbose("Initializing sticky",o,w),n.save.positions(),n.is.hidden()&&n.error(r.visible,u),n.cache.element.height>n.cache.context.height?(n.reset(),void n.error(r.elementSize,u)):(v.on("resize"+s,n.event.resize),x.on("scroll"+s,n.event.scroll),n.observeChanges(),void n.instantiate()))},instantiate:function(){n.verbose("Storing instance of module",n),y=n,u.data(t,n)},destroy:function(){n.verbose("Destroying previous module"),n.reset(),v.off("resize"+s,n.event.resize),x.off("scroll"+s,n.event.scroll),u.removeData(t)},observeChanges:function(){var a=f[0];MutationObserver!==d&&(m=new MutationObserver(function(){clearTimeout(n.timer),n.timer=setTimeout(function(){n.verbose("DOM tree modified, updating sticky menu"),n.refresh()},200)}),m.observe(A,{childList:!0,subtree:!0}),m.observe(a,{childList:!0,subtree:!0}),n.debug("Setting up mutation observer",m))},event:{resize:function(){z(function(){n.refresh(),n.stick()})},scroll:function(){z(function(){n.stick(),a.proxy(o.onScroll,A)()})}},refresh:function(b){n.reset(),b&&(w=u.offsetParent()),n.save.positions(),n.stick(),a.proxy(o.onReposition,A)()},supports:{sticky:function(){{var b=a("
");b.get()}return b.addClass(p.supported),b.css("position").match("sticky")}},save:{scroll:function(a){n.lastScroll=a},positions:function(){var a={height:v.height()},b={margin:{top:parseInt(u.css("margin-top"),10),bottom:parseInt(u.css("margin-bottom"),10)},offset:u.offset(),width:u.outerWidth(),height:u.outerHeight()},c={offset:f.offset(),height:f.outerHeight()};n.cache={fits:b.heighta&&(b="up")),b},scrollChange:function(a){return a=a||x.scrollTop(),n.lastScroll?a-n.lastScroll:0},currentElementScroll:function(){return n.is.top()?Math.abs(parseInt(u.css("top"),10))||0:Math.abs(parseInt(u.css("bottom"),10))||0},elementScroll:function(a){a=a||x.scrollTop();var b,c=n.cache.element,d=n.cache.window,e=n.get.scrollChange(a),f=c.height-d.height+o.offset,g=n.get.currentElementScroll(),h=g+e;return b=n.cache.fits||0>h?0:h>f?f:h}},remove:{offset:function(){u.css("margin-top","")}},set:{offset:function(){n.verbose("Setting offset on element",o.offset),u.css("margin-top",o.offset)},containerSize:function(){var a=w.get(0).tagName;"HTML"===a||"body"==a?w=u.offsetParent():(n.debug("Settings container size",n.cache.context.height),w.height(n.cache.context.height))},scroll:function(a){n.debug("Setting scroll on element",a),n.is.top()&&u.css("bottom","").css("top",-a),n.is.bottom()&&u.css("top","").css("bottom",a)},size:function(){0!==n.cache.element.height&&0!==n.cache.element.width&&u.css({width:n.cache.element.width,height:n.cache.element.height})}},is:{top:function(){return u.hasClass(p.top)},bottom:function(){return u.hasClass(p.bottom)},initialPosition:function(){return!n.is.fixed()&&!n.is.bound()},hidden:function(){return!u.is(":visible")},bound:function(){return u.hasClass(p.bound)},fixed:function(){return u.hasClass(p.fixed)}},stick:function(){var a=n.cache,b=a.fits,c=a.element,d=a.window,e=a.context,f={top:x.scrollTop()+o.offset,bottom:x.scrollTop()+o.offset+d.height},g=(n.get.direction(f.top),n.get.elementScroll(f.top)),h=!b,i=0!==c.height;n.save.scroll(f.top),i&&(n.is.initialPosition()?f.top>=c.top&&(n.debug("Element passed, fixing element to page"),n.fixTop()):n.is.fixed()?n.is.top()?f.tope.bottom?(n.debug("Fixed element reached bottom of container"),n.bindBottom()):h&&n.set.scroll(g):n.is.bottom()&&(f.bottom-c.heighte.bottom?(n.debug("Bottom fixed rail has reached bottom of container"),n.bindBottom()):h&&n.set.scroll(g)):n.is.bottom()&&n.is.bottom()&&(o.pushing?n.is.bound()&&f.bottom0&&(console.groupCollapsed(b),console.table?console.table(i):a.each(i,function(a,b){console.log(b.Name+": "+b["Execution Time"]+"ms")}),console.groupEnd()),i=[]}},invoke:function(b,c,f){var g,h,i,j=y;return c=c||l,f=A||f,"string"==typeof b&&j!==d&&(b=b.split(/[\. ]/),g=b.length-1,a.each(b,function(c,e){var f=c!=g?e+b[c+1].charAt(0).toUpperCase()+b[c+1].slice(1):b;if(a.isPlainObject(j[f])&&c!=g)j=j[f];else{if(j[f]!==d)return h=j[f],!1;if(!a.isPlainObject(j[e])||c==g)return j[e]!==d?(h=j[e],!1):!1;j=j[e]}})),a.isFunction(h)?i=h.apply(f,c):h!==d&&(i=h),a.isArray(e)?e.push(i):e!==d?e=[e,i]:i!==d&&(e=i),h}},k?(y===d&&n.initialize(),n.invoke(j)):(y!==d&&n.destroy(),n.initialize())}),e!==d?e:this},a.fn.sticky.settings={name:"Sticky",namespace:"sticky",debug:!1,verbose:!1,performance:!1,pushing:!1,context:!1,scrollContext:b,offset: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(a,b,c,d){"use strict";a.tab=a.fn.tab=function(c){var e,f,g=a(a.isFunction(this)?b:this),h=a.isPlainObject(c)?a.extend(!0,{},a.fn.tab.settings,c):a.extend({},a.fn.tab.settings),i=g.selector||"",j=(new Date).getTime(),k=[],l=arguments[0],m="string"==typeof l,n=[].slice.call(arguments,1);return g.each(function(){var c,o,p,q,r=h.className,s=h.metadata,t=h.selector,u=h.error,v="."+h.namespace,w="module-"+h.namespace,x=a(this),y=a(t.tabs),z={},A=!0,B=0,C=this,D=x.data(w);e={initialize:function(){e.debug("Initializing tab menu item",x),h.context&&(e.determineTabs(),e.debug("Using only tabs inside context",h.context,y)),h.auto&&(e.verbose("Setting up automatic tab retrieval from server"),h.apiSettings={url:h.path+"/{$tab}"}),a.isWindow(C)||(e.debug("Attaching tab activation events to element",x),x.on("click"+v,e.event.click)),e.instantiate()},determineTabs:function(){var b;"parent"===h.context?(x.closest("."+r.ui).size()>0?(b=x.closest("."+r.ui),e.verbose("Using closest UI element for determining parent",b)):b=x,c=b.parent(),e.verbose("Determining parent element for creating context",c)):(c=a(h.context),e.verbose("Using selector for tab context",h.context,c)),h.childrenOnly?(y=c.children(t.tabs),e.debug("Searching tab context children for tabs",c,y)):(y=c.find(t.tabs),e.debug("Searching tab context for tabs",c,y))},initializeHistory:function(){if(h.history){if(e.debug("Initializing page state"),a.address===d)return e.error(u.state),!1;if("state"==h.historyType){if(e.debug("Using HTML5 to manage state"),h.path===!1)return e.error(u.path),!1;a.address.history(!0).state(h.path)}a.address.bind("change",e.event.history.change)}},instantiate:function(){e.verbose("Storing instance of module",e),x.data(w,e)},destroy:function(){e.debug("Destroying tabs",x),x.removeData(w).off(v)},event:{click:function(b){var c=a(this).data(s.tab);c!==d?(h.history?(e.verbose("Updating page state",b),a.address.value(c)):(e.verbose("Changing tab",b),e.changeTab(c)),b.preventDefault()):e.debug("No tab specified")},history:{change:function(b){var c=b.pathNames.join("/")||e.get.initialPath(),f=h.templates.determineTitle(c)||!1;e.performance.display(),e.debug("History change event",c,b),q=b,c!==d&&e.changeTab(c),f&&a.address.title(f)}}},refresh:function(){o&&(e.debug("Refreshing tab",o),e.changeTab(o))},cache:{read:function(a){return a!==d?z[a]:!1},add:function(a,b){a=a||o,e.debug("Adding cached content for",a),z[a]=b},remove:function(a){a=a||o,e.debug("Removing cached content for",a),delete z[a]}},set:{state:function(b){a.address.value(b)}},changeTab:function(c){var d=b.history&&b.history.pushState,f=d&&h.ignoreFirstLoad&&A,g=h.auto||a.isPlainObject(h.apiSettings),i=g&&!f?e.utilities.pathToArray(c):e.get.defaultPathArray(c);c=e.utilities.arrayToPath(i),a.each(i,function(b,d){var j,k,l,m,n=i.slice(0,b+1),r=e.utilities.arrayToPath(n),s=e.is.tab(r),t=b+1==i.length,v=e.get.tabElement(r);return e.verbose("Looking for tab",d),s?(e.verbose("Tab was found",d),o=r,p=e.utilities.filterArray(i,n),t?m=!0:(k=i.slice(0,b+2),l=e.utilities.arrayToPath(k),m=!e.is.tab(l),m&&e.verbose("Tab parameters found",k)),m&&g?(f?(e.debug("Ignoring remote content on first tab load",r),A=!1,e.cache.add(c,v.html()),e.activate.all(r),a.proxy(h.onTabInit,v)(r,p,q),a.proxy(h.onTabLoad,v)(r,p,q)):(e.activate.navigation(r),e.content.fetch(r,c)),!1):(e.debug("Opened local tab",r),e.activate.all(r),e.cache.read(r)||(e.cache.add(r,!0),e.debug("First time tab loaded calling tab init"),a.proxy(h.onTabInit,v)(r,p,q)),a.proxy(h.onTabLoad,v)(r,p,q),void 0)):(j=a("#"+c+', a[name="'+c+'"]'),r=j.closest("[data-tab]").data("tab"),v=e.get.tabElement(r),j.size()>0&&r?(e.debug("No tab found, but deep anchor link present, opening parent tab"),e.activate.all(r),e.cache.read(r)||(e.cache.add(r,!0),e.debug("First time tab loaded calling tab init"),a.proxy(h.onTabInit,v)(r,p,q))):e.error(u.missingTab,x,r),!1)})},content:{fetch:function(b,c){var f,g,i=e.get.tabElement(b),j={dataType:"html",stateContext:i,onSuccess:function(d){e.cache.add(c,d),e.content.update(b,d),b==o?(e.debug("Content loaded",b),e.activate.tab(b)):e.debug("Content loaded in background",b),a.proxy(h.onTabInit,i)(b,p,q),a.proxy(h.onTabLoad,i)(b,p,q)},urlData:{tab:c}},k=i.data(s.promise)||!1,l=k&&"pending"===k.state();c=c||b,g=e.cache.read(c),h.cache&&g?(e.debug("Showing existing content",c),e.content.update(b,g),e.activate.tab(b),a.proxy(h.onTabLoad,i)(b,p,q)):l?(e.debug("Content is already loading",c),i.addClass(r.loading)):a.api!==d?(f=a.extend(!0,{headers:{"X-Remote":!0}},h.apiSettings,j),e.debug("Retrieving remote content",c,f),a.api(f)):e.error(u.api)},update:function(a,b){e.debug("Updating html for",a);var c=e.get.tabElement(a);c.html(b)}},activate:{all:function(a){e.activate.tab(a),e.activate.navigation(a)},tab:function(a){var b=e.get.tabElement(a);e.verbose("Showing tab content for",b),b.addClass(r.active).siblings(y).removeClass(r.active+" "+r.loading)},navigation:function(a){var b=e.get.navElement(a);e.verbose("Activating tab navigation for",b,a),b.addClass(r.active).siblings(g).removeClass(r.active+" "+r.loading)}},deactivate:{all:function(){e.deactivate.navigation(),e.deactivate.tabs()},navigation:function(){g.removeClass(r.active)},tabs:function(){y.removeClass(r.active+" "+r.loading)}},is:{tab:function(a){return a!==d?e.get.tabElement(a).size()>0:!1}},get:{initialPath:function(){return g.eq(0).data(s.tab)||y.eq(0).data(s.tab)},path:function(){return a.address.value()},defaultPathArray:function(a){return e.utilities.pathToArray(e.get.defaultPath(a))},defaultPath:function(a){var b=g.filter("[data-"+s.tab+'^="'+a+'/"]').eq(0),c=b.data(s.tab)||!1;if(c){if(e.debug("Found default tab",c),B0?b:c},tab:function(){return o}},utilities:{filterArray:function(b,c){return a.grep(b,function(b){return-1==a.inArray(b,c)})},last:function(b){return a.isArray(b)?b[b.length-1]:!1},pathToArray:function(a){return a===d&&(a=o),"string"==typeof a?a.split("/"):[a]},arrayToPath:function(b){return a.isArray(b)?b.join("/"):!1}},setting:function(b,c){if(e.debug("Changing setting",b,c),a.isPlainObject(b))a.extend(!0,h,b);else{if(c===d)return h[b];h[b]=c}},internal:function(b,c){if(a.isPlainObject(b))a.extend(!0,e,b);else{if(c===d)return e[b];e[b]=c}},debug:function(){h.debug&&(h.performance?e.performance.log(arguments):(e.debug=Function.prototype.bind.call(console.info,console,h.name+":"),e.debug.apply(console,arguments)))},verbose:function(){h.verbose&&h.debug&&(h.performance?e.performance.log(arguments):(e.verbose=Function.prototype.bind.call(console.info,console,h.name+":"),e.verbose.apply(console,arguments)))},error:function(){e.error=Function.prototype.bind.call(console.error,console,h.name+":"),e.error.apply(console,arguments)},performance:{log:function(a){var b,c,d;h.performance&&(b=(new Date).getTime(),d=j||b,c=b-d,j=b,k.push({Name:a[0],Arguments:[].slice.call(a,1)||"",Element:C,"Execution Time":c})),clearTimeout(e.performance.timer),e.performance.timer=setTimeout(e.performance.display,100)},display:function(){var b=h.name+":",c=0;j=!1,clearTimeout(e.performance.timer),a.each(k,function(a,b){c+=b["Execution Time"]}),b+=" "+c+"ms",i&&(b+=" '"+i+"'"),(console.group!==d||console.table!==d)&&k.length>0&&(console.groupCollapsed(b),console.table?console.table(k):a.each(k,function(a,b){console.log(b.Name+": "+b["Execution Time"]+"ms")}),console.groupEnd()),k=[]}},invoke:function(b,c,g){var h,i,j,k=D;return c=c||n,g=C||g,"string"==typeof b&&k!==d&&(b=b.split(/[\. ]/),h=b.length-1,a.each(b,function(c,f){var g=c!=h?f+b[c+1].charAt(0).toUpperCase()+b[c+1].slice(1):b;if(a.isPlainObject(k[g])&&c!=h)k=k[g];else{if(k[g]!==d)return i=k[g],!1;if(!a.isPlainObject(k[f])||c==h)return k[f]!==d?(i=k[f],!1):(e.error(u.method,b),!1);k=k[f]}})),a.isFunction(i)?j=i.apply(g,c):i!==d&&(j=i),a.isArray(f)?f.push(j):f!==d?f=[f,j]:j!==d&&(f=j),i}},m?(D===d&&e.initialize(),e.invoke(l)):(D!==d&&e.destroy(),e.initialize())}),e&&!m&&e.initializeHistory(),f!==d?f:this},a.tab=function(c){a(b).tab(c)},a.fn.tab.settings={name:"Tab",namespace:"tab",debug:!1,verbose:!1,performance:!1,onTabInit:function(){},onTabLoad:function(){},templates:{determineTitle:function(){}},auto:!1,history:!1,historyType:"hash",path:!1,context:!1,childrenOnly:!1,maxDepth:25,ignoreFirstLoad:!1,alwaysRefresh:!1,cache:!0,apiSettings:!1,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:"The state library has not been initialized"},metadata:{tab:"tab",loaded:"loaded",promise:"promise"},className:{loading:"loading",active:"active",ui:"ui"},selector:{tabs:".ui.tab"}}}(jQuery,window,document),function(a,b,c,d){"use strict";a.fn.transition=function(){{var e,f=a(this),g=f.selector||"",h=(new Date).getTime(),i=[],j=arguments,k=j[0],l=[].slice.call(arguments,1),m="string"==typeof k;b.requestAnimationFrame||b.mozRequestAnimationFrame||b.webkitRequestAnimationFrame||b.msRequestAnimationFrame||function(a){setTimeout(a,0)}}return f.each(function(){var b,n,o,p,q,r,s,t,u,v,w,x=a(this),y=this;w={initialize:function(){u="module-"+t,b=w.get.settings.apply(y,j),p=b.className,q=b.metadata,r=w.get.animationEvent(),s=w.get.animationName(),o=b.error,t=b.namespace,v="."+b.namespace,n=x.data(u)||w,m&&(m=w.invoke(k)),m===!1&&(w.verbose("Converted arguments into settings object",b),w.animate(),w.instantiate())},instantiate:function(){w.verbose("Storing instance of module",w),x.data(u,n)},destroy:function(){w.verbose("Destroying previous module for",y),x.removeData(u)},refresh:function(){w.verbose("Refreshing display type on next animation"),delete w.displayType},forceRepaint:function(){w.verbose("Forcing element repaint");var a=x.parent(),b=x.next();0===b.size()?x.detach().appendTo(a):x.detach().insertBefore(b)},repaint:function(){w.verbose("Repainting element");y.offsetWidth},animate:function(a){return b=a||b,w.is.supported()?(w.debug("Preparing animation",b.animation),w.is.animating()&&b.queue?(!b.allowRepeats&&w.has.direction()&&w.is.occuring()&&w.queuing!==!0?w.error(o.repeated):w.queue(b.animation),!1):void(w.can.animate?w.set.animating(b.animation):w.error(o.noAnimation,b.animation))):(w.error(o.support),!1)},reset:function(){w.debug("Resetting animation to beginning conditions"),x.off(r+v),w.restore.conditions(),w.hide(),w.remove.animating()},queue:function(a){w.debug("Queueing animation of",a),w.queuing=!0,x.one(r+v,function(){w.queuing=!1,w.repaint(),w.animate.apply(this,b)})},complete:function(){w.verbose("CSS animation complete",b.animation),w.is.looping()||(w.is.outward()?(w.verbose("Animation is outward, hiding element"),w.restore.conditions(),w.remove.display(),w.hide(),a.proxy(b.onHide,this)()):w.is.inward()?(w.verbose("Animation is outward, showing element"),w.restore.conditions(),w.set.display(),w.show(),a.proxy(b.onShow,this)()):w.restore.conditions(),w.remove.duration(),w.remove.animating()),a.proxy(b.complete,this)()},has:{direction:function(a){return a=a||b.animation,-1!==a.search(p.inward)||-1!==a.search(p.outward)?(w.debug("Direction already set in animation"),!0):!1}},set:{animating:function(a){a=a||b.animation,w.save.conditions(),w.can.transition()&&!w.has.direction()&&w.set.direction(),w.remove.hidden(),w.set.display(),x.addClass(p.animating).addClass(p.transition).addClass(a).one(r+v,w.complete),w.set.duration(b.duration),w.debug("Starting tween",b.animation,x.attr("class"))},display:function(){var a=x.attr("style")||"",b=w.get.displayType(),c=a+";display: "+b+" !important;";x.css("display")!==b&&(w.verbose("Setting inline visibility to",b),x.attr("style",c))},direction:function(){x.is(":visible")&&!w.is.hidden()?(w.debug("Automatically determining the direction of animation","Outward"),x.removeClass(p.inward).addClass(p.outward)):(w.debug("Automatically determining the direction of animation","Inward"),x.removeClass(p.outward).addClass(p.inward))},looping:function(){w.debug("Transition set to loop"),x.addClass(p.looping)},duration:function(a){a=a||b.duration,a="number"==typeof a?a+"ms":a,w.verbose("Setting animation duration",a),x.css({"-webkit-animation-duration":a,"-moz-animation-duration":a,"-ms-animation-duration":a,"-o-animation-duration":a,"animation-duration":a})},hidden:function(){w.is.hidden()||(x.addClass(p.transition).addClass(p.hidden),"none"!==x.css("display")&&(w.verbose("Overriding default display to hide element"),x.css("display","none")))},visible:function(){x.addClass(p.transition).addClass(p.visible)}},save:{displayType:function(a){w.displayType=a},transitionExists:function(b,c){a.fn.transition.exists[b]=c,w.verbose("Saving existence of transition",b,c)},conditions:function(){w.cache={className:x.attr("class"),style:x.attr("style")},w.verbose("Saving original attributes",w.cache)}},restore:{conditions:function(){return w.cache===d?!1:(w.cache.className?x.attr("class",w.cache.className):x.removeAttr("class"),w.cache.style?(w.verbose("Restoring original style attribute",w.cache.style),x.attr("style",w.cache.style)):"block"===w.get.displayType()&&(w.verbose("Removing inline style override, element defaults to block"),x.removeAttr("style")),w.is.looping()&&w.remove.looping(),void w.verbose("Restoring original attributes",w.cache))}},remove:{animating:function(){x.removeClass(p.animating)},display:function(){w.displayType!==d&&x.css("display","")},duration:function(){x.css({"-webkit-animation-duration":"","-moz-animation-duration":"","-ms-animation-duration":"","-o-animation-duration":"","animation-duration":""})},hidden:function(){x.removeClass(p.hidden)},visible:function(){x.removeClass(p.visible)},looping:function(){w.debug("Transitions are no longer looping"),x.removeClass(p.looping),w.forceRepaint()},transition:function(){x.removeClass(p.visible).removeClass(p.hidden)}},get:{settings:function(b,c,d){return"object"==typeof b?a.extend(!0,{},a.fn.transition.settings,b):"function"==typeof d?a.extend({},a.fn.transition.settings,{animation:b,complete:d,duration:c}):"string"==typeof c||"number"==typeof c?a.extend({},a.fn.transition.settings,{animation:b,duration:c}):"object"==typeof c?a.extend({},a.fn.transition.settings,c,{animation:b}):"function"==typeof c?a.extend({},a.fn.transition.settings,{animation:b,complete:c}):a.extend({},a.fn.transition.settings,{animation:b})},displayType:function(){return w.displayType===d&&w.can.transition(),w.displayType},transitionExists:function(b){return a.fn.transition.exists[b]},animationName:function(){var a,b=c.createElement("div"),e={animation:"animationName",OAnimation:"oAnimationName",MozAnimation:"mozAnimationName",WebkitAnimation:"webkitAnimationName"};for(a in e)if(b.style[a]!==d)return e[a];return!1},animationEvent:function(){var a,b=c.createElement("div"),e={animation:"animationend",OAnimation:"oAnimationEnd",MozAnimation:"mozAnimationEnd",WebkitAnimation:"webkitAnimationEnd"};for(a in e)if(b.style[a]!==d)return e[a];return!1}},can:{animate:function(){return"none"!==x.css(b.animation)?(w.debug("CSS definition found",x.css(b.animation)),!0):(w.debug("Unable to find css definition",x.attr("class")),!1)},transition:function(){var c,e,f,g,h=x.attr("class"),i=x.prop("tagName"),j=b.animation,k=w.get.transitionExists(b.animation);return(k===d||w.displayType===d)&&(w.verbose("Determining whether animation exists"),c=a("<"+i+" />").addClass(h).insertAfter(x),e=c.removeClass(p.inward).removeClass(p.outward).addClass(p.animating).addClass(p.transition).addClass(j).css(s),f=c.addClass(p.inward).css(s),g=c.attr("class",h).removeAttr("style").removeClass(p.visible).show().css("display"),w.verbose("Determining final display state",g),e!=f?(w.debug("Transition exists for animation",j),k=!0):(w.debug("Static animation found",j,g),k=!1),c.remove(),w.save.displayType(g),k===d&&w.save.transitionExists(j,k)),k}},is:{animating:function(){return x.hasClass(p.animating)},inward:function(){return x.hasClass(p.inward)},outward:function(){return x.hasClass(p.outward)},looping:function(){return x.hasClass(p.looping)},occuring:function(a){return a=a||b.animation,x.hasClass(a)},visible:function(){return x.is(":visible")},hidden:function(){return"hidden"===x.css("visibility")},supported:function(){return s!==!1&&r!==!1}},hide:function(){w.verbose("Hiding element"),w.remove.visible(),w.set.hidden(),w.repaint()},show:function(a){w.verbose("Showing element",a),w.remove.hidden(),w.set.visible(),w.repaint()},start:function(){w.verbose("Starting animation"),x.removeClass(p.disabled)},stop:function(){w.debug("Stopping animation"),x.addClass(p.disabled)},toggle:function(){w.debug("Toggling play status"),x.toggleClass(p.disabled)},setting:function(c,e){if(w.debug("Changing setting",c,e),a.isPlainObject(c))a.extend(!0,b,c);else{if(e===d)return b[c];b[c]=e}},internal:function(b,c){if(a.isPlainObject(b))a.extend(!0,w,b); else{if(c===d)return w[b];w[b]=c}},debug:function(){b.debug&&(b.performance?w.performance.log(arguments):(w.debug=Function.prototype.bind.call(console.info,console,b.name+":"),w.debug.apply(console,arguments)))},verbose:function(){b.verbose&&b.debug&&(b.performance?w.performance.log(arguments):(w.verbose=Function.prototype.bind.call(console.info,console,b.name+":"),w.verbose.apply(console,arguments)))},error:function(){w.error=Function.prototype.bind.call(console.error,console,b.name+":"),w.error.apply(console,arguments)},performance:{log:function(a){var c,d,e;b.performance&&(c=(new Date).getTime(),e=h||c,d=c-e,h=c,i.push({Name:a[0],Arguments:[].slice.call(a,1)||"",Element:y,"Execution Time":d})),clearTimeout(w.performance.timer),w.performance.timer=setTimeout(w.performance.display,600)},display:function(){var c=b.name+":",e=0;h=!1,clearTimeout(w.performance.timer),a.each(i,function(a,b){e+=b["Execution Time"]}),c+=" "+e+"ms",g&&(c+=" '"+g+"'"),f.size()>1&&(c+=" ("+f.size()+")"),(console.group!==d||console.table!==d)&&i.length>0&&(console.groupCollapsed(c),console.table?console.table(i):a.each(i,function(a,b){console.log(b.Name+": "+b["Execution Time"]+"ms")}),console.groupEnd()),i=[]}},invoke:function(b,c,f){var g,h,i,j=n;return c=c||l,f=y||f,"string"==typeof b&&j!==d&&(b=b.split(/[\. ]/),g=b.length-1,a.each(b,function(c,e){var f=c!=g?e+b[c+1].charAt(0).toUpperCase()+b[c+1].slice(1):b;if(a.isPlainObject(j[f])&&c!=g)j=j[f];else{if(j[f]!==d)return h=j[f],!1;if(!a.isPlainObject(j[e])||c==g)return j[e]!==d?(h=j[e],!1):!1;j=j[e]}})),a.isFunction(h)?i=h.apply(f,c):h!==d&&(i=h),a.isArray(e)?e.push(i):e!==d?e=[e,i]:i!==d&&(e=i),h!==d?h:!1}},w.initialize()}),e!==d?e:this},a.fn.transition.exists={},a.fn.transition.settings={name:"Transition",debug:!1,verbose:!0,performance:!0,namespace:"transition",complete:function(){},onShow:function(){},onHide:function(){},allowRepeats:!1,animation:"fade",duration:"500ms",queue:!0,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(a,b,c,d){"use strict";a.fn.video=function(c){{var e,f=a(this),g=f.selector||"",h=(new Date).getTime(),i=[],j=arguments[0],k="string"==typeof j,l=[].slice.call(arguments,1);b.requestAnimationFrame||b.mozRequestAnimationFrame||b.webkitRequestAnimationFrame||b.msRequestAnimationFrame||function(a){setTimeout(a,0)}}return f.each(function(){var m,n=a.isPlainObject(c)?a.extend(!0,{},a.fn.video.settings,c):a.extend({},a.fn.video.settings),o=n.selector,p=n.className,q=n.error,r=n.metadata,s=n.namespace,t=n.templates,u="."+s,v="module-"+s,w=(a(b),a(this)),x=w.find(o.placeholder),y=w.find(o.playButton),z=w.find(o.embed),A=this,B=w.data(v);m={initialize:function(){m.debug("Initializing video"),m.create(),x.on("click"+u,m.play),y.on("click"+u,m.play),m.instantiate()},instantiate:function(){m.verbose("Storing instance of module",m),B=m,w.data(v,m)},create:function(){var a=w.data(r.image),b=t.video(a);w.html(b),m.refresh(),a||m.play(),m.debug("Creating html for video element",b)},destroy:function(){m.verbose("Destroying previous instance of video"),m.reset(),w.removeData(v).off(u),x.off(u),y.off(u)},refresh:function(){m.verbose("Refreshing selector cache"),x=w.find(o.placeholder),y=w.find(o.playButton),z=w.find(o.embed)},change:function(a,b,c){m.debug("Changing video to ",a,b,c),w.data(r.source,a).data(r.id,b).data(r.url,c),n.onChange()},reset:function(){m.debug("Clearing video embed and showing placeholder"),w.removeClass(p.active),z.html(" "),x.show(),n.onReset()},play:function(){m.debug("Playing video");var a=w.data(r.source)||!1,b=w.data(r.url)||!1,c=w.data(r.id)||!1;z.html(m.generate.html(a,c,b)),w.addClass(p.active),n.onPlay()},get:{source:function(a){return"string"!=typeof a?!1:-1!==a.search("youtube.com")?"youtube":-1!==a.search("vimeo.com")?"vimeo":!1},id:function(a){return n.regExp.youtube.test(a)?a.match(n.regExp.youtube)[1]:n.regExp.vimeo.test(a)?a.match(n.regExp.vimeo)[2]:!1}},generate:{html:function(a,b,c){m.debug("Generating embed html");var d;return a=a||n.source,b=b||n.id,a&&b||c?(a&&b||(a=m.get.source(c),b=m.get.id(c)),"vimeo"==a?d='':"youtube"==a&&(d='')):m.error(q.noVideo),d},url:function(a){var b=n.api?1:0,c="auto"===n.autoplay?w.data("image")!==d:n.autoplay,e=n.hd?1:0,f=n.showUI?1:0,g=n.showUI?0:1,h="";return"vimeo"==a&&(h="api="+b+"&title="+f+"&byline="+f+"&portrait="+f+"&autoplay="+c,n.color&&(h+="&color="+n.color)),"ustream"==a?(h="autoplay="+c,n.color&&(h+="&color="+n.color)):"youtube"==a&&(h="enablejsapi="+b+"&autoplay="+c+"&autohide="+g+"&hq="+e+"&modestbranding=1",n.color&&(h+="&color="+n.color)),h}},setting:function(b,c){if(m.debug("Changing setting",b,c),a.isPlainObject(b))a.extend(!0,n,b);else{if(c===d)return n[b];n[b]=c}},internal:function(b,c){if(a.isPlainObject(b))a.extend(!0,m,b);else{if(c===d)return m[b];m[b]=c}},debug:function(){n.debug&&(n.performance?m.performance.log(arguments):(m.debug=Function.prototype.bind.call(console.info,console,n.name+":"),m.debug.apply(console,arguments)))},verbose:function(){n.verbose&&n.debug&&(n.performance?m.performance.log(arguments):(m.verbose=Function.prototype.bind.call(console.info,console,n.name+":"),m.verbose.apply(console,arguments)))},error:function(){m.error=Function.prototype.bind.call(console.error,console,n.name+":"),m.error.apply(console,arguments)},performance:{log:function(a){var b,c,d;n.performance&&(b=(new Date).getTime(),d=h||b,c=b-d,h=b,i.push({Name:a[0],Arguments:[].slice.call(a,1)||"",Element:A,"Execution Time":c})),clearTimeout(m.performance.timer),m.performance.timer=setTimeout(m.performance.display,100)},display:function(){var b=n.name+":",c=0;h=!1,clearTimeout(m.performance.timer),a.each(i,function(a,b){c+=b["Execution Time"]}),b+=" "+c+"ms",g&&(b+=" '"+g+"'"),f.size()>1&&(b+=" ("+f.size()+")"),(console.group!==d||console.table!==d)&&i.length>0&&(console.groupCollapsed(b),console.table?console.table(i):a.each(i,function(a,b){console.log(b.Name+": "+b["Execution Time"]+"ms")}),console.groupEnd()),i=[]}},invoke:function(b,c,f){var g,h,i,j=B;return c=c||l,f=A||f,"string"==typeof b&&j!==d&&(b=b.split(/[\. ]/),g=b.length-1,a.each(b,function(c,e){var f=c!=g?e+b[c+1].charAt(0).toUpperCase()+b[c+1].slice(1):b;if(a.isPlainObject(j[f])&&c!=g)j=j[f];else{if(j[f]!==d)return h=j[f],!1;if(!a.isPlainObject(j[e])||c==g)return j[e]!==d?(h=j[e],!1):!1;j=j[e]}})),a.isFunction(h)?i=h.apply(f,c):h!==d&&(i=h),a.isArray(e)?e.push(i):e!==d?e=[e,i]:i!==d&&(e=i),h}},k?(B===d&&m.initialize(),m.invoke(j)):(B!==d&&m.destroy(),m.initialize())}),e!==d?e:this},a.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"}},a.fn.video.settings.templates={video:function(a){var b="";return a&&(b+=''),b+='
'}}}(jQuery,window,document);