(function(c){c.extend(c.fn,{validate:function(b){if(this.length){var d=c.data(this[0],"validator");if(d)return d;d=new c.validator(b,this[0]);c.data(this[0],"validator",d);if(d.settings.onsubmit){this.find("input, button").filter(".cancel").click(function(){d.cancelSubmit=true});d.settings.submitHandler&&this.find("input, button").filter(":submit").click(function(){d.submitButton=this});this.submit(function(a){function h(){if(d.settings.submitHandler){if(d.submitButton)var i=c("<input type='hidden'/>").attr("name",
d.submitButton.name).val(d.submitButton.value).appendTo(d.currentForm);d.settings.submitHandler.call(d,d.currentForm);d.submitButton&&i.remove();return false}return true}d.settings.debug&&a.preventDefault();if(d.cancelSubmit){d.cancelSubmit=false;return h()}if(d.form()){if(d.pendingRequest){d.formSubmitted=true;return false}return h()}else{d.focusInvalid();return false}})}return d}else b&&b.debug&&window.console&&console.warn("nothing selected, can't validate, returning nothing")},valid:function(){if(c(this[0]).is("form"))return this.validate().form();
else{var b=true,d=c(this[0].form).validate();this.each(function(){b&=d.element(this)});return b}},removeAttrs:function(b){var d={},a=this;c.each(b.split(/\s/),function(h,i){d[i]=a.attr(i);a.removeAttr(i)});return d},rules:function(b,d){var a=this[0];if(b){var h=c.data(a.form,"validator").settings,i=h.rules,j=c.validator.staticRules(a);switch(b){case "add":c.extend(j,c.validator.normalizeRule(d));i[a.name]=j;if(d.messages)h.messages[a.name]=c.extend(h.messages[a.name],d.messages);break;case "remove":if(!d){delete i[a.name];
return j}var r={};c.each(d.split(/\s/),function(s,w){r[w]=j[w];delete j[w]});return r}}a=c.validator.normalizeRules(c.extend({},c.validator.metadataRules(a),c.validator.classRules(a),c.validator.attributeRules(a),c.validator.staticRules(a)),a);if(a.required){h=a.required;delete a.required;a=c.extend({required:h},a)}return a}});c.extend(c.expr[":"],{blank:function(b){return!c.trim(""+b.value)},filled:function(b){return!!c.trim(""+b.value)},unchecked:function(b){return!b.checked}});c.validator=function(b,
d){this.settings=c.extend(true,{},c.validator.defaults,b);this.currentForm=d;this.init()};c.validator.format=function(b,d){if(arguments.length==1)return function(){var a=c.makeArray(arguments);a.unshift(b);return c.validator.format.apply(this,a)};if(arguments.length>2&&d.constructor!=Array)d=c.makeArray(arguments).slice(1);if(d.constructor!=Array)d=[d];c.each(d,function(a,h){b=b.replace(RegExp("\\{"+a+"\\}","g"),h)});return b};c.extend(c.validator,{defaults:{messages:{},groups:{},rules:{},errorClass:"error",
validClass:"valid",errorElement:"label",focusInvalid:true,errorContainer:c([]),errorLabelContainer:c([]),onsubmit:true,ignore:[],ignoreTitle:false,onfocusin:function(b){this.lastActive=b;if(this.settings.focusCleanup&&!this.blockFocusCleanup){this.settings.unhighlight&&this.settings.unhighlight.call(this,b,this.settings.errorClass,this.settings.validClass);this.errorsFor(b).hide()}},onfocusout:function(b){if(!this.checkable(b)&&(b.name in this.submitted||!this.optional(b)))this.element(b)},onkeyup:function(b){if(b.name in
this.submitted||b==this.lastElement)this.element(b)},onclick:function(b){if(b.name in this.submitted)this.element(b);else b.parentNode.name in this.submitted&&this.element(b.parentNode)},highlight:function(b,d,a){c(b).addClass(d).removeClass(a)},unhighlight:function(b,d,a){c(b).removeClass(d).addClass(a)}},setDefaults:function(b){c.extend(c.validator.defaults,b)},messages:{required:"This field is required.",remote:"Please fix this field.",email:"Please enter a valid email address.",url:"Please enter a valid URL.",
date:"Please enter a valid date.",dateISO:"Please enter a valid date (ISO).",number:"Please enter a valid number.",digits:"Please enter only digits.",creditcard:"Please enter a valid credit card number.",equalTo:"Please enter the same value again.",accept:"Please enter a value with a valid extension.",maxlength:c.validator.format("Please enter no more than {0} characters."),minlength:c.validator.format("Please enter at least {0} characters."),rangelength:c.validator.format("Please enter a value between {0} and {1} characters long."),
range:c.validator.format("Please enter a value between {0} and {1}."),max:c.validator.format("Please enter a value less than or equal to {0}."),min:c.validator.format("Please enter a value greater than or equal to {0}.")},autoCreateRanges:false,prototype:{init:function(){function b(h){var i=c.data(this[0].form,"validator");h="on"+h.type.replace(/^validate/,"");i.settings[h]&&i.settings[h].call(i,this[0])}this.labelContainer=c(this.settings.errorLabelContainer);this.errorContext=this.labelContainer.length&&
this.labelContainer||c(this.currentForm);this.containers=c(this.settings.errorContainer).add(this.settings.errorLabelContainer);this.submitted={};this.valueCache={};this.pendingRequest=0;this.pending={};this.invalid={};this.reset();var d=this.groups={};c.each(this.settings.groups,function(h,i){c.each(i.split(/\s/),function(j,r){d[r]=h})});var a=this.settings.rules;c.each(a,function(h,i){a[h]=c.validator.normalizeRule(i)});c(this.currentForm).validateDelegate(":text, :password, :file, select, textarea",
"focusin focusout keyup",b).validateDelegate(":radio, :checkbox, select, option","click",b);this.settings.invalidHandler&&c(this.currentForm).bind("invalid-form.validate",this.settings.invalidHandler)},form:function(){this.checkForm();c.extend(this.submitted,this.errorMap);this.invalid=c.extend({},this.errorMap);this.valid()||c(this.currentForm).triggerHandler("invalid-form",[this]);this.showErrors();return this.valid()},checkForm:function(){this.prepareForm();for(var b=0,d=this.currentElements=this.elements();d[b];b++)this.check(d[b]);
return this.valid()},element:function(b){this.lastElement=b=this.clean(b);this.prepareElement(b);this.currentElements=c(b);var d=this.check(b);if(d)delete this.invalid[b.name];else this.invalid[b.name]=true;if(!this.numberOfInvalids())this.toHide=this.toHide.add(this.containers);this.showErrors();return d},showErrors:function(b){if(b){c.extend(this.errorMap,b);this.errorList=[];for(var d in b)this.errorList.push({message:b[d],element:this.findByName(d)[0]});this.successList=c.grep(this.successList,
function(a){return!(a.name in b)})}this.settings.showErrors?this.settings.showErrors.call(this,this.errorMap,this.errorList):this.defaultShowErrors()},resetForm:function(){c.fn.resetForm&&c(this.currentForm).resetForm();this.submitted={};this.prepareForm();this.hideErrors();this.elements().removeClass(this.settings.errorClass)},numberOfInvalids:function(){return this.objectLength(this.invalid)},objectLength:function(b){var d=0,a;for(a in b)d++;return d},hideErrors:function(){this.addWrapper(this.toHide).hide()},
valid:function(){return this.size()==0},size:function(){return this.errorList.length},focusInvalid:function(){if(this.settings.focusInvalid)try{c(this.findLastActive()||this.errorList.length&&this.errorList[0].element||[]).filter(":visible").focus().trigger("focusin")}catch(b){}},findLastActive:function(){var b=this.lastActive;return b&&c.grep(this.errorList,function(d){return d.element.name==b.name}).length==1&&b},elements:function(){var b=this,d={};return c([]).add(this.currentForm.elements).filter(":input").not(":submit, :reset, :image, [disabled]").not(this.settings.ignore).filter(function(){!this.name&&
b.settings.debug&&window.console&&console.error("%o has no name assigned",this);if(this.name in d||!b.objectLength(c(this).rules()))return false;return d[this.name]=true})},clean:function(b){return c(b)[0]},errors:function(){return c(this.settings.errorElement+"."+this.settings.errorClass,this.errorContext)},reset:function(){this.successList=[];this.errorList=[];this.errorMap={};this.toShow=c([]);this.toHide=c([]);this.currentElements=c([])},prepareForm:function(){this.reset();this.toHide=this.errors().add(this.containers)},
prepareElement:function(b){this.reset();this.toHide=this.errorsFor(b)},check:function(b){b=this.clean(b);if(this.checkable(b))b=this.findByName(b.name)[0];var d=c(b).rules(),a=false;for(method in d){var h={method:method,parameters:d[method]};try{var i=c.validator.methods[method].call(this,b.value.replace(/\r/g,""),b,h.parameters);if(i=="dependency-mismatch")a=true;else{a=false;if(i=="pending"){this.toHide=this.toHide.not(this.errorsFor(b));return}if(!i){this.formatAndAdd(b,h);return false}}}catch(j){this.settings.debug&&
window.console&&console.log("exception occured when checking element "+b.id+", check the '"+h.method+"' method",j);throw j;}}if(!a){this.objectLength(d)&&this.successList.push(b);return true}},customMetaMessage:function(b,d){if(c.metadata){var a=this.settings.meta?c(b).metadata()[this.settings.meta]:c(b).metadata();return a&&a.messages&&a.messages[d]}},customMessage:function(b,d){var a=this.settings.messages[b];return a&&(a.constructor==String?a:a[d])},findDefined:function(){for(var b=0;b<arguments.length;b++)if(arguments[b]!==
undefined)return arguments[b]},defaultMessage:function(b,d){return this.findDefined(this.customMessage(b.name,d),this.customMetaMessage(b,d),!this.settings.ignoreTitle&&b.title||undefined,c.validator.messages[d],"<strong>Warning: No message defined for "+b.name+"</strong>")},formatAndAdd:function(b,d){var a=this.defaultMessage(b,d.method),h=/\$?\{(\d+)\}/g;if(typeof a=="function")a=a.call(this,d.parameters,b);else if(h.test(a))a=jQuery.format(a.replace(h,"{$1}"),d.parameters);this.errorList.push({message:a,
element:b});this.errorMap[b.name]=a;this.submitted[b.name]=a},addWrapper:function(b){if(this.settings.wrapper)b=b.add(b.parent(this.settings.wrapper));return b},defaultShowErrors:function(){for(var b=0;this.errorList[b];b++){var d=this.errorList[b];this.settings.highlight&&this.settings.highlight.call(this,d.element,this.settings.errorClass,this.settings.validClass);this.showLabel(d.element,d.message)}if(this.errorList.length)this.toShow=this.toShow.add(this.containers);if(this.settings.success)for(b=
0;this.successList[b];b++)this.showLabel(this.successList[b]);if(this.settings.unhighlight){b=0;for(d=this.validElements();d[b];b++)this.settings.unhighlight.call(this,d[b],this.settings.errorClass,this.settings.validClass)}this.toHide=this.toHide.not(this.toShow);this.hideErrors();this.addWrapper(this.toShow).show()},validElements:function(){return this.currentElements.not(this.invalidElements())},invalidElements:function(){return c(this.errorList).map(function(){return this.element})},showLabel:function(b,
d){var a=this.errorsFor(b);if(a.length){a.removeClass().addClass(this.settings.errorClass);a.attr("generated")&&a.html(d)}else{a=c("<"+this.settings.errorElement+"/>").attr({"for":this.idOrName(b),generated:true}).addClass(this.settings.errorClass).html(d||"");if(this.settings.wrapper)a=a.hide().show().wrap("<"+this.settings.wrapper+"/>").parent();this.labelContainer.append(a).length||(this.settings.errorPlacement?this.settings.errorPlacement(a,c(b)):a.insertAfter(b))}if(!d&&this.settings.success){a.text("");
typeof this.settings.success=="string"?a.addClass(this.settings.success):this.settings.success(a)}this.toShow=this.toShow.add(a)},errorsFor:function(b){var d=this.idOrName(b);return this.errors().filter(function(){return c(this).attr("for")==d})},idOrName:function(b){return this.groups[b.name]||(this.checkable(b)?b.name:b.id||b.name)},checkable:function(b){return/radio|checkbox/i.test(b.type)},findByName:function(b){var d=this.currentForm;return c(document.getElementsByName(b)).map(function(a,h){return h.form==
d&&h.name==b&&h||null})},getLength:function(b,d){switch(d.nodeName.toLowerCase()){case "select":return c("option:selected",d).length;case "input":if(this.checkable(d))return this.findByName(d.name).filter(":checked").length}return b.length},depend:function(b,d){return this.dependTypes[typeof b]?this.dependTypes[typeof b](b,d):true},dependTypes:{"boolean":function(b){return b},string:function(b,d){return!!c(b,d.form).length},"function":function(b,d){return b(d)}},optional:function(b){return!c.validator.methods.required.call(this,
c.trim(b.value),b)&&"dependency-mismatch"},startRequest:function(b){if(!this.pending[b.name]){this.pendingRequest++;this.pending[b.name]=true}},stopRequest:function(b,d){this.pendingRequest--;if(this.pendingRequest<0)this.pendingRequest=0;delete this.pending[b.name];if(d&&this.pendingRequest==0&&this.formSubmitted&&this.form()){c(this.currentForm).submit();this.formSubmitted=false}else if(!d&&this.pendingRequest==0&&this.formSubmitted){c(this.currentForm).triggerHandler("invalid-form",[this]);this.formSubmitted=
false}},previousValue:function(b){return c.data(b,"previousValue")||c.data(b,"previousValue",{old:null,valid:true,message:this.defaultMessage(b,"remote")})}},classRuleSettings:{required:{required:true},email:{email:true},url:{url:true},date:{date:true},dateISO:{dateISO:true},dateDE:{dateDE:true},number:{number:true},numberDE:{numberDE:true},digits:{digits:true},creditcard:{creditcard:true}},addClassRules:function(b,d){b.constructor==String?this.classRuleSettings[b]=d:c.extend(this.classRuleSettings,
b)},classRules:function(b){var d={};(b=c(b).attr("class"))&&c.each(b.split(" "),function(){this in c.validator.classRuleSettings&&c.extend(d,c.validator.classRuleSettings[this])});return d},attributeRules:function(b){var d={};b=c(b);for(method in c.validator.methods){var a=b.attr(method);if(a)d[method]=a}d.maxlength&&/-1|2147483647|524288/.test(d.maxlength)&&delete d.maxlength;return d},metadataRules:function(b){if(!c.metadata)return{};var d=c.data(b.form,"validator").settings.meta;return d?c(b).metadata()[d]:
c(b).metadata()},staticRules:function(b){var d={},a=c.data(b.form,"validator");if(a.settings.rules)d=c.validator.normalizeRule(a.settings.rules[b.name])||{};return d},normalizeRules:function(b,d){c.each(b,function(a,h){if(h===false)delete b[a];else if(h.param||h.depends){var i=true;switch(typeof h.depends){case "string":i=!!c(h.depends,d.form).length;break;case "function":i=h.depends.call(d,d)}if(i)b[a]=h.param!==undefined?h.param:true;else delete b[a]}});c.each(b,function(a,h){b[a]=c.isFunction(h)?
h(d):h});c.each(["minlength","maxlength","min","max"],function(){if(b[this])b[this]=Number(b[this])});c.each(["rangelength","range"],function(){if(b[this])b[this]=[Number(b[this][0]),Number(b[this][1])]});if(c.validator.autoCreateRanges){if(b.min&&b.max){b.range=[b.min,b.max];delete b.min;delete b.max}if(b.minlength&&b.maxlength){b.rangelength=[b.minlength,b.maxlength];delete b.minlength;delete b.maxlength}}b.messages&&delete b.messages;return b},normalizeRule:function(b){if(typeof b=="string"){var d=
{};c.each(b.split(/\s/),function(){d[this]=true});b=d}return b},addMethod:function(b,d,a){c.validator.methods[b]=d;c.validator.messages[b]=a!=undefined?a:c.validator.messages[b];d.length<3&&c.validator.addClassRules(b,c.validator.normalizeRule(b))},methods:{required:function(b,d,a){if(!this.depend(a,d))return"dependency-mismatch";switch(d.nodeName.toLowerCase()){case "select":return(b=c(d).val())&&b.length>0;case "input":if(this.checkable(d))return this.getLength(b,d)>0;default:return c.trim(b).length>
0}},remote:function(b,d,a){if(this.optional(d))return"dependency-mismatch";var h=this.previousValue(d);this.settings.messages[d.name]||(this.settings.messages[d.name]={});h.originalMessage=this.settings.messages[d.name].remote;this.settings.messages[d.name].remote=h.message;a=typeof a=="string"&&{url:a}||a;if(h.old!==b){h.old=b;var i=this;this.startRequest(d);var j={};j[d.name]=b;c.ajax(c.extend(true,{url:a,mode:"abort",port:"validate"+d.name,dataType:"json",data:j,success:function(r){i.settings.messages[d.name].remote=
h.originalMessage;var s=r===true;if(s){var w=i.formSubmitted;i.prepareElement(d);i.formSubmitted=w;i.successList.push(d);i.showErrors()}else{w={};r=h.message=r||i.defaultMessage(d,"remote");w[d.name]=c.isFunction(r)?r(b):r;i.showErrors(w)}h.valid=s;i.stopRequest(d,s)}},a));return"pending"}else if(this.pending[d.name])return"pending";return h.valid},minlength:function(b,d,a){return this.optional(d)||this.getLength(c.trim(b),d)>=a},maxlength:function(b,d,a){return this.optional(d)||this.getLength(c.trim(b),
d)<=a},rangelength:function(b,d,a){b=this.getLength(c.trim(b),d);return this.optional(d)||b>=a[0]&&b<=a[1]},min:function(b,d,a){return this.optional(d)||b>=a},max:function(b,d,a){return this.optional(d)||b<=a},range:function(b,d,a){return this.optional(d)||b>=a[0]&&b<=a[1]},email:function(b,d){return this.optional(d)||/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$/i.test(b)},
url:function(b,d){return this.optional(d)||/^(https?|ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test(b)},
date:function(b,d){return this.optional(d)||!/Invalid|NaN/.test(new Date(b))},dateISO:function(b,d){return this.optional(d)||/^\d{4}[\/-]\d{1,2}[\/-]\d{1,2}$/.test(b)},number:function(b,d){return this.optional(d)||/^-?(?:\d+|\d{1,3}(?:,\d{3})+)(?:\.\d+)?$/.test(b)},digits:function(b,d){return this.optional(d)||/^\d+$/.test(b)},creditcard:function(b,d){if(this.optional(d))return"dependency-mismatch";if(/[^0-9-]+/.test(b))return false;var a=0,h=0,i=false;b=b.replace(/\D/g,"");for(var j=b.length-1;j>=
0;j--){h=b.charAt(j);h=parseInt(h,10);if(i)if((h*=2)>9)h-=9;a+=h;i=!i}return a%10==0},accept:function(b,d,a){a=typeof a=="string"?a.replace(/,/g,"|"):"png|jpe?g|gif";return this.optional(d)||b.match(RegExp(".("+a+")$","i"))},equalTo:function(b,d,a){a=c(a).unbind(".validate-equalTo").bind("blur.validate-equalTo",function(){c(d).valid()});return b==a.val()}}});c.format=c.validator.format})(jQuery);
(function(c){var b=c.ajax,d={};c.ajax=function(a){a=c.extend(a,c.extend({},c.ajaxSettings,a));var h=a.port;if(a.mode=="abort"){d[h]&&d[h].abort();return d[h]=b.apply(this,arguments)}return b.apply(this,arguments)}})(jQuery);
(function(c){!jQuery.event.special.focusin&&!jQuery.event.special.focusout&&document.addEventListener&&c.each({focus:"focusin",blur:"focusout"},function(b,d){function a(h){h=c.event.fix(h);h.type=d;return c.event.handle.call(this,h)}c.event.special[d]={setup:function(){this.addEventListener(b,a,true)},teardown:function(){this.removeEventListener(b,a,true)},handler:function(h){arguments[0]=c.event.fix(h);arguments[0].type=d;return c.event.handle.apply(this,arguments)}}});c.extend(c.fn,{validateDelegate:function(b,
d,a){return this.bind(d,function(h){var i=c(h.target);if(i.is(b))return a.apply(i,arguments)})}})})(jQuery);
(function(c,b,d){function a(o,u,C){o=b.createElement(o);if(u)o.id=D+u;if(C)o.style.cssText=C;return c(o)}function h(o){var u=E.length;o=(N+o)%u;return o<0?u+o:o}function i(o,u){return Math.round((/%/.test(o)?(u==="x"?J.width():J.height())/100:1)*parseInt(o,10))}function j(o){return k.photo||/\.(gif|png|jpe?g|bmp|ico)((#|\?).*)?$/i.test(o)}function r(){var o;k=c.extend({},c.data(Q,R));for(o in k)if(c.isFunction(k[o])&&o.slice(0,2)!=="on")k[o]=k[o].call(Q);k.rel=k.rel||Q.rel||"nofollow";k.href=k.href||
c(Q).attr("href");k.title=k.title||Q.title;if(typeof k.href==="string")k.href=c.trim(k.href)}function s(o,u){c.event.trigger(o);u&&u.call(Q)}function w(){var o,u=D+"Slideshow_",C="click."+D,K,H;if(k.slideshow&&E[1]){K=function(){ga.text(k.slideshowStop).unbind(C).bind(n,function(){if(k.loop||E[N+1])o=setTimeout(z.next,k.slideshowSpeed)}).bind(l,function(){clearTimeout(o)}).one(C+" "+m,H);x.removeClass(u+"off").addClass(u+"on");o=setTimeout(z.next,k.slideshowSpeed)};H=function(){clearTimeout(o);ga.text(k.slideshowStart).unbind([n,
l,m,C].join(" ")).one(C,function(){z.next();K()});x.removeClass(u+"on").addClass(u+"off")};k.slideshowAuto?K():H()}else x.removeClass(u+"off "+u+"on")}function U(o){if(!la){Q=o;r();E=c(Q);N=0;if(k.rel!=="nofollow"){E=c("."+e).filter(function(){return(c.data(this,R).rel||this.rel)===k.rel});N=E.index(Q);if(N===-1){E=E.add(Q);N=E.length-1}}if(!W){W=ha=true;x.show();k.returnFocus&&c(Q).blur().one(f,function(){c(this).focus()});I.css({opacity:+k.opacity,cursor:k.overlayClose?"pointer":"auto"}).show();
k.w=i(k.initialWidth,"x");k.h=i(k.initialHeight,"y");z.position();y&&J.bind("resize."+B+" scroll."+B,function(){I.css({width:J.width(),height:J.height(),top:J.scrollTop(),left:J.scrollLeft()})}).trigger("resize."+B);s(g,k.onOpen);ma.add(na).hide();oa.html(k.close).show()}z.load(true)}}function F(){if(!x&&b.body){pa=false;J=c(d);x=a(A).attr({id:R,"class":t?D+(y?"IE6":"IE"):""}).hide();I=a(A,"Overlay",y?"position:absolute":"").hide();T=a(A,"Wrapper");O=a(A,"Content").append(L=a(A,"LoadedContent","width:0; height:0; overflow:hidden"),
qa=a(A,"LoadingOverlay").add(a(A,"LoadingGraphic")),na=a(A,"Title"),ra=a(A,"Current"),ia=a(A,"Next"),ja=a(A,"Previous"),ga=a(A,"Slideshow").bind(g,w),oa=a(A,"Close"));T.append(a(A).append(a(A,"TopLeft"),aa=a(A,"TopCenter"),a(A,"TopRight")),a(A,false,"clear:left").append(ea=a(A,"MiddleLeft"),O,fa=a(A,"MiddleRight")),a(A,false,"clear:left").append(a(A,"BottomLeft"),v=a(A,"BottomCenter"),a(A,"BottomRight"))).find("div div").css({"float":"left"});ka=a(A,false,"position:absolute; width:9999px; visibility:hidden; display:none");
ma=ia.add(ja).add(ra).add(ga);c(b.body).append(I,x.append(T,ka))}}function P(){if(x){if(!pa){pa=true;ba=aa.height()+v.height()+O.outerHeight(true)-O.height();ca=ea.width()+fa.width()+O.outerWidth(true)-O.width();X=L.outerHeight(true);Y=L.outerWidth(true);x.css({"padding-bottom":ba,"padding-right":ca});ia.click(function(){z.next()});ja.click(function(){z.prev()});oa.click(function(){z.close()});I.click(function(){k.overlayClose&&z.close()});c(b).bind("keydown."+D,function(o){var u=o.keyCode;if(W&&
k.escKey&&u===27){o.preventDefault();z.close()}if(W&&k.arrowKey&&E[1])if(u===37){o.preventDefault();ja.click()}else if(u===39){o.preventDefault();ia.click()}});c("."+e,b).live("click",function(o){if(!(o.which>1||o.shiftKey||o.altKey||o.metaKey)){o.preventDefault();U(this)}})}return true}return false}var V={transition:"elastic",speed:300,width:false,initialWidth:"600",innerWidth:false,maxWidth:false,height:false,initialHeight:"450",innerHeight:false,maxHeight:false,scalePhotos:true,scrolling:true,
inline:false,html:false,iframe:false,fastIframe:true,photo:false,href:false,title:false,rel:false,opacity:0.9,preloading:true,current:"image {current} of {total}",previous:"previous",next:"next",close:"close",open:false,returnFocus:true,reposition:true,loop:true,slideshow:false,slideshowAuto:true,slideshowSpeed:2500,slideshowStart:"start slideshow",slideshowStop:"stop slideshow",onOpen:false,onLoad:false,onComplete:false,onCleanup:false,onClosed:false,overlayClose:true,escKey:true,arrowKey:true,top:false,
bottom:false,left:false,right:false,fixed:false,data:undefined},R="colorbox",D="cbox",e=D+"Element",g=D+"_open",l=D+"_load",n=D+"_complete",m=D+"_cleanup",f=D+"_closed",q=D+"_purge",t=!c.support.opacity&&!c.support.style,y=t&&!d.XMLHttpRequest,B=D+"_IE6",I,x,T,O,aa,ea,fa,v,E,J,L,ka,qa,na,ra,ga,ia,ja,oa,ma,k,ba,ca,X,Y,Q,N,G,W,ha,la,sa,z,A="div",pa;if(!c.colorbox){c(F);z=c.fn[R]=c[R]=function(o,u){var C=this;o=o||{};F();if(P()){if(!C[0]){if(C.selector)return C;C=c("<a/>");o.open=true}if(u)o.onComplete=
u;C.each(function(){c.data(this,R,c.extend({},c.data(this,R)||V,o))}).addClass(e);if(c.isFunction(o.open)&&o.open.call(C)||o.open)U(C[0])}return C};z.position=function(o,u){function C(Z){aa[0].style.width=v[0].style.width=O[0].style.width=Z.style.width;O[0].style.height=ea[0].style.height=fa[0].style.height=Z.style.height}var K=0,H=0,S=x.offset(),M=J.scrollTop(),da=J.scrollLeft();J.unbind("resize."+D);x.css({top:-9E4,left:-9E4});if(k.fixed&&!y){S.top-=M;S.left-=da;x.css({position:"fixed"})}else{K=
M;H=da;x.css({position:"absolute"})}H+=k.right!==false?Math.max(J.width()-k.w-Y-ca-i(k.right,"x"),0):k.left!==false?i(k.left,"x"):Math.round(Math.max(J.width()-k.w-Y-ca,0)/2);K+=k.bottom!==false?Math.max(J.height()-k.h-X-ba-i(k.bottom,"y"),0):k.top!==false?i(k.top,"y"):Math.round(Math.max(J.height()-k.h-X-ba,0)/2);x.css({top:S.top,left:S.left});o=x.width()===k.w+Y&&x.height()===k.h+X?0:o||0;T[0].style.width=T[0].style.height="9999px";x.dequeue().animate({width:k.w+Y,height:k.h+X,top:K,left:H},{duration:o,
complete:function(){C(this);ha=false;T[0].style.width=k.w+Y+ca+"px";T[0].style.height=k.h+X+ba+"px";k.reposition&&setTimeout(function(){J.bind("resize."+D,z.position)},1);u&&u()},step:function(){C(this)}})};z.resize=function(o){if(W){o=o||{};if(o.width)k.w=i(o.width,"x")-Y-ca;if(o.innerWidth)k.w=i(o.innerWidth,"x");L.css({width:k.w});if(o.height)k.h=i(o.height,"y")-X-ba;if(o.innerHeight)k.h=i(o.innerHeight,"y");if(!o.innerHeight&&!o.height){L.css({height:"auto"});k.h=L.height()}L.css({height:k.h});
z.position(k.transition==="none"?0:k.speed)}};z.prep=function(o){if(W){var u,C=k.transition==="none"?0:k.speed;L.remove();L=a(A,"LoadedContent").append(o);L.hide().appendTo(ka.show()).css({width:function(){k.w=k.w||L.width();k.w=k.mw&&k.mw<k.w?k.mw:k.w;return k.w}(),overflow:k.scrolling?"auto":"hidden"}).css({height:function(){k.h=k.h||L.height();k.h=k.mh&&k.mh<k.h?k.mh:k.h;return k.h}()}).prependTo(O);ka.hide();c(G).css({"float":"none"});y&&c("select").not(x.find("select")).filter(function(){return this.style.visibility!==
"hidden"}).css({visibility:"hidden"}).one(m,function(){this.style.visibility="inherit"});u=function(){function K(){t&&x[0].style.removeAttribute("filter")}var H,S;H=E.length;var M,da,Z;if(W){da=function(){clearTimeout(sa);qa.hide();s(n,k.onComplete)};t&&G&&L.fadeIn(100);na.html(k.title).add(L).show();if(H>1){typeof k.current==="string"&&ra.html(k.current.replace("{current}",N+1).replace("{total}",H)).show();ia[k.loop||N<H-1?"show":"hide"]().html(k.next);ja[k.loop||N?"show":"hide"]().html(k.previous);
k.slideshow&&ga.show();if(k.preloading)for(H=[h(-1),h(1)];S=E[H.pop()];){Z=c.data(S,R).href||S.href;if(c.isFunction(Z))Z=Z.call(S);if(j(Z)){S=new Image;S.src=Z}}}else ma.hide();if(k.iframe){M=a("iframe")[0];if("frameBorder"in M)M.frameBorder=0;if("allowTransparency"in M)M.allowTransparency="true";M.name=D+ +new Date;k.fastIframe?da():c(M).one("load",da);M.src=k.href;if(!k.scrolling)M.scrolling="no";c(M).addClass(D+"Iframe").appendTo(L).one(q,function(){M.src="//about:blank"})}else da();k.transition===
"fade"?x.fadeTo(C,1,K):K()}};k.transition==="fade"?x.fadeTo(C,0,function(){z.position(0,u)}):z.position(C,u)}};z.load=function(o){var u,C,K=z.prep;ha=true;G=false;Q=E[N];o||r();s(q);s(l,k.onLoad);k.h=k.height?i(k.height,"y")-X-ba:k.innerHeight&&i(k.innerHeight,"y");k.w=k.width?i(k.width,"x")-Y-ca:k.innerWidth&&i(k.innerWidth,"x");k.mw=k.w;k.mh=k.h;if(k.maxWidth){k.mw=i(k.maxWidth,"x")-Y-ca;k.mw=k.w&&k.w<k.mw?k.w:k.mw}if(k.maxHeight){k.mh=i(k.maxHeight,"y")-X-ba;k.mh=k.h&&k.h<k.mh?k.h:k.mh}u=k.href;
sa=setTimeout(function(){qa.show()},100);if(k.inline){a(A).hide().insertBefore(c(u)[0]).one(q,function(){c(this).replaceWith(L.children())});K(c(u))}else if(k.iframe)K(" ");else if(k.html)K(k.html);else if(j(u)){c(G=new Image).addClass(D+"Photo").error(function(){k.title=false;K(a(A,"Error").text("This image could not be loaded"))}).load(function(){var H;G.onload=null;if(k.scalePhotos){C=function(){G.height-=G.height*H;G.width-=G.width*H};if(k.mw&&G.width>k.mw){H=(G.width-k.mw)/G.width;C()}if(k.mh&&
G.height>k.mh){H=(G.height-k.mh)/G.height;C()}}if(k.h)G.style.marginTop=Math.max(k.h-G.height,0)/2+"px";if(E[1]&&(k.loop||E[N+1])){G.style.cursor="pointer";G.onclick=function(){z.next()}}if(t)G.style.msInterpolationMode="bicubic";setTimeout(function(){K(G)},1)});setTimeout(function(){G.src=u},1)}else u&&ka.load(u,k.data,function(H,S,M){K(S==="error"?a(A,"Error").text("Request unsuccessful: "+M.statusText):c(this).contents())})};z.next=function(){if(!ha&&E[1]&&(k.loop||E[N+1])){N=h(1);z.load()}};z.prev=
function(){if(!ha&&E[1]&&(k.loop||N)){N=h(-1);z.load()}};z.close=function(){if(W&&!la){la=true;W=false;s(m,k.onCleanup);J.unbind("."+D+" ."+B);I.fadeTo(200,0);x.stop().fadeTo(300,0,function(){x.add(I).css({opacity:1,cursor:"auto"}).hide();s(q);L.remove();setTimeout(function(){la=false;s(f,k.onClosed)},1)})}};z.remove=function(){c([]).add(x).add(I).remove();x=null;c("."+e).removeData(R).removeClass(e).die()};z.element=function(){return c(Q)};z.settings=V}})(jQuery,document,this);
(function(c){function b(e){c.fn.cycle.debug&&d(e)}function d(){window.console&&console.log&&console.log("[cycle] "+Array.prototype.join.call(arguments," "))}function a(e,g,l){var n=c(e).data("cycle.opts"),m=!!e.cyclePause;if(m&&n.paused)n.paused(e,n,g,l);else!m&&n.resumed&&n.resumed(e,n,g,l)}function h(e,g,l){function n(f,q,t){if(!f&&q===true){f=c(t).data("cycle.opts");if(!f){d("options not found, can not resume");return false}if(t.cycleTimeout){clearTimeout(t.cycleTimeout);t.cycleTimeout=0}F(f.elements,
f,1,!f.backwards)}}if(e.cycleStop==undefined)e.cycleStop=0;if(g===undefined||g===null)g={};if(g.constructor==String){switch(g){case "destroy":case "stop":l=c(e).data("cycle.opts");if(!l)return false;e.cycleStop++;e.cycleTimeout&&clearTimeout(e.cycleTimeout);e.cycleTimeout=0;l.elements&&c(l.elements).stop();c(e).removeData("cycle.opts");g=="destroy"&&j(l);return false;case "toggle":e.cyclePause=e.cyclePause===1?0:1;n(e.cyclePause,l,e);a(e);return false;case "pause":e.cyclePause=1;a(e);return false;
case "resume":e.cyclePause=0;n(false,l,e);a(e);return false;case "prev":case "next":l=c(e).data("cycle.opts");if(!l){d('options not found, "prev/next" ignored');return false}c.fn.cycle[g](l);return false;default:g={fx:g}}return g}else if(g.constructor==Number){var m=g;g=c(e).data("cycle.opts");if(!g){d("options not found, can not advance slide");return false}if(m<0||m>=g.elements.length){d("invalid slide index: "+m);return false}g.nextSlide=m;if(e.cycleTimeout){clearTimeout(e.cycleTimeout);e.cycleTimeout=
0}if(typeof l=="string")g.oneTimeFx=l;F(g.elements,g,1,m>=g.currSlide);return false}return g}function i(e,g){if(!c.support.opacity&&g.cleartype&&e.style.filter)try{e.style.removeAttribute("filter")}catch(l){}}function j(e){e.next&&c(e.next).unbind(e.prevNextEvent);e.prev&&c(e.prev).unbind(e.prevNextEvent);if(e.pager||e.pagerAnchorBuilder)c.each(e.pagerAnchors||[],function(){this.unbind().remove()});e.pagerAnchors=null;e.destroy&&e.destroy(e)}function r(e,g,l,n,m){var f=c.extend({},c.fn.cycle.defaults,
n||{},c.metadata?e.metadata():c.meta?e.data():{}),q=c.isFunction(e.data)?e.data(f.metaAttr):null;if(q)f=c.extend(f,q);if(f.autostop)f.countdown=f.autostopCount||l.length;var t=e[0];e.data("cycle.opts",f);f.$cont=e;f.stopCount=t.cycleStop;f.elements=l;f.before=f.before?[f.before]:[];f.after=f.after?[f.after]:[];!c.support.opacity&&f.cleartype&&f.after.push(function(){i(this,f)});f.continuous&&f.after.push(function(){F(l,f,0,!f.backwards)});s(f);!c.support.opacity&&f.cleartype&&!f.cleartypeNoBg&&D(g);
e.css("position")=="static"&&e.css("position","relative");f.width&&e.width(f.width);f.height&&f.height!="auto"&&e.height(f.height);if(f.startingSlide)f.startingSlide=parseInt(f.startingSlide,10);else if(f.backwards)f.startingSlide=l.length-1;if(f.random){f.randomMap=[];for(q=0;q<l.length;q++)f.randomMap.push(q);f.randomMap.sort(function(){return Math.random()-0.5});f.randomIndex=1;f.startingSlide=f.randomMap[1]}else if(f.startingSlide>=l.length)f.startingSlide=0;f.currSlide=f.startingSlide||0;var y=
f.startingSlide;g.css({position:"absolute",top:0,left:0}).hide().each(function(v){v=f.backwards?y?v<=y?l.length+(v-y):y-v:l.length-v:y?v>=y?l.length-(v-y):y-v:l.length-v;c(this).css("z-index",v)});c(l[y]).css("opacity",1).show();i(l[y],f);if(f.fit)if(f.aspect)g.each(function(){var v=c(this),E=f.aspect===true?v.width()/v.height():f.aspect;if(f.width&&v.width()!=f.width){v.width(f.width);v.height(f.width/E)}if(f.height&&v.height()<f.height){v.height(f.height);v.width(f.height*E)}});else{f.width&&g.width(f.width);
f.height&&f.height!="auto"&&g.height(f.height)}if(f.center&&(!f.fit||f.aspect))g.each(function(){var v=c(this);v.css({"margin-left":f.width?(f.width-v.width())/2+"px":0,"margin-top":f.height?(f.height-v.height())/2+"px":0})});f.center&&!f.fit&&!f.slideResize&&g.each(function(){var v=c(this);v.css({"margin-left":f.width?(f.width-v.width())/2+"px":0,"margin-top":f.height?(f.height-v.height())/2+"px":0})});if(f.containerResize&&!e.innerHeight()){for(var B=q=0,I=0;I<l.length;I++){var x=c(l[I]),T=x[0],
O=x.outerWidth(),aa=x.outerHeight();O||(O=T.offsetWidth||T.width||x.attr("width"));aa||(aa=T.offsetHeight||T.height||x.attr("height"));q=O>q?O:q;B=aa>B?aa:B}q>0&&B>0&&e.css({width:q+"px",height:B+"px"})}var ea=false;f.pause&&e.hover(function(){ea=true;this.cyclePause++;a(t,true)},function(){ea&&this.cyclePause--;a(t,true)});if(w(f)===false)return false;var fa=false;n.requeueAttempts=n.requeueAttempts||0;g.each(function(){var v=c(this);this.cycleH=f.fit&&f.height?f.height:v.height()||this.offsetHeight||
this.height||v.attr("height")||0;this.cycleW=f.fit&&f.width?f.width:v.width()||this.offsetWidth||this.width||v.attr("width")||0;if(v.is("img")){v=c.browser.mozilla&&this.cycleW==34&&this.cycleH==19&&!this.complete;var E=c.browser.opera&&(this.cycleW==42&&this.cycleH==19||this.cycleW==37&&this.cycleH==17)&&!this.complete,J=this.cycleH==0&&this.cycleW==0&&!this.complete;if(c.browser.msie&&this.cycleW==28&&this.cycleH==30&&!this.complete||v||E||J)if(m.s&&f.requeueOnImageNotLoaded&&++n.requeueAttempts<
100){d(n.requeueAttempts," - img slide not loaded, requeuing slideshow: ",this.src,this.cycleW,this.cycleH);setTimeout(function(){c(m.s,m.c).cycle(n)},f.requeueTimeout);fa=true;return false}else d("could not determine size of image: "+this.src,this.cycleW,this.cycleH)}return true});if(fa)return false;f.cssBefore=f.cssBefore||{};f.cssAfter=f.cssAfter||{};f.cssFirst=f.cssFirst||{};f.animIn=f.animIn||{};f.animOut=f.animOut||{};g.not(":eq("+y+")").css(f.cssBefore);c(g[y]).css(f.cssFirst);if(f.timeout){f.timeout=
parseInt(f.timeout,10);if(f.speed.constructor==String)f.speed=c.fx.speeds[f.speed]||parseInt(f.speed,10);f.sync||(f.speed/=2);for(q=f.fx=="none"?0:f.fx=="shuffle"?500:250;f.timeout-f.speed<q;)f.timeout+=f.speed}if(f.easing)f.easeIn=f.easeOut=f.easing;if(!f.speedIn)f.speedIn=f.speed;if(!f.speedOut)f.speedOut=f.speed;f.slideCount=l.length;f.currSlide=f.lastSlide=y;if(f.random){if(++f.randomIndex==l.length)f.randomIndex=0;f.nextSlide=f.randomMap[f.randomIndex]}else f.nextSlide=f.backwards?f.startingSlide==
0?l.length-1:f.startingSlide-1:f.startingSlide>=l.length-1?0:f.startingSlide+1;if(!f.multiFx){q=c.fn.cycle.transitions[f.fx];if(c.isFunction(q))q(e,g,f);else if(f.fx!="custom"&&!f.multiFx){d("unknown transition: "+f.fx,"; slideshow terminating");return false}}e=g[y];if(!f.skipInitializationCallbacks){f.before.length&&f.before[0].apply(e,[e,e,f,true]);f.after.length&&f.after[0].apply(e,[e,e,f,true])}f.next&&c(f.next).bind(f.prevNextEvent,function(){return V(f,1)});f.prev&&c(f.prev).bind(f.prevNextEvent,
function(){return V(f,0)});if(f.pager||f.pagerAnchorBuilder)R(l,f);U(f,l);return f}function s(e){e.original={before:[],after:[]};e.original.cssBefore=c.extend({},e.cssBefore);e.original.cssAfter=c.extend({},e.cssAfter);e.original.animIn=c.extend({},e.animIn);e.original.animOut=c.extend({},e.animOut);c.each(e.before,function(){e.original.before.push(this)});c.each(e.after,function(){e.original.after.push(this)})}function w(e){var g,l,n=c.fn.cycle.transitions;if(e.fx.indexOf(",")>0){e.multiFx=true;
e.fxs=e.fx.replace(/\s*/g,"").split(",");for(g=0;g<e.fxs.length;g++){var m=e.fxs[g];l=n[m];if(!l||!n.hasOwnProperty(m)||!c.isFunction(l)){d("discarding unknown transition: ",m);e.fxs.splice(g,1);g--}}if(!e.fxs.length){d("No valid transitions named; slideshow terminating.");return false}}else if(e.fx=="all"){e.multiFx=true;e.fxs=[];for(p in n){l=n[p];n.hasOwnProperty(p)&&c.isFunction(l)&&e.fxs.push(p)}}if(e.multiFx&&e.randomizeEffects){l=Math.floor(Math.random()*20)+30;for(g=0;g<l;g++)e.fxs.push(e.fxs.splice(Math.floor(Math.random()*
e.fxs.length),1)[0]);b("randomized fx sequence: ",e.fxs)}return true}function U(e,g){e.addSlide=function(l,n){var m=c(l),f=m[0];e.autostopCount||e.countdown++;g[n?"unshift":"push"](f);if(e.els)e.els[n?"unshift":"push"](f);e.slideCount=g.length;m.css("position","absolute");m[n?"prependTo":"appendTo"](e.$cont);if(n){e.currSlide++;e.nextSlide++}!c.support.opacity&&e.cleartype&&!e.cleartypeNoBg&&D(m);e.fit&&e.width&&m.width(e.width);e.fit&&e.height&&e.height!="auto"&&m.height(e.height);f.cycleH=e.fit&&
e.height?e.height:m.height();f.cycleW=e.fit&&e.width?e.width:m.width();m.css(e.cssBefore);if(e.pager||e.pagerAnchorBuilder)c.fn.cycle.createPagerAnchor(g.length-1,f,c(e.pager),g,e);c.isFunction(e.onAddSlide)?e.onAddSlide(m):m.hide()}}function F(e,g,l,n){if(l&&g.busy&&g.manualTrump){b("manualTrump in go(), stopping active transition");c(e).stop(true,true);g.busy=0}if(g.busy)b("transition active, ignoring new tx request");else{var m=g.$cont[0],f=e[g.currSlide],q=e[g.nextSlide];if(!(m.cycleStop!=g.stopCount||
m.cycleTimeout===0&&!l))if(!l&&!m.cyclePause&&!g.bounce&&(g.autostop&&--g.countdown<=0||g.nowrap&&!g.random&&g.nextSlide<g.currSlide))g.end&&g.end(g);else{var t=false;if((l||!m.cyclePause)&&g.nextSlide!=g.currSlide){t=true;var y=g.fx;f.cycleH=f.cycleH||c(f).height();f.cycleW=f.cycleW||c(f).width();q.cycleH=q.cycleH||c(q).height();q.cycleW=q.cycleW||c(q).width();if(g.multiFx){if(n&&(g.lastFx==undefined||++g.lastFx>=g.fxs.length))g.lastFx=0;else if(!n&&(g.lastFx==undefined||--g.lastFx<0))g.lastFx=g.fxs.length-
1;y=g.fxs[g.lastFx]}if(g.oneTimeFx){y=g.oneTimeFx;g.oneTimeFx=null}c.fn.cycle.resetState(g,y);g.before.length&&c.each(g.before,function(I,x){m.cycleStop==g.stopCount&&x.apply(q,[f,q,g,n])});var B=function(){g.busy=0;c.each(g.after,function(I,x){m.cycleStop==g.stopCount&&x.apply(q,[f,q,g,n])})};b("tx firing("+y+"); currSlide: "+g.currSlide+"; nextSlide: "+g.nextSlide);g.busy=1;if(g.fxFn)g.fxFn(f,q,g,B,n,l&&g.fastOnEvent);else c.isFunction(c.fn.cycle[g.fx])?c.fn.cycle[g.fx](f,q,g,B,n,l&&g.fastOnEvent):
c.fn.cycle.custom(f,q,g,B,n,l&&g.fastOnEvent)}if(t||g.nextSlide==g.currSlide){g.lastSlide=g.currSlide;if(g.random){g.currSlide=g.nextSlide;if(++g.randomIndex==e.length)g.randomIndex=0;g.nextSlide=g.randomMap[g.randomIndex];if(g.nextSlide==g.currSlide)g.nextSlide=g.currSlide==g.slideCount-1?0:g.currSlide+1}else if(g.backwards)if((l=g.nextSlide-1<0)&&g.bounce){g.backwards=!g.backwards;g.nextSlide=1;g.currSlide=0}else{g.nextSlide=l?e.length-1:g.nextSlide-1;g.currSlide=l?0:g.nextSlide+1}else if((l=g.nextSlide+
1==e.length)&&g.bounce){g.backwards=!g.backwards;g.nextSlide=e.length-2;g.currSlide=e.length-1}else{g.nextSlide=l?0:g.nextSlide+1;g.currSlide=l?e.length-1:g.nextSlide-1}}t&&g.pager&&g.updateActivePagerLink(g.pager,g.currSlide,g.activePagerClass);t=0;if(g.timeout&&!g.continuous)t=P(e[g.currSlide],e[g.nextSlide],g,n);else if(g.continuous&&m.cyclePause)t=10;if(t>0)m.cycleTimeout=setTimeout(function(){F(e,g,0,!g.backwards)},t)}}}function P(e,g,l,n){if(l.timeoutFn){for(e=l.timeoutFn.call(e,e,g,l,n);l.fx!=
"none"&&e-l.speed<250;)e+=l.speed;b("calculated timeout: "+e+"; speed: "+l.speed);if(e!==false)return e}return l.timeout}function V(e,g){var l=g?1:-1,n=e.elements,m=e.$cont[0],f=m.cycleTimeout;if(f){clearTimeout(f);m.cycleTimeout=0}if(e.random&&l<0){e.randomIndex--;if(--e.randomIndex==-2)e.randomIndex=n.length-2;else if(e.randomIndex==-1)e.randomIndex=n.length-1;e.nextSlide=e.randomMap[e.randomIndex]}else if(e.random)e.nextSlide=e.randomMap[e.randomIndex];else{e.nextSlide=e.currSlide+l;if(e.nextSlide<
0){if(e.nowrap)return false;e.nextSlide=n.length-1}else if(e.nextSlide>=n.length){if(e.nowrap)return false;e.nextSlide=0}}m=e.onPrevNextEvent||e.prevNextClick;c.isFunction(m)&&m(l>0,e.nextSlide,n[e.nextSlide]);F(n,e,1,g);return false}function R(e,g){var l=c(g.pager);c.each(e,function(n,m){c.fn.cycle.createPagerAnchor(n,m,l,e,g)});g.updateActivePagerLink(g.pager,g.startingSlide,g.activePagerClass)}function D(e){function g(n){n=parseInt(n,10).toString(16);return n.length<2?"0"+n:n}function l(n){for(;n&&
n.nodeName.toLowerCase()!="html";n=n.parentNode){var m=c.css(n,"background-color");if(m&&m.indexOf("rgb")>=0){n=m.match(/\d+/g);return"#"+g(n[0])+g(n[1])+g(n[2])}if(m&&m!="transparent")return m}return"#ffffff"}b("applying clearType background-color hack");e.each(function(){c(this).css("background-color",l(this))})}if(c.support==undefined)c.support={opacity:!c.browser.msie};c.expr[":"].paused=function(e){return e.cyclePause};c.fn.cycle=function(e,g){var l={s:this.selector,c:this.context};if(this.length===
0&&e!="stop"){if(!c.isReady&&l.s){d("DOM not ready, queuing slideshow");c(function(){c(l.s,l.c).cycle(e,g)});return this}d("terminating; zero elements found by selector"+(c.isReady?"":" (DOM not ready)"));return this}return this.each(function(){var n=h(this,e,g);if(n!==false){n.updateActivePagerLink=n.updateActivePagerLink||c.fn.cycle.updateActivePagerLink;this.cycleTimeout&&clearTimeout(this.cycleTimeout);this.cycleTimeout=this.cyclePause=0;var m=c(this),f=n.slideExpr?c(n.slideExpr,this):m.children(),
q=f.get(),t=r(m,f,q,n,l);if(t!==false)if(q.length<2)d("terminating; too few slides: "+q.length);else if(m=t.continuous?10:P(q[t.currSlide],q[t.nextSlide],t,!t.backwards)){m+=t.delay||0;if(m<10)m=10;b("first timeout: "+m);this.cycleTimeout=setTimeout(function(){F(q,t,0,!n.backwards)},m)}}})};c.fn.cycle.resetState=function(e,g){g=g||e.fx;e.before=[];e.after=[];e.cssBefore=c.extend({},e.original.cssBefore);e.cssAfter=c.extend({},e.original.cssAfter);e.animIn=c.extend({},e.original.animIn);e.animOut=
c.extend({},e.original.animOut);e.fxFn=null;c.each(e.original.before,function(){e.before.push(this)});c.each(e.original.after,function(){e.after.push(this)});var l=c.fn.cycle.transitions[g];c.isFunction(l)&&l(e.$cont,c(e.elements),e)};c.fn.cycle.updateActivePagerLink=function(e,g,l){c(e).each(function(){c(this).children().removeClass(l).eq(g).addClass(l)})};c.fn.cycle.next=function(e){V(e,1)};c.fn.cycle.prev=function(e){V(e,0)};c.fn.cycle.createPagerAnchor=function(e,g,l,n,m){if(c.isFunction(m.pagerAnchorBuilder)){g=
m.pagerAnchorBuilder(e,g);b("pagerAnchorBuilder("+e+", el) returned: "+g)}else g='<a href="#">'+(e+1)+"</a>";if(g){var f=c(g);if(f.parents("body").length===0){var q=[];if(l.length>1){l.each(function(){var B=f.clone(true);c(this).append(B);q.push(B[0])});f=c(q)}else f.appendTo(l)}m.pagerAnchors=m.pagerAnchors||[];m.pagerAnchors.push(f);l=function(B){B.preventDefault();m.nextSlide=e;B=m.$cont[0];var I=B.cycleTimeout;if(I){clearTimeout(I);B.cycleTimeout=0}B=m.onPagerEvent||m.pagerClick;c.isFunction(B)&&
B(m.nextSlide,n[m.nextSlide]);F(n,m,1,m.currSlide<e)};/mouseenter|mouseover/i.test(m.pagerEvent)?f.hover(l,function(){}):f.bind(m.pagerEvent,l);!/^click/.test(m.pagerEvent)&&!m.allowPagerClickBubble&&f.bind("click.cycle",function(){return false});var t=m.$cont[0],y=false;m.pauseOnPagerHover&&f.hover(function(){y=true;t.cyclePause++;a(t,true,true)},function(){y&&t.cyclePause--;a(t,true,true)})}};c.fn.cycle.hopsFromLast=function(e,g){var l=e.lastSlide,n=e.currSlide;return g?n>l?n-l:e.slideCount-l:n<
l?l-n:l+e.slideCount-n};c.fn.cycle.commonReset=function(e,g,l,n,m,f){c(l.elements).not(e).hide();if(typeof l.cssBefore.opacity=="undefined")l.cssBefore.opacity=1;l.cssBefore.display="block";if(l.slideResize&&n!==false&&g.cycleW>0)l.cssBefore.width=g.cycleW;if(l.slideResize&&m!==false&&g.cycleH>0)l.cssBefore.height=g.cycleH;l.cssAfter=l.cssAfter||{};l.cssAfter.display="none";c(e).css("zIndex",l.slideCount+(f===true?1:0));c(g).css("zIndex",l.slideCount+(f===true?0:1))};c.fn.cycle.custom=function(e,
g,l,n,m,f){var q=c(e),t=c(g),y=l.speedIn;e=l.speedOut;var B=l.easeIn;g=l.easeOut;t.css(l.cssBefore);if(f){y=typeof f=="number"?e=f:e=1;B=g=null}var I=function(){t.animate(l.animIn,y,B,function(){n()})};q.animate(l.animOut,e,g,function(){q.css(l.cssAfter);l.sync||I()});l.sync&&I()};c.fn.cycle.transitions={fade:function(e,g,l){g.not(":eq("+l.currSlide+")").css("opacity",0);l.before.push(function(n,m,f){c.fn.cycle.commonReset(n,m,f);f.cssBefore.opacity=0});l.animIn={opacity:1};l.animOut={opacity:0};
l.cssBefore={top:0,left:0}}};c.fn.cycle.ver=function(){return"2.9995"};c.fn.cycle.defaults={activePagerClass:"activeSlide",after:null,allowPagerClickBubble:false,animIn:null,animOut:null,aspect:false,autostop:0,autostopCount:0,backwards:false,before:null,center:null,cleartype:!c.support.opacity,cleartypeNoBg:false,containerResize:1,continuous:0,cssAfter:null,cssBefore:null,delay:0,easeIn:null,easeOut:null,easing:null,end:null,fastOnEvent:0,fit:0,fx:"fade",fxFn:null,height:"auto",manualTrump:true,
metaAttr:"cycle",next:null,nowrap:0,onPagerEvent:null,onPrevNextEvent:null,pager:null,pagerAnchorBuilder:null,pagerEvent:"click.cycle",pause:0,pauseOnPagerHover:0,prev:null,prevNextEvent:"click.cycle",random:0,randomizeEffects:1,requeueOnImageNotLoaded:true,requeueTimeout:250,rev:0,shuffle:null,skipInitializationCallbacks:false,slideExpr:null,slideResize:1,speed:1E3,speedIn:null,speedOut:null,startingSlide:0,sync:1,timeout:4E3,timeoutFn:null,updateActivePagerLink:null,width:null}})(jQuery);
(function(c){c.fn.cycle.transitions.none=function(b,d,a){a.fxFn=function(h,i,j,r){c(i).show();c(h).hide();r()}};c.fn.cycle.transitions.fadeout=function(b,d,a){d.not(":eq("+a.currSlide+")").css({display:"block",opacity:1});a.before.push(function(h,i,j,r,s,w){c(h).css("zIndex",j.slideCount+(!w===true?1:0));c(i).css("zIndex",j.slideCount+(!w===true?0:1))});a.animIn.opacity=1;a.animOut.opacity=0;a.cssBefore.opacity=1;a.cssBefore.display="block";a.cssAfter.zIndex=0};c.fn.cycle.transitions.scrollUp=function(b,
d,a){b.css("overflow","hidden");a.before.push(c.fn.cycle.commonReset);b=b.height();a.cssBefore.top=b;a.cssBefore.left=0;a.cssFirst.top=0;a.animIn.top=0;a.animOut.top=-b};c.fn.cycle.transitions.scrollDown=function(b,d,a){b.css("overflow","hidden");a.before.push(c.fn.cycle.commonReset);b=b.height();a.cssFirst.top=0;a.cssBefore.top=-b;a.cssBefore.left=0;a.animIn.top=0;a.animOut.top=b};c.fn.cycle.transitions.scrollLeft=function(b,d,a){b.css("overflow","hidden");a.before.push(c.fn.cycle.commonReset);b=
b.width();a.cssFirst.left=0;a.cssBefore.left=b;a.cssBefore.top=0;a.animIn.left=0;a.animOut.left=0-b};c.fn.cycle.transitions.scrollRight=function(b,d,a){b.css("overflow","hidden");a.before.push(c.fn.cycle.commonReset);b=b.width();a.cssFirst.left=0;a.cssBefore.left=-b;a.cssBefore.top=0;a.animIn.left=0;a.animOut.left=b};c.fn.cycle.transitions.scrollHorz=function(b,d,a){b.css("overflow","hidden").width();a.before.push(function(h,i,j,r){if(j.rev)r=!r;c.fn.cycle.commonReset(h,i,j);j.cssBefore.left=r?i.cycleW-
1:1-i.cycleW;j.animOut.left=r?-h.cycleW:h.cycleW});a.cssFirst.left=0;a.cssBefore.top=0;a.animIn.left=0;a.animOut.top=0};c.fn.cycle.transitions.scrollVert=function(b,d,a){b.css("overflow","hidden");a.before.push(function(h,i,j,r){if(j.rev)r=!r;c.fn.cycle.commonReset(h,i,j);j.cssBefore.top=r?1-i.cycleH:i.cycleH-1;j.animOut.top=r?h.cycleH:-h.cycleH});a.cssFirst.top=0;a.cssBefore.left=0;a.animIn.top=0;a.animOut.left=0};c.fn.cycle.transitions.slideX=function(b,d,a){a.before.push(function(h,i,j){c(j.elements).not(h).hide();
c.fn.cycle.commonReset(h,i,j,false,true);j.animIn.width=i.cycleW});a.cssBefore.left=0;a.cssBefore.top=0;a.cssBefore.width=0;a.animIn.width="show";a.animOut.width=0};c.fn.cycle.transitions.slideY=function(b,d,a){a.before.push(function(h,i,j){c(j.elements).not(h).hide();c.fn.cycle.commonReset(h,i,j,true,false);j.animIn.height=i.cycleH});a.cssBefore.left=0;a.cssBefore.top=0;a.cssBefore.height=0;a.animIn.height="show";a.animOut.height=0};c.fn.cycle.transitions.shuffle=function(b,d,a){b=b.css("overflow",
"visible").width();d.css({left:0,top:0});a.before.push(function(h,i,j){c.fn.cycle.commonReset(h,i,j,true,true,true)});if(!a.speedAdjusted){a.speed/=2;a.speedAdjusted=true}a.random=0;a.shuffle=a.shuffle||{left:-b,top:15};a.els=[];for(b=0;b<d.length;b++)a.els.push(d[b]);for(b=0;b<a.currSlide;b++)a.els.push(a.els.shift());a.fxFn=function(h,i,j,r,s){if(j.rev)s=!s;var w=s?c(h):c(i);c(i).css(j.cssBefore);var U=j.slideCount;w.animate(j.shuffle,j.speedIn,j.easeIn,function(){for(var F=c.fn.cycle.hopsFromLast(j,
s),P=0;P<F;P++)s?j.els.push(j.els.shift()):j.els.unshift(j.els.pop());if(s){F=0;for(P=j.els.length;F<P;F++)c(j.els[F]).css("z-index",P-F+U)}else{F=c(h).css("z-index");w.css("z-index",parseInt(F,10)+1+U)}w.animate({left:0,top:0},j.speedOut,j.easeOut,function(){c(s?this:h).hide();r&&r()})})};c.extend(a.cssBefore,{display:"block",opacity:1,top:0,left:0})};c.fn.cycle.transitions.turnUp=function(b,d,a){a.before.push(function(h,i,j){c.fn.cycle.commonReset(h,i,j,true,false);j.cssBefore.top=i.cycleH;j.animIn.height=
i.cycleH;j.animOut.width=i.cycleW});a.cssFirst.top=0;a.cssBefore.left=0;a.cssBefore.height=0;a.animIn.top=0;a.animOut.height=0};c.fn.cycle.transitions.turnDown=function(b,d,a){a.before.push(function(h,i,j){c.fn.cycle.commonReset(h,i,j,true,false);j.animIn.height=i.cycleH;j.animOut.top=h.cycleH});a.cssFirst.top=0;a.cssBefore.left=0;a.cssBefore.top=0;a.cssBefore.height=0;a.animOut.height=0};c.fn.cycle.transitions.turnLeft=function(b,d,a){a.before.push(function(h,i,j){c.fn.cycle.commonReset(h,i,j,false,
true);j.cssBefore.left=i.cycleW;j.animIn.width=i.cycleW});a.cssBefore.top=0;a.cssBefore.width=0;a.animIn.left=0;a.animOut.width=0};c.fn.cycle.transitions.turnRight=function(b,d,a){a.before.push(function(h,i,j){c.fn.cycle.commonReset(h,i,j,false,true);j.animIn.width=i.cycleW;j.animOut.left=h.cycleW});c.extend(a.cssBefore,{top:0,left:0,width:0});a.animIn.left=0;a.animOut.width=0};c.fn.cycle.transitions.zoom=function(b,d,a){a.before.push(function(h,i,j){c.fn.cycle.commonReset(h,i,j,false,false,true);
j.cssBefore.top=i.cycleH/2;j.cssBefore.left=i.cycleW/2;c.extend(j.animIn,{top:0,left:0,width:i.cycleW,height:i.cycleH});c.extend(j.animOut,{width:0,height:0,top:h.cycleH/2,left:h.cycleW/2})});a.cssFirst.top=0;a.cssFirst.left=0;a.cssBefore.width=0;a.cssBefore.height=0};c.fn.cycle.transitions.fadeZoom=function(b,d,a){a.before.push(function(h,i,j){c.fn.cycle.commonReset(h,i,j,false,false);j.cssBefore.left=i.cycleW/2;j.cssBefore.top=i.cycleH/2;c.extend(j.animIn,{top:0,left:0,width:i.cycleW,height:i.cycleH})});
a.cssBefore.width=0;a.cssBefore.height=0;a.animOut.opacity=0};c.fn.cycle.transitions.blindX=function(b,d,a){b=b.css("overflow","hidden").width();a.before.push(function(h,i,j){c.fn.cycle.commonReset(h,i,j);j.animIn.width=i.cycleW;j.animOut.left=h.cycleW});a.cssBefore.left=b;a.cssBefore.top=0;a.animIn.left=0;a.animOut.left=b};c.fn.cycle.transitions.blindY=function(b,d,a){b=b.css("overflow","hidden").height();a.before.push(function(h,i,j){c.fn.cycle.commonReset(h,i,j);j.animIn.height=i.cycleH;j.animOut.top=
h.cycleH});a.cssBefore.top=b;a.cssBefore.left=0;a.animIn.top=0;a.animOut.top=b};c.fn.cycle.transitions.blindZ=function(b,d,a){d=b.css("overflow","hidden").height();b=b.width();a.before.push(function(h,i,j){c.fn.cycle.commonReset(h,i,j);j.animIn.height=i.cycleH;j.animOut.top=h.cycleH});a.cssBefore.top=d;a.cssBefore.left=b;a.animIn.top=0;a.animIn.left=0;a.animOut.top=d;a.animOut.left=b};c.fn.cycle.transitions.growX=function(b,d,a){a.before.push(function(h,i,j){c.fn.cycle.commonReset(h,i,j,false,true);
j.cssBefore.left=this.cycleW/2;j.animIn.left=0;j.animIn.width=this.cycleW;j.animOut.left=0});a.cssBefore.top=0;a.cssBefore.width=0};c.fn.cycle.transitions.growY=function(b,d,a){a.before.push(function(h,i,j){c.fn.cycle.commonReset(h,i,j,true,false);j.cssBefore.top=this.cycleH/2;j.animIn.top=0;j.animIn.height=this.cycleH;j.animOut.top=0});a.cssBefore.height=0;a.cssBefore.left=0};c.fn.cycle.transitions.curtainX=function(b,d,a){a.before.push(function(h,i,j){c.fn.cycle.commonReset(h,i,j,false,true,true);
j.cssBefore.left=i.cycleW/2;j.animIn.left=0;j.animIn.width=this.cycleW;j.animOut.left=h.cycleW/2;j.animOut.width=0});a.cssBefore.top=0;a.cssBefore.width=0};c.fn.cycle.transitions.curtainY=function(b,d,a){a.before.push(function(h,i,j){c.fn.cycle.commonReset(h,i,j,true,false,true);j.cssBefore.top=i.cycleH/2;j.animIn.top=0;j.animIn.height=i.cycleH;j.animOut.top=h.cycleH/2;j.animOut.height=0});a.cssBefore.height=0;a.cssBefore.left=0};c.fn.cycle.transitions.cover=function(b,d,a){var h=a.direction||"left",
i=b.css("overflow","hidden").width(),j=b.height();a.before.push(function(r,s,w){c.fn.cycle.commonReset(r,s,w);if(h=="right")w.cssBefore.left=-i;else if(h=="up")w.cssBefore.top=j;else if(h=="down")w.cssBefore.top=-j;else w.cssBefore.left=i});a.animIn.left=0;a.animIn.top=0;a.cssBefore.top=0;a.cssBefore.left=0};c.fn.cycle.transitions.uncover=function(b,d,a){var h=a.direction||"left",i=b.css("overflow","hidden").width(),j=b.height();a.before.push(function(r,s,w){c.fn.cycle.commonReset(r,s,w,true,true,
true);if(h=="right")w.animOut.left=i;else if(h=="up")w.animOut.top=-j;else if(h=="down")w.animOut.top=j;else w.animOut.left=-i});a.animIn.left=0;a.animIn.top=0;a.cssBefore.top=0;a.cssBefore.left=0};c.fn.cycle.transitions.toss=function(b,d,a){var h=b.css("overflow","visible").width(),i=b.height();a.before.push(function(j,r,s){c.fn.cycle.commonReset(j,r,s,true,true,true);if(!s.animOut.left&&!s.animOut.top)c.extend(s.animOut,{left:h*2,top:-i/2,opacity:0});else s.animOut.opacity=0});a.cssBefore.left=
0;a.cssBefore.top=0;a.animIn.left=0};c.fn.cycle.transitions.wipe=function(b,d,a){var h=b.css("overflow","hidden").width(),i=b.height();a.cssBefore=a.cssBefore||{};var j;if(a.clip)if(/l2r/.test(a.clip))j="rect(0px 0px "+i+"px 0px)";else if(/r2l/.test(a.clip))j="rect(0px "+h+"px "+i+"px "+h+"px)";else if(/t2b/.test(a.clip))j="rect(0px "+h+"px 0px 0px)";else if(/b2t/.test(a.clip))j="rect("+i+"px "+h+"px "+i+"px 0px)";else if(/zoom/.test(a.clip)){b=parseInt(i/2,10);d=parseInt(h/2,10);j="rect("+b+"px "+
d+"px "+b+"px "+d+"px)"}a.cssBefore.clip=a.cssBefore.clip||j||"rect(0px 0px 0px 0px)";b=a.cssBefore.clip.match(/(\d+)/g);var r=parseInt(b[0],10),s=parseInt(b[1],10),w=parseInt(b[2],10),U=parseInt(b[3],10);a.before.push(function(F,P,V){if(F!=P){var R=c(F),D=c(P);c.fn.cycle.commonReset(F,P,V,true,true,false);V.cssAfter.display="block";var e=1,g=parseInt(V.speedIn/13,10)-1;(function l(){var n=r?r-parseInt(e*(r/g),10):0,m=U?U-parseInt(e*(U/g),10):0,f=w<i?w+parseInt(e*((i-w)/g||1),10):i,q=s<h?s+parseInt(e*
((h-s)/g||1),10):h;D.css({clip:"rect("+n+"px "+q+"px "+f+"px "+m+"px)"});e++<=g?setTimeout(l,13):R.css("display","none")})()}});c.extend(a.cssBefore,{display:"block",opacity:1,top:0,left:0});a.animIn={left:0};a.animOut={left:0}}})(jQuery);
(function(c,b){var d=function(a){return new d.prototype.init(a)};d.prototype={q:{},apiEndPoint:"/hifi/api",about:"HiFi API Version 1.0",init:function(a){this.q=$.extend(true,{},a);return this},setup:function(a){$.extend(true,d.prototype,a);return this},query:function(){return this.q},find:function(a){this.q=$.extend(true,this.q,a);return this},children:function(a){this.q=$.extend({parent:this.q},a);return this},orderBy:function(a){if(a===b)return this.q.orderBy;this.q.orderBy=a;return this},count:function(a){if(a===
b)return this.q.count;this.q.count=a;return this},versions:function(){this.q.fresh=[0,1];this.q.orderBy="-node";return this},request:function(a,h,i){if(i===b)i=this.q;if(h===b)h="GET";i=JSON.stringify(i);var j={},r=this;if(h=="GET")j.q=i;else j.data=i;$.ajax({url:this.apiEndPoint,type:h,data:j,dataType:"json",cache:false,success:function(s){r.s=true;$.isFunction(a)&&a(s.results,s.success)}});return this},each:function(a,h){return this.request(function(i){for(var j=0;j<i.length;j++){var r=i[j];$.isFunction(a)&&
a(r)}$.isFunction(h)&&h(i)})},get:function(a){this.request(a)},remove:function(a){this.update({fresh:0},a)},append:function(a,h){var i=this;return this.each(function(j){a.parent=j.id;i.create(a,h)})},promote:function(){var a=this;return this.each(function(h){a.q={id:h.id,node:h.node,fresh:1};a.update()})},create:function(a,h){$.isArray(a)||(a=[a]);for(var i=0;i<a.length;i++){var j=a[i];if(j.parent===b)throw"A parent is required for a create.";if(j.type===b)throw"A type is required for a create.";
}return this.request(h,"POST",a)},update:function(a,h){if($.isArray(a))this.request(h,"POST",a);else{var i=this;return this.request(function(j){j=$.map(j,function(r){return $.extend({id:r.id},a)});i.request(h,"POST",j)})}},destroy:function(a){this.q.fresh=0;if(this.q.id===b){console.log("An id is required for a destroy");return this}this.request(a,"POST")}};d.prototype.init.prototype=d.prototype;c.hifi=d})(window);
$(function(){$("a[rel=colorbox]").colorbox();$("#nav li").hover(function(){$(this).addClass("hover")},function(){$(this).removeClass("hover")});$("a[rel=email]").colorbox({inline:true,href:"#email",innerWidth:"400",innerHeight:"270",rel:"nofollow"}).click(function(){var c=$(this).data("email");if(c!==""){$("#email p a").attr("href","mailto:"+c);$("#email span").html(c)}});$("#practice-group").change(function(){$this=$(this);var c=$this.val();window.open("/articles?g="+c,"_self")});$("#slides").cycle({timeout:8E3,
speed:1E3,pager:"#pager",pagerAnchorBuilder:function(c){return"#pager li:eq("+c+") a"}});$("#pager li").hover(function(){$(this).addClass("hover")},function(){$(this).removeClass("hover")});$(".generated-form, #comment-form").validate();$("header form .query").each(function(){var c=$(this).attr("placeholder");$(this).val()===""&&$(this).val(c);$(this).blur(function(){$(this).val()===""&&$(this).val(c)}).focus(function(){$(this).val()===c&&$(this).val("")})});$.validator.addMethod("query",function(c){return c!==
""&&c!=="Search..."},"Please enter a search term");$("#search").validate();$("<div>&nbsp;</div>").css({clear:"both",height:"1px",overflow:"hidden"}).appendTo("#container");$("#practice-groups li:nth-child(even)").addClass("alternate")});

