function getDateFromJSON(n){var i=new Date(parseInt(n.substr(6)));return new Date(i)}function readableDateDiff(n,t){var u=n,r=new Date,l,a;t&&(r=t),r<u&&(u=r);var h=r.getFullYear()-u.getFullYear(),o=r.getMonth()-u.getMonth(),s=r.getDate()-u.getDate(),f=r.getHours()-u.getHours(),e=r.getMinutes()-u.getMinutes(),c=r.getSeconds()-u.getSeconds(),i="";return c<0&&(e--,c+=60),e<0&&(f--,e+=60),f<0&&(s--,f+=24),s<0&&(o--,l=r.getMonth()==1?12:r.getMonth()-1,a=l==12?r.getFullYear()-1:r.getFullYear(),s+=30),o<0&&(h--,o+=12),h>0?(i=pluralize(h,"year"),o!=0&&(i+=", "+pluralize(o,"month")),i+=" ago"):o>0?(i=pluralize(o,"month"),s!=0&&(i+=", "+pluralize(s,"day")),i+=" ago"):s>0?(i=pluralize(s,"day"),f!=0&&(i+=", "+pluralize(f,"hour")),i+=" ago"):f>0?(i=pluralize(f,"hour"),e!=0&&(i+=", "+pluralize(e,"minute")),i+=" ago"):e>0?(i=pluralize(e,"minute"),i+=" ago"):c<60&&(i="Less than a minute ago"),i}function pluralize(n,t){return n>1?n+(" "+t+"s"):"1 "+t}function DoBlockUI(n){n||(n="Please wait ..."),$.blockUI({css:{border:"none",padding:"15px",backgroundColor:"#000","-webkit-border-radius":"10px","-moz-border-radius":"10px",opacity:.5,color:"#fff"},message:'<div class="message"><img src="/Public/images/loading-horizontal-sm.gif" /> '+n+"</div>"})}function getParameterByName(n){n=n.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");var i="[\\?&]"+n+"=([^&#]*)",r=new RegExp(i),t=r.exec(window.location.href);return t==null?"":decodeURIComponent(t[1].replace(/\+/g," "))}function ReadableFileSize(n){var t=Math.round(n/1024*100)*.01,r="KB",i;return t>1e3&&(t=Math.round(t*.001*100)*.01,r="MB"),i=t.toString().split("."),t=i.length>1?i[0]+"."+i[1].substr(0,2):i[0],t+" "+r}function AddLabelDetails(n,t,i){var r,u;jQuery.ajaxSettings.traditional=!0,r=[],r.push(n),u={submissions:r,labelid:t,labelname:i},$(".LabelsLoading").show(),$.post("/BatchLabel",u,function(n){if(n==!1){OnLoadingComplete();return}UpdateSubmissionDetails()},"json")}function UpdateSubmissionDetails(){var n=$("#SubmissionID").val();n&&($("#pageHistory").load("/SubmissionHistoryFeed/"+n,function(){SetUpToolTips()}),$("#SubmissionGeneralInfo").load("/SubmissionGeneralInfo/"+n,function(){SetUpSubmissionDetails()}),$("#SubmissionEditActionsToolbar").load("/SubmissionEditActionsToolbar/"+n,function(){SetUpSubmissionDetails()}))}function DoDetailsAddLabel(){if($("#NumLabelsAvailable").val()<1){alert("You have reached the maximum number of labels and you cannot create any more.");return}}function DoDetailsAssign(n,t,i){var r,o,u,e,f;$(i).find("input[type=button]").attr("disabled","disabled"),$("object").hide(),DoBlockUI(),r=[],t?r.push(t):(o=$(i).find("li.option input[type=checkbox]:checked"),$.each(o,function(){r.push($(this).val())})),u=[],u.push(n),e=$(i).find("#Note").val(),f={staff:r,submissions:u,note:e},$.post("/AssignSubmission",f,function(){CloseAndResetAssignMenu(),UpdateSubmissionDetails()},"json")}function SetUpToolTips(){$("a.tooltipTitle").click(function(n){n.preventDefault()}),$("a.tooltipTitle").each(function(){var n=$(this).attr("twidth");$(this).unbind("cluetip"),$(this).cluetip({activation:"hover",sticky:!0,clickThrough:!0,mouseOutClose:!0,closePosition:"title",hoverIntent:!0,splitTitle:"|",arrows:!0,width:n,cluetipClass:"default"})}),$(".tooltip").each(function(){var i=$(this).attr("twidth"),r=$(this).attr("theight"),n=$(this).attr("data-cache")==="false",t=$(this).hasClass("sticky")===!0;$(this).unbind("cluetip"),$(this).cluetip({activation:"hover",sticky:!0,mouseOutClose:!t,closePosition:"title",hoverIntent:!0,arrows:!0,width:i,height:r,cluetipClass:"default",ajaxCache:!n})})}function SetUpSubmissionDetails(){SetUpToolTips(),SetUpAssignMenu(),SetUpStatusMenu(),SetUpLabels(),SetUpFullscreenToggle(),$.unblockUI(),$("object").show(),$(".LabelsLoading").hide()}function SetUpCategoryDropdown(){$(".SubmissionCategory").unbind("hover"),$(".SubmissionCategory").hover(function(){$(this).css("cursor","pointer"),$(this).css("text-decoration","underline")},function(){$(this).css("cursor","default"),$(this).css("text-decoration","none")}),$(".SubmissionCategory").click(function(){var i=$(this).parent().find(".SubmissionCategoryList"),n=$(i).find("select"),t=$(n).val();$(this).hide(),$(i).show(),$(n).unbind("change"),$(n).change(function(){if(confirm("Are you sure?")){var r=$(this).find("option:selected").text(),i=$(this).val(),u={ProductID:i,Name:r};$.post("/UpdateSubmissionCategory/"+$("#SubmissionID").val(),u,function(n){n=="True"||n=="true"?($(".SubmissionCategoryList").hide(),$(".SubmissionCategory").text(r),$(".SubmissionCategory").show(),$(".SubmissionCategoryDropdown").val(i)):(alert("There was a problem changing the category."),$(".SubmissionCategoryList").hide(),$(".SubmissionCategory").show(),$(".SubmissionCategoryDropdown").val(t))})}else $(".SubmissionCategoryList").hide(),$(".SubmissionCategory").show(),$(".SubmissionCategoryDropdown").val(t)})}),$(".CancelCategories").unbind("click"),$(".CancelCategories").click(function(){$(".SubmissionCategoryList").hide(),$(".SubmissionCategory").show()})}function SetUpStatusMenu(){jQuery.ajaxSettings.traditional=!0,$(".StatusLink").unbind("hover"),$(".StatusLink").hover(function(){$(this).css("cursor","pointer"),$(this).css("text-decoration","underline")},function(){$(this).css("cursor","default"),$(this).css("text-decoration","none")}),$(".StatusLink").unbind("click"),$(".StatusLink").click(function(n){var t=$(this).parent().find(".status_menu");$(t).css("left",$(this).position().left),$(t).css("top",$(this).position().top+30),$(t).css("display")=="none"?($(document).trigger("hideCluetip"),$(t).show()):$(t).hide(),n.preventDefault(),n.stopPropagation()})}function SetUpTabs(){$("#SubmissionEditTabs li a").click(function(){ShowTab("#"+$(this).closest("li").attr("id"))})}function ShowTab(n){var i=$("#SubmissionEditTabs").find(n),r,t;$("#SubmissionEditTabs li").removeClass("active"),$(i).addClass("active"),r=$(i).attr("id").replace("tab","page"),t=$("#"+r),$(t).attr("data-url")&&($(t).hide(),$(t).load($(t).attr("data-url"),function(){})),$(".page").hide(),$(t).show()}function LoadSubmittableForm(){var n=$("#Submission_SubmittableID").val();n>0?($("#Submittable_Title").val("unused"),$("#Submittable_File").val(""),$("#SubmittableForm").hide(),$(".disableDuringUpload").removeAttr("disabled")):($("#SubmittableForm input").val(""),$("#SubmittableForm").show(),$(".disableDuringUpload").attr("disabled","disabled"))}function RestrictInputToNumbersAndLettersAndSpacesAllowingBackspaceAndTabAndEnter(n,t){var i=t.keyCode?t.keyCode:t.which;((i<48||i>57)&&(i<65||i>90)&&(i<97||i>122)&&(t.keyCode<37||t.keyCode>40)&&i!=8&&i!=9&&i!=13&&i!=23&&i!=32&&i!=33&&i!=35&&i!=38&&i!=45&&i!=46&&i!=47&&i!=39&&i!=64||$(n).val().length==0&&i==32)&&t.preventDefault()}(function(n){n.extend(n.fn,{validate:function(t){if(this.length){var i=n.data(this[0],"validator");return i?i:(this.attr("novalidate","novalidate"),i=new n.validator(t,this[0]),n.data(this[0],"validator",i),i.settings.onsubmit&&(t=this.find("input, button"),t.filter(".cancel").click(function(){i.cancelSubmit=!0}),i.settings.submitHandler&&t.filter(":submit").click(function(){i.submitButton=this}),this.submit(function(t){function r(){if(i.settings.submitHandler){if(i.submitButton)var t=n("<input type='hidden'/>").attr("name",i.submitButton.name).val(i.submitButton.value).appendTo(i.currentForm);return i.settings.submitHandler.call(i,i.currentForm),i.submitButton&&t.remove(),!1}return!0}return i.settings.debug&&t.preventDefault(),i.cancelSubmit?(i.cancelSubmit=!1,r()):i.form()?i.pendingRequest?(i.formSubmitted=!0,!1):r():(i.focusInvalid(),!1)})),i)}t&&t.debug&&window.console&&console.warn("nothing selected, can't validate, returning nothing")},valid:function(){if(n(this[0]).is("form"))return this.validate().form();var t=!0,i=n(this[0].form).validate();return this.each(function(){t&=i.element(this)}),t},removeAttrs:function(t){var r={},i=this;return n.each(t.split(/\s/),function(n,t){r[t]=i.attr(t),i.removeAttr(t)}),r},rules:function(t,i){var r=this[0],e;if(t){var f=n.data(r.form,"validator").settings,o=f.rules,u=n.validator.staticRules(r);switch(t){case"add":n.extend(u,n.validator.normalizeRule(i)),o[r.name]=u,i.messages&&(f.messages[r.name]=n.extend(f.messages[r.name],i.messages));break;case"remove":return i?(e={},n.each(i.split(/\s/),function(n,t){e[t]=u[t],delete u[t]}),e):(delete o[r.name],u)}}return r=n.validator.normalizeRules(n.extend({},n.validator.metadataRules(r),n.validator.classRules(r),n.validator.attributeRules(r),n.validator.staticRules(r)),r),r.required&&(f=r.required,delete r.required,r=n.extend({required:f},r)),r}}),n.extend(n.expr[":"],{blank:function(t){return!n.trim(""+t.value)},filled:function(t){return!!n.trim(""+t.value)},unchecked:function(n){return!n.checked}}),n.validator=function(t,i){this.settings=n.extend(!0,{},n.validator.defaults,t),this.currentForm=i,this.init()},n.validator.format=function(t,i){return arguments.length==1?function(){var i=n.makeArray(arguments);return i.unshift(t),n.validator.format.apply(this,i)}:(arguments.length>2&&i.constructor!=Array&&(i=n.makeArray(arguments).slice(1)),i.constructor!=Array&&(i=[i]),n.each(i,function(n,i){t=t.replace(RegExp("\\{"+n+"\\}","g"),i)}),t)},n.extend(n.validator,{defaults:{messages:{},groups:{},rules:{},errorClass:"error",validClass:"valid",errorElement:"label",focusInvalid:!0,errorContainer:n([]),errorLabelContainer:n([]),onsubmit:!0,ignore:":hidden",ignoreTitle:!1,onfocusin:function(n){this.lastActive=n,this.settings.focusCleanup&&!this.blockFocusCleanup&&(this.settings.unhighlight&&this.settings.unhighlight.call(this,n,this.settings.errorClass,this.settings.validClass),this.addWrapper(this.errorsFor(n)).hide())},onfocusout:function(n){!this.checkable(n)&&(n.name in this.submitted||!this.optional(n))&&this.element(n)},onkeyup:function(n){(n.name in this.submitted||n==this.lastElement)&&this.element(n)},onclick:function(n){n.name in this.submitted?this.element(n):n.parentNode.name in this.submitted&&this.element(n.parentNode)},highlight:function(t,i,r){t.type==="radio"?this.findByName(t.name).addClass(i).removeClass(r):n(t).addClass(i).removeClass(r)},unhighlight:function(t,i,r){t.type==="radio"?this.findByName(t.name).removeClass(i).addClass(r):n(t).removeClass(i).addClass(r)}},setDefaults:function(t){n.extend(n.validator.defaults,t)},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:n.validator.format("Please enter no more than {0} characters."),minlength:n.validator.format("Please enter at least {0} characters."),rangelength:n.validator.format("Please enter a value between {0} and {1} characters long."),range:n.validator.format("Please enter a value between {0} and {1}."),max:n.validator.format("Please enter a value less than or equal to {0}."),min:n.validator.format("Please enter a value greater than or equal to {0}.")},autoCreateRanges:!1,prototype:{init:function(){function i(t){var i=n.data(this[0].form,"validator"),r="on"+t.type.replace(/^validate/,"");i.settings[r]&&i.settings[r].call(i,this[0],t)}var r,t;this.labelContainer=n(this.settings.errorLabelContainer),this.errorContext=this.labelContainer.length&&this.labelContainer||n(this.currentForm),this.containers=n(this.settings.errorContainer).add(this.settings.errorLabelContainer),this.submitted={},this.valueCache={},this.pendingRequest=0,this.pending={},this.invalid={},this.reset(),r=this.groups={},n.each(this.settings.groups,function(t,i){n.each(i.split(/\s/),function(n,i){r[i]=t})}),t=this.settings.rules,n.each(t,function(i,r){t[i]=n.validator.normalizeRule(r)}),n(this.currentForm).validateDelegate("[type='text'], [type='password'], [type='file'], select, textarea, [type='number'], [type='search'] ,[type='tel'], [type='url'], [type='email'], [type='datetime'], [type='date'], [type='month'], [type='week'], [type='time'], [type='datetime-local'], [type='range'], [type='color'] ","focusin focusout keyup",i).validateDelegate("[type='radio'], [type='checkbox'], select, option","click",i),this.settings.invalidHandler&&n(this.currentForm).bind("invalid-form.validate",this.settings.invalidHandler)},form:function(){return this.checkForm(),n.extend(this.submitted,this.errorMap),this.invalid=n.extend({},this.errorMap),this.valid()||n(this.currentForm).triggerHandler("invalid-form",[this]),this.showErrors(),this.valid()},checkForm:function(){this.prepareForm();for(var n=0,t=this.currentElements=this.elements();t[n];n++)this.check(t[n]);return this.valid()},element:function(t){this.lastElement=t=this.validationTargetFor(this.clean(t)),this.prepareElement(t),this.currentElements=n(t);var i=this.check(t);return i?delete this.invalid[t.name]:this.invalid[t.name]=!0,this.numberOfInvalids()||(this.toHide=this.toHide.add(this.containers)),this.showErrors(),i},showErrors:function(t){if(t){n.extend(this.errorMap,t),this.errorList=[];for(var i in t)this.errorList.push({message:t[i],element:this.findByName(i)[0]});this.successList=n.grep(this.successList,function(n){return!(n.name in t)})}this.settings.showErrors?this.settings.showErrors.call(this,this.errorMap,this.errorList):this.defaultShowErrors()},resetForm:function(){n.fn.resetForm&&n(this.currentForm).resetForm(),this.submitted={},this.lastElement=null,this.prepareForm(),this.hideErrors(),this.elements().removeClass(this.settings.errorClass)},numberOfInvalids:function(){return this.objectLength(this.invalid)},objectLength:function(n){var t=0,i;for(i in n)t++;return t},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{n(this.findLastActive()||this.errorList.length&&this.errorList[0].element||[]).filter(":visible").focus().trigger("focusin")}catch(t){}},findLastActive:function(){var t=this.lastActive;return t&&n.grep(this.errorList,function(n){return n.element.name==t.name}).length==1&&t},elements:function(){var i=this,t={};return n(this.currentForm).find("input, select, textarea").not(":submit, :reset, :image, [disabled]").not(this.settings.ignore).filter(function(){return!this.name&&i.settings.debug&&window.console&&console.error("%o has no name assigned",this),this.name in t||!i.objectLength(n(this).rules())?!1:t[this.name]=!0})},clean:function(t){return n(t)[0]},errors:function(){return n(this.settings.errorElement+"."+this.settings.errorClass,this.errorContext)},reset:function(){this.successList=[],this.errorList=[],this.errorMap={},this.toShow=n([]),this.toHide=n([]),this.currentElements=n([])},prepareForm:function(){this.reset(),this.toHide=this.errors().add(this.containers)},prepareElement:function(n){this.reset(),this.toHide=this.errorsFor(n)},check:function(t){var f,e,u,i,r;t=this.validationTargetFor(this.clean(t)),f=n(t).rules(),e=!1;for(u in f){i={method:u,parameters:f[u]};try{r=n.validator.methods[u].call(this,t.value.replace(/\r/g,""),t,i.parameters);if(r=="dependency-mismatch")e=!0;else{e=!1;if(r=="pending"){this.toHide=this.toHide.not(this.errorsFor(t));return}if(!r)return this.formatAndAdd(t,i),!1}}catch(o){this.settings.debug&&window.console&&console.log("exception occured when checking element "+t.id+", check the '"+i.method+"' method",o);throw o;}}if(!e)return this.objectLength(f)&&this.successList.push(t),!0},customMetaMessage:function(t,i){if(n.metadata){var r=this.settings.meta?n(t).metadata()[this.settings.meta]:n(t).metadata();return r&&r.messages&&r.messages[i]}},customMessage:function(n,t){var i=this.settings.messages[n];return i&&(i.constructor==String?i:i[t])},findDefined:function(){for(var n=0;n<arguments.length;n++)if(arguments[n]!==undefined)return arguments[n]},defaultMessage:function(t,i){return this.findDefined(this.customMessage(t.name,i),this.customMetaMessage(t,i),!this.settings.ignoreTitle&&t.title||undefined,n.validator.messages[i],"<strong>Warning: No message defined for "+t.name+"</strong>")},formatAndAdd:function(n,t){var i=this.defaultMessage(n,t.method),r=/\$?\{(\d+)\}/g;typeof i=="function"?i=i.call(this,t.parameters,n):r.test(i)&&(i=jQuery.format(i.replace(r,"{$1}"),t.parameters)),this.errorList.push({message:i,element:n}),this.errorMap[n.name]=i,this.submitted[n.name]=i},addWrapper:function(n){return this.settings.wrapper&&(n=n.add(n.parent(this.settings.wrapper))),n},defaultShowErrors:function(){for(var t,n=0;this.errorList[n];n++)t=this.errorList[n],this.settings.highlight&&this.settings.highlight.call(this,t.element,this.settings.errorClass,this.settings.validClass),this.showLabel(t.element,t.message);this.errorList.length&&(this.toShow=this.toShow.add(this.containers));if(this.settings.success)for(n=0;this.successList[n];n++)this.showLabel(this.successList[n]);if(this.settings.unhighlight)for(n=0,t=this.validElements();t[n];n++)this.settings.unhighlight.call(this,t[n],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 n(this.errorList).map(function(){return this.element})},showLabel:function(t,i){var r=this.errorsFor(t);r.length?(r.removeClass(this.settings.validClass).addClass(this.settings.errorClass),r.attr("generated")&&r.html(i)):(r=n("<"+this.settings.errorElement+"/>").attr({"for":this.idOrName(t),generated:!0}).addClass(this.settings.errorClass).html(i||""),this.settings.wrapper&&(r=r.hide().show().wrap("<"+this.settings.wrapper+"/>").parent()),this.labelContainer.append(r).length||(this.settings.errorPlacement?this.settings.errorPlacement(r,n(t)):r.insertAfter(t))),!i&&this.settings.success&&(r.text(""),typeof this.settings.success=="string"?r.addClass(this.settings.success):this.settings.success(r)),this.toShow=this.toShow.add(r)},errorsFor:function(t){var i=this.idOrName(t);return this.errors().filter(function(){return n(this).attr("for")==i})},idOrName:function(n){return this.groups[n.name]||(this.checkable(n)?n.name:n.id||n.name)},validationTargetFor:function(n){return this.checkable(n)&&(n=this.findByName(n.name).not(this.settings.ignore)[0]),n},checkable:function(n){return/radio|checkbox/i.test(n.type)},findByName:function(t){var i=this.currentForm;return n(document.getElementsByName(t)).map(function(n,r){return r.form==i&&r.name==t&&r||null})},getLength:function(t,i){switch(i.nodeName.toLowerCase()){case"select":return n("option:selected",i).length;case"input":if(this.checkable(i))return this.findByName(i.name).filter(":checked").length}return t.length},depend:function(n,t){return this.dependTypes[typeof n]?this.dependTypes[typeof n](n,t):!0},dependTypes:{boolean:function(n){return n},string:function(t,i){return!!n(t,i.form).length},"function":function(n,t){return n(t)}},optional:function(t){return!n.validator.methods.required.call(this,n.trim(t.value),t)&&"dependency-mismatch"},startRequest:function(n){this.pending[n.name]||(this.pendingRequest++,this.pending[n.name]=!0)},stopRequest:function(t,i){this.pendingRequest--,this.pendingRequest<0&&(this.pendingRequest=0),delete this.pending[t.name],i&&this.pendingRequest==0&&this.formSubmitted&&this.form()?(n(this.currentForm).submit(),this.formSubmitted=!1):!i&&this.pendingRequest==0&&this.formSubmitted&&(n(this.currentForm).triggerHandler("invalid-form",[this]),this.formSubmitted=!1)},previousValue:function(t){return n.data(t,"previousValue")||n.data(t,"previousValue",{old:null,valid:!0,message:this.defaultMessage(t,"remote")})}},classRuleSettings:{required:{required:!0},email:{email:!0},url:{url:!0},date:{date:!0},dateISO:{dateISO:!0},dateDE:{dateDE:!0},number:{number:!0},numberDE:{numberDE:!0},digits:{digits:!0},creditcard:{creditcard:!0}},addClassRules:function(t,i){t.constructor==String?this.classRuleSettings[t]=i:n.extend(this.classRuleSettings,t)},classRules:function(t){var i={};return(t=n(t).attr("class"))&&n.each(t.split(" "),function(){this in n.validator.classRuleSettings&&n.extend(i,n.validator.classRuleSettings[this])}),i},attributeRules:function(t){var r={},i,u;t=n(t);for(i in n.validator.methods)(u=i==="required"&&typeof n.fn.prop=="function"?t.prop(i):t.attr(i))?r[i]=u:t[0].getAttribute("type")===i&&(r[i]=!0);return r.maxlength&&/-1|2147483647|524288/.test(r.maxlength)&&delete r.maxlength,r},metadataRules:function(t){if(!n.metadata)return{};var i=n.data(t.form,"validator").settings.meta;return i?n(t).metadata()[i]:n(t).metadata()},staticRules:function(t){var r={},i=n.data(t.form,"validator");return i.settings.rules&&(r=n.validator.normalizeRule(i.settings.rules[t.name])||{}),r},normalizeRules:function(t,i){return n.each(t,function(r,u){if(u===!1)delete t[r];else if(u.param||u.depends){var f=!0;switch(typeof u.depends){case"string":f=!!n(u.depends,i.form).length;break;case"function":f=u.depends.call(i,i)}f?t[r]=u.param!==undefined?u.param:!0:delete t[r]}}),n.each(t,function(r,u){t[r]=n.isFunction(u)?u(i):u}),n.each(["minlength","maxlength","min","max"],function(){t[this]&&(t[this]=Number(t[this]))}),n.each(["rangelength","range"],function(){t[this]&&(t[this]=[Number(t[this][0]),Number(t[this][1])])}),n.validator.autoCreateRanges&&(t.min&&t.max&&(t.range=[t.min,t.max],delete t.min,delete t.max),t.minlength&&t.maxlength&&(t.rangelength=[t.minlength,t.maxlength],delete t.minlength,delete t.maxlength)),t.messages&&delete t.messages,t},normalizeRule:function(t){if(typeof t=="string"){var i={};n.each(t.split(/\s/),function(){i[this]=!0}),t=i}return t},addMethod:function(t,i,r){n.validator.methods[t]=i,n.validator.messages[t]=r!=undefined?r:n.validator.messages[t],i.length<3&&n.validator.addClassRules(t,n.validator.normalizeRule(t))},methods:{required:function(t,i,r){if(!this.depend(r,i))return"dependency-mismatch";switch(i.nodeName.toLowerCase()){case"select":return(t=n(i).val())&&t.length>0;case"input":if(this.checkable(i))return this.getLength(t,i)>0;default:return n.trim(t).length>0}},remote:function(t,i,r){var f,u,e;if(this.optional(i))return"dependency-mismatch";return f=this.previousValue(i),this.settings.messages[i.name]||(this.settings.messages[i.name]={}),f.originalMessage=this.settings.messages[i.name].remote,this.settings.messages[i.name].remote=f.message,r=typeof r=="string"&&{url:r}||r,this.pending[i.name]?"pending":f.old===t?f.valid:(f.old=t,u=this,this.startRequest(i),e={},e[i.name]=t,n.ajax(n.extend(!0,{url:r,mode:"abort",port:"validate"+i.name,dataType:"json",data:e,success:function(r){var o,e;u.settings.messages[i.name].remote=f.originalMessage,o=r===!0,o?(e=u.formSubmitted,u.prepareElement(i),u.formSubmitted=e,u.successList.push(i),u.showErrors()):(e={},r=r||u.defaultMessage(i,"remote"),e[i.name]=f.message=n.isFunction(r)?r(t):r,u.showErrors(e)),f.valid=o,u.stopRequest(i,o)}},r)),"pending")},minlength:function(t,i,r){return this.optional(i)||this.getLength(n.trim(t),i)>=r},maxlength:function(t,i,r){return this.optional(i)||this.getLength(n.trim(t),i)<=r},rangelength:function(t,i,r){return t=this.getLength(n.trim(t),i),this.optional(i)||t>=r[0]&&t<=r[1]},min:function(n,t,i){return this.optional(t)||n>=i},max:function(n,t,i){return this.optional(t)||n<=i},range:function(n,t,i){return this.optional(t)||n>=i[0]&&n<=i[1]},email:function(n,t){return this.optional(t)||/^((([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(n)},url:function(n,t){return this.optional(t)||/^(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(n)},date:function(n,t){return this.optional(t)||!/Invalid|NaN/.test(new Date(n))},dateISO:function(n,t){return this.optional(t)||/^\d{4}[\/-]\d{1,2}[\/-]\d{1,2}$/.test(n)},number:function(n,t){return this.optional(t)||/^-?(?:\d+|\d{1,3}(?:,\d{3})+)(?:\.\d+)?$/.test(n)},digits:function(n,t){return this.optional(t)||/^\d+$/.test(n)},creditcard:function(n,t){var r;if(this.optional(t))return"dependency-mismatch";if(/[^0-9 -]+/.test(n))return!1;var f=0,i=0,u=!1;for(n=n.replace(/\D/g,""),r=n.length-1;r>=0;r--)i=n.charAt(r),i=parseInt(i,10),u&&(i*=2)>9&&(i-=9),f+=i,u=!u;return f%10==0},accept:function(n,t,i){return i=typeof i=="string"?i.replace(/,/g,"|"):"png|jpe?g|gif",this.optional(t)||n.match(RegExp(".("+i+")$","i"))},equalTo:function(t,i,r){return r=n(r).unbind(".validate-equalTo").bind("blur.validate-equalTo",function(){n(i).valid()}),t==r.val()}}}),n.format=n.validator.format})(jQuery),function(n){var t={},i;n.ajaxPrefilter?n.ajaxPrefilter(function(n,i,r){i=n.port,n.mode=="abort"&&(t[i]&&t[i].abort(),t[i]=r)}):(i=n.ajax,n.ajax=function(r){var u=("port"in r?r:n.ajaxSettings).port;return("mode"in r?r:n.ajaxSettings).mode=="abort"?(t[u]&&t[u].abort(),t[u]=i.apply(this,arguments)):i.apply(this,arguments)})}(jQuery),function(n){!jQuery.event.special.focusin&&!jQuery.event.special.focusout&&document.addEventListener&&n.each({focus:"focusin",blur:"focusout"},function(t,i){function r(t){return t=n.event.fix(t),t.type=i,n.event.handle.call(this,t)}n.event.special[i]={setup:function(){this.addEventListener(t,r,!0)},teardown:function(){this.removeEventListener(t,r,!0)},handler:function(t){return arguments[0]=n.event.fix(t),arguments[0].type=i,n.event.handle.apply(this,arguments)}}}),n.extend(n.fn,{validateDelegate:function(t,i,r){return this.bind(i,function(i){var u=n(i.target);if(u.is(t))return r.apply(u,arguments)})}})}(jQuery);
/*!
** Unobtrusive Ajax support library for jQuery
** Copyright (C) Microsoft Corporation. All rights reserved.
*/
(function(n){function i(n,t){var i=window,r=(n||"").split(".");while(i&&r.length)i=i[r.shift()];return typeof i=="function"?i:(t.push(n),Function.constructor.apply(null,t))}function u(n){return n==="GET"||n==="POST"}function o(n,t){u(t)||n.setRequestHeader("X-HTTP-Method-Override",t)}function s(t,i,r){var u;if(r.indexOf("application/x-javascript")!==-1)return;u=(t.getAttribute("data-ajax-mode")||"").toUpperCase(),n(t.getAttribute("data-ajax-update")).each(function(t,r){var f;switch(u){case"BEFORE":f=r.firstChild,n("<div />").html(i).contents().each(function(){r.insertBefore(this,f)});break;case"AFTER":n("<div />").html(i).contents().each(function(){r.appendChild(this)});break;default:n(r).html(i)}})}function r(t,r){var h,c,f,e;h=t.getAttribute("data-ajax-confirm");if(h&&!window.confirm(h))return;c=n(t.getAttribute("data-ajax-loading")),e=t.getAttribute("data-ajax-loading-duration")||0,n.extend(r,{type:t.getAttribute("data-ajax-method")||undefined,url:t.getAttribute("data-ajax-url")||undefined,beforeSend:function(n){var r;return o(n,f),r=i(t.getAttribute("data-ajax-begin"),["xhr"]).apply(this,arguments),r!==!1&&c.show(e),r},complete:function(){c.hide(e),i(t.getAttribute("data-ajax-complete"),["xhr","status"]).apply(this,arguments)},success:function(n,r,u){s(t,n,u.getResponseHeader("Content-Type")||"text/html"),i(t.getAttribute("data-ajax-success"),["data","status","xhr"]).apply(this,arguments)},error:i(t.getAttribute("data-ajax-failure"),["xhr","status","error"])}),r.data.push({name:"X-Requested-With",value:"XMLHttpRequest"}),f=r.type.toUpperCase(),u(f)||(r.type="POST",r.data.push({name:"X-HTTP-Method-Override",value:f})),r.context=t,n.ajax(r)}function e(t){var i=n(t).data(f);return!i||!i.validate||i.validate()}var t="unobtrusiveAjaxClick",f="unobtrusiveValidation";n("a[data-ajax=true]").live("click",function(n){n.preventDefault(),r(this,{url:this.href,type:"GET",data:[]})}),n("form[data-ajax=true] input[type=image]").live("click",function(i){var f=i.target.name,e=n(i.target),r=e.parents("form")[0],u=e.offset();n(r).data(t,[{name:f+".x",value:Math.round(i.pageX-u.left)},{name:f+".y",value:Math.round(i.pageY-u.top)}]),setTimeout(function(){n(r).removeData(t)},0)}),n("form[data-ajax=true] :submit").live("click",function(i){var u=i.target.name,r=n(i.target).parents("form")[0];n(r).data(t,u?[{name:u,value:i.target.value}]:[]),setTimeout(function(){n(r).removeData(t)},0)}),n("form[data-ajax=true]").live("submit",function(i){var u=n(this).data(t)||[];i.preventDefault();if(!e(this))return;r(this,{url:this.action,type:this.method||"GET",data:u.concat(n(this).serializeArray())})})})(jQuery),function(n){function i(n,t,i){n.rules[t]=i,n.message&&(n.messages[t]=n.message)}function h(n){return n.replace(/^\s+|\s+$/g,"").split(/\s*,\s*/g)}function u(n){return n.substr(0,n.lastIndexOf(".")+1)}function f(n,t){return n.indexOf("*.")===0&&(n=n.replace("*.",t)),n}function c(t,i){var r=n(this).find("[data-valmsg-for='"+i[0].name+"']"),u=n.parseJSON(r.attr("data-valmsg-replace"))!==!1;r.removeClass("field-validation-valid").addClass("field-validation-error"),t.data("unobtrusiveContainer",r),u?(r.empty(),t.removeClass("input-validation-error").appendTo(r)):t.hide()}function l(t,i){var u=n(this).find("[data-valmsg-summary=true]"),r=u.find("ul");r&&r.length&&i.errorList.length&&(r.empty(),u.addClass("validation-summary-errors").removeClass("validation-summary-valid"),n.each(i.errorList,function(){n("<li />").html(this.message).appendTo(r)}))}function s(t){var i=t.data("unobtrusiveContainer"),r=n.parseJSON(i.attr("data-valmsg-replace"));i&&(i.addClass("field-validation-valid").removeClass("field-validation-error"),t.removeData("unobtrusiveContainer"),r&&i.empty())}function o(t){var i=n(t),r=i.data(e);return r||(r={options:{errorClass:"input-validation-error",errorElement:"span",errorPlacement:n.proxy(c,t),invalidHandler:n.proxy(l,t),messages:{},rules:{},success:n.proxy(s,t)},attachValidation:function(){i.validate(this.options)},validate:function(){return i.validate(),i.valid()}},i.data(e,r)),r}var r=n.validator,t,e="unobtrusiveValidation";r.unobtrusive={adapters:[],parseElement:function(t,i){var f=n(t),e=f.parents("form")[0],r,u,s;if(!e)return;r=o(e),r.options.rules[t.name]=u={},r.options.messages[t.name]=s={},n.each(this.adapters,function(){var i="data-val-"+this.name,o=f.attr(i),r={};o!==undefined&&(i+="-",n.each(this.params,function(){r[this]=f.attr(i+this)}),this.adapt({element:t,form:e,message:o,params:r,rules:u,messages:s}))}),jQuery.extend(u,{__dummy__:!0}),!i&&r.attachValidation()},parse:function(t){n(t).find(":input[data-val=true]").each(function(){r.unobtrusive.parseElement(this,!0)}),n("form").each(function(){var n=o(this);n&&n.attachValidation()})}},t=r.unobtrusive.adapters,t.add=function(n,t,i){return i||(i=t,t=[]),this.push({name:n,params:t,adapt:i}),this},t.addBool=function(n,t){return this.add(n,function(r){i(r,t||n,!0)})},t.addMinMax=function(n,t,r,u,f,e){return this.add(n,[f||"min",e||"max"],function(n){var e=n.params.min,f=n.params.max;e&&f?i(n,u,[e,f]):e?i(n,t,e):f&&i(n,r,f)})},t.addSingleVal=function(n,t,r){return this.add(n,[t||"val"],function(u){i(u,r||n,u.params[t])})},r.addMethod("__dummy__",function(){return!0}),r.addMethod("regex",function(n,t,i){var r;return this.optional(t)?!0:(r=new RegExp(i).exec(n),r&&r.index===0&&r[0].length===n.length)}),t.addSingleVal("accept","exts").addSingleVal("regex","pattern"),t.addBool("creditcard").addBool("date").addBool("digits").addBool("email").addBool("number").addBool("url"),t.addMinMax("length","minlength","maxlength","rangelength").addMinMax("range","min","max","range"),t.add("equalto",["other"],function(t){var o=u(t.element.name),s=t.params.other,r=f(s,o),e=n(t.form).find(":input[name="+r+"]")[0];i(t,"equalTo",e)}),t.add("required",function(n){(n.element.tagName.toUpperCase()!=="INPUT"||n.element.type.toUpperCase()!=="CHECKBOX")&&i(n,"required",!0)}),t.add("remote",["url","type","additionalfields"],function(t){var r={url:t.params.url,type:t.params.type||"GET",data:{}},e=u(t.element.name);n.each(h(t.params.additionalfields||t.element.name),function(i,u){var o=f(u,e);r.data[o]=function(){return n(t.form).find(":input[name='"+o+"']").val()}}),i(t,"remote",r)}),n(function(){r.unobtrusive.parse(document)})}(jQuery),function(n){var s,w,b,r,it,e,tt,h,g,nt,a=0,i={},c=[],l=0,t={},o=[],ft=null,p=new Image,lt=/\.(jpg|gif|png|bmp|jpeg)(.*)?$/i,dt=/[^\.]\.(swf)\s*$/i,at,vt=1,k=0,y="",v,f,u=!1,d=n.extend(n("<div/>")[0],{prop:0}),pt=n.browser.msie&&n.browser.version<7&&!window.XMLHttpRequest,yt=function(){w.hide(),p.onerror=p.onload=null,ft&&ft.abort(),s.empty()},ct=function(){!1===i.onError(c,a,i)?(w.hide(),u=!1):(i.titleShow=!1,i.width="auto",i.height="auto",s.html('<p id="fancybox-error">The requested content cannot be loaded.<br />Please try again later.</p>'),rt())},ut=function(){var r=c[a],t,o,h,l,v,f;yt(),i=n.extend({},n.fn.fancybox.defaults,typeof n(r).data("fancybox")=="undefined"?i:n(r).data("fancybox")),f=i.onStart(c,a,i);if(f===!1)u=!1;else{typeof f=="object"&&(i=n.extend(i,f)),h=i.title||(r.nodeName?n(r).attr("title"):r.title)||"",r.nodeName&&!i.orig&&(i.orig=n(r).children("img:first").length?n(r).children("img:first"):n(r)),h===""&&i.orig&&i.titleFromAlt&&(h=i.orig.attr("alt")),t=i.href||(r.nodeName?n(r).attr("href"):r.href)||null,(/^(?:javascript)/i.test(t)||t=="#")&&(t=null),i.type?(o=i.type,t||(t=i.content)):i.content?o="html":t&&(o=t.match(lt)?"image":t.match(dt)?"swf":n(r).hasClass("iframe")?"iframe":t.indexOf("#")===0?"inline":"ajax");if(o){o=="inline"&&(r=t.substr(t.indexOf("#")),o=n(r).length>0?"inline":"ajax"),i.type=o,i.href=t,i.title=h,i.autoDimensions&&(i.type=="html"||i.type=="inline"||i.type=="ajax"?(i.width="auto",i.height="auto"):i.autoDimensions=!1),i.modal&&(i.overlayShow=!0,i.hideOnOverlayClick=!1,i.hideOnContentClick=!1,i.enableEscapeButton=!1,i.showCloseButton=!1),i.padding=parseInt(i.padding,10),i.margin=parseInt(i.margin,10),s.css("padding",i.padding+i.margin),n(".fancybox-inline-tmp").unbind("fancybox-cancel").bind("fancybox-change",function(){n(this).replaceWith(e.children())});switch(o){case"html":s.html(i.content),rt();break;case"inline":if(n(r).parent().is("#fancybox-content")===!0){u=!1;break}n('<div class="fancybox-inline-tmp" />').hide().insertBefore(n(r)).bind("fancybox-cleanup",function(){n(this).replaceWith(e.children())}).bind("fancybox-cancel",function(){n(this).replaceWith(s.children())}),n(r).appendTo(s),rt();break;case"image":u=!1,n.fancybox.showActivity(),p=new Image,p.onerror=function(){ct()},p.onload=function(){u=!0,p.onerror=p.onload=null,i.width=p.width,i.height=p.height,n("<img />").attr({id:"fancybox-img",src:p.src,alt:i.title}).appendTo(s),st()},p.src=t;break;case"swf":i.scrolling="no",l='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="'+i.width+'" height="'+i.height+'"><param name="movie" value="'+t+'"></param>',v="",n.each(i.swf,function(n,t){l+='<param name="'+n+'" value="'+t+'"></param>',v+=" "+n+'="'+t+'"'}),l+='<embed src="'+t+'" type="application/x-shockwave-flash" width="'+i.width+'" height="'+i.height+'"'+v+"></embed></object>",s.html(l),rt();break;case"ajax":u=!1,n.fancybox.showActivity(),i.ajax.win=i.ajax.success,ft=n.ajax(n.extend({},i.ajax,{url:t,data:i.ajax.data||{},error:function(n){n.status>0&&ct()},success:function(n,r,u){if((typeof u=="object"?u:ft).status==200){if(typeof i.ajax.win=="function"){f=i.ajax.win(t,n,r,u);if(f===!1){w.hide();return}(typeof f=="string"||typeof f=="object")&&(n=f)}s.html(n),rt()}}}));break;case"iframe":st()}}else ct()}},rt=function(){var r=i.width,t=i.height;r=r.toString().indexOf("%")>-1?parseInt((n(window).width()-i.margin*2)*parseFloat(r)/100,10)+"px":r=="auto"?"auto":r+"px",t=t.toString().indexOf("%")>-1?parseInt((n(window).height()-i.margin*2)*parseFloat(t)/100,10)+"px":t=="auto"?"auto":t+"px",s.wrapInner('<div style="width:'+r+";height:"+t+";overflow: "+(i.scrolling=="auto"?"auto":i.scrolling=="yes"?"scroll":"hidden")+';position:relative;"></div>'),i.width=s.width(),i.height=s.height(),st()},st=function(){var p,rt;w.hide();if(r.is(":visible")&&!1===t.onCleanup(o,l,t))n.event.trigger("fancybox-cancel"),u=!1;else{u=!0,n(e.add(b)).unbind(),n(window).unbind("resize.fb scroll.fb"),n(document).unbind("keydown.fb"),r.is(":visible")&&t.titlePosition!=="outside"&&r.css("height",r.height()),o=c,l=a,t=i,t.overlayShow?(b.css({"background-color":t.overlayColor,opacity:t.overlayOpacity,cursor:t.hideOnOverlayClick?"pointer":"auto",height:n(document).height()}),b.is(":visible")||(pt&&n("select:not(#fancybox-tmp select)").filter(function(){return this.style.visibility!=="hidden"}).css({visibility:"hidden"}).one("fancybox-cleanup",function(){this.style.visibility="inherit"}),b.show())):b.hide(),f=kt(),y=t.title||"",k=0,h.empty().removeAttr("style").removeClass();if(t.titleShow!==!1){p=n.isFunction(t.titleFormat)?t.titleFormat(y,o,l,t):y&&y.length?t.titlePosition=="float"?'<table id="fancybox-title-float-wrap" cellpadding="0" cellspacing="0"><tr><td id="fancybox-title-float-left"></td><td id="fancybox-title-float-main">'+y+'</td><td id="fancybox-title-float-right"></td></tr></table>':'<div id="fancybox-title-'+t.titlePosition+'">'+y+"</div>":!1,y=p;if(!(!y||y==="")){h.addClass("fancybox-title-"+t.titlePosition).html(y).appendTo("body").show();switch(t.titlePosition){case"inside":h.css({width:f.width-t.padding*2,marginLeft:t.padding,marginRight:t.padding}),k=h.outerHeight(!0),h.appendTo(it),f.height+=k;break;case"over":h.css({marginLeft:t.padding,width:f.width-t.padding*2,bottom:t.padding}).appendTo(it);break;case"float":h.css("left",parseInt((h.width()-f.width-40)/2,10)*-1).appendTo(r);break;default:h.css({width:f.width-t.padding*2,paddingLeft:t.padding,paddingRight:t.padding}).appendTo(r)}}}h.hide(),r.is(":visible")?(n(tt.add(g).add(nt)).hide(),p=r.position(),v={top:p.top,left:p.left,width:r.width(),height:r.height()},rt=v.width==f.width&&v.height==f.height,e.fadeTo(t.changeFade,.3,function(){var r=function(){e.html(s.contents()).fadeTo(t.changeFade,1,ht)};n.event.trigger("fancybox-change"),e.empty().removeAttr("filter").css({"border-width":t.padding,width:f.width-t.padding*2,height:i.autoDimensions?"auto":f.height-k-t.padding*2}),rt?r():(d.prop=0,n(d).animate({prop:1},{duration:t.changeSpeed,easing:t.easingChange,step:et,complete:r}))})):(r.removeAttr("style"),e.css("border-width",t.padding),t.transitionIn=="elastic"?(v=wt(),e.html(s.contents()),r.show(),t.opacity&&(f.opacity=0),d.prop=0,n(d).animate({prop:1},{duration:t.speedIn,easing:t.easingIn,step:et,complete:ht})):(t.titlePosition=="inside"&&k>0&&h.show(),e.css({width:f.width-t.padding*2,height:i.autoDimensions?"auto":f.height-k-t.padding*2}).html(s.contents()),r.css(f).fadeIn(t.transitionIn=="none"?0:t.speedIn,ht)))}},gt=function(){(t.enableEscapeButton||t.enableKeyboardNav)&&n(document).bind("keydown.fb",function(i){i.keyCode==27&&t.enableEscapeButton?(i.preventDefault(),n.fancybox.close()):(i.keyCode==37||i.keyCode==39)&&t.enableKeyboardNav&&i.target.tagName!=="INPUT"&&i.target.tagName!=="TEXTAREA"&&i.target.tagName!=="SELECT"&&(i.preventDefault(),n.fancybox[i.keyCode==37?"prev":"next"]())}),t.showNavArrows?((t.cyclic&&o.length>1||l!==0)&&g.show(),(t.cyclic&&o.length>1||l!=o.length-1)&&nt.show()):(g.hide(),nt.hide())},ht=function(){n.support.opacity||(e.get(0).style.removeAttribute("filter"),r.get(0).style.removeAttribute("filter")),i.autoDimensions&&e.css("height","auto"),r.css("height","auto"),y&&y.length&&h.show(),t.showCloseButton&&tt.show(),gt(),t.hideOnContentClick&&e.bind("click",n.fancybox.close),t.hideOnOverlayClick&&b.bind("click",n.fancybox.close),n(window).bind("resize.fb",n.fancybox.resize),t.centerOnScroll&&n(window).bind("scroll.fb",n.fancybox.center),t.type=="iframe"&&n('<iframe id="fancybox-frame" name="fancybox-frame'+ +new Date+'" frameborder="0" hspace="0" '+(n.browser.msie?'allowtransparency="true""':"")+' scrolling="'+i.scrolling+'" src="'+t.href+'"></iframe>').appendTo(e),r.show(),u=!1,n.fancybox.center();t.onComplete(o,l,t);var f,s;o.length-1>l&&(f=o[l+1].href,typeof f!="undefined"&&f.match(lt)&&(s=new Image,s.src=f)),l>0&&(f=o[l-1].href,typeof f!="undefined"&&f.match(lt)&&(s=new Image,s.src=f))},et=function(n){var i={width:parseInt(v.width+(f.width-v.width)*n,10),height:parseInt(v.height+(f.height-v.height)*n,10),top:parseInt(v.top+(f.top-v.top)*n,10),left:parseInt(v.left+(f.left-v.left)*n,10)};typeof f.opacity!="undefined"&&(i.opacity=n<.5?.5:n),r.css(i),e.css({width:i.width-t.padding*2,height:i.height-k*n-t.padding*2})},ot=function(){return[n(window).width()-t.margin*2,n(window).height()-t.margin*2,n(document).scrollLeft()+t.margin,n(document).scrollTop()+t.margin]},kt=function(){var r=ot(),n={},f=t.autoScale,u=t.padding*2;return n.width=t.width.toString().indexOf("%")>-1?parseInt(r[0]*parseFloat(t.width)/100,10):t.width+u,n.height=t.height.toString().indexOf("%")>-1?parseInt(r[1]*parseFloat(t.height)/100,10):t.height+u,f&&(n.width>r[0]||n.height>r[1])&&(i.type=="image"||i.type=="swf"?(f=t.width/t.height,n.width>r[0]&&(n.width=r[0],n.height=parseInt((n.width-u)/f+u,10)),n.height>r[1]&&(n.height=r[1],n.width=parseInt((n.height-u)*f+u,10))):(n.width=Math.min(n.width,r[0]),n.height=Math.min(n.height,r[1]))),n.top=parseInt(Math.max(r[3]-20,r[3]+(r[1]-n.height-40)*.5),10),n.left=parseInt(Math.max(r[2]-20,r[2]+(r[0]-n.width-40)*.5),10),n},wt=function(){var u=i.orig?n(i.orig):!1,r={};return u&&u.length?(r=u.offset(),r.top+=parseInt(u.css("paddingTop"),10)||0,r.left+=parseInt(u.css("paddingLeft"),10)||0,r.top+=parseInt(u.css("border-top-width"),10)||0,r.left+=parseInt(u.css("border-left-width"),10)||0,r.width=u.width(),r.height=u.height(),r={width:r.width+t.padding*2,height:r.height+t.padding*2,top:r.top-t.padding-20,left:r.left-t.padding-20}):(u=ot(),r={width:t.padding*2,height:t.padding*2,top:parseInt(u[3]+u[1]*.5,10),left:parseInt(u[2]+u[0]*.5,10)}),r},bt=function(){w.is(":visible")?(n("div",w).css("top",vt*-40+"px"),vt=(vt+1)%12):clearInterval(at)};n.fn.fancybox=function(t){return n(this).length?(n(this).data("fancybox",n.extend({},t,n.metadata?n(this).metadata():{})).unbind("click.fb").bind("click.fb",function(t){t.preventDefault(),u||(u=!0,n(this).blur(),c=[],a=0,t=n(this).attr("rel")||"",t&&t!=""&&t!=="nofollow"?(c=n("a[rel="+t+"], area[rel="+t+"]"),a=c.index(this)):c.push(this),ut())}),this):this},n.fancybox=function(t,i){var f,r,e;if(!u){u=!0,f=typeof i!="undefined"?i:{},c=[],a=parseInt(f.index,10)||0;if(n.isArray(t)){for(r=0,e=t.length;r<e;r++)typeof t[r]=="object"?n(t[r]).data("fancybox",n.extend({},f,t[r])):t[r]=n({}).data("fancybox",n.extend({content:t[r]},f));c=jQuery.merge(c,t)}else typeof t=="object"?n(t).data("fancybox",n.extend({},f,t)):t=n({}).data("fancybox",n.extend({content:t},f)),c.push(t);(a>c.length||a<0)&&(a=0),ut()}},n.fancybox.showActivity=function(){clearInterval(at),w.show(),at=setInterval(bt,66)},n.fancybox.hideActivity=function(){w.hide()},n.fancybox.next=function(){return n.fancybox.pos(l+1)},n.fancybox.prev=function(){return n.fancybox.pos(l-1)},n.fancybox.pos=function(n){u||(n=parseInt(n),c=o,n>-1&&n<o.length?(a=n,ut()):t.cyclic&&o.length>1&&(a=n>=o.length?0:o.length-1,ut()))},n.fancybox.cancel=function(){if(!u){u=!0,n.event.trigger("fancybox-cancel"),yt();i.onCancel(c,a,i);u=!1}},n.fancybox.close=function(){function c(){b.fadeOut("fast"),h.empty().hide(),r.hide(),n.event.trigger("fancybox-cleanup"),e.empty();t.onClosed(o,l,t);o=i=[],l=a=0,t=i={},u=!1}if(!(u||r.is(":hidden"))){u=!0;if(t&&!1===t.onCleanup(o,l,t))u=!1;else{yt(),n(tt.add(g).add(nt)).hide(),n(e.add(b)).unbind(),n(window).unbind("resize.fb scroll.fb"),n(document).unbind("keydown.fb"),e.find("iframe").attr("src",pt&&/^https/i.test(window.location.href||"")?"javascript:void(false)":"about:blank"),t.titlePosition!=="inside"&&h.empty(),r.stop();if(t.transitionOut=="elastic"){v=wt();var s=r.position();f={top:s.top,left:s.left,width:r.width(),height:r.height()},t.opacity&&(f.opacity=1),h.empty().hide(),d.prop=1,n(d).animate({prop:0},{duration:t.speedOut,easing:t.easingOut,step:et,complete:c})}else r.fadeOut(t.transitionOut=="none"?0:t.speedOut,c)}}},n.fancybox.resize=function(){b.is(":visible")&&b.css("height",n(document).height()),n.fancybox.center(!0)},n.fancybox.center=function(n){var i,f;u||(f=n===!0?1:0,i=ot(),!f&&(r.width()>i[0]||r.height()>i[1])||r.stop().animate({top:parseInt(Math.max(i[3]-20,i[3]+(i[1]-e.height()-40)*.5-t.padding)),left:parseInt(Math.max(i[2]-20,i[2]+(i[0]-e.width()-40)*.5-t.padding))},typeof n=="number"?n:200))},n.fancybox.init=function(){n("#fancybox-wrap").length||(n("body").append(s=n('<div id="fancybox-tmp"></div>'),w=n('<div id="fancybox-loading"><div></div></div>'),b=n('<div id="fancybox-overlay"></div>'),r=n('<div id="fancybox-wrap"></div>')),it=n('<div id="fancybox-outer"></div>').append('<div class="fancybox-bg" id="fancybox-bg-n"></div><div class="fancybox-bg" id="fancybox-bg-ne"></div><div class="fancybox-bg" id="fancybox-bg-e"></div><div class="fancybox-bg" id="fancybox-bg-se"></div><div class="fancybox-bg" id="fancybox-bg-s"></div><div class="fancybox-bg" id="fancybox-bg-sw"></div><div class="fancybox-bg" id="fancybox-bg-w"></div><div class="fancybox-bg" id="fancybox-bg-nw"></div>').appendTo(r),it.append(e=n('<div id="fancybox-content"></div>'),tt=n('<a id="fancybox-close"></a>'),h=n('<div id="fancybox-title"></div>'),g=n('<a href="javascript:;" id="fancybox-left"><span class="fancy-ico" id="fancybox-left-ico"></span></a>'),nt=n('<a href="javascript:;" id="fancybox-right"><span class="fancy-ico" id="fancybox-right-ico"></span></a>')),tt.click(n.fancybox.close),w.click(n.fancybox.cancel),g.click(function(t){t.preventDefault(),n.fancybox.prev()}),nt.click(function(t){t.preventDefault(),n.fancybox.next()}),n.fn.mousewheel&&r.bind("mousewheel.fb",function(t,i){u?t.preventDefault():(n(t.target).get(0).clientHeight==0||n(t.target).get(0).scrollHeight===n(t.target).get(0).clientHeight)&&(t.preventDefault(),n.fancybox[i>0?"prev":"next"]())}),n.support.opacity||r.addClass("fancybox-ie"),pt&&(w.addClass("fancybox-ie6"),r.addClass("fancybox-ie6"),n('<iframe id="fancybox-hide-sel-frame" src="'+(/^https/i.test(window.location.href||"")?"javascript:void(false)":"about:blank")+'" scrolling="no" border="0" frameborder="0" tabindex="-1"></iframe>').prependTo(it)))},n.fn.fancybox.defaults={padding:10,margin:40,opacity:!1,modal:!1,cyclic:!1,scrolling:"auto",width:560,height:340,autoScale:!0,autoDimensions:!0,centerOnScroll:!1,ajax:{},swf:{wmode:"transparent"},hideOnOverlayClick:!0,hideOnContentClick:!1,overlayShow:!0,overlayOpacity:.7,overlayColor:"#777",titleShow:!0,titlePosition:"float",titleFormat:null,titleFromAlt:!1,transitionIn:"fade",transitionOut:"fade",speedIn:300,speedOut:300,changeSpeed:300,changeFade:"fast",easingIn:"swing",easingOut:"swing",showCloseButton:!0,showNavArrows:!0,enableEscapeButton:!0,enableKeyboardNav:!0,onStart:function(){},onCancel:function(){},onComplete:function(){},onCleanup:function(){},onClosed:function(){},onError:function(){}},n(document).ready(function(){n.fancybox.init()})}(jQuery),function(n){n.fn.hoverIntent=function(t,i){var r={sensitivity:7,interval:100,timeout:0};r=n.extend(r,i?{over:t,out:i}:t);var o,s,e,u,f=function(n){o=n.pageX,s=n.pageY},c=function(t,i){i.hoverIntent_t=clearTimeout(i.hoverIntent_t);if(Math.abs(e-o)+Math.abs(u-s)<r.sensitivity)return n(i).unbind("mousemove",f),i.hoverIntent_s=1,r.over.apply(i,[t]);e=o,u=s,i.hoverIntent_t=setTimeout(function(){c(t,i)},r.interval)},l=function(n,t){return t.hoverIntent_t=clearTimeout(t.hoverIntent_t),t.hoverIntent_s=0,r.out.apply(t,[n])},h=function(t){var o=(t.type=="mouseover"?t.fromElement:t.toElement)||t.relatedTarget,s,i;while(o&&o!=this)try{o=o.parentNode}catch(t){o=this}if(o==this)return!1;s=jQuery.extend({},t),i=this,i.hoverIntent_t&&(i.hoverIntent_t=clearTimeout(i.hoverIntent_t)),t.type=="mouseover"?(e=s.pageX,u=s.pageY,n(i).bind("mousemove.cluetip",f),i.hoverIntent_s!=1&&(i.hoverIntent_t=setTimeout(function(){c(s,i)},r.interval))):(n(i).unbind("mousemove.cluetip",f),i.hoverIntent_s==1&&(i.hoverIntent_t=setTimeout(function(){l(s,i)},r.timeout)))};return this.bind("mouseover.cluetip",h).bind("mouseout.cluetip",h)}}(jQuery),function(n){var t,i,s,e,f,u,r,o,c,h;n.cluetip={version:"1.0.6"},n.fn.cluetip=function(l,a){return typeof l=="object"&&(a=l,l=null),l=="destroy"?this.removeData("thisInfo").unbind(".cluetip"):this.each(function(v){function si(){return!1}var b=this,p=n(this),y=n.extend(!0,{},n.fn.cluetip.defaults,a||{},n.metadata?p.metadata():n.meta?p.data():{}),kt=!1,ei=+y.cluezIndex,et,ri,ii,pt,k,yt,ci,ti;p.data("thisInfo",{title:b.title,zIndex:ei}),et=!1,ri=0,n("#cluetip").length||(n(['<div id="cluetip">','<div id="cluetip-outer">','<h3 id="cluetip-title"></h3>','<div id="cluetip-inner"></div>',"</div>",'<div id="cluetip-extra"></div>','<div id="cluetip-arrows" class="cluetip-arrows"></div>',"</div>"].join(""))[c](h).hide(),t=n("#cluetip").css({position:"absolute"}),s=n("#cluetip-outer").css({position:"relative",zIndex:ei}),i=n("#cluetip-inner"),e=n("#cluetip-title"),f=n("#cluetip-arrows"),u=n('<div id="cluetip-waitimage"></div>').css({position:"absolute"}).insertBefore(t).hide()),ii=y.dropShadow?+y.dropShadowSteps:0;if(!r){for(r=n([]),pt=0;pt<ii;pt++)r=r.add(n("<div></div>").css({zIndex:ei-1,opacity:.1,top:1+pt,left:1+pt}));r.css({position:"absolute",backgroundColor:"#000"}).prependTo(t)}k=p.attr(y.attribute),yt=y.cluetipClass;if(!k&&!y.splitTitle&&!l)return!0;y.local&&y.localPrefix&&(k=y.localPrefix+k),y.local&&y.hideLocal&&n(k+":first").hide();var it=parseInt(y.topOffset,10),st=parseInt(y.leftOffset,10),rt,ui,wt=isNaN(parseInt(y.height,10))?"auto":/\D/g.test(y.height)?y.height:y.height+"px",gt,oi,ft,g,vt,bt,fi=parseInt(y.width,10)||275,d=fi+(parseInt(t.css("paddingLeft"),10)||0)+(parseInt(t.css("paddingRight"),10)||0)+ii,at=this.offsetWidth,ut,w,hi,tt,ht,ct,nt=y.attribute!="title"?p.attr(y.titleAttribute):"";y.splitTitle&&(nt==undefined&&(nt=""),ct=nt.split(y.splitTitle),nt=ct.shift()),y.escapeTitle&&(nt=nt.replace(/&/g,"&amp;").replace(/>/g,"&gt;").replace(/</g,"&lt;"));var ni=function(r){var e,c,h,g;if(!y.onActivate(p))return!1;et=!0,t.removeClass().css({width:fi}),k==p.attr("href")&&p.css("cursor",y.cursor),y.hoverClass&&p.addClass(y.hoverClass),oi=ft=p.offset().top,ut=p.offset().left,tt=r.pageX,vt=r.pageY,b.tagName.toLowerCase()!="area"&&(gt=n(document).scrollTop(),ht=n(window).width()),y.positionBy=="fixed"?(w=at+ut+st,t.css({left:w})):(w=at>ut&&ut>d||ut+at+d+st>ht?ut-d-st:at+ut+st,(b.tagName.toLowerCase()=="area"||y.positionBy=="mouse"||at+d>ht)&&(tt+20+d>ht?(t.addClass(" cluetip-"+yt),w=tt-d-st>=0?tt-d-st-parseInt(t.css("marginLeft"),10)+parseInt(i.css("marginRight"),10):tt-d/2):w=tt+st),e=w<0?r.pageY+it:r.pageY,t.css({left:w>0&&y.positionBy!="bottomTop"?w:tt+d/2>ht?ht/2-d/2:Math.max(tt-d/2,0),zIndex:p.data("thisInfo").zIndex}),f.css({zIndex:p.data("thisInfo").zIndex+1})),ui=n(window).height();if(l)typeof l=="function"&&(l=l.call(b)),i.html(l),ot(e);else if(ct){c=ct.length,i.html(c?ct[0]:"");if(c>1)for(h=1;h<c;h++)i.append('<div class="split-body">'+ct[h]+"</div>");ot(e)}else if(y.local||k.indexOf("#")===0)y.local&&(g=n(k+(/#\S+$/.test(k)?"":":eq("+v+")")).clone(!0).show(),i.html(g),ot(e));else if(/\.(jpe?g|tiff?|gif|png)$/i.test(k))i.html('<img src="'+k+'" alt="'+nt+'" />'),ot(e);else if(kt&&y.ajaxCache)i.html(kt),ot(e);else{var lt=y.ajaxSettings.beforeSend,pt=y.ajaxSettings.error,rt=y.ajaxSettings.success,a=y.ajaxSettings.complete,wt={cache:!1,url:k,beforeSend:function(n){lt&&lt.call(b,n,t,i),s.children().empty(),y.waitImage&&u.css({top:vt+20,left:tt+20,zIndex:p.data("thisInfo").zIndex-1}).show()},error:function(n,r){et&&(pt?pt.call(b,n,r,t,i):i.html("<i>sorry, the contents could not be loaded</i>"))},success:function(n,r){kt=y.ajaxProcess.call(b,n),et&&(rt&&rt.call(b,n,r,t,i),i.html(kt))},complete:function(r,f){a&&a.call(b,r,f,t,i),o=n("#cluetip-inner img").length,o&&!n.browser.opera?n("#cluetip-inner img").bind("load error",function(){o--,o<1&&(u.hide(),et&&ot(e))}):(u.hide(),et&&ot(e))}},bt=n.extend(!0,{},y.ajaxSettings,wt);n.ajax(bt)}},ot=function(u){var l,h,o,c;t.addClass("cluetip-"+yt),y.truncate&&(l=i.text().slice(0,y.truncate)+"...",i.html(l)),nt?e.show().html(nt):y.showTitle?e.show().html("&nbsp;"):e.hide(),y.sticky&&(h=n('<div id="cluetip-close"><a href="#">'+y.closeText+"</a></div>"),y.closePosition=="bottom"?h.appendTo(i):y.closePosition=="title"?h.prependTo(e):h.prependTo(i),h.bind("click.cluetip",function(){return lt(),!1}),y.mouseOutClose?t.bind("mouseleave.cluetip",function(){lt()}):t.unbind("mouseleave.cluetip")),o="",s.css({zIndex:p.data("thisInfo").zIndex,overflow:wt=="auto"?"visible":"auto",height:wt}),rt=wt=="auto"?Math.max(t.outerHeight(),t.height()):parseInt(wt,10),g=ft,bt=gt+ui,y.positionBy=="fixed"?g=ft-y.dropShadowSteps+it:w<tt&&Math.max(w,0)+d>tt||y.positionBy=="bottomTop"?ft+rt+it>bt&&vt-gt>rt+it?(g=vt-rt-it,o="top"):(g=vt+it,o="bottom"):g=ft+rt+it>bt?rt>=ui?gt:bt-rt-it:p.css("display")=="block"||b.tagName.toLowerCase()=="area"||y.positionBy=="mouse"?u-it:ft-y.dropShadowSteps,o==""&&(o=w<ut?"left":"right"),t.css({top:g+"px"}).removeClass().addClass("clue-"+o+"-"+yt).addClass(" cluetip-"+yt),y.arrows?(c=ft-g-y.dropShadowSteps,f.css({top:/(left|right)/.test(o)&&w>=0&&c>0?c+"px":/(left|right)/.test(o)?0:""}).show()):f.hide(),r.hide(),t.hide()[y.fx.open](y.fx.openSpeed||0),y.dropShadow&&r.css({height:rt,width:fi,zIndex:p.data("thisInfo").zIndex-1}).show(),n.fn.bgiframe&&t.bgiframe(),y.delayedClose>0&&(ri=setTimeout(lt,y.delayedClose)),y.onShow.call(b,t,i)},dt=function(){et=!1,u.hide(),(!y.sticky||/click|toggle/.test(y.activation))&&(lt(),clearTimeout(ri)),y.hoverClass&&p.removeClass(y.hoverClass)},lt=function(){s.parent().hide().removeClass(),y.onHide.call(b,t,i),p.removeClass("cluetip-clicked"),nt&&p.attr(y.titleAttribute,nt),p.css("cursor",""),y.arrows&&f.css({top:""})};n(document).bind("hideCluetip",function(){lt()}),/click|toggle/.test(y.activation)?p.bind("click.cluetip",function(i){return t.is(":hidden")||!p.is(".cluetip-clicked")?(ni(i),n(".cluetip-clicked").removeClass("cluetip-clicked"),p.addClass("cluetip-clicked")):dt(i),this.blur(),!1}):y.activation=="focus"?(p.bind("focus.cluetip",function(n){ni(n)}),p.bind("blur.cluetip",function(n){dt(n)})):(p[y.clickThrough?"unbind":"bind"]("click",si),ti=function(n){if(y.tracking==!0){var r=w-n.pageX,i=g?g-n.pageY:ft-n.pageY;p.bind("mousemove.cluetip",function(n){t.css({left:n.pageX+r,top:n.pageY+i})})}},n.fn.hoverIntent&&y.hoverIntent?p.hoverIntent({sensitivity:y.hoverIntent.sensitivity,interval:y.hoverIntent.interval,over:function(n){ni(n),ti(n)},timeout:y.hoverIntent.timeout,out:function(n){dt(n),p.unbind("mousemove.cluetip")}}):p.bind("mouseenter.cluetip",function(n){ni(n),ti(n)}).bind("mouseleave.cluetip",function(n){dt(n),p.unbind("mousemove.cluetip")}),p.bind("mouseover.cluetip",function(){p.attr("title","")}).bind("mouseleave.cluetip",function(){p.attr("title",p.data("thisInfo").title)}))})},n.fn.cluetip.defaults={width:275,height:"auto",cluezIndex:97,positionBy:"auto",topOffset:15,leftOffset:15,local:!1,localPrefix:null,hideLocal:!0,attribute:"rel",titleAttribute:"title",splitTitle:"",escapeTitle:!1,showTitle:!0,cluetipClass:"default",hoverClass:"",waitImage:!0,cursor:"help",arrows:!1,dropShadow:!0,dropShadowSteps:6,sticky:!1,mouseOutClose:!1,activation:"hover",clickThrough:!1,tracking:!1,delayedClose:0,closePosition:"top",closeText:"Close",truncate:0,fx:{open:"show",openSpeed:""},hoverIntent:{sensitivity:3,interval:50,timeout:0},onActivate:function(){return!0},onShow:function(){},onHide:function(){},ajaxCache:!0,ajaxProcess:function(n){return n=n.replace(/<(script|style|title)[^<]+<\/(script|style|title)>/gm,"").replace(/<(link|meta)[^>]+>/g,"")},ajaxSettings:{dataType:"html"},debug:!1},c="appendTo",h="body",n.cluetip.setup=function(n){n&&n.insertionType&&n.insertionType.match(/appendTo|prependTo|insertBefore|insertAfter/)&&(c=n.insertionType),n&&n.insertionElement&&(h=n.insertionElement)}}(jQuery),jQuery.fn.uniform=function(n){return n=jQuery.extend({valid_class:"valid",invalid_class:"invalid",error_class:"error",focused_class:"focused",holder_class:"ctrlHolder",field_selector:"input, textarea, select",default_value_color:"#AFAFAF"},n),this.each(function(){var t=jQuery(this),i=function(t,i,r){var u=t.closest("div."+n.holder_class).andSelf().toggleClass(n.invalid_class,!i).toggleClass(n.error_class,!i).toggleClass(n.valid_class,i).find("p.formHint");i||u.data("info-text")?i&&(r=u.data("info-text")):u.data("info-text",u.html()),r&&u.html(r)};t.submit(function(){t.find(n.field_selector).each(function(){$(this).val()==$(this).data("default-value")&&$(this).val("")})}),t.find(n.field_selector).each(function(){var t=$(this),i=t.val();t.data("default-color",t.css("color")),i!=t.data("default-value")&&i||(t.not("select").css("color",n.default_value_color),t.val(t.data("default-value")))}),t.delegate(n.field_selector,"focus",function(){t.find("."+n.focused_class).removeClass(n.focused_class);var i=$(this);i.parents().filter("."+n.holder_class+":first").addClass(n.focused_class),i.val()==i.data("default-value")&&i.val(""),i.not("select").css("color",i.data("default-color"))}),t.delegate(n.field_selector,"blur",function(){var i=$(this);t.find("."+n.focused_class).removeClass(n.focused_class),i.val()==""||i.val()==i.data("default-value")?(i.not("select").css("color",n.default_value_color),i.val(i.data("default-value"))):i.css("color",i.data("default-color"))}),t.delegate(n.field_selector,"error",function(n,t){i($(this),!1,t)}),t.delegate(n.field_selector,"success",function(){i($(this),!0)})})};
/*!
* jQuery blockUI plugin
* Version 2.35 (23-SEP-2010)
* @requires jQuery v1.2.3 or later
*
* Examples at: http://malsup.com/jquery/block/
* Copyright (c) 2007-2008 M. Alsup
* Dual licensed under the MIT and GPL licenses:
* http://www.opensource.org/licenses/mit-license.php
* http://www.gnu.org/licenses/gpl.html
*
* Thanks to Amir-Hossein Sobhi for some excellent contributions!
*/
(function(n){function h(e,o){var a=e==window,h=o&&o.message!==undefined?o.message:undefined,ot,st,d,w,ht,lt,ct,ut;o=n.extend({},n.blockUI.defaults,o||{}),o.overlayCSS=n.extend({},n.blockUI.defaults.overlayCSS,o.overlayCSS||{}),ot=n.extend({},n.blockUI.defaults.css,o.css||{}),st=n.extend({},n.blockUI.defaults.themedCSS,o.themedCSS||{}),h=h===undefined?o.message:h,a&&i&&u(window,{fadeOut:0}),h&&typeof h!="string"&&(h.parentNode||h.jquery)&&(d=h.jquery?h[0]:h,w={},n(e).data("blockUI.history",w),w.el=d,w.parent=d.parentNode,w.display=d.style.display,w.position=d.style.position,w.parent&&w.parent.removeChild(d));var b=o.baseZ,nt=n.browser.msie||o.forceIframe?n('<iframe class="blockUI" style="z-index:'+b+++';display:none;border:none;margin:0;padding:0;position:absolute;width:100%;height:100%;top:0;left:0" src="'+o.iframeSrc+'"></iframe>'):n('<div class="blockUI" style="display:none"></div>'),k=n('<div class="blockUI blockOverlay" style="z-index:'+b+++';display:none;border:none;margin:0;padding:0;width:100%;height:100%;top:0;left:0"></div>'),p,g;g=o.theme&&a?'<div class="blockUI '+o.blockMsgClass+' blockPage ui-dialog ui-widget ui-corner-all" style="z-index:'+b+';display:none;position:fixed"><div class="ui-widget-header ui-dialog-titlebar blockTitle">'+(o.title||"&nbsp;")+'</div><div class="ui-widget-content ui-dialog-content"></div></div>':o.theme?'<div class="blockUI '+o.blockMsgClass+' blockElement ui-dialog ui-widget ui-corner-all" style="z-index:'+b+';display:none;position:absolute"><div class="ui-widget-header ui-dialog-titlebar blockTitle">'+(o.title||"&nbsp;")+'</div><div class="ui-widget-content ui-dialog-content"></div></div>':a?'<div class="blockUI '+o.blockMsgClass+' blockPage" style="z-index:'+b+';display:none;position:fixed"></div>':'<div class="blockUI '+o.blockMsgClass+' blockElement" style="z-index:'+b+';display:none;position:absolute"></div>',p=n(g),h&&(o.theme?(p.css(st),p.addClass("ui-widget-content")):p.css(ot)),o.applyPlatformOpacityRules&&n.browser.mozilla&&/Linux/.test(navigator.platform)||k.css(o.overlayCSS),k.css("position",a?"fixed":"absolute"),(n.browser.msie||o.forceIframe)&&nt.css("opacity",0),ht=[nt,k,p],lt=a?n("body"):n(e),n.each(ht,function(){this.appendTo(lt)}),o.theme&&o.draggable&&n.fn.draggable&&p.draggable({handle:".ui-dialog-titlebar",cancel:"li"}),ct=v&&(!n.boxModel||n("object,embed",a?null:e).length>0);if(l||ct){a&&o.allowBodyStretch&&n.boxModel&&n("html,body").css("height","100%");if((l||!n.boxModel)&&!a)var et=r(e,"borderTopWidth"),tt=r(e,"borderLeftWidth"),it=et?"(0 - "+et+")":0,rt=tt?"(0 - "+tt+")":0;n.each([nt,k,p],function(n,t){var i=t[0].style,u,r;i.position="absolute",n<2?(a?i.setExpression("height","Math.max(document.body.scrollHeight, document.body.offsetHeight) - (jQuery.boxModel?0:"+o.quirksmodeOffsetHack+') + "px"'):i.setExpression("height",'this.parentNode.offsetHeight + "px"'),a?i.setExpression("width",'jQuery.boxModel && document.documentElement.clientWidth || document.body.clientWidth + "px"'):i.setExpression("width",'this.parentNode.offsetWidth + "px"'),rt&&i.setExpression("left",rt),it&&i.setExpression("top",it)):o.centerY?(a&&i.setExpression("top",'(document.documentElement.clientHeight || document.body.clientHeight) / 2 - (this.offsetHeight / 2) + (blah = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + "px"'),i.marginTop=0):!o.centerY&&a&&(u=o.css&&o.css.top?parseInt(o.css.top):0,r="((document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + "+u+') + "px"',i.setExpression("top",r))})}h&&(o.theme?p.find(".ui-widget-content").append(h):p.append(h),(h.jquery||h.nodeType)&&n(h).show()),(n.browser.msie||o.forceIframe)&&o.showOverlay&&nt.show();if(o.fadeIn){var ft=o.onBlock?o.onBlock:f,at=o.showOverlay&&!h?ft:f,vt=h?ft:f;o.showOverlay&&k._fadeIn(o.fadeIn,at),h&&p._fadeIn(o.fadeIn,vt)}else o.showOverlay&&k.show(),h&&p.show(),o.onBlock&&o.onBlock();c(1,e,o),a?(i=p[0],t=n(":input:enabled:visible",i),o.focusInput&&setTimeout(s,20)):y(p[0],o.centerX,o.centerY),o.timeout&&(ut=setTimeout(function(){a?n.unblockUI(o):n(e).unblock(o)},o.timeout),n(e).data("blockUI.timeout",ut))}function u(r,u){var o=r==window,e=n(r),h=e.data("blockUI.history"),s=e.data("blockUI.timeout"),f;s&&(clearTimeout(s),e.removeData("blockUI.timeout")),u=n.extend({},n.blockUI.defaults,u||{}),c(0,r,u),f=o?n("body").children().filter(".blockUI").add("body > .blockUI"):n(".blockUI",r),o&&(i=t=null),u.fadeOut?(f.fadeOut(u.fadeOut),setTimeout(function(){a(f,h,u,r)},u.fadeOut)):a(f,h,u,r)}function a(t,i,r,u){t.each(function(){this.parentNode&&this.parentNode.removeChild(this)}),i&&i.el&&(i.el.style.display=i.display,i.el.style.position=i.position,i.parent&&i.parent.appendChild(i.el),n(u).removeData("blockUI.history"));if(typeof r.onUnblock=="function")r.onUnblock(u,r)}function c(t,r,u){var e=r==window,s=n(r),f;if(!t&&(e&&!i||!e&&!s.data("blockUI.isBlocked")))return;e||s.data("blockUI.isBlocked",t);if(!u.bindEvents||t&&!u.showOverlay)return;f="mousedown mouseup keydown keypress",t?n(document).bind(f,u,o):n(document).unbind(f,o)}function o(r){var e;if(r.keyCode&&r.keyCode==9)if(i&&r.data.constrainTabKey){var u=t,o=!r.shiftKey&&r.target==u[u.length-1],f=r.shiftKey&&r.target==u[0];if(o||f)return setTimeout(function(){s(f)},10),!1}return e=r.data,n(r.target).parents("div."+e.blockMsgClass).length>0?!0:n(r.target).parents().children().filter("div.blockUI").length==0}function s(n){if(!t)return;var i=t[n===!0?t.length-1:0];i&&i.focus()}function y(n,t,i){var u=n.parentNode,o=n.style,e=(u.offsetWidth-n.offsetWidth)/2-r(u,"borderLeftWidth"),f=(u.offsetHeight-n.offsetHeight)/2-r(u,"borderTopWidth");t&&(o.left=e>0?e+"px":"0"),i&&(o.top=f>0?f+"px":"0")}function r(t,i){return parseInt(n.css(t,i))||0}var i,t;if(/1\.(0|1|2)\.(0|1|2)/.test(n.fn.jquery)||/^1.1/.test(n.fn.jquery)){alert("blockUI requires jQuery v1.2.3 or later!  You are using v"+n.fn.jquery);return}n.fn._fadeIn=n.fn.fadeIn;var f=function(){},e=document.documentMode||0,v=n.browser.msie&&(n.browser.version<8&&!e||e<8),l=n.browser.msie&&/MSIE 6.0/.test(navigator.userAgent)&&!e;n.blockUI=function(n){h(window,n)},n.unblockUI=function(n){u(window,n)},n.growlUI=function(t,i,r,u){var f=n('<div class="growlUI"></div>');t&&f.append("<h1>"+t+"</h1>"),i&&f.append("<h2>"+i+"</h2>"),r==undefined&&(r=3e3),n.blockUI({message:f,fadeIn:700,fadeOut:1e3,centerY:!1,timeout:r,showOverlay:!1,onUnblock:u,css:n.blockUI.defaults.growlCSS})},n.fn.block=function(t){return this.unblock({fadeOut:0}).each(function(){n.css(this,"position")=="static"&&(this.style.position="relative"),n.browser.msie&&(this.style.zoom=1),h(this,t)})},n.fn.unblock=function(n){return this.each(function(){u(this,n)})},n.blockUI.version=2.35,n.blockUI.defaults={message:"<h1>Please wait...</h1>",title:null,draggable:!0,theme:!1,css:{padding:0,margin:0,width:"30%",top:"40%",left:"35%",textAlign:"center",color:"#000",border:"3px solid #aaa",backgroundColor:"#fff",cursor:"wait"},themedCSS:{width:"30%",top:"40%",left:"35%"},overlayCSS:{backgroundColor:"#000",opacity:.6,cursor:"wait"},growlCSS:{width:"350px",top:"10px",left:"",right:"10px",border:"none",padding:"5px",opacity:.6,cursor:"default",color:"#fff",backgroundColor:"#000","-webkit-border-radius":"10px","-moz-border-radius":"10px","border-radius":"10px"},iframeSrc:/^https/i.test(window.location.href||"")?"javascript:false":"about:blank",forceIframe:!1,baseZ:1e3,centerX:!0,centerY:!0,allowBodyStretch:!0,bindEvents:!0,constrainTabKey:!0,fadeIn:200,fadeOut:400,timeout:0,showOverlay:!0,focusInput:!0,applyPlatformOpacityRules:!0,onBlock:null,onUnblock:null,quirksmodeOffsetHack:4,blockMsgClass:"blockMsg"},i=null,t=[]})(jQuery),function(n){n.fn.superfish=function(t){var i=n.fn.superfish,r=i.c,s=n(['<span class="',r.arrowClass,'"> &#187;</span>'].join("")),u=function(){var t=n(this),i=e(t);clearTimeout(i.sfTimer),t.showSuperfishUl().siblings().hideSuperfishUl()},f=function(){var r=n(this),f=e(r),t=i.op;clearTimeout(f.sfTimer),f.sfTimer=setTimeout(function(){t.retainPath=n.inArray(r[0],t.$path)>-1,r.hideSuperfishUl(),t.$path.length&&r.parents(["li.",t.hoverClass].join("")).length<1&&u.call(t.$path)},t.delay)},e=function(n){var t=n.parents(["ul.",r.menuClass,":first"].join(""))[0];return i.op=i.o[t.serial],t},o=function(n){n.addClass(r.anchorClass).append(s.clone())};return this.each(function(){var h=this.serial=i.o.length,e=n.extend({},i.defaults,t),s;e.$path=n("li."+e.pathClass,this).slice(0,e.pathLevels).each(function(){n(this).addClass([e.hoverClass,r.bcClass].join(" ")).filter("li:has(ul)").removeClass(e.pathClass)}),i.o[h]=i.op=e,n("li:has(ul)",this)[n.fn.hoverIntent&&!e.disableHI?"hoverIntent":"hover"](u,f).each(function(){e.autoArrows&&o(n(">a:first-child",this))}).not("."+r.bcClass).hideSuperfishUl(),s=n("a",this),s.each(function(n){var t=s.eq(n).parents("li");s.eq(n).focus(function(){u.call(t)}).blur(function(){f.call(t)})}),e.onInit.call(this)}).each(function(){var t=[r.menuClass];!i.op.dropShadows||n.browser.msie&&n.browser.version<7||t.push(r.shadowClass),n(this).addClass(t.join(" "))})};var t=n.fn.superfish;t.o=[],t.op={},t.IE7fix=function(){var i=t.op;n.browser.msie&&n.browser.version>6&&i.dropShadows&&i.animation.opacity!=undefined&&this.toggleClass(t.c.shadowClass+"-off")},t.c={bcClass:"sf-breadcrumb",menuClass:"sf-js-enabled",anchorClass:"sf-with-ul",arrowClass:"sf-sub-indicator",shadowClass:"sf-shadow"},t.defaults={hoverClass:"sfHover",pathClass:"overideThisToUse",pathLevels:1,delay:800,animation:{opacity:"show"},speed:"normal",autoArrows:!0,dropShadows:!0,disableHI:!1,onInit:function(){},onBeforeShow:function(){},onShow:function(){},onHide:function(){}},n.fn.extend({hideSuperfishUl:function(){var i=t.op,u=i.retainPath===!0?i.$path:"",r;return i.retainPath=!1,r=n(["li.",i.hoverClass].join(""),this).add(this).not(u).removeClass(i.hoverClass).find(">ul").hide().css("visibility","hidden"),i.onHide.call(r),this},showSuperfishUl:function(){var i=t.op,r=t.c.shadowClass+"-off",n=this.addClass(i.hoverClass).find(">ul:hidden").css("visibility","visible");return t.IE7fix.call(n),i.onBeforeShow.call(n),n.animate(i.animation,i.speed,function(){t.IE7fix.call(n),i.onShow.call(n)}),this}})}(jQuery),function(n){n.fn.typeWatch=function(t){function u(t,r){var u=n(t.el).val();(u.length>i.captureLength&&u.toUpperCase()!=t.text||r&&u.length>i.captureLength)&&(t.text=u.toUpperCase(),t.cb(u))}function r(t){var r,f;(t.type.toUpperCase()=="TEXT"||t.nodeName.toUpperCase()=="TEXTAREA")&&(r={timer:null,text:n(t).val().toUpperCase(),cb:i.callback,el:t,wait:i.wait},i.highlight&&n(t).focus(function(){this.select()}),f=function(n){var f=r.wait,i=!1,t;n.keyCode==13&&this.type.toUpperCase()=="TEXT"&&(f=1,i=!0),t=function(){u(r,i)},clearTimeout(r.timer),r.timer=setTimeout(t,f)},n(t).unbind("keydown"),n(t).keydown(f))}var i=n.extend({wait:750,callback:function(){},highlight:!0,captureLength:2},t);return this.each(function(){r(this)})}}(jQuery);var JSON;JSON||(JSON={}),function(){"use strict";function i(n){return n<10?"0"+n:n}function f(n){return o.lastIndex=0,o.test(n)?'"'+n.replace(o,function(n){var t=s[n];return typeof t=="string"?t:"\\u"+("0000"+n.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+n+'"'}function r(i,e){var h,l,c,a,v=n,s,o=e[i];o&&typeof o=="object"&&typeof o.toJSON=="function"&&(o=o.toJSON(i)),typeof t=="function"&&(o=t.call(e,i,o));switch(typeof o){case"string":return f(o);case"number":return isFinite(o)?String(o):"null";case"boolean":case"null":return String(o);case"object":if(!o)return"null";n+=u,s=[];if(Object.prototype.toString.apply(o)==="[object Array]"){for(a=o.length,h=0;h<a;h+=1)s[h]=r(h,o)||"null";return c=s.length===0?"[]":n?"[\n"+n+s.join(",\n"+n)+"\n"+v+"]":"["+s.join(",")+"]",n=v,c}if(t&&typeof t=="object")for(a=t.length,h=0;h<a;h+=1)typeof t[h]=="string"&&(l=t[h],c=r(l,o),c&&s.push(f(l)+(n?": ":":")+c));else for(l in o)Object.prototype.hasOwnProperty.call(o,l)&&(c=r(l,o),c&&s.push(f(l)+(n?": ":":")+c));return c=s.length===0?"{}":n?"{\n"+n+s.join(",\n"+n)+"\n"+v+"}":"{"+s.join(",")+"}",n=v,c}}typeof Date.prototype.toJSON!="function"&&(Date.prototype.toJSON=function(){return isFinite(this.valueOf())?this.getUTCFullYear()+"-"+i(this.getUTCMonth()+1)+"-"+i(this.getUTCDate())+"T"+i(this.getUTCHours())+":"+i(this.getUTCMinutes())+":"+i(this.getUTCSeconds())+"Z":null},String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(){return this.valueOf()});var e=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,o=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,n,u,s={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},t;typeof JSON.stringify!="function"&&(JSON.stringify=function(i,f,e){var o;n="",u="";if(typeof e=="number")for(o=0;o<e;o+=1)u+=" ";else typeof e=="string"&&(u=e);t=f;if(f&&typeof f!="function"&&(typeof f!="object"||typeof f.length!="number"))throw new Error("JSON.stringify");return r("",{"":i})}),typeof JSON.parse!="function"&&(JSON.parse=function(n,t){function r(n,i){var f,e,u=n[i];if(u&&typeof u=="object")for(f in u)Object.prototype.hasOwnProperty.call(u,f)&&(e=r(u,f),e!==undefined?u[f]=e:delete u[f]);return t.call(n,i,u)}var i;n=String(n),e.lastIndex=0,e.test(n)&&(n=n.replace(e,function(n){return"\\u"+("0000"+n.charCodeAt(0).toString(16)).slice(-4)}));if(/^[\],:{}\s]*$/.test(n.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,"")))return i=eval("("+n+")"),typeof t=="function"?r({"":i},""):i;throw new SyntaxError("JSON.parse");})}(),function(n,t){"use strict";var f,e,i,r,u;if(typeof n!="function")throw"SignalR: jQuery not found. Please ensure jQuery is referenced before the SignalR.js file.";if(!t.JSON)throw"SignalR: No JSON parser found. Please ensure json2.js is referenced before the SignalR.js file if you need to support clients without native JSON parsing support, e.g. IE<8.";i={onStart:"onStart",onStarting:"onStarting",onSending:"onSending",onReceived:"onReceived",onError:"onError",onReconnect:"onReconnect",onDisconnect:"onDisconnect"},r=function(n,i){if(i===!1)return;var r;if(typeof t.console=="undefined")return;r="["+(new Date).toTimeString()+"] SignalR: "+n,t.console.debug?t.console.debug(r):t.console.log&&t.console.log(r)},f=function(n,t,i){return new f.fn.init(n,t,i)},f.fn=f.prototype={init:function(n,t,i){this.url=n,this.qs=t,typeof i=="boolean"&&(this.logging=i)},logging:!1,reconnectDelay:2e3,start:function(r,u){var e=this,o={transport:"auto"},h,s=n.Deferred();return e.transport?(s.resolve(e),s):(n.type(r)==="function"?u=r:n.type(r)==="object"&&(n.extend(o,r),n.type(o.callback)==="function"&&(u=o.callback)),n(e).bind(i.onStart,function(){n.type(u)==="function"&&u.call(e),s.resolve(e)}),h=function(t,r){r=r||0;if(r>=t.length){e.transport||s.reject("SignalR: No transport could be initialized successfully. Try specifying a different transport or none at all for auto initialization.");return}var u=t[r],o=n.type(u)==="object"?u:f.transports[u];o.start(e,function(){e.transport=o,n(e).trigger(i.onStart)},function(){h(t,r+1)})},t.setTimeout(function(){n.ajax(e.url+"/negotiate",{global:!1,type:"POST",data:{},error:function(t){n(e).trigger(i.onError,[t]),s.reject("SignalR: Error during negotiation request: "+t)},success:function(t){e.appRelativeUrl=t.Url,e.id=t.ConnectionId,e.webSocketServerUrl=t.WebSocketServerUrl;if(!t.ProtocolVersion||t.ProtocolVersion!=="1.0"){n(e).trigger(i.onError,"SignalR: Incompatible protocol version."),s.reject("SignalR: Incompatible protocol version.");return}n(e).trigger(i.onStarting);var u=[],r=[];n.each(f.transports,function(n){if(n==="webSockets"&&!t.TryWebSockets)return!0;r.push(n)}),n.isArray(o.transport)?n.each(o.transport,function(){var t=this;n.type(t)!=="object"&&(n.type(t)!=="string"||n.inArray(""+t,r)<0)||u.push(n.type(t)==="string"?""+t:t)}):n.type(o.transport)!=="object"&&n.inArray(o.transport,r)<0?u=r:u.push(o.transport),h(u)}})},0),s)},starting:function(t){var r=this,u=n(r);return u.bind(i.onStarting,function(){t.call(r),u.unbind(i.onStarting)}),r},send:function(n){var t=this;if(!t.transport)throw"SignalR: Connection must be started before data can be sent. Call .start() before .send()";return t.transport.send(t,n),t},sending:function(t){var r=this;return n(r).bind(i.onSending,function(){t.call(r)}),r},received:function(t){var r=this;return n(r).bind(i.onReceived,function(n,i){t.call(r,i)}),r},error:function(t){var r=this;return n(r).bind(i.onError,function(n,i){t.call(r,i)}),r},disconnected:function(t){var r=this;return n(r).bind(i.onDisconnect,function(){t.call(r)}),r},reconnected:function(t){var r=this;return n(r).bind(i.onReconnect,function(){t.call(r)}),r},stop:function(){var n=this;return n.transport&&(n.transport.stop(n),n.transport=null),delete n.messageId,delete n.groups,$connection.trigger(i.onDisconnect),n},log:r},f.fn.init.prototype=f.fn,u={addQs:function(t,i){return i.qs?typeof i.qs=="object"?t+"&"+n.param(i.qs):typeof i.qs=="string"?t+"&"+i.qs:t+"&"+escape(i.qs.toString()):t},getUrl:function(n,i,r){var u=n.url,f="transport="+i+"&connectionId="+t.escape(n.id);return n.data&&(f+="&connectionData="+t.escape(n.data)),r?(n.messageId&&(f+="&messageId="+n.messageId),n.groups&&(f+="&groups="+t.escape(JSON.stringify(n.groups)))):u=u+"/connect",u+="?"+f,u=this.addQs(u,n)},ajaxSend:function(r,u){var f=r.url+"/send?transport="+r.transport.name+"&connectionId="+t.escape(r.id);f=this.addQs(f,r),n.ajax(f,{global:!1,type:"POST",dataType:"json",data:{data:u},success:function(t){t&&n(r).trigger(i.onReceived,[t])},error:function(t,u){if(u==="abort")return;n(r).trigger(i.onError,[t])}})},processMessages:function(t,u){var f=n(t);if(u){if(u.Disconnect){r("Disconnect command received from server",t.logging),t.stop(),f.trigger(i.onDisconnect);return}u.Messages&&n.each(u.Messages,function(){try{f.trigger(i.onReceived,[this])}catch(u){r("Error raising received "+u,t.logging),n(t).trigger(i.onError,[u])}}),t.messageId=u.MessageId,t.groups=u.TransportData.Groups}},foreverFrame:{count:0,connections:{}}},f.transports={webSockets:{name:"webSockets",send:function(n,t){n.socket.send(t)},start:function(u,f,e){var o,h=!1,s;t.MozWebSocket&&(t.WebSocket=t.MozWebSocket);if(!t.WebSocket){e();return}u.socket||(u.webSocketServerUrl?o=u.webSocketServerUrl:(s=document.location.protocol==="https:"?"wss://":"ws://",o=s+document.location.host+u.appRelativeUrl),n(u).trigger(i.onSending),o+=u.data?"?connectionData="+u.data+"&transport=webSockets&connectionId="+u.id:"?transport=webSockets&connectionId="+u.id,u.socket=new t.WebSocket(o),u.socket.onopen=function(){h=!0,f&&f()},u.socket.onclose=function(t){h?typeof t.wasClean!="undefined"&&t.wasClean===!1&&n(u).trigger(i.onError):e&&e(),u.socket=null},u.socket.onmessage=function(f){var e=t.JSON.parse(f.data),o;e&&(o=n(u),e.Messages?n.each(e.Messages,function(){try{o.trigger(i.onReceived,[this])}catch(n){r("Error raising received "+n,u.logging)}}):o.trigger(i.onReceived,[e]))})},stop:function(n){n.socket!==null&&(n.socket.close(),n.socket=null)}},serverSentEvents:{name:"serverSentEvents",timeOut:3e3,start:function(f,e,o){var s=this,l=!1,c=n(f),h=!e,v,a;f.eventSource&&f.stop();if(!t.EventSource){o&&o();return}c.trigger(i.onSending),v=u.getUrl(f,this.name,h);try{f.eventSource=new t.EventSource(v)}catch(y){r("EventSource failed trying to connect with error "+y.Message,f.logging),o?o():(c.trigger(i.onError,[y]),h&&(r("EventSource reconnecting",f.logging),s.reconnect(f)));return}a=t.setTimeout(function(){l===!1&&(r("EventSource timed out trying to connect",f.logging),o&&o(),h?(r("EventSource reconnecting",f.logging),s.reconnect(f)):s.stop(f))},s.timeOut),f.eventSource.addEventListener("open",function(){r("EventSource connected",f.logging),a&&t.clearTimeout(a),l===!1&&(l=!0,e&&e(),h&&c.trigger(i.onReconnect))},!1),f.eventSource.addEventListener("message",function(n){if(n.data==="initialized")return;u.processMessages(f,t.JSON.parse(n.data))},!1),f.eventSource.addEventListener("error",function(n){if(!l){o&&o();return}r("EventSource readyState: "+f.eventSource.readyState,f.logging),n.eventPhase===t.EventSource.CLOSED?f.eventSource.readyState===t.EventSource.CONNECTING?(r("EventSource reconnecting due to the server connection ending",f.logging),s.reconnect(f)):(r("EventSource closed",f.logging),s.stop(f)):(r("EventSource error",f.logging),c.trigger(i.onError))},!1)},reconnect:function(n){var i=this;t.setTimeout(function(){i.stop(n),i.start(n)},n.reconnectDelay)},send:function(n,t){u.ajaxSend(n,t)},stop:function(n){n&&n.eventSource&&(n.eventSource.close(),n.eventSource=null,delete n.eventSource)}},foreverFrame:{name:"foreverFrame",timeOut:3e3,start:function(f,e,o){var h=this,l=u.foreverFrame.count+=1,c,a,s=n("<iframe data-signalr-connection-id='"+f.id+"' style='position:absolute;width:0;height:0;visibility:hidden;'></iframe>");if(t.EventSource){o&&o();return}n(f).trigger(i.onSending),c=u.getUrl(f,this.name),c+="&frameId="+l,s.prop("src",c),u.foreverFrame.connections[l]=f,s.bind("readystatechange",function(){n.inArray(this.readyState,["loaded","complete"])<0||(r("Forever frame iframe readyState changed to "+this.readyState+", reconnecting",f.logging),h.reconnect(f))}),f.frame=s[0],f.frameId=l,e&&(f.onSuccess=e),n("body").append(s),a=t.setTimeout(function(){f.onSuccess&&(h.stop(f),o&&o())},h.timeOut)},reconnect:function(n){var i=this;t.setTimeout(function(){var r=n.frame,t=u.getUrl(n,i.name,!0)+"&frameId="+n.frameId;r.src=t},n.reconnectDelay)},send:function(n,t){u.ajaxSend(n,t)},receive:u.processMessages,stop:function(t){t.frame&&(t.frame.stop?t.frame.stop():t.frame.document&&t.frame.document.execCommand&&t.frame.document.execCommand("Stop"),n(t.frame).remove(),delete u.foreverFrame.connections[t.frameId],t.frame=null,t.frameId=null,delete t.frame,delete t.frameId)},getConnection:function(n){return u.foreverFrame.connections[n]},started:function(t){t.onSuccess?(t.onSuccess(),t.onSuccess=null,delete t.onSuccess):n(t).trigger(i.onReconnect)}},longPolling:{name:"longPolling",reconnectDelay:3e3,start:function(r,f){var o=this;r.pollXhr&&r.stop(),r.messageId=null,t.setTimeout(function(){(function e(f,s){n(f).trigger(i.onSending);var a=f.messageId,l=a===null,v=u.getUrl(f,o.name,!l),c=null,h=!1;f.pollXhr=n.ajax(v,{global:!1,type:"GET",dataType:"json",success:function(r){var c=0,o=!1;s===!0&&h===!1&&(n(f).trigger(i.onReconnect),h=!0),u.processMessages(f,r),r&&n.type(r.TransportData.LongPollDelay)==="number"&&(c=r.TransportData.LongPollDelay),r&&r.TimedOut&&(o=r.TimedOut),c>0?t.setTimeout(function(){e(f,o)},c):e(f,o)},error:function(u,o){if(o==="abort")return;c&&clearTimeout(c),n(f).trigger(i.onError,[u]),t.setTimeout(function(){e(f,!0)},r.reconnectDelay)}}),s===!0&&(c=t.setTimeout(function(){h===!1&&(n(f).trigger(i.onReconnect),h=!0)},o.reconnectDelay))})(r),t.setTimeout(f,150)},250)},send:function(n,t){u.ajaxSend(n,t)},stop:function(n){n.pollXhr&&(n.pollXhr.abort(),n.pollXhr=null,delete n.pollXhr)}}},f.noConflict=function(){return n.connection===f&&(n.connection=e),f},n.connection&&(e=n.connection),n.connection=n.signalR=f}(window.jQuery,window);
/*!
* Note: While Microsoft is not the author of this file, Microsoft is
* offering you a license subject to the terms of the Microsoft Software
* License Terms for Microsoft ASP.NET Model View Controller 3.
* Microsoft reserves all other rights. The notices below are provided
* for informational purposes only and are not the license terms under
* which Microsoft distributed this file.
*/
window.Modernizr=function(n,t,i){function at(){f.input=function(n){for(var t=0,i=n.length;t<i;t++)ft[n[t]]=!!(n[t]in u);return ft}("autocomplete autofocus list placeholder max min multiple pattern required step".split(" ")),f.inputtypes=function(n){for(var o=0,r,f,s,h=n.length;o<h;o++)u.setAttribute("type",f=n[o]),r=u.type!=="text",r&&(u.value=nt,u.style.cssText="position:absolute;visibility:hidden;",/^range$/.test(f)&&u.style.WebkitAppearance!==i?(e.appendChild(u),s=t.defaultView,r=s.getComputedStyle&&s.getComputedStyle(u,null).WebkitAppearance!=="textfield"&&u.offsetHeight!==0,e.removeChild(u)):/^(search|tel)$/.test(f)||(/^(url|email)$/.test(f)?r=u.checkValidity&&u.checkValidity()===!1:/^color$/.test(f)?(e.appendChild(u),e.offsetWidth,r=u.value!=nt,e.removeChild(u)):r=u.value!=nt)),st[n[o]]=!!r;return st}("search tel url email datetime date month week time datetime-local number range color".split(" "))}function s(n,t){var i=n.charAt(0).toUpperCase()+n.substr(1),r=(n+" "+b.join(i+" ")+i).split(" ");return!!tt(r,t)}function tt(n,t){for(var r in n)if(o[n[r]]!==i&&(!t||t(n[r],w)))return!0}function a(n,t){return(""+n).indexOf(t)!==-1}function c(n,t){return typeof n===t}function ct(n,t){return l(h.join(n+";")+(t||""))}function l(n){o.cssText=n}var lt="1.7",f={},it=!0,e=t.documentElement,ut=t.head||t.getElementsByTagName("head")[0],ht="modernizr",w=t.createElement(ht),o=w.style,u=t.createElement("input"),nt=":)",et=Object.prototype.toString,h=" -webkit- -moz- -o- -ms- -khtml- ".split(" "),b="Webkit Moz O ms Khtml".split(" "),p={svg:"http://www.w3.org/2000/svg"},r={},st={},ft={},ot=[],y,rt=function(n){var r=t.createElement("style"),i=t.createElement("div"),u;return r.textContent=n+"{#modernizr{height:3px}}",ut.appendChild(r),i.id="modernizr",e.appendChild(i),u=i.offsetHeight===3,r.parentNode.removeChild(r),i.parentNode.removeChild(i),!!u},k=function(){function r(r,u){u=u||t.createElement(n[r]||"div");var f=(r="on"+r)in u;return f||(u.setAttribute||(u=t.createElement("div")),u.setAttribute&&u.removeAttribute&&(u.setAttribute(r,""),f=c(u[r],"function"),c(u[r],i)||(u[r]=i),u.removeAttribute(r))),u=null,f}var n={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"};return r}(),g={}.hasOwnProperty,d,v;d=c(g,i)||c(g.call,i)?function(n,t){return t in n&&c(n.constructor.prototype[t],i)}:function(n,t){return g.call(n,t)},r.flexbox=function(){function u(n,t,i,r){n.style.cssText=h.join(t+":"+i+";")+(r||"")}function f(n,t,i,r){t+=":",n.style.cssText=(t+h.join(i+";"+t)).slice(0,-t.length)+(r||"")}var n=t.createElement("div"),i=t.createElement("div"),r;return f(n,"display","box","width:42px;padding:0;"),u(i,"box-flex","1","width:10px;"),n.appendChild(i),e.appendChild(n),r=i.offsetWidth===42,n.removeChild(i),e.removeChild(n),r},r.canvas=function(){var n=t.createElement("canvas");return n.getContext&&n.getContext("2d")},r.canvastext=function(){return f.canvas&&c(t.createElement("canvas").getContext("2d").fillText,"function")},r.webgl=function(){return!!n.WebGLRenderingContext},r.touch=function(){return"ontouchstart"in n||rt("@media ("+h.join("touch-enabled),(")+"modernizr)")},r.geolocation=function(){return!!navigator.geolocation},r.postmessage=function(){return!!n.postMessage},r.websqldatabase=function(){return!!n.openDatabase},r.indexedDB=function(){for(var t,i=-1,r=b.length;++i<r;){t=b[i].toLowerCase();if(n[t+"_indexedDB"]||n[t+"IndexedDB"])return!0}return!1},r.hashchange=function(){return k("hashchange",n)&&(t.documentMode===i||t.documentMode>7)},r.history=function(){return!!(n.history&&history.pushState)},r.draganddrop=function(){return k("dragstart")&&k("drop")},r.websockets=function(){return"WebSocket"in n},r.rgba=function(){return l("background-color:rgba(150,255,150,.5)"),a(o.backgroundColor,"rgba")},r.hsla=function(){return l("background-color:hsla(120,40%,100%,.5)"),a(o.backgroundColor,"rgba")||a(o.backgroundColor,"hsla")},r.multiplebgs=function(){return l("background:url(//:),url(//:),red url(//:)"),new RegExp("(url\\s*\\(.*?){3}").test(o.background)},r.backgroundsize=function(){return s("backgroundSize")},r.borderimage=function(){return s("borderImage")},r.borderradius=function(){return s("borderRadius","",function(n){return a(n,"orderRadius")})},r.boxshadow=function(){return s("boxShadow")},r.textshadow=function(){return t.createElement("div").style.textShadow===""},r.opacity=function(){return ct("opacity:.55"),/^0.55$/.test(o.opacity)},r.cssanimations=function(){return s("animationName")},r.csscolumns=function(){return s("columnCount")},r.cssgradients=function(){var n="background-image:",i="gradient(linear,left top,right bottom,from(#9f9),to(white));",t="linear-gradient(left top,#9f9, white);";return l((n+h.join(i+n)+h.join(t+n)).slice(0,-n.length)),a(o.backgroundImage,"gradient")},r.cssreflections=function(){return s("boxReflect")},r.csstransforms=function(){return!!tt(["transformProperty","WebkitTransform","MozTransform","OTransform","msTransform"])},r.csstransforms3d=function(){var n=!!tt(["perspectiveProperty","WebkitPerspective","MozPerspective","OPerspective","msPerspective"]);return n&&"webkitPerspective"in e.style&&(n=rt("@media ("+h.join("transform-3d),(")+"modernizr)")),n},r.csstransitions=function(){return s("transitionProperty")},r.fontface=function(){var n,f,r=ut||e,i=t.createElement("style"),o=t.implementation||{hasFeature:function(){return!1}},u;return i.type="text/css",r.insertBefore(i,r.firstChild),n=i.sheet||i.styleSheet,u=o.hasFeature("CSS2","")?function(t){if(!n||!t)return!1;var i=!1;try{n.insertRule(t,0),i=/src/i.test(n.cssRules[0].cssText),n.deleteRule(n.cssRules.length-1)}catch(r){}return i}:function(t){return!n||!t?!1:(n.cssText=t,n.cssText.length!==0&&/src/i.test(n.cssText)&&n.cssText.replace(/\r+|\n+/g,"").indexOf(t.split(" ")[0])===0)},f=u('@font-face { font-family: "font"; src: url(data:,); }'),r.removeChild(i),f},r.video=function(){var i=t.createElement("video"),n=!!i.canPlayType,r;return n&&(n=new Boolean(n),n.ogg=i.canPlayType('video/ogg; codecs="theora"'),r='video/mp4; codecs="avc1.42E01E',n.h264=i.canPlayType(r+'"')||i.canPlayType(r+', mp4a.40.2"'),n.webm=i.canPlayType('video/webm; codecs="vp8, vorbis"')),n},r.audio=function(){var i=t.createElement("audio"),n=!!i.canPlayType;return n&&(n=new Boolean(n),n.ogg=i.canPlayType('audio/ogg; codecs="vorbis"'),n.mp3=i.canPlayType("audio/mpeg;"),n.wav=i.canPlayType('audio/wav; codecs="1"'),n.m4a=i.canPlayType("audio/x-m4a;")||i.canPlayType("audio/aac;")),n},r.localstorage=function(){try{return!!localStorage.getItem}catch(n){return!1}},r.sessionstorage=function(){try{return!!sessionStorage.getItem}catch(n){return!1}},r.webWorkers=function(){return!!n.Worker},r.applicationcache=function(){return!!n.applicationCache},r.svg=function(){return!!t.createElementNS&&!!t.createElementNS(p.svg,"svg").createSVGRect},r.inlinesvg=function(){var n=t.createElement("div");return n.innerHTML="<svg/>",(n.firstChild&&n.firstChild.namespaceURI)==p.svg},r.smil=function(){return!!t.createElementNS&&/SVG/.test(et.call(t.createElementNS(p.svg,"animate")))},r.svgclippaths=function(){return!!t.createElementNS&&/SVG/.test(et.call(t.createElementNS(p.svg,"clipPath")))};for(v in r)d(r,v)&&(y=v.toLowerCase(),f[y]=r[v](),ot.push((f[y]?"":"no-")+y));return f.input||at(),f.crosswindowmessaging=f.postmessage,f.historymanagement=f.history,f.addTest=function(n,t){return n=n.toLowerCase(),f[n]?void 0:(t=!!t(),e.className+=" "+(t?"":"no-")+n,f[n]=t,f)},l(""),w=u=null,it&&n.attachEvent&&function(){var n=t.createElement("div");return n.innerHTML="<elem></elem>",n.childNodes.length!==1}()&&function(n,t){function l(n,t){var u=-1,f=n.length,i,r=[];while(++u<f)i=n[u],(t=i.media||t)!="screen"&&r.push(l(i.imports,t),i.cssText);return r.join("")}function a(n){var t=-1;while(++t<c)n.createElement(o[t])}var e="abbr|article|aside|audio|canvas|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",o=e.split("|"),c=o.length,v=new RegExp("(^|\\s)("+e+")","gi"),y=new RegExp("<(/*)("+e+")","gi"),p=new RegExp("(^|[^\\n]*?\\s)("+e+")([^\\n]*)({[\\n\\w\\W]*?})","gi"),h=t.createDocumentFragment(),f=t.documentElement,s=f.firstChild,r=t.createElement("body"),u=t.createElement("style"),i;a(t),a(h),s.insertBefore(u,s.firstChild),u.media="print",n.attachEvent("onbeforeprint",function(){var a=-1,b=l(t.styleSheets,"all"),w=[],n;i=i||t.body;while((n=p.exec(b))!=null)w.push((n[1]+n[2]+n[3]).replace(v,"$1.iepp_$2")+n[4]);u.styleSheet.cssText=w.join("\n");while(++a<c){var e=t.getElementsByTagName(o[a]),k=e.length,s=-1;while(++s<k)e[s].className.indexOf("iepp_")<0&&(e[s].className+=" iepp_"+o[a])}h.appendChild(i),f.appendChild(r),r.className=i.className,r.innerHTML=i.innerHTML.replace(y,"<$1font")}),n.attachEvent("onafterprint",function(){r.innerHTML="",f.removeChild(r),f.appendChild(i),u.styleSheet.cssText=""})}(n,t),f._enableHTML5=it,f._version=lt,e.className=e.className.replace(/\bno-js\b/,"")+" js "+ot.join(" "),f}(this,this.document),typeof String.prototype.trim!="function"&&(String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,"")}),jQuery.fn.extend({insertAtCaret:function(n){return this.each(function(){if(document.selection)this.focus(),sel=document.selection.createRange(),sel.text=n,this.focus();else if(this.selectionStart||this.selectionStart=="0"){var i=this.selectionStart,u=this.selectionEnd,r=this.scrollTop;this.value=this.value.substring(0,i)+n+this.value.substring(u,this.value.length),this.focus(),this.selectionStart=i+n.length,this.selectionEnd=i+n.length,this.scrollTop=r}else this.value+=n,this.focus()})}}),$(function(){typeof console=="undefined"&&(console={log:function(){}}),$(".select-all").click(function(n){n.preventDefault();var t=$(this).attr("data-elemid");$("#"+t).find("option").each(function(){$(this).attr("selected","selected")})}),$(".select-none").click(function(n){n.preventDefault();var t=$(this).attr("data-elemid");$("#"+t).find("option").each(function(){$(this).removeAttr("selected")})}),$.ajaxSetup({jsonp:null,jsonpCallback:null}),$.ajaxSettings.traditional=!0,$("a#dash-link").click(function(n){n.preventDefault()}),$("#profile").superfish({dropShadows:!0,autoArrows:!1}),$("ul.sf-menu").superfish({dropShadows:!0,autoArrows:!1}),$("ul.sf-dash").superfish({dropShadows:!0,autoArrows:!1}),$.fn.getTitle=function(){var n=$("a.fancybox");$.each(n,function(){var n=$(this).children("img").attr("alt");n==""&&(n=$(this).next().children("p").html()),n==""&&(n=$(this).attr("title")),$(this).attr("title",n)})},$("a.fancybox").fancybox({openEffect:"none",closeEffect:"none",prevEffect:"none",nextEffect:"none",fitToView:!1}),$("a.newwin").attr("target","_blank"),navigator.platform=="iPad"||navigator.platform=="iPhone"||navigator.platform=="iPod",screen.width<=960&&screen.height<=480,screen.height<=960&&screen.width<=480,$("#dismiss-message a").live("click",function(n){n.preventDefault(),$.get("/Content/DismissSystemMessages",function(){$("#message-headline").text("Okay, system messages will be dismissed for 24 hours."),$("#message-body").empty(),$("#system-message").delay(1600),$("#system-message").slideUp()})}),$(".datepicker-selects").datepicker({constrainInput:!0,changeMonth:!0,changeYear:!0,yearRange:(new Date).getFullYear()-100+":"+(new Date).getFullYear()}),$(".datepicker").datepicker({constrainInput:!0}),$(".delete").click(function(){return confirm("Are you sure you want to delete this item?")}),$(".confirm").click(function(){return confirm("Are you sure?")}),SetUpToolTips()}),function(n){function i(n){return n.substr(0,n.lastIndexOf(".")+1)}function t(n,t){return n.indexOf("*.")==0&&(n=n.replace("*.",t)),n}n.validator.unobtrusive.adapters.add("brequired",function(n){n.element.tagName.toUpperCase()=="INPUT"&&n.element.type.toUpperCase()=="CHECKBOX"&&(n.rules.required=!0,n.message&&(n.messages.required=n.message))}),n.validator.addMethod("verifychecked",function(t,i,r){return!t&&n(r).is(":checked")?!1:!0}),n.validator.unobtrusive.adapters.add("requiredifcheckboxchecked",["checkbox","enabled"],function(r){var o=i(r.element.name),f=r.params.checkbox,e=t(f,o),u;r.params.enabled!="False"&&r.params.enabled!="false"&&(u=n(r.form).find(":input[name="+e+"]")[0],r.rules.verifychecked=u,r.message&&(r.messages.verifychecked=r.message))})}(jQuery),function(n){function u(n,t){return n.nodeType==3?o(n,t):e(n,t)}function e(t,i){var t=n(t),f=t.clone().empty(),r;return t.contents().each(function(){var n=i-f.text().length;if(n==0)return;r=u(this,n),r&&f.append(r)}),f}function o(t,u){var f=i(t.data);return r&&(f=f.replace(/^ /,"")),r=!!f.match(/ $/),f=f.slice(0,u),f=n("<div/>").text(f).html()}function i(n){return n.replace(/\s+/g," ")}function t(i){var f=n(i),r=f.children(":last"),u;if(!r)return i;return u=r.css("display"),!u||u=="inline"?f:t(r)}function f(t){var r=n(t),i=r.children(":last");return i&&i.is("p")?i:t}var r=!0;n.fn.truncate=function(r){var e=n.extend({},n.fn.truncate.defaults,r);n(this).each(function(){var s;if(n(this).hasClass("truncate"))return;n(this).addClass("truncate"),s=n.trim(i(n(this).text())).length;if(s<=e.max_length)return;var h=e.max_length-e.more.length-3,r=u(this,h),o=n(this).hide();r.insertAfter(o),t(r).append(' (<a href="#show more content">'+e.more+"</a>)"),f(o).append(' (<a href="#show less content">'+e.less+"</a>)"),r.find("a:last").click(function(){return r.hide(),o.show(),!1}),o.find("a:last").click(function(){return r.show(),o.hide(),!1})})},n.fn.truncate.defaults={max_length:100,more:"more",less:"less"}}(jQuery)
