(function(b){b.extend(b.fn,{validate:function(a){if(this.length){var e=b.data(this[0],"validator");if(e)return e;e=new b.validator(a,this[0]);b.data(this[0],"validator",e);if(e.settings.onsubmit){this.find("input, button").filter(".cancel").click(function(){e.cancelSubmit=true});e.settings.submitHandler&&this.find("input, button").filter(":submit").click(function(){e.submitButton=this});this.submit(function(g){function o(){if(e.settings.submitHandler){if(e.submitButton)var u=b("<input type='hidden'/>").attr("name",
e.submitButton.name).val(e.submitButton.value).appendTo(e.currentForm);e.settings.submitHandler.call(e,e.currentForm);e.submitButton&&u.remove();return false}return true}e.settings.debug&&g.preventDefault();if(e.cancelSubmit){e.cancelSubmit=false;return o()}if(e.form()){if(e.pendingRequest){e.formSubmitted=true;return false}return o()}else{e.focusInvalid();return false}})}return e}else a&&a.debug&&window.console&&console.warn("nothing selected, can't validate, returning nothing")},valid:function(){if(b(this[0]).is("form"))return this.validate().form();
else{var a=true,e=b(this[0].form).validate();this.each(function(){a&=e.element(this)});return a}},removeAttrs:function(a){var e={},g=this;b.each(a.split(/\s/),function(o,u){e[u]=g.attr(u);g.removeAttr(u)});return e},rules:function(a,e){var g=this[0];if(a){var o=b.data(g.form,"validator").settings,u=o.rules,D=b.validator.staticRules(g);switch(a){case "add":b.extend(D,b.validator.normalizeRule(e));u[g.name]=D;if(e.messages)o.messages[g.name]=b.extend(o.messages[g.name],e.messages);break;case "remove":if(!e){delete u[g.name];
return D}var C={};b.each(e.split(/\s/),function(z,G){C[G]=D[G];delete D[G]});return C}}g=b.validator.normalizeRules(b.extend({},b.validator.metadataRules(g),b.validator.classRules(g),b.validator.attributeRules(g),b.validator.staticRules(g)),g);if(g.required){o=g.required;delete g.required;g=b.extend({required:o},g)}return g}});b.extend(b.expr[":"],{blank:function(a){return!b.trim(""+a.value)},filled:function(a){return!!b.trim(""+a.value)},unchecked:function(a){return!a.checked}});b.validator=function(a,
e){this.settings=b.extend(true,{},b.validator.defaults,a);this.currentForm=e;this.init()};b.validator.format=function(a,e){if(arguments.length==1)return function(){var g=b.makeArray(arguments);g.unshift(a);return b.validator.format.apply(this,g)};if(arguments.length>2&&e.constructor!=Array)e=b.makeArray(arguments).slice(1);if(e.constructor!=Array)e=[e];b.each(e,function(g,o){a=a.replace(RegExp("\\{"+g+"\\}","g"),o)});return a};b.extend(b.validator,{defaults:{messages:{},groups:{},rules:{},errorClass:"error",
validClass:"valid",errorElement:"label",focusInvalid:true,errorContainer:b([]),errorLabelContainer:b([]),onsubmit:true,ignore:[],ignoreTitle:false,onfocusin:function(a){this.lastActive=a;if(this.settings.focusCleanup&&!this.blockFocusCleanup){this.settings.unhighlight&&this.settings.unhighlight.call(this,a,this.settings.errorClass,this.settings.validClass);this.errorsFor(a).hide()}},onfocusout:function(a){if(!this.checkable(a)&&(a.name in this.submitted||!this.optional(a)))this.element(a)},onkeyup:function(a){if(a.name in
this.submitted||a==this.lastElement)this.element(a)},onclick:function(a){if(a.name in this.submitted)this.element(a);else a.parentNode.name in this.submitted&&this.element(a.parentNode)},highlight:function(a,e,g){b(a).addClass(e).removeClass(g)},unhighlight:function(a,e,g){b(a).removeClass(e).addClass(g)}},setDefaults:function(a){b.extend(b.validator.defaults,a)},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:b.validator.format("Please enter no more than {0} characters."),minlength:b.validator.format("Please enter at least {0} characters."),rangelength:b.validator.format("Please enter a value between {0} and {1} characters long."),
range:b.validator.format("Please enter a value between {0} and {1}."),max:b.validator.format("Please enter a value less than or equal to {0}."),min:b.validator.format("Please enter a value greater than or equal to {0}.")},autoCreateRanges:false,prototype:{init:function(){function a(o){var u=b.data(this[0].form,"validator");o="on"+o.type.replace(/^validate/,"");u.settings[o]&&u.settings[o].call(u,this[0])}this.labelContainer=b(this.settings.errorLabelContainer);this.errorContext=this.labelContainer.length&&
this.labelContainer||b(this.currentForm);this.containers=b(this.settings.errorContainer).add(this.settings.errorLabelContainer);this.submitted={};this.valueCache={};this.pendingRequest=0;this.pending={};this.invalid={};this.reset();var e=this.groups={};b.each(this.settings.groups,function(o,u){b.each(u.split(/\s/),function(D,C){e[C]=o})});var g=this.settings.rules;b.each(g,function(o,u){g[o]=b.validator.normalizeRule(u)});b(this.currentForm).validateDelegate(":text, :password, :file, select, textarea",
"focusin focusout keyup",a).validateDelegate(":radio, :checkbox, select, option","click",a);this.settings.invalidHandler&&b(this.currentForm).bind("invalid-form.validate",this.settings.invalidHandler)},form:function(){this.checkForm();b.extend(this.submitted,this.errorMap);this.invalid=b.extend({},this.errorMap);this.valid()||b(this.currentForm).triggerHandler("invalid-form",[this]);this.showErrors();return this.valid()},checkForm:function(){this.prepareForm();for(var a=0,e=this.currentElements=this.elements();e[a];a++)this.check(e[a]);
return this.valid()},element:function(a){this.lastElement=a=this.clean(a);this.prepareElement(a);this.currentElements=b(a);var e=this.check(a);if(e)delete this.invalid[a.name];else this.invalid[a.name]=true;if(!this.numberOfInvalids())this.toHide=this.toHide.add(this.containers);this.showErrors();return e},showErrors:function(a){if(a){b.extend(this.errorMap,a);this.errorList=[];for(var e in a)this.errorList.push({message:a[e],element:this.findByName(e)[0]});this.successList=b.grep(this.successList,
function(g){return!(g.name in a)})}this.settings.showErrors?this.settings.showErrors.call(this,this.errorMap,this.errorList):this.defaultShowErrors()},resetForm:function(){b.fn.resetForm&&b(this.currentForm).resetForm();this.submitted={};this.prepareForm();this.hideErrors();this.elements().removeClass(this.settings.errorClass)},numberOfInvalids:function(){return this.objectLength(this.invalid)},objectLength:function(a){var e=0,g;for(g in a)e++;return e},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{b(this.findLastActive()||this.errorList.length&&this.errorList[0].element||[]).filter(":visible").focus().trigger("focusin")}catch(a){}},findLastActive:function(){var a=this.lastActive;return a&&b.grep(this.errorList,function(e){return e.element.name==a.name}).length==1&&a},elements:function(){var a=this,e={};return b([]).add(this.currentForm.elements).filter(":input").not(":submit, :reset, :image, [disabled]").not(this.settings.ignore).filter(function(){!this.name&&
a.settings.debug&&window.console&&console.error("%o has no name assigned",this);if(this.name in e||!a.objectLength(b(this).rules()))return false;return e[this.name]=true})},clean:function(a){return b(a)[0]},errors:function(){return b(this.settings.errorElement+"."+this.settings.errorClass,this.errorContext)},reset:function(){this.successList=[];this.errorList=[];this.errorMap={};this.toShow=b([]);this.toHide=b([]);this.currentElements=b([])},prepareForm:function(){this.reset();this.toHide=this.errors().add(this.containers)},
prepareElement:function(a){this.reset();this.toHide=this.errorsFor(a)},check:function(a){a=this.clean(a);if(this.checkable(a))a=this.findByName(a.name)[0];var e=b(a).rules(),g=false;for(method in e){var o={method:method,parameters:e[method]};try{var u=b.validator.methods[method].call(this,a.value.replace(/\r/g,""),a,o.parameters);if(u=="dependency-mismatch")g=true;else{g=false;if(u=="pending"){this.toHide=this.toHide.not(this.errorsFor(a));return}if(!u){this.formatAndAdd(a,o);return false}}}catch(D){this.settings.debug&&
window.console&&console.log("exception occured when checking element "+a.id+", check the '"+o.method+"' method",D);throw D;}}if(!g){this.objectLength(e)&&this.successList.push(a);return true}},customMetaMessage:function(a,e){if(b.metadata){var g=this.settings.meta?b(a).metadata()[this.settings.meta]:b(a).metadata();return g&&g.messages&&g.messages[e]}},customMessage:function(a,e){var g=this.settings.messages[a];return g&&(g.constructor==String?g:g[e])},findDefined:function(){for(var a=0;a<arguments.length;a++)if(arguments[a]!==
undefined)return arguments[a]},defaultMessage:function(a,e){return this.findDefined(this.customMessage(a.name,e),this.customMetaMessage(a,e),!this.settings.ignoreTitle&&a.title||undefined,b.validator.messages[e],"<strong>Warning: No message defined for "+a.name+"</strong>")},formatAndAdd:function(a,e){var g=this.defaultMessage(a,e.method),o=/\$?\{(\d+)\}/g;if(typeof g=="function")g=g.call(this,e.parameters,a);else if(o.test(g))g=jQuery.format(g.replace(o,"{$1}"),e.parameters);this.errorList.push({message:g,
element:a});this.errorMap[a.name]=g;this.submitted[a.name]=g},addWrapper:function(a){if(this.settings.wrapper)a=a.add(a.parent(this.settings.wrapper));return a},defaultShowErrors:function(){for(var a=0;this.errorList[a];a++){var e=this.errorList[a];this.settings.highlight&&this.settings.highlight.call(this,e.element,this.settings.errorClass,this.settings.validClass);this.showLabel(e.element,e.message)}if(this.errorList.length)this.toShow=this.toShow.add(this.containers);if(this.settings.success)for(a=
0;this.successList[a];a++)this.showLabel(this.successList[a]);if(this.settings.unhighlight){a=0;for(e=this.validElements();e[a];a++)this.settings.unhighlight.call(this,e[a],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 b(this.errorList).map(function(){return this.element})},showLabel:function(a,
e){var g=this.errorsFor(a);if(g.length){g.removeClass().addClass(this.settings.errorClass);g.attr("generated")&&g.html(e)}else{g=b("<"+this.settings.errorElement+"/>").attr({"for":this.idOrName(a),generated:true}).addClass(this.settings.errorClass).html(e||"");if(this.settings.wrapper)g=g.hide().show().wrap("<"+this.settings.wrapper+"/>").parent();this.labelContainer.append(g).length||(this.settings.errorPlacement?this.settings.errorPlacement(g,b(a)):g.insertAfter(a))}if(!e&&this.settings.success){g.text("");
typeof this.settings.success=="string"?g.addClass(this.settings.success):this.settings.success(g)}this.toShow=this.toShow.add(g)},errorsFor:function(a){var e=this.idOrName(a);return this.errors().filter(function(){return b(this).attr("for")==e})},idOrName:function(a){return this.groups[a.name]||(this.checkable(a)?a.name:a.id||a.name)},checkable:function(a){return/radio|checkbox/i.test(a.type)},findByName:function(a){var e=this.currentForm;return b(document.getElementsByName(a)).map(function(g,o){return o.form==
e&&o.name==a&&o||null})},getLength:function(a,e){switch(e.nodeName.toLowerCase()){case "select":return b("option:selected",e).length;case "input":if(this.checkable(e))return this.findByName(e.name).filter(":checked").length}return a.length},depend:function(a,e){return this.dependTypes[typeof a]?this.dependTypes[typeof a](a,e):true},dependTypes:{"boolean":function(a){return a},string:function(a,e){return!!b(a,e.form).length},"function":function(a,e){return a(e)}},optional:function(a){return!b.validator.methods.required.call(this,
b.trim(a.value),a)&&"dependency-mismatch"},startRequest:function(a){if(!this.pending[a.name]){this.pendingRequest++;this.pending[a.name]=true}},stopRequest:function(a,e){this.pendingRequest--;if(this.pendingRequest<0)this.pendingRequest=0;delete this.pending[a.name];if(e&&this.pendingRequest==0&&this.formSubmitted&&this.form()){b(this.currentForm).submit();this.formSubmitted=false}else if(!e&&this.pendingRequest==0&&this.formSubmitted){b(this.currentForm).triggerHandler("invalid-form",[this]);this.formSubmitted=
false}},previousValue:function(a){return b.data(a,"previousValue")||b.data(a,"previousValue",{old:null,valid:true,message:this.defaultMessage(a,"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(a,e){a.constructor==String?this.classRuleSettings[a]=e:b.extend(this.classRuleSettings,
a)},classRules:function(a){var e={};(a=b(a).attr("class"))&&b.each(a.split(" "),function(){this in b.validator.classRuleSettings&&b.extend(e,b.validator.classRuleSettings[this])});return e},attributeRules:function(a){var e={};a=b(a);for(method in b.validator.methods){var g=a.attr(method);if(g)e[method]=g}e.maxlength&&/-1|2147483647|524288/.test(e.maxlength)&&delete e.maxlength;return e},metadataRules:function(a){if(!b.metadata)return{};var e=b.data(a.form,"validator").settings.meta;return e?b(a).metadata()[e]:
b(a).metadata()},staticRules:function(a){var e={},g=b.data(a.form,"validator");if(g.settings.rules)e=b.validator.normalizeRule(g.settings.rules[a.name])||{};return e},normalizeRules:function(a,e){b.each(a,function(g,o){if(o===false)delete a[g];else if(o.param||o.depends){var u=true;switch(typeof o.depends){case "string":u=!!b(o.depends,e.form).length;break;case "function":u=o.depends.call(e,e)}if(u)a[g]=o.param!==undefined?o.param:true;else delete a[g]}});b.each(a,function(g,o){a[g]=b.isFunction(o)?
o(e):o});b.each(["minlength","maxlength","min","max"],function(){if(a[this])a[this]=Number(a[this])});b.each(["rangelength","range"],function(){if(a[this])a[this]=[Number(a[this][0]),Number(a[this][1])]});if(b.validator.autoCreateRanges){if(a.min&&a.max){a.range=[a.min,a.max];delete a.min;delete a.max}if(a.minlength&&a.maxlength){a.rangelength=[a.minlength,a.maxlength];delete a.minlength;delete a.maxlength}}a.messages&&delete a.messages;return a},normalizeRule:function(a){if(typeof a=="string"){var e=
{};b.each(a.split(/\s/),function(){e[this]=true});a=e}return a},addMethod:function(a,e,g){b.validator.methods[a]=e;b.validator.messages[a]=g!=undefined?g:b.validator.messages[a];e.length<3&&b.validator.addClassRules(a,b.validator.normalizeRule(a))},methods:{required:function(a,e,g){if(!this.depend(g,e))return"dependency-mismatch";switch(e.nodeName.toLowerCase()){case "select":return(a=b(e).val())&&a.length>0;case "input":if(this.checkable(e))return this.getLength(a,e)>0;default:return b.trim(a).length>
0}},remote:function(a,e,g){if(this.optional(e))return"dependency-mismatch";var o=this.previousValue(e);this.settings.messages[e.name]||(this.settings.messages[e.name]={});o.originalMessage=this.settings.messages[e.name].remote;this.settings.messages[e.name].remote=o.message;g=typeof g=="string"&&{url:g}||g;if(o.old!==a){o.old=a;var u=this;this.startRequest(e);var D={};D[e.name]=a;b.ajax(b.extend(true,{url:g,mode:"abort",port:"validate"+e.name,dataType:"json",data:D,success:function(C){u.settings.messages[e.name].remote=
o.originalMessage;var z=C===true;if(z){var G=u.formSubmitted;u.prepareElement(e);u.formSubmitted=G;u.successList.push(e);u.showErrors()}else{G={};C=o.message=C||u.defaultMessage(e,"remote");G[e.name]=b.isFunction(C)?C(a):C;u.showErrors(G)}o.valid=z;u.stopRequest(e,z)}},g));return"pending"}else if(this.pending[e.name])return"pending";return o.valid},minlength:function(a,e,g){return this.optional(e)||this.getLength(b.trim(a),e)>=g},maxlength:function(a,e,g){return this.optional(e)||this.getLength(b.trim(a),
e)<=g},rangelength:function(a,e,g){a=this.getLength(b.trim(a),e);return this.optional(e)||a>=g[0]&&a<=g[1]},min:function(a,e,g){return this.optional(e)||a>=g},max:function(a,e,g){return this.optional(e)||a<=g},range:function(a,e,g){return this.optional(e)||a>=g[0]&&a<=g[1]},email:function(a,e){return this.optional(e)||/^((([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(a)},
url:function(a,e){return this.optional(e)||/^(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(a)},
date:function(a,e){return this.optional(e)||!/Invalid|NaN/.test(new Date(a))},dateISO:function(a,e){return this.optional(e)||/^\d{4}[\/-]\d{1,2}[\/-]\d{1,2}$/.test(a)},number:function(a,e){return this.optional(e)||/^-?(?:\d+|\d{1,3}(?:,\d{3})+)(?:\.\d+)?$/.test(a)},digits:function(a,e){return this.optional(e)||/^\d+$/.test(a)},creditcard:function(a,e){if(this.optional(e))return"dependency-mismatch";if(/[^0-9-]+/.test(a))return false;var g=0,o=0,u=false;a=a.replace(/\D/g,"");for(var D=a.length-1;D>=
0;D--){o=a.charAt(D);o=parseInt(o,10);if(u)if((o*=2)>9)o-=9;g+=o;u=!u}return g%10==0},accept:function(a,e,g){g=typeof g=="string"?g.replace(/,/g,"|"):"png|jpe?g|gif";return this.optional(e)||a.match(RegExp(".("+g+")$","i"))},equalTo:function(a,e,g){g=b(g).unbind(".validate-equalTo").bind("blur.validate-equalTo",function(){b(e).valid()});return a==g.val()}}});b.format=b.validator.format})(jQuery);
(function(b){var a=b.ajax,e={};b.ajax=function(g){g=b.extend(g,b.extend({},b.ajaxSettings,g));var o=g.port;if(g.mode=="abort"){e[o]&&e[o].abort();return e[o]=a.apply(this,arguments)}return a.apply(this,arguments)}})(jQuery);
(function(b){!jQuery.event.special.focusin&&!jQuery.event.special.focusout&&document.addEventListener&&b.each({focus:"focusin",blur:"focusout"},function(a,e){function g(o){o=b.event.fix(o);o.type=e;return b.event.handle.call(this,o)}b.event.special[e]={setup:function(){this.addEventListener(a,g,true)},teardown:function(){this.removeEventListener(a,g,true)},handler:function(o){arguments[0]=b.event.fix(o);arguments[0].type=e;return b.event.handle.apply(this,arguments)}}});b.extend(b.fn,{validateDelegate:function(a,
e,g){return this.bind(e,function(o){var u=b(o.target);if(u.is(a))return g.apply(u,arguments)})}})})(jQuery);
(function(b){function a(d){b.fn.cycle.debug&&e(d)}function e(){window.console&&window.console.log&&window.console.log("[cycle] "+Array.prototype.join.call(arguments," "))}function g(d,c,h){function l(f,q,s){if(!f&&q===true){f=b(s).data("cycle.opts");if(!f){e("options not found, can not resume");return false}if(s.cycleTimeout){clearTimeout(s.cycleTimeout);s.cycleTimeout=0}n(f.elements,f,1,1)}}if(d.cycleStop==undefined)d.cycleStop=0;if(c===undefined||c===null)c={};if(c.constructor==String){switch(c){case "destroy":case "stop":h=
b(d).data("cycle.opts");if(!h)return false;d.cycleStop++;d.cycleTimeout&&clearTimeout(d.cycleTimeout);d.cycleTimeout=0;b(d).removeData("cycle.opts");c=="destroy"&&u(h);return false;case "toggle":d.cyclePause=d.cyclePause===1?0:1;l(d.cyclePause,h,d);return false;case "pause":d.cyclePause=1;return false;case "resume":d.cyclePause=0;l(false,h,d);return false;case "prev":case "next":h=b(d).data("cycle.opts");if(!h){e('options not found, "prev/next" ignored');return false}b.fn.cycle[c](h);return false;
default:c={fx:c}}return c}else if(c.constructor==Number){var j=c;c=b(d).data("cycle.opts");if(!c){e("options not found, can not advance slide");return false}if(j<0||j>=c.elements.length){e("invalid slide index: "+j);return false}c.nextSlide=j;if(d.cycleTimeout){clearTimeout(d.cycleTimeout);d.cycleTimeout=0}if(typeof h=="string")c.oneTimeFx=h;n(c.elements,c,1,j>=c.currSlide);return false}return c}function o(d,c){if(!b.support.opacity&&c.cleartype&&d.style.filter)try{d.style.removeAttribute("filter")}catch(h){}}
function u(d){d.next&&b(d.next).unbind(d.prevNextEvent);d.prev&&b(d.prev).unbind(d.prevNextEvent);if(d.pager||d.pagerAnchorBuilder)b.each(d.pagerAnchors||[],function(){this.unbind().remove()});d.pagerAnchors=null;d.destroy&&d.destroy(d)}function D(d,c,h,l,j){var f=b.extend({},b.fn.cycle.defaults,l||{},b.metadata?d.metadata():b.meta?d.data():{});if(f.autostop)f.countdown=f.autostopCount||h.length;var q=d[0];d.data("cycle.opts",f);f.$cont=d;f.stopCount=q.cycleStop;f.elements=h;f.before=f.before?[f.before]:
[];f.after=f.after?[f.after]:[];f.after.unshift(function(){f.busy=0});!b.support.opacity&&f.cleartype&&f.after.push(function(){o(this,f)});f.continuous&&f.after.push(function(){n(h,f,0,!f.rev)});C(f);!b.support.opacity&&f.cleartype&&!f.cleartypeNoBg&&m(c);d.css("position")=="static"&&d.css("position","relative");f.width&&d.width(f.width);f.height&&f.height!="auto"&&d.height(f.height);if(f.startingSlide)f.startingSlide=parseInt(f.startingSlide);if(f.random){f.randomMap=[];for(q=0;q<h.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>=h.length)f.startingSlide=0;f.currSlide=f.startingSlide||0;var s=f.startingSlide;c.css({position:"absolute",top:0,left:0}).hide().each(function(K){K=s?K>=s?h.length-(K-s):s-K:h.length-K;b(this).css("z-index",K)});b(h[s]).css("opacity",1).show();o(h[s],f);f.fit&&f.width&&c.width(f.width);f.fit&&f.height&&f.height!="auto"&&c.height(f.height);if(f.containerResize&&!d.innerHeight()){for(var y=
q=0,F=0;F<h.length;F++){var H=b(h[F]),N=H[0],R=H.outerWidth(),S=H.outerHeight();R||(R=N.offsetWidth||N.width||H.attr("width"));S||(S=N.offsetHeight||N.height||H.attr("height"));q=R>q?R:q;y=S>y?S:y}q>0&&y>0&&d.css({width:q+"px",height:y+"px"})}f.pause&&d.hover(function(){this.cyclePause++},function(){this.cyclePause--});if(z(f)===false)return false;var U=false;l.requeueAttempts=l.requeueAttempts||0;c.each(function(){var K=b(this);this.cycleH=f.fit&&f.height?f.height:K.height()||this.offsetHeight||
this.height||K.attr("height")||0;this.cycleW=f.fit&&f.width?f.width:K.width()||this.offsetWidth||this.width||K.attr("width")||0;if(K.is("img")){K=b.browser.mozilla&&this.cycleW==34&&this.cycleH==19&&!this.complete;var t=b.browser.opera&&(this.cycleW==42&&this.cycleH==19||this.cycleW==37&&this.cycleH==17)&&!this.complete,B=this.cycleH==0&&this.cycleW==0&&!this.complete;if(b.browser.msie&&this.cycleW==28&&this.cycleH==30&&!this.complete||K||t||B)if(j.s&&f.requeueOnImageNotLoaded&&++l.requeueAttempts<
100){e(l.requeueAttempts," - img slide not loaded, requeuing slideshow: ",this.src,this.cycleW,this.cycleH);setTimeout(function(){b(j.s,j.c).cycle(l)},f.requeueTimeout);U=true;return false}else e("could not determine size of image: "+this.src,this.cycleW,this.cycleH)}return true});if(U)return false;f.cssBefore=f.cssBefore||{};f.animIn=f.animIn||{};f.animOut=f.animOut||{};c.not(":eq("+s+")").css(f.cssBefore);f.cssFirst&&b(c[s]).css(f.cssFirst);if(f.timeout){f.timeout=parseInt(f.timeout);if(f.speed.constructor==
String)f.speed=b.fx.speeds[f.speed]||parseInt(f.speed);f.sync||(f.speed/=2);for(q=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=h.length;f.currSlide=f.lastSlide=s;if(f.random){if(++f.randomIndex==h.length)f.randomIndex=0;f.nextSlide=f.randomMap[f.randomIndex]}else f.nextSlide=f.startingSlide>=h.length-1?0:f.startingSlide+1;if(!f.multiFx){q=b.fn.cycle.transitions[f.fx];
if(b.isFunction(q))q(d,c,f);else if(f.fx!="custom"&&!f.multiFx){e("unknown transition: "+f.fx,"; slideshow terminating");return false}}d=c[s];f.before.length&&f.before[0].apply(d,[d,d,f,true]);f.after.length>1&&f.after[1].apply(d,[d,d,f,true]);f.next&&b(f.next).bind(f.prevNextEvent,function(){return i(f,f.rev?-1:1)});f.prev&&b(f.prev).bind(f.prevNextEvent,function(){return i(f,f.rev?1:-1)});if(f.pager||f.pagerAnchorBuilder)r(h,f);G(f,h);return f}function C(d){d.original={before:[],after:[]};d.original.cssBefore=
b.extend({},d.cssBefore);d.original.cssAfter=b.extend({},d.cssAfter);d.original.animIn=b.extend({},d.animIn);d.original.animOut=b.extend({},d.animOut);b.each(d.before,function(){d.original.before.push(this)});b.each(d.after,function(){d.original.after.push(this)})}function z(d){var c,h,l=b.fn.cycle.transitions;if(d.fx.indexOf(",")>0){d.multiFx=true;d.fxs=d.fx.replace(/\s*/g,"").split(",");for(c=0;c<d.fxs.length;c++){var j=d.fxs[c];h=l[j];if(!h||!l.hasOwnProperty(j)||!b.isFunction(h)){e("discarding unknown transition: ",
j);d.fxs.splice(c,1);c--}}if(!d.fxs.length){e("No valid transitions named; slideshow terminating.");return false}}else if(d.fx=="all"){d.multiFx=true;d.fxs=[];for(p in l){h=l[p];l.hasOwnProperty(p)&&b.isFunction(h)&&d.fxs.push(p)}}if(d.multiFx&&d.randomizeEffects){h=Math.floor(Math.random()*20)+30;for(c=0;c<h;c++)d.fxs.push(d.fxs.splice(Math.floor(Math.random()*d.fxs.length),1)[0]);a("randomized fx sequence: ",d.fxs)}return true}function G(d,c){d.addSlide=function(h,l){var j=b(h),f=j[0];d.autostopCount||
d.countdown++;c[l?"unshift":"push"](f);if(d.els)d.els[l?"unshift":"push"](f);d.slideCount=c.length;j.css("position","absolute");j[l?"prependTo":"appendTo"](d.$cont);if(l){d.currSlide++;d.nextSlide++}!b.support.opacity&&d.cleartype&&!d.cleartypeNoBg&&m(j);d.fit&&d.width&&j.width(d.width);d.fit&&d.height&&d.height!="auto"&&$slides.height(d.height);f.cycleH=d.fit&&d.height?d.height:j.height();f.cycleW=d.fit&&d.width?d.width:j.width();j.css(d.cssBefore);if(d.pager||d.pagerAnchorBuilder)b.fn.cycle.createPagerAnchor(c.length-
1,f,b(d.pager),c,d);b.isFunction(d.onAddSlide)?d.onAddSlide(j):j.hide()}}function n(d,c,h,l){if(h&&c.busy&&c.manualTrump){a("manualTrump in go(), stopping active transition");b(d).stop(true,true);c.busy=false}if(c.busy)a("transition active, ignoring new tx request");else{var j=c.$cont[0],f=d[c.currSlide],q=d[c.nextSlide];if(!(j.cycleStop!=c.stopCount||j.cycleTimeout===0&&!h))if(!h&&!j.cyclePause&&(c.autostop&&--c.countdown<=0||c.nowrap&&!c.random&&c.nextSlide<c.currSlide))c.end&&c.end(c);else{var s=
false;if((h||!j.cyclePause)&&c.nextSlide!=c.currSlide){s=true;var y=c.fx;f.cycleH=f.cycleH||b(f).height();f.cycleW=f.cycleW||b(f).width();q.cycleH=q.cycleH||b(q).height();q.cycleW=q.cycleW||b(q).width();if(c.multiFx){if(c.lastFx==undefined||++c.lastFx>=c.fxs.length)c.lastFx=0;y=c.fxs[c.lastFx];c.currFx=y}if(c.oneTimeFx){y=c.oneTimeFx;c.oneTimeFx=null}b.fn.cycle.resetState(c,y);c.before.length&&b.each(c.before,function(F,H){j.cycleStop==c.stopCount&&H.apply(q,[f,q,c,l])});y=function(){b.each(c.after,
function(F,H){j.cycleStop==c.stopCount&&H.apply(q,[f,q,c,l])})};a("tx firing; currSlide: "+c.currSlide+"; nextSlide: "+c.nextSlide);c.busy=1;if(c.fxFn)c.fxFn(f,q,c,y,l,h&&c.fastOnEvent);else b.isFunction(b.fn.cycle[c.fx])?b.fn.cycle[c.fx](f,q,c,y,l,h&&c.fastOnEvent):b.fn.cycle.custom(f,q,c,y,l,h&&c.fastOnEvent)}if(s||c.nextSlide==c.currSlide){c.lastSlide=c.currSlide;if(c.random){c.currSlide=c.nextSlide;if(++c.randomIndex==d.length)c.randomIndex=0;c.nextSlide=c.randomMap[c.randomIndex];if(c.nextSlide==
c.currSlide)c.nextSlide=c.currSlide==c.slideCount-1?0:c.currSlide+1}else{h=c.nextSlide+1==d.length;c.nextSlide=h?0:c.nextSlide+1;c.currSlide=h?d.length-1:c.nextSlide-1}}s&&c.pager&&c.updateActivePagerLink(c.pager,c.currSlide,c.activePagerClass);s=0;if(c.timeout&&!c.continuous)s=v(f,q,c,l);else if(c.continuous&&j.cyclePause)s=10;if(s>0)j.cycleTimeout=setTimeout(function(){n(d,c,0,!c.rev)},s)}}}function v(d,c,h,l){if(h.timeoutFn){for(d=h.timeoutFn(d,c,h,l);d-h.speed<250;)d+=h.speed;a("calculated timeout: "+
d+"; speed: "+h.speed);if(d!==false)return d}return h.timeout}function i(d,c){var h=d.elements,l=d.$cont[0],j=l.cycleTimeout;if(j){clearTimeout(j);l.cycleTimeout=0}if(d.random&&c<0){d.randomIndex--;if(--d.randomIndex==-2)d.randomIndex=h.length-2;else if(d.randomIndex==-1)d.randomIndex=h.length-1;d.nextSlide=d.randomMap[d.randomIndex]}else if(d.random)d.nextSlide=d.randomMap[d.randomIndex];else{d.nextSlide=d.currSlide+c;if(d.nextSlide<0){if(d.nowrap)return false;d.nextSlide=h.length-1}else if(d.nextSlide>=
h.length){if(d.nowrap)return false;d.nextSlide=0}}l=d.onPrevNextEvent||d.prevNextClick;b.isFunction(l)&&l(c>0,d.nextSlide,h[d.nextSlide]);n(h,d,1,c>=0);return false}function r(d,c){var h=b(c.pager);b.each(d,function(l,j){b.fn.cycle.createPagerAnchor(l,j,h,d,c)});c.updateActivePagerLink(c.pager,c.startingSlide,c.activePagerClass)}function m(d){function c(l){l=parseInt(l).toString(16);return l.length<2?"0"+l:l}function h(l){for(;l&&l.nodeName.toLowerCase()!="html";l=l.parentNode){var j=b.css(l,"background-color");
if(j.indexOf("rgb")>=0){l=j.match(/\d+/g);return"#"+c(l[0])+c(l[1])+c(l[2])}if(j&&j!="transparent")return j}return"#ffffff"}a("applying clearType background-color hack");d.each(function(){b(this).css("background-color",h(this))})}if(b.support==undefined)b.support={opacity:!b.browser.msie};b.fn.cycle=function(d,c){var h={s:this.selector,c:this.context};if(this.length===0&&d!="stop"){if(!b.isReady&&h.s){e("DOM not ready, queuing slideshow");b(function(){b(h.s,h.c).cycle(d,c)});return this}e("terminating; zero elements found by selector"+
(b.isReady?"":" (DOM not ready)"));return this}return this.each(function(){var l=g(this,d,c);if(l!==false){l.updateActivePagerLink=l.updateActivePagerLink||b.fn.cycle.updateActivePagerLink;this.cycleTimeout&&clearTimeout(this.cycleTimeout);this.cycleTimeout=this.cyclePause=0;var j=b(this),f=l.slideExpr?b(l.slideExpr,this):j.children(),q=f.get();if(q.length<2)e("terminating; too few slides: "+q.length);else{var s=D(j,f,q,l,h);if(s!==false)if(l=s.continuous?10:v(s.currSlide,s.nextSlide,s,!s.rev)){l+=
s.delay||0;if(l<10)l=10;a("first timeout: "+l);this.cycleTimeout=setTimeout(function(){n(q,s,0,!s.rev)},l)}}}})};b.fn.cycle.resetState=function(d,c){c=c||d.fx;d.before=[];d.after=[];d.cssBefore=b.extend({},d.original.cssBefore);d.cssAfter=b.extend({},d.original.cssAfter);d.animIn=b.extend({},d.original.animIn);d.animOut=b.extend({},d.original.animOut);d.fxFn=null;b.each(d.original.before,function(){d.before.push(this)});b.each(d.original.after,function(){d.after.push(this)});var h=b.fn.cycle.transitions[c];
b.isFunction(h)&&h(d.$cont,b(d.elements),d)};b.fn.cycle.updateActivePagerLink=function(d,c,h){b(d).each(function(){b(this).children().removeClass(h).eq(c).addClass(h)})};b.fn.cycle.next=function(d){i(d,d.rev?-1:1)};b.fn.cycle.prev=function(d){i(d,d.rev?1:-1)};b.fn.cycle.createPagerAnchor=function(d,c,h,l,j){if(b.isFunction(j.pagerAnchorBuilder)){c=j.pagerAnchorBuilder(d,c);a("pagerAnchorBuilder("+d+", el) returned: "+c)}else c='<a href="#">'+(d+1)+"</a>";if(c){var f=b(c);if(f.parents("body").length===
0){var q=[];if(h.length>1){h.each(function(){var s=f.clone(true);b(this).append(s);q.push(s[0])});f=b(q)}else f.appendTo(h)}j.pagerAnchors=j.pagerAnchors||[];j.pagerAnchors.push(f);f.bind(j.pagerEvent,function(s){s.preventDefault();j.nextSlide=d;s=j.$cont[0];var y=s.cycleTimeout;if(y){clearTimeout(y);s.cycleTimeout=0}s=j.onPagerEvent||j.pagerClick;b.isFunction(s)&&s(j.nextSlide,l[j.nextSlide]);n(l,j,1,j.currSlide<d)});!/^click/.test(j.pagerEvent)&&!j.allowPagerClickBubble&&f.bind("click.cycle",function(){return false});
j.pauseOnPagerHover&&f.hover(function(){j.$cont[0].cyclePause++},function(){j.$cont[0].cyclePause--})}};b.fn.cycle.hopsFromLast=function(d,c){var h=d.lastSlide,l=d.currSlide;return c?l>h?l-h:d.slideCount-h:l<h?h-l:h+d.slideCount-l};b.fn.cycle.commonReset=function(d,c,h,l,j,f){b(h.elements).not(d).hide();h.cssBefore.opacity=1;h.cssBefore.display="block";if(l!==false&&c.cycleW>0)h.cssBefore.width=c.cycleW;if(j!==false&&c.cycleH>0)h.cssBefore.height=c.cycleH;h.cssAfter=h.cssAfter||{};h.cssAfter.display=
"none";b(d).css("zIndex",h.slideCount+(f===true?1:0));b(c).css("zIndex",h.slideCount+(f===true?0:1))};b.fn.cycle.custom=function(d,c,h,l,j,f){var q=b(d),s=b(c),y=h.speedIn;d=h.speedOut;var F=h.easeIn;c=h.easeOut;s.css(h.cssBefore);if(f){y=typeof f=="number"?d=f:d=1;F=c=null}q.animate(h.animOut,d,c,function(){h.cssAfter&&q.css(h.cssAfter);h.sync||s.animate(h.animIn,y,F,l)});h.sync&&s.animate(h.animIn,y,F,l)};b.fn.cycle.transitions={fade:function(d,c,h){c.not(":eq("+h.currSlide+")").css("opacity",0);
h.before.push(function(l,j,f){b.fn.cycle.commonReset(l,j,f);f.cssBefore.opacity=0});h.animIn={opacity:1};h.animOut={opacity:0};h.cssBefore={top:0,left:0}}};b.fn.cycle.ver=function(){return"2.86"};b.fn.cycle.defaults={fx:"fade",timeout:4E3,timeoutFn:null,continuous:0,speed:1E3,speedIn:null,speedOut:null,next:null,prev:null,onPrevNextEvent:null,prevNextEvent:"click.cycle",pager:null,onPagerEvent:null,pagerEvent:"click.cycle",allowPagerClickBubble:false,pagerAnchorBuilder:null,before:null,after:null,
end:null,easing:null,easeIn:null,easeOut:null,shuffle:null,animIn:null,animOut:null,cssBefore:null,cssAfter:null,fxFn:null,height:"auto",startingSlide:0,sync:1,random:0,fit:0,containerResize:1,pause:0,pauseOnPagerHover:0,autostop:0,autostopCount:0,delay:0,slideExpr:null,cleartype:!b.support.opacity,cleartypeNoBg:false,nowrap:0,fastOnEvent:0,randomizeEffects:1,rev:0,manualTrump:true,requeueOnImageNotLoaded:true,requeueTimeout:250,activePagerClass:"activeSlide",updateActivePagerLink:null}})(jQuery);
(function(b){b.fn.nmcDropDown=function(a){var e=b.extend({},b.fn.nmcDropDown.defaults,a);return this.each(function(){var g=b(this);submenus=g.children("li:has("+e.submenu_selector+")");if(e.fix_IE){g.css("z-index",51).parents().each(function(o){b(this).css("position")=="relative"&&b(this).css("z-index",o+52)});submenus.children(e.submenu_selector).each(function(){var o=b(this).parent().width();b(this).css({"z-index":50,width:o})})}over=function(){b(this).addClass(e.active_class).children(e.submenu_selector).animate(e.show,
e.show_speed);return false};out=function(){b(this).removeClass(e.active_class).children(e.submenu_selector).animate(e.hide,e.hide_speed);return false};if(e.trigger=="click")submenus.toggle(over,out).children(e.submenu_selector).hide();else b().hoverIntent?submenus.hoverIntent({interval:e.show_delay,over:over,timeout:e.hide_delay,out:out}).children(e.submenu_selector).hide():submenus.hover(over,out).children(e.submenu_selector).hide()})};b.fn.nmcDropDown.defaults={trigger:"hover",active_class:"open",
submenu_selector:"ul",show:{opacity:"show"},show_speed:300,show_delay:50,hide:{opacity:"hide"},hide_speed:200,hide_delay:100,fix_IE:true}})(jQuery);
(function(b){function a(w,A){A=A==="x"?F.width():F.height();return typeof w==="string"?Math.round(w.match(/%/)?A/100*parseInt(w,10):parseInt(w,10)):w}function e(w){w=b.isFunction(w)?w.call(L):w;return k.photo||w.match(/\.(gif|png|jpg|jpeg|bmp)(?:\?([^#]*))?(?:#(\.*))?$/i)}function g(){for(var w in k)if(b.isFunction(k[w])&&w.substring(0,2)!=="on")k[w]=k[w].call(L);k.rel=k.rel||L.rel;k.href=k.href||L.href;k.title=k.title||L.title}function o(w){L=w;k=b.extend({},b(L).data(u));g();if(k.rel&&k.rel!=="nofollow"){y=
b(".cboxElement").filter(function(){return(b(this).data(u).rel||this.rel)===k.rel});O=y.index(L);if(O<0){y=y.add(L);O=y.length-1}}else{y=b(L);O=0}if(!Y){Z=Y=C;X=L;X.blur();b(document).bind("keydown.cbox_close",function(A){if(A.keyCode===27){A.preventDefault();z.close()}}).bind("keydown.cbox_arrows",function(A){if(y.length>1)if(A.keyCode===37){A.preventDefault();x.click()}else if(A.keyCode===39){A.preventDefault();B.click()}});k.overlayClose&&d.css({cursor:"pointer"}).one("click",z.close);b.event.trigger(v);
k.onOpen&&k.onOpen.call(L);d.css({opacity:k.opacity}).show();k.w=a(k.initialWidth,"x");k.h=a(k.initialHeight,"y");z.position(0);n&&F.bind("resize.cboxie6 scroll.cboxie6",function(){d.css({width:F.width(),height:F.height(),top:F.scrollTop(),left:F.scrollLeft()})}).trigger("scroll.cboxie6")}K.add(x).add(B).add(t).add(U).hide();E.html(k.close).show();z.slideshow();z.load()}var u="colorbox",D="hover",C=true,z,G=b.browser.msie&&!b.support.opacity,n=G&&b.browser.version<7,v="cbox_open",i="cbox_load",r=
"cbox_complete",m="resize.cbox_resize",d,c,h,l,j,f,q,s,y,F,H,N,R,S,U,K,t,B,x,E,M,Q,V,P,L,X,O,k,Y,Z,aa={transition:"elastic",speed:350,width:false,height:false,innerWidth:false,innerHeight:false,initialWidth:"400",initialHeight:"400",maxWidth:false,maxHeight:false,scalePhotos:C,scrolling:C,inline:false,html:false,iframe:false,photo:false,href:false,title:false,rel:false,opacity:0.9,preloading:C,current:"image {current} of {total}",previous:"previous",next:"next",close:"close",open:false,overlayClose:C,
slideshow:false,slideshowAuto:C,slideshowSpeed:2500,slideshowStart:"start slideshow",slideshowStop:"stop slideshow",onOpen:false,onLoad:false,onComplete:false,onCleanup:false,onClosed:false};z=b.fn.colorbox=function(w,A){var I=this;if(!I.length)if(I.selector===""){I=b("<a/>");w.open=C}else return this;I.each(function(){var J=b.extend({},b(this).data(u)?b(this).data(u):aa,w);b(this).data(u,J).addClass("cboxElement");if(A)b(this).data(u).onComplete=A});w&&w.open&&o(I);return this};z.init=function(){function w(A){return b('<div id="cbox'+
A+'"/>')}F=b(window);c=b('<div id="colorbox"/>');d=w("Overlay").hide();h=w("Wrapper");l=w("Content").append(H=w("LoadedContent").css({width:0,height:0}),R=w("LoadingOverlay"),S=w("LoadingGraphic"),U=w("Title"),K=w("Current"),t=w("Slideshow"),B=w("Next"),x=w("Previous"),E=w("Close"));h.append(b("<div/>").append(w("TopLeft"),j=w("TopCenter"),w("TopRight")),b("<div/>").append(f=w("MiddleLeft"),l,q=w("MiddleRight")),b("<div/>").append(w("BottomLeft"),s=w("BottomCenter"),w("BottomRight"))).children().children().css({"float":"left"});
N=b("<div style='position:absolute; top:0; left:0; width:9999px; height:0;'/>");b("body").prepend(d,c.append(h,N));if(G){c.addClass("cboxIE");n&&d.css("position","absolute")}l.children().bind("mouseover mouseout",function(){b(this).toggleClass(D)}).addClass(D);M=j.height()+s.height()+l.outerHeight(C)-l.height();Q=f.width()+q.width()+l.outerWidth(C)-l.width();V=H.outerHeight(C);P=H.outerWidth(C);c.css({"padding-bottom":M,"padding-right":Q}).hide();B.click(z.next);x.click(z.prev);E.click(z.close);l.children().removeClass(D);
b(".cboxElement").live("click",function(A){if(A.button!==0&&typeof A.button!=="undefined")return C;else{o(this);return false}})};z.position=function(w,A){function I(ba){j[0].style.width=s[0].style.width=l[0].style.width=ba.style.width;S[0].style.height=R[0].style.height=l[0].style.height=f[0].style.height=q[0].style.height=ba.style.height}var J;J=F.height();var T=Math.max(J-k.h-V-M,0)/2+F.scrollTop(),W=Math.max(document.documentElement.clientWidth-k.w-P-Q,0)/2+F.scrollLeft();J=c.width()===k.w+P&&
c.height()===k.h+V?0:w;h[0].style.width=h[0].style.height="9999px";c.dequeue().animate({width:k.w+P,height:k.h+V,top:T,left:W},{duration:J,complete:function(){I(this);Z=false;h[0].style.width=k.w+P+Q+"px";h[0].style.height=k.h+V+M+"px";A&&A()},step:function(){I(this)}})};z.resize=function(w){function A(W){z.position(W,function(){if(Y){if(G){J&&H.fadeIn(100);c[0].style.removeAttribute("filter")}if(k.iframe)H.append("<iframe id='cboxIframe'"+(k.scrolling?" ":"scrolling='no'")+" name='iframe_"+(new Date).getTime()+
"' frameborder=0 src='"+k.href+"' "+(G?"allowtransparency='true'":"")+" />");H.show();U.show().html(k.title);if(y.length>1){K.html(k.current.replace(/\{current\}/,O+1).replace(/\{total\}/,y.length)).show();B.html(k.next).show();x.html(k.previous).show();k.slideshow&&t.show()}R.hide();S.hide();b.event.trigger(r);k.onComplete&&k.onComplete.call(L);k.transition==="fade"&&c.fadeTo(T,1,function(){G&&c[0].style.removeAttribute("filter")});F.bind(m,function(){z.position(0)})}})}if(Y){var I,J,T=k.transition===
"none"?0:k.speed;F.unbind(m);if(w){H.remove();H=b('<div id="cboxLoadedContent"/>').html(w);H.hide().appendTo(N).css({width:function(){k.w=k.w||H.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||H.height();k.h=k.mh&&k.mh<k.h?k.mh:k.h;return k.h}()}).prependTo(l);b("#cboxPhoto").css({cssFloat:"none"});n&&b("select:not(#colorbox select)").filter(function(){return this.style.visibility!=="hidden"}).css({visibility:"hidden"}).one("cbox_cleanup",
function(){this.style.visibility="inherit"});k.transition==="fade"&&c.fadeTo(T,0,function(){A(0)})||A(T);if(k.preloading&&y.length>1){w=O>0?y[O-1]:y[y.length-1];I=O<y.length-1?y[O+1]:y[0];I=b(I).data(u).href||I.href;w=b(w).data(u).href||w.href;e(I)&&b("<img />").attr("src",I);e(w)&&b("<img />").attr("src",w)}}else setTimeout(function(){var W=H.wrapInner("<div style='overflow:auto'></div>").children();k.h=W.height();H.css({height:k.h});W.replaceWith(W.children());z.position(T)},1)}};z.load=function(){var w,
A,I,J=z.resize;Z=C;L=y[O];k=b.extend({},b(L).data(u));g();b.event.trigger(i);k.onLoad&&k.onLoad.call(L);k.h=k.height?a(k.height,"y")-V-M:k.innerHeight?a(k.innerHeight,"y"):false;k.w=k.width?a(k.width,"x")-P-Q:k.innerWidth?a(k.innerWidth,"x"):false;k.mw=k.w;k.mh=k.h;if(k.maxWidth){k.mw=a(k.maxWidth,"x")-P-Q;k.mw=k.w&&k.w<k.mw?k.w:k.mw}if(k.maxHeight){k.mh=a(k.maxHeight,"y")-V-M;k.mh=k.h&&k.h<k.mh?k.h:k.mh}w=k.href;R.show();S.show();if(k.inline){b('<div id="cboxInlineTemp" />').hide().insertBefore(b(w)[0]).bind(i+
" cbox_cleanup",function(){b(this).replaceWith(H.children())});J(b(w))}else if(k.iframe)J(" ");else if(k.html)J(k.html);else if(e(w)){A=new Image;A.onload=function(){var T;A.onload=null;A.id="cboxPhoto";b(A).css({margin:"auto",border:"none",display:"block",cssFloat:"left"});if(k.scalePhotos){I=function(){A.height-=A.height*T;A.width-=A.width*T};if(k.mw&&A.width>k.mw){T=(A.width-k.mw)/A.width;I()}if(k.mh&&A.height>k.mh){T=(A.height-k.mh)/A.height;I()}}if(k.h)A.style.marginTop=Math.max(k.h-A.height,
0)/2+"px";J(A);y.length>1&&b(A).css({cursor:"pointer"}).click(z.next);if(G)A.style.msInterpolationMode="bicubic"};A.src=w}else b("<div />").appendTo(N).load(w,function(T,W){W==="success"?J(this):J(b("<p>Request unsuccessful.</p>"))})};z.next=function(){if(!Z){O=O<y.length-1?O+1:0;z.load()}};z.prev=function(){if(!Z){O=O>0?O-1:y.length-1;z.load()}};z.slideshow=function(){function w(){t.text(k.slideshowStop).bind(r,function(){I=setTimeout(z.next,k.slideshowSpeed)}).bind(i,function(){clearTimeout(I)}).one("click",
function(){A();b(this).removeClass(D)});c.removeClass(J+"off").addClass(J+"on")}var A,I,J="cboxSlideshow_";t.bind("cbox_closed",function(){t.unbind();clearTimeout(I);c.removeClass(J+"off "+J+"on")});A=function(){clearTimeout(I);t.text(k.slideshowStart).unbind(r+" "+i).one("click",function(){w();I=setTimeout(z.next,k.slideshowSpeed);b(this).removeClass(D)});c.removeClass(J+"on").addClass(J+"off")};if(k.slideshow&&y.length>1)k.slideshowAuto?w():A()};z.close=function(){b.event.trigger("cbox_cleanup");
k.onCleanup&&k.onCleanup.call(L);Y=false;b(document).unbind("keydown.cbox_close keydown.cbox_arrows");F.unbind(m+" resize.cboxie6 scroll.cboxie6");d.css({cursor:"auto"}).fadeOut("fast");c.stop(C,false).fadeOut("fast",function(){b("#colorbox iframe").attr("src","about:blank");H.remove();c.css({opacity:1});try{X.focus()}catch(w){}b.event.trigger("cbox_closed");k.onClosed&&k.onClosed.call(L)})};z.element=function(){return b(L)};z.settings=aa;b(z.init)})(jQuery);
(function(){function b(i){if(!i||typeof i!="object")return i;var r=new i.constructor,m;for(m in i)if(i.hasOwnProperty(m))r[m]=b(i[m]);return r}function a(i,r){if(i){var m,d=0,c=i.length;if(c===undefined)for(m in i){if(r.call(i[m],m,i[m])===false)break}else for(m=i[0];d<c&&r.call(m,d,m)!==false;m=i[++d]);return i}}function e(i,r,m){if(typeof r!="object")return i;i&&r&&a(r,function(d,c){if(!m||typeof c!="function")i[d]=c});return i}function g(i){var r=i.indexOf(".");if(r!=-1){var m=i.slice(0,r)||"*",
d=i.slice(r+1,i.length),c=[];a(document.getElementsByTagName(m),function(){this.className&&this.className.indexOf(d)!=-1&&c.push(this)});return c}}function o(i){i=i||window.event;if(i.preventDefault){i.stopPropagation();i.preventDefault()}else{i.returnValue=false;i.cancelBubble=true}return false}function u(i,r,m){i[r]=i[r]||[];i[r].push(m)}function D(){return"_"+(""+Math.random()).slice(2,10)}function C(i,r,m){function d(){function t(x){!c.isLoaded()&&c._fireEvent("onBeforeClick")!==false&&c.load();
return o(x)}if($f(i)){$f(i).getParent().innerHTML="";N=$f(i).getIndex();v[N]=c}else{v.push(c);N=v.length-1}U=parseInt(i.style.height,10)||i.clientHeight;F=i.id||"fp"+D();H=r.id||F+"_api";r.id=H;m.playerId=F;if(typeof m=="string")m={clip:{url:m}};if(typeof m.clip=="string")m.clip={url:m.clip};m.clip=m.clip||{};if(i.getAttribute("href",2)&&!m.clip.url)m.clip.url=i.getAttribute("href",2);f=new G(m.clip,-1,c);m.playlist=m.playlist||[m.clip];var B=0;a(m.playlist,function(){var x=this;if(typeof x=="object"&&
x.length)x={url:""+x};a(m.clip,function(E,M){if(M!==undefined&&x[E]===undefined&&typeof M!="function")x[E]=M});m.playlist[B]=x;x=new G(x,B,c);q.push(x);B++});a(m,function(x,E){if(typeof E=="function"){f[x]?f[x](E):u(y,x,E);delete m[x]}});a(m.plugins,function(x,E){if(E)s[x]=new n(x,E,c)});if(!m.plugins||m.plugins.controls===undefined)s.controls=new n("controls",null,c);s.canvas=new n("canvas",null,c);j=i.innerHTML;if(j.replace(/\s/g,"")!=="")if(i.addEventListener)i.addEventListener("click",t,false);
else i.attachEvent&&i.attachEvent("onclick",t);else{i.addEventListener&&i.addEventListener("click",o,false);c.load()}}var c=this,h=null,l=false,j,f,q=[],s={},y={},F,H,N,R,S,U;e(c,{id:function(){return F},isLoaded:function(){return h!==null&&h.fp_play!=undefined&&!l},getParent:function(){return i},hide:function(t){if(t)i.style.height="0px";if(c.isLoaded())h.style.height="0px";return c},show:function(){i.style.height=U+"px";if(c.isLoaded())h.style.height=S+"px";return c},isHidden:function(){return c.isLoaded()&&
parseInt(h.style.height,10)===0},load:function(t){if(!c.isLoaded()&&c._fireEvent("onBeforeLoad")!==false){var B=0;a(v,function(){this.unload(function(){if(++B==v.length){if((j=i.innerHTML)&&!flashembed.isSupported(r.version))i.innerHTML="";flashembed(i,r,{config:m});if(t){t.cached=true;u(y,"onLoad",t)}}})})}return c},unload:function(t){if(this.isFullscreen()&&/WebKit/i.test(navigator.userAgent)){t&&t(false);return c}if(j.replace(/\s/g,"")!==""){if(c._fireEvent("onBeforeUnload")===false){t&&t(false);
return c}l=true;try{if(h){h.fp_close();c._fireEvent("onUnload")}}catch(B){}setTimeout(function(){h=null;i.innerHTML=j;l=false;t&&t(true)},50)}else t&&t(false);return c},getClip:function(t){if(t===undefined)t=R;return q[t]},getCommonClip:function(){return f},getPlaylist:function(){return q},getPlugin:function(t){var B=s[t];if(!B&&c.isLoaded()){var x=c._api().fp_getPlugin(t);if(x){B=new n(t,x,c);s[t]=B}}return B},getScreen:function(){return c.getPlugin("screen")},getControls:function(){return c.getPlugin("controls")._fireEvent("onUpdate")},
getLogo:function(){try{return c.getPlugin("logo")._fireEvent("onUpdate")}catch(t){}},getPlay:function(){return c.getPlugin("play")._fireEvent("onUpdate")},getConfig:function(t){return t?b(m):m},getFlashParams:function(){return r},loadPlugin:function(t,B,x,E){if(typeof x=="function"){E=x;x={}}var M=E?D():"_";c._api().fp_loadPlugin(t,B,x,M);B={};B[M]=E;E=new n(t,null,c,B);return s[t]=E},getState:function(){return c.isLoaded()?h.fp_getState():-1},play:function(t,B){var x=function(){t!==undefined?c._api().fp_play(t,
B):c._api().fp_play()};if(c.isLoaded())x();else l?setTimeout(function(){c.play(t,B)},50):c.load(function(){x()});return c},getVersion:function(){if(c.isLoaded()){var t=h.fp_getVersion();t.push("flowplayer.js 3.2.0");return t}return"flowplayer.js 3.2.0"},_api:function(){if(!c.isLoaded())throw"Flowplayer "+c.id()+" not loaded when calling an API method";return h},setClip:function(t){c.setPlaylist([t]);return c},getIndex:function(){return N}});a("Click*,Load*,Unload*,Keypress*,Volume*,Mute*,Unmute*,PlaylistReplace,ClipAdd,Fullscreen*,FullscreenExit,Error,MouseOver,MouseOut".split(","),
function(){var t="on"+this;if(t.indexOf("*")!=-1){t=t.slice(0,t.length-1);var B="onBefore"+t.slice(2);c[B]=function(x){u(y,B,x);return c}}c[t]=function(x){u(y,t,x);return c}});a("pause,resume,mute,unmute,stop,toggle,seek,getStatus,getVolume,setVolume,getTime,isPaused,isPlaying,startBuffering,stopBuffering,isFullscreen,toggleFullscreen,reset,close,setPlaylist,addClip,playFeed,setKeyboardShortcutsEnabled,isKeyboardShortcutsEnabled".split(","),function(){var t=this;c[t]=function(B,x){if(!c.isLoaded())return c;
var E=null;E=B!==undefined&&x!==undefined?h["fp_"+t](B,x):B===undefined?h["fp_"+t]():h["fp_"+t](B);return E==="undefined"||E===undefined?c:E}});c._fireEvent=function(t){if(typeof t=="string")t=[t];var B=t[0],x=t[1],E=t[2],M=t[3],Q=0;m.debug&&console.log("$f.fireEvent",[].slice.call(t));if(!c.isLoaded()&&B=="onLoad"&&x=="player"){h=h||document.getElementById(H);S=h.clientHeight;a(q,function(){this._fireEvent("onLoad")});a(s,function(L,X){X._fireEvent("onUpdate")});f._fireEvent("onLoad")}if(!(B=="onLoad"&&
x!="player")){if(B=="onError")if(typeof x=="string"||typeof x=="number"&&typeof E=="number"){x=E;E=M}if(B=="onContextMenu")a(m.contextMenu[x],function(L,X){X.call(c)});else if(B=="onPluginEvent"||B=="onBeforePluginEvent"){if(M=s[x.name||x]){M._fireEvent("onUpdate",x);return M._fireEvent(E,t.slice(3))}}else{if(B=="onPlaylistReplace"){q=[];var V=0;a(x,function(){q.push(new G(this,V++,c))})}if(B=="onClipAdd"){if(x.isInStream)return;x=new G(x,E,c);q.splice(E,0,x);for(Q=E+1;Q<q.length;Q++)q[Q].index++}var P=
true;if(typeof x=="number"&&x<q.length){R=x;if(t=q[x])P=t._fireEvent(B,E,M);if(!t||P!==false)P=f._fireEvent(B,E,M,t)}a(y[B],function(){P=this.call(c,x,E);this.cached&&y[B].splice(Q,1);if(P===false)return false;Q++});return P}}};if(typeof i=="string"){var K=document.getElementById(i);if(K){i=K;d()}else throw"Flowplayer cannot access element: "+i;}else d()}function z(i){this.length=i.length;this.each=function(r){a(i,r)};this.size=function(){return i.length}}var G=function(i,r,m){var d=this,c={},h={};
d.index=r;if(typeof i=="string")i={url:i};e(this,i,true);a("Begin*,Start,Pause*,Resume*,Seek*,Stop*,Finish*,LastSecond,Update,BufferFull,BufferEmpty,BufferStop".split(","),function(){var j="on"+this;if(j.indexOf("*")!=-1){j=j.slice(0,j.length-1);var f="onBefore"+j.slice(2);d[f]=function(q){u(h,f,q);return d}}d[j]=function(q){u(h,j,q);return d};if(r==-1){if(d[f])m[f]=d[f];if(d[j])m[j]=d[j]}});e(this,{onCuepoint:function(j,f){if(arguments.length==1){c.embedded=[null,j];return d}if(typeof j=="number")j=
[j];var q=D();c[q]=[j,f];m.isLoaded()&&m._api().fp_addCuepoints(j,r,q);return d},update:function(j){e(d,j);m.isLoaded()&&m._api().fp_updateClip(j,r);var f=m.getConfig();e(r==-1?f.clip:f.playlist[r],j,true)},_fireEvent:function(j,f,q,s){if(j=="onLoad"){a(c,function(H,N){N[0]&&m._api().fp_addCuepoints(N[0],r,H)});return false}s=s||d;if(j=="onCuepoint"){var y=c[f];if(y)return y[1].call(m,s,q)}if(f&&"onBeforeBegin,onMetaData,onStart,onUpdate,onResume".indexOf(j)!=-1){e(s,f);if(f.metaData)if(s.duration)s.fullDuration=
f.metaData.duration;else s.duration=f.metaData.duration}var F=true;a(h[j],function(){F=this.call(m,s,f,q)});return F}});if(i.onCuepoint){var l=i.onCuepoint;d.onCuepoint.apply(d,typeof l=="function"?[l]:l);delete i.onCuepoint}a(i,function(j,f){if(typeof f=="function"){u(h,j,f);delete i[j]}});if(r==-1)m.onCuepoint=this.onCuepoint},n=function(i,r,m,d){var c=this,h={},l=false;d&&e(h,d);a(r,function(j,f){if(typeof f=="function"){h[j]=f;delete r[j]}});e(this,{animate:function(j,f,q){if(!j)return c;if(typeof f==
"function"){q=f;f=500}if(typeof j=="string"){var s=j;j={};j[s]=f;f=500}if(q){var y=D();h[y]=q}if(f===undefined)f=500;r=m._api().fp_animate(i,j,f,y);return c},css:function(j,f){if(f!==undefined){var q={};q[j]=f;j=q}r=m._api().fp_css(i,j);e(c,r);return c},show:function(){this.display="block";m._api().fp_showPlugin(i);return c},hide:function(){this.display="none";m._api().fp_hidePlugin(i);return c},toggle:function(){this.display=m._api().fp_togglePlugin(i);return c},fadeTo:function(j,f,q){if(typeof f==
"function"){q=f;f=500}if(q){var s=D();h[s]=q}this.display=m._api().fp_fadeTo(i,j,f,s);this.opacity=j;return c},fadeIn:function(j,f){return c.fadeTo(1,j,f)},fadeOut:function(j,f){return c.fadeTo(0,j,f)},getName:function(){return i},getPlayer:function(){return m},_fireEvent:function(j,f){if(j=="onUpdate"){var q=m._api().fp_getPlugin(i);if(!q)return;e(c,q);delete c.methods;if(!l){a(q.methods,function(){var s=""+this;c[s]=function(){var y=[].slice.call(arguments);y=m._api().fp_invoke(i,s,y);return y===
"undefined"||y===undefined?c:y}});l=true}}if(q=h[j]){q=q.apply(c,f);j.slice(0,1)=="_"&&delete h[j];return q}return c}})},v=[];window.flowplayer=window.$f=function(){var i=null,r=arguments[0];if(!arguments.length){a(v,function(){if(this.isLoaded()){i=this;return false}});return i||v[0]}if(arguments.length==1)if(typeof r=="number")return v[r];else{if(r=="*")return new z(v);a(v,function(){if(this.id()==r.id||this.id()==r||this.getParent()==r){i=this;return false}});return i}if(arguments.length>1){var m=
arguments[1],d=arguments.length==3?arguments[2]:{};if(typeof m=="string")m={src:m};m=e({bgcolor:"#000000",version:[9,0],expressInstall:"http://static.flowplayer.org/swf/expressinstall.swf",cachebusting:true},m);if(typeof r=="string")if(r.indexOf(".")!=-1){var c=[];a(g(r),function(){c.push(new C(this,b(m),b(d)))});return new z(c)}else{var h=document.getElementById(r);return new C(h!==null?h:r,m,d)}else if(r)return new C(r,m,d)}return null};e(window.$f,{fireEvent:function(){var i=[].slice.call(arguments),
r=$f(i[0]);return r?r._fireEvent(i.slice(1)):null},addPlugin:function(i,r){C.prototype[i]=r;return $f},each:a,extend:e});if(typeof jQuery=="function")jQuery.fn.flowplayer=function(i,r){if(!arguments.length||typeof arguments[0]=="number"){var m=[];this.each(function(){var d=$f(this);d&&m.push(d)});return arguments.length?m[arguments[0]]:new z(m)}return this.each(function(){$f(this,b(i),r?b(r):{})})}})();
(function(){function b(n,v){if(v)for(key in v)if(v.hasOwnProperty(key))n[key]=v[key];return n}function a(n,v){var i=[],r;for(r in n)if(n.hasOwnProperty(r))i[r]=v(n[r]);return i}function e(n,v,i){if(z.isSupported(v.version))n.innerHTML=z.getHTML(v,i);else if(v.expressInstall&&z.isSupported([6,65]))n.innerHTML=z.getHTML(b(v,{src:v.expressInstall}),{MMredirectURL:location.href,MMplayerType:"PlugIn",MMdoctitle:document.title});else{if(!n.innerHTML.replace(/\s/g,"")){n.innerHTML="<h2>Flash version "+v.version+
" or greater is required</h2><h3>"+(G[0]>0?"Your version is "+G:"You have no flash plugin installed")+"</h3>"+(n.tagName=="A"?"<p>Click here to download latest version</p>":"<p>Download latest version from <a href='"+o+"'>here</a></p>");if(n.tagName=="A")n.onclick=function(){location.href=o}}if(v.onFail){var r=v.onFail.call(this);if(typeof r=="string")n.innerHTML=r}}if(g)window[v.id]=document.getElementById(v.id);b(this,{getRoot:function(){return n},getOptions:function(){return v},getConf:function(){return i},
getApi:function(){return n.firstChild}})}var g=document.all,o="http://www.adobe.com/go/getflashplayer",u=typeof jQuery=="function",D=/(\d+)[^\d]+(\d+)[^\d]*(\d*)/,C={width:"100%",height:"100%",id:"_"+(""+Math.random()).slice(9),allowfullscreen:true,allowscriptaccess:"always",quality:"high",version:[3,0],onFail:null,expressInstall:null,w3c:false,cachebusting:false};window.attachEvent&&window.attachEvent("onbeforeunload",function(){__flash_unloadHandler=function(){};__flash_savedUnloadHandler=function(){}});
window.flashembed=function(n,v,i){if(typeof n=="string")n=document.getElementById(n.replace("#",""));if(n){if(typeof v=="string")v={src:v};return new e(n,b(b({},C),v),i)}};var z=b(window.flashembed,{conf:C,getVersion:function(){var n;try{n=navigator.plugins["Shockwave Flash"].description.slice(16)}catch(v){try{var i=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");n=i&&i.GetVariable("$version")}catch(r){}}return(n=D.exec(n))?[n[1],n[3]]:[0,0]},asString:function(n){if(n===null||n===undefined)return null;
var v=typeof n;if(v=="object"&&n.push)v="array";switch(v){case "string":n=n.replace(RegExp('(["\\\\])',"g"),"\\$1");n=n.replace(/^\s?(\d+\.?\d+)%/,"$1pct");return'"'+n+'"';case "array":return"["+a(n,function(r){return z.asString(r)}).join(",")+"]";case "function":return'"function()"';case "object":v=[];for(var i in n)n.hasOwnProperty(i)&&v.push('"'+i+'":'+z.asString(n[i]));return"{"+v.join(",")+"}"}return String(n).replace(/\s/g," ").replace(/\'/g,'"')},getHTML:function(n,v){n=b({},n);var i='<object width="'+
n.width+'" height="'+n.height+'" id="'+n.id+'" name="'+n.id+'"';if(n.cachebusting)n.src+=(n.src.indexOf("?")!=-1?"&":"?")+Math.random();i+=n.w3c||!g?' data="'+n.src+'" type="application/x-shockwave-flash"':' classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"';i+=">";if(n.w3c||g)i+='<param name="movie" value="'+n.src+'" />';n.width=n.height=n.id=n.w3c=n.src=null;n.onFail=n.version=n.expressInstall=null;for(var r in n)if(n[r])i+='<param name="'+r+'" value="'+n[r]+'" />';r="";if(v){for(var m in v)if(v[m]){var d=
v[m];r+=m+"="+(/function|object/.test(typeof d)?z.asString(d):d)+"&"}r=r.slice(0,-1);i+='<param name="flashvars" value=\''+r+"' />"}i+="</object>";return i},isSupported:function(n){return G[0]>n[0]||G[0]==n[0]&&G[1]>=n[1]}}),G=z.getVersion();if(u){jQuery.tools=jQuery.tools||{version:"3.2.0"};jQuery.tools.flashembed={conf:C};jQuery.fn.flashembed=function(n,v){return this.each(function(){$(this).data("flashembed",flashembed(this,n,v))})}}})();
$(document).ready(function(){nmcFormHelper.init();$("header nav ul").nmcDropDown({show:{height:"show"}});$("li.image a").colorbox({maxWidth:"90%",maxHeight:"90%"});$("li.video a").flowplayer("http://ui.alicebordsen.gethifi.com/scripts/flowplayer-3.2.2.swf",{clip:{autoPlay:false,autoBuffering:true}});$("#slideshow").length&&$("#slideshow div").after('<div id="slideshowNav"/>').cycle({speed:800,timeout:6E3,pause:true,pager:"#slideshowNav"})});
var nmcFormHelper={init:function(){nmcFormHelper.input_classes.init();var b=document.createElement("input");"placeholder"in b||nmcFormHelper.placeholder.init();"autofocus"in b||nmcFormHelper.autofocus.init();nmcFormHelper.validation.init()},input_classes:{init:function(){$(":input").each(function(){$(this).addClass("input-"+$(this).attr("type"))})}},placeholder:{styling:{color:"#aaa"},init:function(){$("[placeholder]").each(nmcFormHelper.placeholder.show).focus(nmcFormHelper.placeholder.hide).blur(nmcFormHelper.placeholder.show);
$("form").submit(function(){$("[placeholder]",this).each(function(){$input=$(this);$input.val()==$input.attr("placeholder")&&$input.val("");return true})})},show:function(){$input=$(this);if($input.val()==""){$input.val($input.attr("placeholder"));$input.css(nmcFormHelper.placeholder.styling)}},hide:function(){$input=$(this);if($input.val()==$input.attr("placeholder")){$input.val("");$input.css("color",null)}}},autofocus:{init:function(){$("[autofocus]").slice(0,1).focus()}},validation:{init:function(){$("form").submit(nmcFormHelper.validation.check)},
check:function(){$form=$(this);$invalidElements=$([]);var b=$("input, textarea",$form);b.removeClass("requiredError patternError");nmcFormHelper.validation.hideErrors(b);$("input[required], textarea[required]",$form).each(function(){var a=$(this);if(a.val()==""||a.val()==a.attr("placeholder")){a.addClass("requiredError");$invalidElements=$invalidElements.add(a)}});$("input[pattern], textarea[pattern]",$form).each(function(){var a=$(this);if(!RegExp("^(?:"+a.attr("pattern")+")$").test(a.val())){a.addClass("patternError");
$invalidElements=$invalidElements.add(a)}});if($invalidElements.length>0){nmcFormHelper.validation.displayErrors($invalidElements);return false}},hideErrors:function(b){b.removeClass("hasError");b.siblings("label.errorMsg").remove()},displayErrors:function(b){b.each(function(){$this=$(this);var a=$this.attr("title")?$this.attr("title"):"There was an error with this field";$this.after('<label for="'+$this.attr("id")+'" class="errorMsg">'+a+"</label>")}).addClass("hasError")}}};
function relative_time(b){var a=b.split(" ");b=a[1]+" "+a[2]+", "+a[5]+" "+a[3];var e=Date.parse(b);a=arguments.length>1?arguments[1]:new Date;e=parseInt((a.getTime()-e)/1E3);e+=a.getTimezoneOffset()*60;return e<60?"less than a minute ago":e<120?"about a minute ago":e<3600?parseInt(e/60).toString()+" minutes ago":e<7200?"about an hour ago":e<86400?"about "+parseInt(e/3600).toString()+" hours ago":e<172800?"1 day ago":parseInt(e/86400).toString()+" days ago"}
(function(b){b.fn.hoverIntent=function(a,e){var g={sensitivity:7,interval:100,timeout:0};g=b.extend(g,e?{over:a,out:e}:a);var o,u,D,C,z=function(v){o=v.pageX;u=v.pageY},G=function(v,i){i.hoverIntent_t=clearTimeout(i.hoverIntent_t);if(Math.abs(D-o)+Math.abs(C-u)<g.sensitivity){b(i).unbind("mousemove",z);i.hoverIntent_s=1;return g.over.apply(i,[v])}else{D=o;C=u;i.hoverIntent_t=setTimeout(function(){G(v,i)},g.interval)}},n=function(v){for(var i=(v.type=="mouseover"?v.fromElement:v.toElement)||v.relatedTarget;i&&
i!=this;)try{i=i.parentNode}catch(r){i=this}if(i==this)return false;var m=jQuery.extend({},v),d=this;if(d.hoverIntent_t)d.hoverIntent_t=clearTimeout(d.hoverIntent_t);if(v.type=="mouseover"){D=m.pageX;C=m.pageY;b(d).bind("mousemove",z);if(d.hoverIntent_s!=1)d.hoverIntent_t=setTimeout(function(){G(m,d)},g.interval)}else{b(d).unbind("mousemove",z);if(d.hoverIntent_s==1)d.hoverIntent_t=setTimeout(function(){d.hoverIntent_t=clearTimeout(d.hoverIntent_t);d.hoverIntent_s=0;g.out.apply(d,[m])},g.timeout)}};
return this.mouseover(n).mouseout(n)}})(jQuery);

