(function(b){b.extend(b.fn,{validate:function(a){if(this.length){var c=b.data(this[0],"validator");if(c)return c;c=new b.validator(a,this[0]);b.data(this[0],"validator",c);if(c.settings.onsubmit){this.find("input, button").filter(".cancel").click(function(){c.cancelSubmit=true});c.settings.submitHandler&&this.find("input, button").filter(":submit").click(function(){c.submitButton=this});this.submit(function(d){function e(){if(c.settings.submitHandler){if(c.submitButton)var h=b("<input type='hidden'/>").attr("name",
c.submitButton.name).val(c.submitButton.value).appendTo(c.currentForm);c.settings.submitHandler.call(c,c.currentForm);c.submitButton&&h.remove();return false}return true}c.settings.debug&&d.preventDefault();if(c.cancelSubmit){c.cancelSubmit=false;return e()}if(c.form()){if(c.pendingRequest){c.formSubmitted=true;return false}return e()}else{c.focusInvalid();return false}})}return c}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,c=b(this[0].form).validate();this.each(function(){a&=c.element(this)});return a}},removeAttrs:function(a){var c={},d=this;b.each(a.split(/\s/),function(e,h){c[h]=d.attr(h);d.removeAttr(h)});return c},rules:function(a,c){var d=this[0];if(a){var e=b.data(d.form,"validator").settings,h=e.rules,j=b.validator.staticRules(d);switch(a){case "add":b.extend(j,b.validator.normalizeRule(c));h[d.name]=j;if(c.messages)e.messages[d.name]=b.extend(e.messages[d.name],c.messages);break;case "remove":if(!c){delete h[d.name];
return j}var q={};b.each(c.split(/\s/),function(u,s){q[s]=j[s];delete j[s]});return q}}d=b.validator.normalizeRules(b.extend({},b.validator.metadataRules(d),b.validator.classRules(d),b.validator.attributeRules(d),b.validator.staticRules(d)),d);if(d.required){e=d.required;delete d.required;d=b.extend({required:e},d)}return d}});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,
c){this.settings=b.extend(true,{},b.validator.defaults,a);this.currentForm=c;this.init()};b.validator.format=function(a,c){if(arguments.length==1)return function(){var d=b.makeArray(arguments);d.unshift(a);return b.validator.format.apply(this,d)};if(arguments.length>2&&c.constructor!=Array)c=b.makeArray(arguments).slice(1);if(c.constructor!=Array)c=[c];b.each(c,function(d,e){a=a.replace(RegExp("\\{"+d+"\\}","g"),e)});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,c,d){b(a).addClass(c).removeClass(d)},unhighlight:function(a,c,d){b(a).removeClass(c).addClass(d)}},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(e){var h=b.data(this[0].form,"validator");e="on"+e.type.replace(/^validate/,"");h.settings[e]&&h.settings[e].call(h,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 c=this.groups={};b.each(this.settings.groups,function(e,h){b.each(h.split(/\s/),function(j,q){c[q]=e})});var d=this.settings.rules;b.each(d,function(e,h){d[e]=b.validator.normalizeRule(h)});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,c=this.currentElements=this.elements();c[a];a++)this.check(c[a]);
return this.valid()},element:function(a){this.lastElement=a=this.clean(a);this.prepareElement(a);this.currentElements=b(a);var c=this.check(a);if(c)delete this.invalid[a.name];else this.invalid[a.name]=true;if(!this.numberOfInvalids())this.toHide=this.toHide.add(this.containers);this.showErrors();return c},showErrors:function(a){if(a){b.extend(this.errorMap,a);this.errorList=[];for(var c in a)this.errorList.push({message:a[c],element:this.findByName(c)[0]});this.successList=b.grep(this.successList,
function(d){return!(d.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 c=0,d;for(d in a)c++;return c},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(c){return c.element.name==a.name}).length==1&&a},elements:function(){var a=this,c={};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 c||!a.objectLength(b(this).rules()))return false;return c[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 c=b(a).rules(),d=false;for(method in c){var e={method:method,parameters:c[method]};try{var h=b.validator.methods[method].call(this,a.value.replace(/\r/g,""),a,e.parameters);if(h=="dependency-mismatch")d=true;else{d=false;if(h=="pending"){this.toHide=this.toHide.not(this.errorsFor(a));return}if(!h){this.formatAndAdd(a,e);return false}}}catch(j){this.settings.debug&&
window.console&&console.log("exception occured when checking element "+a.id+", check the '"+e.method+"' method",j);throw j;}}if(!d){this.objectLength(c)&&this.successList.push(a);return true}},customMetaMessage:function(a,c){if(b.metadata){var d=this.settings.meta?b(a).metadata()[this.settings.meta]:b(a).metadata();return d&&d.messages&&d.messages[c]}},customMessage:function(a,c){var d=this.settings.messages[a];return d&&(d.constructor==String?d:d[c])},findDefined:function(){for(var a=0;a<arguments.length;a++)if(arguments[a]!==
undefined)return arguments[a]},defaultMessage:function(a,c){return this.findDefined(this.customMessage(a.name,c),this.customMetaMessage(a,c),!this.settings.ignoreTitle&&a.title||undefined,b.validator.messages[c],"<strong>Warning: No message defined for "+a.name+"</strong>")},formatAndAdd:function(a,c){var d=this.defaultMessage(a,c.method),e=/\$?\{(\d+)\}/g;if(typeof d=="function")d=d.call(this,c.parameters,a);else if(e.test(d))d=jQuery.format(d.replace(e,"{$1}"),c.parameters);this.errorList.push({message:d,
element:a});this.errorMap[a.name]=d;this.submitted[a.name]=d},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 c=this.errorList[a];this.settings.highlight&&this.settings.highlight.call(this,c.element,this.settings.errorClass,this.settings.validClass);this.showLabel(c.element,c.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(c=this.validElements();c[a];a++)this.settings.unhighlight.call(this,c[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,
c){var d=this.errorsFor(a);if(d.length){d.removeClass().addClass(this.settings.errorClass);d.attr("generated")&&d.html(c)}else{d=b("<"+this.settings.errorElement+"/>").attr({"for":this.idOrName(a),generated:true}).addClass(this.settings.errorClass).html(c||"");if(this.settings.wrapper)d=d.hide().show().wrap("<"+this.settings.wrapper+"/>").parent();this.labelContainer.append(d).length||(this.settings.errorPlacement?this.settings.errorPlacement(d,b(a)):d.insertAfter(a))}if(!c&&this.settings.success){d.text("");
typeof this.settings.success=="string"?d.addClass(this.settings.success):this.settings.success(d)}this.toShow=this.toShow.add(d)},errorsFor:function(a){var c=this.idOrName(a);return this.errors().filter(function(){return b(this).attr("for")==c})},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 c=this.currentForm;return b(document.getElementsByName(a)).map(function(d,e){return e.form==
c&&e.name==a&&e||null})},getLength:function(a,c){switch(c.nodeName.toLowerCase()){case "select":return b("option:selected",c).length;case "input":if(this.checkable(c))return this.findByName(c.name).filter(":checked").length}return a.length},depend:function(a,c){return this.dependTypes[typeof a]?this.dependTypes[typeof a](a,c):true},dependTypes:{"boolean":function(a){return a},string:function(a,c){return!!b(a,c.form).length},"function":function(a,c){return a(c)}},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,c){this.pendingRequest--;if(this.pendingRequest<0)this.pendingRequest=0;delete this.pending[a.name];if(c&&this.pendingRequest==0&&this.formSubmitted&&this.form()){b(this.currentForm).submit();this.formSubmitted=false}else if(!c&&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,c){a.constructor==String?this.classRuleSettings[a]=c:b.extend(this.classRuleSettings,
a)},classRules:function(a){var c={};(a=b(a).attr("class"))&&b.each(a.split(" "),function(){this in b.validator.classRuleSettings&&b.extend(c,b.validator.classRuleSettings[this])});return c},attributeRules:function(a){var c={};a=b(a);for(method in b.validator.methods){var d=a.attr(method);if(d)c[method]=d}c.maxlength&&/-1|2147483647|524288/.test(c.maxlength)&&delete c.maxlength;return c},metadataRules:function(a){if(!b.metadata)return{};var c=b.data(a.form,"validator").settings.meta;return c?b(a).metadata()[c]:
b(a).metadata()},staticRules:function(a){var c={},d=b.data(a.form,"validator");if(d.settings.rules)c=b.validator.normalizeRule(d.settings.rules[a.name])||{};return c},normalizeRules:function(a,c){b.each(a,function(d,e){if(e===false)delete a[d];else if(e.param||e.depends){var h=true;switch(typeof e.depends){case "string":h=!!b(e.depends,c.form).length;break;case "function":h=e.depends.call(c,c)}if(h)a[d]=e.param!==undefined?e.param:true;else delete a[d]}});b.each(a,function(d,e){a[d]=b.isFunction(e)?
e(c):e});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 c=
{};b.each(a.split(/\s/),function(){c[this]=true});a=c}return a},addMethod:function(a,c,d){b.validator.methods[a]=c;b.validator.messages[a]=d!=undefined?d:b.validator.messages[a];c.length<3&&b.validator.addClassRules(a,b.validator.normalizeRule(a))},methods:{required:function(a,c,d){if(!this.depend(d,c))return"dependency-mismatch";switch(c.nodeName.toLowerCase()){case "select":return(a=b(c).val())&&a.length>0;case "input":if(this.checkable(c))return this.getLength(a,c)>0;default:return b.trim(a).length>
0}},remote:function(a,c,d){if(this.optional(c))return"dependency-mismatch";var e=this.previousValue(c);this.settings.messages[c.name]||(this.settings.messages[c.name]={});e.originalMessage=this.settings.messages[c.name].remote;this.settings.messages[c.name].remote=e.message;d=typeof d=="string"&&{url:d}||d;if(e.old!==a){e.old=a;var h=this;this.startRequest(c);var j={};j[c.name]=a;b.ajax(b.extend(true,{url:d,mode:"abort",port:"validate"+c.name,dataType:"json",data:j,success:function(q){h.settings.messages[c.name].remote=
e.originalMessage;var u=q===true;if(u){var s=h.formSubmitted;h.prepareElement(c);h.formSubmitted=s;h.successList.push(c);h.showErrors()}else{s={};q=e.message=q||h.defaultMessage(c,"remote");s[c.name]=b.isFunction(q)?q(a):q;h.showErrors(s)}e.valid=u;h.stopRequest(c,u)}},d));return"pending"}else if(this.pending[c.name])return"pending";return e.valid},minlength:function(a,c,d){return this.optional(c)||this.getLength(b.trim(a),c)>=d},maxlength:function(a,c,d){return this.optional(c)||this.getLength(b.trim(a),
c)<=d},rangelength:function(a,c,d){a=this.getLength(b.trim(a),c);return this.optional(c)||a>=d[0]&&a<=d[1]},min:function(a,c,d){return this.optional(c)||a>=d},max:function(a,c,d){return this.optional(c)||a<=d},range:function(a,c,d){return this.optional(c)||a>=d[0]&&a<=d[1]},email:function(a,c){return this.optional(c)||/^((([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,c){return this.optional(c)||/^(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,c){return this.optional(c)||!/Invalid|NaN/.test(new Date(a))},dateISO:function(a,c){return this.optional(c)||/^\d{4}[\/-]\d{1,2}[\/-]\d{1,2}$/.test(a)},number:function(a,c){return this.optional(c)||/^-?(?:\d+|\d{1,3}(?:,\d{3})+)(?:\.\d+)?$/.test(a)},digits:function(a,c){return this.optional(c)||/^\d+$/.test(a)},creditcard:function(a,c){if(this.optional(c))return"dependency-mismatch";if(/[^0-9-]+/.test(a))return false;var d=0,e=0,h=false;a=a.replace(/\D/g,"");for(var j=a.length-1;j>=
0;j--){e=a.charAt(j);e=parseInt(e,10);if(h)if((e*=2)>9)e-=9;d+=e;h=!h}return d%10==0},accept:function(a,c,d){d=typeof d=="string"?d.replace(/,/g,"|"):"png|jpe?g|gif";return this.optional(c)||a.match(RegExp(".("+d+")$","i"))},equalTo:function(a,c,d){d=b(d).unbind(".validate-equalTo").bind("blur.validate-equalTo",function(){b(c).valid()});return a==d.val()}}});b.format=b.validator.format})(jQuery);
(function(b){var a=b.ajax,c={};b.ajax=function(d){d=b.extend(d,b.extend({},b.ajaxSettings,d));var e=d.port;if(d.mode=="abort"){c[e]&&c[e].abort();return c[e]=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,c){function d(e){e=b.event.fix(e);e.type=c;return b.event.handle.call(this,e)}b.event.special[c]={setup:function(){this.addEventListener(a,d,true)},teardown:function(){this.removeEventListener(a,d,true)},handler:function(e){arguments[0]=b.event.fix(e);arguments[0].type=c;return b.event.handle.apply(this,arguments)}}});b.extend(b.fn,{validateDelegate:function(a,
c,d){return this.bind(c,function(e){var h=b(e.target);if(h.is(a))return d.apply(h,arguments)})}})})(jQuery);
(function(b){function a(f){b.fn.cycle.debug&&c(f)}function c(){window.console&&window.console.log&&window.console.log("[cycle] "+Array.prototype.join.call(arguments," "))}function d(f,g,k){function n(i,t,r){if(!i&&t===true){i=b(r).data("cycle.opts");if(!i){c("options not found, can not resume");return false}if(r.cycleTimeout){clearTimeout(r.cycleTimeout);r.cycleTimeout=0}y(i.elements,i,1,!i.backwards)}}if(f.cycleStop==undefined)f.cycleStop=0;if(g===undefined||g===null)g={};if(g.constructor==String){switch(g){case "destroy":case "stop":k=
b(f).data("cycle.opts");if(!k)return false;f.cycleStop++;f.cycleTimeout&&clearTimeout(f.cycleTimeout);f.cycleTimeout=0;b(f).removeData("cycle.opts");g=="destroy"&&h(k);return false;case "toggle":f.cyclePause=f.cyclePause===1?0:1;n(f.cyclePause,k,f);return false;case "pause":f.cyclePause=1;return false;case "resume":f.cyclePause=0;n(false,k,f);return false;case "prev":case "next":k=b(f).data("cycle.opts");if(!k){c('options not found, "prev/next" ignored');return false}b.fn.cycle[g](k);return false;
default:g={fx:g}}return g}else if(g.constructor==Number){var m=g;g=b(f).data("cycle.opts");if(!g){c("options not found, can not advance slide");return false}if(m<0||m>=g.elements.length){c("invalid slide index: "+m);return false}g.nextSlide=m;if(f.cycleTimeout){clearTimeout(f.cycleTimeout);f.cycleTimeout=0}if(typeof k=="string")g.oneTimeFx=k;y(g.elements,g,1,m>=g.currSlide);return false}return g}function e(f,g){if(!b.support.opacity&&g.cleartype&&f.style.filter)try{f.style.removeAttribute("filter")}catch(k){}}
function h(f){f.next&&b(f.next).unbind(f.prevNextEvent);f.prev&&b(f.prev).unbind(f.prevNextEvent);if(f.pager||f.pagerAnchorBuilder)b.each(f.pagerAnchors||[],function(){this.unbind().remove()});f.pagerAnchors=null;f.destroy&&f.destroy(f)}function j(f,g,k,n,m){var i=b.extend({},b.fn.cycle.defaults,n||{},b.metadata?f.metadata():b.meta?f.data():{});if(i.autostop)i.countdown=i.autostopCount||k.length;var t=f[0];f.data("cycle.opts",i);i.$cont=f;i.stopCount=t.cycleStop;i.elements=k;i.before=i.before?[i.before]:
[];i.after=i.after?[i.after]:[];i.after.unshift(function(){i.busy=0});!b.support.opacity&&i.cleartype&&i.after.push(function(){e(this,i)});i.continuous&&i.after.push(function(){y(k,i,0,!i.backwards)});q(i);!b.support.opacity&&i.cleartype&&!i.cleartypeNoBg&&O(g);f.css("position")=="static"&&f.css("position","relative");i.width&&f.width(i.width);i.height&&i.height!="auto"&&f.height(i.height);if(i.startingSlide)i.startingSlide=parseInt(i.startingSlide);else if(i.backwards)i.startingSlide=k.length-1;
if(i.random){i.randomMap=[];for(t=0;t<k.length;t++)i.randomMap.push(t);i.randomMap.sort(function(){return Math.random()-0.5});i.randomIndex=1;i.startingSlide=i.randomMap[1]}else if(i.startingSlide>=k.length)i.startingSlide=0;i.currSlide=i.startingSlide||0;var r=i.startingSlide;g.css({position:"absolute",top:0,left:0}).hide().each(function(C){C=i.backwards?r?C<=r?k.length+(C-r):r-C:k.length-C:r?C>=r?k.length-(C-r):r-C:k.length-C;b(this).css("z-index",C)});b(k[r]).css("opacity",1).show();e(k[r],i);
i.fit&&i.width&&g.width(i.width);i.fit&&i.height&&i.height!="auto"&&g.height(i.height);if(i.containerResize&&!f.innerHeight()){for(var z=t=0,M=0;M<k.length;M++){var K=b(k[M]),N=K[0],B=K.outerWidth(),P=K.outerHeight();B||(B=N.offsetWidth||N.width||K.attr("width"));P||(P=N.offsetHeight||N.height||K.attr("height"));t=B>t?B:t;z=P>z?P:z}t>0&&z>0&&f.css({width:t+"px",height:z+"px"})}i.pause&&f.hover(function(){this.cyclePause++},function(){this.cyclePause--});if(u(i)===false)return false;var L=false;n.requeueAttempts=
n.requeueAttempts||0;g.each(function(){var C=b(this);this.cycleH=i.fit&&i.height?i.height:C.height()||this.offsetHeight||this.height||C.attr("height")||0;this.cycleW=i.fit&&i.width?i.width:C.width()||this.offsetWidth||this.width||C.attr("width")||0;if(C.is("img")){C=b.browser.mozilla&&this.cycleW==34&&this.cycleH==19&&!this.complete;var ba=b.browser.opera&&(this.cycleW==42&&this.cycleH==19||this.cycleW==37&&this.cycleH==17)&&!this.complete,ca=this.cycleH==0&&this.cycleW==0&&!this.complete;if(b.browser.msie&&
this.cycleW==28&&this.cycleH==30&&!this.complete||C||ba||ca)if(m.s&&i.requeueOnImageNotLoaded&&++n.requeueAttempts<100){c(n.requeueAttempts," - img slide not loaded, requeuing slideshow: ",this.src,this.cycleW,this.cycleH);setTimeout(function(){b(m.s,m.c).cycle(n)},i.requeueTimeout);L=true;return false}else c("could not determine size of image: "+this.src,this.cycleW,this.cycleH)}return true});if(L)return false;i.cssBefore=i.cssBefore||{};i.animIn=i.animIn||{};i.animOut=i.animOut||{};g.not(":eq("+
r+")").css(i.cssBefore);i.cssFirst&&b(g[r]).css(i.cssFirst);if(i.timeout){i.timeout=parseInt(i.timeout);if(i.speed.constructor==String)i.speed=b.fx.speeds[i.speed]||parseInt(i.speed);i.sync||(i.speed/=2);for(t=i.fx=="shuffle"?500:250;i.timeout-i.speed<t;)i.timeout+=i.speed}if(i.easing)i.easeIn=i.easeOut=i.easing;if(!i.speedIn)i.speedIn=i.speed;if(!i.speedOut)i.speedOut=i.speed;i.slideCount=k.length;i.currSlide=i.lastSlide=r;if(i.random){if(++i.randomIndex==k.length)i.randomIndex=0;i.nextSlide=i.randomMap[i.randomIndex]}else i.nextSlide=
i.backwards?i.startingSlide==0?k.length-1:i.startingSlide-1:i.startingSlide>=k.length-1?0:i.startingSlide+1;if(!i.multiFx){t=b.fn.cycle.transitions[i.fx];if(b.isFunction(t))t(f,g,i);else if(i.fx!="custom"&&!i.multiFx){c("unknown transition: "+i.fx,"; slideshow terminating");return false}}f=g[r];i.before.length&&i.before[0].apply(f,[f,f,i,true]);i.after.length>1&&i.after[1].apply(f,[f,f,i,true]);i.next&&b(i.next).bind(i.prevNextEvent,function(){return E(i,1)});i.prev&&b(i.prev).bind(i.prevNextEvent,
function(){return E(i,0)});if(i.pager||i.pagerAnchorBuilder)Q(k,i);s(i,k);return i}function q(f){f.original={before:[],after:[]};f.original.cssBefore=b.extend({},f.cssBefore);f.original.cssAfter=b.extend({},f.cssAfter);f.original.animIn=b.extend({},f.animIn);f.original.animOut=b.extend({},f.animOut);b.each(f.before,function(){f.original.before.push(this)});b.each(f.after,function(){f.original.after.push(this)})}function u(f){var g,k,n=b.fn.cycle.transitions;if(f.fx.indexOf(",")>0){f.multiFx=true;
f.fxs=f.fx.replace(/\s*/g,"").split(",");for(g=0;g<f.fxs.length;g++){var m=f.fxs[g];k=n[m];if(!k||!n.hasOwnProperty(m)||!b.isFunction(k)){c("discarding unknown transition: ",m);f.fxs.splice(g,1);g--}}if(!f.fxs.length){c("No valid transitions named; slideshow terminating.");return false}}else if(f.fx=="all"){f.multiFx=true;f.fxs=[];for(p in n){k=n[p];n.hasOwnProperty(p)&&b.isFunction(k)&&f.fxs.push(p)}}if(f.multiFx&&f.randomizeEffects){k=Math.floor(Math.random()*20)+30;for(g=0;g<k;g++)f.fxs.push(f.fxs.splice(Math.floor(Math.random()*
f.fxs.length),1)[0]);a("randomized fx sequence: ",f.fxs)}return true}function s(f,g){f.addSlide=function(k,n){var m=b(k),i=m[0];f.autostopCount||f.countdown++;g[n?"unshift":"push"](i);if(f.els)f.els[n?"unshift":"push"](i);f.slideCount=g.length;m.css("position","absolute");m[n?"prependTo":"appendTo"](f.$cont);if(n){f.currSlide++;f.nextSlide++}!b.support.opacity&&f.cleartype&&!f.cleartypeNoBg&&O(m);f.fit&&f.width&&m.width(f.width);f.fit&&f.height&&f.height!="auto"&&m.height(f.height);i.cycleH=f.fit&&
f.height?f.height:m.height();i.cycleW=f.fit&&f.width?f.width:m.width();m.css(f.cssBefore);if(f.pager||f.pagerAnchorBuilder)b.fn.cycle.createPagerAnchor(g.length-1,i,b(f.pager),g,f);b.isFunction(f.onAddSlide)?f.onAddSlide(m):m.hide()}}function y(f,g,k,n){if(k&&g.busy&&g.manualTrump){a("manualTrump in go(), stopping active transition");b(f).stop(true,true);g.busy=false}if(g.busy)a("transition active, ignoring new tx request");else{var m=g.$cont[0],i=f[g.currSlide],t=f[g.nextSlide];if(!(m.cycleStop!=
g.stopCount||m.cycleTimeout===0&&!k))if(!k&&!m.cyclePause&&!g.bounce&&(g.autostop&&--g.countdown<=0||g.nowrap&&!g.random&&g.nextSlide<g.currSlide))g.end&&g.end(g);else{var r=false;if((k||!m.cyclePause)&&g.nextSlide!=g.currSlide){r=true;var z=g.fx;i.cycleH=i.cycleH||b(i).height();i.cycleW=i.cycleW||b(i).width();t.cycleH=t.cycleH||b(t).height();t.cycleW=t.cycleW||b(t).width();if(g.multiFx){if(g.lastFx==undefined||++g.lastFx>=g.fxs.length)g.lastFx=0;z=g.fxs[g.lastFx];g.currFx=z}if(g.oneTimeFx){z=g.oneTimeFx;
g.oneTimeFx=null}b.fn.cycle.resetState(g,z);g.before.length&&b.each(g.before,function(M,K){m.cycleStop==g.stopCount&&K.apply(t,[i,t,g,n])});z=function(){b.each(g.after,function(M,K){m.cycleStop==g.stopCount&&K.apply(t,[i,t,g,n])})};a("tx firing; currSlide: "+g.currSlide+"; nextSlide: "+g.nextSlide);g.busy=1;if(g.fxFn)g.fxFn(i,t,g,z,n,k&&g.fastOnEvent);else b.isFunction(b.fn.cycle[g.fx])?b.fn.cycle[g.fx](i,t,g,z,n,k&&g.fastOnEvent):b.fn.cycle.custom(i,t,g,z,n,k&&g.fastOnEvent)}if(r||g.nextSlide==g.currSlide){g.lastSlide=
g.currSlide;if(g.random){g.currSlide=g.nextSlide;if(++g.randomIndex==f.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((k=g.nextSlide-1<0)&&g.bounce){g.backwards=!g.backwards;g.nextSlide=1;g.currSlide=0}else{g.nextSlide=k?f.length-1:g.nextSlide-1;g.currSlide=k?0:g.nextSlide+1}else if((k=g.nextSlide+1==f.length)&&g.bounce){g.backwards=!g.backwards;g.nextSlide=f.length-2;g.currSlide=
f.length-1}else{g.nextSlide=k?0:g.nextSlide+1;g.currSlide=k?f.length-1:g.nextSlide-1}}r&&g.pager&&g.updateActivePagerLink(g.pager,g.currSlide,g.activePagerClass);r=0;if(g.timeout&&!g.continuous)r=w(f[g.currSlide],f[g.nextSlide],g,n);else if(g.continuous&&m.cyclePause)r=10;if(r>0)m.cycleTimeout=setTimeout(function(){y(f,g,0,!g.backwards)},r)}}}function w(f,g,k,n){if(k.timeoutFn){for(f=k.timeoutFn.call(f,f,g,k,n);f-k.speed<250;)f+=k.speed;a("calculated timeout: "+f+"; speed: "+k.speed);if(f!==false)return f}return k.timeout}
function E(f,g){var k=g?1:-1,n=f.elements,m=f.$cont[0],i=m.cycleTimeout;if(i){clearTimeout(i);m.cycleTimeout=0}if(f.random&&k<0){f.randomIndex--;if(--f.randomIndex==-2)f.randomIndex=n.length-2;else if(f.randomIndex==-1)f.randomIndex=n.length-1;f.nextSlide=f.randomMap[f.randomIndex]}else if(f.random)f.nextSlide=f.randomMap[f.randomIndex];else{f.nextSlide=f.currSlide+k;if(f.nextSlide<0){if(f.nowrap)return false;f.nextSlide=n.length-1}else if(f.nextSlide>=n.length){if(f.nowrap)return false;f.nextSlide=
0}}m=f.onPrevNextEvent||f.prevNextClick;b.isFunction(m)&&m(k>0,f.nextSlide,n[f.nextSlide]);y(n,f,1,g);return false}function Q(f,g){var k=b(g.pager);b.each(f,function(n,m){b.fn.cycle.createPagerAnchor(n,m,k,f,g)});g.updateActivePagerLink(g.pager,g.startingSlide,g.activePagerClass)}function O(f){function g(n){n=parseInt(n).toString(16);return n.length<2?"0"+n:n}function k(n){for(;n&&n.nodeName.toLowerCase()!="html";n=n.parentNode){var m=b.css(n,"background-color");if(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"}a("applying clearType background-color hack");f.each(function(){b(this).css("background-color",k(this))})}if(b.support==undefined)b.support={opacity:!b.browser.msie};b.fn.cycle=function(f,g){var k={s:this.selector,c:this.context};if(this.length===0&&f!="stop"){if(!b.isReady&&k.s){c("DOM not ready, queuing slideshow");b(function(){b(k.s,k.c).cycle(f,g)});return this}c("terminating; zero elements found by selector"+(b.isReady?
"":" (DOM not ready)"));return this}return this.each(function(){var n=d(this,f,g);if(n!==false){n.updateActivePagerLink=n.updateActivePagerLink||b.fn.cycle.updateActivePagerLink;this.cycleTimeout&&clearTimeout(this.cycleTimeout);this.cycleTimeout=this.cyclePause=0;var m=b(this),i=n.slideExpr?b(n.slideExpr,this):m.children(),t=i.get();if(t.length<2)c("terminating; too few slides: "+t.length);else{var r=j(m,i,t,n,k);if(r!==false)if(m=r.continuous?10:w(t[r.currSlide],t[r.nextSlide],r,!r.backwards)){m+=
r.delay||0;if(m<10)m=10;a("first timeout: "+m);this.cycleTimeout=setTimeout(function(){y(t,r,0,!n.backwards)},m)}}}})};b.fn.cycle.resetState=function(f,g){g=g||f.fx;f.before=[];f.after=[];f.cssBefore=b.extend({},f.original.cssBefore);f.cssAfter=b.extend({},f.original.cssAfter);f.animIn=b.extend({},f.original.animIn);f.animOut=b.extend({},f.original.animOut);f.fxFn=null;b.each(f.original.before,function(){f.before.push(this)});b.each(f.original.after,function(){f.after.push(this)});var k=b.fn.cycle.transitions[g];
b.isFunction(k)&&k(f.$cont,b(f.elements),f)};b.fn.cycle.updateActivePagerLink=function(f,g,k){b(f).each(function(){b(this).children().removeClass(k).eq(g).addClass(k)})};b.fn.cycle.next=function(f){E(f,1)};b.fn.cycle.prev=function(f){E(f,0)};b.fn.cycle.createPagerAnchor=function(f,g,k,n,m){if(b.isFunction(m.pagerAnchorBuilder)){g=m.pagerAnchorBuilder(f,g);a("pagerAnchorBuilder("+f+", el) returned: "+g)}else g='<a href="#">'+(f+1)+"</a>";if(g){var i=b(g);if(i.parents("body").length===0){var t=[];if(k.length>
1){k.each(function(){var r=i.clone(true);b(this).append(r);t.push(r[0])});i=b(t)}else i.appendTo(k)}m.pagerAnchors=m.pagerAnchors||[];m.pagerAnchors.push(i);i.bind(m.pagerEvent,function(r){r.preventDefault();m.nextSlide=f;r=m.$cont[0];var z=r.cycleTimeout;if(z){clearTimeout(z);r.cycleTimeout=0}r=m.onPagerEvent||m.pagerClick;b.isFunction(r)&&r(m.nextSlide,n[m.nextSlide]);y(n,m,1,m.currSlide<f)});!/^click/.test(m.pagerEvent)&&!m.allowPagerClickBubble&&i.bind("click.cycle",function(){return false});
m.pauseOnPagerHover&&i.hover(function(){m.$cont[0].cyclePause++},function(){m.$cont[0].cyclePause--})}};b.fn.cycle.hopsFromLast=function(f,g){var k=f.lastSlide,n=f.currSlide;return g?n>k?n-k:f.slideCount-k:n<k?k-n:k+f.slideCount-n};b.fn.cycle.commonReset=function(f,g,k,n,m,i){b(k.elements).not(f).hide();k.cssBefore.opacity=1;k.cssBefore.display="block";if(n!==false&&g.cycleW>0)k.cssBefore.width=g.cycleW;if(m!==false&&g.cycleH>0)k.cssBefore.height=g.cycleH;k.cssAfter=k.cssAfter||{};k.cssAfter.display=
"none";b(f).css("zIndex",k.slideCount+(i===true?1:0));b(g).css("zIndex",k.slideCount+(i===true?0:1))};b.fn.cycle.custom=function(f,g,k,n,m,i){var t=b(f),r=b(g),z=k.speedIn;f=k.speedOut;var M=k.easeIn;g=k.easeOut;r.css(k.cssBefore);if(i){z=typeof i=="number"?f=i:f=1;M=g=null}t.animate(k.animOut,f,g,function(){k.cssAfter&&t.css(k.cssAfter);k.sync||r.animate(k.animIn,z,M,n)});k.sync&&r.animate(k.animIn,z,M,n)};b.fn.cycle.transitions={fade:function(f,g,k){g.not(":eq("+k.currSlide+")").css("opacity",0);
k.before.push(function(n,m,i){b.fn.cycle.commonReset(n,m,i);i.cssBefore.opacity=0});k.animIn={opacity:1};k.animOut={opacity:0};k.cssBefore={top:0,left:0}}};b.fn.cycle.ver=function(){return"2.92"};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,backwards:false}})(jQuery);
(function(b){b.fn.cycle.transitions.none=function(a,c,d){d.fxFn=function(e,h,j,q){b(h).show();b(e).hide();q()}};b.fn.cycle.transitions.scrollUp=function(a,c,d){a.css("overflow","hidden");d.before.push(b.fn.cycle.commonReset);a=a.height();d.cssBefore={top:a,left:0};d.cssFirst={top:0};d.animIn={top:0};d.animOut={top:-a}};b.fn.cycle.transitions.scrollDown=function(a,c,d){a.css("overflow","hidden");d.before.push(b.fn.cycle.commonReset);a=a.height();d.cssFirst={top:0};d.cssBefore={top:-a,left:0};d.animIn=
{top:0};d.animOut={top:a}};b.fn.cycle.transitions.scrollLeft=function(a,c,d){a.css("overflow","hidden");d.before.push(b.fn.cycle.commonReset);a=a.width();d.cssFirst={left:0};d.cssBefore={left:a,top:0};d.animIn={left:0};d.animOut={left:0-a}};b.fn.cycle.transitions.scrollRight=function(a,c,d){a.css("overflow","hidden");d.before.push(b.fn.cycle.commonReset);a=a.width();d.cssFirst={left:0};d.cssBefore={left:-a,top:0};d.animIn={left:0};d.animOut={left:a}};b.fn.cycle.transitions.scrollHorz=function(a,c,
d){a.css("overflow","hidden").width();d.before.push(function(e,h,j,q){if(j.rev)q=!q;b.fn.cycle.commonReset(e,h,j);j.cssBefore.left=q?h.cycleW-1:1-h.cycleW;j.animOut.left=q?-e.cycleW:e.cycleW});d.cssFirst={left:0};d.cssBefore={top:0};d.animIn={left:0};d.animOut={top:0}};b.fn.cycle.transitions.scrollVert=function(a,c,d){a.css("overflow","hidden");d.before.push(function(e,h,j,q){if(j.rev)q=!q;b.fn.cycle.commonReset(e,h,j);j.cssBefore.top=q?1-h.cycleH:h.cycleH-1;j.animOut.top=q?e.cycleH:-e.cycleH});d.cssFirst=
{top:0};d.cssBefore={left:0};d.animIn={top:0};d.animOut={left:0}};b.fn.cycle.transitions.slideX=function(a,c,d){d.before.push(function(e,h,j){b(j.elements).not(e).hide();b.fn.cycle.commonReset(e,h,j,false,true);j.animIn.width=h.cycleW});d.cssBefore={left:0,top:0,width:0};d.animIn={width:"show"};d.animOut={width:0}};b.fn.cycle.transitions.slideY=function(a,c,d){d.before.push(function(e,h,j){b(j.elements).not(e).hide();b.fn.cycle.commonReset(e,h,j,true,false);j.animIn.height=h.cycleH});d.cssBefore=
{left:0,top:0,height:0};d.animIn={height:"show"};d.animOut={height:0}};b.fn.cycle.transitions.shuffle=function(a,c,d){a=a.css("overflow","visible").width();c.css({left:0,top:0});d.before.push(function(e,h,j){b.fn.cycle.commonReset(e,h,j,true,true,true)});if(!d.speedAdjusted){d.speed/=2;d.speedAdjusted=true}d.random=0;d.shuffle=d.shuffle||{left:-a,top:15};d.els=[];for(a=0;a<c.length;a++)d.els.push(c[a]);for(a=0;a<d.currSlide;a++)d.els.push(d.els.shift());d.fxFn=function(e,h,j,q,u){if(j.rev)u=!u;var s=
u?b(e):b(h);b(h).css(j.cssBefore);var y=j.slideCount;s.animate(j.shuffle,j.speedIn,j.easeIn,function(){for(var w=b.fn.cycle.hopsFromLast(j,u),E=0;E<w;E++)u?j.els.push(j.els.shift()):j.els.unshift(j.els.pop());if(u){w=0;for(E=j.els.length;w<E;w++)b(j.els[w]).css("z-index",E-w+y)}else{w=b(e).css("z-index");s.css("z-index",parseInt(w)+1+y)}s.animate({left:0,top:0},j.speedOut,j.easeOut,function(){b(u?this:e).hide();q&&q()})})};d.cssBefore={display:"block",opacity:1,top:0,left:0}};b.fn.cycle.transitions.turnUp=
function(a,c,d){d.before.push(function(e,h,j){b.fn.cycle.commonReset(e,h,j,true,false);j.cssBefore.top=h.cycleH;j.animIn.height=h.cycleH;j.animOut.width=h.cycleW});d.cssFirst={top:0};d.cssBefore={left:0,height:0};d.animIn={top:0};d.animOut={height:0}};b.fn.cycle.transitions.turnDown=function(a,c,d){d.before.push(function(e,h,j){b.fn.cycle.commonReset(e,h,j,true,false);j.animIn.height=h.cycleH;j.animOut.top=e.cycleH});d.cssFirst={top:0};d.cssBefore={left:0,top:0,height:0};d.animOut={height:0}};b.fn.cycle.transitions.turnLeft=
function(a,c,d){d.before.push(function(e,h,j){b.fn.cycle.commonReset(e,h,j,false,true);j.cssBefore.left=h.cycleW;j.animIn.width=h.cycleW});d.cssBefore={top:0,width:0};d.animIn={left:0};d.animOut={width:0}};b.fn.cycle.transitions.turnRight=function(a,c,d){d.before.push(function(e,h,j){b.fn.cycle.commonReset(e,h,j,false,true);j.animIn.width=h.cycleW;j.animOut.left=e.cycleW});d.cssBefore={top:0,left:0,width:0};d.animIn={left:0};d.animOut={width:0}};b.fn.cycle.transitions.zoom=function(a,c,d){d.before.push(function(e,
h,j){b.fn.cycle.commonReset(e,h,j,false,false,true);j.cssBefore.top=h.cycleH/2;j.cssBefore.left=h.cycleW/2;j.animIn={top:0,left:0,width:h.cycleW,height:h.cycleH};j.animOut={width:0,height:0,top:e.cycleH/2,left:e.cycleW/2}});d.cssFirst={top:0,left:0};d.cssBefore={width:0,height:0}};b.fn.cycle.transitions.fadeZoom=function(a,c,d){d.before.push(function(e,h,j){b.fn.cycle.commonReset(e,h,j,false,false);j.cssBefore.left=h.cycleW/2;j.cssBefore.top=h.cycleH/2;j.animIn={top:0,left:0,width:h.cycleW,height:h.cycleH}});
d.cssBefore={width:0,height:0};d.animOut={opacity:0}};b.fn.cycle.transitions.blindX=function(a,c,d){a=a.css("overflow","hidden").width();d.before.push(function(e,h,j){b.fn.cycle.commonReset(e,h,j);j.animIn.width=h.cycleW;j.animOut.left=e.cycleW});d.cssBefore={left:a,top:0};d.animIn={left:0};d.animOut={left:a}};b.fn.cycle.transitions.blindY=function(a,c,d){a=a.css("overflow","hidden").height();d.before.push(function(e,h,j){b.fn.cycle.commonReset(e,h,j);j.animIn.height=h.cycleH;j.animOut.top=e.cycleH});
d.cssBefore={top:a,left:0};d.animIn={top:0};d.animOut={top:a}};b.fn.cycle.transitions.blindZ=function(a,c,d){c=a.css("overflow","hidden").height();a=a.width();d.before.push(function(e,h,j){b.fn.cycle.commonReset(e,h,j);j.animIn.height=h.cycleH;j.animOut.top=e.cycleH});d.cssBefore={top:c,left:a};d.animIn={top:0,left:0};d.animOut={top:c,left:a}};b.fn.cycle.transitions.growX=function(a,c,d){d.before.push(function(e,h,j){b.fn.cycle.commonReset(e,h,j,false,true);j.cssBefore.left=this.cycleW/2;j.animIn=
{left:0,width:this.cycleW};j.animOut={left:0}});d.cssBefore={width:0,top:0}};b.fn.cycle.transitions.growY=function(a,c,d){d.before.push(function(e,h,j){b.fn.cycle.commonReset(e,h,j,true,false);j.cssBefore.top=this.cycleH/2;j.animIn={top:0,height:this.cycleH};j.animOut={top:0}});d.cssBefore={height:0,left:0}};b.fn.cycle.transitions.curtainX=function(a,c,d){d.before.push(function(e,h,j){b.fn.cycle.commonReset(e,h,j,false,true,true);j.cssBefore.left=h.cycleW/2;j.animIn={left:0,width:this.cycleW};j.animOut=
{left:e.cycleW/2,width:0}});d.cssBefore={top:0,width:0}};b.fn.cycle.transitions.curtainY=function(a,c,d){d.before.push(function(e,h,j){b.fn.cycle.commonReset(e,h,j,true,false,true);j.cssBefore.top=h.cycleH/2;j.animIn={top:0,height:h.cycleH};j.animOut={top:e.cycleH/2,height:0}});d.cssBefore={left:0,height:0}};b.fn.cycle.transitions.cover=function(a,c,d){var e=d.direction||"left",h=a.css("overflow","hidden").width(),j=a.height();d.before.push(function(q,u,s){b.fn.cycle.commonReset(q,u,s);if(e=="right")s.cssBefore.left=
-h;else if(e=="up")s.cssBefore.top=j;else if(e=="down")s.cssBefore.top=-j;else s.cssBefore.left=h});d.animIn={left:0,top:0};d.animOut={opacity:1};d.cssBefore={top:0,left:0}};b.fn.cycle.transitions.uncover=function(a,c,d){var e=d.direction||"left",h=a.css("overflow","hidden").width(),j=a.height();d.before.push(function(q,u,s){b.fn.cycle.commonReset(q,u,s,true,true,true);if(e=="right")s.animOut.left=h;else if(e=="up")s.animOut.top=-j;else if(e=="down")s.animOut.top=j;else s.animOut.left=-h});d.animIn=
{left:0,top:0};d.animOut={opacity:1};d.cssBefore={top:0,left:0}};b.fn.cycle.transitions.toss=function(a,c,d){var e=a.css("overflow","visible").width(),h=a.height();d.before.push(function(j,q,u){b.fn.cycle.commonReset(j,q,u,true,true,true);if(!u.animOut.left&&!u.animOut.top)u.animOut={left:e*2,top:-h/2,opacity:0};else u.animOut.opacity=0});d.cssBefore={left:0,top:0};d.animIn={left:0}};b.fn.cycle.transitions.wipe=function(a,c,d){var e=a.css("overflow","hidden").width(),h=a.height();d.cssBefore=d.cssBefore||
{};var j;if(d.clip)if(/l2r/.test(d.clip))j="rect(0px 0px "+h+"px 0px)";else if(/r2l/.test(d.clip))j="rect(0px "+e+"px "+h+"px "+e+"px)";else if(/t2b/.test(d.clip))j="rect(0px "+e+"px 0px 0px)";else if(/b2t/.test(d.clip))j="rect("+h+"px "+e+"px "+h+"px 0px)";else if(/zoom/.test(d.clip)){a=parseInt(h/2);c=parseInt(e/2);j="rect("+a+"px "+c+"px "+a+"px "+c+"px)"}d.cssBefore.clip=d.cssBefore.clip||j||"rect(0px 0px 0px 0px)";a=d.cssBefore.clip.match(/(\d+)/g);var q=parseInt(a[0]),u=parseInt(a[1]),s=parseInt(a[2]),
y=parseInt(a[3]);d.before.push(function(w,E,Q){if(w!=E){var O=b(w),f=b(E);b.fn.cycle.commonReset(w,E,Q,true,true,false);Q.cssAfter.display="block";var g=1,k=parseInt(Q.speedIn/13)-1;(function n(){var m=q?q-parseInt(g*(q/k)):0,i=y?y-parseInt(g*(y/k)):0,t=s<h?s+parseInt(g*((h-s)/k||1)):h,r=u<e?u+parseInt(g*((e-u)/k||1)):e;f.css({clip:"rect("+m+"px "+r+"px "+t+"px "+i+"px)"});g++<=k?setTimeout(n,13):O.css("display","none")})()}});d.cssBefore={display:"block",opacity:1,top:0,left:0};d.animIn={left:0};
d.animOut={left:0}}})(jQuery);
(function(b){b.fn.nmcDropDown=function(a){var c=b.extend({},b.fn.nmcDropDown.defaults,a);return this.each(function(){var d=b(this);submenus=d.children("li:has("+c.submenu_selector+")");if(c.fix_IE){d.css("z-index",51).parents().each(function(e){b(this).css("position")=="relative"&&b(this).css("z-index",e+52)});submenus.children(c.submenu_selector).css("z-index",50)}over=function(){b(this).addClass(c.active_class).children(c.submenu_selector).animate(c.show,c.show_speed);return false};out=function(){b(this).removeClass(c.active_class).children(c.submenu_selector).animate(c.hide,
c.hide_speed);return false};if(c.trigger=="click")submenus.toggle(over,out).children(c.submenu_selector).hide();else b().hoverIntent?submenus.hoverIntent({interval:c.show_delay,over:over,timeout:c.hide_delay,out:out}).children(c.submenu_selector).hide():submenus.hover(over,out).children(c.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,a){function c(o,v){o=o?' id="'+k+o+'"':"";v=v?' style="'+v+'"':"";return b("<div"+o+v+"/>")}function d(o,v){v=v===O?J.width():J.height();return typeof o==="string"?Math.round(o.match(/%/)?v/100*parseInt(o,10):parseInt(o,10)):o}function e(o){o=b.isFunction(o)?o.call(F):o;return l.photo||o.match(/\.(gif|png|jpg|jpeg|bmp)(?:\?([^#]*))?(?:#(\.*))?$/i)}function h(){for(var o in l)if(b.isFunction(l[o])&&o.substring(0,2)!==Q)l[o]=l[o].call(F);l.rel=l.rel||F.rel||E;l.href=l.href||b(F).attr("href");
l.title=l.title||F.title}function j(o){F=o;l=b.extend({},b(F).data(g));h();if(l.rel!==E){G=b("."+da).filter(function(){return(b(this).data(g).rel||this.rel)===l.rel});D=G.index(F);if(D===-1){G=G.add(F);D=G.length-1}}else{G=b(F);D=0}if(!R){R=$=w;ia=F;try{ia.blur()}catch(v){}b.event.trigger(n);l.onOpen&&l.onOpen.call(F);N.css({opacity:+l.opacity,cursor:l.overlayClose?"pointer":y}).show();l.w=d(l.initialWidth,O);l.h=d(l.initialHeight,s);x.position(0);M&&J.bind(u+K+" scroll."+K,function(){N.css({width:J.width(),
height:J.height(),top:J.scrollTop(),left:J.scrollLeft()})}).trigger("scroll."+K)}ja.add(ea).add(fa).add(T).add(ka).hide();la.html(l.close).show();x.slideshow();x.load()}var q="click",u="resize.",s="y",y="auto",w=true,E="nofollow",Q="on",O="x",f={transition:"elastic",speed:300,width:false,initialWidth:"600",innerWidth:false,maxWidth:false,height:false,initialHeight:"450",innerHeight:false,maxHeight:false,scalePhotos:w,scrolling:w,inline:false,html:false,iframe:false,photo:false,href:false,title:false,
rel:false,opacity:0.9,preloading:w,current:"image {current} of {total}",previous:"previous",next:"next",close:"close",open:false,loop:w,slideshow:false,slideshowAuto:w,slideshowSpeed:2500,slideshowStart:"start slideshow",slideshowStop:"stop slideshow",onOpen:false,onLoad:false,onComplete:false,onCleanup:false,onClosed:false,overlayClose:w,escKey:w,arrowKey:w},g="colorbox",k="cbox",n=k+"_open",m=k+"_load",i=k+"_complete",t=k+"_cleanup",r=k+"_closed",z=b.browser.msie&&!b.support.opacity,M=z&&b.browser.version<
7,K=k+"_IE6",N,B,P,L,C,ba,ca,ma,G,J,I,ga,ha,ka,ja,T,fa,ea,la,X,Y,U,V,F,ia,D,l,R,$,x,da=k+"Element";x=b.fn[g]=b[g]=function(o,v){var A=this;if(!A[0]&&A.selector)return A;o=o||{};if(v)o.onComplete=v;if(!A[0]||A.selector===undefined){A=b("<a/>");o.open=w}A.each(function(){b(this).data(g,b.extend({},b(this).data(g)||f,o)).addClass(da)});o.open&&j(A[0]);return A};x.init=function(){J=b(a);B=c().attr({id:g,"class":z?k+"IE":""});N=c("Overlay",M?"position:absolute":"").hide();P=c("Wrapper");L=c("Content").append(I=
c("LoadedContent","width:0; height:0"),ha=c("LoadingOverlay").add(c("LoadingGraphic")),ka=c("Title"),ja=c("Current"),fa=c("Next"),ea=c("Previous"),T=c("Slideshow"),la=c("Close"));P.append(c().append(c("TopLeft"),C=c("TopCenter"),c("TopRight")),c().append(ba=c("MiddleLeft"),L,ca=c("MiddleRight")),c().append(c("BottomLeft"),ma=c("BottomCenter"),c("BottomRight"))).children().children().css({"float":"left"});ga=c(false,"position:absolute; width:9999px; visibility:hidden; display:none");b("body").prepend(N,
B.append(P,ga));L.children().hover(function(){b(this).addClass("hover")},function(){b(this).removeClass("hover")}).addClass("hover");X=C.height()+ma.height()+L.outerHeight(w)-L.height();Y=ba.width()+ca.width()+L.outerWidth(w)-L.width();U=I.outerHeight(w);V=I.outerWidth(w);B.css({"padding-bottom":X,"padding-right":Y}).hide();fa.click(x.next);ea.click(x.prev);la.click(x.close);L.children().removeClass("hover");b("."+da).live(q,function(o){if(o.button!==0&&typeof o.button!=="undefined"||o.ctrlKey||o.shiftKey||
o.altKey)return w;else{j(this);return false}});N.click(function(){l.overlayClose&&x.close()});b(document).bind("keydown",function(o){if(R&&l.escKey&&o.keyCode===27){o.preventDefault();x.close()}if(R&&l.arrowKey&&!$&&G[1])if(o.keyCode===37&&(D||l.loop)){o.preventDefault();ea.click()}else if(o.keyCode===39&&(D<G.length-1||l.loop)){o.preventDefault();fa.click()}})};x.remove=function(){B.add(N).remove();b("."+da).die(q).removeData(g).removeClass(da)};x.position=function(o,v){function A(W){C[0].style.width=
ma[0].style.width=L[0].style.width=W.style.width;ha[0].style.height=ha[1].style.height=L[0].style.height=ba[0].style.height=ca[0].style.height=W.style.height}var H,S=Math.max(J.height()-l.h-U-X,0)/2+J.scrollTop(),Z=Math.max(J.width()-l.w-V-Y,0)/2+J.scrollLeft();H=B.width()===l.w+V&&B.height()===l.h+U?0:o;P[0].style.width=P[0].style.height="9999px";B.dequeue().animate({width:l.w+V,height:l.h+U,top:S,left:Z},{duration:H,complete:function(){A(this);$=false;P[0].style.width=l.w+V+Y+"px";P[0].style.height=
l.h+U+X+"px";v&&v()},step:function(){A(this)}})};x.resize=function(o){if(R){o=o||{};if(o.width)l.w=d(o.width,O)-V-Y;if(o.innerWidth)l.w=d(o.innerWidth,O);I.css({width:l.w});if(o.height)l.h=d(o.height,s)-U-X;if(o.innerHeight)l.h=d(o.innerHeight,s);if(!o.innerHeight&&!o.height){o=I.wrapInner("<div style='overflow:auto'></div>").children();l.h=o.height();o.replaceWith(o.children())}I.css({height:l.h});x.position(l.transition==="none"?0:l.speed)}};x.prep=function(o){function v(S){var Z,W,na,oa,aa=G.length,
pa=l.loop;x.position(S,function(){function qa(){z&&B[0].style.removeAttribute("filter")}if(R){z&&A&&I.fadeIn(100);l.iframe&&b("<iframe frameborder=0"+(l.scrolling?"":" scrolling='no'")+(z?" allowtransparency='true'":"")+"/>").attr({src:l.href,name:(new Date).getTime()}).appendTo(I);I.show();ka.show().html(l.title);if(aa>1){ja.html(l.current.replace(/\{current\}/,D+1).replace(/\{total\}/,aa)).show();fa[pa||D<aa-1?"show":"hide"]().html(l.next);ea[pa||D?"show":"hide"]().html(l.previous);Z=D?G[D-1]:G[aa-
1];na=D<aa-1?G[D+1]:G[0];if(l.slideshow){T.show();D===aa-1&&!pa&&B.is("."+k+"Slideshow_on")&&T.click()}if(l.preloading){oa=b(na).data(g).href||na.href;W=b(Z).data(g).href||Z.href;if(e(oa))b("<img/>")[0].src=oa;if(e(W))b("<img/>")[0].src=W}}ha.hide();l.transition==="fade"?B.fadeTo(H,1,function(){qa()}):qa();J.bind(u+k,function(){x.position(0)});b.event.trigger(i);l.onComplete&&l.onComplete.call(F)}})}if(R){var A,H=l.transition==="none"?0:l.speed;J.unbind(u+k);I.remove();I=c("LoadedContent").html(o);
I.hide().appendTo(ga.show()).css({width:function(){l.w=l.w||I.width();l.w=l.mw&&l.mw<l.w?l.mw:l.w;return l.w}(),overflow:l.scrolling?y:"hidden"}).css({height:function(){l.h=l.h||I.height();l.h=l.mh&&l.mh<l.h?l.mh:l.h;return l.h}()}).prependTo(L);ga.hide();b("#"+k+"Photo").css({cssFloat:"none"});M&&b("select").not(B.find("select")).filter(function(){return this.style.visibility!=="hidden"}).css({visibility:"hidden"}).one(t,function(){this.style.visibility="inherit"});l.transition==="fade"?B.fadeTo(H,
0,function(){v(0)}):v(H)}};x.load=function(){var o,v,A,H=x.prep;$=w;F=G[D];l=b.extend({},b(F).data(g));h();b.event.trigger(m);l.onLoad&&l.onLoad.call(F);l.h=l.height?d(l.height,s)-U-X:l.innerHeight&&d(l.innerHeight,s);l.w=l.width?d(l.width,O)-V-Y:l.innerWidth&&d(l.innerWidth,O);l.mw=l.w;l.mh=l.h;if(l.maxWidth){l.mw=d(l.maxWidth,O)-V-Y;l.mw=l.w&&l.w<l.mw?l.w:l.mw}if(l.maxHeight){l.mh=d(l.maxHeight,s)-U-X;l.mh=l.h&&l.h<l.mh?l.h:l.mh}o=l.href;ha.show();if(l.inline){c("InlineTemp").hide().insertBefore(b(o)[0]).bind(m+
" "+t,function(){b(this).replaceWith(I.children())});H(b(o))}else if(l.iframe)H(" ");else if(l.html)H(l.html);else if(e(o)){v=new Image;v.onload=function(){var S;v.onload=null;v.id=k+"Photo";b(v).css({margin:y,border:"none",display:"block",cssFloat:"left"});if(l.scalePhotos){A=function(){v.height-=v.height*S;v.width-=v.width*S};if(l.mw&&v.width>l.mw){S=(v.width-l.mw)/v.width;A()}if(l.mh&&v.height>l.mh){S=(v.height-l.mh)/v.height;A()}}if(l.h)v.style.marginTop=Math.max(l.h-v.height,0)/2+"px";setTimeout(function(){H(v)},
1);G[1]&&(D<G.length-1||l.loop)&&b(v).css({cursor:"pointer"}).click(x.next);if(z)v.style.msInterpolationMode="bicubic"};v.src=o}else c().appendTo(ga).load(o,function(S,Z,W){H(Z==="error"?"Request unsuccessful: "+W.statusText:this)})};x.next=function(){if(!$){D=D<G.length-1?D+1:0;x.load()}};x.prev=function(){if(!$){D=D?D-1:G.length-1;x.load()}};x.slideshow=function(){function o(){T.text(l.slideshowStop).bind(i,function(){A=setTimeout(x.next,l.slideshowSpeed)}).bind(m,function(){clearTimeout(A)}).one(q,
function(){v()});B.removeClass(H+"off").addClass(H+Q)}var v,A,H=k+"Slideshow_";T.bind(r,function(){T.unbind();clearTimeout(A);B.removeClass(H+"off "+H+Q)});v=function(){clearTimeout(A);T.text(l.slideshowStart).unbind(i+" "+m).one(q,function(){o();A=setTimeout(x.next,l.slideshowSpeed)});B.removeClass(H+Q).addClass(H+"off")};if(l.slideshow&&G[1])l.slideshowAuto?o():v()};x.close=function(){if(R){R=false;b.event.trigger(t);l.onCleanup&&l.onCleanup.call(F);J.unbind("."+k+" ."+K);N.fadeTo("fast",0);B.stop().fadeTo("fast",
0,function(){B.find("iframe").attr("src","about:blank");I.remove();B.add(N).css({opacity:1,cursor:y}).hide();try{ia.focus()}catch(o){}setTimeout(function(){b.event.trigger(r);l.onClosed&&l.onClosed.call(F)},1)})}};x.element=function(){return b(F)};x.settings=f;b(x.init)})(jQuery,this);jQuery.easing.jswing=jQuery.easing.swing;
jQuery.extend(jQuery.easing,{def:"easeOutQuad",swing:function(b,a,c,d,e){return jQuery.easing[jQuery.easing.def](b,a,c,d,e)},easeInQuad:function(b,a,c,d,e){return d*(a/=e)*a+c},easeOutQuad:function(b,a,c,d,e){return-d*(a/=e)*(a-2)+c},easeInOutQuad:function(b,a,c,d,e){if((a/=e/2)<1)return d/2*a*a+c;return-d/2*(--a*(a-2)-1)+c},easeInCubic:function(b,a,c,d,e){return d*(a/=e)*a*a+c},easeOutCubic:function(b,a,c,d,e){return d*((a=a/e-1)*a*a+1)+c},easeInOutCubic:function(b,a,c,d,e){if((a/=e/2)<1)return d/
2*a*a*a+c;return d/2*((a-=2)*a*a+2)+c},easeInQuart:function(b,a,c,d,e){return d*(a/=e)*a*a*a+c},easeOutQuart:function(b,a,c,d,e){return-d*((a=a/e-1)*a*a*a-1)+c},easeInOutQuart:function(b,a,c,d,e){if((a/=e/2)<1)return d/2*a*a*a*a+c;return-d/2*((a-=2)*a*a*a-2)+c},easeInQuint:function(b,a,c,d,e){return d*(a/=e)*a*a*a*a+c},easeOutQuint:function(b,a,c,d,e){return d*((a=a/e-1)*a*a*a*a+1)+c},easeInOutQuint:function(b,a,c,d,e){if((a/=e/2)<1)return d/2*a*a*a*a*a+c;return d/2*((a-=2)*a*a*a*a+2)+c},easeInSine:function(b,
a,c,d,e){return-d*Math.cos(a/e*(Math.PI/2))+d+c},easeOutSine:function(b,a,c,d,e){return d*Math.sin(a/e*(Math.PI/2))+c},easeInOutSine:function(b,a,c,d,e){return-d/2*(Math.cos(Math.PI*a/e)-1)+c},easeInExpo:function(b,a,c,d,e){return a==0?c:d*Math.pow(2,10*(a/e-1))+c},easeOutExpo:function(b,a,c,d,e){return a==e?c+d:d*(-Math.pow(2,-10*a/e)+1)+c},easeInOutExpo:function(b,a,c,d,e){if(a==0)return c;if(a==e)return c+d;if((a/=e/2)<1)return d/2*Math.pow(2,10*(a-1))+c;return d/2*(-Math.pow(2,-10*--a)+2)+c},
easeInCirc:function(b,a,c,d,e){return-d*(Math.sqrt(1-(a/=e)*a)-1)+c},easeOutCirc:function(b,a,c,d,e){return d*Math.sqrt(1-(a=a/e-1)*a)+c},easeInOutCirc:function(b,a,c,d,e){if((a/=e/2)<1)return-d/2*(Math.sqrt(1-a*a)-1)+c;return d/2*(Math.sqrt(1-(a-=2)*a)+1)+c},easeInElastic:function(b,a,c,d,e){b=1.70158;var h=0,j=d;if(a==0)return c;if((a/=e)==1)return c+d;h||(h=e*0.3);if(j<Math.abs(d)){j=d;b=h/4}else b=h/(2*Math.PI)*Math.asin(d/j);return-(j*Math.pow(2,10*(a-=1))*Math.sin((a*e-b)*2*Math.PI/h))+c},easeOutElastic:function(b,
a,c,d,e){b=1.70158;var h=0,j=d;if(a==0)return c;if((a/=e)==1)return c+d;h||(h=e*0.3);if(j<Math.abs(d)){j=d;b=h/4}else b=h/(2*Math.PI)*Math.asin(d/j);return j*Math.pow(2,-10*a)*Math.sin((a*e-b)*2*Math.PI/h)+d+c},easeInOutElastic:function(b,a,c,d,e){b=1.70158;var h=0,j=d;if(a==0)return c;if((a/=e/2)==2)return c+d;h||(h=e*0.3*1.5);if(j<Math.abs(d)){j=d;b=h/4}else b=h/(2*Math.PI)*Math.asin(d/j);if(a<1)return-0.5*j*Math.pow(2,10*(a-=1))*Math.sin((a*e-b)*2*Math.PI/h)+c;return j*Math.pow(2,-10*(a-=1))*Math.sin((a*
e-b)*2*Math.PI/h)*0.5+d+c},easeInBack:function(b,a,c,d,e,h){if(h==undefined)h=1.70158;return d*(a/=e)*a*((h+1)*a-h)+c},easeOutBack:function(b,a,c,d,e,h){if(h==undefined)h=1.70158;return d*((a=a/e-1)*a*((h+1)*a+h)+1)+c},easeInOutBack:function(b,a,c,d,e,h){if(h==undefined)h=1.70158;if((a/=e/2)<1)return d/2*a*a*(((h*=1.525)+1)*a-h)+c;return d/2*((a-=2)*a*(((h*=1.525)+1)*a+h)+2)+c},easeInBounce:function(b,a,c,d,e){return d-jQuery.easing.easeOutBounce(b,e-a,0,d,e)+c},easeOutBounce:function(b,a,c,d,e){return(a/=
e)<1/2.75?d*7.5625*a*a+c:a<2/2.75?d*(7.5625*(a-=1.5/2.75)*a+0.75)+c:a<2.5/2.75?d*(7.5625*(a-=2.25/2.75)*a+0.9375)+c:d*(7.5625*(a-=2.625/2.75)*a+0.984375)+c},easeInOutBounce:function(b,a,c,d,e){if(a<e/2)return jQuery.easing.easeInBounce(b,a*2,0,d,e)*0.5+c;return jQuery.easing.easeOutBounce(b,a*2-e,0,d,e)*0.5+d*0.5+c}});
jQuery.extend({roundabout_shape:{def:"lazySusan",lazySusan:function(b,a,c){return{x:Math.sin(b+a),y:Math.sin(b+3*Math.PI/2+a)/8*c,z:(Math.cos(b+a)+1)/2,scale:Math.sin(b+Math.PI/2+a)/2+0.5}}}});
jQuery.fn.roundabout=function(b,a){var c=typeof b!="object"?{}:b;c={bearing:typeof c.bearing=="undefined"?0:jQuery.roundabout_toFloat(c.bearing%360),tilt:typeof c.tilt=="undefined"?0:jQuery.roundabout_toFloat(c.tilt),minZ:typeof c.minZ=="undefined"?100:parseInt(c.minZ,10),maxZ:typeof c.maxZ=="undefined"?400:parseInt(c.maxZ,10),minOpacity:typeof c.minOpacity=="undefined"?0.4:jQuery.roundabout_toFloat(c.minOpacity),maxOpacity:typeof c.maxOpacity=="undefined"?1:jQuery.roundabout_toFloat(c.maxOpacity),
minScale:typeof c.minScale=="undefined"?0.4:jQuery.roundabout_toFloat(c.minScale),maxScale:typeof c.maxScale=="undefined"?1:jQuery.roundabout_toFloat(c.maxScale),duration:typeof c.duration=="undefined"?600:parseInt(c.duration,10),btnNext:c.btnNext||null,btnPrev:c.btnPrev||null,easing:c.easing||"swing",clickToFocus:c.clickToFocus!==false,focusBearing:typeof c.focusBearing=="undefined"?0:jQuery.roundabout_toFloat(c.focusBearing%360),shape:c.shape||"lazySusan",debug:c.debug||false,childSelector:c.childSelector||
"li",startingChild:typeof c.startingChild=="undefined"?null:parseInt(c.startingChild,10),reflect:typeof c.reflect=="undefined"||c.reflect===false?false:true};this.each(function(){var e=jQuery(this),h=jQuery.roundabout_toFloat(360/e.children(c.childSelector).length),j=c.startingChild===null?c.bearing:c.startingChild*h;e.addClass("roundabout-holder").css("padding",0).css("position","relative").css("z-index",c.minZ);e.data("roundabout",{bearing:j,tilt:c.tilt,minZ:c.minZ,maxZ:c.maxZ,minOpacity:c.minOpacity,
maxOpacity:c.maxOpacity,minScale:c.minScale,maxScale:c.maxScale,duration:c.duration,easing:c.easing,clickToFocus:c.clickToFocus,focusBearing:c.focusBearing,animating:0,childInFocus:-1,shape:c.shape,period:h,debug:c.debug,childSelector:c.childSelector,reflect:c.reflect});c.clickToFocus===true&&e.children(c.childSelector).each(function(q){jQuery(this).click(function(u){var s=c.reflect===true?360-h*q:h*q;s=jQuery.roundabout_toFloat(s);if(!jQuery.roundabout_isInFocus(e,s)){u.preventDefault();e.data("roundabout").animating===
0&&e.roundabout_animateAngleToFocus(s);return false}})});c.btnNext&&jQuery(c.btnNext).bind("click.roundabout",function(q){q.preventDefault();e.data("roundabout").animating===0&&e.roundabout_animateToNextChild();return false});c.btnPrev&&jQuery(c.btnPrev).bind("click.roundabout",function(q){q.preventDefault();e.data("roundabout").animating===0&&e.roundabout_animateToPreviousChild();return false})});this.roundabout_startChildren();if(typeof a==="function"){var d=this;setTimeout(function(){a(d)},0)}return this};
jQuery.fn.roundabout_startChildren=function(){this.each(function(){var b=jQuery(this),a=b.data("roundabout");b.children(a.childSelector).each(function(c){c=a.reflect===true?360-a.period*c:a.period*c;jQuery(this).addClass("roundabout-moveable-item").css("position","absolute");jQuery(this).data("roundabout",{startWidth:jQuery(this).width(),startHeight:jQuery(this).height(),startFontSize:parseInt(jQuery(this).css("font-size"),10),degrees:c})});b.roundabout_updateChildPositions()});return this};
jQuery.fn.roundabout_setTilt=function(b,a){this.each(function(){jQuery(this).data("roundabout").tilt=b;jQuery(this).roundabout_updateChildPositions()});if(typeof a==="function"){var c=this;setTimeout(function(){a(c)},0)}return this};jQuery.fn.roundabout_setBearing=function(b,a){this.each(function(){jQuery(this).data("roundabout").bearing=jQuery.roundabout_toFloat(b%360,2);jQuery(this).roundabout_updateChildPositions()});if(typeof a==="function"){var c=this;setTimeout(function(){a(c)},0)}return this};
jQuery.fn.roundabout_adjustBearing=function(b,a){b=jQuery.roundabout_toFloat(b);b!==0&&this.each(function(){jQuery(this).data("roundabout").bearing=jQuery.roundabout_getBearing(jQuery(this))+b;jQuery(this).roundabout_updateChildPositions()});if(typeof a==="function"){var c=this;setTimeout(function(){a(c)},0)}return this};
jQuery.fn.roundabout_adjustTilt=function(b,a){b=jQuery.roundabout_toFloat(b);b!==0&&this.each(function(){jQuery(this).data("roundabout").tilt=jQuery.roundabout_toFloat(jQuery(this).roundabout_get("tilt")+b);jQuery(this).roundabout_updateChildPositions()});if(typeof a==="function"){var c=this;setTimeout(function(){a(c)},0)}return this};
jQuery.fn.roundabout_animateToBearing=function(b,a,c,d){b=jQuery.roundabout_toFloat(b);var e=new Date,h=typeof a=="undefined"?null:a,j=typeof c=="undefined"?null:c,q=typeof d!=="object"?null:d;this.each(function(){var u=jQuery(this),s=u.data("roundabout"),y,w=h===null?s.duration:h,E=j!==null?j:s.easing||"swing";if(q===null)q={timerStart:e,start:jQuery.roundabout_getBearing(u),totalTime:w};y=e-q.timerStart;if(y<w){s.animating=1;if(typeof jQuery.easing.def=="string"){s=jQuery.easing[E]||jQuery.easing[jQuery.easing.def];
y=s(null,y,q.start,b-q.start,q.totalTime)}else y=jQuery.easing[E](y/q.totalTime,y,q.start,b-q.start,q.totalTime);u.roundabout_setBearing(y,function(){u.roundabout_animateToBearing(b,w,E,q)})}else{b=b<0?b+360:b%360;s.animating=0;u.roundabout_setBearing(b)}});return this};jQuery.fn.roundabout_animateToDelta=function(b,a,c){this.each(function(){b=jQuery.roundabout_getBearing(jQuery(this))+jQuery.roundabout_toFloat(b);jQuery(this).roundabout_animateToBearing(b,a,c)});return this};
jQuery.fn.roundabout_animateToChild=function(b,a,c){this.each(function(){var d=jQuery(this),e=d.data("roundabout");if(e.childInFocus!==b&&e.animating===0){e=jQuery(d.children(e.childSelector)[b]);d.roundabout_animateAngleToFocus(e.data("roundabout").degrees,a,c)}});return this};
jQuery.fn.roundabout_animateToNearbyChild=function(b,a){var c=b[0],d=b[1];this.each(function(){var e=jQuery(this).data("roundabout"),h=jQuery.roundabout_toFloat(360-jQuery.roundabout_getBearing(jQuery(this))),j=e.period,q=0,u=e.reflect,s=jQuery(this).children(e.childSelector).length;h=u===true?h%360:h;if(e.animating===0)if(u===false&&a==="next"||u===true&&a!=="next")for(h=h===0?360:h;q<s;){e={lower:jQuery.roundabout_toFloat(j*q),upper:jQuery.roundabout_toFloat(j*(q+1))};e.upper=q==s-1?360:e.upper;
if(h<=e.upper&&h>e.lower){jQuery(this).roundabout_animateToDelta(h-e.lower,c,d);break}q++}else for(;;){e={lower:jQuery.roundabout_toFloat(j*q),upper:jQuery.roundabout_toFloat(j*(q+1))};e.upper=q==s-1?360:e.upper;if(h>=e.lower&&h<e.upper){jQuery(this).roundabout_animateToDelta(h-e.upper,c,d);break}q++}});return this};jQuery.fn.roundabout_animateToNextChild=function(){return this.roundabout_animateToNearbyChild(arguments,"next")};
jQuery.fn.roundabout_animateToPreviousChild=function(){return this.roundabout_animateToNearbyChild(arguments,"previous")};jQuery.fn.roundabout_animateAngleToFocus=function(b,a,c){this.each(function(){var d=jQuery.roundabout_getBearing(jQuery(this))-b;d=Math.abs(360-d)<Math.abs(0-d)?360-d:0-d;d=d>180?-(360-d):d;d!==0&&jQuery(this).roundabout_animateToDelta(d,a,c)});return this};
jQuery.fn.roundabout_updateChildPositions=function(){this.each(function(){var b=jQuery(this),a=b.data("roundabout"),c=-1,d={bearing:jQuery.roundabout_getBearing(b),tilt:a.tilt,stage:{width:Math.floor(b.width()*0.9),height:Math.floor(b.height()*0.9)},animating:a.animating,inFocus:a.childInFocus,focusBearingRad:jQuery.roundabout_degToRad(a.focusBearing),shape:jQuery.roundabout_shape[a.shape]||jQuery.roundabout_shape[jQuery.roundabout_shape.def]};d.midStage={width:d.stage.width/2,height:d.stage.height/
2};d.nudge={width:d.midStage.width+d.stage.width*0.05,height:d.midStage.height+d.stage.height*0.05};d.zValues={min:a.minZ,max:a.maxZ,diff:a.maxZ-a.minZ};d.opacity={min:a.minOpacity,max:a.maxOpacity,diff:a.maxOpacity-a.minOpacity};d.scale={min:a.minScale,max:a.maxScale,diff:a.maxScale-a.minScale};b.children(a.childSelector).each(function(e){if(jQuery.roundabout_updateChildPosition(jQuery(this),b,d,e)&&d.animating===0){c=e;jQuery(this).addClass("roundabout-in-focus")}else jQuery(this).removeClass("roundabout-in-focus")});
if(c!==d.inFocus){jQuery.roundabout_triggerEvent(b,d.inFocus,"blur");c!==-1&&jQuery.roundabout_triggerEvent(b,c,"focus");a.childInFocus=c}});return this};jQuery.roundabout_getBearing=function(b){return jQuery.roundabout_toFloat(b.data("roundabout").bearing)%360};jQuery.roundabout_degToRad=function(b){return b%360*Math.PI/180};jQuery.roundabout_isInFocus=function(b,a){return jQuery.roundabout_getBearing(b)%360===a%360};jQuery.roundabout_triggerEvent=function(b,a,c){return a<0?this:jQuery(b.children(b.data("roundabout").childSelector)[a]).trigger(c)};
jQuery.roundabout_toFloat=function(b){b=Math.round(parseFloat(b)*1E3)/1E3;return parseFloat(b.toFixed(2))};
jQuery.roundabout_updateChildPosition=function(b,a,c,d){b=jQuery(b);for(var e=b.data("roundabout"),h=[],j=jQuery.roundabout_degToRad(360-b.data("roundabout").degrees+c.bearing);j<0;)j+=Math.PI*2;for(;j>Math.PI*2;)j-=Math.PI*2;j=c.shape(j,c.focusBearingRad,c.tilt);j.scale=j.scale>1?1:j.scale;j.adjustedScale=(c.scale.min+c.scale.diff*j.scale).toFixed(4);j.width=(j.adjustedScale*e.startWidth).toFixed(4);j.height=(j.adjustedScale*e.startHeight).toFixed(4);b.css("left",(j.x*c.midStage.width+c.nudge.width-
j.width/2).toFixed(1)+"px").css("top",(j.y*c.midStage.height+c.nudge.height-j.height/2).toFixed(1)+"px").css("width",j.width+"px").css("height",j.height+"px").css("opacity",(c.opacity.min+c.opacity.diff*j.scale).toFixed(2)).css("z-index",Math.round(c.zValues.min+c.zValues.diff*j.z)).css("font-size",(j.adjustedScale*e.startFontSize).toFixed(2)+"px").attr("current-scale",j.adjustedScale);if(a.data("roundabout").debug===true){h.push('<div style="font-weight: normal; font-size: 10px; padding: 2px; width: '+
b.css("width")+'; background-color: #ffc;">');h.push('<strong style="font-size: 12px; white-space: nowrap;">Child '+d+"</strong><br />");h.push("<strong>left:</strong> "+b.css("left")+"<br /><strong>top:</strong> "+b.css("top")+"<br />");h.push("<strong>width:</strong> "+b.css("width")+"<br /><strong>opacity:</strong> "+b.css("opacity")+"<br />");h.push("<strong>z-index:</strong> "+b.css("z-index")+"<br /><strong>font-size:</strong> "+b.css("font-size")+"<br />");h.push("<strong>scale:</strong> "+
b.attr("current-scale"));h.push("</div>");b.html(h.join(""))}return jQuery.roundabout_isInFocus(a,b.data("roundabout").degrees)};
jQuery.extend(jQuery.roundabout_shape,{theJuggler:function(b,a,c){return{x:Math.sin(b+a),y:Math.tan(Math.exp(Math.log(b))+a)/(c-1),z:(Math.cos(b+a)+1)/2,scale:Math.sin(b+Math.PI/2+a)/2+0.5}},figure8:function(b,a,c){return{x:Math.sin(b*2+a),y:Math.sin(b+Math.PI/2+a)/8*c,z:(Math.cos(b+a)+1)/2,scale:Math.sin(b+Math.PI/2+a)/2+0.5}},waterWheel:function(b,a,c){return{x:Math.sin(b+Math.PI/2+a)/8*c,y:Math.sin(b+a)/(Math.PI/2),z:(Math.cos(b+a)+1)/2,scale:Math.sin(b+Math.PI/2+a)/2+0.5}},square:function(b,a,
c){var d;if(b<=Math.PI/2){a=2/Math.PI*b;d=-(2/Math.PI)*b+1;b=-(1/Math.PI)*b+1}else if(b>Math.PI/2&&b<=Math.PI){a=-(2/Math.PI)*b+2;d=-(2/Math.PI)*b+1;b=-(1/Math.PI)*b+1}else{a=b>Math.PI&&b<=3*Math.PI/2?-(2/Math.PI)*b+2:2/Math.PI*b-4;d=2/Math.PI*b-3;b=1/Math.PI*b-1}return{x:a,y:d*c,z:b,scale:b}},conveyorBeltLeft:function(b,a,c){return{x:-Math.cos(b+a),y:Math.cos(b+3*Math.PI/2+a)/8*c,z:(Math.sin(b+a)+1)/2,scale:Math.sin(b+Math.PI/2+a)/2+0.5}},conveyorBeltRight:function(b,a,c){return{x:Math.cos(b+a),
y:Math.cos(b+3*Math.PI/2+a)/8*c,z:(Math.sin(b+a)+1)/2,scale:Math.sin(b+Math.PI/2+a)/2+0.5}},goodbyeCruelWorld:function(b,a,c){return{x:Math.sin(b+a),y:Math.tan(b+3*Math.PI/2+a)/8*(c+0.5),z:(Math.sin(b+a)+1)/2,scale:Math.sin(b+Math.PI/2+a)/2+0.5}},diagonalRingLeft:function(b,a,c){return{x:Math.sin(b+a),y:-Math.cos(b+Math.tan(Math.cos(a)))/(c+1.5),z:(Math.cos(b+a)+1)/2,scale:Math.sin(b+Math.PI/2+a)/2+0.5}},diagonalRingRight:function(b,a,c){return{x:Math.sin(b+a),y:Math.cos(b+Math.tan(Math.cos(a)))/
(c+1.5),z:(Math.cos(b+a)+1)/2,scale:Math.sin(b+Math.PI/2+a)/2+0.5}},rollerCoaster:function(b,a,c){return{x:Math.sin(b+a),y:Math.sin((2+c)*b),z:(Math.cos(b+a)+1)/2,scale:Math.sin(b+Math.PI/2+a)/2+0.5}},tearDrop:function(b,a,c){return{x:Math.sin(b+a),y:-Math.sin(b/2+c)+0.35,z:(Math.cos(b+a)+1)/2,scale:Math.sin(b+Math.PI/2+a)/2+0.5}}});
(function(b){b(function(){b("header nav ul").nmcDropDown();b.browser.msie&&parseFloat(b.browser.version)<7&&b("#primary-navigation li").hover(function(){var d=b(this);d.find("ul:first").show();d.hasClass("blue")===false&&d.addClass("hover")},function(){var d=b(this);d.find("ul:first").hide();d.hasClass("blue")===false&&d.removeClass("hover")});b("header form .query").each(function(){var d=b(this).attr("placeholder");b(this).val()==""&&b(this).val(d);b(this).blur(function(){b(this).val()==""&&b(this).val(d)}).focus(function(){b(this).val()==
d&&b(this).val("")})});b.validator.addMethod("query",function(d){return d!=""&&d!="Search..."},"Please enter a search term");b("#phrase, #username, #password, #email").autoClear();b("#holder").roundabout({childSelector:"div.feature",duration:1200,minScale:0.5,maxScale:1,reflect:true,btnNext:"#btn-next",btnPrev:"#btn-prev",easing:"easeInOutSine",shape:"square",minOpacity:1});b("#content-pane sup").each(function(){/([1-9].*)/.test(b(this).html())&&b(this).wrapInner('<a class="reference"></a>')});b(".click-to-play").colorbox({iframe:true,
width:"560px",height:"420px"}).css("outline","none");b("#colorbox-references, sup a.reference").colorbox({inline:true,height:"300px",href:"#references-frame",initialHeight:"300px",maxHeight:"70%",width:"600px"});b("a[rel=colorbox-iframe]").colorbox({iframe:true,scrolling:false,width:"550px",height:"600px"});b("#app-store-pop-up").colorbox({href:"http://ui.epipen.com/images/Patient-Information.jpg",height:"85%",width:"85%",maxWidth:"1060px",iframe:true,open:true});regexp_external=/^https?:\/\/(?!(www.)?(epipen|epicenter|anaphylaxis|addthis|gethifi|myepipen).com)/;
b('a[href^="http://"]').not("a[rel=colorbox-iframe]").not('a[href^="http://files."]').not('a[href$="#references-frame"]').filter(function(){return this.href.match(regexp_external)}).click(function(){confirm("You are now leaving Dey Pharma, L.P.'s website. The website you are about to access is not owned or controlled by Dey Pharma, L.P.\n\nDEY PHARMA, L.P. ASSUMES NO RESPONSIBILITY FOR, AND MAKES NO REPRESENTATION AS TO THE ACCURACY OF, ANY CONTENT CONTAINED ON THE WEBSITE YOU ARE ABOUT TO ACCESS.")&&
window.open(b(this).attr("href"));return false});var a=b("form#tell-your-friends");if(a.length){var c=0;a.find("a.add-friend").click(function(d){d.preventDefault();c++;if(c<5){d=a.find("fieldset.friend:last").clone();d.find("input.name, input.email").attr("name",function(e,h){return h.replace(/\[\d+\]/g,"["+c+"]")}).attr("value","").removeClass("required");d.find("span.req").remove();a.find("p").before(d)}else alert("You may add up to 5 friends.")});a.validate()}})})(jQuery);
(function(b){b.fn.autoClear=function(){this.each(function(){var a=b(this),c=a.val();a.focus(function(){a.val()===c&&a.val("")}).blur(function(){a.val()===""&&a.val(c)})});return this}})(jQuery);

