;(function($){function isEmpty(ob){for(var i in ob){if(ob.hasOwnProperty(i)){return false;}}
return true;}
$.fn.okValidate=function(opts){opts=$.extend({inlineErrors:true,liveValidation:true,liveEvent:'blur',errorClass:"error",errorContainerClass:"error-messages",showErrorFunction:null,hideErrorFunction:null,onSubmit:null},opts);var validators=$.fn.okValidate.validators,messages=$.fn.okValidate.messages;function generateMessage($input,msg){/#\{([A-z]+)\}/.test(msg);var attribute=RegExp.$1,replacement=$input.attr(attribute).replace(/(_-)/,' ');return msg.replace(/#\{[A-z]+\}+/,replacement);}
function generateErrorList(errors){var output='';$.each(errors,function(id,el){$.each(el.data('messages'),function(k,msg){output+="<li>"+msg+"</li>";});});return"<div class='"+opts.errorContainerClass+"'><ul>"+output+'</ul></div>';}
function displayErrorList(){removeErrorList.call(this);if(opts.showErrorFunction){opts.showErrorFunction.call(this);}else{this.find('.error').removeClass('error');$.each(this.data('errors'),function(){$(this).addClass(opts.errorClass);});this.prepend(generateErrorList(this.data('errors'))).find("."+opts.errorContainerClass).hide().slideDown();}}
function removeErrorList(){if(opts.hideErrorFunction){opts.hideErrorFunction.call(this);}else{this.find('.error').removeClass('error');$("."+opts.errorContainerClass,this).remove();}}
function appendErrorsTo($input){if(opts.showErrorFunction){opts.showErrorFunction.call(this);}else{var $label=$input.next("label."+opts.errorClass),msg=$input.data('messages').join(", ");if($label.length<=0){$input.addClass(opts.errorClass);$("<label/>").addClass(opts.errorClass).text(msg).insertAfter($input);}else{$label.html(msg);}}}
function removeErrorsFrom($input){if(opts.hideErrorFunction){opts.hideErrorFunction.call(this);}else{$input.removeClass(opts.errorClass).next("label."+opts.errorClass).remove();}}
function maybeDisplayErrors($form,event,$input){if(opts.inlineErrors&&$input&&$input.data('messages').length<=0){removeErrorsFrom($input);return true;}else if(isEmpty($form.data('errors'))){removeErrorList.call($form);return true;}
opts.inlineErrors?$.each($form.data('errors'),function(k,v){appendErrorsTo($(v));}):displayErrorList.call($form);if(event){event.preventDefault();}
return false;}
function validateInput($form){var $input=$(this),validator,assign_or_get_id=function(i){if(!i.attr('id')){i.attr('id',"input_"+parseInt(new Date().getTime()+Math.random(),10));}};$input.data('messages',[]);$.each($input[0].className.split(" "),function(name){validator=validators[this];if(validator&&!(typeof(validator)=='function'?validator($input):validator.test($input.val()))){if(this=='required'||($input.val()!="")){assign_or_get_id($input);$input.data('messages').push(generateMessage($input,messages[this]));$form.data('errors')[$input.attr('id')]=$input;}}});if($input.data('messages').length<=0){delete $form.data('errors')[$input.attr('id')];}}
return this.each(function(){var $form=$(this),$inputs=$("input:not('[type=\'submit\']'), select, textarea",$form);$form.data('errors',{});if(opts.liveValidation){$inputs[opts.liveEvent](function(e){validateInput.call($(this),$form);maybeDisplayErrors($form,null,$(this));});}
$form.submit(function(e){$inputs.each(function(){validateInput.call($(this),$form);maybeDisplayErrors($form,e);});if(opts.onSubmit){opts.onSubmit.call($form,e);}});});};$.fn.okValidate.validators={email:/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-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d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i,required:function(el){return(el.val()!=''||el.val()!=el.attr('title'));},number:function(el){return!isNaN(el.val());},zip:/^\d{5}(-\d{4})?$/,phone:/^[2-9]\d{2}-\d{3}-\d{4}$/,time12:/^[01]?\d:[0-5]\d?\s?[aApP]\.?[mM]\.?$/,time24:/^(20|21|22|23|[01]\d|\d)(([:][0-5]\d){1,2})$/,nonHtml:/^[^<>]*$/};$.fn.okValidate.messages={email:"#{name} is not a valid address",url:"#{name} is not a valid url",required:"#{name} is required",number:"#{name} is not a number",usd:"#{name} must be a US Dollar amount.",zip:"#{name} must be a zipcode in the format xxxxx or xxxxx-xxxx.",phone:"#{name} must be in the format xxx-xxx-xxxx.",time24:"#{name} must be a 24 hour time: 23:00.",time12:"#{name} must be a 12 hour time: 12:00 AM/PM"};})(jQuery);(function($){'$:nomunge';var url_regexp,tag_attributes={},undefined,window=this,TRUE=true,FALSE=false,has_onhashchange='onhashchange'in window,aps=Array.prototype.slice,loc=document.location,p_urlTagAttrList,p_urlInternalHost,p_urlInternalRegExp,p_isUrlInternal,p_isUrlExternal,p_urlFilter,p_urlFilterSelector,p_setFragment,str_urlInternal='urlInternal',str_urlExternal='urlExternal',str_queryString='queryString',str_fragment='fragment',str_update='update',str_passQueryString='passQueryString',str_passFragment='passFragment',str_fragmentChange='fragmentChange',str_hashchange='hashchange.'+str_fragmentChange,timeout_id,last_fragment;function is_string(arg){return typeof arg==='string';};function is_object(arg){return typeof arg==='object';};function curry(){var args=aps.call(arguments),func=args.shift();return function(){return func.apply(this,args.concat(aps.call(arguments)));};};function get_fragment(){return loc.href.replace(/^[^#]*#?/,'');};$.urlTagAttrList=p_urlTagAttrList=function(attr_obj){return $.extend(tag_attributes,attr_obj);};p_urlTagAttrList({a:'href',img:'src',form:'action',base:'href',script:'src',iframe:'src',link:'href'});function get_attr(elem){var n=elem.nodeName;return n?tag_attributes[n.toLowerCase()]:'';};$.urlInternalHost=p_urlInternalHost=function(alt_hostname){alt_hostname=alt_hostname?'(?:'+alt_hostname+'\\.)?':'';var re=new RegExp('^'+alt_hostname+'(.*)','i'),pattern='^'+loc.protocol+'//'+loc.hostname.replace(re,alt_hostname+'$1')
+(loc.port?':'+loc.port:'')+'/';return p_urlInternalRegExp(pattern);};$.urlInternalRegExp=p_urlInternalRegExp=function(re){if(re){url_regexp=is_string(re)?new RegExp(re,'i'):re;}
return url_regexp;};p_urlInternalHost('www');$.isUrlInternal=p_isUrlInternal=function(url){if(!url){return undefined;}
if(url_regexp.test(url)){return TRUE;}
if(/^https?:\/\//i.test(url)){return FALSE;}
if(/^(?:#|[a-z\d.-]+:)/i.test(url)){return undefined;}
return TRUE;};$.isUrlExternal=p_isUrlExternal=function(url){var result=p_isUrlInternal(url);return typeof result==='boolean'?!result:result;};p_urlFilter=function(selector,attr){return this.filter(':'+selector+(attr?'('+attr+')':''));};$.fn[str_urlInternal]=curry(p_urlFilter,str_urlInternal);$.fn[str_urlExternal]=curry(p_urlFilter,str_urlExternal);p_urlFilterSelector=function(func,elem,i,match){var a=match[3]||get_attr(elem);return a?!!func($(elem).attr(a)):FALSE;};$.expr[':'][str_urlInternal]=curry(p_urlFilterSelector,p_isUrlInternal);$.expr[':'][str_urlExternal]=curry(p_urlFilterSelector,p_isUrlExternal);function p_params(fragment_mode,arg0,arg1,arg2){var params;if(is_string(arg1)||is_object(arg1)){return build_url(arg0,arg1,arg2,fragment_mode);}else if(is_object(arg0)){return $.param(arg0);}else if(is_string(arg0)){return deserialize(arg0,arg1,fragment_mode);}else{params=fragment_mode?get_fragment():loc.search;return deserialize(params,arg0,fragment_mode);}};$[str_queryString]=curry(p_params,0);$[str_fragment]=curry(p_params,1);function p_fn_params(){var attr,params,merge_mode,args=aps.call(arguments),fragment_mode=args.shift();if(is_string(args[1])||is_object(args[1])){attr=args.shift();}
params=args.shift();merge_mode=args.shift();return this.each(function(){var that=$(this),a=attr||get_attr(this),url=a&&that.attr(a)||'';url=p_params(fragment_mode,url,params,merge_mode);that.attr(a,url);});};$.fn[str_queryString]=curry(p_fn_params,0);$.fn[str_fragment]=curry(p_fn_params,1);function p_passParams(){var args=aps.call(arguments),fragment_mode=args.shift(),url=args.shift(),params=p_params(fragment_mode);if($.isFunction(args[0])){params=args.shift()(params);}else if($.isArray(args[0])){$.each(args.shift(),function(i,v){delete params[v];});}
return p_params(fragment_mode,url,params,args.shift());};$[str_passQueryString]=curry(p_passParams,0);$[str_passFragment]=curry(p_passParams,1);function p_fn_passParams(){var attr,args=aps.call(arguments),fragment_mode=args.shift();if(is_string(args[0])){attr=args.shift();}
return this.each(function(){var that=$(this),a=attr||get_attr(this),url=a&&that.attr(a)||'';url=p_passParams.apply(this,[fragment_mode,url].concat(args));that.attr(a,url);});};$.fn[str_passQueryString]=curry(p_fn_passParams,0);$.fn[str_passFragment]=curry(p_fn_passParams,1);function deserialize(params,cast_values,fragment_mode){var p,key,val,obj={},cast_types={'null':null,'true':TRUE,'false':FALSE},decode_uri_component=decodeURIComponent,re=fragment_mode?/^.*[#]/:/^.*[?]|#.*$/g;params=params.replace(re,'').replace(/\+/g,' ').split('&');while(params.length){p=params.shift().split('=');key=decode_uri_component(p[0]);if(p.length===2){val=decode_uri_component(p[1]);if(cast_values){if(val&&!isNaN(val)){val=Number(val);}else if(val==='undefined'){val=undefined;}else if(cast_types[val]!==undefined){val=cast_types[val];}}
if($.isArray(obj[key])){obj[key].push(val);}else if(obj[key]!==undefined){obj[key]=[obj[key],val];}else{obj[key]=val;}}else if(key){obj[key]=cast_values?undefined:'';}}
return obj;};function build_url(url,params,merge_mode,fragment_mode){var qs,re=fragment_mode?/^([^#]*)[#]?(.*)$/:/^([^#?]*)[?]?([^#]*)(#?.*)/,matches=url.match(re),url_params=deserialize(matches[2],0,fragment_mode),hash=matches[3]||'';if(is_string(params)){params=deserialize(params,0,fragment_mode);}
if(merge_mode===2){qs=params;}else if(merge_mode===1){qs=$.extend({},params,url_params);}else{qs=$.extend({},url_params,params);}
qs=$.param(qs);return matches[1]+(fragment_mode?'#':qs||!matches[1]?'?':'')+qs+hash;};$.setFragment=p_setFragment=function(params,merge_mode){var frag=is_object(params)?p_params(TRUE,params):(params||'').replace(/^#/,'');frag=params?build_url('#'+get_fragment(),'#'+frag,merge_mode,1):'#';loc.href=loc.href.replace(/#.*$/,'')+frag;};$[str_fragmentChange]=function(delay){if(delay===TRUE){delay=100;}
function trigger(){var event=$.Event(str_fragmentChange);event[str_fragment]=get_fragment();$(document).trigger(event);};has_onhashchange&&$(window).unbind(str_hashchange);timeout_id&&clearTimeout(timeout_id);timeout_id=null;if(typeof delay==='number'){if(has_onhashchange){$(window).bind(str_hashchange,trigger);}else{last_fragment=get_fragment();if($.isFunction(ie_history)){ie_history=ie_history();}
(function loopy(){var frag=get_fragment(),ie_frag=ie_history[str_fragment](last_fragment);if(frag!==last_fragment){ie_history[str_update](frag,ie_frag);last_fragment=frag;trigger();}else if(ie_frag!==last_fragment){p_setFragment(ie_frag,2);}
timeout_id=setTimeout(loopy,delay<0?0:delay);})();}}};function ie_history(){var iframe,browser=$.browser,that={};that[str_update]=that[str_fragment]=function(val){return val;};if(browser.msie&&browser.version<8){that[str_update]=function(frag,ie_frag){var doc=iframe.document;if(frag!==ie_frag){doc.open();doc.close();doc.location.hash='#'+frag;}};that[str_fragment]=function(){return iframe.document.location.hash.replace(/^#/,'');};iframe=$('<iframe/>').hide().appendTo('body').get(0).contentWindow;that[str_update](get_fragment());}
return that;};})(jQuery);(function($){$.fn.hoverIntent=function(f,g){var cfg={sensitivity:7,interval:100,timeout:0};cfg=$.extend(cfg,g?{over:f,out:g}:f);var cX,cY,pX,pY;var track=function(ev){cX=ev.pageX;cY=ev.pageY;};var compare=function(ev,ob){ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t);if((Math.abs(pX-cX)+Math.abs(pY-cY))<cfg.sensitivity){$(ob).unbind("mousemove",track);ob.hoverIntent_s=1;return cfg.over.apply(ob,[ev]);}else{pX=cX;pY=cY;ob.hoverIntent_t=setTimeout(function(){compare(ev,ob);},cfg.interval);}};var delay=function(ev,ob){ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t);ob.hoverIntent_s=0;return cfg.out.apply(ob,[ev]);};var handleHover=function(e){var p=(e.type=="mouseover"?e.fromElement:e.toElement)||e.relatedTarget;while(p&&p!=this){try{p=p.parentNode;}catch(e){p=this;}}if(p==this){return false;}var ev=jQuery.extend({},e);var ob=this;if(ob.hoverIntent_t){ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t);}if(e.type=="mouseover"){pX=ev.pageX;pY=ev.pageY;$(ob).bind("mousemove",track);if(ob.hoverIntent_s!=1){ob.hoverIntent_t=setTimeout(function(){compare(ev,ob);},cfg.interval);}}else{$(ob).unbind("mousemove",track);if(ob.hoverIntent_s==1){ob.hoverIntent_t=setTimeout(function(){delay(ev,ob);},cfg.timeout);}}};return this.mouseover(handleHover).mouseout(handleHover);};})(jQuery);jQuery.easing['jswing']=jQuery.easing['swing'];jQuery.extend(jQuery.easing,{def:'easeOutQuad',swing:function(x,t,b,c,d){return jQuery.easing[jQuery.easing.def](x,t,b,c,d);},easeOutQuad:function(x,t,b,c,d){return-c*(t/=d)*(t-2)+b;},easeOutCubic:function(x,t,b,c,d){return c*((t=t/d-1)*t*t+1)+b;}});(function($){var opts={menu:{fadeInDuration:190,fadeOutDuration:300,easeOut:'easeOutCubic',easeIn:'easeOutQuad'}};function fade(dir){var self=$(this),opacity=dir,duration=[opts.menu.fadeOutDuration,opts.menu.fadeInDuration][dir],easing=[opts.menu.easeOut,opts.menu.easeIn][dir];if(!self[0].className.match(/active/)){$("b",self).animate({opacity:opacity},duration,easing);return false;}}
$(document).ready(function(){var $menuItems=$("#menu li a");$.extend($.fn.okValidate.validators,{captcha:/^5$/});$.extend($.fn.okValidate.messages,{captcha:"#{name} was incorrect"});if(!$.browser.msie){$menuItems.hoverIntent(function(){fade.call(this,1);},function(){fade.call(this,0);}).not(".active,.active-trail").addClass('hover');}
$("a[rel='external']").each(function(){$(this).attr('target','_blank');})});})(jQuery);
