function saveCookie(n,t,i,r){var u=new Date,f;u.setTime(u.getTime());i&&(i=i*864e5);f=new Date(u.getTime()+i);document.cookie=n+"="+escape(t)+(i?";expires="+f.toUTCString():"")+";path="+r}function getCookie(n){var i=document.cookie.indexOf(n+"="),r=i+n.length+1,t;return!i&&n!=document.cookie.substring(0,n.length)?null:i==-1?null:(t=document.cookie.indexOf(";",r),t==-1&&(t=document.cookie.length),unescape(document.cookie.substring(r,t)))}function queryString(n){if(hu=window.location.search.substring(1),r="",hu!=""){for(gy=hu.split("&"),i=0;i<gy.length;i++)ft=gy[i].split("="),ft[0]==n&&(r=ft[1]);return r}return""}function parseQueryString(n,t){if(r="",n!=""){for(gy=n.split("&"),i=0;i<gy.length;i++)ft=gy[i].split("="),ft[0]==t&&(r=ft[1]);return r}return""}function queryStringMvc(n){var i=new RegExp("\\/"+n+"\\.(.+?)\\/","i"),t=i.exec(window.location.href);return t?t[1]:""}function regExMatch(n,t,i){var r=n.exec(t);return r?r[i]:""}function getFormVal(n){var t=encodeURIComponent($.trim($("#"+n).val()));return t=="undefined"?"":t}function getCurrentUrl(){var t=window.location,n=window.location.port;return t.protocol+"//"+t.hostname+(n!=""&&n!="80"&&n!="443"?":"+n:"")+t.pathname}function getCheckVal(n){var t=$("#"+n);return t.is(":checked")?encodeURIComponent(t.val()):""}function getCheckValGroup(n){var t="";return $("input[name='"+n+"']:checked").each(function(){t+=t?","+$(this).val():$(this).val()}),t}function getRadioVal(n){return encodeURIComponent($("input[name='"+n+"']:checked").val())}function disableButton(n,t){var i=$("#"+n);i.attr("data-orig-text",i.html());i.html(t);i.attr("disabled","disabled").addClass("disabled")}function reenableButton(n){var t=$("#"+n);t.html(t.attr("data-orig-text"));t.removeAttr("data-orig-text").removeAttr("disabled").removeClass("disabled")}function getSecToken(){return encodeURIComponent($("input[name=__RequestVerificationToken]").val())}function getSecTokenRaw(){return $("input[name=__RequestVerificationToken]").val()}function serializeSecToken(n){return n==!0?"__RequestVerificationToken="+getSecToken():"&__RequestVerificationToken="+getSecToken()}function handleResponseError(n){isAdmin=window.location.toString().indexOf("/admin")>-1?!0:!1;n.errType?window.location=(isAdmin?"/admin":"")+"/error/?err="+n.errType:n.redirect&&(window.location=n.redirect)}function formObj(){this.onStart=function(){disableButton(this.button,this.disabledText)};this.reenableForm=function(){reenableButton(this.button)};this.clearFields=function(){$("#"+this.button).closest("form").find("input").each(function(){var n=$(this),t;n.val("");n.attr("type")=="password"&&(t=$("#"+n.attr("id")+"-temp"),t.length>0&&(n.hide(),t.show()))})};this.onSuccess=function(){var n=this.resp;return n.errType?window.location=(this.isAdmin?"/admin":"")+"/error/?err="+n.errType:n.redirect?window.location=n.redirect:this.callback(n),n.IsValid?(this.formRedirects||this.reenableForm(),unhideCode(this.button),(!n.Data||n.Data&&!n.Data.overrideReset==!0)&&resetAction(this.button)):this.reenableForm(),!1};this.initForm=function(n){var t=this;$("#"+t.button).click(function(){if(!$(this).is(":visible")||n&&!confirm(n))return!1;try{return removeFeedback(),t.onStart(),$.ajax({type:"POST",cache:!1,dataType:"json",url:t.service,data:t.data()+serializeSecToken(),timeout:t.timeout,success:function(n){t.resp=n;t.onSuccess()},error:function(){alert("An error occurred");t.reenableForm()}}),!1}catch(i){return t.reenableForm(),!1}})}}function showPopover(n,t,i,r){var u=$("#"+n),f,o,e;i&&!u.is(":visible")&&(u=$("#"+i));r&&!u.is(":visible")&&(u=$("#"+r));f=u.data("popover");f?(f.$tip.find(".content p").html(t),f.$tip.show()):(u.popover({content:t,trigger:"manual"}),u.popover("show"),window.pageYOffset>0&&(o=u.data("popover").$tip,e=parseInt(o.css("top").replace("px","")),e=e-window.pageYOffset,o.css("top",e+"px")))}function showAlert(n,t,i,r){i||(i="alert-error");t||(t="fa fa-times-circle fa-spacer");r||(r="alert");$("#"+r).after('<div class="alert '+i+'"><i class="'+t+'"><\/i>&nbsp;'+n+"<\/div>");window.location="#"}function showValidationError(n,t){var i=$("#"+n+""),r;document.location.href.indexOf("/admin/")>-1?(i.closest(".control-group").addClass("error"),t&&(i.after('<span class="help-inline">'+t+"<\/span>"),r=i.closest(".controls"),r.children(".code").hide())):(i.closest(".form-group").addClass("has-error"),i.is("input")&&(i.is("input[type=hidden],input[type=checkbox]")||i.closest(".form-group").length&&(i.closest(".form-group").addClass("has-feedback"),i.after('<span class="fa fa-remove form-control-feedback" aria-hidden="true"><\/span>'))))}function showValidationErrorField(n){var t=$("#"+n+"");t.addClass("error")}function showUploaderValidationError(n){var t=$(".uploadify-button-text");t.text(n);t.css("color","#B94A48");t.closest(".control-group").addClass("error")}function showEditorValidationError(n,t){t||(t=$(".redactor_box"));t.css("border","1px solid #B94A48");t.closest(".control-group").addClass("error");n&&t.after('<span class="help-inline">'+n+"<\/span>")}function unhideCode(n){$("#"+n).closest("form").find(".code").show()}function resetAction(n){$("#"+n).closest("form").find("input[id$='action']").val("edit")}function removeFeedback(){$(".uploadify-button-text").css("color","#333333");$(".redactor_box").css("border","1px solid #DDDDDD");$(".error").removeClass("error");$(".has-error").removeClass("has-error");$(".has-feedback").removeClass("has-feedback");$(".form-control-feedback").remove();$(".help-inline:not([class*='no-clear'])").remove();$(".help-block:not([class*='no-clear'])").remove();$(".alert:not([class*='no-clear'])").hide()}function getSafeHtml(n){var t=$("#"+n).val();return t=encodeURIComponent(t),t.replace(/%/g,"~")}function convertSafeHtml(n){return n=encodeURIComponent(n),n.replace(/%/g,"~")}function isNumeric(n){return!isNaN(parseFloat(n))&&isFinite(n)}function trim(n,t){while(n.substring(0,1)==t)n=n.substring(1);while(n.substring(n.length-1)==t)n=n.substring(0,n.length-1);return n}function isHTML5UploadEnabled(){return typeof window.FormData!="undefined"}function initUpload(n,t,i){var r=n?$(n):$(".file-upload");r.length>0&&r.each(function(n,r){function ft(){var n;return $.ajax({type:"POST",cache:!1,dataType:"json",async:!1,url:"/ws/file/upload-token/",data:serializeSecToken(),success:function(t){t.Ok?n=t.token:handleResponseError(t)},error:function(){alert("An error occurred")}}),n}function y(n){if(nt++,p){var t=Math.random().toString(36).substring(2);a.append('<div id="Err_'+t+'" class="alert alert-error" style="margin-bottom: 5px; line-height: 150%">'+n+"<\/div>");setTimeout(function(){a.find("#Err_"+t).fadeOut("fast",function(){$(this).remove()})},5e3)}else alert(n)}var u=$(r),l=u.attr("id"),nt,o,c;l||(l="file-upload-"+n,u.attr("id",l));var et=u.closest("form"),it=u.attr("id")+"-queue",a=et.find(".file-upload-queue").attr("id",it),p=a.length>0?!0:!1,k=u.attr("id")+"-thumbnail",s=u.attr("id")+"-file",e=$("#"+k).length?$("#"+k):u.parent().find(".file-upload-thumbnail").attr("id",k),rt=e.length>0?!0:!1,w=u.attr("data-size-limit"),d=parseInt(u.attr("data-file-limit")),b=u.attr("data-button-class"),v=u.attr("data-button-text"),ut=u.attr("data-uploader-path"),ot=u.attr("data-filetype-desc"),g=u.attr("data-filetype-exts"),f=u.attr("data-redirect"),st=u.attr("data-no-reenable"),h;if(e.length&&e.attr("src")==""&&e.hide(),u.hide(),nt=0,isHTML5UploadEnabled()){u.after("<label for='"+l+"' class='btn btn-default uploader-btn "+b+"'>"+v+"<\/label>");o=$(".uploader-btn[for='"+l+"']");d>1&&u.attr("multiple","multiple");g&&u.attr("accept",g.replace(/\*/g,"").replace(/\;/g,","));c=function(){var n=!1;return i&&typeof i=="function"&&(n=i(),n||o.removeClass("disabled")),n&&(o.text(v),o.addClass("disabled")),n};function tt(){o.text(v);c()||o.removeClass("disabled")}c();u.on("change",function(n){var i,a;if(!c()){i=n.target.files;o.addClass("disabled");o.text("Uploading...");var v=0,r=0,l=0;$.each(i,function(n,f){var o,a,p;c()||(o=i[v++],a=new FormData,w===""||o.size<w*1048576?(p=ft(function(){}),a.append("token",p),a.append("fileId",s),a.append("Filename",o.name),a.append("Filedata",f),l++,$.ajax({url:ut,enctype:"multipart/form-data",type:"POST",data:a,cache:!1,processData:!1,contentType:!1,success:function(n){typeof n.error=="undefined"?(t&&typeof t=="function"?t(u,o,n):(h=o.name,n==="error"||(rt?(e.attr("src",u.attr("data-thumbnail-url")+n),e.attr("data-filename",n),e.show()):s&&$("#"+s).data("data-filename",n))),c()):y("An error occurred processing "+o.name);r++},error:function(){y("An error occurred processing "+o.name)}})):alert(o.name+" Exceeds file size limit "+w+" MB."))});a=setInterval(function(){l===r&&(clearInterval(a),f&&f!==""?(f.indexOf("{lastFile}")>-1&&(f=h?f.replace("{lastFile}",h):""),window.location=f):tt())},1e3)}})}else{function tt(){u.uploadify("settings","buttonText",v);u.uploadify("settings","buttonClass",b);u.uploadify("disable",!1)}u.uploadify({buttonClass:b,width:190,height:34,buttonText:v,progressData:"percentage",swf:"/js/uploadify.swf",uploader:ut,queueID:p?it:!1,auto:!0,fileTypeDesc:ot,fileTypeExts:g,queueSizeLimit:d,multi:d>1?!0:!1,fileSizeLimit:w+"MB",removeTimeout:1,successTimeout:180,overrideEvents:["onDialogClose"],itemTemplate:p?'<div id="${fileID}" class="alert alert-success" style="margin-bottom: 5px; line-height: 150%"><button type="button" class="close" onclick="$(\'#${instanceID}\').uploadify(\'cancel\', \'${fileID}\')">&#215;<\/button><span class="fileName">${fileName} (${fileSize})<\/span><span class="data"><\/span><\/div>':null,onFallback:function(){y("You need Flash installed to upload files")},onUploadSuccess:function(n,i){t&&typeof t=="function"?t(u,n,i):(h=n.name,i==="error"?y("An error occurred processing "+n.name):rt?(e.attr("src",u.attr("data-thumbnail-url")+i),e.attr("data-filename",i),e.show(),u.trigger("uploaded",i)):s&&($("#"+s).data("data-filename",i),u.trigger("uploaded",i)))},onUploadStart:function(){var n=!1,t;i&&typeof i=="function"&&(n=i());n||(t=ft(),u.uploadify("settings","formData",{token:t,fileId:s}),u.uploadify("settings","buttonText","Uploading..."),u.uploadify("settings","buttonClass",b+" disabled"),u.uploadify("disable",!0))},onQueueComplete:function(){st!="true"&&tt();i&&typeof i=="function"&&i()&&u.uploadify("disable",!0)},onDialogClose:function(n){if(n.filesErrored>0&&y(n.errorMsg),p&&f)var t=setInterval(function(){var n=a.find("div[id^='SWFUpload']").length,i=a.find("div[id^='Err_']").length;n==0&&i==0&&(clearInterval(t),f.indexOf("{lastFile}")>-1&&(f=h?f.replace("{lastFile}",h):""),f!=""&&nt==0?window.location=f:tt())},100);return!1},onSWFReady:function(){i&&typeof i=="function"&&i()&&u.uploadify("disable",!0)}})}})}function getCombinedAlert(n){var t="",i;for(i in n.ErrFields)t+=(t==""?"* ":"\n* ")+n.ErrFields[i].replace(/^\*/,"");return t}function isIE(){var u,t=-1,n=window.navigator.userAgent,i=n.indexOf("MSIE "),f=n.indexOf("Trident/"),r;return i>0?t=parseInt(n.substring(i+5,n.indexOf(".",i)),10):f>0&&(r=n.indexOf("rv:"),t=parseInt(n.substring(r+3,n.indexOf(".",r)),10)),t>-1?t:u}(function(n,t){function hf(n){var t=yt[n]={};return i.each(n.split(h),function(n,i){t[i]=!0}),t}function li(n,r,u){if(u===t&&n.nodeType===1){var f="data-"+r.replace(ci,"-$1").toLowerCase();if(u=n.getAttribute(f),typeof u=="string"){try{u=u==="true"?!0:u==="false"?!1:u==="null"?null:+u+""===u?+u:hi.test(u)?i.parseJSON(u):u}catch(e){}i.data(n,r,u)}else u=t}return u}function pt(n){var t;for(t in n)if((t!=="data"||!i.isEmptyObject(n[t]))&&t!=="toJSON")return!1;return!0}function a(){return!1}function tt(){return!0}function b(n){return!n||!n.parentNode||n.parentNode.nodeType===11}function nr(n,t){do n=n[t];while(n&&n.nodeType!==1);return n}function tr(n,t,r){if(t=t||0,i.isFunction(t))return i.grep(n,function(n,i){var u=!!t.call(n,i,n);return u===r});if(t.nodeType)return i.grep(n,function(n){return n===t===r});if(typeof t=="string"){var u=i.grep(n,function(n){return n.nodeType===1});if(df.test(t))return i.filter(t,u,!r);t=i.filter(t,u)}return i.grep(n,function(n){return i.inArray(n,t)>=0===r})}function ir(n){var i=rr.split("|"),t=n.createDocumentFragment();if(t.createElement)while(i.length)t.createElement(i.pop());return t}function oe(n,t){return n.getElementsByTagName(t)[0]||n.appendChild(n.ownerDocument.createElement(t))}function hr(n,t){if(t.nodeType===1&&i.hasData(n)){var u,f,o,s=i._data(n),r=i._data(t,s),e=s.events;if(e){delete r.handle;r.events={};for(u in e)for(f=0,o=e[u].length;f<o;f++)i.event.add(t,u,e[u][f])}r.data&&(r.data=i.extend({},r.data))}}function cr(n,t){var r;t.nodeType===1&&(t.clearAttributes&&t.clearAttributes(),t.mergeAttributes&&t.mergeAttributes(n),r=t.nodeName.toLowerCase(),r==="object"?(t.parentNode&&(t.outerHTML=n.outerHTML),i.support.html5Clone&&n.innerHTML&&!i.trim(t.innerHTML)&&(t.innerHTML=n.innerHTML)):r==="input"&&er.test(n.type)?(t.defaultChecked=t.checked=n.checked,t.value!==n.value&&(t.value=n.value)):r==="option"?t.selected=n.defaultSelected:r==="input"||r==="textarea"?t.defaultValue=n.defaultValue:r==="script"&&t.text!==n.text&&(t.text=n.text),t.removeAttribute(i.expando))}function it(n){return typeof n.getElementsByTagName!="undefined"?n.getElementsByTagName("*"):typeof n.querySelectorAll!="undefined"?n.querySelectorAll("*"):[]}function lr(n){er.test(n.type)&&(n.defaultChecked=n.checked)}function pr(n,t){if(t in n)return t;for(var r=t.charAt(0).toUpperCase()+t.slice(1),u=t,i=yr.length;i--;)if(t=yr[i]+r,t in n)return t;return u}function ut(n,t){return n=t||n,i.css(n,"display")==="none"||!i.contains(n.ownerDocument,n)}function wr(n,t){for(var r,o,e=[],f=0,s=n.length;f<s;f++)(r=n[f],r.style)&&(e[f]=i._data(r,"olddisplay"),t?(e[f]||r.style.display!=="none"||(r.style.display=""),r.style.display===""&&ut(r)&&(e[f]=i._data(r,"olddisplay",gr(r.nodeName)))):(o=u(r,"display"),e[f]||o==="none"||i._data(r,"olddisplay",o)));for(f=0;f<s;f++)(r=n[f],r.style)&&(t&&r.style.display!=="none"&&r.style.display!==""||(r.style.display=t?e[f]||"":"none"));return n}function br(n,t,i){var r=le.exec(t);return r?Math.max(0,r[1]-(i||0))+(r[2]||"px"):t}function kr(n,t,r,f){for(var e=r===(f?"border":"content")?4:t==="width"?1:0,o=0;e<4;e+=2)r==="margin"&&(o+=i.css(n,r+c[e],!0)),f?(r==="content"&&(o-=parseFloat(u(n,"padding"+c[e]))||0),r!=="margin"&&(o-=parseFloat(u(n,"border"+c[e]+"Width"))||0)):(o+=parseFloat(u(n,"padding"+c[e]))||0,r!=="padding"&&(o+=parseFloat(u(n,"border"+c[e]+"Width"))||0));return o}function dr(n,t,r){var f=t==="width"?n.offsetWidth:n.offsetHeight,e=!0,o=i.support.boxSizing&&i.css(n,"boxSizing")==="border-box";if(f<=0||f==null){if(f=u(n,t),(f<0||f==null)&&(f=n.style[t]),rt.test(f))return f;e=o&&(i.support.boxSizingReliable||f===n.style[t]);f=parseFloat(f)||0}return f+kr(n,t,r||(o?"border":"content"),e)+"px"}function gr(n){if(ni[n])return ni[n];var f=i("<"+n+">").appendTo(r.body),t=f.css("display");return f.remove(),(t==="none"||t==="")&&(v=r.body.appendChild(v||i.extend(r.createElement("iframe"),{frameBorder:0,width:0,height:0})),y&&v.createElement||(y=(v.contentWindow||v.contentDocument).document,y.write("<!doctype html><html><body>"),y.close()),f=y.body.appendChild(y.createElement(n)),t=u(f,"display"),r.body.removeChild(v)),ni[n]=t,t}function ti(n,t,r,u){var f;if(i.isArray(t))i.each(t,function(t,i){r||we.test(n)?u(n,i):ti(n+"["+(typeof i=="object"?t:"")+"]",i,r,u)});else if(r||i.type(t)!=="object")u(n,t);else for(f in t)ti(n+"["+f+"]",t[f],r,u)}function eu(n){return function(t,r){typeof t!="string"&&(r=t,t="*");var u,o,f,s=t.toLowerCase().split(h),e=0,c=s.length;if(i.isFunction(r))for(;e<c;e++)u=s[e],f=/^\+/.test(u),f&&(u=u.substr(1)||"*"),o=n[u]=n[u]||[],o[f?"unshift":"push"](r)}}function ft(n,i,r,u,f,e){f=f||i.dataTypes[0];e=e||{};e[f]=!0;for(var o,s=n[f],h=0,l=s?s.length:0,c=n===ii;h<l&&(c||!o);h++)o=s[h](i,r,u),typeof o=="string"&&(!c||e[o]?o=t:(i.dataTypes.unshift(o),o=ft(n,i,r,u,o,e)));return!c&&o||e["*"]||(o=ft(n,i,r,u,"*",e)),o}function ou(n,r){var u,f,e=i.ajaxSettings.flatOptions||{};for(u in r)r[u]!==t&&((e[u]?n:f||(f={}))[u]=r[u]);f&&i.extend(!0,n,f)}function uo(n,i,r){var o,u,e,s,h=n.contents,f=n.dataTypes,c=n.responseFields;for(u in c)u in r&&(i[c[u]]=r[u]);while(f[0]==="*")f.shift(),o===t&&(o=n.mimeType||i.getResponseHeader("content-type"));if(o)for(u in h)if(h[u]&&h[u].test(o)){f.unshift(u);break}if(f[0]in r)e=f[0];else{for(u in r){if(!f[0]||n.converters[u+" "+f[0]]){e=u;break}s||(s=u)}e=e||s}if(e)return e!==f[0]&&f.unshift(e),r[e]}function fo(n,t){var i,o,r,e,s=n.dataTypes.slice(),f=s[0],u={},h=0;if(n.dataFilter&&(t=n.dataFilter(t,n.dataType)),s[1])for(i in n.converters)u[i.toLowerCase()]=n.converters[i];for(;r=s[++h];)if(r!=="*"){if(f!=="*"&&f!==r){if(i=u[f+" "+r]||u["* "+r],!i)for(o in u)if(e=o.split(" "),e[1]===r&&(i=u[f+" "+e[0]]||u["* "+e[0]],i)){i===!0?i=u[o]:u[o]!==!0&&(r=e[0],s.splice(h--,0,r));break}if(i!==!0)if(i&&n.throws)t=i(t);else try{t=i(t)}catch(c){return{state:"parsererror",error:i?c:"No conversion from "+f+" to "+r}}}f=r}return{state:"success",data:t}}function cu(){try{return new n.XMLHttpRequest}catch(t){}}function so(){try{return new n.ActiveXObject("Microsoft.XMLHTTP")}catch(t){}}function lu(){return setTimeout(function(){st=t},0),st=i.now()}function ao(n,t){i.each(t,function(t,i){for(var u=(k[t]||[]).concat(k["*"]),r=0,f=u.length;r<f;r++)if(u[r].call(n,t,i))return})}function au(n,t,r){var e,o=0,c=ct.length,f=i.Deferred().always(function(){delete h.elem}),h=function(){for(var o=st||lu(),t=Math.max(0,u.startTime+u.duration-o),i=1-(t/u.duration||0),r=0,e=u.tweens.length;r<e;r++)u.tweens[r].run(i);return f.notifyWith(n,[u,i,t]),i<1&&e?t:(f.resolveWith(n,[u]),!1)},u=f.promise({elem:n,props:i.extend({},t),opts:i.extend(!0,{specialEasing:{}},r),originalProperties:t,originalOptions:r,startTime:st||lu(),duration:r.duration,tweens:[],createTween:function(t,r){var f=i.Tween(n,u.opts,t,r,u.opts.specialEasing[t]||u.opts.easing);return u.tweens.push(f),f},stop:function(t){for(var i=0,r=t?u.tweens.length:0;i<r;i++)u.tweens[i].run(1);return t?f.resolveWith(n,[u,t]):f.rejectWith(n,[u,t]),this}}),s=u.props;for(vo(s,u.opts.specialEasing);o<c;o++)if(e=ct[o].call(u,n,s,u.opts),e)return e;return ao(u,s),i.isFunction(u.opts.start)&&u.opts.start.call(n,u),i.fx.timer(i.extend(h,{anim:u,queue:u.opts.queue,elem:n})),u.progress(u.opts.progress).done(u.opts.done,u.opts.complete).fail(u.opts.fail).always(u.opts.always)}function vo(n,t){var r,f,e,u,o;for(r in n)if(f=i.camelCase(r),e=t[f],u=n[r],i.isArray(u)&&(e=u[1],u=n[r]=u[0]),r!==f&&(n[f]=u,delete n[r]),o=i.cssHooks[f],o&&"expand"in o){u=o.expand(u);delete n[f];for(r in u)r in n||(n[r]=u[r],t[r]=e)}else t[f]=e}function yo(n,t,r){var o,u,a,v,h,c,f,w,s=this,e=n.style,y={},p=[],l=n.nodeType&&ut(n);r.queue||(f=i._queueHooks(n,"fx"),f.unqueued==null&&(f.unqueued=0,w=f.empty.fire,f.empty.fire=function(){f.unqueued||w()}),f.unqueued++,s.always(function(){s.always(function(){f.unqueued--;i.queue(n,"fx").length||f.empty.fire()})}));n.nodeType===1&&("height"in t||"width"in t)&&(r.overflow=[e.overflow,e.overflowX,e.overflowY],i.css(n,"display")==="inline"&&i.css(n,"float")==="none"&&(i.support.inlineBlockNeedsLayout&&gr(n.nodeName)!=="inline"?e.zoom=1:e.display="inline-block"));r.overflow&&(e.overflow="hidden",i.support.shrinkWrapBlocks||s.done(function(){e.overflow=r.overflow[0];e.overflowX=r.overflow[1];e.overflowY=r.overflow[2]}));for(o in t)if(a=t[o],ho.exec(a)){if(delete t[o],a===(l?"hide":"show"))continue;p.push(o)}if(v=p.length,v)for(h=i._data(n,"fxshow")||i._data(n,"fxshow",{}),l?i(n).show():s.done(function(){i(n).hide()}),s.done(function(){var t;i.removeData(n,"fxshow",!0);for(t in y)i.style(n,t,y[t])}),o=0;o<v;o++)u=p[o],c=s.createTween(u,l?h[u]:0),y[u]=h[u]||i.style(n,u),u in h||(h[u]=c.start,l&&(c.end=c.start,c.start=u==="width"||u==="height"?1:0))}function f(n,t,i,r,u){return new f.prototype.init(n,t,i,r,u)}function lt(n,t){var r,i={height:n},u=0;for(t=t?1:0;u<4;u+=2-t)r=c[u],i["margin"+r]=i["padding"+r]=n;return t&&(i.opacity=i.width=n),i}function vu(n){return i.isWindow(n)?n:n.nodeType===9?n.defaultView||n.parentWindow:!1}var ui,d,r=n.document,yu=n.location,pu=n.navigator,wu=n.jQuery,bu=n.$,fi=Array.prototype.push,o=Array.prototype.slice,ei=Array.prototype.indexOf,ku=Object.prototype.toString,at=Object.prototype.hasOwnProperty,vt=String.prototype.trim,i=function(n,t){return new i.fn.init(n,t,ui)},g=/[\-+]?(?:\d*\.|)\d+(?:[eE][\-+]?\d+|)/.source,du=/\S/,h=/\s+/,gu=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,nf=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,oi=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,tf=/^[\],:{}\s]*$/,rf=/(?:^|:|,)(?:\s*\[)+/g,uf=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,ff=/"[^"\\\r\n]*"|true|false|null|-?(?:\d\d*\.|)\d+(?:[eE][\-+]?\d+|)/g,ef=/^-ms-/,of=/-([\da-z])/gi,sf=function(n,t){return(t+"").toUpperCase()},nt=function(){r.addEventListener?(r.removeEventListener("DOMContentLoaded",nt,!1),i.ready()):r.readyState==="complete"&&(r.detachEvent("onreadystatechange",nt),i.ready())},si={},yt,hi,ci,w,ot,hu,ri;i.fn=i.prototype={constructor:i,init:function(n,u,f){var e,o,s;if(!n)return this;if(n.nodeType)return this.context=this[0]=n,this.length=1,this;if(typeof n=="string"){if(e=n.charAt(0)==="<"&&n.charAt(n.length-1)===">"&&n.length>=3?[null,n,null]:nf.exec(n),e&&(e[1]||!u)){if(e[1])return u=u instanceof i?u[0]:u,s=u&&u.nodeType?u.ownerDocument||u:r,n=i.parseHTML(e[1],s,!0),oi.test(e[1])&&i.isPlainObject(u)&&this.attr.call(n,u,!0),i.merge(this,n);if(o=r.getElementById(e[2]),o&&o.parentNode){if(o.id!==e[2])return f.find(n);this.length=1;this[0]=o}return this.context=r,this.selector=n,this}return!u||u.jquery?(u||f).find(n):this.constructor(u).find(n)}return i.isFunction(n)?f.ready(n):(n.selector!==t&&(this.selector=n.selector,this.context=n.context),i.makeArray(n,this))},selector:"",jquery:"1.8.2",length:0,size:function(){return this.length},toArray:function(){return o.call(this)},get:function(n){return n==null?this.toArray():n<0?this[this.length+n]:this[n]},pushStack:function(n,t,r){var u=i.merge(this.constructor(),n);return u.prevObject=this,u.context=this.context,t==="find"?u.selector=this.selector+(this.selector?" ":"")+r:t&&(u.selector=this.selector+"."+t+"("+r+")"),u},each:function(n,t){return i.each(this,n,t)},ready:function(n){return i.ready.promise().done(n),this},eq:function(n){return n=+n,n===-1?this.slice(n):this.slice(n,n+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(o.apply(this,arguments),"slice",o.call(arguments).join(","))},map:function(n){return this.pushStack(i.map(this,function(t,i){return n.call(t,i,t)}))},end:function(){return this.prevObject||this.constructor(null)},push:fi,sort:[].sort,splice:[].splice};i.fn.init.prototype=i.fn;i.extend=i.fn.extend=function(){var o,e,u,r,s,h,n=arguments[0]||{},f=1,l=arguments.length,c=!1;for(typeof n=="boolean"&&(c=n,n=arguments[1]||{},f=2),typeof n=="object"||i.isFunction(n)||(n={}),l===f&&(n=this,--f);f<l;f++)if((o=arguments[f])!=null)for(e in o)(u=n[e],r=o[e],n!==r)&&(c&&r&&(i.isPlainObject(r)||(s=i.isArray(r)))?(s?(s=!1,h=u&&i.isArray(u)?u:[]):h=u&&i.isPlainObject(u)?u:{},n[e]=i.extend(c,h,r)):r!==t&&(n[e]=r));return n};i.extend({noConflict:function(t){return n.$===i&&(n.$=bu),t&&n.jQuery===i&&(n.jQuery=wu),i},isReady:!1,readyWait:1,holdReady:function(n){n?i.readyWait++:i.ready(!0)},ready:function(n){if(n===!0?!--i.readyWait:!i.isReady){if(!r.body)return setTimeout(i.ready,1);(i.isReady=!0,n!==!0&&--i.readyWait>0)||(d.resolveWith(r,[i]),i.fn.trigger&&i(r).trigger("ready").off("ready"))}},isFunction:function(n){return i.type(n)==="function"},isArray:Array.isArray||function(n){return i.type(n)==="array"},isWindow:function(n){return n!=null&&n==n.window},isNumeric:function(n){return!isNaN(parseFloat(n))&&isFinite(n)},type:function(n){return n==null?String(n):si[ku.call(n)]||"object"},isPlainObject:function(n){if(!n||i.type(n)!=="object"||n.nodeType||i.isWindow(n))return!1;try{if(n.constructor&&!at.call(n,"constructor")&&!at.call(n.constructor.prototype,"isPrototypeOf"))return!1}catch(u){return!1}var r;for(r in n);return r===t||at.call(n,r)},isEmptyObject:function(n){var t;for(t in n)return!1;return!0},error:function(n){throw new Error(n);},parseHTML:function(n,t,u){var f;return!n||typeof n!="string"?null:(typeof t=="boolean"&&(u=t,t=0),t=t||r,f=oi.exec(n))?[t.createElement(f[1])]:(f=i.buildFragment([n],t,u?null:[]),i.merge([],(f.cacheable?i.clone(f.fragment):f.fragment).childNodes))},parseJSON:function(t){if(!t||typeof t!="string")return null;if(t=i.trim(t),n.JSON&&n.JSON.parse)return n.JSON.parse(t);if(tf.test(t.replace(uf,"@").replace(ff,"]").replace(rf,"")))return new Function("return "+t)();i.error("Invalid JSON: "+t)},parseXML:function(r){var u,f;if(!r||typeof r!="string")return null;try{n.DOMParser?(f=new DOMParser,u=f.parseFromString(r,"text/xml")):(u=new ActiveXObject("Microsoft.XMLDOM"),u.async="false",u.loadXML(r))}catch(e){u=t}return u&&u.documentElement&&!u.getElementsByTagName("parsererror").length||i.error("Invalid XML: "+r),u},noop:function(){},globalEval:function(t){t&&du.test(t)&&(n.execScript||function(t){n.eval.call(n,t)})(t)},camelCase:function(n){return n.replace(ef,"ms-").replace(of,sf)},nodeName:function(n,t){return n.nodeName&&n.nodeName.toLowerCase()===t.toLowerCase()},each:function(n,r,u){var f,e=0,o=n.length,s=o===t||i.isFunction(n);if(u){if(s){for(f in n)if(r.apply(n[f],u)===!1)break}else for(;e<o;)if(r.apply(n[e++],u)===!1)break}else if(s){for(f in n)if(r.call(n[f],f,n[f])===!1)break}else for(;e<o;)if(r.call(n[e],e,n[e++])===!1)break;return n},trim:vt&&!vt.call("﻿ ")?function(n){return n==null?"":vt.call(n)}:function(n){return n==null?"":(n+"").replace(gu,"")},makeArray:function(n,t){var r,u=t||[];return n!=null&&(r=i.type(n),n.length==null||r==="string"||r==="function"||r==="regexp"||i.isWindow(n)?fi.call(u,n):i.merge(u,n)),u},inArray:function(n,t,i){var r;if(t){if(ei)return ei.call(t,n,i);for(r=t.length,i=i?i<0?Math.max(0,r+i):i:0;i<r;i++)if(i in t&&t[i]===n)return i}return-1},merge:function(n,i){var f=i.length,u=n.length,r=0;if(typeof f=="number")for(;r<f;r++)n[u++]=i[r];else while(i[r]!==t)n[u++]=i[r++];return n.length=u,n},grep:function(n,t,i){var u,f=[],r=0,e=n.length;for(i=!!i;r<e;r++)u=!!t(n[r],r),i!==u&&f.push(n[r]);return f},map:function(n,r,u){var f,h,e=[],s=0,o=n.length,c=n instanceof i||o!==t&&typeof o=="number"&&(o>0&&n[0]&&n[o-1]||o===0||i.isArray(n));if(c)for(;s<o;s++)f=r(n[s],s,u),f!=null&&(e[e.length]=f);else for(h in n)f=r(n[h],h,u),f!=null&&(e[e.length]=f);return e.concat.apply([],e)},guid:1,proxy:function(n,r){var f,e,u;return(typeof r=="string"&&(f=n[r],r=n,n=f),!i.isFunction(n))?t:(e=o.call(arguments,2),u=function(){return n.apply(r,e.concat(o.call(arguments)))},u.guid=n.guid=n.guid||i.guid++,u)},access:function(n,r,u,f,e,o,s){var c,l=u==null,h=0,a=n.length;if(u&&typeof u=="object"){for(h in u)i.access(n,r,h,u[h],1,o,f);e=1}else if(f!==t){if(c=s===t&&i.isFunction(f),l&&(c?(c=r,r=function(n,t,r){return c.call(i(n),r)}):(r.call(n,f),r=null)),r)for(;h<a;h++)r(n[h],u,c?f.call(n[h],h,r(n[h],u)):f,s);e=1}return e?n:l?r.call(n):a?r(n[0],u):o},now:function(){return(new Date).getTime()}});i.ready.promise=function(t){if(!d)if(d=i.Deferred(),r.readyState==="complete")setTimeout(i.ready,1);else if(r.addEventListener)r.addEventListener("DOMContentLoaded",nt,!1),n.addEventListener("load",i.ready,!1);else{r.attachEvent("onreadystatechange",nt);n.attachEvent("onload",i.ready);var u=!1;try{u=n.frameElement==null&&r.documentElement}catch(e){}u&&u.doScroll&&function f(){if(!i.isReady){try{u.doScroll("left")}catch(n){return setTimeout(f,50)}i.ready()}}()}return d.promise(t)};i.each("Boolean Number String Function Array Date RegExp Object".split(" "),function(n,t){si["[object "+t+"]"]=t.toLowerCase()});ui=i(r);yt={};i.Callbacks=function(n){n=typeof n=="string"?yt[n]||hf(n):i.extend({},n);var f,c,o,l,s,e,r=[],u=!n.once&&[],a=function(t){for(f=n.memory&&t,c=!0,e=l||0,l=0,s=r.length,o=!0;r&&e<s;e++)if(r[e].apply(t[0],t[1])===!1&&n.stopOnFalse){f=!1;break}o=!1;r&&(u?u.length&&a(u.shift()):f?r=[]:h.disable())},h={add:function(){if(r){var t=r.length;(function u(t){i.each(t,function(t,f){var e=i.type(f);e!=="function"||n.unique&&h.has(f)?f&&f.length&&e!=="string"&&u(f):r.push(f)})})(arguments);o?s=r.length:f&&(l=t,a(f))}return this},remove:function(){return r&&i.each(arguments,function(n,t){for(var u;(u=i.inArray(t,r,u))>-1;)r.splice(u,1),o&&(u<=s&&s--,u<=e&&e--)}),this},has:function(n){return i.inArray(n,r)>-1},empty:function(){return r=[],this},disable:function(){return r=u=f=t,this},disabled:function(){return!r},lock:function(){return u=t,f||h.disable(),this},locked:function(){return!u},fireWith:function(n,t){return t=t||[],t=[n,t.slice?t.slice():t],r&&(!c||u)&&(o?u.push(t):a(t)),this},fire:function(){return h.fireWith(this,arguments),this},fired:function(){return!!c}};return h};i.extend({Deferred:function(n){var u=[["resolve","done",i.Callbacks("once memory"),"resolved"],["reject","fail",i.Callbacks("once memory"),"rejected"],["notify","progress",i.Callbacks("memory")]],f="pending",r={state:function(){return f},always:function(){return t.done(arguments).fail(arguments),this},then:function(){var n=arguments;return i.Deferred(function(r){i.each(u,function(u,f){var e=f[0],o=n[u];t[f[1]](i.isFunction(o)?function(){var n=o.apply(this,arguments);n&&i.isFunction(n.promise)?n.promise().done(r.resolve).fail(r.reject).progress(r.notify):r[e+"With"](this===t?r:this,[n])}:r[e])});n=null}).promise()},promise:function(n){return n!=null?i.extend(n,r):r}},t={};return r.pipe=r.then,i.each(u,function(n,i){var e=i[2],o=i[3];r[i[1]]=e.add;o&&e.add(function(){f=o},u[n^1][2].disable,u[2][2].lock);t[i[0]]=e.fire;t[i[0]+"With"]=e.fireWith}),r.promise(t),n&&n.call(t,t),t},when:function(n){var t=0,u=o.call(arguments),r=u.length,e=r!==1||n&&i.isFunction(n.promise)?r:0,f=e===1?n:i.Deferred(),c=function(n,t,i){return function(r){t[n]=this;i[n]=arguments.length>1?o.call(arguments):r;i===s?f.notifyWith(t,i):--e||f.resolveWith(t,i)}},s,l,h;if(r>1)for(s=new Array(r),l=new Array(r),h=new Array(r);t<r;t++)u[t]&&i.isFunction(u[t].promise)?u[t].promise().done(c(t,h,u)).fail(f.reject).progress(c(t,l,s)):--e;return e||f.resolveWith(h,u),f.promise()}});i.support=function(){var u,h,e,c,l,f,o,a,v,s,y,t=r.createElement("div");if(t.setAttribute("className","t"),t.innerHTML="  <link/><table><\/table><a href='/a'>a<\/a><input type='checkbox'/>",h=t.getElementsByTagName("*"),e=t.getElementsByTagName("a")[0],e.style.cssText="top:1px;float:left;opacity:.5",!h||!h.length)return{};c=r.createElement("select");l=c.appendChild(r.createElement("option"));f=t.getElementsByTagName("input")[0];u={leadingWhitespace:t.firstChild.nodeType===3,tbody:!t.getElementsByTagName("tbody").length,htmlSerialize:!!t.getElementsByTagName("link").length,style:/top/.test(e.getAttribute("style")),hrefNormalized:e.getAttribute("href")==="/a",opacity:/^0.5/.test(e.style.opacity),cssFloat:!!e.style.cssFloat,checkOn:f.value==="on",optSelected:l.selected,getSetAttribute:t.className!=="t",enctype:!!r.createElement("form").enctype,html5Clone:r.createElement("nav").cloneNode(!0).outerHTML!=="<:nav><\/:nav>",boxModel:r.compatMode==="CSS1Compat",submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0,boxSizingReliable:!0,pixelPosition:!1};f.checked=!0;u.noCloneChecked=f.cloneNode(!0).checked;c.disabled=!0;u.optDisabled=!l.disabled;try{delete t.test}catch(p){u.deleteExpando=!1}if(!t.addEventListener&&t.attachEvent&&t.fireEvent&&(t.attachEvent("onclick",y=function(){u.noCloneEvent=!1}),t.cloneNode(!0).fireEvent("onclick"),t.detachEvent("onclick",y)),f=r.createElement("input"),f.value="t",f.setAttribute("type","radio"),u.radioValue=f.value==="t",f.setAttribute("checked","checked"),f.setAttribute("name","t"),t.appendChild(f),o=r.createDocumentFragment(),o.appendChild(t.lastChild),u.checkClone=o.cloneNode(!0).cloneNode(!0).lastChild.checked,u.appendChecked=f.checked,o.removeChild(f),o.appendChild(t),t.attachEvent)for(v in{submit:!0,change:!0,focusin:!0})a="on"+v,s=a in t,s||(t.setAttribute(a,"return;"),s=typeof t[a]=="function"),u[v+"Bubbles"]=s;return i(function(){var i,t,f,e,h="padding:0;margin:0;border:0;display:block;overflow:hidden;",o=r.getElementsByTagName("body")[0];o&&(i=r.createElement("div"),i.style.cssText="visibility:hidden;border:0;width:0;height:0;position:static;top:0;margin-top:1px",o.insertBefore(i,o.firstChild),t=r.createElement("div"),i.appendChild(t),t.innerHTML="<table><tr><td><\/td><td>t<\/td><\/tr><\/table>",f=t.getElementsByTagName("td"),f[0].style.cssText="padding:0;margin:0;border:0;display:none",s=f[0].offsetHeight===0,f[0].style.display="",f[1].style.display="none",u.reliableHiddenOffsets=s&&f[0].offsetHeight===0,t.innerHTML="",t.style.cssText="box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;",u.boxSizing=t.offsetWidth===4,u.doesNotIncludeMarginInBodyOffset=o.offsetTop!==1,n.getComputedStyle&&(u.pixelPosition=(n.getComputedStyle(t,null)||{}).top!=="1%",u.boxSizingReliable=(n.getComputedStyle(t,null)||{width:"4px"}).width==="4px",e=r.createElement("div"),e.style.cssText=t.style.cssText=h,e.style.marginRight=e.style.width="0",t.style.width="1px",t.appendChild(e),u.reliableMarginRight=!parseFloat((n.getComputedStyle(e,null)||{}).marginRight)),typeof t.style.zoom!="undefined"&&(t.innerHTML="",t.style.cssText=h+"width:1px;padding:1px;display:inline;zoom:1",u.inlineBlockNeedsLayout=t.offsetWidth===3,t.style.display="block",t.style.overflow="visible",t.innerHTML="<div><\/div>",t.firstChild.style.width="5px",u.shrinkWrapBlocks=t.offsetWidth!==3,i.style.zoom=1),o.removeChild(i),i=t=f=e=null)}),o.removeChild(t),h=e=c=l=f=o=t=null,u}();hi=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/;ci=/([A-Z])/g;i.extend({cache:{},deletedIds:[],uuid:0,expando:"jQuery"+(i.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(n){return n=n.nodeType?i.cache[n[i.expando]]:n[i.expando],!!n&&!pt(n)},data:function(n,r,u,f){if(i.acceptData(n)){var s,h,c=i.expando,a=typeof r=="string",l=n.nodeType,o=l?i.cache:n,e=l?n[c]:n[c]&&c;if(e&&o[e]&&(f||o[e].data)||!a||u!==t)return e||(l?n[c]=e=i.deletedIds.pop()||i.guid++:e=c),o[e]||(o[e]={},l||(o[e].toJSON=i.noop)),(typeof r=="object"||typeof r=="function")&&(f?o[e]=i.extend(o[e],r):o[e].data=i.extend(o[e].data,r)),s=o[e],f||(s.data||(s.data={}),s=s.data),u!==t&&(s[i.camelCase(r)]=u),a?(h=s[r],h==null&&(h=s[i.camelCase(r)])):h=s,h}},removeData:function(n,t,r){if(i.acceptData(n)){var e,o,h,s=n.nodeType,u=s?i.cache:n,f=s?n[i.expando]:i.expando;if(u[f]){if(t&&(e=r?u[f]:u[f].data,e)){for(i.isArray(t)||(t in e?t=[t]:(t=i.camelCase(t),t=t in e?[t]:t.split(" "))),o=0,h=t.length;o<h;o++)delete e[t[o]];if(!(r?pt:i.isEmptyObject)(e))return}(r||(delete u[f].data,pt(u[f])))&&(s?i.cleanData([n],!0):i.support.deleteExpando||u!=u.window?delete u[f]:u[f]=null)}}},_data:function(n,t,r){return i.data(n,t,r,!0)},acceptData:function(n){var t=n.nodeName&&i.noData[n.nodeName.toLowerCase()];return!t||t!==!0&&n.getAttribute("classid")===t}});i.fn.extend({data:function(n,r){var u,s,h,o,l,e=this[0],c=0,f=null;if(n===t){if(this.length&&(f=i.data(e),e.nodeType===1&&!i._data(e,"parsedAttrs"))){for(h=e.attributes,l=h.length;c<l;c++)o=h[c].name,o.indexOf("data-")||(o=i.camelCase(o.substring(5)),li(e,o,f[o]));i._data(e,"parsedAttrs",!0)}return f}return typeof n=="object"?this.each(function(){i.data(this,n)}):(u=n.split(".",2),u[1]=u[1]?"."+u[1]:"",s=u[1]+"!",i.access(this,function(r){if(r===t)return f=this.triggerHandler("getData"+s,[u[0]]),f===t&&e&&(f=i.data(e,n),f=li(e,n,f)),f===t&&u[1]?this.data(u[0]):f;u[1]=r;this.each(function(){var t=i(this);t.triggerHandler("setData"+s,u);i.data(this,n,r);t.triggerHandler("changeData"+s,u)})},null,r,arguments.length>1,null,!1))},removeData:function(n){return this.each(function(){i.removeData(this,n)})}});i.extend({queue:function(n,t,r){var u;if(n)return t=(t||"fx")+"queue",u=i._data(n,t),r&&(!u||i.isArray(r)?u=i._data(n,t,i.makeArray(r)):u.push(r)),u||[]},dequeue:function(n,t){t=t||"fx";var r=i.queue(n,t),e=r.length,u=r.shift(),f=i._queueHooks(n,t),o=function(){i.dequeue(n,t)};u==="inprogress"&&(u=r.shift(),e--);u&&(t==="fx"&&r.unshift("inprogress"),delete f.stop,u.call(n,o,f));!e&&f&&f.empty.fire()},_queueHooks:function(n,t){var r=t+"queueHooks";return i._data(n,r)||i._data(n,r,{empty:i.Callbacks("once memory").add(function(){i.removeData(n,t+"queue",!0);i.removeData(n,r,!0)})})}});i.fn.extend({queue:function(n,r){var u=2;return(typeof n!="string"&&(r=n,n="fx",u--),arguments.length<u)?i.queue(this[0],n):r===t?this:this.each(function(){var t=i.queue(this,n,r);i._queueHooks(this,n);n==="fx"&&t[0]!=="inprogress"&&i.dequeue(this,n)})},dequeue:function(n){return this.each(function(){i.dequeue(this,n)})},delay:function(n,t){return n=i.fx?i.fx.speeds[n]||n:n,t=t||"fx",this.queue(t,function(t,i){var r=setTimeout(t,n);i.stop=function(){clearTimeout(r)}})},clearQueue:function(n){return this.queue(n||"fx",[])},promise:function(n,r){var u,e=1,o=i.Deferred(),f=this,s=this.length,h=function(){--e||o.resolveWith(f,[f])};for(typeof n!="string"&&(r=n,n=t),n=n||"fx";s--;)u=i._data(f[s],n+"queueHooks"),u&&u.empty&&(e++,u.empty.add(h));return h(),o.promise(r)}});var s,ai,vi,yi=/[\t\r\n]/g,cf=/\r/g,lf=/^(?:button|input)$/i,af=/^(?:button|input|object|select|textarea)$/i,vf=/^a(?:rea|)$/i,pi=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,wi=i.support.getSetAttribute;i.fn.extend({attr:function(n,t){return i.access(this,i.attr,n,t,arguments.length>1)},removeAttr:function(n){return this.each(function(){i.removeAttr(this,n)})},prop:function(n,t){return i.access(this,i.prop,n,t,arguments.length>1)},removeProp:function(n){return n=i.propFix[n]||n,this.each(function(){try{this[n]=t;delete this[n]}catch(i){}})},addClass:function(n){var r,f,o,t,e,u,s;if(i.isFunction(n))return this.each(function(t){i(this).addClass(n.call(this,t,this.className))});if(n&&typeof n=="string")for(r=n.split(h),f=0,o=this.length;f<o;f++)if(t=this[f],t.nodeType===1)if(t.className||r.length!==1){for(e=" "+t.className+" ",u=0,s=r.length;u<s;u++)e.indexOf(" "+r[u]+" ")<0&&(e+=r[u]+" ");t.className=i.trim(e)}else t.className=n;return this},removeClass:function(n){var e,r,u,f,s,o,c;if(i.isFunction(n))return this.each(function(t){i(this).removeClass(n.call(this,t,this.className))});if(n&&typeof n=="string"||n===t)for(e=(n||"").split(h),o=0,c=this.length;o<c;o++)if(u=this[o],u.nodeType===1&&u.className){for(r=(" "+u.className+" ").replace(yi," "),f=0,s=e.length;f<s;f++)while(r.indexOf(" "+e[f]+" ")>=0)r=r.replace(" "+e[f]+" "," ");u.className=n?i.trim(r):""}return this},toggleClass:function(n,t){var r=typeof n,u=typeof t=="boolean";return i.isFunction(n)?this.each(function(r){i(this).toggleClass(n.call(this,r,this.className,t),t)}):this.each(function(){if(r==="string")for(var f,s=0,o=i(this),e=t,c=n.split(h);f=c[s++];)e=u?e:!o.hasClass(f),o[e?"addClass":"removeClass"](f);else(r==="undefined"||r==="boolean")&&(this.className&&i._data(this,"__className__",this.className),this.className=this.className||n===!1?"":i._data(this,"__className__")||"")})},hasClass:function(n){for(var i=" "+n+" ",t=0,r=this.length;t<r;t++)if(this[t].nodeType===1&&(" "+this[t].className+" ").replace(yi," ").indexOf(i)>=0)return!0;return!1},val:function(n){var r,u,e,f=this[0];return arguments.length?(e=i.isFunction(n),this.each(function(u){var f,o=i(this);this.nodeType===1&&(f=e?n.call(this,u,o.val()):n,f==null?f="":typeof f=="number"?f+="":i.isArray(f)&&(f=i.map(f,function(n){return n==null?"":n+""})),r=i.valHooks[this.type]||i.valHooks[this.nodeName.toLowerCase()],r&&"set"in r&&r.set(this,f,"value")!==t||(this.value=f))})):f?(r=i.valHooks[f.type]||i.valHooks[f.nodeName.toLowerCase()],r&&"get"in r&&(u=r.get(f,"value"))!==t)?u:(u=f.value,typeof u=="string"?u.replace(cf,""):u==null?"":u):void 0}});i.extend({valHooks:{option:{get:function(n){var t=n.attributes.value;return!t||t.specified?n.value:n.text}},select:{get:function(n){var o,r,h,t,u=n.selectedIndex,s=[],f=n.options,e=n.type==="select-one";if(u<0)return null;for(r=e?u:0,h=e?u+1:f.length;r<h;r++)if(t=f[r],t.selected&&(i.support.optDisabled?!t.disabled:t.getAttribute("disabled")===null)&&(!t.parentNode.disabled||!i.nodeName(t.parentNode,"optgroup"))){if(o=i(t).val(),e)return o;s.push(o)}return e&&!s.length&&f.length?i(f[u]).val():s},set:function(n,t){var r=i.makeArray(t);return i(n).find("option").each(function(){this.selected=i.inArray(i(this).val(),r)>=0}),r.length||(n.selectedIndex=-1),r}}},attrFn:{},attr:function(n,r,u,f){var e,o,h,c=n.nodeType;if(n&&c!==3&&c!==8&&c!==2){if(f&&i.isFunction(i.fn[r]))return i(n)[r](u);if(typeof n.getAttribute=="undefined")return i.prop(n,r,u);if(h=c!==1||!i.isXMLDoc(n),h&&(r=r.toLowerCase(),o=i.attrHooks[r]||(pi.test(r)?ai:s)),u!==t){if(u===null){i.removeAttr(n,r);return}return o&&"set"in o&&h&&(e=o.set(n,u,r))!==t?e:(n.setAttribute(r,u+""),u)}return o&&"get"in o&&h&&(e=o.get(n,r))!==null?e:(e=n.getAttribute(r),e===null?t:e)}},removeAttr:function(n,t){var u,f,r,e,o=0;if(t&&n.nodeType===1)for(f=t.split(h);o<f.length;o++)r=f[o],r&&(u=i.propFix[r]||r,e=pi.test(r),e||i.attr(n,r,""),n.removeAttribute(wi?r:u),e&&u in n&&(n[u]=!1))},attrHooks:{type:{set:function(n,t){if(lf.test(n.nodeName)&&n.parentNode)i.error("type property can't be changed");else if(!i.support.radioValue&&t==="radio"&&i.nodeName(n,"input")){var r=n.value;return n.setAttribute("type",t),r&&(n.value=r),t}}},value:{get:function(n,t){return s&&i.nodeName(n,"button")?s.get(n,t):t in n?n.value:null},set:function(n,t,r){if(s&&i.nodeName(n,"button"))return s.set(n,t,r);n.value=t}}},propFix:{tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},prop:function(n,r,u){var e,f,s,o=n.nodeType;if(n&&o!==3&&o!==8&&o!==2)return s=o!==1||!i.isXMLDoc(n),s&&(r=i.propFix[r]||r,f=i.propHooks[r]),u!==t?f&&"set"in f&&(e=f.set(n,u,r))!==t?e:n[r]=u:f&&"get"in f&&(e=f.get(n,r))!==null?e:n[r]},propHooks:{tabIndex:{get:function(n){var i=n.getAttributeNode("tabindex");return i&&i.specified?parseInt(i.value,10):af.test(n.nodeName)||vf.test(n.nodeName)&&n.href?0:t}}}});ai={get:function(n,r){var u,f=i.prop(n,r);return f===!0||typeof f!="boolean"&&(u=n.getAttributeNode(r))&&u.nodeValue!==!1?r.toLowerCase():t},set:function(n,t,r){var u;return t===!1?i.removeAttr(n,r):(u=i.propFix[r]||r,u in n&&(n[u]=!0),n.setAttribute(r,r.toLowerCase())),r}};wi||(vi={name:!0,id:!0,coords:!0},s=i.valHooks.button={get:function(n,i){var r;return r=n.getAttributeNode(i),r&&(vi[i]?r.value!=="":r.specified)?r.value:t},set:function(n,t,i){var u=n.getAttributeNode(i);return u||(u=r.createAttribute(i),n.setAttributeNode(u)),u.value=t+""}},i.each(["width","height"],function(n,t){i.attrHooks[t]=i.extend(i.attrHooks[t],{set:function(n,i){if(i==="")return n.setAttribute(t,"auto"),i}})}),i.attrHooks.contenteditable={get:s.get,set:function(n,t,i){t===""&&(t="false");s.set(n,t,i)}});i.support.hrefNormalized||i.each(["href","src","width","height"],function(n,r){i.attrHooks[r]=i.extend(i.attrHooks[r],{get:function(n){var i=n.getAttribute(r,2);return i===null?t:i}})});i.support.style||(i.attrHooks.style={get:function(n){return n.style.cssText.toLowerCase()||t},set:function(n,t){return n.style.cssText=t+""}});i.support.optSelected||(i.propHooks.selected=i.extend(i.propHooks.selected,{get:function(n){var t=n.parentNode;return t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex),null}}));i.support.enctype||(i.propFix.enctype="encoding");i.support.checkOn||i.each(["radio","checkbox"],function(){i.valHooks[this]={get:function(n){return n.getAttribute("value")===null?"on":n.value}}});i.each(["radio","checkbox"],function(){i.valHooks[this]=i.extend(i.valHooks[this],{set:function(n,t){if(i.isArray(t))return n.checked=i.inArray(i(n).val(),t)>=0}})});var wt=/^(?:textarea|input|select)$/i,bi=/^([^\.]*|)(?:\.(.+)|)$/,yf=/(?:^|\s)hover(\.\S+|)\b/,pf=/^key/,wf=/^(?:mouse|contextmenu)|click/,ki=/^(?:focusinfocus|focusoutblur)$/,di=function(n){return i.event.special.hover?n:n.replace(yf,"mouseenter$1 mouseleave$1")};i.event={add:function(n,r,u,f,e){var a,s,v,y,p,o,b,l,w,c,h;if(n.nodeType!==3&&n.nodeType!==8&&r&&u&&(a=i._data(n))){for(u.handler&&(w=u,u=w.handler,e=w.selector),u.guid||(u.guid=i.guid++),v=a.events,v||(a.events=v={}),s=a.handle,s||(a.handle=s=function(n){return typeof i!="undefined"&&(!n||i.event.triggered!==n.type)?i.event.dispatch.apply(s.elem,arguments):t},s.elem=n),r=i.trim(di(r)).split(" "),y=0;y<r.length;y++)p=bi.exec(r[y])||[],o=p[1],b=(p[2]||"").split(".").sort(),h=i.event.special[o]||{},o=(e?h.delegateType:h.bindType)||o,h=i.event.special[o]||{},l=i.extend({type:o,origType:p[1],data:f,handler:u,guid:u.guid,selector:e,needsContext:e&&i.expr.match.needsContext.test(e),namespace:b.join(".")},w),c=v[o],c||(c=v[o]=[],c.delegateCount=0,h.setup&&h.setup.call(n,f,b,s)!==!1||(n.addEventListener?n.addEventListener(o,s,!1):n.attachEvent&&n.attachEvent("on"+o,s))),h.add&&(h.add.call(n,l),l.handler.guid||(l.handler.guid=u.guid)),e?c.splice(c.delegateCount++,0,l):c.push(l),i.event.global[o]=!0;n=null}},global:{},remove:function(n,t,r,u,f){var l,p,e,w,h,b,a,v,c,o,s,y=i.hasData(n)&&i._data(n);if(y&&(v=y.events)){for(t=i.trim(di(t||"")).split(" "),l=0;l<t.length;l++){if(p=bi.exec(t[l])||[],e=w=p[1],h=p[2],!e){for(e in v)i.event.remove(n,e+t[l],r,u,!0);continue}for(c=i.event.special[e]||{},e=(u?c.delegateType:c.bindType)||e,o=v[e]||[],b=o.length,h=h?new RegExp("(^|\\.)"+h.split(".").sort().join("\\.(?:.*\\.|)")+"(\\.|$)"):null,a=0;a<o.length;a++)s=o[a],(f||w===s.origType)&&(!r||r.guid===s.guid)&&(!h||h.test(s.namespace))&&(!u||u===s.selector||u==="**"&&s.selector)&&(o.splice(a--,1),s.selector&&o.delegateCount--,c.remove&&c.remove.call(n,s));o.length===0&&b!==o.length&&(c.teardown&&c.teardown.call(n,h,y.handle)!==!1||i.removeEvent(n,e,y.handle),delete v[e])}i.isEmptyObject(v)&&(delete y.handle,i.removeData(n,"events",!0))}},customEvent:{getData:!0,setData:!0,changeData:!0},trigger:function(u,f,e,o){if(!e||e.nodeType!==3&&e.nodeType!==8){var w,d,c,h,l,v,a,y,p,k,s=u.type||u,b=[];if(!ki.test(s+i.event.triggered)&&(s.indexOf("!")>=0&&(s=s.slice(0,-1),d=!0),s.indexOf(".")>=0&&(b=s.split("."),s=b.shift(),b.sort()),e&&!i.event.customEvent[s]||i.event.global[s])){if(u=typeof u=="object"?u[i.expando]?u:new i.Event(s,u):new i.Event(s),u.type=s,u.isTrigger=!0,u.exclusive=d,u.namespace=b.join("."),u.namespace_re=u.namespace?new RegExp("(^|\\.)"+b.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,v=s.indexOf(":")<0?"on"+s:"",!e){w=i.cache;for(c in w)w[c].events&&w[c].events[s]&&i.event.trigger(u,f,w[c].handle.elem,!0);return}if(u.result=t,u.target||(u.target=e),f=f!=null?i.makeArray(f):[],f.unshift(u),a=i.event.special[s]||{},!a.trigger||a.trigger.apply(e,f)!==!1){if(p=[[e,a.bindType||s]],!o&&!a.noBubble&&!i.isWindow(e)){for(k=a.delegateType||s,h=ki.test(k+s)?e:e.parentNode,l=e;h;h=h.parentNode)p.push([h,k]),l=h;l===(e.ownerDocument||r)&&p.push([l.defaultView||l.parentWindow||n,k])}for(c=0;c<p.length&&!u.isPropagationStopped();c++)h=p[c][0],u.type=p[c][1],y=(i._data(h,"events")||{})[u.type]&&i._data(h,"handle"),y&&y.apply(h,f),y=v&&h[v],y&&i.acceptData(h)&&y.apply&&y.apply(h,f)===!1&&u.preventDefault();return u.type=s,o||u.isDefaultPrevented()||a._default&&a._default.apply(e.ownerDocument,f)!==!1||s==="click"&&i.nodeName(e,"a")||!i.acceptData(e)||v&&e[s]&&(s!=="focus"&&s!=="blur"||u.target.offsetWidth!==0)&&!i.isWindow(e)&&(l=e[v],l&&(e[v]=null),i.event.triggered=s,e[s](),i.event.triggered=t,l&&(e[v]=l)),u.result}}}},dispatch:function(r){r=i.event.fix(r||n.event);var f,c,e,l,a,h,v,u,s,y=(i._data(this,"events")||{})[r.type]||[],p=y.delegateCount,k=o.call(arguments),d=!r.exclusive&&!r.namespace,w=i.event.special[r.type]||{},b=[];if(k[0]=r,r.delegateTarget=this,!w.preDispatch||w.preDispatch.call(this,r)!==!1){if(p&&!(r.button&&r.type==="click"))for(e=r.target;e!=this;e=e.parentNode||this)if(e.disabled!==!0||r.type!=="click"){for(a={},v=[],f=0;f<p;f++)u=y[f],s=u.selector,a[s]===t&&(a[s]=u.needsContext?i(s,this).index(e)>=0:i.find(s,this,null,[e]).length),a[s]&&v.push(u);v.length&&b.push({elem:e,matches:v})}for(y.length>p&&b.push({elem:this,matches:y.slice(p)}),f=0;f<b.length&&!r.isPropagationStopped();f++)for(h=b[f],r.currentTarget=h.elem,c=0;c<h.matches.length&&!r.isImmediatePropagationStopped();c++)u=h.matches[c],(d||!r.namespace&&!u.namespace||r.namespace_re&&r.namespace_re.test(u.namespace))&&(r.data=u.data,r.handleObj=u,l=((i.event.special[u.origType]||{}).handle||u.handler).apply(h.elem,k),l!==t&&(r.result=l,l===!1&&(r.preventDefault(),r.stopPropagation())));return w.postDispatch&&w.postDispatch.call(this,r),r.result}},props:"attrChange attrName relatedNode srcElement altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(n,t){return n.which==null&&(n.which=t.charCode!=null?t.charCode:t.keyCode),n}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(n,i){var o,u,f,e=i.button,s=i.fromElement;return n.pageX==null&&i.clientX!=null&&(o=n.target.ownerDocument||r,u=o.documentElement,f=o.body,n.pageX=i.clientX+(u&&u.scrollLeft||f&&f.scrollLeft||0)-(u&&u.clientLeft||f&&f.clientLeft||0),n.pageY=i.clientY+(u&&u.scrollTop||f&&f.scrollTop||0)-(u&&u.clientTop||f&&f.clientTop||0)),!n.relatedTarget&&s&&(n.relatedTarget=s===n.target?i.toElement:s),n.which||e===t||(n.which=e&1?1:e&2?3:e&4?2:0),n}},fix:function(n){if(n[i.expando])return n;var f,e,t=n,u=i.event.fixHooks[n.type]||{},o=u.props?this.props.concat(u.props):this.props;for(n=i.Event(t),f=o.length;f;)e=o[--f],n[e]=t[e];return n.target||(n.target=t.srcElement||r),n.target.nodeType===3&&(n.target=n.target.parentNode),n.metaKey=!!n.metaKey,u.filter?u.filter(n,t):n},special:{load:{noBubble:!0},focus:{delegateType:"focusin"},blur:{delegateType:"focusout"},beforeunload:{setup:function(n,t,r){i.isWindow(this)&&(this.onbeforeunload=r)},teardown:function(n,t){this.onbeforeunload===t&&(this.onbeforeunload=null)}}},simulate:function(n,t,r,u){var f=i.extend(new i.Event,r,{type:n,isSimulated:!0,originalEvent:{}});u?i.event.trigger(f,null,t):i.event.dispatch.call(t,f);f.isDefaultPrevented()&&r.preventDefault()}};i.event.handle=i.event.dispatch;i.removeEvent=r.removeEventListener?function(n,t,i){n.removeEventListener&&n.removeEventListener(t,i,!1)}:function(n,t,i){var r="on"+t;n.detachEvent&&(typeof n[r]=="undefined"&&(n[r]=null),n.detachEvent(r,i))};i.Event=function(n,t){if(!(this instanceof i.Event))return new i.Event(n,t);n&&n.type?(this.originalEvent=n,this.type=n.type,this.isDefaultPrevented=n.defaultPrevented||n.returnValue===!1||n.getPreventDefault&&n.getPreventDefault()?tt:a):this.type=n;t&&i.extend(this,t);this.timeStamp=n&&n.timeStamp||i.now();this[i.expando]=!0};i.Event.prototype={preventDefault:function(){this.isDefaultPrevented=tt;var n=this.originalEvent;n&&(n.preventDefault?n.preventDefault():n.returnValue=!1)},stopPropagation:function(){this.isPropagationStopped=tt;var n=this.originalEvent;n&&(n.stopPropagation&&n.stopPropagation(),n.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=tt;this.stopPropagation()},isDefaultPrevented:a,isPropagationStopped:a,isImmediatePropagationStopped:a};i.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(n,t){i.event.special[n]={delegateType:t,bindType:t,handle:function(n){var f,e=this,r=n.relatedTarget,u=n.handleObj,o=u.selector;return r&&(r===e||i.contains(e,r))||(n.type=u.origType,f=u.handler.apply(this,arguments),n.type=t),f}}});i.support.submitBubbles||(i.event.special.submit={setup:function(){if(i.nodeName(this,"form"))return!1;i.event.add(this,"click._submit keypress._submit",function(n){var u=n.target,r=i.nodeName(u,"input")||i.nodeName(u,"button")?u.form:t;r&&!i._data(r,"_submit_attached")&&(i.event.add(r,"submit._submit",function(n){n._submit_bubble=!0}),i._data(r,"_submit_attached",!0))})},postDispatch:function(n){n._submit_bubble&&(delete n._submit_bubble,this.parentNode&&!n.isTrigger&&i.event.simulate("submit",this.parentNode,n,!0))},teardown:function(){if(i.nodeName(this,"form"))return!1;i.event.remove(this,"._submit")}});i.support.changeBubbles||(i.event.special.change={setup:function(){if(wt.test(this.nodeName))return(this.type==="checkbox"||this.type==="radio")&&(i.event.add(this,"propertychange._change",function(n){n.originalEvent.propertyName==="checked"&&(this._just_changed=!0)}),i.event.add(this,"click._change",function(n){this._just_changed&&!n.isTrigger&&(this._just_changed=!1);i.event.simulate("change",this,n,!0)})),!1;i.event.add(this,"beforeactivate._change",function(n){var t=n.target;wt.test(t.nodeName)&&!i._data(t,"_change_attached")&&(i.event.add(t,"change._change",function(n){!this.parentNode||n.isSimulated||n.isTrigger||i.event.simulate("change",this.parentNode,n,!0)}),i._data(t,"_change_attached",!0))})},handle:function(n){var t=n.target;if(this!==t||n.isSimulated||n.isTrigger||t.type!=="radio"&&t.type!=="checkbox")return n.handleObj.handler.apply(this,arguments)},teardown:function(){return i.event.remove(this,"._change"),!wt.test(this.nodeName)}});i.support.focusinBubbles||i.each({focus:"focusin",blur:"focusout"},function(n,t){var u=0,f=function(n){i.event.simulate(t,n.target,i.event.fix(n),!0)};i.event.special[t]={setup:function(){u++==0&&r.addEventListener(n,f,!0)},teardown:function(){--u==0&&r.removeEventListener(n,f,!0)}}});i.fn.extend({on:function(n,r,u,f,e){var o,s;if(typeof n=="object"){typeof r!="string"&&(u=u||r,r=t);for(s in n)this.on(s,r,u,n[s],e);return this}if(u==null&&f==null?(f=r,u=r=t):f==null&&(typeof r=="string"?(f=u,u=t):(f=u,u=r,r=t)),f===!1)f=a;else if(!f)return this;return e===1&&(o=f,f=function(n){return i().off(n),o.apply(this,arguments)},f.guid=o.guid||(o.guid=i.guid++)),this.each(function(){i.event.add(this,n,f,u,r)})},one:function(n,t,i,r){return this.on(n,t,i,r,1)},off:function(n,r,u){var f,e;if(n&&n.preventDefault&&n.handleObj)return f=n.handleObj,i(n.delegateTarget).off(f.namespace?f.origType+"."+f.namespace:f.origType,f.selector,f.handler),this;if(typeof n=="object"){for(e in n)this.off(e,r,n[e]);return this}return(r===!1||typeof r=="function")&&(u=r,r=t),u===!1&&(u=a),this.each(function(){i.event.remove(this,n,u,r)})},bind:function(n,t,i){return this.on(n,null,t,i)},unbind:function(n,t){return this.off(n,null,t)},live:function(n,t,r){i(this.context).on(n,this.selector,t,r);return this},die:function(n,t){return i(this.context).off(n,this.selector||"**",t),this},delegate:function(n,t,i,r){return this.on(t,n,i,r)},undelegate:function(n,t,i){return arguments.length===1?this.off(n,"**"):this.off(t,n||"**",i)},trigger:function(n,t){return this.each(function(){i.event.trigger(n,t,this)})},triggerHandler:function(n,t){if(this[0])return i.event.trigger(n,t,this[0],!0)},toggle:function(n){var t=arguments,u=n.guid||i.guid++,r=0,f=function(u){var f=(i._data(this,"lastToggle"+n.guid)||0)%r;return i._data(this,"lastToggle"+n.guid,f+1),u.preventDefault(),t[f].apply(this,arguments)||!1};for(f.guid=u;r<t.length;)t[r++].guid=u;return this.click(f)},hover:function(n,t){return this.mouseenter(n).mouseleave(t||n)}});i.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(n,t){i.fn[t]=function(n,i){return i==null&&(i=n,n=null),arguments.length>0?this.on(t,null,n,i):this.trigger(t)};pf.test(t)&&(i.event.fixHooks[t]=i.event.keyHooks);wf.test(t)&&(i.event.fixHooks[t]=i.event.mouseHooks)}),function(n,t){function r(n,t,i,r){i=i||[];t=t||s;var e,u,o,f,h=t.nodeType;if(!n||typeof n!="string")return i;if(h!==1&&h!==9)return[];if(o=g(t),!o&&!r&&(e=wi.exec(n)))if(f=e[1]){if(h===9)if(u=t.getElementById(f),u&&u.parentNode){if(u.id===f)return i.push(u),i}else return i;else if(t.ownerDocument&&(u=t.ownerDocument.getElementById(f))&&dt(t,u)&&u.id===f)return i.push(u),i}else{if(e[2])return p.apply(i,w.call(t.getElementsByTagName(n),0)),i;if((f=e[3])&&oi&&t.getElementsByClassName)return p.apply(i,w.call(t.getElementsByClassName(f),0)),i}return kt(n.replace(it,"$1"),t,i,r,o)}function k(n){return function(t){var i=t.nodeName.toLowerCase();return i==="input"&&t.type===n}}function si(n){return function(t){var i=t.nodeName.toLowerCase();return(i==="input"||i==="button")&&t.type===n}}function y(n){return h(function(t){return t=+t,h(function(i,r){for(var u,f=n([],i.length,t),e=f.length;e--;)i[u=f[e]]&&(i[u]=!(r[u]=i[u]))})})}function ut(n,t,i){if(n===t)return i;for(var r=n.nextSibling;r;){if(r===t)return-1;r=r.nextSibling}return 1}function ft(n,t){var o,f,c,h,i,l,a,v=ri[e][n];if(v)return t?0:v.slice(0);for(i=n,l=[],a=u.preFilter;i;){(!o||(f=vi.exec(i)))&&(f&&(i=i.slice(f[0].length)),l.push(c=[]));o=!1;(f=yi.exec(i))&&(c.push(o=new ni(f.shift())),i=i.slice(o.length),o.type=f[0].replace(it," "));for(h in u.filter)(f=rt[h].exec(i))&&(!a[h]||(f=a[h](f,s,!0)))&&(c.push(o=new ni(f.shift())),i=i.slice(o.length),o.type=h,o.matches=f);if(!o)break}return t?i.length:i?r.error(n):ri(n,l).slice(0)}function yt(n,t,i){var r=t.dir,u=i&&t.dir==="parentNode",f=ci++;return t.first?function(t,i,f){while(t=t[r])if(u||t.nodeType===1)return n(t,i,f)}:function(t,i,o){if(o){while(t=t[r])if((u||t.nodeType===1)&&n(t,i,o))return t}else for(var s,h=tt+" "+f+" ",c=h+ot;t=t[r];)if(u||t.nodeType===1){if((s=t[e])===c)return t.sizset;if(typeof s=="string"&&s.indexOf(h)===0){if(t.sizset)return t}else{if(t[e]=c,n(t,i,o))return t.sizset=!0,t;t.sizset=!1}}}}function pt(n){return n.length>1?function(t,i,r){for(var u=n.length;u--;)if(!n[u](t,i,r))return!1;return!0}:n[0]}function et(n,t,i,r,u){for(var e,o=[],f=0,s=n.length,h=t!=null;f<s;f++)(e=n[f])&&(!i||i(e,r,u))&&(o.push(e),h&&t.push(f));return o}function wt(n,t,i,r,u,f){return r&&!r[e]&&(r=wt(r)),u&&!u[e]&&(u=wt(u,f)),h(function(f,e,o,s){if(!f||!u){var c,l,a,v=[],y=[],b=e.length,k=f||rr(t||"*",o.nodeType?[o]:o,[],f),w=n&&(f||!t)?et(k,v,n,o,s):k,h=i?u||(f?n:b||r)?[]:e:w;if(i&&i(w,h,o,s),r)for(a=et(h,y),r(a,[],o,s),c=a.length;c--;)(l=a[c])&&(h[y[c]]=!(w[y[c]]=l));if(f)for(c=n&&h.length;c--;)(l=h[c])&&(f[v[c]]=!(e[v[c]]=l));else h=et(h===e?h.splice(b,h.length):h),u?u(null,e,h,s):p.apply(e,h)}})}function bt(n){for(var s,r,i,o=n.length,h=u.relative[n[0].type],c=h||u.relative[" "],t=h?1:0,l=yt(function(n){return n===s},c,!0),a=yt(function(n){return ti.call(s,n)>-1},c,!0),f=[function(n,t,i){return!h&&(i||t!==nt)||((s=t).nodeType?l(n,t,i):a(n,t,i))}];t<o;t++)if(r=u.relative[n[t].type])f=[yt(pt(f),r)];else{if(r=u.filter[n[t].type].apply(null,n[t].matches),r[e]){for(i=++t;i<o;i++)if(u.relative[n[i].type])break;return wt(t>1&&pt(f),t>1&&n.slice(0,t-1).join("").replace(it,"$1"),r,t<i&&bt(n.slice(t,i)),i<o&&bt(n=n.slice(i)),i<o&&n.join(""))}f.push(r)}return pt(f)}function ir(n,t){var f=t.length>0,e=n.length>0,i=function(o,h,c,l,a){var y,b,k,w=[],d=0,v="0",g=o&&[],it=a!=null,rt=nt,ft=o||e&&u.find.TAG("*",a&&h.parentNode||h),ut=tt+=rt==null?1:Math.E;for(it&&(nt=h!==s&&h,ot=i.el);(y=ft[v])!=null;v++){if(e&&y){for(b=0;k=n[b];b++)if(k(y,h,c)){l.push(y);break}it&&(tt=ut,ot=++i.el)}f&&((y=!k&&y)&&d--,o&&g.push(y))}if(d+=v,f&&v!==d){for(b=0;k=t[b];b++)k(g,w,h,c);if(o){if(d>0)while(v--)g[v]||w[v]||(w[v]=li.call(l));w=et(w)}p.apply(l,w);it&&!o&&w.length>0&&d+t.length>1&&r.uniqueSort(l)}return it&&(tt=ut,nt=rt),g};return i.el=0,f?h(i):i}function rr(n,t,i,u){for(var f=0,e=t.length;f<e;f++)r(n,t[f],i,u);return i}function kt(n,t,i,r,f){var o,e,s,c,l,h=ft(n),a=h.length;if(!r&&h.length===1){if(e=h[0]=h[0].slice(0),e.length>2&&(s=e[0]).type==="ID"&&t.nodeType===9&&!f&&u.relative[e[1].type]){if(t=u.find.ID(s.matches[0].replace(v,""),t,f)[0],!t)return i;n=n.slice(e.shift().length)}for(o=rt.POS.test(n)?-1:e.length-1;o>=0;o--){if(s=e[o],u.relative[c=s.type])break;if((l=u.find[c])&&(r=l(s.matches[0].replace(v,""),vt.test(e[0].type)&&t.parentNode||t,f))){if(e.splice(o,1),n=r.length&&e.join(""),!n)return p.apply(i,w.call(r,0)),i;break}}}return ht(n,h)(r,t,f,i,vt.test(n)),i}function hi(){}var ot,st,u,d,g,dt,ht,ct,b,nt,gt=!0,c="undefined",e=("sizcache"+Math.random()).replace(".",""),ni=String,s=n.document,o=s.documentElement,tt=0,ci=0,li=[].pop,p=[].push,w=[].slice,ti=[].indexOf||function(n){for(var t=0,i=this.length;t<i;t++)if(this[t]===n)return t;return-1},h=function(n,t){return n[e]=t==null||t,n},lt=function(){var n={},t=[];return h(function(i,r){return t.push(i)>u.cacheLength&&delete n[t.shift()],n[i]=r},n)},ii=lt(),ri=lt(),ui=lt(),f="[\\x20\\t\\r\\n\\f]",a="(?:\\\\.|[-\\w]|[^\\x00-\\xa0])+",ai=a.replace("w","w#"),fi="\\["+f+"*("+a+")"+f+"*(?:([*^$|!~]?=)"+f+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+ai+")|)|)"+f+"*\\]",at=":("+a+")(?:\\((?:(['\"])((?:\\\\.|[^\\\\])*?)\\2|([^()[\\]]*|(?:(?:"+fi+")|[^:]|\\\\.)*|.*))\\)|)",ei=":(even|odd|eq|gt|lt|nth|first|last)(?:\\("+f+"*((?:-\\d)?\\d*)"+f+"*\\)|)(?=[^-]|$)",it=new RegExp("^"+f+"+|((?:^|[^\\\\])(?:\\\\.)*)"+f+"+$","g"),vi=new RegExp("^"+f+"*,"+f+"*"),yi=new RegExp("^"+f+"*([\\x20\\t\\r\\n\\f>+~])"+f+"*"),pi=new RegExp(at),wi=/^(?:#([\w\-]+)|(\w+)|\.([\w\-]+))$/,vt=/[\x20\t\r\n\f]*[+~]/,bi=/h\d/i,ki=/input|select|textarea|button/i,v=/\\(?!\\)/g,rt={ID:new RegExp("^#("+a+")"),CLASS:new RegExp("^\\.("+a+")"),NAME:new RegExp("^\\[name=['\"]?("+a+")['\"]?\\]"),TAG:new RegExp("^("+a.replace("w","w*")+")"),ATTR:new RegExp("^"+fi),PSEUDO:new RegExp("^"+at),POS:new RegExp(ei,"i"),CHILD:new RegExp("^:(only|nth|first|last)-child(?:\\("+f+"*(even|odd|(([+-]|)(\\d*)n|)"+f+"*(?:([+-]|)"+f+"*(\\d+)|))"+f+"*\\)|)","i"),needsContext:new RegExp("^"+f+"*[>+~]|"+ei,"i")},l=function(n){var t=s.createElement("div");try{return n(t)}catch(i){return!1}finally{t=null}},di=l(function(n){return n.appendChild(s.createComment("")),!n.getElementsByTagName("*").length}),gi=l(function(n){return n.innerHTML="<a href='#'><\/a>",n.firstChild&&typeof n.firstChild.getAttribute!==c&&n.firstChild.getAttribute("href")==="#"}),nr=l(function(n){n.innerHTML="<select><\/select>";var t=typeof n.lastChild.getAttribute("multiple");return t!=="boolean"&&t!=="string"}),oi=l(function(n){return(n.innerHTML="<div class='hidden e'><\/div><div class='hidden'><\/div>",!n.getElementsByClassName||!n.getElementsByClassName("e").length)?!1:(n.lastChild.className="e",n.getElementsByClassName("e").length===2)}),tr=l(function(n){n.id=e+0;n.innerHTML="<a name='"+e+"'><\/a><div name='"+e+"'><\/div>";o.insertBefore(n,o.firstChild);var t=s.getElementsByName&&s.getElementsByName(e).length===2+s.getElementsByName(e+0).length;return st=!s.getElementById(e),o.removeChild(n),t});try{w.call(o.childNodes,0)[0].nodeType}catch(ur){w=function(n){for(var t,i=[];t=this[n];n++)i.push(t);return i}}r.matches=function(n,t){return r(n,null,null,t)};r.matchesSelector=function(n,t){return r(t,null,null,[n]).length>0};d=r.getText=function(n){var r,i="",u=0,t=n.nodeType;if(t){if(t===1||t===9||t===11){if(typeof n.textContent=="string")return n.textContent;for(n=n.firstChild;n;n=n.nextSibling)i+=d(n)}else if(t===3||t===4)return n.nodeValue}else for(;r=n[u];u++)i+=d(r);return i};g=r.isXML=function(n){var t=n&&(n.ownerDocument||n).documentElement;return t?t.nodeName!=="HTML":!1};dt=r.contains=o.contains?function(n,t){var r=n.nodeType===9?n.documentElement:n,i=t&&t.parentNode;return n===i||!!(i&&i.nodeType===1&&r.contains&&r.contains(i))}:o.compareDocumentPosition?function(n,t){return t&&!!(n.compareDocumentPosition(t)&16)}:function(n,t){while(t=t.parentNode)if(t===n)return!0;return!1};r.attr=function(n,t){var i,r=g(n);return(r||(t=t.toLowerCase()),i=u.attrHandle[t])?i(n):r||nr?n.getAttribute(t):(i=n.getAttributeNode(t),i?typeof n[t]=="boolean"?n[t]?t:null:i.specified?i.value:null:null)};u=r.selectors={cacheLength:50,createPseudo:h,match:rt,attrHandle:gi?{}:{href:function(n){return n.getAttribute("href",2)},type:function(n){return n.getAttribute("type")}},find:{ID:st?function(n,t,i){if(typeof t.getElementById!==c&&!i){var r=t.getElementById(n);return r&&r.parentNode?[r]:[]}}:function(n,i,r){if(typeof i.getElementById!==c&&!r){var u=i.getElementById(n);return u?u.id===n||typeof u.getAttributeNode!==c&&u.getAttributeNode("id").value===n?[u]:t:[]}},TAG:di?function(n,t){if(typeof t.getElementsByTagName!==c)return t.getElementsByTagName(n)}:function(n,t){var f=t.getElementsByTagName(n),i,r,u;if(n==="*"){for(r=[],u=0;i=f[u];u++)i.nodeType===1&&r.push(i);return r}return f},NAME:tr&&function(n,t){if(typeof t.getElementsByName!==c)return t.getElementsByName(name)},CLASS:oi&&function(n,t,i){if(typeof t.getElementsByClassName!==c&&!i)return t.getElementsByClassName(n)}},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(n){return n[1]=n[1].replace(v,""),n[3]=(n[4]||n[5]||"").replace(v,""),n[2]==="~="&&(n[3]=" "+n[3]+" "),n.slice(0,4)},CHILD:function(n){return n[1]=n[1].toLowerCase(),n[1]==="nth"?(n[2]||r.error(n[0]),n[3]=+(n[3]?n[4]+(n[5]||1):2*(n[2]==="even"||n[2]==="odd")),n[4]=+(n[6]+n[7]||n[2]==="odd")):n[2]&&r.error(n[0]),n},PSEUDO:function(n){var t,i;return rt.CHILD.test(n[0])?null:(n[3]?n[2]=n[3]:(t=n[4])&&(pi.test(t)&&(i=ft(t,!0))&&(i=t.indexOf(")",t.length-i)-t.length)&&(t=t.slice(0,i),n[0]=n[0].slice(0,i)),n[2]=t),n.slice(0,3))}},filter:{ID:st?function(n){return n=n.replace(v,""),function(t){return t.getAttribute("id")===n}}:function(n){return n=n.replace(v,""),function(t){var i=typeof t.getAttributeNode!==c&&t.getAttributeNode("id");return i&&i.value===n}},TAG:function(n){return n==="*"?function(){return!0}:(n=n.replace(v,"").toLowerCase(),function(t){return t.nodeName&&t.nodeName.toLowerCase()===n})},CLASS:function(n){var t=ii[e][n];return t||(t=ii(n,new RegExp("(^|"+f+")"+n+"("+f+"|$)"))),function(n){return t.test(n.className||typeof n.getAttribute!==c&&n.getAttribute("class")||"")}},ATTR:function(n,t,i){return function(u){var f=r.attr(u,n);return f==null?t==="!=":t?(f+="",t==="="?f===i:t==="!="?f!==i:t==="^="?i&&f.indexOf(i)===0:t==="*="?i&&f.indexOf(i)>-1:t==="$="?i&&f.substr(f.length-i.length)===i:t==="~="?(" "+f+" ").indexOf(i)>-1:t==="|="?f===i||f.substr(0,i.length+1)===i+"-":!1):!0}},CHILD:function(n,t,i,r){return n==="nth"?function(n){var t,u,f=n.parentNode;if(i===1&&r===0)return!0;if(f)for(u=0,t=f.firstChild;t;t=t.nextSibling)if(t.nodeType===1&&(u++,n===t))break;return u-=r,u===i||u%i==0&&u/i>=0}:function(t){var i=t;switch(n){case"only":case"first":while(i=i.previousSibling)if(i.nodeType===1)return!1;if(n==="first")return!0;i=t;case"last":while(i=i.nextSibling)if(i.nodeType===1)return!1;return!0}}},PSEUDO:function(n,t){var f,i=u.pseudos[n]||u.setFilters[n.toLowerCase()]||r.error("unsupported pseudo: "+n);return i[e]?i(t):i.length>1?(f=[n,n,"",t],u.setFilters.hasOwnProperty(n.toLowerCase())?h(function(n,r){for(var u,f=i(n,t),e=f.length;e--;)u=ti.call(n,f[e]),n[u]=!(r[u]=f[e])}):function(n){return i(n,0,f)}):i}},pseudos:{not:h(function(n){var i=[],r=[],t=ht(n.replace(it,"$1"));return t[e]?h(function(n,i,r,u){for(var e,o=t(n,null,u,[]),f=n.length;f--;)(e=o[f])&&(n[f]=!(i[f]=e))}):function(n,u,f){return i[0]=n,t(i,null,f,r),!r.pop()}}),has:h(function(n){return function(t){return r(n,t).length>0}}),contains:h(function(n){return function(t){return(t.textContent||t.innerText||d(t)).indexOf(n)>-1}}),enabled:function(n){return n.disabled===!1},disabled:function(n){return n.disabled===!0},checked:function(n){var t=n.nodeName.toLowerCase();return t==="input"&&!!n.checked||t==="option"&&!!n.selected},selected:function(n){return n.parentNode&&n.parentNode.selectedIndex,n.selected===!0},parent:function(n){return!u.pseudos.empty(n)},empty:function(n){var t;for(n=n.firstChild;n;){if(n.nodeName>"@"||(t=n.nodeType)===3||t===4)return!1;n=n.nextSibling}return!0},header:function(n){return bi.test(n.nodeName)},text:function(n){var t,i;return n.nodeName.toLowerCase()==="input"&&(t=n.type)==="text"&&((i=n.getAttribute("type"))==null||i.toLowerCase()===t)},radio:k("radio"),checkbox:k("checkbox"),file:k("file"),password:k("password"),image:k("image"),submit:si("submit"),reset:si("reset"),button:function(n){var t=n.nodeName.toLowerCase();return t==="input"&&n.type==="button"||t==="button"},input:function(n){return ki.test(n.nodeName)},focus:function(n){var t=n.ownerDocument;return n===t.activeElement&&(!t.hasFocus||t.hasFocus())&&!!(n.type||n.href)},active:function(n){return n===n.ownerDocument.activeElement},first:y(function(){return[0]}),last:y(function(n,t){return[t-1]}),eq:y(function(n,t,i){return[i<0?i+t:i]}),even:y(function(n,t){for(var i=0;i<t;i+=2)n.push(i);return n}),odd:y(function(n,t){for(var i=1;i<t;i+=2)n.push(i);return n}),lt:y(function(n,t,i){for(var r=i<0?i+t:i;--r>=0;)n.push(r);return n}),gt:y(function(n,t,i){for(var r=i<0?i+t:i;++r<t;)n.push(r);return n})}};ct=o.compareDocumentPosition?function(n,t){return n===t?(b=!0,0):(!n.compareDocumentPosition||!t.compareDocumentPosition?n.compareDocumentPosition:n.compareDocumentPosition(t)&4)?-1:1}:function(n,t){var i;if(n===t)return b=!0,0;if(n.sourceIndex&&t.sourceIndex)return n.sourceIndex-t.sourceIndex;var e,h,u=[],f=[],o=n.parentNode,s=t.parentNode,r=o;if(o===s)return ut(n,t);if(o){if(!s)return 1}else return-1;while(r)u.unshift(r),r=r.parentNode;for(r=s;r;)f.unshift(r),r=r.parentNode;for(e=u.length,h=f.length,i=0;i<e&&i<h;i++)if(u[i]!==f[i])return ut(u[i],f[i]);return i===e?ut(n,f[i],-1):ut(u[i],t,1)};[0,0].sort(ct);gt=!b;r.uniqueSort=function(n){var i,t=1;if(b=gt,n.sort(ct),b)for(;i=n[t];t++)i===n[t-1]&&n.splice(t--,1);return n};r.error=function(n){throw new Error("Syntax error, unrecognized expression: "+n);};ht=r.compile=function(n,t){var r,u=[],f=[],i=ui[e][n];if(!i){for(t||(t=ft(n)),r=t.length;r--;)i=bt(t[r]),i[e]?u.push(i):f.push(i);i=ui(n,ir(f,u))}return i};s.querySelectorAll&&function(){var u,s=kt,h=/'|\\/g,c=/\=[\x20\t\r\n\f]*([^'"\]]*)[\x20\t\r\n\f]*\]/g,n=[":focus"],t=[":active",":focus"],i=o.matchesSelector||o.mozMatchesSelector||o.webkitMatchesSelector||o.oMatchesSelector||o.msMatchesSelector;l(function(t){t.innerHTML="<select><option selected=''><\/option><\/select>";t.querySelectorAll("[selected]").length||n.push("\\["+f+"*(?:checked|disabled|ismap|multiple|readonly|selected|value)");t.querySelectorAll(":checked").length||n.push(":checked")});l(function(t){t.innerHTML="<p test=''><\/p>";t.querySelectorAll("[test^='']").length&&n.push("[*^$]="+f+"*(?:\"\"|'')");t.innerHTML="<input type='hidden'/>";t.querySelectorAll(":enabled").length||n.push(":enabled",":disabled")});n=new RegExp(n.join("|"));kt=function(t,i,r,u,f){if(!u&&!f&&(!n||!n.test(t))){var o,l,a=!0,c=e,y=i,v=i.nodeType===9&&t;if(i.nodeType===1&&i.nodeName.toLowerCase()!=="object"){for(o=ft(t),(a=i.getAttribute("id"))?c=a.replace(h,"\\$&"):i.setAttribute("id",c),c="[id='"+c+"'] ",l=o.length;l--;)o[l]=c+o[l].join("");y=vt.test(t)&&i.parentNode||i;v=o.join(",")}if(v)try{return p.apply(r,w.call(y.querySelectorAll(v),0)),r}catch(b){}finally{a||i.removeAttribute("id")}}return s(t,i,r,u,f)};i&&(l(function(n){u=i.call(n,"div");try{i.call(n,"[test!='']:sizzle");t.push("!=",at)}catch(r){}}),t=new RegExp(t.join("|")),r.matchesSelector=function(f,e){if(e=e.replace(c,"='$1']"),!g(f)&&!t.test(e)&&(!n||!n.test(e)))try{var o=i.call(f,e);if(o||u||f.document&&f.document.nodeType!==11)return o}catch(s){}return r(e,null,null,[f]).length>0})}();u.pseudos.nth=u.pseudos.eq;u.filters=hi.prototype=u.pseudos;u.setFilters=new hi;r.attr=i.attr;i.find=r;i.expr=r.selectors;i.expr[":"]=i.expr.pseudos;i.unique=r.uniqueSort;i.text=r.getText;i.isXMLDoc=r.isXML;i.contains=r.contains}(n);var bf=/Until$/,kf=/^(?:parents|prev(?:Until|All))/,df=/^.[^:#\[\.,]*$/,gi=i.expr.match.needsContext,gf={children:!0,contents:!0,next:!0,prev:!0};i.fn.extend({find:function(n){var t,f,o,u,e,r,s=this;if(typeof n!="string")return i(n).filter(function(){for(t=0,f=s.length;t<f;t++)if(i.contains(s[t],this))return!0});for(r=this.pushStack("","find",n),t=0,f=this.length;t<f;t++)if(o=r.length,i.find(n,this[t],r),t>0)for(u=o;u<r.length;u++)for(e=0;e<o;e++)if(r[e]===r[u]){r.splice(u--,1);break}return r},has:function(n){var t,r=i(n,this),u=r.length;return this.filter(function(){for(t=0;t<u;t++)if(i.contains(this,r[t]))return!0})},not:function(n){return this.pushStack(tr(this,n,!1),"not",n)},filter:function(n){return this.pushStack(tr(this,n,!0),"filter",n)},is:function(n){return!!n&&(typeof n=="string"?gi.test(n)?i(n,this.context).index(this[0])>=0:i.filter(n,this).length>0:this.filter(n).length>0)},closest:function(n,t){for(var r,f=0,o=this.length,u=[],e=gi.test(n)||typeof n!="string"?i(n,t||this.context):0;f<o;f++)for(r=this[f];r&&r.ownerDocument&&r!==t&&r.nodeType!==11;){if(e?e.index(r)>-1:i.find.matchesSelector(r,n)){u.push(r);break}r=r.parentNode}return u=u.length>1?i.unique(u):u,this.pushStack(u,"closest",n)},index:function(n){return n?typeof n=="string"?i.inArray(this[0],i(n)):i.inArray(n.jquery?n[0]:n,this):this[0]&&this[0].parentNode?this.prevAll().length:-1},add:function(n,t){var u=typeof n=="string"?i(n,t):i.makeArray(n&&n.nodeType?[n]:n),r=i.merge(this.get(),u);return this.pushStack(b(u[0])||b(r[0])?r:i.unique(r))},addBack:function(n){return this.add(n==null?this.prevObject:this.prevObject.filter(n))}});i.fn.andSelf=i.fn.addBack;i.each({parent:function(n){var t=n.parentNode;return t&&t.nodeType!==11?t:null},parents:function(n){return i.dir(n,"parentNode")},parentsUntil:function(n,t,r){return i.dir(n,"parentNode",r)},next:function(n){return nr(n,"nextSibling")},prev:function(n){return nr(n,"previousSibling")},nextAll:function(n){return i.dir(n,"nextSibling")},prevAll:function(n){return i.dir(n,"previousSibling")},nextUntil:function(n,t,r){return i.dir(n,"nextSibling",r)},prevUntil:function(n,t,r){return i.dir(n,"previousSibling",r)},siblings:function(n){return i.sibling((n.parentNode||{}).firstChild,n)},children:function(n){return i.sibling(n.firstChild)},contents:function(n){return i.nodeName(n,"iframe")?n.contentDocument||n.contentWindow.document:i.merge([],n.childNodes)}},function(n,t){i.fn[n]=function(r,u){var f=i.map(this,t,r);return bf.test(n)||(u=r),u&&typeof u=="string"&&(f=i.filter(u,f)),f=this.length>1&&!gf[n]?i.unique(f):f,this.length>1&&kf.test(n)&&(f=f.reverse()),this.pushStack(f,n,o.call(arguments).join(","))}});i.extend({filter:function(n,t,r){return r&&(n=":not("+n+")"),t.length===1?i.find.matchesSelector(t[0],n)?[t[0]]:[]:i.find.matches(n,t)},dir:function(n,r,u){for(var e=[],f=n[r];f&&f.nodeType!==9&&(u===t||f.nodeType!==1||!i(f).is(u));)f.nodeType===1&&e.push(f),f=f[r];return e},sibling:function(n,t){for(var i=[];n;n=n.nextSibling)n.nodeType===1&&n!==t&&i.push(n);return i}});var rr="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",ne=/ jQuery\d+="(?:null|\d+)"/g,bt=/^\s+/,ur=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,fr=/<([\w:]+)/,te=/<tbody/i,ie=/<|&#?\w+;/,re=/<(?:script|style|link)/i,ue=/<(?:script|object|embed|option|style)/i,kt=new RegExp("<(?:"+rr+")[\\s/>]","i"),er=/^(?:checkbox|radio)$/,or=/checked\s*(?:[^=]|=\s*.checked.)/i,fe=/\/(java|ecma)script/i,ee=/^\s*<!(?:\[CDATA\[|\-\-)|[\]\-]{2}>\s*$/g,e={option:[1,"<select multiple='multiple'>","<\/select>"],legend:[1,"<fieldset>","<\/fieldset>"],thead:[1,"<table>","<\/table>"],tr:[2,"<table><tbody>","<\/tbody><\/table>"],td:[3,"<table><tbody><tr>","<\/tr><\/tbody><\/table>"],col:[2,"<table><tbody><\/tbody><colgroup>","<\/colgroup><\/table>"],area:[1,"<map>","<\/map>"],_default:[0,"",""]},sr=ir(r),dt=sr.appendChild(r.createElement("div"));e.optgroup=e.option;e.tbody=e.tfoot=e.colgroup=e.caption=e.thead;e.th=e.td;i.support.htmlSerialize||(e._default=[1,"X<div>","<\/div>"]);i.fn.extend({text:function(n){return i.access(this,function(n){return n===t?i.text(this):this.empty().append((this[0]&&this[0].ownerDocument||r).createTextNode(n))},null,n,arguments.length)},wrapAll:function(n){if(i.isFunction(n))return this.each(function(t){i(this).wrapAll(n.call(this,t))});if(this[0]){var t=i(n,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&t.insertBefore(this[0]);t.map(function(){for(var n=this;n.firstChild&&n.firstChild.nodeType===1;)n=n.firstChild;return n}).append(this)}return this},wrapInner:function(n){return i.isFunction(n)?this.each(function(t){i(this).wrapInner(n.call(this,t))}):this.each(function(){var t=i(this),r=t.contents();r.length?r.wrapAll(n):t.append(n)})},wrap:function(n){var t=i.isFunction(n);return this.each(function(r){i(this).wrapAll(t?n.call(this,r):n)})},unwrap:function(){return this.parent().each(function(){i.nodeName(this,"body")||i(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(n){(this.nodeType===1||this.nodeType===11)&&this.appendChild(n)})},prepend:function(){return this.domManip(arguments,!0,function(n){(this.nodeType===1||this.nodeType===11)&&this.insertBefore(n,this.firstChild)})},before:function(){if(!b(this[0]))return this.domManip(arguments,!1,function(n){this.parentNode.insertBefore(n,this)});if(arguments.length){var n=i.clean(arguments);return this.pushStack(i.merge(n,this),"before",this.selector)}},after:function(){if(!b(this[0]))return this.domManip(arguments,!1,function(n){this.parentNode.insertBefore(n,this.nextSibling)});if(arguments.length){var n=i.clean(arguments);return this.pushStack(i.merge(this,n),"after",this.selector)}},remove:function(n,t){for(var r,u=0;(r=this[u])!=null;u++)(!n||i.filter(n,[r]).length)&&(t||r.nodeType!==1||(i.cleanData(r.getElementsByTagName("*")),i.cleanData([r])),r.parentNode&&r.parentNode.removeChild(r));return this},empty:function(){for(var n,t=0;(n=this[t])!=null;t++)for(n.nodeType===1&&i.cleanData(n.getElementsByTagName("*"));n.firstChild;)n.removeChild(n.firstChild);return this},clone:function(n,t){return n=n==null?!1:n,t=t==null?n:t,this.map(function(){return i.clone(this,n,t)})},html:function(n){return i.access(this,function(n){var r=this[0]||{},u=0,f=this.length;if(n===t)return r.nodeType===1?r.innerHTML.replace(ne,""):t;if(typeof n=="string"&&!re.test(n)&&(i.support.htmlSerialize||!kt.test(n))&&(i.support.leadingWhitespace||!bt.test(n))&&!e[(fr.exec(n)||["",""])[1].toLowerCase()]){n=n.replace(ur,"<$1><\/$2>");try{for(;u<f;u++)r=this[u]||{},r.nodeType===1&&(i.cleanData(r.getElementsByTagName("*")),r.innerHTML=n);r=0}catch(o){}}r&&this.empty().append(n)},null,n,arguments.length)},replaceWith:function(n){return b(this[0])?this.length?this.pushStack(i(i.isFunction(n)?n():n),"replaceWith",n):this:i.isFunction(n)?this.each(function(t){var r=i(this),u=r.html();r.replaceWith(n.call(this,t,u))}):(typeof n!="string"&&(n=i(n).detach()),this.each(function(){var t=this.nextSibling,r=this.parentNode;i(this).remove();t?i(t).before(n):i(r).append(n)}))},detach:function(n){return this.remove(n,!0)},domManip:function(n,r,u){n=[].concat.apply([],n);var h,o,f,a,e=0,s=n[0],c=[],l=this.length;if(!i.support.checkClone&&l>1&&typeof s=="string"&&or.test(s))return this.each(function(){i(this).domManip(n,r,u)});if(i.isFunction(s))return this.each(function(f){var e=i(this);n[0]=s.call(this,f,r?e.html():t);e.domManip(n,r,u)});if(this[0]){if(h=i.buildFragment(n,this,c),f=h.fragment,o=f.firstChild,f.childNodes.length===1&&(f=o),o)for(r=r&&i.nodeName(o,"tr"),a=h.cacheable||l-1;e<l;e++)u.call(r&&i.nodeName(this[e],"table")?oe(this[e],"tbody"):this[e],e===a?f:i.clone(f,!0,!0));f=o=null;c.length&&i.each(c,function(n,t){t.src?i.ajax?i.ajax({url:t.src,type:"GET",dataType:"script",async:!1,global:!1,throws:!0}):i.error("no ajax"):i.globalEval((t.text||t.textContent||t.innerHTML||"").replace(ee,""));t.parentNode&&t.parentNode.removeChild(t)})}return this}});i.buildFragment=function(n,u,f){var o,s,h,e=n[0];return u=u||r,u=!u.nodeType&&u[0]||u,u=u.ownerDocument||u,n.length===1&&typeof e=="string"&&e.length<512&&u===r&&e.charAt(0)==="<"&&!ue.test(e)&&(i.support.checkClone||!or.test(e))&&(i.support.html5Clone||!kt.test(e))&&(s=!0,o=i.fragments[e],h=o!==t),o||(o=u.createDocumentFragment(),i.clean(n,u,o,f),s&&(i.fragments[e]=h&&o)),{fragment:o,cacheable:s}};i.fragments={};i.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(n,t){i.fn[n]=function(r){var o,u=0,s=[],f=i(r),h=f.length,e=this.length===1&&this[0].parentNode;if((e==null||e&&e.nodeType===11&&e.childNodes.length===1)&&h===1)return f[t](this[0]),this;for(;u<h;u++)o=(u>0?this.clone(!0):this).get(),i(f[u])[t](o),s=s.concat(o);return this.pushStack(s,n,f.selector)}});i.extend({clone:function(n,t,r){var f,o,u,e;if(i.support.html5Clone||i.isXMLDoc(n)||!kt.test("<"+n.nodeName+">")?e=n.cloneNode(!0):(dt.innerHTML=n.outerHTML,dt.removeChild(e=dt.firstChild)),(!i.support.noCloneEvent||!i.support.noCloneChecked)&&(n.nodeType===1||n.nodeType===11)&&!i.isXMLDoc(n))for(cr(n,e),f=it(n),o=it(e),u=0;f[u];++u)o[u]&&cr(f[u],o[u]);if(t&&(hr(n,e),r))for(f=it(n),o=it(e),u=0;f[u];++u)hr(f[u],o[u]);return f=o=null,e},clean:function(n,t,u,f){var h,c,o,p,v,d,s,w,a,b,k,y=t===r&&sr,l=[];for(t&&typeof t.createDocumentFragment!="undefined"||(t=r),h=0;(o=n[h])!=null;h++)if(typeof o=="number"&&(o+=""),o){if(typeof o=="string")if(ie.test(o)){for(y=y||ir(t),s=t.createElement("div"),y.appendChild(s),o=o.replace(ur,"<$1><\/$2>"),p=(fr.exec(o)||["",""])[1].toLowerCase(),v=e[p]||e._default,d=v[0],s.innerHTML=v[1]+o+v[2];d--;)s=s.lastChild;if(!i.support.tbody)for(w=te.test(o),a=p==="table"&&!w?s.firstChild&&s.firstChild.childNodes:v[1]==="<table>"&&!w?s.childNodes:[],c=a.length-1;c>=0;--c)i.nodeName(a[c],"tbody")&&!a[c].childNodes.length&&a[c].parentNode.removeChild(a[c]);!i.support.leadingWhitespace&&bt.test(o)&&s.insertBefore(t.createTextNode(bt.exec(o)[0]),s.firstChild);o=s.childNodes;s.parentNode.removeChild(s)}else o=t.createTextNode(o);o.nodeType?l.push(o):i.merge(l,o)}if(s&&(o=s=y=null),!i.support.appendChecked)for(h=0;(o=l[h])!=null;h++)i.nodeName(o,"input")?lr(o):typeof o.getElementsByTagName!="undefined"&&i.grep(o.getElementsByTagName("input"),lr);if(u)for(b=function(n){if(!n.type||fe.test(n.type))return f?f.push(n.parentNode?n.parentNode.removeChild(n):n):u.appendChild(n)},h=0;(o=l[h])!=null;h++)i.nodeName(o,"script")&&b(o)||(u.appendChild(o),typeof o.getElementsByTagName!="undefined"&&(k=i.grep(i.merge([],o.getElementsByTagName("script")),b),l.splice.apply(l,[h+1,0].concat(k)),h+=k.length));return l},cleanData:function(n,t){for(var f,u,r,e,h=0,o=i.expando,s=i.cache,c=i.support.deleteExpando,l=i.event.special;(r=n[h])!=null;h++)if((t||i.acceptData(r))&&(u=r[o],f=u&&s[u],f)){if(f.events)for(e in f.events)l[e]?i.event.remove(r,e):i.removeEvent(r,e,f.handle);s[u]&&(delete s[u],c?delete r[o]:r.removeAttribute?r.removeAttribute(o):r[o]=null,i.deletedIds.push(u))}}}),function(){var t,n;i.uaMatch=function(n){n=n.toLowerCase();var t=/(chrome)[ \/]([\w.]+)/.exec(n)||/(webkit)[ \/]([\w.]+)/.exec(n)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(n)||/(msie) ([\w.]+)/.exec(n)||n.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(n)||[];return{browser:t[1]||"",version:t[2]||"0"}};t=i.uaMatch(pu.userAgent);n={};t.browser&&(n[t.browser]=!0,n.version=t.version);n.chrome?n.webkit=!0:n.webkit&&(n.safari=!0);i.browser=n;i.sub=function(){function n(t,i){return new n.fn.init(t,i)}i.extend(!0,n,this);n.superclass=this;n.fn=n.prototype=this();n.fn.constructor=n;n.sub=this.sub;n.fn.init=function(r,u){return u&&u instanceof i&&!(u instanceof n)&&(u=n(u)),i.fn.init.call(this,r,u,t)};n.fn.init.prototype=n.fn;var t=n(r);return n}}();var u,v,y,gt=/alpha\([^)]*\)/i,se=/opacity=([^)]*)/,he=/^(top|right|bottom|left)$/,ce=/^(none|table(?!-c[ea]).+)/,ar=/^margin/,le=new RegExp("^("+g+")(.*)$","i"),rt=new RegExp("^("+g+")(?!px)[a-z%]+$","i"),ae=new RegExp("^([-+])=("+g+")","i"),ni={},ve={position:"absolute",visibility:"hidden",display:"block"},vr={letterSpacing:0,fontWeight:400},c=["Top","Right","Bottom","Left"],yr=["Webkit","O","Moz","ms"],ye=i.fn.toggle;i.fn.extend({css:function(n,r){return i.access(this,function(n,r,u){return u!==t?i.style(n,r,u):i.css(n,r)},n,r,arguments.length>1)},show:function(){return wr(this,!0)},hide:function(){return wr(this)},toggle:function(n,t){var r=typeof n=="boolean";return i.isFunction(n)&&i.isFunction(t)?ye.apply(this,arguments):this.each(function(){(r?n:ut(this))?i(this).show():i(this).hide()})}});i.extend({cssHooks:{opacity:{get:function(n,t){if(t){var i=u(n,"opacity");return i===""?"1":i}}}},cssNumber:{fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{float:i.support.cssFloat?"cssFloat":"styleFloat"},style:function(n,r,u,f){if(n&&n.nodeType!==3&&n.nodeType!==8&&n.style){var o,s,e,h=i.camelCase(r),c=n.style;if(r=i.cssProps[h]||(i.cssProps[h]=pr(c,h)),e=i.cssHooks[r]||i.cssHooks[h],u!==t){if(s=typeof u,s==="string"&&(o=ae.exec(u))&&(u=(o[1]+1)*o[2]+parseFloat(i.css(n,r)),s="number"),u==null||s==="number"&&isNaN(u))return;if(s!=="number"||i.cssNumber[h]||(u+="px"),!e||!("set"in e)||(u=e.set(n,u,f))!==t)try{c[r]=u}catch(l){}}else return e&&"get"in e&&(o=e.get(n,!1,f))!==t?o:c[r]}},css:function(n,r,f,e){var o,c,s,h=i.camelCase(r);return(r=i.cssProps[h]||(i.cssProps[h]=pr(n.style,h)),s=i.cssHooks[r]||i.cssHooks[h],s&&"get"in s&&(o=s.get(n,!0,e)),o===t&&(o=u(n,r)),o==="normal"&&r in vr&&(o=vr[r]),f||e!==t)?(c=parseFloat(o),f||i.isNumeric(c)?c||0:o):o},swap:function(n,t,i){var u,r,f={};for(r in t)f[r]=n.style[r],n.style[r]=t[r];u=i.call(n);for(r in t)n.style[r]=f[r];return u}});n.getComputedStyle?u=function(t,r){var f,o,s,h,e=n.getComputedStyle(t,null),u=t.style;return e&&(f=e[r],f!==""||i.contains(t.ownerDocument,t)||(f=i.style(t,r)),rt.test(f)&&ar.test(r)&&(o=u.width,s=u.minWidth,h=u.maxWidth,u.minWidth=u.maxWidth=u.width=f,f=e.width,u.width=o,u.minWidth=s,u.maxWidth=h)),f}:r.documentElement.currentStyle&&(u=function(n,t){var f,u,i=n.currentStyle&&n.currentStyle[t],r=n.style;return i==null&&r&&r[t]&&(i=r[t]),rt.test(i)&&!he.test(t)&&(f=r.left,u=n.runtimeStyle&&n.runtimeStyle.left,u&&(n.runtimeStyle.left=n.currentStyle.left),r.left=t==="fontSize"?"1em":i,i=r.pixelLeft+"px",r.left=f,u&&(n.runtimeStyle.left=u)),i===""?"auto":i});i.each(["height","width"],function(n,t){i.cssHooks[t]={get:function(n,r,f){if(r)return n.offsetWidth===0&&ce.test(u(n,"display"))?i.swap(n,ve,function(){return dr(n,t,f)}):dr(n,t,f)},set:function(n,r,u){return br(n,r,u?kr(n,t,u,i.support.boxSizing&&i.css(n,"boxSizing")==="border-box"):0)}}});i.support.opacity||(i.cssHooks.opacity={get:function(n,t){return se.test((t&&n.currentStyle?n.currentStyle.filter:n.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":t?"1":""},set:function(n,t){var r=n.style,u=n.currentStyle,e=i.isNumeric(t)?"alpha(opacity="+t*100+")":"",f=u&&u.filter||r.filter||"";(r.zoom=1,t>=1&&i.trim(f.replace(gt,""))===""&&r.removeAttribute&&(r.removeAttribute("filter"),u&&!u.filter))||(r.filter=gt.test(f)?f.replace(gt,e):f+" "+e)}});i(function(){i.support.reliableMarginRight||(i.cssHooks.marginRight={get:function(n,t){return i.swap(n,{display:"inline-block"},function(){if(t)return u(n,"marginRight")})}});!i.support.pixelPosition&&i.fn.position&&i.each(["top","left"],function(n,t){i.cssHooks[t]={get:function(n,r){if(r){var f=u(n,t);return rt.test(f)?i(n).position()[t]+"px":f}}}})});i.expr&&i.expr.filters&&(i.expr.filters.hidden=function(n){return n.offsetWidth===0&&n.offsetHeight===0||!i.support.reliableHiddenOffsets&&(n.style&&n.style.display||u(n,"display"))==="none"},i.expr.filters.visible=function(n){return!i.expr.filters.hidden(n)});i.each({margin:"",padding:"",border:"Width"},function(n,t){i.cssHooks[n+t]={expand:function(i){for(var u=typeof i=="string"?i.split(" "):[i],f={},r=0;r<4;r++)f[n+c[r]+t]=u[r]||u[r-2]||u[0];return f}};ar.test(n)||(i.cssHooks[n+t].set=br)});var pe=/%20/g,we=/\[\]$/,nu=/\r?\n/g,be=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,ke=/^(?:select|textarea)/i;i.fn.extend({serialize:function(){return i.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?i.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||ke.test(this.nodeName)||be.test(this.type))}).map(function(n,t){var r=i(this).val();return r==null?null:i.isArray(r)?i.map(r,function(n){return{name:t.name,value:n.replace(nu,"\r\n")}}):{name:t.name,value:r.replace(nu,"\r\n")}}).get()}});i.param=function(n,r){var u,f=[],e=function(n,t){t=i.isFunction(t)?t():t==null?"":t;f[f.length]=encodeURIComponent(n)+"="+encodeURIComponent(t)};if(r===t&&(r=i.ajaxSettings&&i.ajaxSettings.traditional),i.isArray(n)||n.jquery&&!i.isPlainObject(n))i.each(n,function(){e(this.name,this.value)});else for(u in n)ti(u,n[u],r,e);return f.join("&").replace(pe,"+")};var p,l,de=/#.*$/,ge=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,no=/^(?:GET|HEAD)$/,to=/^\/\//,tu=/\?/,io=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,ro=/([?&])_=[^&]*/,iu=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,ru=i.fn.load,ii={},uu={},fu=["*/"]+["*"];try{l=yu.href}catch(po){l=r.createElement("a");l.href="";l=l.href}p=iu.exec(l.toLowerCase())||[];i.fn.load=function(n,r,u){if(typeof n!="string"&&ru)return ru.apply(this,arguments);if(!this.length)return this;var f,o,s,h=this,e=n.indexOf(" ");return e>=0&&(f=n.slice(e,n.length),n=n.slice(0,e)),i.isFunction(r)?(u=r,r=t):r&&typeof r=="object"&&(o="POST"),i.ajax({url:n,type:o,dataType:"html",data:r,complete:function(n,t){u&&h.each(u,s||[n.responseText,t,n])}}).done(function(n){s=arguments;h.html(f?i("<div>").append(n.replace(io,"")).find(f):n)}),this};i.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(n,t){i.fn[t]=function(n){return this.on(t,n)}});i.each(["get","post"],function(n,r){i[r]=function(n,u,f,e){return i.isFunction(u)&&(e=e||f,f=u,u=t),i.ajax({type:r,url:n,data:u,success:f,dataType:e})}});i.extend({getScript:function(n,r){return i.get(n,t,r,"script")},getJSON:function(n,t,r){return i.get(n,t,r,"json")},ajaxSetup:function(n,t){return t?ou(n,i.ajaxSettings):(t=n,n=i.ajaxSettings),ou(n,t),n},ajaxSettings:{url:l,isLocal:/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/.test(p[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded; charset=UTF-8",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":fu},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":n.String,"text html":!0,"text json":i.parseJSON,"text xml":i.parseXML},flatOptions:{context:!0,url:!0}},ajaxPrefilter:eu(ii),ajaxTransport:eu(uu),ajax:function(n,r){function b(n,r,h,l){var a,tt,b,it,p,y=r;e!==2&&(e=2,d&&clearTimeout(d),c=t,k=l||"",f.readyState=n>0?4:0,h&&(it=uo(u,f,h)),n>=200&&n<300||n===304?(u.ifModified&&(p=f.getResponseHeader("Last-Modified"),p&&(i.lastModified[o]=p),p=f.getResponseHeader("Etag"),p&&(i.etag[o]=p)),n===304?(y="notmodified",a=!0):(a=fo(u,it),y=a.state,tt=a.data,b=a.error,a=!b)):(b=y,(!y||n)&&(y="error",n<0&&(n=0))),f.status=n,f.statusText=(r||y)+"",a?nt.resolveWith(s,[tt,y,f]):nt.rejectWith(s,[f,y,b]),f.statusCode(w),w=t,v&&g.trigger("ajax"+(a?"Success":"Error"),[f,u,a?tt:b]),rt.fireWith(s,[f,y]),v&&(g.trigger("ajaxComplete",[f,u]),--i.active||i.event.trigger("ajaxStop")))}var tt,it;typeof n=="object"&&(r=n,n=t);r=r||{};var o,k,y,c,d,a,v,l,u=i.ajaxSetup({},r),s=u.context||u,g=s!==u&&(s.nodeType||s instanceof i)?i(s):i.event,nt=i.Deferred(),rt=i.Callbacks("once memory"),w=u.statusCode||{},ut={},et={},e=0,ot="canceled",f={readyState:0,setRequestHeader:function(n,t){if(!e){var i=n.toLowerCase();n=et[i]=et[i]||n;ut[n]=t}return this},getAllResponseHeaders:function(){return e===2?k:null},getResponseHeader:function(n){var i;if(e===2){if(!y)for(y={};i=ge.exec(k);)y[i[1].toLowerCase()]=i[2];i=y[n.toLowerCase()]}return i===t?null:i},overrideMimeType:function(n){return e||(u.mimeType=n),this},abort:function(n){return n=n||ot,c&&c.abort(n),b(0,n),this}};if(nt.promise(f),f.success=f.done,f.error=f.fail,f.complete=rt.add,f.statusCode=function(n){if(n){var t;if(e<2)for(t in n)w[t]=[w[t],n[t]];else t=n[f.status],f.always(t)}return this},u.url=((n||u.url)+"").replace(de,"").replace(to,p[1]+"//"),u.dataTypes=i.trim(u.dataType||"*").toLowerCase().split(h),u.crossDomain==null&&(a=iu.exec(u.url.toLowerCase())||!1,u.crossDomain=a&&a.join(":")+(a[3]?"":a[1]==="http:"?80:443)!==p.join(":")+(p[3]?"":p[1]==="http:"?80:443)),u.data&&u.processData&&typeof u.data!="string"&&(u.data=i.param(u.data,u.traditional)),ft(ii,u,r,f),e===2)return f;v=u.global;u.type=u.type.toUpperCase();u.hasContent=!no.test(u.type);v&&i.active++==0&&i.event.trigger("ajaxStart");u.hasContent||(u.data&&(u.url+=(tu.test(u.url)?"&":"?")+u.data,delete u.data),o=u.url,u.cache===!1&&(tt=i.now(),it=u.url.replace(ro,"$1_="+tt),u.url=it+(it===u.url?(tu.test(u.url)?"&":"?")+"_="+tt:"")));(u.data&&u.hasContent&&u.contentType!==!1||r.contentType)&&f.setRequestHeader("Content-Type",u.contentType);u.ifModified&&(o=o||u.url,i.lastModified[o]&&f.setRequestHeader("If-Modified-Since",i.lastModified[o]),i.etag[o]&&f.setRequestHeader("If-None-Match",i.etag[o]));f.setRequestHeader("Accept",u.dataTypes[0]&&u.accepts[u.dataTypes[0]]?u.accepts[u.dataTypes[0]]+(u.dataTypes[0]!=="*"?", "+fu+"; q=0.01":""):u.accepts["*"]);for(l in u.headers)f.setRequestHeader(l,u.headers[l]);if(u.beforeSend&&(u.beforeSend.call(s,f,u)===!1||e===2))return f.abort();ot="abort";for(l in{success:1,error:1,complete:1})f[l](u[l]);if(c=ft(uu,u,r,f),c){f.readyState=1;v&&g.trigger("ajaxSend",[f,u]);u.async&&u.timeout>0&&(d=setTimeout(function(){f.abort("timeout")},u.timeout));try{e=1;c.send(ut,b)}catch(st){if(e<2)b(-1,st);else throw st;}}else b(-1,"No Transport");return f},active:0,lastModified:{},etag:{}});var su=[],eo=/\?/,et=/(=)\?(?=&|$)|\?\?/,oo=i.now();i.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var n=su.pop()||i.expando+"_"+oo++;return this[n]=!0,n}});i.ajaxPrefilter("json jsonp",function(r,u,f){var e,s,o,h=r.data,c=r.url,l=r.jsonp!==!1,a=l&&et.test(c),v=l&&!a&&typeof h=="string"&&!(r.contentType||"").indexOf("application/x-www-form-urlencoded")&&et.test(h);if(r.dataTypes[0]==="jsonp"||a||v)return e=r.jsonpCallback=i.isFunction(r.jsonpCallback)?r.jsonpCallback():r.jsonpCallback,s=n[e],a?r.url=c.replace(et,"$1"+e):v?r.data=h.replace(et,"$1"+e):l&&(r.url+=(eo.test(c)?"&":"?")+r.jsonp+"="+e),r.converters["script json"]=function(){return o||i.error(e+" was not called"),o[0]},r.dataTypes[0]="json",n[e]=function(){o=arguments},f.always(function(){n[e]=s;r[e]&&(r.jsonpCallback=u.jsonpCallback,su.push(e));o&&i.isFunction(s)&&s(o[0]);o=s=t}),"script"});i.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(n){return i.globalEval(n),n}}});i.ajaxPrefilter("script",function(n){n.cache===t&&(n.cache=!1);n.crossDomain&&(n.type="GET",n.global=!1)});i.ajaxTransport("script",function(n){if(n.crossDomain){var i,u=r.head||r.getElementsByTagName("head")[0]||r.documentElement;return{send:function(f,e){i=r.createElement("script");i.async="async";n.scriptCharset&&(i.charset=n.scriptCharset);i.src=n.url;i.onload=i.onreadystatechange=function(n,r){(r||!i.readyState||/loaded|complete/.test(i.readyState))&&(i.onload=i.onreadystatechange=null,u&&i.parentNode&&u.removeChild(i),i=t,r||e(200,"success"))};u.insertBefore(i,u.firstChild)},abort:function(){if(i)i.onload(0,1)}}}});ot=n.ActiveXObject?function(){for(var n in w)w[n](0,1)}:!1;hu=0;i.ajaxSettings.xhr=n.ActiveXObject?function(){return!this.isLocal&&cu()||so()}:cu,function(n){i.extend(i.support,{ajax:!!n,cors:!!n&&"withCredentials"in n})}(i.ajaxSettings.xhr());i.support.ajax&&i.ajaxTransport(function(r){if(!r.crossDomain||i.support.cors){var u;return{send:function(f,e){var h,s,o=r.xhr();if(r.username?o.open(r.type,r.url,r.async,r.username,r.password):o.open(r.type,r.url,r.async),r.xhrFields)for(s in r.xhrFields)o[s]=r.xhrFields[s];r.mimeType&&o.overrideMimeType&&o.overrideMimeType(r.mimeType);r.crossDomain||f["X-Requested-With"]||(f["X-Requested-With"]="XMLHttpRequest");try{for(s in f)o.setRequestHeader(s,f[s])}catch(c){}o.send(r.hasContent&&r.data||null);u=function(n,f){var s,a,v,c,l;try{if(u&&(f||o.readyState===4))if(u=t,h&&(o.onreadystatechange=i.noop,ot&&delete w[h]),f)o.readyState!==4&&o.abort();else{s=o.status;v=o.getAllResponseHeaders();c={};l=o.responseXML;l&&l.documentElement&&(c.xml=l);try{c.text=o.responseText}catch(n){}try{a=o.statusText}catch(p){a=""}s||!r.isLocal||r.crossDomain?s===1223&&(s=204):s=c.text?200:404}}catch(y){f||e(-1,y)}c&&e(s,a,c,v)};r.async?o.readyState===4?setTimeout(u,0):(h=++hu,ot&&(w||(w={},i(n).unload(ot)),w[h]=u),o.onreadystatechange=u):u()},abort:function(){u&&u(0,1)}}}});var st,ht,ho=/^(?:toggle|show|hide)$/,co=new RegExp("^(?:([-+])=|)("+g+")([a-z%]*)$","i"),lo=/queueHooks$/,ct=[yo],k={"*":[function(n,t){var o,s,r=this.createTween(n,t),e=co.exec(t),h=r.cur(),u=+h||0,f=1,c=20;if(e){if(o=+e[2],s=e[3]||(i.cssNumber[n]?"":"px"),s!=="px"&&u){u=i.css(r.elem,n,!0)||o||1;do f=f||".5",u=u/f,i.style(r.elem,n,u+s);while(f!==(f=r.cur()/h)&&f!==1&&--c)}r.unit=s;r.start=u;r.end=e[1]?u+(e[1]+1)*o:o}return r}]};i.Animation=i.extend(au,{tweener:function(n,t){i.isFunction(n)?(t=n,n=["*"]):n=n.split(" ");for(var r,u=0,f=n.length;u<f;u++)r=n[u],k[r]=k[r]||[],k[r].unshift(t)},prefilter:function(n,t){t?ct.unshift(n):ct.push(n)}});i.Tween=f;f.prototype={constructor:f,init:function(n,t,r,u,f,e){this.elem=n;this.prop=r;this.easing=f||"swing";this.options=t;this.start=this.now=this.cur();this.end=u;this.unit=e||(i.cssNumber[r]?"":"px")},cur:function(){var n=f.propHooks[this.prop];return n&&n.get?n.get(this):f.propHooks._default.get(this)},run:function(n){var t,r=f.propHooks[this.prop];return this.pos=this.options.duration?t=i.easing[this.easing](n,this.options.duration*n,0,1,this.options.duration):t=n,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),r&&r.set?r.set(this):f.propHooks._default.set(this),this}};f.prototype.init.prototype=f.prototype;f.propHooks={_default:{get:function(n){var t;return n.elem[n.prop]!=null&&(!n.elem.style||n.elem.style[n.prop]==null)?n.elem[n.prop]:(t=i.css(n.elem,n.prop,!1,""),!t||t==="auto"?0:t)},set:function(n){i.fx.step[n.prop]?i.fx.step[n.prop](n):n.elem.style&&(n.elem.style[i.cssProps[n.prop]]!=null||i.cssHooks[n.prop])?i.style(n.elem,n.prop,n.now+n.unit):n.elem[n.prop]=n.now}}};f.propHooks.scrollTop=f.propHooks.scrollLeft={set:function(n){n.elem.nodeType&&n.elem.parentNode&&(n.elem[n.prop]=n.now)}};i.each(["toggle","show","hide"],function(n,t){var r=i.fn[t];i.fn[t]=function(u,f,e){return u==null||typeof u=="boolean"||!n&&i.isFunction(u)&&i.isFunction(f)?r.apply(this,arguments):this.animate(lt(t,!0),u,f,e)}});i.fn.extend({fadeTo:function(n,t,i,r){return this.filter(ut).css("opacity",0).show().end().animate({opacity:t},n,i,r)},animate:function(n,t,r,u){var e=i.isEmptyObject(n),f=i.speed(t,r,u),o=function(){var t=au(this,i.extend({},n),f);e&&t.stop(!0)};return e||f.queue===!1?this.each(o):this.queue(f.queue,o)},stop:function(n,r,u){var f=function(n){var t=n.stop;delete n.stop;t(u)};return typeof n!="string"&&(u=r,r=n,n=t),r&&n!==!1&&this.queue(n||"fx",[]),this.each(function(){var o=!0,t=n!=null&&n+"queueHooks",e=i.timers,r=i._data(this);if(t)r[t]&&r[t].stop&&f(r[t]);else for(t in r)r[t]&&r[t].stop&&lo.test(t)&&f(r[t]);for(t=e.length;t--;)e[t].elem===this&&(n==null||e[t].queue===n)&&(e[t].anim.stop(u),o=!1,e.splice(t,1));(o||!u)&&i.dequeue(this,n)})}});i.each({slideDown:lt("show"),slideUp:lt("hide"),slideToggle:lt("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(n,t){i.fn[n]=function(n,i,r){return this.animate(t,n,i,r)}});i.speed=function(n,t,r){var u=n&&typeof n=="object"?i.extend({},n):{complete:r||!r&&t||i.isFunction(n)&&n,duration:n,easing:r&&t||t&&!i.isFunction(t)&&t};return u.duration=i.fx.off?0:typeof u.duration=="number"?u.duration:u.duration in i.fx.speeds?i.fx.speeds[u.duration]:i.fx.speeds._default,(u.queue==null||u.queue===!0)&&(u.queue="fx"),u.old=u.complete,u.complete=function(){i.isFunction(u.old)&&u.old.call(this);u.queue&&i.dequeue(this,u.queue)},u};i.easing={linear:function(n){return n},swing:function(n){return.5-Math.cos(n*Math.PI)/2}};i.timers=[];i.fx=f.prototype.init;i.fx.tick=function(){for(var r,n=i.timers,t=0;t<n.length;t++)r=n[t],r()||n[t]!==r||n.splice(t--,1);n.length||i.fx.stop()};i.fx.timer=function(n){n()&&i.timers.push(n)&&!ht&&(ht=setInterval(i.fx.tick,i.fx.interval))};i.fx.interval=13;i.fx.stop=function(){clearInterval(ht);ht=null};i.fx.speeds={slow:600,fast:200,_default:400};i.fx.step={};i.expr&&i.expr.filters&&(i.expr.filters.animated=function(n){return i.grep(i.timers,function(t){return n===t.elem}).length});ri=/^(?:body|html)$/i;i.fn.offset=function(n){if(arguments.length)return n===t?this:this.each(function(t){i.offset.setOffset(this,n,t)});var u,o,s,h,c,l,a,f={top:0,left:0},r=this[0],e=r&&r.ownerDocument;if(e)return(o=e.body)===r?i.offset.bodyOffset(r):(u=e.documentElement,!i.contains(u,r))?f:(typeof r.getBoundingClientRect!="undefined"&&(f=r.getBoundingClientRect()),s=vu(e),h=u.clientTop||o.clientTop||0,c=u.clientLeft||o.clientLeft||0,l=s.pageYOffset||u.scrollTop,a=s.pageXOffset||u.scrollLeft,{top:f.top+l-h,left:f.left+a-c})};i.offset={bodyOffset:function(n){var t=n.offsetTop,r=n.offsetLeft;return i.support.doesNotIncludeMarginInBodyOffset&&(t+=parseFloat(i.css(n,"marginTop"))||0,r+=parseFloat(i.css(n,"marginLeft"))||0),{top:t,left:r}},setOffset:function(n,t,r){var f=i.css(n,"position");f==="static"&&(n.style.position="relative");var e=i(n),o=e.offset(),l=i.css(n,"top"),a=i.css(n,"left"),v=(f==="absolute"||f==="fixed")&&i.inArray("auto",[l,a])>-1,u={},s={},h,c;v?(s=e.position(),h=s.top,c=s.left):(h=parseFloat(l)||0,c=parseFloat(a)||0);i.isFunction(t)&&(t=t.call(n,r,o));t.top!=null&&(u.top=t.top-o.top+h);t.left!=null&&(u.left=t.left-o.left+c);"using"in t?t.using.call(n,u):e.css(u)}};i.fn.extend({position:function(){if(this[0]){var u=this[0],n=this.offsetParent(),t=this.offset(),r=ri.test(n[0].nodeName)?{top:0,left:0}:n.offset();return t.top-=parseFloat(i.css(u,"marginTop"))||0,t.left-=parseFloat(i.css(u,"marginLeft"))||0,r.top+=parseFloat(i.css(n[0],"borderTopWidth"))||0,r.left+=parseFloat(i.css(n[0],"borderLeftWidth"))||0,{top:t.top-r.top,left:t.left-r.left}}},offsetParent:function(){return this.map(function(){for(var n=this.offsetParent||r.body;n&&!ri.test(n.nodeName)&&i.css(n,"position")==="static";)n=n.offsetParent;return n||r.body})}});i.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(n,r){var u=/Y/.test(r);i.fn[n]=function(f){return i.access(this,function(n,f,e){var o=vu(n);if(e===t)return o?r in o?o[r]:o.document.documentElement[f]:n[f];o?o.scrollTo(u?i(o).scrollLeft():e,u?e:i(o).scrollTop()):n[f]=e},n,f,arguments.length,null)}});i.each({Height:"height",Width:"width"},function(n,r){i.each({padding:"inner"+n,content:r,"":"outer"+n},function(u,f){i.fn[f]=function(f,e){var o=arguments.length&&(u||typeof f!="boolean"),s=u||(f===!0||e===!0?"margin":"border");return i.access(this,function(r,u,f){var e;return i.isWindow(r)?r.document.documentElement["client"+n]:r.nodeType===9?(e=r.documentElement,Math.max(r.body["scroll"+n],e["scroll"+n],r.body["offset"+n],e["offset"+n],e["client"+n])):f===t?i.css(r,u,f,s):i.style(r,u,f,s)},r,o?f:t,o,null)}})});n.jQuery=n.$=i;typeof define=="function"&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return i})})(window);!function(n){"use strict";n(function(){n.support.transition=function(){var n=function(){var i=document.createElement("bootstrap"),t={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"},n;for(n in t)if(i.style[n]!==undefined)return t[n]}();return n&&{end:n}}()})}(window.jQuery);!function(n){"use strict";var i='[data-dismiss="alert"]',t=function(t){n(t).on("click",i,this.close)},r;t.prototype.close=function(t){function f(){i.trigger("closed").remove()}var u=n(this),r=u.attr("data-target"),i;(r||(r=u.attr("href"),r=r&&r.replace(/.*(?=#[^\s]*$)/,"")),i=n(r),t&&t.preventDefault(),i.length||(i=u.hasClass("alert")?u:u.parent()),i.trigger(t=n.Event("close")),t.isDefaultPrevented())||(i.removeClass("in"),n.support.transition&&i.hasClass("fade")?i.on(n.support.transition.end,f):f())};r=n.fn.alert;n.fn.alert=function(i){return this.each(function(){var r=n(this),u=r.data("alert");u||r.data("alert",u=new t(this));typeof i=="string"&&u[i].call(r)})};n.fn.alert.Constructor=t;n.fn.alert.noConflict=function(){return n.fn.alert=r,this};n(document).on("click.alert.data-api",i,t.prototype.close)}(window.jQuery);!function(n){"use strict";var t=function(t,i){this.$element=n(t);this.options=n.extend({},n.fn.button.defaults,i)},i;t.prototype.setState=function(n){var i="disabled",t=this.$element,r=t.data(),u=t.is("input")?"val":"html";n=n+"Text";r.resetText||t.data("resetText",t[u]());t[u](r[n]||this.options[n]);setTimeout(function(){n=="loadingText"?t.addClass(i).attr(i,i):t.removeClass(i).removeAttr(i)},0)};t.prototype.toggle=function(){var n=this.$element.closest('[data-toggle="buttons-radio"]');n&&n.find(".active").removeClass("active");this.$element.toggleClass("active")};i=n.fn.button;n.fn.button=function(i){return this.each(function(){var u=n(this),r=u.data("button"),f=typeof i=="object"&&i;r||u.data("button",r=new t(this,f));i=="toggle"?r.toggle():i&&r.setState(i)})};n.fn.button.defaults={loadingText:"loading..."};n.fn.button.Constructor=t;n.fn.button.noConflict=function(){return n.fn.button=i,this};n(document).on("click.button.data-api","[data-toggle^=button]",function(t){var i=n(t.target);i.hasClass("btn")||(i=i.closest(".btn"));i.button("toggle")})}(window.jQuery);!function(n){"use strict";var t=function(t,i){this.$element=n(t);this.$indicators=this.$element.find(".carousel-indicators");this.options=i;this.options.pause=="hover"&&this.$element.on("mouseenter",n.proxy(this.pause,this)).on("mouseleave",n.proxy(this.cycle,this))},i;t.prototype={cycle:function(t){return t||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(n.proxy(this.next,this),this.options.interval)),this},getActiveIndex:function(){return this.$active=this.$element.find(".item.active"),this.$items=this.$active.parent().children(),this.$items.index(this.$active)},to:function(t){var i=this.getActiveIndex(),r=this;if(!(t>this.$items.length-1)&&!(t<0))return this.sliding?this.$element.one("slid",function(){r.to(t)}):i==t?this.pause().cycle():this.slide(t>i?"next":"prev",n(this.$items[t]))},pause:function(t){return t||(this.paused=!0),this.$element.find(".next, .prev").length&&n.support.transition.end&&(this.$element.trigger(n.support.transition.end),this.cycle(!0)),clearInterval(this.interval),this.interval=null,this},next:function(){if(!this.sliding)return this.slide("next")},prev:function(){if(!this.sliding)return this.slide("prev")},slide:function(t,i){var e=this.$element.find(".item.active"),r=i||e[t](),s=this.interval,u=t=="next"?"left":"right",h=t=="next"?"first":"last",o=this,f;if(this.sliding=!0,s&&this.pause(),r=r.length?r:this.$element.find(".item")[h](),f=n.Event("slide",{relatedTarget:r[0],direction:u}),!r.hasClass("active")){if(this.$indicators.length){this.$indicators.find(".active").removeClass("active");this.$element.one("slid",function(){var t=n(o.$indicators.children()[o.getActiveIndex()]);t&&t.addClass("active")})}if(n.support.transition&&this.$element.hasClass("slide")){if(this.$element.trigger(f),f.isDefaultPrevented())return;r.addClass(t);r[0].offsetWidth;e.addClass(u);r.addClass(u);this.$element.one(n.support.transition.end,function(){r.removeClass([t,u].join(" ")).addClass("active");e.removeClass(["active",u].join(" "));o.sliding=!1;setTimeout(function(){o.$element.trigger("slid")},0)})}else{if(this.$element.trigger(f),f.isDefaultPrevented())return;e.removeClass("active");r.addClass("active");this.sliding=!1;this.$element.trigger("slid")}return s&&this.cycle(),this}}};i=n.fn.carousel;n.fn.carousel=function(i){return this.each(function(){var f=n(this),r=f.data("carousel"),u=n.extend({},n.fn.carousel.defaults,typeof i=="object"&&i),e=typeof i=="string"?i:u.slide;r||f.data("carousel",r=new t(this,u));typeof i=="number"?r.to(i):e?r[e]():u.interval&&r.pause().cycle()})};n.fn.carousel.defaults={interval:5e3,pause:"hover"};n.fn.carousel.Constructor=t;n.fn.carousel.noConflict=function(){return n.fn.carousel=i,this};n(document).on("click.carousel.data-api","[data-slide], [data-slide-to]",function(t){var i=n(this),u,r=n(i.attr("data-target")||(u=i.attr("href"))&&u.replace(/.*(?=#[^\s]+$)/,"")),e=n.extend({},r.data(),i.data()),f;r.carousel(e);(f=i.attr("data-slide-to"))&&r.data("carousel").pause().to(f).cycle();t.preventDefault()})}(window.jQuery);!function(n){"use strict";var t=function(t,i){this.$element=n(t);this.options=n.extend({},n.fn.collapse.defaults,i);this.options.parent&&(this.$parent=n(this.options.parent));this.options.toggle&&this.toggle()},i;t.prototype={constructor:t,dimension:function(){var n=this.$element.hasClass("width");return n?"width":"height"},show:function(){var i,u,t,r;if(!this.transitioning&&!this.$element.hasClass("in")){if(i=this.dimension(),u=n.camelCase(["scroll",i].join("-")),t=this.$parent&&this.$parent.find("> .accordion-group > .in"),t&&t.length){if(r=t.data("collapse"),r&&r.transitioning)return;t.collapse("hide");r||t.data("collapse",null)}this.$element[i](0);this.transition("addClass",n.Event("show"),"shown");n.support.transition&&this.$element[i](this.$element[0][u])}},hide:function(){var t;!this.transitioning&&this.$element.hasClass("in")&&(t=this.dimension(),this.reset(this.$element[t]()),this.transition("removeClass",n.Event("hide"),"hidden"),this.$element[t](0))},reset:function(n){var t=this.dimension();return this.$element.removeClass("collapse")[t](n||"auto")[0].offsetWidth,this.$element[n!==null?"addClass":"removeClass"]("collapse"),this},transition:function(t,i,r){var u=this,f=function(){i.type=="show"&&u.reset();u.transitioning=0;u.$element.trigger(r)};(this.$element.trigger(i),i.isDefaultPrevented())||(this.transitioning=1,this.$element[t]("in"),n.support.transition&&this.$element.hasClass("collapse")?this.$element.one(n.support.transition.end,f):f())},toggle:function(){this[this.$element.hasClass("in")?"hide":"show"]()}};i=n.fn.collapse;n.fn.collapse=function(i){return this.each(function(){var r=n(this),u=r.data("collapse"),f=n.extend({},n.fn.collapse.defaults,r.data(),typeof i=="object"&&i);u||r.data("collapse",u=new t(this,f));typeof i=="string"&&u[i]()})};n.fn.collapse.defaults={toggle:!0};n.fn.collapse.Constructor=t;n.fn.collapse.noConflict=function(){return n.fn.collapse=i,this};n(document).on("click.collapse.data-api","[data-toggle=collapse]",function(t){var i=n(this),u,r=i.attr("data-target")||t.preventDefault()||(u=i.attr("href"))&&u.replace(/.*(?=#[^\s]+$)/,""),f=n(r).data("collapse")?"toggle":i.data();i[n(r).hasClass("in")?"addClass":"removeClass"]("collapsed");n(r).collapse(f)})}(window.jQuery);!function(n){"use strict";function r(){n(".dropdown-backdrop").remove();n(i).each(function(){u(n(this)).removeClass("open")})}function u(t){var i=t.attr("data-target"),r;return i||(i=t.attr("href"),i=i&&/#/.test(i)&&i.replace(/.*(?=#[^\s]*$)/,"")),r=i&&n(i),r&&r.length||(r=t.parent()),r}var i="[data-toggle=dropdown]",t=function(t){var i=n(t).on("click.dropdown.data-api",this.toggle);n("html").on("click.dropdown.data-api",function(){i.parent().removeClass("open")})},f;t.prototype={constructor:t,toggle:function(){var t=n(this),i,f;if(!t.is(".disabled, :disabled")){if(i=u(t),f=i.hasClass("open"),r(),!f){if("ontouchstart"in document.documentElement)n('<div class="dropdown-backdrop"/>').insertBefore(n(this)).on("click",r);i.toggleClass("open")}return t.focus(),!1}},keydown:function(t){var e,f,o,s,r;if(/(38|40|27)/.test(t.keyCode)&&(e=n(this),t.preventDefault(),t.stopPropagation(),!e.is(".disabled, :disabled"))){if(o=u(e),s=o.hasClass("open"),!s||s&&t.keyCode==27)return t.which==27&&o.find(i).focus(),e.click();(f=n("[role=menu] li:not(.divider):visible a",o),f.length)&&(r=f.index(f.filter(":focus")),t.keyCode==38&&r>0&&r--,t.keyCode==40&&r<f.length-1&&r++,~r||(r=0),f.eq(r).focus())}}};f=n.fn.dropdown;n.fn.dropdown=function(i){return this.each(function(){var r=n(this),u=r.data("dropdown");u||r.data("dropdown",u=new t(this));typeof i=="string"&&u[i].call(r)})};n.fn.dropdown.Constructor=t;n.fn.dropdown.noConflict=function(){return n.fn.dropdown=f,this};n(document).on("click.dropdown.data-api",r).on("click.dropdown.data-api",".dropdown form",function(n){n.stopPropagation()}).on("click.dropdown.data-api",i,t.prototype.toggle).on("keydown.dropdown.data-api",i+", [role=menu]",t.prototype.keydown)}(window.jQuery);!function(n){"use strict";var t=function(t,i){this.options=i;this.$element=n(t).delegate('[data-dismiss="modal"]',"click.dismiss.modal",n.proxy(this.hide,this));this.options.remote&&this.$element.find(".modal-body").load(this.options.remote)},i;t.prototype={constructor:t,toggle:function(){return this[this.isShown?"hide":"show"]()},show:function(){var t=this,i=n.Event("show");(this.$element.trigger(i),this.isShown||i.isDefaultPrevented())||(this.isShown=!0,this.escape(),this.backdrop(function(){var i=n.support.transition&&t.$element.hasClass("fade");t.$element.parent().length||t.$element.appendTo(document.body);t.$element.show();i&&t.$element[0].offsetWidth;t.$element.addClass("in").attr("aria-hidden",!1);t.enforceFocus();i?t.$element.one(n.support.transition.end,function(){t.$element.focus().trigger("shown")}):t.$element.focus().trigger("shown")}))},hide:function(t){t&&t.preventDefault();var i=this;(t=n.Event("hide"),this.$element.trigger(t),this.isShown&&!t.isDefaultPrevented())&&(this.isShown=!1,this.escape(),n(document).off("focusin.modal"),this.$element.removeClass("in").attr("aria-hidden",!0),n.support.transition&&this.$element.hasClass("fade")?this.hideWithTransition():this.hideModal())},enforceFocus:function(){var t=this;n(document).on("focusin.modal",function(n){t.$element[0]===n.target||t.$element.has(n.target).length||t.$element.focus()})},escape:function(){var n=this;if(this.isShown&&this.options.keyboard)this.$element.on("keyup.dismiss.modal",function(t){t.which==27&&n.hide()});else this.isShown||this.$element.off("keyup.dismiss.modal")},hideWithTransition:function(){var t=this,i=setTimeout(function(){t.$element.off(n.support.transition.end);t.hideModal()},500);this.$element.one(n.support.transition.end,function(){clearTimeout(i);t.hideModal()})},hideModal:function(){var n=this;this.$element.hide();this.backdrop(function(){n.removeBackdrop();n.$element.trigger("hidden")})},removeBackdrop:function(){this.$backdrop&&this.$backdrop.remove();this.$backdrop=null},backdrop:function(t){var u=this,r=this.$element.hasClass("fade")?"fade":"",i;if(this.isShown&&this.options.backdrop){if(i=n.support.transition&&r,this.$backdrop=n('<div class="modal-backdrop '+r+'" />').appendTo(document.body),this.$backdrop.click(this.options.backdrop=="static"?n.proxy(this.$element[0].focus,this.$element[0]):n.proxy(this.hide,this)),i&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),!t)return;i?this.$backdrop.one(n.support.transition.end,t):t()}else!this.isShown&&this.$backdrop?(this.$backdrop.removeClass("in"),n.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one(n.support.transition.end,t):t()):t&&t()}};i=n.fn.modal;n.fn.modal=function(i){return this.each(function(){var u=n(this),r=u.data("modal"),f=n.extend({},n.fn.modal.defaults,u.data(),typeof i=="object"&&i);r||u.data("modal",r=new t(this,f));typeof i=="string"?r[i]():f.show&&r.show()})};n.fn.modal.defaults={backdrop:!0,keyboard:!0,show:!0};n.fn.modal.Constructor=t;n.fn.modal.noConflict=function(){return n.fn.modal=i,this};n(document).on("click.modal.data-api",'[data-toggle="modal"]',function(t){var i=n(this),r=i.attr("href"),u=n(i.attr("data-target")||r&&r.replace(/.*(?=#[^\s]+$)/,"")),f=u.data("modal")?"toggle":n.extend({remote:!/#/.test(r)&&r},u.data(),i.data());t.preventDefault();u.modal(f).one("hide",function(){i.focus()})})}(window.jQuery);!function(n){"use strict";var t=function(n,t){this.init("tooltip",n,t)},i;t.prototype={constructor:t,init:function(t,i,r){var o,s,f,u,e;for(this.type=t,this.$element=n(i),this.options=this.getOptions(r),this.enabled=!0,f=this.options.trigger.split(" "),e=f.length;e--;)if(u=f[e],u=="click")this.$element.on("click."+this.type,this.options.selector,n.proxy(this.toggle,this));else if(u!="manual"){o=u=="hover"?"mouseenter":"focus";s=u=="hover"?"mouseleave":"blur";this.$element.on(o+"."+this.type,this.options.selector,n.proxy(this.enter,this));this.$element.on(s+"."+this.type,this.options.selector,n.proxy(this.leave,this))}this.options.selector?this._options=n.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},getOptions:function(t){return t=n.extend({},n.fn[this.type].defaults,this.$element.data(),t),t.delay&&typeof t.delay=="number"&&(t.delay={show:t.delay,hide:t.delay}),t},enter:function(t){var u=n.fn[this.type].defaults,r={},i;if(this._options&&n.each(this._options,function(n,t){u[n]!=t&&(r[n]=t)},this),i=n(t.currentTarget)[this.type](r).data(this.type),!i.options.delay||!i.options.delay.show)return i.show();clearTimeout(this.timeout);i.hoverState="in";this.timeout=setTimeout(function(){i.hoverState=="in"&&i.show()},i.options.delay.show)},leave:function(t){var i=n(t.currentTarget)[this.type](this._options).data(this.type);if(this.timeout&&clearTimeout(this.timeout),!i.options.delay||!i.options.delay.hide)return i.hide();i.hoverState="out";this.timeout=setTimeout(function(){i.hoverState=="out"&&i.hide()},i.options.delay.hide)},show:function(){var i,t,u,f,e,r,o=n.Event("show");if(this.hasContent()&&this.enabled){if(this.$element.trigger(o),o.isDefaultPrevented())return;i=this.tip();this.setContent();this.options.animation&&i.addClass("fade");e=typeof this.options.placement=="function"?this.options.placement.call(this,i[0],this.$element[0]):this.options.placement;i.detach().css({top:0,left:0,display:"block"});this.options.container?i.appendTo(this.options.container):i.insertAfter(this.$element);t=this.getPosition();u=i[0].offsetWidth;f=i[0].offsetHeight;switch(e){case"bottom":r={top:t.top+t.height,left:t.left+t.width/2-u/2};break;case"top":r={top:t.top-f,left:t.left+t.width/2-u/2};break;case"left":r={top:t.top+t.height/2-f/2,left:t.left-u};break;case"right":r={top:t.top+t.height/2-f/2,left:t.left+t.width}}this.applyPlacement(r,e);this.$element.trigger("shown")}},applyPlacement:function(n,t){var i=this.tip(),s=i[0].offsetWidth,f=i[0].offsetHeight,u,r,e,o;i.offset(n).addClass(t).addClass("in");u=i[0].offsetWidth;r=i[0].offsetHeight;t=="top"&&r!=f&&(n.top=n.top+f-r,o=!0);t=="bottom"||t=="top"?(e=0,n.left<0&&(e=n.left*-2,n.left=0,i.offset(n),u=i[0].offsetWidth,r=i[0].offsetHeight),this.replaceArrow(e-s+u,u,"left")):this.replaceArrow(r-f,r,"top");o&&i.offset(n)},replaceArrow:function(n,t,i){this.arrow().css(i,n?50*(1-n/t)+"%":"")},setContent:function(){var n=this.tip(),t=this.getTitle();n.find(".tooltip-inner")[this.options.html?"html":"text"](t);n.removeClass("fade in top bottom left right")},hide:function(){function r(){var i=setTimeout(function(){t.off(n.support.transition.end).detach()},500);t.one(n.support.transition.end,function(){clearTimeout(i);t.detach()})}var u=this,t=this.tip(),i=n.Event("hide");if(this.$element.trigger(i),!i.isDefaultPrevented())return t.removeClass("in"),n.support.transition&&this.$tip.hasClass("fade")?r():t.detach(),this.$element.trigger("hidden"),this},fixTitle:function(){var n=this.$element;(n.attr("title")||typeof n.attr("data-original-title")!="string")&&n.attr("data-original-title",n.attr("title")||"").attr("title","")},hasContent:function(){return this.getTitle()},getPosition:function(){var t=this.$element[0];return n.extend({},typeof t.getBoundingClientRect=="function"?t.getBoundingClientRect():{width:t.offsetWidth,height:t.offsetHeight},this.$element.offset())},getTitle:function(){var t=this.$element,n=this.options;return t.attr("data-original-title")||(typeof n.title=="function"?n.title.call(t[0]):n.title)},tip:function(){return this.$tip=this.$tip||n(this.options.template)},arrow:function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},validate:function(){this.$element[0].parentNode||(this.hide(),this.$element=null,this.options=null)},enable:function(){this.enabled=!0},disable:function(){this.enabled=!1},toggleEnabled:function(){this.enabled=!this.enabled},toggle:function(t){var i=t?n(t.currentTarget)[this.type](this._options).data(this.type):this;i.tip().hasClass("in")?i.hide():i.show()},destroy:function(){this.hide().$element.off("."+this.type).removeData(this.type)}};i=n.fn.tooltip;n.fn.tooltip=function(i){return this.each(function(){var u=n(this),r=u.data("tooltip"),f=typeof i=="object"&&i;r||u.data("tooltip",r=new t(this,f));typeof i=="string"&&r[i]()})};n.fn.tooltip.Constructor=t;n.fn.tooltip.defaults={animation:!0,placement:"top",selector:!1,template:'<div class="tooltip"><div class="tooltip-arrow"><\/div><div class="tooltip-inner"><\/div><\/div>',trigger:"hover focus",title:"",delay:0,html:!1,container:!1};n.fn.tooltip.noConflict=function(){return n.fn.tooltip=i,this}}(window.jQuery);!function(n){"use strict";var t=function(n,t){this.init("popover",n,t)},i;t.prototype=n.extend({},n.fn.tooltip.Constructor.prototype,{constructor:t,setContent:function(){var n=this.tip(),t=this.getTitle(),i=this.getContent();n.find(".popover-title")[this.options.html?"html":"text"](t);n.find(".popover-content")[this.options.html?"html":"text"](i);n.removeClass("fade top bottom left right in")},hasContent:function(){return this.getTitle()||this.getContent()},getContent:function(){var t=this.$element,n=this.options;return(typeof n.content=="function"?n.content.call(t[0]):n.content)||t.attr("data-content")},tip:function(){return this.$tip||(this.$tip=n(this.options.template)),this.$tip},destroy:function(){this.hide().$element.off("."+this.type).removeData(this.type)}});i=n.fn.popover;n.fn.popover=function(i){return this.each(function(){var u=n(this),r=u.data("popover"),f=typeof i=="object"&&i;r||u.data("popover",r=new t(this,f));typeof i=="string"&&r[i]()})};n.fn.popover.Constructor=t;n.fn.popover.defaults=n.extend({},n.fn.tooltip.defaults,{placement:"right",trigger:"click",content:"",template:'<div class="popover"><div class="arrow"><\/div><h3 class="popover-title"><\/h3><div class="popover-content"><\/div><\/div>'});n.fn.popover.noConflict=function(){return n.fn.popover=i,this}}(window.jQuery);!function(n){"use strict";function t(t,i){var u=n.proxy(this.process,this),f=n(t).is("body")?n(window):n(t),r;this.options=n.extend({},n.fn.scrollspy.defaults,i);this.$scrollElement=f.on("scroll.scroll-spy.data-api",u);this.selector=(this.options.target||(r=n(t).attr("href"))&&r.replace(/.*(?=#[^\s]+$)/,"")||"")+" .nav li > a";this.$body=n("body");this.refresh();this.process()}t.prototype={constructor:t,refresh:function(){var t=this,i;this.offsets=n([]);this.targets=n([]);i=this.$body.find(this.selector).map(function(){var u=n(this),i=u.data("target")||u.attr("href"),r=/^#\w/.test(i)&&n(i);return r&&r.length&&[[r.position().top+(!n.isWindow(t.$scrollElement.get(0))&&t.$scrollElement.scrollTop()),i]]||null}).sort(function(n,t){return n[0]-t[0]}).each(function(){t.offsets.push(this[0]);t.targets.push(this[1])})},process:function(){var i=this.$scrollElement.scrollTop()+this.options.offset,f=this.$scrollElement[0].scrollHeight||this.$body[0].scrollHeight,e=f-this.$scrollElement.height(),t=this.offsets,r=this.targets,u=this.activeTarget,n;if(i>=e)return u!=(n=r.last()[0])&&this.activate(n);for(n=t.length;n--;)u!=r[n]&&i>=t[n]&&(!t[n+1]||i<=t[n+1])&&this.activate(r[n])},activate:function(t){var i,r;this.activeTarget=t;n(this.selector).parent(".active").removeClass("active");r=this.selector+'[data-target="'+t+'"],'+this.selector+'[href="'+t+'"]';i=n(r).parent("li").addClass("active");i.parent(".dropdown-menu").length&&(i=i.closest("li.dropdown").addClass("active"));i.trigger("activate")}};var i=n.fn.scrollspy;n.fn.scrollspy=function(i){return this.each(function(){var u=n(this),r=u.data("scrollspy"),f=typeof i=="object"&&i;r||u.data("scrollspy",r=new t(this,f));typeof i=="string"&&r[i]()})};n.fn.scrollspy.Constructor=t;n.fn.scrollspy.defaults={offset:10};n.fn.scrollspy.noConflict=function(){return n.fn.scrollspy=i,this};n(window).on("load",function(){n('[data-spy="scroll"]').each(function(){var t=n(this);t.scrollspy(t.data())})})}(window.jQuery);!function(n){"use strict";var t=function(t){this.element=n(t)},i;t.prototype={constructor:t,show:function(){var t=this.element,e=t.closest("ul:not(.dropdown-menu)"),i=t.attr("data-target"),r,u,f;(i||(i=t.attr("href"),i=i&&i.replace(/.*(?=#[^\s]*$)/,"")),t.parent("li").hasClass("active"))||(r=e.find(".active:last a")[0],f=n.Event("show",{relatedTarget:r}),t.trigger(f),f.isDefaultPrevented())||(u=n(i),this.activate(t.parent("li"),e),this.activate(u,u.parent(),function(){t.trigger({type:"shown",relatedTarget:r})}))},activate:function(t,i,r){function e(){u.removeClass("active").find("> .dropdown-menu > .active").removeClass("active");t.addClass("active");f?(t[0].offsetWidth,t.addClass("in")):t.removeClass("fade");t.parent(".dropdown-menu")&&t.closest("li.dropdown").addClass("active");r&&r()}var u=i.find("> .active"),f=r&&n.support.transition&&u.hasClass("fade");f?u.one(n.support.transition.end,e):e();u.removeClass("in")}};i=n.fn.tab;n.fn.tab=function(i){return this.each(function(){var u=n(this),r=u.data("tab");r||u.data("tab",r=new t(this));typeof i=="string"&&r[i]()})};n.fn.tab.Constructor=t;n.fn.tab.noConflict=function(){return n.fn.tab=i,this};n(document).on("click.tab.data-api",'[data-toggle="tab"], [data-toggle="pill"]',function(t){t.preventDefault();n(this).tab("show")})}(window.jQuery);!function(n){"use strict";var t=function(t,i){this.$element=n(t);this.options=n.extend({},n.fn.typeahead.defaults,i);this.matcher=this.options.matcher||this.matcher;this.sorter=this.options.sorter||this.sorter;this.highlighter=this.options.highlighter||this.highlighter;this.updater=this.options.updater||this.updater;this.source=this.options.source;this.$menu=n(this.options.menu);this.shown=!1;this.listen()},i;t.prototype={constructor:t,select:function(){var n=this.$menu.find(".active").attr("data-value");return this.$element.val(this.updater(n)).change(),this.hide()},updater:function(n){return n},show:function(){var t=n.extend({},this.$element.position(),{height:this.$element[0].offsetHeight});return this.$menu.insertAfter(this.$element).css({top:t.top+t.height,left:t.left}).show(),this.shown=!0,this},hide:function(){return this.$menu.hide(),this.shown=!1,this},lookup:function(){var t;return(this.query=this.$element.val(),!this.query||this.query.length<this.options.minLength)?this.shown?this.hide():this:(t=n.isFunction(this.source)?this.source(this.query,n.proxy(this.process,this)):this.source,t?this.process(t):this)},process:function(t){var i=this;return(t=n.grep(t,function(n){return i.matcher(n)}),t=this.sorter(t),!t.length)?this.shown?this.hide():this:this.render(t.slice(0,this.options.items)).show()},matcher:function(n){return~n.toLowerCase().indexOf(this.query.toLowerCase())},sorter:function(n){for(var i=[],r=[],u=[],t;t=n.shift();)t.toLowerCase().indexOf(this.query.toLowerCase())?~t.indexOf(this.query)?r.push(t):u.push(t):i.push(t);return i.concat(r,u)},highlighter:function(n){var t=this.query.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&");return n.replace(new RegExp("("+t+")","ig"),function(n,t){return"<strong>"+t+"<\/strong>"})},render:function(t){var i=this;return t=n(t).map(function(t,r){return t=n(i.options.item).attr("data-value",r),t.find("a").html(i.highlighter(r)),t[0]}),t.first().addClass("active"),this.$menu.html(t),this},next:function(){var i=this.$menu.find(".active").removeClass("active"),t=i.next();t.length||(t=n(this.$menu.find("li")[0]));t.addClass("active")},prev:function(){var t=this.$menu.find(".active").removeClass("active"),n=t.prev();n.length||(n=this.$menu.find("li").last());n.addClass("active")},listen:function(){this.$element.on("focus",n.proxy(this.focus,this)).on("blur",n.proxy(this.blur,this)).on("keypress",n.proxy(this.keypress,this)).on("keyup",n.proxy(this.keyup,this));if(this.eventSupported("keydown"))this.$element.on("keydown",n.proxy(this.keydown,this));this.$menu.on("click",n.proxy(this.click,this)).on("mouseenter","li",n.proxy(this.mouseenter,this)).on("mouseleave","li",n.proxy(this.mouseleave,this))},eventSupported:function(n){var t=n in this.$element;return t||(this.$element.setAttribute(n,"return;"),t=typeof this.$element[n]=="function"),t},move:function(n){if(this.shown){switch(n.keyCode){case 9:case 13:case 27:n.preventDefault();break;case 38:n.preventDefault();this.prev();break;case 40:n.preventDefault();this.next()}n.stopPropagation()}},keydown:function(t){this.suppressKeyPressRepeat=~n.inArray(t.keyCode,[40,38,9,13,27]);this.move(t)},keypress:function(n){this.suppressKeyPressRepeat||this.move(n)},keyup:function(n){switch(n.keyCode){case 40:case 38:case 16:case 17:case 18:break;case 9:case 13:if(!this.shown)return;this.select();break;case 27:if(!this.shown)return;this.hide();break;default:this.lookup()}n.stopPropagation();n.preventDefault()},focus:function(){this.focused=!0},blur:function(){this.focused=!1;!this.mousedover&&this.shown&&this.hide()},click:function(n){n.stopPropagation();n.preventDefault();this.select();this.$element.focus()},mouseenter:function(t){this.mousedover=!0;this.$menu.find(".active").removeClass("active");n(t.currentTarget).addClass("active")},mouseleave:function(){this.mousedover=!1;!this.focused&&this.shown&&this.hide()}};i=n.fn.typeahead;n.fn.typeahead=function(i){return this.each(function(){var u=n(this),r=u.data("typeahead"),f=typeof i=="object"&&i;r||u.data("typeahead",r=new t(this,f));typeof i=="string"&&r[i]()})};n.fn.typeahead.defaults={source:[],items:8,menu:'<ul class="typeahead dropdown-menu"><\/ul>',item:'<li><a href="#"><\/a><\/li>',minLength:1};n.fn.typeahead.Constructor=t;n.fn.typeahead.noConflict=function(){return n.fn.typeahead=i,this};n(document).on("focus.typeahead.data-api",'[data-provide="typeahead"]',function(){var t=n(this);t.data("typeahead")||t.typeahead(t.data())})}(window.jQuery);!function(n){"use strict";var t=function(t,i){this.options=n.extend({},n.fn.affix.defaults,i);this.$window=n(window).on("scroll.affix.data-api",n.proxy(this.checkPosition,this)).on("click.affix.data-api",n.proxy(function(){setTimeout(n.proxy(this.checkPosition,this),1)},this));this.$element=n(t);this.checkPosition()},i;t.prototype.checkPosition=function(){if(this.$element.is(":visible")){var o=n(document).height(),f=this.$window.scrollTop(),e=this.$element.offset(),t=this.options.offset,r=t.bottom,u=t.top,i;(typeof t!="object"&&(r=u=t),typeof u=="function"&&(u=t.top()),typeof r=="function"&&(r=t.bottom()),i=this.unpin!=null&&f+this.unpin<=e.top?!1:r!=null&&e.top+this.$element.height()>=o-r?"bottom":u!=null&&f<=u?"top":!1,this.affixed!==i)&&(this.affixed=i,this.unpin=i=="bottom"?e.top-f:null,this.$element.removeClass("affix affix-top affix-bottom").addClass("affix"+(i?"-"+i:"")))}};i=n.fn.affix;n.fn.affix=function(i){return this.each(function(){var u=n(this),r=u.data("affix"),f=typeof i=="object"&&i;r||u.data("affix",r=new t(this,f));typeof i=="string"&&r[i]()})};n.fn.affix.Constructor=t;n.fn.affix.defaults={offset:0};n.fn.affix.noConflict=function(){return n.fn.affix=i,this};n(window).on("load",function(){n('[data-spy="affix"]').each(function(){var i=n(this),t=i.data();t.offset=t.offset||{};t.offsetBottom&&(t.offset.bottom=t.offsetBottom);t.offsetTop&&(t.offset.top=t.offsetTop);i.affix(t)})})}(window.jQuery);!function(n){"use strict";var t=function(t,i){this.options=n.extend({},n.fn.affix2.defaults,i);this.$window=n(window).on("scroll.affix2.data-api",n.proxy(this.checkPosition,this)).on("click.affix2.data-api",n.proxy(function(){setTimeout(n.proxy(this.checkPosition,this),1)},this));this.$element=n(t);this.checkPosition()};t.prototype.checkPosition=function(){if(this.$element.is(":visible")){var o=n(document).height(),f=this.$window.scrollTop(),e=this.$element.offset(),t=this.options.offset,u=t.bottom,i=t.top,r;(typeof t!="object"&&(u=i=t),typeof i=="function"&&(i=t.top()),typeof u=="function"&&(u=t.bottom()),r=this.unpin!=null&&f+this.unpin<=e.top?!1:u!=null&&e.top+this.$element.height()>=o-u-(this.affixed==="bottom"?i:0)?"bottom":i!=null&&f<=i?"top":!1,this.affixed!==r)&&(this.affixed=r,this.unpin=r=="bottom"?e.top-f:null,this.$element.removeClass("affix2 affix2-top affix2-bottom").addClass("affix2"+(r?"-"+r:"")))}};n.fn.affix2=function(i){return this.each(function(){var u=n(this),r=u.data("affix2"),f=typeof i=="object"&&i;r||u.data("affix2",r=new t(this,f));typeof i=="string"&&r[i]()})};n.fn.affix2.Constructor=t;n.fn.affix2.defaults={offset:0};n(window).on("load",function(){n('[data-spy="affix2"]').each(function(){var i=n(this),t=i.data();t.offset=t.offset||{};t.offsetBottom&&(t.offset.bottom=t.offsetBottom);t.offsetTop&&(t.offset.top=t.offsetTop);i.affix2(t)})})}(window.jQuery),function(n){"use strict";function r(n,t){return n.position().left+n.width()>0&&n.position().left<t.width()?!0:!1}var t=function(t,i){this.element=n(t);this.gallerymodal=this.element.find(".modal");n(document).on("keyup.bsgallery",this.element,n.proxy(this.keyup,this));this.initialize();this.options=i;this.gallerydata=[];this.gallerysourceurl=i.gallerysourceurl;this.galleryidx=-1;this.galleryid="";this.galleryname="";this.gallerycount=0;this.preloader='<i class="preloader text-muted fa fa-5x fa-circle-o-notch fa-spin"><\/i>';this.thumbpreloader='<i class="preloader text-muted fa fa-2x fa-circle-o-notch fa-spin"><\/i>'},i=function(){this.itemid="";this.itemthumb="";this.itemurl="";this.itemtype="";this.itemtitle="";this.itemdescription="";this.itemimagealttext=""};t.prototype={constructor:t,initialize:function(){var t=this,i=this.gallerymodal;n(document).on("click","a[data-bsgallery]",function(i){function o(){t.display(u);t.loadThumbs()}i.stopPropagation();i.preventDefault();var r=n(this).attr("data-galleryid"),f=n(this).attr("data-bsgallery"),e=this,u=n('a[data-galleryid="'+r+'"]').index(e);t.galleryidx=u;t.galleryid=r;t.galleryname=f;t.show();t.loadData(r,o)});i.find(".btn-prev").on("click",function(n){n.preventDefault();t.prev()});i.find(".btn-next").on("click",function(n){n.preventDefault();t.next()});n(document).on("click","a.modal-thumbnail",function(r){r.preventDefault();var u=n(this).index();t.display(u);n("a.modal-thumbnail.active").removeClass("active");n(this).addClass("active");i.find(".modal-dock").collapse("hide")});i.on("hidden.bs.modal",function(){n("html").removeClass("bs-modal-open");n("body").removeClass("modal-open");n(this).find(".modal-media iframe").remove()});i.find(".modal-dock").on("show.bs.collapse",function(){i.addClass("modal-overlay")});i.find(".modal-dock").on("shown.bs.collapse",function(){t.loadVisibleThumbs()});i.find(".modal-dock").on("hidden.bs.collapse",function(){i.removeClass("modal-overlay")});n(window).on("resize.bsgallery",function(){if(n("html").hasClass("bs-modal-open")){var t=n(".modal-canvas").innerWidth();n(".modal-media").css("width",t*.7+"px");n(window).innerHeight()>n(window).innerWidth()?n(".modal-col-canvas").css("height","80%"):n(".modal-col-canvas").css("height","100%")}});n(".modal-thumbnails").on("scroll",function(){t.loadVisibleThumbs()});this.element.attr("tabindex","1")},loadData:function(t,r){var u=this;u.gallerydata[t]?r():(u.gallerydata[t]=[],u.gallerysourceurl?(n("body").prepend("<div class='preloader-backdrop'><i class='preloader fa fa-5x fa-circle-o-notch fa-spin'><\/i>"),u.gallerymodal.addClass("loading"),u.gallerymodal.find(".modal-media").html('<span class="modal-media-helper"><\/span>'+u.preloader),n.ajax({type:"POST",cache:!1,dataType:"json",url:u.gallerysourceurl,data:"galleryid="+t+serializeSecToken(),success:function(f){if(n("body").find(".preloader-backdrop").remove(),f.IsValid){var e=f.Data.galleryitems;e&&n.each(e,function(n,r){var f=new i;f.itemid=r.itemid;f.itemtitle=r.itemtitle;f.itemdescription=r.itemdescription;f.itemtype=r.itemtype;f.itemthumb=r.itemthumb;f.itemurl=r.itemurl;f.itemimagealttext=r.itemimagealttext?r.itemimagealttext:"";u.gallerydata[t].push(f)});r()}u.gallerymodal.removeClass("loading")},error:function(){n("body").find(".preloader-backdrop").remove();u.gallerymodal.removeClass("loading");alert("Error Loading Gallery")}})):(n("a[data-galleryid='"+t+"']").each(function(){var r=new i;r.itemid=n(this).attr("data-itemid");r.itemtitle=n(this).attr("title");r.itemdescription=n(this).attr("data-description");r.itemtype=n(this).attr("data-gallerytype");r.itemthumb=n(this).attr("data-thumb-src");r.itemurl=n(this).attr("href");r.itemimagealttext=n(this).attr("alt");u.gallerydata[t].push(r)}),r()))},prev:function(){var i=this.galleryid,r=parseInt(this.galleryidx),t=this.gallerydata[i].length,n;t>1&&(n=r-1,n=n<0?t-1:n,this.display(n))},next:function(){var i=this.galleryid,r=parseInt(this.galleryidx),t=this.gallerydata[i].length,n;t>1&&(n=r+1,n=n>=t?0:n,this.display(n))},displayModal:function(t,i){var e="",o=this,r=o.gallerymodal,s=o.galleryname,c=i.itemdescription,l=i.itemtitle,h=i.itemurl,u,f;n.trim(c).length>0&&(e+=c);n.trim(l).length>0?r.find(".modal-content .modal-title").show():r.find(".modal-content .modal-title").hide();n.trim(e).length>0?r.find(".modal-content .modal-caption").show():r.find(".modal-content .modal-caption").hide();r.find(".gallery-title").text(s);r.find(".modal-content .modal-title").text(l||String.fromCharCode(160));r.find(".modal-media").html(t);r.find(".modal-caption").html(e);r.find(".original-img-link").attr("href",h);u="//www.facebook.com/sharer/sharer.php?s=100&p[url]={0}&p[images][0]={1}&p[title]={2}";u=u.replace("{0}",encodeURIComponent(document.location.href));u=u.replace("{1}",encodeURIComponent(h));u=u.replace("{2}",encodeURIComponent(s));f="//pinterest.com/pin/create/button/?url={0}&media={1}&description={2}";f=f.replace("{0}",encodeURIComponent(document.location.href));f=f.replace("{1}",encodeURIComponent(h));f=f.replace("{2}",encodeURIComponent(s));r.find(".btn-facebook-share-link").attr("href",u);r.find(".btn-pinterest-share-link").attr("href",f);setTimeout(function(){o.show()},100)},loadThumbs:function(){var t=this,i=n(".modal-thumbnails");i.attr("data-galleryid")!=t.galleryid&&(i.children().remove(),n.each(t.gallerydata[t.galleryid],function(r){var u=this,e=r==t.galleryidx?" active":"",f;u.icon=u.itemtype=="video"?'<span class="video-icon"><i class="fa fa-play-circle fa-2x"><\/i><\/span>':"";f="<a id='thumb-"+r+'\' href="#" class="modal-thumbnail notloaded'+e+'">'+t.thumbpreloader+"<\/a>";i.append(n(f).data("galleryitem",u))}),i.attr("data-galleryid",t.galleryid))},loadVisibleThumbs:function(){var t=n(".modal-thumbnails");n(".modal-thumbnail.notloaded").each(function(){var u=n(this),i;r(u,t)&&(i=u.data("galleryitem"),n("<img>").attr({src:i.itemthumb}).load(function(){u.html("<img title='"+i.itemtitle+"' alt='"+i.itemimagealttext+'\' class="img-responsive" src="'+i.itemthumb+'" />'+i.icon)}),u.removeClass("notloaded").data("galleryitem",null))})},display:function(t){var s='<span class="modal-media-helper"><\/span>',i=this,u=i.gallerymodal,f=i.galleryid,e,r,h;if(t=parseInt(t),e=this.gallerydata[f].length,e>1?u.find(".btn-next,.btn-prev").css({display:""}):u.find(".btn-next,.btn-prev").css({display:"none"}),t>-1&&t<=e){r=i.gallerydata[f][t];i.galleryidx=t;i.gallerycount=i.gallerydata[f].length;var o=r.itemurl,c=r.itemtitle,l=r.itemtype;n(".media-count .current-count").text(parseInt(i.galleryidx)+1);n(".media-count .total-count").text(i.gallerycount);u.find(".modal-media").html(s+i.preloader);l=="video"?(h="<div class='embed-responsive embed-responsive-16by9'><iframe src=\""+o+'" height="315" width="560" allowfullscreen="" frameborder="0"><\/iframe><\/div>',i.displayModal(h,r),u.find(".original-img-link").hide()):n("<img>").attr({src:o}).load(function(){var n=this.width,t=this.height,f=s+'<img class="img-responsive" alt="'+r.itemimagealttext+'" title="'+c+'" src="'+o+"\" data-src-width='"+n+"' data-src-height='"+t+"' />";i.displayModal(f,r);u.find(".original-img-link").show()})}},show:function(){n("html").addClass("bs-modal-open");n("body").addClass("modal-open");this.gallerymodal.modal("show");n(window).resize()},hide:function(){this.gallerymodal.modal("hide")},keyup:function(n){n.keyCode==37?this.prev():n.keyCode==39&&this.next()}};n.fn.bsgallery=function(i,r){return this.each(function(){var f=n(this),u=f.data("bsgallery"),e=typeof i=="object"&&i;u||f.data("bsgallery",u=new t(this,n.extend({},n.fn.bsgallery.defaults,e)));typeof i=="string"&&u[i](r)})};n.fn.bsgallery.defaults={};n.fn.bsgallery.Constructor=t}(window.jQuery);!function(n){var i=function(i,r){if(this.element=n(i),this.format=t.parseFormat(r.format||this.element.data("date-format")||"mm/dd/yyyy"),this.picker=n(t.template).appendTo("body").on({click:n.proxy(this.click,this),mousedown:n.proxy(this.mousedown,this)}),this.isInput=this.element.is("input"),this.component=this.element.is(".date")?this.element.find(".add-on"):!1,this.isInput)this.element.on({blur:n.proxy(this.hide,this),keyup:n.proxy(this.update,this)});else if(this.component)this.component.on("click",n.proxy(this.show,this));else this.element.on("click",n.proxy(this.show,this));if(this.minViewMode=r.minViewMode||this.element.data("date-minviewmode")||0,typeof this.minViewMode=="string")switch(this.minViewMode){case"months":this.minViewMode=1;break;case"years":this.minViewMode=2;break;default:this.minViewMode=0}if(this.viewMode=r.viewMode||this.element.data("date-viewmode")||0,typeof this.viewMode=="string")switch(this.viewMode){case"months":this.viewMode=1;break;case"years":this.viewMode=2;break;default:this.viewMode=0}this.startViewMode=this.viewMode;this.weekStart=r.weekStart||this.element.data("date-weekstart")||0;this.weekEnd=this.weekStart===0?6:this.weekStart-1;this.fillDow();this.fillMonths();this.update();this.showMode()},t;i.prototype={constructor:i,show:function(t){this.picker.show();this.height=this.component?this.component.outerHeight():this.element.outerHeight();this.place();n(window).on("resize",n.proxy(this.place,this));if(t&&(t.stopPropagation(),t.preventDefault()),!this.isInput)n(document).on("mousedown",n.proxy(this.hide,this));this.element.trigger({type:"show",date:this.date});this.element.focus()},hide:function(){this.picker.hide();n(window).off("resize",this.place);this.viewMode=this.startViewMode;this.showMode();this.isInput||n(document).off("mousedown",this.hide);this.set();this.element.trigger({type:"hide",date:this.date})},set:function(){var n=t.formatDate(this.date,this.format);this.isInput?this.element.prop("value",n):(this.component&&this.element.find("input").prop("value",n),this.element.data("date",n))},setValue:function(n){this.date=typeof n=="string"?t.parseDate(n,this.format):new Date(n);this.set();this.viewDate=new Date(this.date.getFullYear(),this.date.getMonth(),1,0,0,0,0);this.fill()},place:function(){var n=this.component?this.component.offset():this.element.offset();this.picker.css({top:n.top+this.height,left:n.left})},update:function(n){this.date=t.parseDate(typeof n=="string"?n:this.isInput?this.element.prop("value"):this.element.data("date"),this.format);this.viewDate=new Date(this.date.getFullYear(),this.date.getMonth(),1,0,0,0,0);this.fill()},fillDow:function(){for(var i=this.weekStart,n="<tr>";i<this.weekStart+7;)n+='<th class="dow">'+t.dates.daysMin[i++%7]+"<\/th>";n+="<\/tr>";this.picker.find(".datepicker-days thead").append(n)},fillMonths:function(){for(var n="",i=0;i<12;)n+='<span class="month">'+t.dates.monthsShort[i++]+"<\/span>";this.picker.find(".datepicker-months td").append(n)},fill:function(){var h=new Date(this.viewDate),i=h.getFullYear(),e=h.getMonth(),a=this.date.valueOf(),n,o,r,u,s,c,l,f;for(this.picker.find(".datepicker-days th:eq(1)").text(t.dates.months[e]+" "+i),n=new Date(i,e-1,28,0,0,0,0),o=t.getDaysInMonth(n.getFullYear(),n.getMonth()),n.setDate(o),n.setDate(o-(n.getDay()-this.weekStart+7)%7),r=new Date(n),r.setDate(r.getDate()+42),r=r.valueOf(),html=[];n.valueOf()<r;)n.getDay()===this.weekStart&&html.push("<tr>"),u="",n.getMonth()<e?u+=" old":n.getMonth()>e&&(u+=" new"),n.valueOf()===a&&(u+=" active"),html.push('<td class="day'+u+'">'+n.getDate()+"<\/td>"),n.getDay()===this.weekEnd&&html.push("<\/tr>"),n.setDate(n.getDate()+1);for(this.picker.find(".datepicker-days tbody").empty().append(html.join("")),s=this.date.getFullYear(),c=this.picker.find(".datepicker-months").find("th:eq(1)").text(i).end().find("span").removeClass("active"),s===i&&c.eq(this.date.getMonth()).addClass("active"),html="",i=parseInt(i/10,10)*10,l=this.picker.find(".datepicker-years").find("th:eq(1)").text(i+"-"+(i+9)).end().find("td"),i-=1,f=-1;f<11;f++)html+='<span class="year'+(f===-1||f===10?" old":"")+(s===i?" active":"")+'">'+i+"<\/span>",i+=1;l.html(html)},click:function(i){var r,e,u,f;if(i.stopPropagation(),i.preventDefault(),r=n(i.target).closest("span, td, th"),r.length===1)switch(r[0].nodeName.toLowerCase()){case"th":switch(r[0].className){case"switch":this.showMode(1);break;case"prev":case"next":this.viewDate["set"+t.modes[this.viewMode].navFnc].call(this.viewDate,this.viewDate["get"+t.modes[this.viewMode].navFnc].call(this.viewDate)+t.modes[this.viewMode].navStep*(r[0].className==="prev"?-1:1));this.fill();this.set()}break;case"span":r.is(".month")?(u=r.parent().find("span").index(r),this.viewDate.setMonth(u)):(f=parseInt(r.text(),10)||0,this.viewDate.setFullYear(f));this.viewMode!==0&&(this.date=new Date(this.viewDate),this.element.trigger({type:"changeDate",date:this.date,viewMode:t.modes[this.viewMode].clsName}));this.showMode(-1);this.fill();this.set();break;case"td":r.is(".day")&&(e=parseInt(r.text(),10)||1,u=this.viewDate.getMonth(),r.is(".old")?u-=1:r.is(".new")&&(u+=1),f=this.viewDate.getFullYear(),this.date=new Date(f,u,e,0,0,0,0),this.viewDate=new Date(f,u,Math.min(28,e),0,0,0,0),this.fill(),this.set(),this.element.trigger({type:"changeDate",date:this.date,viewMode:t.modes[this.viewMode].clsName}))}},mousedown:function(n){n.stopPropagation();n.preventDefault()},showMode:function(n){n&&(this.viewMode=Math.max(this.minViewMode,Math.min(2,this.viewMode+n)));this.picker.find(">div").hide().filter(".datepicker-"+t.modes[this.viewMode].clsName).show()}};n.fn.datepicker=function(t,r){return this.each(function(){var f=n(this),u=f.data("datepicker"),e=typeof t=="object"&&t;u||f.data("datepicker",u=new i(this,n.extend({},n.fn.datepicker.defaults,e)));typeof t=="string"&&u[t](r)})};n.fn.datepicker.defaults={};n.fn.datepicker.Constructor=i;t={modes:[{clsName:"days",navFnc:"Month",navStep:1},{clsName:"months",navFnc:"FullYear",navStep:1},{clsName:"years",navFnc:"FullYear",navStep:10}],dates:{days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],daysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat","Sun"],daysMin:["Su","Mo","Tu","We","Th","Fr","Sa","Su"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]},isLeapYear:function(n){return n%4==0&&n%100!=0||n%400==0},getDaysInMonth:function(n,i){return[31,t.isLeapYear(n)?29:28,31,30,31,30,31,31,30,31,30,31][i]},parseFormat:function(n){var i=n.match(/[.\/\-\s].*?/),t=n.split(/\W+/);if(!i||!t||t.length===0)throw new Error("Invalid date format.");return{separator:i,parts:t}},parseDate:function(n,t){var u=n.split(t.separator),n=new Date,i,r,f;if(n.setHours(0),n.setMinutes(0),n.setSeconds(0),n.setMilliseconds(0),u.length===t.parts.length)for(r=0,f=t.parts.length;r<f;r++){i=parseInt(u[r],10)||1;switch(t.parts[r]){case"dd":case"d":n.setDate(i);break;case"mm":case"m":n.setMonth(i-1);break;case"yy":n.setFullYear(2e3+i);break;case"yyyy":n.setFullYear(i)}}return n},formatDate:function(n,t){var i={d:n.getDate(),m:n.getMonth()+1,yy:n.getFullYear().toString().substring(2),yyyy:n.getFullYear()},n,r,u;for(i.dd=(i.d<10?"0":"")+i.d,i.mm=(i.m<10?"0":"")+i.m,n=[],r=0,u=t.parts.length;r<u;r++)n.push(i[t.parts[r]]);return n.join(t.separator)},headTemplate:'<thead><tr><th class="prev">&lsaquo;<\/th><th colspan="5" class="switch"><\/th><th class="next">&rsaquo;<\/th><\/tr><\/thead>',contTemplate:'<tbody><tr><td colspan="7"><\/td><\/tr><\/tbody>'};t.template='<div class="datepicker dropdown-menu"><div class="datepicker-days"><table class=" table-condensed">'+t.headTemplate+'<tbody><\/tbody><\/table><\/div><div class="datepicker-months"><table class="table-condensed">'+t.headTemplate+t.contTemplate+'<\/table><\/div><div class="datepicker-years"><table class="table-condensed">'+t.headTemplate+t.contTemplate+"<\/table><\/div><\/div>"}(window.jQuery);!function(n){"use strict";var t=function(n,t){this.cinit("clickover",n,t)};t.prototype=n.extend({},n.fn.popover.Constructor.prototype,{constructor:t,cinit:function(t,i,r){this.attr={};this.attr.me=(Math.random()*10+"").replace(/\D/g,"");this.attr.click_event_ns="click."+this.attr.me+" touchstart."+this.attr.me;r||(r={});r.trigger="manual";this.init(t,i,r);this.$element.on("click",this.options.selector,n.proxy(this.clickery,this))},clickery:function(t){if(t&&(t.preventDefault(),t.stopPropagation()),this.options.width&&this.tip().find(".popover-inner").width(this.options.width),this.options.height&&this.tip().find(".popover-inner").height(this.options.height),this.options.tip_id&&this.tip().attr("id",this.options.tip_id),this.options.class_name&&this.tip().addClass(this.options.class_name),this.toggle(),this.isShown()){var i=this;this.options.global_close&&n("body").on(this.attr.click_event_ns,function(n){i.tip().has(n.target).length||i.clickery()});this.options.esc_close&&n(document).bind("keyup.clickery",function(n){n.keyCode==27&&i.clickery();return});this.options.allow_multiple||n("[data-clickover-open=1]").each(function(){n(this).data("clickover")&&n(this).data("clickover").clickery()});this.$element.attr("data-clickover-open",1);this.tip().on("click",'[data-dismiss="clickover"]',n.proxy(this.clickery,this));this.options.auto_close&&this.options.auto_close>0&&(this.attr.tid=setTimeout(n.proxy(this.clickery,this),this.options.auto_close));typeof this.options.onShown=="function"&&this.options.onShown.call(this);this.$element.trigger("shown")}else this.$element.removeAttr("data-clickover-open"),this.options.esc_close&&n(document).unbind("keyup.clickery"),n("body").off(this.attr.click_event_ns),typeof this.attr.tid=="number"&&(clearTimeout(this.attr.tid),delete this.attr.tid),typeof this.options.onHidden=="function"&&this.options.onHidden.call(this),this.$element.trigger("hidden")},isShown:function(){return this.tip().hasClass("in")},resetPosition:function(){var t,e,n,r,u,f,i;if(this.hasContent()&&this.enabled){t=this.tip();f=typeof this.options.placement=="function"?this.options.placement.call(this,t[0],this.$element[0]):this.options.placement;e=/in/.test(f);n=this.getPosition(e);r=t[0].offsetWidth;u=t[0].offsetHeight;switch(e?f.split(" ")[1]:f){case"bottom":i={top:n.top+n.height,left:n.left+n.width/2-r/2};break;case"top":i={top:n.top-u,left:n.left+n.width/2-r/2};break;case"left":i={top:n.top+n.height/2-u/2,left:n.left-r};break;case"right":i={top:n.top+n.height/2-u/2,left:n.left+n.width}}t.css(i)}},debughide:function(){var n=(new Date).toString();console.log(n+": clickover hide");this.hide()}});n.fn.clickover=function(i){return this.each(function(){var u=n(this),r=u.data("clickover"),f=typeof i=="object"&&i;r||u.data("clickover",r=new t(this,f));typeof i=="string"&&r[i]()})};n.fn.clickover.Constructor=t;n.fn.clickover.defaults=n.extend({},n.fn.popover.defaults,{trigger:"manual",auto_close:0,global_close:1,esc_close:1,onShown:null,onHidden:null,width:null,height:null,tip_id:null,class_name:"clickover",allow_multiple:0})}(window.jQuery),function(n){function c(){t.setAttribute("content",a);i=!0}function v(){t.setAttribute("content",l);i=!1}function y(t){r=t.accelerationIncludingGravity;f=Math.abs(r.x);e=Math.abs(r.y);o=Math.abs(r.z);(!n.orientation||n.orientation===180)&&(f>7||(o>6&&e<8||o<8&&e>6)&&f>5)?i&&v():i||c()}var s=navigator.userAgent,u;if(/iPhone|iPad|iPod/.test(navigator.platform)&&/OS [1-5]_[0-9_]* like Mac OS X/i.test(s)&&s.indexOf("AppleWebKit")>-1&&(u=n.document,u.querySelector)){var t=u.querySelector("meta[name=viewport]"),h=t&&t.getAttribute("content"),l=h+",maximum-scale=1",a=h+",maximum-scale=10",i=!0,f,e,o,r;t&&(n.addEventListener("orientationchange",c,!1),n.addEventListener("devicemotion",y,!1))}}(this),function(n){"use strict";typeof define=="function"&&define.amd?define(["jquery"],n):n(typeof jQuery!="undefined"?jQuery:window.Zepto)}(function(n){"use strict";function u(t){var i=t.data;t.isDefaultPrevented()||(t.preventDefault(),n(t.target).ajaxSubmit(i))}function f(t){var r=t.target,u=n(r),f,i,e;if(!u.is("[type=submit],[type=image]")){if(f=u.closest("[type=submit]"),f.length===0)return;r=f[0]}i=this;i.clk=r;r.type=="image"&&(t.offsetX!==undefined?(i.clk_x=t.offsetX,i.clk_y=t.offsetY):typeof n.fn.offset=="function"?(e=u.offset(),i.clk_x=t.pageX-e.left,i.clk_y=t.pageY-e.top):(i.clk_x=t.pageX-r.offsetLeft,i.clk_y=t.pageY-r.offsetTop));setTimeout(function(){i.clk=i.clk_x=i.clk_y=null},100)}function t(){if(n.fn.ajaxSubmit.debug){var t="[jquery.form] "+Array.prototype.join.call(arguments,"");window.console&&window.console.log?window.console.log(t):window.opera&&window.opera.postError&&window.opera.postError(t)}}var i={},r;i.fileapi=n("<input type='file'/>").get(0).files!==undefined;i.formdata=window.FormData!==undefined;r=!!n.fn.prop;n.fn.attr2=function(){if(!r)return this.attr.apply(this,arguments);var n=this.prop.apply(this,arguments);return n&&n.jquery||typeof n=="string"?n:this.attr.apply(this,arguments)};n.fn.ajaxSubmit=function(u){function ot(t){for(var r=n.param(t,u.traditional).split("&"),o=r.length,e=[],f,i=0;i<o;i++)r[i]=r[i].replace(/\+/g," "),f=r[i].split("="),e.push([decodeURIComponent(f[0]),decodeURIComponent(f[1])]);return e}function st(t){for(var o=new FormData,f,r,s,i=0;i<t.length;i++)o.append(t[i].name,t[i].value);if(u.extraData)for(f=ot(u.extraData),i=0;i<f.length;i++)f[i]&&o.append(f[i][0],f[i][1]);return u.data=null,r=n.extend(!0,{},n.ajaxSettings,u,{contentType:!1,processData:!1,cache:!1,type:e||"POST"}),u.uploadProgress&&(r.xhr=function(){var t=n.ajaxSettings.xhr();return t.upload&&t.upload.addEventListener("progress",function(n){var t=0,i=n.loaded||n.position,r=n.total;n.lengthComputable&&(t=Math.ceil(i/r*100));u.uploadProgress(n,i,r,t)},!1),t}),r.data=null,s=r.beforeSend,r.beforeSend=function(n,t){t.data=u.formData?u.formData:o;s&&s.call(this,n,t)},n.ajax(r)}function ft(i){function ot(n){var i=null;try{n.contentWindow&&(i=n.contentWindow.document)}catch(r){t("cannot get iframe.contentWindow document: "+r)}if(i)return i;try{i=n.contentDocument?n.contentDocument:n.document}catch(r){t("cannot get iframe.contentDocument: "+r);i=n.document}return i}function st(){function h(){try{var n=ot(a).readyState;t("state = "+n);n&&n.toLowerCase()=="uninitialized"&&setTimeout(h,50)}catch(i){t("Server abort: ",i," (",i.name,")");b(tt);g&&clearTimeout(g);g=undefined}}var u=f.attr2("target"),s=f.attr2("action"),y=f.attr("enctype")||f.attr("encoding")||"multipart/form-data",r,i,c;l.setAttribute("target",d);(!e||/post/i.test(e))&&l.setAttribute("method","POST");s!=o.url&&l.setAttribute("action",o.url);o.skipEncodingOverride||e&&!/post/i.test(e)||f.attr({encoding:"multipart/form-data",enctype:"multipart/form-data"});o.timeout&&(g=setTimeout(function(){rt=!0;b(ut)},o.timeout));r=[];try{if(o.extraData)for(i in o.extraData)o.extraData.hasOwnProperty(i)&&(n.isPlainObject(o.extraData[i])&&o.extraData[i].hasOwnProperty("name")&&o.extraData[i].hasOwnProperty("value")?r.push(n('<input type="hidden" name="'+o.extraData[i].name+'">').val(o.extraData[i].value).appendTo(l)[0]):r.push(n('<input type="hidden" name="'+i+'">').val(o.extraData[i]).appendTo(l)[0]));o.iframeTarget||v.appendTo("body");a.attachEvent?a.attachEvent("onload",b):a.addEventListener("load",b,!1);setTimeout(h,15);try{l.submit()}catch(p){c=document.createElement("form").submit;c.apply(l)}}finally{l.setAttribute("action",s);l.setAttribute("enctype",y);u?l.setAttribute("target",u):f.removeAttr("target");n(r).remove()}}function b(i){var r,u,w,f,k,d,e,c,l;if(!s.aborted&&!lt){if(h=ot(a),h||(t("cannot access response document"),i=tt),i===ut&&s){s.abort("timeout");y.reject(s,"timeout");return}if(i==tt&&s){s.abort("server abort");y.reject(s,"error","server abort");return}if(h&&h.location.href!=o.iframeSrc||rt){a.detachEvent?a.detachEvent("onload",b):a.removeEventListener("load",b,!1);r="success";try{if(rt)throw"timeout";if(w=o.dataType=="xml"||h.XMLDocument||n.isXMLDoc(h),t("isXml="+w),!w&&window.opera&&(h.body===null||!h.body.innerHTML)&&--ct){t("requeing onLoad callback, DOM not available");setTimeout(b,250);return}f=h.body?h.body:h.documentElement;s.responseText=f?f.innerHTML:null;s.responseXML=h.XMLDocument?h.XMLDocument:h;w&&(o.dataType="xml");s.getResponseHeader=function(n){var t={"content-type":o.dataType};return t[n.toLowerCase()]};f&&(s.status=Number(f.getAttribute("status"))||s.status,s.statusText=f.getAttribute("statusText")||s.statusText);k=(o.dataType||"").toLowerCase();d=/(json|script|text)/.test(k);d||o.textarea?(e=h.getElementsByTagName("textarea")[0],e?(s.responseText=e.value,s.status=Number(e.getAttribute("status"))||s.status,s.statusText=e.getAttribute("statusText")||s.statusText):d&&(c=h.getElementsByTagName("pre")[0],l=h.getElementsByTagName("body")[0],c?s.responseText=c.textContent?c.textContent:c.innerText:l&&(s.responseText=l.textContent?l.textContent:l.innerText))):k=="xml"&&!s.responseXML&&s.responseText&&(s.responseXML=at(s.responseText));try{ht=yt(s,k,o)}catch(nt){r="parsererror";s.error=u=nt||r}}catch(nt){t("error caught: ",nt);r="error";s.error=u=nt||r}s.aborted&&(t("upload aborted"),r=null);s.status&&(r=s.status>=200&&s.status<300||s.status===304?"success":"error");r==="success"?(o.success&&o.success.call(o.context,ht,"success",s),y.resolve(s.responseText,"success",s),p&&n.event.trigger("ajaxSuccess",[s,o])):r&&(u===undefined&&(u=s.statusText),o.error&&o.error.call(o.context,s,r,u),y.reject(s,"error",u),p&&n.event.trigger("ajaxError",[s,o,u]));p&&n.event.trigger("ajaxComplete",[s,o]);p&&!--n.active&&n.event.trigger("ajaxStop");o.complete&&o.complete.call(o.context,s,r);lt=!0;o.timeout&&clearTimeout(g);setTimeout(function(){o.iframeTarget?v.attr("src",o.iframeSrc):v.remove();s.responseXML=null},100)}}}var l=f[0],it,nt,o,p,d,v,a,s,k,w,rt,g,y=n.Deferred(),ut,tt,ft,et,ht,h,ct,lt;if(y.abort=function(n){s.abort(n)},i)for(nt=0;nt<c.length;nt++)it=n(c[nt]),r?it.prop("disabled",!1):it.removeAttr("disabled");if(o=n.extend(!0,{},n.ajaxSettings,u),o.context=o.context||o,d="jqFormIO"+(new Date).getTime(),o.iframeTarget?(v=n(o.iframeTarget),w=v.attr2("name"),w?d=w:v.attr2("name",d)):(v=n('<iframe name="'+d+'" src="'+o.iframeSrc+'" />'),v.css({position:"absolute",top:"-1000px",left:"-1000px"})),a=v[0],s={aborted:0,responseText:null,responseXML:null,status:0,statusText:"n/a",getAllResponseHeaders:function(){},getResponseHeader:function(){},setRequestHeader:function(){},abort:function(i){var r=i==="timeout"?"timeout":"aborted";t("aborting upload... "+r);this.aborted=1;try{a.contentWindow.document.execCommand&&a.contentWindow.document.execCommand("Stop")}catch(u){}v.attr("src",o.iframeSrc);s.error=r;o.error&&o.error.call(o.context,s,r,i);p&&n.event.trigger("ajaxError",[s,o,r]);o.complete&&o.complete.call(o.context,s,r)}},p=o.global,p&&0==n.active++&&n.event.trigger("ajaxStart"),p&&n.event.trigger("ajaxSend",[s,o]),o.beforeSend&&o.beforeSend.call(o.context,s,o)===!1)return o.global&&n.active--,y.reject(),y;if(s.aborted)return y.reject(),y;k=l.clk;k&&(w=k.name,w&&!k.disabled&&(o.extraData=o.extraData||{},o.extraData[w]=k.value,k.type=="image"&&(o.extraData[w+".x"]=l.clk_x,o.extraData[w+".y"]=l.clk_y)));ut=1;tt=2;ft=n("meta[name=csrf-token]").attr("content");et=n("meta[name=csrf-param]").attr("content");et&&ft&&(o.extraData=o.extraData||{},o.extraData[et]=ft);o.forceSync?st():setTimeout(st,10);ct=50;var at=n.parseXML||function(n,t){return window.ActiveXObject?(t=new ActiveXObject("Microsoft.XMLDOM"),t.async="false",t.loadXML(n)):t=(new DOMParser).parseFromString(n,"text/xml"),t&&t.documentElement&&t.documentElement.nodeName!="parsererror"?t:null},vt=n.parseJSON||function(s){return window.eval("("+s+")")},yt=function(t,i,r){var f=t.getResponseHeader("content-type")||"",e=i==="xml"||!i&&f.indexOf("xml")>=0,u=e?t.responseXML:t.responseText;return e&&u.documentElement.nodeName==="parsererror"&&n.error&&n.error("parsererror"),r&&r.dataFilter&&(u=r.dataFilter(u,i)),typeof u=="string"&&(i==="json"||!i&&f.indexOf("json")>=0?u=vt(u):(i==="script"||!i&&f.indexOf("javascript")>=0)&&n.globalEval(u)),u};return y}var e,b,o,f,a,v,c,y,s,l,h,d,g,nt,ut,p,w;if(!this.length)return t("ajaxSubmit: skipping submit process - no element selected"),this;if(f=this,typeof u=="function"?u={success:u}:u===undefined&&(u={}),e=u.type||this.attr2("method"),b=u.url||this.attr2("action"),o=typeof b=="string"?n.trim(b):"",o=o||window.location.href||"",o&&(o=(o.match(/^([^#]+)/)||[])[1]),u=n.extend(!0,{url:o,success:n.ajaxSettings.success,type:e||n.ajaxSettings.type,iframeSrc:/^https/i.test(window.location.href||"")?"javascript:false":"about:blank"},u),a={},this.trigger("form-pre-serialize",[this,u,a]),a.veto)return t("ajaxSubmit: submit vetoed via form-pre-serialize trigger"),this;if(u.beforeSerialize&&u.beforeSerialize(this,u)===!1)return t("ajaxSubmit: submit aborted via beforeSerialize callback"),this;if(v=u.traditional,v===undefined&&(v=n.ajaxSettings.traditional),c=[],s=this.formToArray(u.semantic,c),u.data&&(u.extraData=u.data,y=n.param(u.data,v)),u.beforeSubmit&&u.beforeSubmit(s,this,u)===!1)return t("ajaxSubmit: submit aborted via beforeSubmit callback"),this;if(this.trigger("form-submit-validate",[s,this,u,a]),a.veto)return t("ajaxSubmit: submit vetoed via form-submit-validate trigger"),this;l=n.param(s,v);y&&(l=l?l+"&"+y:y);u.type.toUpperCase()=="GET"?(u.url+=(u.url.indexOf("?")>=0?"&":"?")+l,u.data=null):u.data=l;h=[];u.resetForm&&h.push(function(){f.resetForm()});u.clearForm&&h.push(function(){f.clearForm(u.includeHidden)});!u.dataType&&u.target?(d=u.success||function(){},h.push(function(t){var i=u.replaceTarget?"replaceWith":"html";n(u.target)[i](t).each(d,arguments)})):u.success&&h.push(u.success);u.success=function(n,t,i){for(var o=u.context||this,r=0,e=h.length;r<e;r++)h[r].apply(o,[n,t,i||f,f])};u.error&&(g=u.error,u.error=function(n,t,i){var r=u.context||this;g.apply(r,[n,t,i,f])});u.complete&&(nt=u.complete,u.complete=function(n,t){var i=u.context||this;nt.apply(i,[n,t,f])});var et=n("input[type=file]:enabled",this).filter(function(){return n(this).val()!==""}),tt=et.length>0,it="multipart/form-data",rt=f.attr("enctype")==it||f.attr("encoding")==it,k=i.fileapi&&i.formdata;for(t("fileAPI :"+k),ut=(tt||rt)&&!k,u.iframe!==!1&&(u.iframe||ut)?u.closeKeepAlive?n.get(u.closeKeepAlive,function(){p=ft(s)}):p=ft(s):p=(tt||rt)&&k?st(s):n.ajax(u),f.removeData("jqxhr").data("jqxhr",p),w=0;w<c.length;w++)c[w]=null;return this.trigger("form-submit-notify",[this,u]),this};n.fn.ajaxForm=function(i){if(i=i||{},i.delegation=i.delegation&&n.isFunction(n.fn.on),!i.delegation&&this.length===0){var r={s:this.selector,c:this.context};return!n.isReady&&r.s?(t("DOM not ready, queuing ajaxForm"),n(function(){n(r.s,r.c).ajaxForm(i)}),this):(t("terminating; zero elements found by selector"+(n.isReady?"":" (DOM not ready)")),this)}if(i.delegation){n(document).off("submit.form-plugin",this.selector,u).off("click.form-plugin",this.selector,f).on("submit.form-plugin",this.selector,i,u).on("click.form-plugin",this.selector,i,f);return this}return this.ajaxFormUnbind().bind("submit.form-plugin",i,u).bind("click.form-plugin",i,f)};n.fn.ajaxFormUnbind=function(){return this.unbind("submit.form-plugin click.form-plugin")};n.fn.formToArray=function(t,r){var e=[],l,h,f,c,u,b,k,a,p,v;if(this.length===0)return e;var o=this[0],w=this.attr("id"),s=t?o.getElementsByTagName("*"):o.elements,y;if(s&&(s=n(s).get()),w&&(y=n(":input[form="+w+"]").get(),y.length&&(s=(s||[]).concat(y))),!s||!s.length)return e;for(l=0,b=s.length;l<b;l++)if(u=s[l],f=u.name,f&&!u.disabled){if(t&&o.clk&&u.type=="image"){o.clk==u&&(e.push({name:f,value:n(u).val(),type:u.type}),e.push({name:f+".x",value:o.clk_x},{name:f+".y",value:o.clk_y}));continue}if(c=n.fieldValue(u,!0),c&&c.constructor==Array)for(r&&r.push(u),h=0,k=c.length;h<k;h++)e.push({name:f,value:c[h]});else if(i.fileapi&&u.type=="file")if(r&&r.push(u),a=u.files,a.length)for(h=0;h<a.length;h++)e.push({name:f,value:a[h],type:u.type});else e.push({name:f,value:"",type:u.type});else c!==null&&typeof c!="undefined"&&(r&&r.push(u),e.push({name:f,value:c,type:u.type,required:u.required}))}return!t&&o.clk&&(p=n(o.clk),v=p[0],f=v.name,f&&!v.disabled&&v.type=="image"&&(e.push({name:f,value:p.val()}),e.push({name:f+".x",value:o.clk_x},{name:f+".y",value:o.clk_y}))),e};n.fn.formSerialize=function(t){return n.param(this.formToArray(t))};n.fn.fieldSerialize=function(t){var i=[];return this.each(function(){var f=this.name,r,u,e;if(f)if(r=n.fieldValue(this,t),r&&r.constructor==Array)for(u=0,e=r.length;u<e;u++)i.push({name:f,value:r[u]});else r!==null&&typeof r!="undefined"&&i.push({name:this.name,value:r})}),n.param(i)};n.fn.fieldValue=function(t){for(var f,i,r=[],u=0,e=this.length;u<e;u++)(f=this[u],i=n.fieldValue(f,t),i!==null&&typeof i!="undefined"&&(i.constructor!=Array||i.length))&&(i.constructor==Array?n.merge(r,i):r.push(i));return r};n.fieldValue=function(t,i){var a=t.name,u=t.type,h=t.tagName.toLowerCase(),e,o,r,f;if(i===undefined&&(i=!0),i&&(!a||t.disabled||u=="reset"||u=="button"||(u=="checkbox"||u=="radio")&&!t.checked||(u=="submit"||u=="image")&&t.form&&t.form.clk!=t||h=="select"&&t.selectedIndex==-1))return null;if(h=="select"){if(e=t.selectedIndex,e<0)return null;var c=[],l=t.options,s=u=="select-one",v=s?e+1:l.length;for(o=s?e:0;o<v;o++)if(r=l[o],r.selected){if(f=r.value,f||(f=r.attributes&&r.attributes.value&&!r.attributes.value.specified?r.text:r.value),s)return f;c.push(f)}return c}return n(t).val()};n.fn.clearForm=function(t){return this.each(function(){n("input,select,textarea",this).clearFields(t)})};n.fn.clearFields=n.fn.clearInputs=function(t){var i=/^(?:color|date|datetime|email|month|number|password|range|search|tel|text|time|url|week)$/i;return this.each(function(){var r=this.type,u=this.tagName.toLowerCase();i.test(r)||u=="textarea"?this.value="":r=="checkbox"||r=="radio"?this.checked=!1:u=="select"?this.selectedIndex=-1:r=="file"?/MSIE/.test(navigator.userAgent)?n(this).replaceWith(n(this).clone(!0)):n(this).val(""):t&&(t===!0&&/hidden/.test(r)||typeof t=="string"&&n(this).is(t))&&(this.value="")})};n.fn.resetForm=function(){return this.each(function(){typeof this.reset!="function"&&(typeof this.reset!="object"||this.reset.nodeType)||this.reset()})};n.fn.enable=function(n){return n===undefined&&(n=!0),this.each(function(){this.disabled=!n})};n.fn.selected=function(t){return t===undefined&&(t=!0),this.each(function(){var r=this.type,i;r=="checkbox"||r=="radio"?this.checked=t:this.tagName.toLowerCase()=="option"&&(i=n(this).parent("select"),t&&i[0]&&i[0].type=="select-one"&&i.find("option").selected(!1),this.selected=t)})};n.fn.ajaxSubmit.debug=!1}),function(n){"use strict";typeof define=="function"&&define.amd?define(["jquery"],n):typeof module!="undefined"&&module.exports?module.exports=n(require("jquery")):n(jQuery)}(function(n){var e=-1,r=-1,i=function(n){return parseFloat(n)||0},o=function(t){var f=1,e=n(t),u=null,r=[];return e.each(function(){var t=n(this),e=t.offset().top-i(t.css("margin-top")),o=r.length>0?r[r.length-1]:null;o===null?r.push(t):Math.floor(Math.abs(u-e))<=f?r[r.length-1]=o.add(t):r.push(t);u=e}),r},u=function(t){var i={byRow:!0,property:"height",target:null,remove:!1};return typeof t=="object"?n.extend(i,t):(typeof t=="boolean"?i.byRow=t:t==="remove"&&(i.remove=!0),i)},t=n.fn.matchHeight=function(i){var r=u(i),f;return r.remove?(f=this,this.css(r.property,""),n.each(t._groups,function(n,t){t.elements=t.elements.not(f)}),this):this.length<=1&&!r.target?this:(t._groups.push({elements:this,options:r}),t._apply(this,r),this)},f;t.version="master";t._groups=[];t._throttle=80;t._maintainScroll=!1;t._beforeUpdate=null;t._afterUpdate=null;t._rows=o;t._parse=i;t._parseOptions=u;t._apply=function(r,f){var e=u(f),s=n(r),c=[s],l=n(window).scrollTop(),a=n("html").outerHeight(!0),h=s.parents().filter(":hidden");return h.each(function(){var t=n(this);t.data("style-cache",t.attr("style"))}),h.css("display","block"),e.byRow&&!e.target&&(s.each(function(){var i=n(this),t=i.css("display");t!=="inline-block"&&t!=="flex"&&t!=="inline-flex"&&(t="block");i.data("style-cache",i.attr("style"));i.css({display:t,"padding-top":"0","padding-bottom":"0","margin-top":"0","margin-bottom":"0","border-top-width":"0","border-bottom-width":"0",height:"100px",overflow:"hidden"})}),c=o(s),s.each(function(){var t=n(this);t.attr("style",t.data("style-cache")||"")})),n.each(c,function(t,r){var u=n(r),f=0;if(e.target)f=e.target.outerHeight(!1);else{if(e.byRow&&u.length<=1){u.css(e.property,"");return}u.each(function(){var t=n(this),u=t.attr("style"),i=t.css("display"),r;i!=="inline-block"&&i!=="flex"&&i!=="inline-flex"&&(i="block");r={display:i};r[e.property]="";t.css(r);t.outerHeight(!1)>f&&(f=t.outerHeight(!1));u?t.attr("style",u):t.css("display","")})}u.each(function(){var t=n(this),r=0;e.target&&t.is(e.target)||(t.css("box-sizing")!=="border-box"&&(r+=i(t.css("border-top-width"))+i(t.css("border-bottom-width")),r+=i(t.css("padding-top"))+i(t.css("padding-bottom"))),t.css(e.property,f-r+"px"))})}),h.each(function(){var t=n(this);t.attr("style",t.data("style-cache")||null)}),t._maintainScroll&&n(window).scrollTop(l/a*n("html").outerHeight(!0)),this};t._applyDataApi=function(){var t={};n("[data-match-height], [data-mh]").each(function(){var i=n(this),r=i.attr("data-mh")||i.attr("data-match-height");t[r]=r in t?t[r].add(i):i});n.each(t,function(){this.matchHeight(!0)})};f=function(i){t._beforeUpdate&&t._beforeUpdate(i,t._groups);n.each(t._groups,function(){t._apply(this.elements,this.options)});t._afterUpdate&&t._afterUpdate(i,t._groups)};t._update=function(i,u){if(u&&u.type==="resize"){var o=n(window).width();if(o===e)return;e=o}i?r===-1&&(r=setTimeout(function(){f(u);r=-1},t._throttle)):f(u)};n(t._applyDataApi);n(window).bind("load",function(n){t._update(!1,n)});n(window).bind("resize orientationchange",function(n){t._update(!0,n)})});jQuery.fn.extend({addToList:function(n,t){return this.filter(":input").val(function(i,r){if(n==""||n==null||n==undefined)return r;if(r=="")return n;var u=r.split(t);return u.push(n),u.join(t)}).end()},removeFromList:function(n,t){return this.filter(":input").val(function(i,r){return n==""||n==null||n==undefined?r:$.grep(r.split(t),function(t){return t!=n}).join(t)}).end()}});var submitText='<i class="fa fa-spinner fa-spin"><\/i> Submitting...',trackOutboundLink=function(n,t,i){ga("send","event",n,t,i)};String.prototype.format=function(){var n=arguments;return this.replace(/{(\d+)}/g,function(t,i){return typeof n[i]!="undefined"?n[i]:t})};$(function(){function n(){$(".carousel").carousel({interval:!1,pause:"hover"})}function t(){$(document).on("click",".select-date",function(n){n.preventDefault();var r=$(this).attr("data-action-field"),t=$("#"+r),i=t.data("datepicker");if(i)i.picker.is(":visible")?t.datepicker("hide"):t.datepicker("show");else t.datepicker("show").on("changeDate",function(){t.datepicker("hide")})})}function i(){$("a[data-toggle='collapse']").click(function(n){n.preventDefault();var t=$(this).attr("data-collapse-container");$(this).data("hideaftershow")==!0&&$(this).fadeOut();$("#"+t).find("div.collapse").each(function(){var n=$(this);n.hasClass("in")&&n.collapse("toggle")})})}function r(){var t=$(".company-blog"),n;t.hasClass("internal")||(n=t.children(".blog-post"),n.length>0&&$.ajax({type:"POST",dataType:"json",data:serializeSecToken(!0),url:"/ws/latest-news/",success:function(t){t.title&&(n.find(".post-date").html(t.pubDate),n.find(".post-header a").attr("href",t.link).html(t.title),n.find(".post-entry").html(t.description),n.find(".post-continue").attr("href",t.link))}}))}function u(){$(".dropdown-menu").find(".dropdown-form").click(function(n){n.stopPropagation()});$("body").on("touchstart.dropdown",".dropdown-menu",function(n){n.stopPropagation()});$(".zip-finder").click(function(n){var t;if(n.preventDefault(),t=$(this),t.closest("div.dropdown").hasClass("open")){t.attr("disabled","disabled");t.attr("value","Checking...");var u=t.attr("data-zip-field"),i=t.attr("data-city-field"),r=t.attr("data-state-field"),f=t.attr("data-results-field");$(".error").removeClass("error");$.ajax({type:"POST",cache:!1,dataType:"json",data:"city="+getFormVal(i)+"&state="+getFormVal(r)+"&country="+getFormVal("input-client-country")+serializeSecToken(),url:"/ws/get-zips/",success:function(n){var e,o,h,s;if(t.removeAttr("disabled"),t.attr("value","Find Zip"),e=$("#"+f),n.IsValid){for(e.children().remove(),e.append("<option value=''>Select Zip/Postal Code<\/option>"),e.removeClass("no-results"),e.removeAttr("disabled"),h=0;h<n.Data.length;h++)s=n.Data[h],e.append("<option value='"+s.zipCode+"'>"+s.city+", "+s.state+": "+s.zipCode+"<\/option>");e.change(function(){var n=e.children();n.length>0&&($("#"+u).val(e.val()),t.dropdown("toggle"))})}else o="",n.ErrFields.city&&($("#"+i).addClass("error"),o+=n.ErrFields.city),n.ErrFields.state&&($("#"+r).addClass("error"),o+=(o!=""?"\n":"")+n.ErrFields.state),n.ErrFields.other&&($("#"+i).addClass("error"),$("#"+r).addClass("error"),o+=(o!=""?"\n":"")+n.ErrFields.other),alert(o)}})}})}function f(){$(".quote-form #select-service").change(function(){var n=$(this).val();n=="Commercial"?($(".quote-form #moving-inputs").hide(),$(".quote-form #info-inputs").show(),$(".quote-form #international-inputs").hide()):n=="Logistics"?($(".quote-form #moving-inputs").hide(),$(".quote-form #info-inputs").show(),$(".quote-form #international-inputs").hide()):n=="International"?($(".quote-form #moving-inputs").hide(),$(".quote-form #info-inputs").hide(),$(".quote-form #international-inputs").show()):n=="Storage"?($(".quote-form #moving-inputs").hide(),$(".quote-form #info-inputs").show(),$(".quote-form #international-inputs").hide()):n=="Specialized"?($(".quote-form #moving-inputs").hide(),$(".quote-form #info-inputs").show(),$(".quote-form #international-inputs").hide()):n=="Corporate"?($(".quote-form #moving-inputs").hide(),$(".quote-form #info-inputs").show(),$(".quote-form #international-inputs").hide()):($(".quote-form #moving-inputs").show(),$(".quote-form #info-inputs").hide(),$(".quote-form #international-inputs").hide())})}function e(){var n=$("#quote-form");n.length>0&&n.find("#button-submit-form").click(function(t){t.preventDefault();$(".error").removeClass("error");button=$(this);button.html("Submitting...");button.attr("disabled","disabled");var i=getFormVal("select-service"),r=i=="International"?getFormVal("select-international-size"):getFormVal("select-move-size"),u=i=="International"?getFormVal("input-international-date"):getFormVal("input-move-date"),f=i=="International"?getFormVal("input-international-from-zip"):getFormVal("input-move-from-zip"),e="service="+i+"&size="+r+"&movedate="+u+"&fromzip="+f+"&tozip="+getFormVal("input-move-to-zip")+"&apptdate="+getFormVal("input-appt-date")+"&appttime="+getFormVal("select-appt-time")+"&name="+getFormVal("input-user-name")+"&email="+getFormVal("input-user-email")+"&phone="+getFormVal("input-user-phone")+"&details="+getFormVal("textarea-info-details")+"&tocountry="+getFormVal("select-international-country")+"&formtype="+getFormVal("formtype")+"&customerid="+$("#input-customer-id").val()+"&projectid="+$("#project-id").val()+"&spamCheck="+getFormVal("check");$.ajax({type:"POST",cache:!1,dataType:"json",url:"/ws/quote/",data:e+serializeSecToken(),success:function(t){var r,u;if(t.IsValid)t.Data&&t.Data.redirect?window.location=t.Data.redirect:(t.Data&&t.Data.quoteToken&&($("#quoteToken").length>0?$("#quoteToken").val(t.Data.quoteToken):n.append("<input id='quoteToken' name='quoteToken' value='"+t.Data.quoteToken+"' type='hidden'/>")),n.submit());else{button.removeAttr("disabled");button.html("Request Your Quote");t.ErrFields.service&&$("#select-service").addClass("error");t.ErrFields.size&&i=="International"&&$("#select-international-size").addClass("error");t.ErrFields.size&&i=="Residential"&&$("#select-move-size").addClass("error");t.ErrFields.movedate&&i=="International"&&$("#input-international-date").addClass("error");t.ErrFields.movedate&&i=="Residential"&&$("#input-move-date").addClass("error");t.ErrFields.tocountry&&$("#select-international-country").addClass("error");t.ErrFields.fromzip&&i=="International"&&$("#input-international-from-zip").addClass("error");t.ErrFields.fromzip&&i=="Residential"&&$("#input-move-from-zip").addClass("error");t.ErrFields.tozip&&$("#input-move-to-zip").addClass("error");t.ErrFields.apptdate&&$("#input-appt-date").addClass("error");t.ErrFields.appttime&&$("#select-appt-time").addClass("error");t.ErrFields.name&&$("#input-user-name").addClass("error");t.ErrFields.email&&$("#input-user-email").addClass("error");t.ErrFields.phone&&$("#input-user-phone").addClass("error");t.ErrFields.details&&$("#textarea-info-details").addClass("error");r="";for(u in t.ErrFields)r+=(r==""?"":"\n")+t.ErrFields[u];alert(r)}}})})}function o(){var n=$("#quote-ppc-form"),t=$("#quote-ppc-form2");n.length>0&&(n.children("#button-submit-form").click(function(n){var t;n.preventDefault();$(".error").removeClass("error");button=$(this);button.html("Submitting...");button.attr("disabled","disabled");t=getFormVal("select-service");console.log(t);var r=t=="International"?getFormVal("select-international-size"):getFormVal("select-move-size"),u=t=="International"?getFormVal("input-international-date"):getFormVal("input-move-date"),f=t=="International"?getFormVal("input-international-from-zip"):getFormVal("input-move-from-zip"),i="service="+t+"&size="+r+"&movedate="+u+"&fromzip="+f+"&tozip="+getFormVal("input-move-to-zip")+"&apptdate="+getFormVal("input-appt-date")+"&form="+getFormVal("input-form")+"&residential="+getFormVal("residentials")+"&moveservice="+getFormVal("select-service")+"&appttime="+getFormVal("select-appt-time")+"&name="+getFormVal("input-user-name")+"&email="+getFormVal("input-user-email")+"&phone="+getFormVal("input-user-phone")+"&pagepath="+getFormVal("pagepath")+"&details="+getFormVal("textarea-info-details")+"&page="+getFormVal("input-page")+"&tocountry="+getFormVal("select-international-country")+"&customerid="+$("#input-customer-id").val();$.ajax({type:"POST",cache:!1,dataType:"json",url:"/ws/quote-ppc/",data:i+serializeSecToken(),success:function(n){var r,u;if(n.IsValid)window.location=n.Data&&n.Data.redirect?n.Data.redirect:"/sem/thank-you/?"+i;else{button.removeAttr("disabled");button.html("Request Your Quote");n.ErrFields.service&&$("#select-service").addClass("error");n.ErrFields.size&&t=="International"&&$("#select-international-size").addClass("error");n.ErrFields.size&&t=="Residential"&&$("#select-move-size").addClass("error");n.ErrFields.movedate&&t=="International"&&$("#input-international-date").addClass("error");n.ErrFields.movedate&&t=="Residential"&&$("#input-move-date").addClass("error");n.ErrFields.tocountry&&$("#select-international-country").addClass("error");n.ErrFields.fromzip&&t=="International"&&$("#input-international-from-zip").addClass("error");n.ErrFields.fromzip&&t=="Residential"&&$("#input-move-from-zip").addClass("error");n.ErrFields.tozip&&$("#input-move-to-zip").addClass("error");n.ErrFields.apptdate&&$("#input-appt-date").addClass("error");n.ErrFields.appttime&&$("#select-appt-time").addClass("error");n.ErrFields.name&&$("#input-user-name").addClass("error");n.ErrFields.email&&$("#input-user-email").addClass("error");n.ErrFields.phone&&$("#input-user-phone").addClass("error");n.ErrFields.details&&$("#textarea-info-details").addClass("error");r="";for(u in n.ErrFields)r+=(r==""?"":"\n")+n.ErrFields[u];alert(r)}}})}),t.children("#button-submit-form2").click(function(n){var t;n.preventDefault();$(".error").removeClass("error");button=$(this);button.html("Submitting...");button.attr("disabled","disabled");t=getFormVal("select-service");console.log(t);var r=t=="International"?getFormVal("select-international-size"):getFormVal("select-move-size"),u=t=="International"?getFormVal("input-international-date"):getFormVal("input-move-date"),f=t=="International"?getFormVal("input-international-from-zip"):getFormVal("input-move-from-zip"),i="service="+t+"&size="+r+"&movedate="+u+"&fromzip="+f+"&tozip="+getFormVal("input-move-to-zip1")+"&apptdate="+getFormVal("input-appt-date1")+"&form="+getFormVal("input-form")+"&commercial="+getFormVal("commercials1")+"&moveservice="+getFormVal("select-service1")+"&appttime="+getFormVal("select-appt-time1")+"&name="+getFormVal("input-user-name1")+"&email="+getFormVal("input-user-email1")+"&phone="+getFormVal("input-user-phone1")+"&pagepath="+getFormVal("pagepath1")+"&details="+getFormVal("textarea-info-details1")+"&page="+getFormVal("input-page1")+"&tocountry="+getFormVal("select-international-country1")+"&customerid="+$("#input-customer-id1").val();$.ajax({type:"POST",cache:!1,dataType:"json",url:"/ws/quote-ppc/",data:i+serializeSecToken(),success:function(n){var r,u;if(n.IsValid)window.location=n.Data&&n.Data.redirect?n.Data.redirect:"/sem/thank-you/?"+i;else{button.removeAttr("disabled");button.html("Request Your Quote");n.ErrFields.service&&$("#select-service").addClass("error");n.ErrFields.size&&t=="International"&&$("#select-international-size").addClass("error");n.ErrFields.size&&t=="Residential"&&$("#select-move-size").addClass("error");n.ErrFields.movedate&&t=="International"&&$("#input-international-date").addClass("error");n.ErrFields.movedate&&t=="Residential"&&$("#input-move-date").addClass("error");n.ErrFields.tocountry&&$("#select-international-country").addClass("error");n.ErrFields.fromzip&&t=="International"&&$("#input-international-from-zip").addClass("error");n.ErrFields.fromzip&&t=="Residential"&&$("#input-move-from-zip").addClass("error");n.ErrFields.tozip&&$("#input-move-to-zip").addClass("error");n.ErrFields.apptdate&&$("#input-appt-date").addClass("error");n.ErrFields.appttime&&$("#select-appt-time").addClass("error");n.ErrFields.name&&$("#input-user-name").addClass("error");n.ErrFields.email&&$("#input-user-email").addClass("error");n.ErrFields.phone&&$("#input-user-phone").addClass("error");n.ErrFields.details&&$("#textarea-info-details").addClass("error");r="";for(u in n.ErrFields)r+=(r==""?"":"\n")+n.ErrFields[u];alert(r)}}})}))}function s(){var n=$("#quote-realtor-form");n.length>0&&n.find("#button-submit-form").click(function(t){t.preventDefault();$(".error").removeClass("error");button=$(this);button.html("Submitting...");button.attr("disabled","disabled");var i="contact=1&service="+getFormVal("select-service")+"&name="+getFormVal("input-user-name")+"&phone="+getFormVal("input-user-phone")+"&email="+getFormVal("input-user-email")+"&company="+getFormVal("input-user-company")+"&referral="+getFormVal("input-user-referral")+"&referralemail="+getFormVal("input-user-referral-email")+"&notes="+getFormVal("input-user-notes")+"&customerid="+$("#input-customer-id").val();$.ajax({type:"POST",cache:!1,dataType:"json",url:"/ws/quoterealtor/",data:i+serializeSecToken(),success:function(t){var i,r;if(t.IsValid)n.submit();else{button.removeAttr("disabled");button.html("Send Your Message");t.ErrFields.service&&$("#select-service").addClass("error");t.ErrFields.name&&$("#input-user-name").addClass("error");t.ErrFields.phone&&$("#input-user-phone").addClass("error");t.ErrFields.email&&$("#input-user-email").addClass("error");t.ErrFields.company&&$("#input-user-company").addClass("error");t.ErrFields.referral&&$("#input-user-referral").addClass("error");t.ErrFields.referralemail&&$("#input-user-referral-email").addClass("error");t.ErrFields.notes&&$("#input-user-notes").addClass("error");i="";for(r in t.ErrFields)i+=(i==""?"":"\n")+t.ErrFields[r];alert(i)}}})})}function h(){var n=$("#contact-form");n.length>0&&n.find("#button-submit-form").click(function(t){t.preventDefault();$(".error").removeClass("error");button=$(this);button.html("Submitting...");button.attr("disabled","disabled");var i="contact=1&details="+getFormVal("textarea-info-details")+"&name="+getFormVal("input-user-name")+"&phone="+getFormVal("input-user-phone")+"&email="+getFormVal("input-user-email")+"&spamCheck="+getFormVal("check");$.ajax({type:"POST",cache:!1,dataType:"json",url:"/ws/contact/",data:i+serializeSecToken(),success:function(t){var i,r;if(t.IsValid)n.submit();else{button.removeAttr("disabled");button.html("Send Your Message");t.ErrFields.details&&$("#textarea-info-details").addClass("error");t.ErrFields.name&&$("#input-user-name").addClass("error");t.ErrFields.phone&&$("#input-user-phone").addClass("error");t.ErrFields.email&&$("#input-user-email").addClass("error");i="";for(r in t.ErrFields)i+=(i==""?"":"\n")+t.ErrFields[r];alert(i)}}})})}function c(n,t){return new RegExp("(\\s|^)"+t+"(\\s|$)").test(n.className)}function l(){var r;if($("#moving-supplies").length>0){var n=$("#moving-supplies-qty"),t=$("#moving-supplies-price"),i=$("#moving-supplies").find("input.qty");if(n.text(0),t.text(0..toFixed(2)),i.blur(function(){var f=$(this),r,u;f.removeClass("error");r=0;u=0;i.each(function(){var n=$(this),t=n.val(),i=n.closest("tr").find(".total-price");isNumeric(t)?(r+=parseFloat(t),i.text((parseFloat(n.attr("data-price"))*parseFloat(t)).toFixed(2)),u+=parseFloat(i.text())):(t&&n.addClass("error"),i.text("0.00"))});n.text(r);t.text(u.toFixed(2))}),r=$("#supplies-form"),r.length>0){function u(){var n="";return i.each(function(){var t=$(this),i=t.val();isNumeric(i)&&(n+=(n==""?"":"|")+encodeURIComponent(parseFloat(i)+" "+t.attr("data-name")))}),n}r.children("#button-submit-form").click(function(i){i.preventDefault();$(".error").removeClass("error");button=$(this);button.html("Submitting...");button.attr("disabled","disabled");var r="order=1&name="+getFormVal("input-user-name")+"&address="+getFormVal("input-user-address")+"&city="+getFormVal("input-user-city")+"&state="+getFormVal("input-user-state")+"&zip="+getFormVal("input-user-zip")+"&phone="+getFormVal("input-user-phone")+"&email="+getFormVal("input-user-email")+"&totalqty="+n.text()+"&totalprice="+t.text()+"&items="+u();$.ajax({type:"POST",cache:!1,dataType:"json",url:"/ws/moving-supplies/",data:r+serializeSecToken(),success:function(n){var t,i;if(n.IsValid)window.location="/thank-you/?"+r;else{button.removeAttr("disabled");button.html("Place Order");n.ErrFields.name&&$("#input-user-name").addClass("error");n.ErrFields.address&&$("#input-user-address").addClass("error");n.ErrFields.city&&$("#input-user-city").addClass("error");n.ErrFields.state&&$("#input-user-state").addClass("error");n.ErrFields.zip&&$("#input-user-zip").addClass("error");n.ErrFields.phone&&$("#input-user-phone").addClass("error");n.ErrFields.email&&$("#input-user-email").addClass("error");t="";for(i in n.ErrFields)t+=(t==""?"":"\n")+n.ErrFields[i];alert(t)}}})})}}}function a(){var r=trim(window.location.pathname,"/"),n=r.split("/"),i,t;n.length>1&&(i=$(".page-nav-btn-group"),i.find("a").each(function(){var t=$(this);t.attr("href")=="/"+n[0]+"/"+n[1]+"/"&&t.addClass("active")}));n.length>0&&(t=$("#main-nav"),t.find("a").each(function(){var t=$(this);t.attr("href")=="/"+n[0]+"/"&&t.parent().addClass("active")}),t.find("a").each(function(){var t=$(this);n.length==2?t.attr("href")=="/"+n[0]+"/"+n[1]+"/"&&t.parent().addClass("active"):t.attr("href")=="/"+n[0]+"/"+n[1]+"/"+n[2]&&t.parent().addClass("active")}))}function v(){var n=$("#email-subscribe");n.length>0&&$("#email-subscribe-btn").click(function(n){n.preventDefault();$(".error").removeClass("error");button=$(this);button.data("text",button.html());button.html("Submitting...");button.attr("disabled","disabled");var t="blogsubscribe=1&name="+getFormVal("input-name-subscribe")+"&email="+getFormVal("input-email-subscribe")+"&spamCheck="+getFormVal("check");$.ajax({type:"POST",cache:!1,dataType:"json",url:"/ws/blogsubscribe/",data:t+serializeSecToken(),success:function(n){var i,r;if(n.IsValid)window.location="/thank-you/?"+t;else{button.removeAttr("disabled");button.html(button.data("text"));n.ErrFields.name&&$("#input-name-subscribe").addClass("error");n.ErrFields.email&&$("#input-email-subscribe").addClass("error");i="";for(r in n.ErrFields)i+=(i==""?"":"\n")+n.ErrFields[r];alert(i)}}})})}function y(){var n=$("#post-comment");n.length>0&&$("#btn-post-comment").click(function(n){n.preventDefault();$(".error").removeClass("error");button=$(this);button.html("Submitting...");button.attr("disabled","disabled");var t="name="+getFormVal("input-commenter-name")+"&email="+getFormVal("input-commenter-email")+"&comment="+getSafeHtml("textarea-commenter-comment")+"&postid="+getFormVal("input-post-id")+"&url="+getFormVal("input-post-url");$.ajax({type:"POST",cache:!1,dataType:"json",url:"/ws/blogcomment/",data:t+serializeSecToken(),success:function(n){var t,i;if(removeFeedback(),button.removeAttr("disabled"),button.html("Post Comment"),n.IsValid)alert("Thanks for your comment.\nYour comment has been posted for moderation."),window.location.reload(!0);else{n.ErrFields.name&&showValidationError("input-commenter-name");n.ErrFields.email&&showValidationError("input-commenter-email");n.ErrFields.comment&&showValidationError("textarea-commenter-comment");t="";for(i in n.ErrFields)t+=(t==""?"":"\n")+n.ErrFields[i];alert(t)}}})})}function p(){$("[data-toggle=popover]").popover({html:!0})}function w(){$(".scroll-to").on("click",function(){if(location.pathname.replace(/^\//,"")==this.pathname.replace(/^\//,"")&&location.hostname==this.hostname){var n=$(this.hash);if(n=n.length?n:$("[name="+this.hash.slice(1)+"]"),n.length)return $("html,body").animate({scrollTop:n.offset().top-100},1e3),!1}})}function b(){$(".scroll-to-collapse").on("shown.bs.collapse",function(){$("html, body").animate({scrollTop:$(this).offset().top},1e3)})}function k(){var t=$("#apply-form"),n,i;t.length>0&&(n=t.find("#apply-submit"),i=n.html(),t.find("#apply-submit").click(function(i){i.preventDefault();$(".error").removeClass("error");n=$(this);n.html("Submitting...");n.attr("disabled","disabled");t.submit()}),$("#apply-form").ajaxForm({url:"/ws/employment/",beforeSubmit:function(n,t,i){i.dataType="json"},data:{__RequestVerificationToken:decodeURIComponent(getSecToken())},error:function(){alert("Error submitting the form. Please try again later.")},success:function(r){var u,o,f,e;if(removeFeedback(),r.IsValid)f=t.attr("action"),f&&(e=t.serialize(),f.indexOf("?")>-1&&(e="&"+e),window.location.href=f+e);else{n.removeAttr("disabled");n.html(i);r.ErrFields.resume&&showValidationError("file-upload");r.ErrFields.coverletter&&showValidationError("apply-cover-letter");r.ErrFields.position&&showValidationError("apply-position");r.ErrFields.email&&showValidationError("apply-email");r.ErrFields.name&&showValidationError("apply-name");u="";for(o in r.ErrFields)u+=(u==""?"":"\n")+r.ErrFields[o];alert(u)}}}))}function d(){$(".rating-selector").each(function(n){var t=$(this).attr("id");t=t?t+"-value":"rating-hidden-"+(n+1);$("#"+t).length<=0&&$(this).append('<input id="'+t+'" name="'+t+'" type="hidden" value="5"/>');$(this).find("a").each(function(){$(this).on("click",function(){$(this).siblings("a").removeClass("yes-value");$(this).nextAll("a").addClass("yes-value");$(this).addClass("yes-value");var n=5-$(this).index();$("#"+t).val(n)})});$(this).on("mouseenter",function(){$(this).find("a").removeClass("yes-value")});$(this).on("mouseleave",function(){var n=$("#"+t).val();$(this).find("a").each(function(t,i){t>=5-n&&n!=0&&$(i).addClass("yes-value")})})})}function g(){var t=$("#form-review-post"),i,n;t.length>0&&(i=150,t.find("#input-reviewer-comment").keyup(function(){var n=$(this).val().replace(/ /g,"").length,n=i-n;n>=0&&t.find("#chars").text(n)}),t.find("#button-post-review").click(function(n){n.preventDefault();$(".error").removeClass("error");button=$(this);buttonhtml=$(this).html();button.html(submitText);button.attr("disabled","disabled");var i=t.serialize()+"&rating="+getFormVal("review-rating-value")+"&referrer="+document.referrer;$.ajax({type:"POST",cache:!1,dataType:"json",url:"/ws/postreview/",data:i+serializeSecToken(),success:function(n){removeFeedback();n.IsValid?(n.Data&&n.Data.reviewkey&&$("#reviewkey").val(n.Data.reviewkey),t.submit()):(button.removeAttr("disabled"),button.html(buttonhtml),n.ErrFields.comment&&$("#input-reviewer-comment").addClass("error"),n.ErrFields.name&&$("#input-reviewer-name").addClass("error"),n.ErrFields.market&&$("#select-review-location").addClass("error"),n.ErrFields.email&&$("#input-reviewer-email").addClass("error"),alert(getCombinedAlert(n)))}})}),n=window.location.hash,n=n?n:"",n=n.slice(1).replace("#",""),n=="write-a-review"&&$("#write-a-review").collapse("show"))}function nt(){var n=$("#review-feedback-form");n.length>0&&n.find("#button-submit-form").click(function(t){t.preventDefault();$(".error").removeClass("error");button=$(this);buttonhtml=$(this).html();button.html(submitText);button.attr("disabled","disabled");var i=n.serialize();$.ajax({type:"POST",cache:!1,dataType:"json",url:"/ws/postreviewfeedback/",data:i+serializeSecToken(),success:function(t){removeFeedback();t.IsValid?n.submit():(button.removeAttr("disabled"),button.html(buttonhtml),t.ErrFields.feedback&&$("#textarea-info-feedback").addClass("error"),alert(getCombinedAlert(t)))}})})}function tt(){$(".open-gallery").on("click",function(n){n.preventDefault();$($("a[data-bsgallery]").get(0)).trigger("click")})}function it(){$("#bootstrap-gallery").bsgallery({gallerysourceurl:"/ws/gallery/"})}function rt(){if($("#visual-quoter-form").length>0){$("#vq-modal").modal({backdrop:"static",show:!0,keyboard:!1}).on("shown",function(){$("body").addClass("modal-open-vq")});$("#btn-user-phone").on("click",function(n){n.preventDefault();var i="quotetoken="+getFormVal("visual-quoter-token")+"&phone="+getFormVal("visual-quoter-user-phone")+"&type="+getFormVal("visual-quoter-type")+"&sourcetype=phone",t=$(this);t.html("Submitting...");t.attr("disabled","disabled");$.ajax({type:"POST",cache:!1,dataType:"json",url:"/ws/sendapplink/",data:i+serializeSecToken(),success:function(n){var i,r;if(t.removeAttr("disabled"),t.html("Get the App"),n.IsValid)alert("Message sent to your mobile device."),$("#btn-skip-visual-quoter").trigger("click");else{t.removeAttr("disabled");t.html("Get the App");n.ErrFields.phone&&$("#visual-quoter-user-phone").addClass("error");i="";for(r in n.ErrFields)i+=(i==""?"":"\n")+n.ErrFields[r];alert(i)}}})});$("#btn-user-email").on("click",function(n){n.preventDefault();var i="quotetoken="+getFormVal("visual-quoter-token")+"&email="+getFormVal("visual-quoter-user-email")+"&type="+getFormVal("visual-quoter-type")+"&sourcetype=email",t=$(this);t.html("Submitting...");t.attr("disabled","disabled");$.ajax({type:"POST",cache:!1,dataType:"json",url:"/ws/sendapplink/",data:i+serializeSecToken(),success:function(n){var i,r;if(t.removeAttr("disabled"),t.html("Get the App"),n.IsValid)alert("Message sent to your email address."),getFormVal("visual-quoter-type")=="claim"?$("#vq-modal").modal("hide"):$("#btn-skip-visual-quoter").trigger("click");else{n.ErrFields.email&&$("#visual-quoter-user-email").addClass("error");i="";for(r in n.ErrFields)i+=(i==""?"":"\n")+n.ErrFields[r];alert(i)}}})});$("#btn-skip-visual-quoter").on("click",function(n){n.preventDefault();$("#vq-modal").modal("hide");$("body").removeClass("modal-open-vq")})}}function ut(){var n=$("#claim-form");if($("#claim-form").length>0){$(".claims-page .item-group:first .remove-claim-item").hide();$(".add-claim-item").on("click",function(){var n=$(".claim-items").length,i=n-1,t=$("#claim-items-"+i).clone().attr("id","claim-items-"+n).attr("data-claim-number",n).fadeIn("slow");return t.find(".claim-item-number").attr("id","claim-item-number-"+n).html("Item "+(n+1)),t.find(".remove-claim-item").attr("data-claim-number",n).attr("style",""),t.find(".claim-article").attr("id","claim-article-"+n).attr("name","ClaimItem["+n+"].Article").removeClass("error").val(""),t.find(".claim-weight").attr("id","claim-weight-"+n).attr("name","ClaimItem["+n+"].Weight").removeClass("error").val(""),t.find(".claim-present-value").attr("id","claim-present-value-"+n).attr("name","ClaimItem["+n+"].PresentValue").removeClass("error").val(""),t.find(".claim-date-acquired").attr("id","claim-date-acquired-"+n).attr("name","ClaimItem["+n+"].DateAcquired").removeClass("error").val(""),t.find(".select-date").attr("data-action-field","claim-date-acquired-"+n),t.find(".claim-orig-cost").attr("id","claim-orig-cost-"+n).attr("name","ClaimItem["+n+"].OriginalCost").removeClass("error").val(""),t.find(".claim-amount-claim").attr("id","claim-amount-claim-"+n).attr("name","ClaimItem["+n+"].AmountClaimed").removeClass("error").val(""),t.find(".claim-damage-desc").attr("id","claim-damage-desc-"+n).attr("name","ClaimItem["+n+"].DamageDescription").removeClass("error").val(""),t.find(".claim-carton-damaged").attr("id","claim-carton-damaged-"+n).attr("name","ClaimItem["+n+"].IsCartonDamged").removeClass("error").val(""),$("#claim-items-"+i).after(t),$("#claim-inventory-item-"+n).focus(),!1});$(".remove-claim-item").live("click",function(){var n=$(this).attr("data-claim-number"),t=$(".claim-items").length;return $("#claim-items-"+n).slideUp("slow",function(){var f,u,i,r;if($(this).remove(),f=parseInt(t)-parseInt(n)-parseInt(1),f>0)for(u=0;u<f;u++)i=parseInt(n)+parseInt(u),r=$("#claim-items-"+(parseInt(i)+parseInt(1))).attr("id","claim-items-"+i).attr("data-claim-number",i).fadeIn("slow"),r.find(".claim-item-number").attr("id","claim-item-number-"+i).html("Item "+(parseInt(i)+1)),r.find(".remove-claim-item").attr("data-claim-number",i),r.find(".claim-inventory-item").attr("id","claim-inventory-item-"+i).attr("name","ClaimItem["+i+"].InventoryNumber"),r.find(".claim-article").attr("id","claim-article-"+i).attr("name","ClaimItem["+i+"].Article"),r.find(".claim-weight").attr("id","claim-weight-"+i).attr("name","ClaimItem["+i+"].Weight"),r.find(".claim-present-value").attr("id","claim-present-value-"+i).attr("name","ClaimItem["+i+"].PresentValue"),r.find(".claim-date-acquired").attr("id","claim-date-acquired-"+i).attr("name","ClaimItem["+i+"].DateAcquired"),r.find(".select-date").attr("data-action-field","claim-date-acquired-"+i),r.find(".claim-orig-cost").attr("id","claim-orig-cost-"+i).attr("name","ClaimItem["+i+"].OriginalCost"),r.find(".claim-amount-claim").attr("id","claim-amount-claim-"+i).attr("name","ClaimItem["+i+"].AmountClaimed"),r.find(".claim-damage-desc").attr("id","claim-damage-desc-"+i).attr("name","ClaimItem["+i+"].DamageDescription"),r.find(".claim-carton-damaged").attr("id","claim-carton-damaged-"+i).attr("name","ClaimItem["+i+"].IsCartonDamged")}),!1});$("#btn-send-claim").length>0&&n.find("#btn-send-claim").click(function(t){t.preventDefault();$(".error").removeClass("error");button=$(this);button.html("Submitting...");button.attr("disabled","disabled");var i=$("#claim-form").serializeArray();$.post("/ws/postclaim/",i,function(t){var i,r;if(t.IsValid)t.Data.quoteToken&&$("#claim-quotetoken").val(t.Data.quoteToken),n.submit();else{button.removeAttr("disabled");button.html("Send Claim");i="";for(r in t.ErrFields)$("#"+r).addClass("error"),i+=(i==""?"":"\n")+t.ErrFields[r];alert(i)}})})}}function ft(){var n=$("#survey-form"),t;n.length>0&&(t=25,n.find("#survey-review-comments").keyup(function(){var i=$(this).val().replace(/ /g,"").length,i=t-i;i>=0&&n.find("#chars").text(i)}),$(".survey-question-row").each(function(){var n={};n.SurveyQuestionId=$(this).attr("data-id");n.AnswerType=$(this).attr("data-answertype");$(this).removeAttr("data-id");$(this).removeAttr("data-answertype");n.SurveyQuestionId&&$(this).data("question",n)}),n.find("#button-submit-form").click(function(t){var r,u,i,f;t.preventDefault();$(".error").removeClass("error");r=$(this);u=r.html();r.html("Submitting...");r.attr("disabled","disabled");i=[];$(".survey-question-row").each(function(n,t){var e=$(t),u=e.data("question"),r,o,f,s;u&&(r={},r.SurveyQuestionId=u.SurveyQuestionId,u.AnswerType=="SingleChoice"?(o=e.find("input[type=radio]:checked").val(),o&&(r.SurveyAnswerId=o,i.push(r))):u.AnswerType=="MultipleChoice"?e.find("input[type=checkbox]:checked").each(function(){var n=$(this).val();n&&i.push({SurveyQuestionId:u.SurveyQuestionId,SurveyAnswerId:n})}):u.AnswerType=="SingleLine"||u.AnswerType=="MultipleLine"?(f=e.find("input[type=text],textarea").val(),f&&(r.AnswerText=f,i.push(r))):u.AnswerType=="YesNo"?(f=e.find("input[type=radio]:checked").val(),f&&(r.AnswerText=f,i.push(r))):u.AnswerType=="Rating"&&(s=e.find("input[type=radio]:checked").val(),s&&(r.AnswerValue=s,i.push(r))))});f=n.serialize()+"&rating="+getFormVal("review-rating-value")+"&referrer="+document.referrer+"&surveyresponses="+JSON.stringify(i);$.ajax({type:"POST",cache:!1,dataType:"json",url:"/ws/survey/",data:f+serializeSecToken(),success:function(t){var f,i,e;if(removeFeedback(),t.IsValid)t.Data&&t.Data.redirect?window.location=t.Data.redirect:n.submit();else{r.removeAttr("disabled");r.html(u);t.ErrFields.name&&showValidationError("input-user-name");t.ErrFields.email&&showValidationError("input-user-email");t.ErrFields.rating&&$("#review-rating-value").closest(".survey-question-row").addClass("has-error");t.ErrFields.market&&showValidationError("survey-review-location");t.ErrFields.reviewtitle&&showValidationError("survey-review-title");t.ErrFields.comment&&showValidationError("survey-review-comments");t.Data.questionerrorfields&&(f=$.parseJSON(t.Data.questionerrorfields),$.each(f,function(n,t){t.question&&t.question!=""&&$(".survey-question-row:nth("+t.question.replace("q","")+")").addClass("has-error")}));i="";for(e in t.ErrFields)i+=(i==""?"":"\n")+t.ErrFields[e];alert(i)}}})}))}function et(){if($("#jcre-btn").length>0){var n=new formObj;n.formRedirects=!0;n.isAdmin=!0;n.button="jcre-btn";n.disabledText="Submiting...";n.service="/ws/jcre/";n.data=function(){return"&jcre=1&name="+getFormVal("jcre-input-name")+"&address="+getFormVal("jcre-input-address")+"&city="+getFormVal("jcre-input-city")+"&state="+getFormVal("jcre-input-state")+"&zip="+getFormVal("jcre-input-zip")+"&cellphone="+getFormVal("jcre-input-cellphone")+"&email="+getFormVal("jcre-input-email")+"&destinationcity="+getFormVal("jcre-input-destinationcity")+"&destinationstate="+getFormVal("jcre-input-destinationstate")+"&destinationzip="+getFormVal("jcre-input-destinationzip")+"&movedate="+getFormVal("input-Move-date")+"&sizehome="+getFormVal("jcre-select-sizehome")+"&needstorage="+getRadioVal("jcre-input-storage")};n.callback=function(n){if(n.IsValid)window.location="/thankyou/?&jcre=1&address="+getFormVal("jcre-input-address")+"&name="+getFormVal("jcre-input-name")+"&homephone="+getFormVal("jcre-input-homephone")+"&city="+getFormVal("jcre-input-city")+"&state="+getFormVal("jcre-input-state")+"&zip="+getFormVal("jcre-input-zip")+"&officephone="+getFormVal("jcre-input-officephone")+"&cellphone="+getFormVal("jcre-input-cellphone")+"&destinationcity="+getFormVal("jcre-input-destinationcity")+"&destinationstate="+getFormVal("jcre-input-destinationstate")+"&destinationzip="+getFormVal("jcre-input-destinationzip")+"&sizehome="+getFormVal("jcre-select-sizehome")+"&movedate="+getFormVal("input-Move-date")+"&needstorage="+getRadioVal("jcre-input-storage")+"&email="+getFormVal("jcre-input-email");else{var t=n.ErrFields;t.name&&showValidationError("jcre-input-name",t.name);t.cellphone&&showValidationError("jcre-input-cellphone",t.cellphone);t.email&&showValidationError("jcre-input-email",t.email);alert(getCombinedAlert(n))}};n.initForm()}}function ot(){if($("#narfe-btn").length>0){var n=new formObj;n.formRedirects=!0;n.isAdmin=!0;n.button="narfe-btn";n.disabledText="Submiting...";n.service="/ws/titlemax/";n.data=function(){return"&titlemax=1&address="+getFormVal("narfe-input-address")+"&name="+getFormVal("narfe-input-name")+"&homephone="+getFormVal("narfe-input-homephone")+"&city="+getFormVal("narfe-input-city")+"&state="+getFormVal("narfe-input-state")+"&zip="+getFormVal("narfe-input-zip")+"&officephone="+getFormVal("narfe-input-officephone")+"&cellphone="+getFormVal("narfe-input-cellphone")+"&destinationcity="+getFormVal("narfe-input-destinationcity")+"&destinationstate="+getFormVal("narfe-input-destinationstate")+"&destinationzip="+getFormVal("narfe-input-destinationzip")+"&sizehome="+getFormVal("narfe-select-sizehome")+"&movedate="+getFormVal("input-Move-date")+"&needstorage="+getRadioVal("narfe-input-storage")+"&email="+getFormVal("narfe-input-email")+"&type=narfe"};n.callback=function(n){if(n.IsValid)window.location="/thankyou/?&titlemax=1&address="+getFormVal("narfe-input-address")+"&name="+getFormVal("narfe-input-name")+"&homephone="+getFormVal("narfe-input-homephone")+"&city="+getFormVal("narfe-input-city")+"&state="+getFormVal("narfe-input-state")+"&zip="+getFormVal("narfe-input-zip")+"&officephone="+getFormVal("narfe-input-officephone")+"&cellphone="+getFormVal("narfe-input-cellphone")+"&destinationcity="+getFormVal("narfe-input-destinationcity")+"&destinationstate="+getFormVal("narfe-input-destinationstate")+"&destinationzip="+getFormVal("narfe-input-destinationzip")+"&sizehome="+getFormVal("narfe-select-sizehome")+"&movedate="+getFormVal("input-Move-date")+"&needstorage="+getRadioVal("narfe-input-storage")+"&email="+getFormVal("narfe-input-email")+"&type="+getFormVal("type");else{var t=n.ErrFields;t.name&&showValidationError("narfe-input-name",t.name);t.cellphone&&showValidationError("narfe-input-cellphone",t.cellphone);t.email&&showValidationError("narfe-input-email",t.email)}};n.initForm()}}function st(){if($("#titlemax-btn").length>0){var n=new formObj;n.formRedirects=!0;n.isAdmin=!0;n.button="titlemax-btn";n.disabledText="Submiting...";n.service="/ws/titlemax/";n.data=function(){return"&titlemax=1&address="+getFormVal("titlemax-input-address")+"&name="+getFormVal("titlemax-input-name")+"&homephone="+getFormVal("titlemax-input-homephone")+"&city="+getFormVal("titlemax-input-city")+"&state="+getFormVal("titlemax-input-state")+"&zip="+getFormVal("titlemax-input-zip")+"&officephone="+getFormVal("titlemax-input-officephone")+"&cellphone="+getFormVal("titlemax-input-cellphone")+"&destinationcity="+getFormVal("titlemax-input-destinationcity")+"&destinationstate="+getFormVal("titlemax-input-destinationstate")+"&destinationzip="+getFormVal("titlemax-input-destinationzip")+"&sizehome="+getFormVal("titlemax-select-sizehome")+"&movedate="+getFormVal("input-Move-date")+"&needstorage="+getRadioVal("titlemax-input-storage")+"&email="+getFormVal("titlemax-input-email")+"&type="+getFormVal("type")};n.callback=function(n){if(n.IsValid)window.location="/thankyou/?&titlemax=1&address="+getFormVal("titlemax-input-address")+"&name="+getFormVal("titlemax-input-name")+"&homephone="+getFormVal("titlemax-input-homephone")+"&city="+getFormVal("titlemax-input-city")+"&state="+getFormVal("titlemax-input-state")+"&zip="+getFormVal("titlemax-input-zip")+"&officephone="+getFormVal("titlemax-input-officephone")+"&cellphone="+getFormVal("titlemax-input-cellphone")+"&destinationcity="+getFormVal("titlemax-input-destinationcity")+"&destinationstate="+getFormVal("titlemax-input-destinationstate")+"&destinationzip="+getFormVal("titlemax-input-destinationzip")+"&sizehome="+getFormVal("titlemax-select-sizehome")+"&movedate="+getFormVal("input-Move-date")+"&needstorage="+getRadioVal("titlemax-input-storage")+"&email="+getFormVal("titlemax-input-email")+"&type="+getFormVal("type");else{var t=n.ErrFields;t.name&&showValidationError("titlemax-input-name",t.name);t.cellphone&&showValidationError("titlemax-input-cellphone",t.cellphone);t.email&&showValidationError("titlemax-input-email",t.email)}};n.initForm()}}function ht(){if($("#TheMIGroup-btn").length>0){var n=new formObj;n.formRedirects=!0;n.isAdmin=!0;n.button="TheMIGroup-btn";n.disabledText="Submiting...";n.service="/ws/themigroup/";n.data=function(){return"&TheMIGroup=1&address="+getFormVal("TheMIGroup-input-address")+"&name="+getFormVal("TheMIGroup-input-name")+"&homephone="+getFormVal("TheMIGroup-input-homephone")+"&city="+getFormVal("TheMIGroup-input-city")+"&state="+getFormVal("TheMIGroup-input-state")+"&zip="+getFormVal("TheMIGroup-input-zip")+"&officephone="+getFormVal("TheMIGroup-input-officephone")+"&cellphone="+getFormVal("TheMIGroup-input-cellphone")+"&destinationcity="+getFormVal("TheMIGroup-input-destinationcity")+"&destinationstate="+getFormVal("TheMIGroup-input-destinationstate")+"&destinationzip="+getFormVal("TheMIGroup-input-destinationzip")+"&sizehome="+getFormVal("TheMIGroup-select-sizehome")+"&movedate="+getFormVal("input-Move-date")+"&needstorage="+getRadioVal("TheMIGroup-input-storage")+"&email="+getFormVal("TheMIGroup-input-email")};n.callback=function(n){if(n.IsValid)window.location="/migroup/thank-you/?&TheMIGroup=1&address="+getFormVal("TheMIGroup-input-address")+"&name="+getFormVal("TheMIGroup-input-name")+"&homephone="+getFormVal("TheMIGroup-input-homephone")+"&city="+getFormVal("TheMIGroup-input-city")+"&state="+getFormVal("TheMIGroup-input-state")+"&zip="+getFormVal("TheMIGroup-input-zip")+"&officephone="+getFormVal("TheMIGroup-input-officephone")+"&cellphone="+getFormVal("TheMIGroup-input-cellphone")+"&destinationcity="+getFormVal("TheMIGroup-input-destinationcity")+"&destinationstate="+getFormVal("TheMIGroup-input-destinationstate")+"&destinationzip="+getFormVal("TheMIGroup-input-destinationzip")+"&sizehome="+getFormVal("TheMIGroup-select-sizehome")+"&movedate="+getFormVal("input-Move-date")+"&needstorage="+getRadioVal("TheMIGroup-input-storage")+"&email="+getFormVal("TheMIGroup-input-email");else{var t=n.ErrFields;t.name&&showValidationError("TheMIGroup-input-name",t.name);t.cellphone&&showValidationError("TheMIGroup-input-cellphone",t.cellphone);t.email&&showValidationError("TheMIGroup-input-email",t.email)}};n.initForm()}}function ct(){if($("#aflac-btn").length>0){var n=new formObj;n.formRedirects=!0;n.isAdmin=!0;n.button="aflac-btn";n.disabledText="Submiting...";n.service="/ws/aflac/";n.data=function(){return"&aflac=1&address="+getFormVal("aflac-input-address")+"&name="+getFormVal("aflac-input-name")+"&homephone="+getFormVal("aflac-input-homephone")+"&city="+getFormVal("aflac-input-city")+"&state="+getFormVal("aflac-input-state")+"&zip="+getFormVal("aflac-input-zip")+"&officephone="+getFormVal("aflac-input-officephone")+"&cellphone="+getFormVal("aflac-input-cellphone")+"&destinationcity="+getFormVal("aflac-input-destinationcity")+"&destinationstate="+getFormVal("aflac-input-destinationstate")+"&destinationzip="+getFormVal("aflac-input-destinationzip")+"&sizehome="+getFormVal("aflac-select-sizehome")+"&movedate="+getFormVal("input-Move-date")+"&needstorage="+getRadioVal("aflac-input-storage")+"&email="+getFormVal("aflac-input-email")};n.callback=function(n){if(n.IsValid)window.location="/thankyou/?&aflac=1&address="+getFormVal("aflac-input-address")+"&name="+getFormVal("aflac-input-name")+"&homephone="+getFormVal("aflac-input-homephone")+"&city="+getFormVal("aflac-input-city")+"&state="+getFormVal("aflac-input-state")+"&zip="+getFormVal("aflac-input-zip")+"&officephone="+getFormVal("aflac-input-officephone")+"&cellphone="+getFormVal("aflac-input-cellphone")+"&destinationcity="+getFormVal("aflac-input-destinationcity")+"&destinationstate="+getFormVal("aflac-input-destinationstate")+"&destinationzip="+getFormVal("aflac-input-destinationzip")+"&sizehome="+getFormVal("aflac-select-sizehome")+"&movedate="+getFormVal("input-Move-date")+"&needstorage="+getRadioVal("aflac-input-storage")+"&email="+getFormVal("aflac-input-email");else{var t=n.ErrFields;t.name&&showValidationError("aflac-input-name",t.name);t.cellphone&&showValidationError("aflac-input-cellphone",t.cellphone);t.email&&showValidationError("aflac-input-email",t.email)}};n.initForm()}}function lt(){if($("#emorytheology-btn").length>0){var n=new formObj;n.formRedirects=!0;n.isAdmin=!0;n.button="emorytheology-btn";n.disabledText="Submiting...";n.service="/ws/emorytheology/";n.data=function(){return"&emorytheology=1&address="+getFormVal("emorytheology-input-address")+"&name="+getFormVal("emorytheology-input-name")+"&homephone="+getFormVal("emorytheology-input-homephone")+"&city="+getFormVal("emorytheology-input-city")+"&state="+getFormVal("emorytheology-input-state")+"&zip="+getFormVal("emorytheology-input-zip")+"&officephone="+getFormVal("emorytheology-input-officephone")+"&cellphone="+getFormVal("emorytheology-input-cellphone")+"&destinationcity="+getFormVal("emorytheology-input-destinationcity")+"&destinationstate="+getFormVal("emorytheology-input-destinationstate")+"&destinationzip="+getFormVal("emorytheology-input-destinationzip")+"&sizehome="+getFormVal("emorytheology-select-sizehome")+"&movedate="+getFormVal("input-Move-date")+"&needstorage="+getRadioVal("emorytheology-input-storage")+"&needoffice="+getRadioVal("emorytheology-input-office")+"&email="+getFormVal("emorytheology-input-email")};n.callback=function(n){if(n.IsValid)window.location="/thankyou/?&emorytheology=1&address="+getFormVal("emorytheology-input-address")+"&name="+getFormVal("emorytheology-input-name")+"&homephone="+getFormVal("emorytheology-input-homephone")+"&city="+getFormVal("emorytheology-input-city")+"&state="+getFormVal("emorytheology-input-state")+"&zip="+getFormVal("emorytheology-input-zip")+"&officephone="+getFormVal("emorytheology-input-officephone")+"&cellphone="+getFormVal("emorytheology-input-cellphone")+"&destinationcity="+getFormVal("emorytheology-input-destinationcity")+"&destinationstate="+getFormVal("emorytheology-input-destinationstate")+"&destinationzip="+getFormVal("emorytheology-input-destinationzip")+"&sizehome="+getFormVal("emorytheology-select-sizehome")+"&movedate="+getFormVal("input-Move-date")+"&needstorage="+getRadioVal("emorytheology-input-storage")+"&needoffice="+getRadioVal("emorytheology-input-office")+"&email="+getFormVal("emorytheology-input-email");else{var t=n.ErrFields;t.name&&showValidationError("emorytheology-input-name",t.name);t.cellphone&&showValidationError("emorytheology-input-cellphone",t.cellphone);t.email&&showValidationError("emorytheology-input-email",t.email)}};n.initForm()}}function at(){if($("#emoryuniversity-btn").length>0){var n=new formObj;n.formRedirects=!0;n.isAdmin=!1;n.button="emoryuniversity-btn";n.disabledText="Submiting...";n.service="/ws/emoryuniversity/";n.data=function(){return"&emoryuniversity=1&formtype=emoryuniversity&address="+getFormVal("emoryuniversity-input-address")+"&name="+getFormVal("emoryuniversity-input-name")+"&homephone="+getFormVal("emoryuniversity-input-homephone")+"&city="+getFormVal("emoryuniversity-input-city")+"&department="+getFormVal("emoryuniversity-input-department")+"&deptcontact="+getFormVal("emoryuniversity-input-deptcontact")+"&state="+getFormVal("emoryuniversity-input-state")+"&zip="+getFormVal("emoryuniversity-input-zip")+"&officephone="+getFormVal("emoryuniversity-input-officephone")+"&cellphone="+getFormVal("emoryuniversity-input-cellphone")+"&destinationcity="+getFormVal("emoryuniversity-input-destinationcity")+"&destinationstate="+getFormVal("emoryuniversity-input-destinationstate")+"&destinationzip="+getFormVal("emoryuniversity-input-destinationzip")+"&sizehome="+getFormVal("emoryuniversity-select-sizehome")+"&movedate="+getFormVal("input-Move-date")+"&needstorage="+getRadioVal("emoryuniversity-input-storage")+"&laboratory="+getRadioVal("emoryuniversity-input-laboratory")+"&email="+getFormVal("emoryuniversity-input-email")};n.callback=function(n){if(n.IsValid)window.location="/thankyou/?&emoryuniversity=1&address="+getFormVal("emoryuniversity-input-address")+"&name="+getFormVal("emoryuniversity-input-name")+"&homephone="+getFormVal("emoryuniversity-input-homephone")+"&city="+getFormVal("emoryuniversity-input-city")+"&department="+getFormVal("emoryuniversity-input-department")+"&deptcontact="+getFormVal("emoryuniversity-input-deptcontact")+"&state="+getFormVal("emoryuniversity-input-state")+"&zip="+getFormVal("emoryuniversity-input-zip")+"&officephone="+getFormVal("emoryuniversity-input-officephone")+"&cellphone="+getFormVal("emoryuniversity-input-cellphone")+"&destinationcity="+getFormVal("emoryuniversity-input-destinationcity")+"&destinationstate="+getFormVal("emoryuniversity-input-destinationstate")+"&destinationzip="+getFormVal("emoryuniversity-input-destinationzip")+"&sizehome="+getFormVal("emoryuniversity-select-sizehome")+"&movedate="+getFormVal("input-Move-date")+"&needstorage="+getRadioVal("emoryuniversity-input-storage")+"&laboratory="+getRadioVal("emoryuniversity-input-laboratory")+"&email="+getFormVal("emoryuniversity-input-email");else{var t=n.ErrFields;t.department&&showValidationError("emoryuniversity-input-department",t.department);t.deptcontact&&showValidationError("emoryuniversity-input-deptcontact",t.deptcontact);t.name&&showValidationError("emoryuniversity-input-name",t.name);t.cellphone&&showValidationError("emoryuniversity-input-cellphone",t.cellphone);t.email&&showValidationError("emoryuniversity-input-email",t.email)}};n.initForm()}}function vt(){if($("#fscj-btn").length>0){var n=new formObj;n.formRedirects=!0;n.isAdmin=!1;n.button="fscj-btn";n.disabledText="Submiting...";n.service="/ws/emoryuniversity/";n.data=function(){return"&fscj=1&address="+getFormVal("fscj-input-address")+"&formtype=fscj&name="+getFormVal("fscj-input-name")+"&homephone="+getFormVal("fscj-input-homephone")+"&city="+getFormVal("fscj-input-city")+"&department="+getFormVal("fscj-input-department")+"&deptcontact="+getFormVal("fscj-input-deptcontact")+"&state="+getFormVal("fscj-input-state")+"&zip="+getFormVal("fscj-input-zip")+"&officephone="+getFormVal("fscj-input-officephone")+"&cellphone="+getFormVal("fscj-input-cellphone")+"&destinationcity="+getFormVal("fscj-input-destinationcity")+"&destinationstate="+getFormVal("fscj-input-destinationstate")+"&destinationzip="+getFormVal("fscj-input-destinationzip")+"&sizehome="+getFormVal("fscj-select-sizehome")+"&movedate="+getFormVal("input-Move-date")+"&needstorage="+getRadioVal("fscj-input-storage")+"&laboratory="+getRadioVal("fscj-input-laboratory")+"&email="+getFormVal("fscj-input-email")};n.callback=function(n){if(n.IsValid)window.location="/thankyou/?&fscj=1&address="+getFormVal("fscj-input-address")+"&name="+getFormVal("fscj-input-name")+"&homephone="+getFormVal("fscj-input-homephone")+"&city="+getFormVal("fscj-input-city")+"&department="+getFormVal("fscj-input-department")+"&deptcontact="+getFormVal("fscj-input-deptcontact")+"&state="+getFormVal("fscj-input-state")+"&zip="+getFormVal("fscj-input-zip")+"&officephone="+getFormVal("fscj-input-officephone")+"&cellphone="+getFormVal("fscj-input-cellphone")+"&destinationcity="+getFormVal("fscj-input-destinationcity")+"&destinationstate="+getFormVal("fscj-input-destinationstate")+"&destinationzip="+getFormVal("fscj-input-destinationzip")+"&sizehome="+getFormVal("fscj-select-sizehome")+"&movedate="+getFormVal("input-Move-date")+"&needstorage="+getRadioVal("fscj-input-storage")+"&laboratory="+getRadioVal("fscj-input-laboratory")+"&email="+getFormVal("fscj-input-email");else{var t=n.ErrFields;t.department&&showValidationError("fscj-input-department",t.department);t.deptcontact&&showValidationError("fscj-input-deptcontact",t.deptcontact);t.name&&showValidationError("fscj-input-name",t.name);t.cellphone&&showValidationError("fscj-input-cellphone",t.cellphone);t.email&&showValidationError("fscj-input-email",t.email)}};n.initForm()}}function yt(){var n=$("#ins-lead-banner");if(n.length){$("#modal-liberty-mutual").modal({backdrop:"static"});n.on("click",function(n){n.preventDefault();$.post("/ws/ins-lead/","quoteToken="+$("input[name='quoteToken']").val()+serializeSecToken(),function(n){n.IsValid&&($(".modal-body").addClass("hide"),$(".modal-body-thank-you").removeClass("hide"),trackOutboundLink("Spectrum Lead","Insurance","Liberty Mutual"))});$(".modal-body").addClass("hide");$(".modal-body-thank-you").removeClass("hide")})}}function pt(){var n=$("#payment-form");if(n.length>0){$("#payment-input-sameascurrent").on("change",function(){var n=$(this).is(":checked");n?$(".billing-info-control").attr("readonly","readonly"):$(".billing-info-control").removeAttr("readonly")});$("#btn-payment").on("click",function(t){function u(n){n?$("input[placeholder]").each(function(){$(this).val()==""&&$(this).val($(this).attr("placeholder"))}):$("input[placeholder]").each(function(){$(this).val()===$(this).attr("placeholder")&&$(this).val("")})}t.preventDefault();var i=$(this),r=i.html();i.hasClass("disabled")||(i.addClass("disabled"),i.text("Submitting..."),n.find("input[type=checkbox]").each(function(){$(this).is(":checked")?$(this).val("true"):$(this).val("false")}),$("#payment-input-sameascurrent").is(":checked")&&($("#payment-input-billingaddress1").val($("#payment-input-currentaddress1").val()),$("#payment-input-billingaddress2").val($("#payment-input-currentaddress2").val()),$("#payment-input-billingcity").val($("#payment-input-currentcity").val()),$("#payment-input-billingstate").val($("#payment-input-currentstate").val()),$("#payment-input-billingzip").val($("#payment-input-currentzip").val()),$("#payment-input-billingcountry").val($("#payment-input-currentcountry").val())),navigator.userAgent.indexOf("MSIE")>0&&u(!1),$.ajax({type:"POST",url:"/ws/payment/",data:n.serialize()+serializeSecToken(),success:function(t){if(i.removeClass("disabled"),i.html(r),removeFeedback(),navigator.userAgent.indexOf("MSIE")>0&&u(!0),t.IsValid)t.IsValid?n.submit():alert(t.Data.message);else{var f=t.ErrFields,e="payment-input-";f.email&&showValidationErrorField(e+"email");f.regno&&showValidationErrorField(e+"regno");f.firstname&&showValidationErrorField(e+"firstname");f.lastname&&showValidationErrorField(e+"lastname");f.company&&showValidationErrorField(e+"company");f.phone&&showValidationErrorField(e+"phone");f.additionalphone&&showValidationErrorField(e+"additionalphone");f.currentaddress1&&showValidationErrorField(e+"currentaddress1");f.currentaddress2&&showValidationErrorField(e+"currentaddress2");f.currentcity&&showValidationErrorField(e+"currentcity");f.currentstate&&showValidationErrorField(e+"currentstate");f.currentzip&&showValidationErrorField(e+"currentzip");f.currentcountry&&showValidationErrorField(e+"currentcountry");f.billingaddress1&&showValidationErrorField(e+"billingaddress1");f.billingaddress2&&showValidationErrorField(e+"billingaddress2");f.billingcity&&showValidationErrorField(e+"billingcity");f.billingstate&&showValidationErrorField(e+"billingstate");f.billingzip&&showValidationErrorField(e+"billingzip");f.billingcountry&&showValidationErrorField(e+"billingcountry");f.billingphone&&showValidationErrorField(e+"billingphone");f.cardholdername&&showValidationErrorField(e+"cardholdername");f.cardno&&showValidationErrorField(e+"cardno");f.cardexpmonth&&showValidationErrorField(e+"cardexpmonth");f.cardexpyear&&showValidationErrorField(e+"cardexpyear");f.cardcvv&&showValidationErrorField(e+"cardcvv");f.paymentreason&&showValidationErrorField(e+"paymentreason");f.paymentamount&&showValidationErrorField(e+"paymentamount");alert(getCombinedAlert(t))}},error:function(){i.removeClass("disabled");i.html(r);alert("Error Occurred Please try again later")}}))})}}function wt(){if($("#payment-confirm-form").length>0){var n=new formObj;n.formRedirects=!0;n.isAdmin=!1;n.button="btn-payment-confirm";n.disabledText="Submiting...";n.service="/ws/payment/confirm/";n.data=function(){return $("#payment-confirm-form").serialize()};n.callback=function(n){n.IsValid?n.Data.redirect?window.location=n.Data.redirect:alert(n.Data.message):alert(getCombinedAlert(n))};n.initForm()}}function bt(){if($("#mapsvg-usa").length>0&&$("#mapsvg-usa").mapSvg({source:"/maps/svg-maps/usa-labels.svg",loadingText:"Loading map...",width:570,responsive:1,cursor:"pointer",colors:{background:"transparent",hover:4,selected:10,stroke:"#ffffff"},disableAll:!0,tooltipsMode:"names",regions:{AK:{selected:!0,attr:{fill:"#fa9344"}},AZ:{selected:!0,attr:{fill:"#fa9344"}},AL:{selected:!0,attr:{fill:"#fa9344"}},CA:{selected:!0,attr:{fill:"#fa9344"}},CO:{selected:!0,attr:{fill:"#fa9344"}},FL:{selected:!0,attr:{fill:"#fa9344"}},GA:{selected:!0,attr:{fill:"#fa9344"}},HI:{selected:!0,attr:{fill:"#fa9344"}},IN:{selected:!0,attr:{fill:"#fa9344"}},KS:{selected:!0,attr:{fill:"#fa9344"}},KY:{selected:!0,attr:{fill:"#fa9344"}},LA:{selected:!0,attr:{fill:"#fa9344"}},MD:{selected:!0,attr:{fill:"#fa9344"}},NC:{selected:!0,attr:{fill:"#fa9344"}},NE:{selected:!0,attr:{fill:"#fa9344"}},NV:{selected:!0,attr:{fill:"#fa9344"}},OK:{selected:!0,attr:{fill:"#fa9344"}},SC:{selected:!0,attr:{fill:"#fa9344"}},TN:{selected:!0,attr:{fill:"#fa9344"}},TX:{selected:!0,attr:{fill:"#fa9344"}},VA:{selected:!0,attr:{fill:"#fa9344"}},WA:{selected:!0,attr:{fill:"#fa9344"}}},zoom:!0,pan:!0,onClick:function(){$("#mapsvg-usa").hide();var n="usa-"+this.name.toLowerCase()+".svg";console.log($(this));$("#area-served-locations a").each(function(){$(this).attr("data-svg")==n&&$(this).trigger("click")})}}),$("#mapsvg-usa-states").length>0)$("#area-served-locations a").on("click",function(n){n.preventDefault();$("#mapsvg-usa").hide();$("#mapsvg-usa-states").show();$("#back-to-usmap").show();$("#mapsvg-usa-states").find("svg").length&&$("#mapsvg-usa-states").empty().mapSvg().destroy();var t=$(this).attr("data-svg");t=="usa-al.svg"?$("#mapsvg-usa-states").mapSvg({source:"/maps/svg-maps/counties/"+t,loadingText:"Loading map...",responsive:1,colors:{background:"transparent",base:"#DDDDDD",stroke:"#ffffff"},width:$("#mapsvg-usa").width(),height:$("#mapsvg-usa").height()+100,zoom:!0,pan:!0,marks:[{xy:[18,19],tooltip:"Dothan Area",attrs:{href:"/areas-served/dothan-al/",src:"/maps/markers/orange_circle_30x30.png"}},{xy:[2,-22],tooltip:"Huntsville Area",attrs:{href:"/areas-served/huntsville-al/",src:"/maps/markers/orange_circle_30x30.png"}},{xy:[7,5],tooltip:"Montgomery Area",attrs:{href:"/areas-served/montgomery-al/",src:"/maps/markers/orange_circle_30x30.png"}},{xy:[0,-5],tooltip:"Birmingham Area",attrs:{href:"/areas-served/birmingham-al/",src:"/maps/markers/orange_circle_30x30.png"}},{xy:[-7,29],tooltip:"Mobile Area",attrs:{href:"/areas-served/mobile-al/",src:"/maps/markers/orange_circle_30x30.png"}}]}):t=="usa-ak.svg"?$("#mapsvg-usa-states").mapSvg({source:"/maps/svg-maps/counties/"+t,loadingText:"Loading map...",responsive:1,colors:{background:"transparent",base:"#DDDDDD",stroke:"#ffffff"},width:$("#mapsvg-usa").width(),height:$("#mapsvg-usa").height()+100,zoom:!0,pan:!0,marks:[{xy:[72,24],tooltip:"Anchorage Area",attrs:{href:"/areas-served/anchorage-ak/",src:"/maps/markers/orange_circle_30x30.png"}},{xy:[75,5],tooltip:"Fairbanks Area",attrs:{href:"/areas-served/fairbanks-ak/",src:"/maps/markers/orange_circle_30x30.png"}},{xy:[113,28],tooltip:"Juneau Area",attrs:{href:"/areas-served/juneau-ak/",src:"/maps/markers/orange_circle_30x30.png"}},{xy:[65,44],tooltip:"Kodiak Area",attrs:{href:"/areas-served/kodiak-ak/",src:"/maps/markers/orange_circle_30x30.png"}},{xy:[126,39],tooltip:"Ketchikan Area",attrs:{href:"/areas-served/ketchikan-ak/",src:"/maps/markers/orange_circle_30x30.png"}},{xy:[110,33],tooltip:"Sitka Area",attrs:{href:"/areas-served/sitka-ak/",src:"/maps/markers/orange_circle_30x30.png"}}]}):t=="usa-ca.svg"?$("#mapsvg-usa-states").mapSvg({source:"/maps/svg-maps/counties/"+t,loadingText:"Loading map...",responsive:1,colors:{background:"transparent",base:"#DDDDDD",stroke:"#ffffff"},width:$("#mapsvg-usa").width(),height:$("#mapsvg-usa").height()+100,zoom:!0,pan:!0,marks:[{xy:[38,107],tooltip:"San Diego Area",attrs:{href:"/areas-served/san-diego-ca/",src:"/maps/markers/orange_circle_30x30.png"}}]}):t=="usa-co.svg"?$("#mapsvg-usa-states").mapSvg({source:"/maps/svg-maps/counties/"+t,loadingText:"Loading map...",responsive:1,colors:{background:"transparent",base:"#DDDDDD",stroke:"#ffffff"},width:$("#mapsvg-usa").width(),height:$("#mapsvg-usa").height()+100,zoom:!0,pan:!0,marks:[{xy:[32,8],tooltip:"Colorado Springs Area",attrs:{href:"/areas-served/colorado-springs-co/",src:"/maps/markers/orange_circle_30x30.png"}}]}):t=="usa-fl.svg"?$("#mapsvg-usa-states").mapSvg({source:"/maps/svg-maps/counties/"+t,loadingText:"Loading map...",responsive:1,colors:{background:"transparent",base:"#DDDDDD",stroke:"#ffffff"},width:$("#mapsvg-usa").width(),height:$("#mapsvg-usa").height()+100,zoom:!0,pan:!0,marks:[{xy:[13,-12],tooltip:"Panama City area",attrs:{href:"/areas-served/panama-city-fl/",src:"/maps/markers/orange_circle_30x30.png"}},{xy:[0,-16.5],tooltip:"Fort Walton Beach-Crestview-Destin area",attrs:{href:"/areas-served/fort-walton-beach-fl/",src:"/maps/markers/orange_circle_30x30.png"}},{xy:[53.5,-20.5],tooltip:"Jacksonville area",attrs:{href:"/areas-served/jacksonville-fl/",src:"/maps/markers/orange_circle_30x30.png"}},{xy:[77,34],tooltip:"Miami area",attrs:{href:"/areas-served/miami-fl/",src:"/maps/markers/orange_circle_30x30.png"}},{xy:[62,3],tooltip:"Orlando area",attrs:{href:"/areas-served/orlando-fl/",src:"/maps/markers/orange_circle_30x30.png"}},{xy:[-9,-14],tooltip:"Pensacola area",attrs:{href:"/areas-served/pensacola-fl/",src:"/maps/markers/orange_circle_30x30.png"}},{xy:[51,10],tooltip:"Tampa area",attrs:{href:"/areas-served/tampa-fl/",src:"/maps/markers/orange_circle_30x30.png"}},{xy:[78,30],tooltip:"Fort Lauderdale area",attrs:{href:"/areas-served/fort-lauderdale-fl/",src:"/maps/markers/orange_circle_30x30.png"}},{xy:[69,9],tooltip:"Palm Bay-Melbourne-Titusville area",attrs:{href:"/areas-served/melbourne-fl/",src:"/maps/markers/orange_circle_30x30.png"}}]}):t=="usa-ga.svg"?$("#mapsvg-usa-states").mapSvg({source:"/maps/svg-maps/counties/"+t,loadingText:"Loading map...",responsive:1,colors:{background:"transparent",base:"#DDDDDD",stroke:"#ffffff"},width:$("#mapsvg-usa").width(),height:$("#mapsvg-usa").height()+100,zoom:!0,pan:!0,marks:[{xy:[148,107],tooltip:"Atlanta Area",attrs:{href:"/areas-served/atlanta-ga/",src:"/maps/markers/orange_circle_30x30.png"}},{xy:[319,152],tooltip:"Augusta Area",attrs:{href:"/areas-served/augusta-ga/",src:"/maps/markers/orange_circle_30x30.png"}},{xy:[88,262],tooltip:"Columbus Area",attrs:{href:"/areas-served/columbus-ga/",src:"/maps/markers/orange_circle_30x30.png"}},{xy:[406,259],tooltip:"Savannah Area",attrs:{href:"/areas-served/savannah-ga/",src:"/maps/markers/orange_circle_30x30.png"}},{xy:[204,215],tooltip:"Macon Area",attrs:{href:"/areas-served/macon-ga/",src:"/maps/markers/orange_circle_30x30.png"}}]}):t=="usa-hi.svg"?$("#mapsvg-usa-states").mapSvg({source:"/maps/svg-maps/counties/"+t,loadingText:"Loading map...",responsive:1,colors:{background:"transparent",base:"#DDDDDD",stroke:"#ffffff"},width:$("#mapsvg-usa").width(),height:$("#mapsvg-usa").height()+100,zoom:!0,pan:!0,marks:[{xy:[48,2],tooltip:"Hilo Area",attrs:{href:"/areas-served/hilo-hi/",src:"/maps/markers/orange_circle_30x30.png"}},{xy:[14,-19],tooltip:"Honolulu Area",attrs:{href:"/areas-served/honolulu-hi/",src:"/maps/markers/orange_circle_30x30.png"}}]}):t=="usa-in.svg"?$("#mapsvg-usa-states").mapSvg({source:"/maps/svg-maps/counties/"+t,loadingText:"Loading map...",responsive:1,colors:{background:"transparent",base:"#DDDDDD",stroke:"#ffffff"},width:$("#mapsvg-usa").width(),height:$("#mapsvg-usa").height()+100,zoom:!0,pan:!0,marks:[{xy:[4,0],tooltip:"Indianapolis Area",attrs:{href:"/areas-served/indianapolis-in/",src:"/maps/markers/orange_circle_30x30.png"}}]}):t=="usa-az.svg"?$("#mapsvg-usa-states").mapSvg({source:"/maps/svg-maps/counties/"+t,loadingText:"Loading map...",responsive:1,colors:{background:"transparent",base:"#DDDDDD",stroke:"#ffffff"},width:$("#mapsvg-usa").width(),height:$("#mapsvg-usa").height()+100,zoom:!0,pan:!0,marks:[{xy:[25,40],tooltip:"Tucson Area",attrs:{href:"/areas-served/tucson-az/",src:"/maps/markers/orange_circle_30x30.png"}},{xy:[34,51],tooltip:"Sierra Vista Area",attrs:{href:"/areas-served/sierra-vista-az/",src:"/maps/markers/orange_circle_30x30.png"}},{xy:[20,21],tooltip:"Phoenix Area",attrs:{href:"/areas-served/phoenix-az/",src:"/maps/markers/orange_circle_30x30.png"}}]}):t=="usa-ks.svg"?$("#mapsvg-usa-states").mapSvg({source:"/maps/svg-maps/counties/"+t,loadingText:"Loading map...",responsive:1,colors:{background:"transparent",base:"#DDDDDD",stroke:"#ffffff"},width:$("#mapsvg-usa").width(),height:$("#mapsvg-usa").height()+100,zoom:!0,pan:!0,marks:[{xy:[60,-12],tooltip:"Kansas City Area",attrs:{href:"/areas-served/kansas-city-mo/",src:"/maps/markers/orange_circle_30x30.png"}},{xy:[40,5],tooltip:"Wichita KS Area",attrs:{href:"/areas-served/wichita-ks/",src:"/maps/markers/orange_circle_30x30.png"}},{xy:[46,-16],tooltip:"Manhattan KS Area",attrs:{href:"/areas-served/manhattan-ks/",src:"/maps/markers/orange_circle_30x30.png"}}]}):t=="usa-ky.svg"?$("#mapsvg-usa-states").mapSvg({source:"/maps/svg-maps/counties/"+t,loadingText:"Loading map...",responsive:1,colors:{background:"transparent",base:"#DDDDDD",stroke:"#ffffff"},width:$("#mapsvg-usa").width(),height:$("#mapsvg-usa").height()+100,zoom:!0,pan:!0,marks:[{xy:[8,6],tooltip:"Hopkinsville Area",attrs:{href:"/areas-served/hopkinsville-ky/",src:"/maps/markers/orange_circle_30x30.png"}},{xy:[24,-13],tooltip:"Louisville Area",attrs:{href:"/areas-served/louisville-ky/",src:"/maps/markers/orange_circle_30x30.png"}}]}):t=="usa-la.svg"?$("#mapsvg-usa-states").mapSvg({source:"/maps/svg-maps/counties/"+t,loadingText:"Loading map...",responsive:1,colors:{background:"transparent",base:"#DDDDDD",stroke:"#ffffff"},width:$("#mapsvg-usa").width(),height:$("#mapsvg-usa").height()+100,zoom:!0,pan:!0,marks:[{xy:[37,14],tooltip:"New Orleans Area",attrs:{href:"/areas-served/new-orleans-la/",src:"/maps/markers/orange_circle_30x30.png"}}]}):t=="usa-md.svg"?$("#mapsvg-usa-states").mapSvg({source:"/maps/svg-maps/counties/"+t,loadingText:"Loading map...",responsive:1,colors:{background:"transparent",base:"#DDDDDD",stroke:"#ffffff"},width:$("#mapsvg-usa").width(),height:$("#mapsvg-usa").height()+100,zoom:!0,pan:!0,marks:[{xy:[15,-20],tooltip:"Baltimore Area",attrs:{href:"/areas-served/baltimore-md/",src:"/maps/markers/orange_circle_30x30.png"}}]}):t=="usa-nc.svg"?$("#mapsvg-usa-states").mapSvg({source:"/maps/svg-maps/counties/"+t,loadingText:"Loading map...",responsive:1,colors:{background:"transparent",base:"#DDDDDD",stroke:"#ffffff"},width:$("#mapsvg-usa").width(),height:$("#mapsvg-usa").height()+100,zoom:!0,pan:!0,marks:[{xy:[56,1],tooltip:"Jacksonville NC Area",attrs:{href:"/areas-served/jacksonville-nc/",src:"/maps/markers/orange_circle_30x30.png"}},{xy:[42.5,-5],tooltip:"Fayetteville NC Area",attrs:{href:"/areas-served/fayetteville-nc/",src:"/maps/markers/orange_circle_30x30.png"}}]}):t=="usa-ne.svg"?$("#mapsvg-usa-states").mapSvg({source:"/maps/svg-maps/counties/"+t,loadingText:"Loading map...",responsive:1,colors:{background:"transparent",base:"#DDDDDD",stroke:"#ffffff"},width:$("#mapsvg-usa").width(),height:$("#mapsvg-usa").height()+100,zoom:!0,pan:!0,marks:[{xy:[63,-2],tooltip:"Omaha Area",attrs:{href:"/areas-served/omaha-ne/",src:"/maps/markers/orange_circle_30x30.png"}}]}):t=="usa-nv.svg"?$("#mapsvg-usa-states").mapSvg({source:"/maps/svg-maps/counties/"+t,loadingText:"Loading map...",responsive:1,colors:{background:"transparent",base:"#DDDDDD",stroke:"#ffffff"},width:$("#mapsvg-usa").width(),height:$("#mapsvg-usa").height()+100,zoom:!0,pan:!0,marks:[{xy:[28,60],tooltip:"Las Vegas Area",attrs:{href:"/areas-served/las-vegas-nv/",src:"/maps/markers/orange_circle_30x30.png"}}]}):t=="usa-ok.svg"?$("#mapsvg-usa-states").mapSvg({source:"/maps/svg-maps/counties/"+t,loadingText:"Loading map...",responsive:1,colors:{background:"transparent",base:"#DDDDDD",stroke:"#ffffff"},width:$("#mapsvg-usa").width(),height:$("#mapsvg-usa").height()+100,zoom:!0,pan:!0,marks:[{xy:[34,10],tooltip:"Lawton Area",attrs:{href:"/areas-served/lawton-ok/",src:"/maps/markers/orange_circle_30x30.png"}}]}):t=="usa-sc.svg"?$("#mapsvg-usa-states").mapSvg({source:"/maps/svg-maps/counties/"+t,loadingText:"Loading map...",responsive:1,colors:{background:"transparent",base:"#DDDDDD",stroke:"#ffffff"},width:$("#mapsvg-usa").width(),height:$("#mapsvg-usa").height()+100,zoom:!0,pan:!0,marks:[{xy:[10,-13],tooltip:"Columbia Area",attrs:{href:"/areas-served/columbia-sc/",src:"/maps/markers/orange_circle_30x30.png"}},{xy:[20,-10],tooltip:"Sumter Area",attrs:{href:"/areas-served/sumter-sc/",src:"/maps/markers/orange_circle_30x30.png"}},{xy:[25,4],tooltip:"Charleston Area",attrs:{href:"/areas-served/charleston-sc/",src:"/maps/markers/orange_circle_30x30.png"}},{xy:[19,7],tooltip:"Port Royal Area",attrs:{href:"/areas-served/port-royal-sc/",src:"/maps/markers/orange_circle_30x30.png"}}]}):t=="usa-tn.svg"?$("#mapsvg-usa-states").mapSvg({source:"/maps/svg-maps/counties/"+t,loadingText:"Loading map...",responsive:1,colors:{background:"transparent",base:"#DDDDDD",stroke:"#ffffff"},width:$("#mapsvg-usa").width(),height:$("#mapsvg-usa").height()+100,zoom:!0,pan:!0,marks:[{xy:[26,-10],tooltip:"Nashville Area",attrs:{href:"/areas-served/nashville-tn/",src:"/maps/markers/orange_circle_30x30.png"}}]}):t=="usa-tx.svg"?$("#mapsvg-usa-states").mapSvg({source:"/maps/svg-maps/counties/"+t,loadingText:"Loading map...",responsive:1,colors:{background:"transparent",base:"#DDDDDD",stroke:"#ffffff"},width:$("#mapsvg-usa").width(),height:$("#mapsvg-usa").height()+100,zoom:!0,pan:!0,marks:[{xy:[88,87],tooltip:"Corpus Christi Area",attrs:{href:"/areas-served/corpus-christi-tx/",src:"/maps/markers/orange_circle_30x30.png"}},{xy:[100,23],tooltip:"Dallas Area",attrs:{href:"/areas-served/dallas-tx/",src:"/maps/markers/orange_circle_30x30.png"}},{xy:[0,38],tooltip:"El Paso Area",attrs:{href:"/areas-served/el-paso-tx/",src:"/maps/markers/orange_circle_30x30.png"}},{xy:[68,71],tooltip:"San Antonio Area",attrs:{href:"/areas-served/san-antonio-tx/",src:"/maps/markers/orange_circle_30x30.png"}},{xy:[113,63],tooltip:"Houston Area",attrs:{href:"/areas-served/houston-tx/",src:"/maps/markers/orange_circle_30x30.png"}},{xy:[54,30],tooltip:"Abilene Area",attrs:{href:"/areas-served/abilene-tx/",src:"/maps/markers/orange_circle_30x30.png"}},{xy:[77,54],tooltip:"Austin Area",attrs:{href:"/areas-served/austin-tx/",src:"/maps/markers/orange_circle_30x30.png"}}]}):t=="usa-va.svg"?$("#mapsvg-usa-states").mapSvg({source:"/maps/svg-maps/counties/"+t,loadingText:"Loading map...",responsive:1,colors:{background:"transparent",base:"#DDDDDD",stroke:"#ffffff"},width:$("#mapsvg-usa").width(),height:$("#mapsvg-usa").height()+100,zoom:!0,pan:!0,marks:[{xy:[41,-21],tooltip:"Washington DC Area",attrs:{href:"/areas-served/washington-dc/",src:"/maps/markers/orange_circle_30x30.png"}},{xy:[46,-2],tooltip:"Richmond Area",attrs:{href:"/areas-served/richmond-va/",src:"/maps/markers/orange_circle_30x30.png"}},{xy:[58,0],tooltip:"Hampton-Virginia Beach-Norfolk Area",attrs:{href:"/areas-served/hampton-va/",src:"/maps/markers/orange_circle_30x30.png"}}]}):t=="usa-wa.svg"&&$("#mapsvg-usa-states").mapSvg({source:"/maps/svg-maps/counties/"+t,loadingText:"Loading map...",responsive:1,colors:{background:"transparent",base:"#DDDDDD",stroke:"#ffffff"},width:$("#mapsvg-usa").width(),height:$("#mapsvg-usa").height()+100,zoom:!0,pan:!0,marks:[{xy:[8,-11],tooltip:"Seattle Area",attrs:{href:"/areas-served/seattle-wa/",src:"/maps/markers/orange_circle_30x30.png"}},{xy:[6,-5],tooltip:"Tacoma Area",attrs:{href:"/areas-served/tacoma-wa/",src:"/maps/markers/orange_circle_30x30.png"}},{xy:[48,5],tooltip:"Spokane Area",attrs:{href:"/areas-served/spokane-wa/",src:"/maps/markers/orange_circle_30x30.png"}}]})});if($("#back-to-usmap").length>0){$("#back-to-usmap").hide();$("#back-to-usmap").on("click",function(n){n.preventDefault();$("#mapsvg-usa").show();$("#mapsvg-usa-states").hide();$("#back-to-usmap").hide()})}}function kt(){if($("#main-nav").is(":visible")){var n=$("#main-nav").offset().top;$(window).on("scroll",function(){var t=$(this).scrollTop();t>=n?$("body").addClass("affix-nav"):$("body").removeClass("affix-nav")})}}function dt(){$("#quote-form").length<1&&$(".btn-nav-quote").is(":visible")&&$(".btn-nav-quote").addClass("hide")}function gt(){if($(".home-page .hero .slide").length){var n=$(window).width();n>=768?($(".home-page .hero .mobile-slide").remove(),$(".home-page .hero").append($("#extra-slides").html()),$(".home-page .hero .slide").length>1||$(".home-page .hero").addClass("no-animate")):$(".home-page .hero").addClass("no-animate")}}function ni(){if($(".home-page").length){var n=$(window).height();$(window).on("scroll",function(){var t=$(this).scrollTop(),i=t+n;$(".header-section .header-title").each(function(){var n=$(this).offset().top+100;i>n&&$(this).closest("div.header-section").addClass("slideup")})})}}function ti(){var t=$("#ballpark-form"),n=window.location.href,i;if(t.length>0&&(t.find("#button-submit-form").click(function(t){var u,r,i,s;if(!$("#button-submit-form").hasClass("disabled")){for(t.preventDefault(),$(".error").removeClass("error"),button=$(this),button.html("Submitting..."),button.attr("disabled","disabled"),u="",r=document.getElementsByClassName("size"),i=0;i<r.length;i++)c(r[i],"active")&&(u=r[i].getElementsByTagName("input")[0].value);var f="",e="",o="";n.includes("miami")?(f=getFormVal("ballpark-fullname"),e=getFormVal("ballpark-email"),o=getFormVal("ballpark-phone")):(f=getFormVal("fullname"),e=getFormVal("email"),o=getFormVal("phone"));s="&movefrom="+getFormVal("moveFrom")+"&moveto="+getFormVal("moveTo")+"&movedate="+getFormVal("input-move-date")+"&type="+($(".btn-apartment").hasClass("active")?"Apartment":"House")+"&fullname="+f+"&ballparksource="+getFormVal("ballparksource")+"&email="+e+"&phone="+o+"&size="+u;$.ajax({type:"POST",cache:!1,dataType:"json",url:"/ws/ballpark/",data:s+serializeSecToken(),success:function(n){n.IsValid?($(".move-price-estimate .icon").html("<i class='fa fa-truck fa-flip-horizontal fa-5x text-warning'><\/i>"),$(".move-price-estimate .finalPrediction").text("$"+n.Data.LowPrice+"  to  $"+n.Data.HighPrice),$(".move-price-estimate p.startagain").removeClass("hide"),$(".move-price-estimate p.startagain.empty").addClass("hide")):(button.removeAttr("disabled"),button.text("Send Your Message"),$(".move-price-estimate .icon").html("<i class='fa fa-truck fa-flip-horizontal fa-5x text-warning'><\/i>"),$(".move-price-estimate .finalPrediction").text("Provided Zip Codes are Invalid."),$(".move-price-estimate p.startagain").removeClass("hide"),$(".move-price-estimate p.startagain.empty").addClass("hide"))}})}}),$(".cball").keyup(function(){var t="";t=n.includes("miami")?"&fullname="+getFormVal("ballpark-fullname")+"&email="+getFormVal("ballpark-email")+"&phone="+getFormVal("ballpark-phone"):"&fullname="+getFormVal("fullname")+"&email="+getFormVal("email")+"&phone="+getFormVal("phone");$.ajax({type:"POST",cache:!1,dataType:"json",url:"/ws/ballpark-contact/",data:t+serializeSecToken(),success:function(t){t.IsValid?n.includes("miami")?$(".ballpark-estimate .btn-submit").removeClass("disabled"):$(".cball-btn-next").removeClass("disabled"):n.includes("miami")?$(".ballpark-estimate .btn-submit").addClass("disabled"):$(".cball-btn-next").addClass("disabled")}})})),n.includes("miami")){i=$("#input-move-date")[0];$(".ballpark-estimate #step1 input").keyup(function(){var t=i.value,n;/(^\d{5}$)|(^\d{5}-\d{4}$)/.test($("#moveFrom").val())&&/(^\d{5}$)|(^\d{5}-\d{4}$)/.test($("#moveTo").val())&&Date.parse(t)-Date.parse(new Date)>0&&(n=!0);$(".ballpark-estimate #step1 input").each(function(){$(this).val().trim()==""&&(n=!1)});n?$(".ballpark-estimate #step1").find(".btn-next").removeClass("disabled"):($(".ballpark-estimate #step1").find(".btn-next").addClass("disabled"),$(".ballpark-estimate .nav-tabs li").not(".active").addClass("disabled"))});$(".ballpark-estimate #step2 input").on("click",function(){$(".ballpark-estimate #step2").find(".btn-next").removeClass("disabled")});$(".ballpark-estimate #step3 input").on("click",function(){$(".ballpark-estimate #step3").find(".btn-next").removeClass("disabled")})}else{$(".ballpark-estimate #step1 input").keyup(function(){if(/(^\d{5}$)|(^\d{5}-\d{4}$)/.test($("#moveFrom").val())&&/(^\d{5}$)|(^\d{5}-\d{4}$)/.test($("#moveTo").val()))var n=!0;$(".ballpark-estimate #step1 input").each(function(){$(this).val().trim()==""&&(n=!1)});n?$(".ballpark-estimate #step1").find(".btn-next").removeClass("disabled"):($(".ballpark-estimate #step1").find(".btn-next").addClass("disabled"),$(".ballpark-estimate .nav-tabs li").not(".active").addClass("disabled"))});$(".radio-buttons.house-buttons label.btn").on("click",function(){$(".form-group.size-group .radio-buttons .btn").removeClass("active").find("input").prop("checked",!1);$(".ballpark-estimate .btn-submit").addClass("disabled");$(".ballpark-estimate #step3").find(".btn-next").removeClass("disabled")});$(".form-group.size-group .btn").on("click",function(){$(".ballpark-estimate .btn-submit").removeClass("disabled")});$(".nav-tabs a[data-toggle=tab]").on("click",function(n){if($(this).closest("li").hasClass("disabled"))return n.preventDefault(),!1})}$(".ballpark-estimate .radio-buttons .btn").on("click",function(){var n=$(this);n.find("input").prop("checked",!1)&&(n.closest("div.radio-buttons").find(".btn").removeClass("active"),n.addClass("active"))});$(".ballpark-estimate .btn-next").on("click",function(n){if($(this).hasClass("disabled"))return n.preventDefault(),!1;var t=$(this).attr("href");$(".nav-tabs li").removeClass("active");$(".nav-tabs a[href="+t+"]").closest("li").removeClass("disabled").addClass("active")});$(".ballpark-estimate .btn-submit").on("click",function(){$(this).hasClass("disabled")||($(".move-price-estimate").removeClass("hide"),$("#ballpark-form").addClass("hide"))})}function ii(){$("#past-projects-gallery").bsgallery({gallerysourceurl:"/ws/projectgallery/"})}function ri(){var n;if($("#button-post-job").length>0){var r=$("#button-post-job").attr("data-thumb"),i=new FormData,t=0;$(".past-project-page #zip").on("blur",function(){$(".project-city-state.collapse.in").length<=0&&$(".project-city-state").collapse("show");var n=getFormVal("zip");n!=null&&$.ajax({type:"POST",cache:!1,dataType:"json",url:"/ws/getcitystate/",data:"zip="+n+serializeSecToken(),success:function(n){removeFeedback();n.IsValid&&($("#city").val(n.Data.city),$("#state").val(n.Data.state))}})});$("#upload-photo-input").on("click",function(){if($(".added-photo").length==50)return alert("We limit up to 50 images can be added for past projects."),!1});$(document).on("click",".past-project-page .added-photo .btn-remove",function(){var n=$(this).parent().parent(),t=n.attr("id");return n.remove(),$.ajax({type:"POST",cache:!1,dataType:"json",async:!1,url:"/ws/deleteuploadedprojectimage/?id="+t,success:function(n){n.Ok?token=n.token:handleResponseError(n)},error:function(){alert("An error occurred")}}),!1});$("#upload-photo-input").on("change",function(n){var e,f;if($(".added-photo").length==50)return!1;e=$("#project-pic").html();$("#added-photo-container").append(e);$(".btn-add-job-photo").addClass("disabled");$("#upload-text").text("Uploading...");var s=n.target.files,h=$(this)[0].files.length,o=$(this)[0].value,u=o.substring(o.lastIndexOf(".")+1).toLowerCase();if(u=="gif"||u=="png"||u=="jpg"||u=="jpeg")if(typeof FileReader!="undefined")for(f=0;f<h;f++)i.append("file"+t,s[f]),$.ajax({type:"POST",cache:!1,datatype:"json",url:"/ws/uploadprojectimage/?id="+t,contentType:!1,processData:!1,data:i,success:function(n){t=t+1;$(".btn-add-job-photo").removeClass("disabled");$("#upload-text").text("Upload A Photo");$(".added-photo").last().attr("id",n);var i=r+n;$(".added-photo").last().find(".project-img").attr("src",i);$(".added-photo").last().find(".uploaded-photo").removeClass("hide")}});else alert("Cannot Upload images.");else alert("Plaese select images only")});n=$("#form-review-post");n.length>0&&n.find("#button-post-job").click(function(t){t.preventDefault();$(".error").removeClass("error");button=$(this);button.html("Submitting...");button.attr("disabled","disabled");var r=n.serialize(),i=[];$("#added-photo-container .added-photo").each(function(){i.push({ImageName:$(this).attr("id")})});$.ajax({type:"POST",cache:!1,dataType:"json",url:"/ws/pastproject/",data:r+"&jobimages-addeditems="+encodeURIComponent(JSON.stringify(i))+"&isReviewAvailable="+getCheckVal("addReview")+"&rating="+getFormVal("review-rating-value"),success:function(t){var i,r;if(removeFeedback(),t.IsValid)n.submit();else{button.removeAttr("disabled");button.html("Post Job");t.ErrFields.Name&&showValidationError("name");t.ErrFields.Phone&&showValidationError("phone");t.ErrFields.Email&&showValidationError("email");t.ErrFields.Address&&showValidationError("address");t.ErrFields.Zip&&showValidationError("zip");t.ErrFields.City&&showValidationError("city");t.ErrFields.State&&showValidationError("state");t.ErrFields.Rating&&showValidationError("review-rating");t.ErrFields.Location&&showValidationError("select-review-location");t.ErrFields.Title&&showValidationError("input-reviewer-title");i="";for(r in t.ErrFields)i+=(i==""?"":"\n")+t.ErrFields[r];alert(i)}}})})}}function ui(){$("#listview").on("click",function(){window.location.href=window.location.pathname});$("#mapview").on("click",function(){window.location.href=window.location.pathname+"?map"})}function fi(){function h(){$("#mapclusterer").is(":visible")&&(u=!0,$.ajax({type:"POST",cache:!1,dataType:"json",url:"/ws/getpastprojectmarkers/",success:function(n){removeFeedback();$.getScript(n.datascript,function(){c=n;r=window.mappoints;$.getScript("https://maps.googleapis.com/maps/api/js?key=AIzaSyBfyTTg-r5TZkerX_CT1z-p4H_ETYn8U50",function(){p(n)})})}}))}function p(t){function h(){n.setOptions({scrollwheel:!0})}var b=new window.google.maps.LatLng(t.lat,t.lng),u,o,p;for(y=new window.google.maps.InfoWindow,n=new window.google.maps.Map(document.getElementById("mapclusterer"),{zoom:9,center:b,mapTypeId:window.google.maps.MapTypeId.ROADMAP,streetViewControl:!1,mapTypeControl:!1,scrollwheel:!1}),window.google.maps.event.addListener(n,"click",function(){h()}),window.google.maps.event.addListener(n,"zoom_changed",function(){h()}),window.google.maps.event.addListener(n,"drag",function(){h()}),u=0;u<r.length;u++){var i=r[u],c=i.ProjectAssets,k=new window.google.maps.LatLng(i.Latitude,i.Longitude),a=new window.google.maps.MarkerImage(l,new window.google.maps.Size(42,42));(i.HasReview&&i.ReviewStatus==="published"||c>0)&&(a=new window.google.maps.MarkerImage(v,new window.google.maps.Size(42,42)));o=new window.google.maps.Marker({position:k,icon:a});(i.HasReview&&i.ReviewStatus==="published"||c>0)&&s.push(o);p=w(r[u]);window.google.maps.event.addListener(o,"click",p);f.push(o)}e(f)}function e(t){o=new MarkerClusterer(n,t,{imagePath:"/img/past-projects/m"})}function w(n){return function(r){var u;r.cancelBubble=!0;r.returnValue=!1;r.stopPropagation&&(r.stopPropagation(),r.preventDefault());i==null&&(i=this.icon.url);t!=null&&(u=new window.google.maps.MarkerImage(i,new window.google.maps.Size(42,42)),t.setIcon(u),i=this.icon.url);t=this;u=new window.google.maps.MarkerImage(a,new window.google.maps.Size(42,42));this.setIcon(u);$.ajax({type:"POST",cache:!1,url:"/ws/getprojectdetails/?projectId="+n.ProjectId,error:function(n){alert(n)},success:function(n){$("#map-pin-detail-review").remove();var r=$("<div>",{id:"map-pin-detail-review"}).addClass("map-pin-detail"),u=$('<div id="map-detail-inner" class="inner"><a href="#" id="map-pin-details-close" class="close btn pull-right" title="close"><i class="fa fa-close"><\/i><\/a><\/div>').append(n),f=r.append(u);$("#mapclusterer").after(f);$("#map-pin-details-close").on("click",function(n){if(n.preventDefault(),t!=null){var r=new window.google.maps.MarkerImage(i,new window.google.maps.Size(42,42));t.setIcon(r)}$(this).closest("#map-pin-detail-review").remove()});$(".past-project-page .project-details .set-height").length&&$(".past-project-page .project-details .set-height").each(function(){$(this).height()>80&&$(this).parent().addClass("expand-me")})}})}}var u=!1,o,c,l="/img/past-projects/map-pin.png",a="/img/past-projects/map-pin-active.png",v="/img/past-projects/map-pin-star.png",y,t,i,n,r=null,f=[],s=[];if($("#mapclusterer").length>0)$(window).on("resize",function(){var n=$(this);n.width()<=991&&$('input:radio[name="listview"]').prop("checked",!0).trigger("click");u||h()});$("button[data-type=map-buttons]").click(function(){($(this).attr("name")=="allProjects"||$(this).attr("name")=="featuredProjects")&&(o.clearMarkers(),this.id==="allProjects"?e(f):e(s))});$(window).on("resize",function(){u||h()});$(window).trigger("resize");$("#search-projects").on("click",function(n){n.preventDefault();$.ajax({type:"POST",cache:!1,dataType:"json",url:"/ws/getpastprojectsbyarea/?zip="+getFormVal("search-zip"),success:function(n){removeFeedback();n.IsValid?window.location="/past-projects/?zip="+$("#search-zip").val():alert("Invalid Zip Code")}})});$(document).on("click",".map-detail-review .btn-read-review-map",function(n){return n.preventDefault(),$(this).addClass("hide").parent().find("div.map-review-body").removeClass("hide"),!1});$(".past-project-page .project-details .set-height").length&&$(".past-project-page .project-details .set-height").each(function(){$(this).height()>80&&$(this).parent().addClass("expand-me")});$(document).on("click",".past-project-page .project-details .see-more-chat",function(n){return n.preventDefault(),$(this).parent().removeClass("expand-me"),!1})}function ei(){$("#project-assets-gallery").bsgallery({gallerysourceurl:"/ws/projectgallery/"})}function oi(n){for(var t=n.length-1;t>=0;t--)n[t]=null}function si(){var t=$("#send-review-form"),n;if(t.length>0){n=function(){var n=document.getElementById("text-review-site-div");n.className.includes("form-group hidden")&&(n.className="form-group");$.ajax({type:"POST",cache:!1,dataType:"json",async:!1,url:"/ws/review-text-request-market-change-sites/",data:"market="+getFormVal("input-text-review-request-market"),success:function(n){var t=document.getElementById("text-review-select-site"),i,r,u;oi(t);for(i in n)r=n[i],u=new Option(r,i),t[t.length]=u},error:function(){alert("An error occurred with creating site choices")}});$.ajax({type:"POST",cache:!1,dataType:"json",async:!1,url:"/ws/review-text-request-market-change-links/",data:"market="+getFormVal("input-text-review-request-market"),success:function(n){var t=document.getElementById("text-review-link-div"),i,r;t.innerHTML="\n \n ";for(i in n)r='<input type="hidden"value="'+n[i]+'" />',t.innerHTML+=r},error:function(){alert("An error occurred with creating site links")}})};$("#input-text-review-request-market")[0].length<=2&&n();$("#input-text-review-request-market").on("change",function(){n()})}}function hi(){var n=$("#send-review-form"),t;n.length>0&&(t=136,n.find("#text-message").keyup(function(){var i=$(this).val().length,i=t-i,r;i>=0?n.find("#chars").text(i):(r=$(this).val().substring(0,t),$(this).val(r))}),n.find("#button-submit-form").click(function(n){n.preventDefault();$(".error").removeClass("error");button=$(this);button.html("Sending...");button.attr("disabled","disabled");var r=document.getElementById("text-review-select-site"),u=$("#text-review-link-div").children(),t=u[r.selectedIndex],i="";typeof t!="undefined"&&$.ajax({type:"POST",cache:!1,dataType:"json",async:!1,url:"/ws/shortenlink/",data:"longlink="+encodeURIComponent(t.value),success:function(n){i=n},error:function(){alert("An error occurred with link shortening")}});$.ajax({type:"POST",cache:!1,dataType:"json",async:!1,url:"/ws/review-text-request/",data:"phone="+$("#input-user-phone").val()+"&link="+encodeURIComponent(i)+"&message="+encodeURIComponent($("#text-message").val())+serializeSecToken(),success:function(n){var t,i;if(removeFeedback(),n.IsValid)alert("Review Request Sent!"),button.removeAttr("disabled"),button.html("SEND REVIEW REQUEST");else{button.removeAttr("disabled");button.html("SEND REVIEW REQUEST");n.ErrFields.phone&&showValidationError("input-user-phone");n.ErrFields.link&&showValidationError("input-text-review-request-market");n.ErrFields.message&&showValidationError("text-message");t="";for(i in n.ErrFields)t+=(t==""?"":"\n")+n.ErrFields[i];alert(t)}}})}))}function ci(){function n(){$("body").removeClass("modal-exit-intent-open");$("#myModal").removeClass("in");$("#myModal .modal-backdrop").hide();$("body").removeClass("modal-open");$("#myModal").css("display","");$("#myModal").attr("shown",!0);$(".modal-backdrop").addClass("hide");$("#apexchat_invitation_container_wrapper .image-invite-wrapper").removeClass("hide");$("#apexchat_invitation_container_minimized_wrapper .image-invite-wrapper").removeClass("hide")}var t=$("#myModal");if(t.length){function i(){var n=getCookie("_hei");return n==null||n==="false"}if(i()){$(document).on("mouseleave.exitintent",function(r){var u=r.relatedTarget||r.toElement;!u&&r.clientY<20&&!$("#myModal").is(":visible")&&i()&&$("#myModal").attr("shown")!="true"&&($("#myModal").attr("intenttype")=="Chat Intent"&&window.ApexChat||$("#myModal").attr("intenttype")!="Chat Intent")&&t.on("show.bs.modal",function(){$("#apexchat_invitation_container_wrapper .image-invite-wrapper").addClass("hide");$("#apexchat_invitation_container_minimized_wrapper .image-invite-wrapper").addClass("hide");$("body").addClass("modal-open");trackOutboundLink($("#myModal").attr("intenttype"),"Triggered","Yes")}).on("hide.bs.modal",function(){n();trackOutboundLink($("#myModal").attr("intenttype"),"Denied","Yes");saveCookie("_hei","true",1,"/")}).modal({keyboard:!1,backdrop:"static",show:!0})});t.find(".btn-intent-primary").on("click",function(){var t="",i,r;$("#myModal").attr("intenttype")=="Chat Intent"?($(document).off("mouseleave.exitintent"),i=window.ApexChat.Invitation.options.companyId,r=window.ApexChat.Invitation.options.agentAliasId,window.open("http://www.Spectrumchat.com/pages/chat.aspx?companyId="+i+"&amp;requestedAgentId="+r+"&originalReferrer="+document.referrer+"&referrer="+window.location.href,"","width=440,height=680"),t="Exit Intent - Chat"):t="Exit Intent - Offer";$("#exit-intent-input-name").length==0&&(n(),saveCookie("_hei","true",1,"/"),$("#myModal").attr("intenttype")!="Download Intent"&&trackOutboundLink(t,"Completed","Yes"))})}}$(".download-intent-download").click(function(){var i=$("#exit-intent-input-name").val(),r=$("#exit-intent-input-email").val(),t=$("#downloadablefile").val();button=$(this);button.attr("disabled","disabled");$.ajax({type:"POST",cache:!1,dataType:"json",url:"/ws/download-exit-intent/",data:"name="+i+"&email="+r+"&file="+t,success:function(i){var r,u;if(removeFeedback(),i.IsValid)n(),trackOutboundLink("Exit Intent - Download","Completed","Yes"),window.open(t),saveCookie("_hei","true",1,"/");else{button.removeAttr("disabled");i.ErrFields.name&&showValidationError("exit-intent-input-name");i.ErrFields.email&&showValidationError("exit-intent-input-email");r="";for(u in i.ErrFields)r+=(r==""?"":"\n")+i.ErrFields[u];alert(r)}}})})}function li(){var n=$("#offer-form");n.length>0&&n.find("#button-submit-form").click(function(t){var i,r;t.preventDefault();$(".error").removeClass("error");button=$(this);i=button.html();button.html("Submitting...");button.attr("disabled","disabled");r=n.serialize();$.ajax({type:"POST",cache:!1,dataType:"json",url:"/ws/offer/",data:r+serializeSecToken(),success:function(t){var r,u;if(removeFeedback(),t.IsValid)t.Data&&t.Data.redirect?window.location=t.Data.redirect:n.submit();else{button.removeAttr("disabled");button.html(i);t.ErrFields.name&&showValidationError("input-user-name");t.ErrFields.email&&showValidationError("input-user-email");t.ErrFields.phone&&showValidationError("input-user-phone");t.ErrFields.address&&showValidationError("input-user-address");t.ErrFields.city&&showValidationError("input-user-city");t.ErrFields.state&&showValidationError("input-user-state");t.ErrFields.zip&&showValidationError("input-user-zip");t.ErrFields.agree&&showValidationError("input-user-agree");r="";for(u in t.ErrFields)r+=(r==""?"":"\n")+t.ErrFields[u];alert(r)}}})})}function ai(){var n=$("#referral-form");n.length>0&&n.find("#referral-submit").click(function(t){t.preventDefault();$(".error").removeClass("error");var i=$(this),r=i.html();i.html("Submitting...");i.attr("disabled","disabled");$.ajax({type:"POST",cache:!1,dataType:"json",url:"/ws/referral/",data:n.serialize()+serializeSecToken(),success:function(t){removeFeedback();t.IsValid?n.submit():(i.removeAttr("disabled"),i.html(r),t.ErrFields.referrername&&showValidationError("input-referrer-name"),t.ErrFields.referreraddress&&showValidationError("input-referrer-address"),t.ErrFields.referrerphone&&showValidationError("input-referrer-phone"),t.ErrFields.referreremail&&showValidationError("input-referrer-email"),t.ErrFields.referrermovecompleted&&showValidationError("select-referrer-move-details"),t.ErrFields.name&&showValidationError("input-referral-name"),t.ErrFields.address&&showValidationError("input-referral-address"),t.ErrFields.phone&&showValidationError("input-referral-phone"),t.ErrFields.moveinterested&&showValidationError("select-referral-move-details"),alert(getCombinedAlert(t)))}})})}function vi(){$(".float").click(function(){$("#newmodal").modal("show")})}function yi(){var n=$("#text-request-form");if(n.length>0){n.find("#submit-text-request-form").on("click",function(t){t.preventDefault();$(".error").removeClass("error");var i=$(this),r=i.html();i.html("Submitting...");i.attr("disabled","disabled");$.ajax({type:"POST",cache:!1,dataType:"json",url:"/ws/text-request/",data:n.serialize()+serializeSecToken(),success:function(n){removeFeedback();n.IsValid?(i.html("Sent"),alert("Message Sent! A Coleman representative will contact you shortly"),$("#newmodal").modal("hide")):(i.removeAttr("disabled"),i.html(r),n.ErrFields.name&&showValidationError("text-request-name"),n.ErrFields.phoneNumber&&showValidationError("text-request-phoneNumber"),n.ErrFields.zipcode&&showValidationError("text-request-zipcode"),alert(getCombinedAlert(n)))}})});n.find("#text-request-text-message").keyup(function(){var i=$("#text-request-text-message")[0].maxLength,r=$(this).val().length,t=i-r;t>=0&&n.find("#chars").text(t)})}}n();window.onload=function(){for(var r=document.getElementsByClassName("ga-tracking-number"),u,t,f,i,n=0;n<r.length;n++)if(u=r[n].getAttribute("data-tracking-phone"),_googWcmGet("ga-tracking-number",u),t=document.getElementsByClassName("ga-tracking-number"),t.length>0)for(f=t[0].innerText,i=document.getElementsByClassName("ga-tracking-number-mobile"),j=0;j<i.length;j++)i[j].setAttribute("href","tel:"+f)};t();i();r();st();ot();et();ht();ct();lt();at();vt();o();s();u();f();e();h();l();a();v();y();p();w();b();k();initUpload();d();g();nt();tt();it();rt();ut();ft();yt();pt();wt();bt();kt();dt();gt();ni();ti();fi();ri();ei();hi();si();ui();ci();ii();li();ai();vi();yi();$("[rel=clickover]").clickover();$(".match-height").matchHeight()});$("#payment-input-paymentamount").on("input",function(){var n=$("#payment-input-paymentamount").val();$.ajax({type:"POST",cache:!1,dataType:"json",url:"/ws/payment/fee/",data:"amount="+n,success:function(n){$("#payment-input-flatfee").val(n)}})});$(function(){function n(){$(document).on("click",".read-more-reviews",function(){var n=$(this),t=n.data("next-page"),i=n.data("next-key");n.html("Reading more reviews...");n.attr("disabled","disabled");$.get("/semreviews/"+t+"/"+i+"/",function(t){n.removeAttr("disabled");n.html("Read more reviews &rarr;");var i=n.closest("ul");i.replaceWith(t)})})}n()})