(function(b){var f=b.browser.msie&&parseInt(b.browser.version)===6&&typeof window.XMLHttpRequest!=="object",g=b.browser.msie&&parseInt(b.browser.version)===7,c=null,d=[];b.modal=function(a,h){return b.modal.impl.init(a,h)};b.modal.close=function(){b.modal.impl.close()};b.modal.focus=function(a){b.modal.impl.focus(a)};b.modal.setContainerDimensions=function(){b.modal.impl.setContainerDimensions()};b.modal.setPosition=function(){b.modal.impl.setPosition()};b.modal.update=function(a,h){b.modal.impl.update(a,
h)};b.fn.modal=function(a){return b.modal.impl.init(this,a)};b.modal.defaults={appendTo:"body",focus:!0,opacity:50,overlayId:"simplemodal-overlay",overlayCss:{},containerId:"simplemodal-container",containerCss:{},dataId:"simplemodal-data",dataCss:{},minHeight:null,minWidth:null,maxHeight:null,maxWidth:null,autoResize:!1,autoPosition:!0,zIndex:1E3,close:!0,closeHTML:'<a class="modalCloseImg" title="Close"></a>',closeClass:"simplemodal-close",escClose:!0,overlayClose:!1,position:null,persist:!1,modal:!0,
onOpen:null,onShow:null,onClose:null};b.modal.impl={d:{},init:function(a,h){if(this.d.data)return!1;c=b.browser.msie&&!b.boxModel;this.o=b.extend({},b.modal.defaults,h);this.zIndex=this.o.zIndex;this.occb=!1;if(typeof a==="object"){if(a=a instanceof jQuery?a:b(a),this.d.placeholder=!1,a.parent().parent().size()>0&&(a.before(b("<span></span>").attr("id","simplemodal-placeholder").css({display:"none"})),this.d.placeholder=!0,this.display=a.css("display"),!this.o.persist))this.d.orig=a.clone(!0)}else if(typeof a===
"string"||typeof a==="number")a=b("<div></div>").html(a);else return alert("SimpleModal Error: Unsupported data type: "+typeof a),this;this.create(a);this.open();b.isFunction(this.o.onShow)&&this.o.onShow.apply(this,[this.d]);return this},create:function(a){d=this.getDimensions();if(this.o.modal&&f)this.d.iframe=b('<iframe src="javascript:false;"></iframe>').css(b.extend(this.o.iframeCss,{display:"none",opacity:0,position:"fixed",height:d[0],width:d[1],zIndex:this.o.zIndex,top:0,left:0})).appendTo(this.o.appendTo);
this.d.overlay=b("<div></div>").attr("id",this.o.overlayId).addClass("simplemodal-overlay").css(b.extend(this.o.overlayCss,{display:"none",opacity:this.o.opacity/100,height:this.o.modal?d[0]:0,width:this.o.modal?d[1]:0,position:"fixed",left:0,top:0,zIndex:this.o.zIndex+1})).appendTo(this.o.appendTo);this.d.container=b("<div></div>").attr("id",this.o.containerId).addClass("simplemodal-container").css(b.extend(this.o.containerCss,{display:"none",position:"fixed",zIndex:this.o.zIndex+2})).append(this.o.close&&
this.o.closeHTML?b(this.o.closeHTML).addClass(this.o.closeClass):"").appendTo(this.o.appendTo);this.d.wrap=b("<div></div>").attr("tabIndex",-1).addClass("simplemodal-wrap").css({height:"100%",outline:0,width:"100%"}).appendTo(this.d.container);this.d.data=a.attr("id",a.attr("id")||this.o.dataId).addClass("simplemodal-data").css(b.extend(this.o.dataCss,{display:"none"})).appendTo("body");this.setContainerDimensions();this.d.data.appendTo(this.d.wrap);(f||c)&&this.fixIE()},bindEvents:function(){var a=
this;b("."+a.o.closeClass).bind("click.simplemodal",function(b){b.preventDefault();a.close()});a.o.modal&&a.o.close&&a.o.overlayClose&&a.d.overlay.bind("click.simplemodal",function(b){b.preventDefault();a.close()});b(document).bind("keydown.simplemodal",function(b){a.o.modal&&b.keyCode===9?a.watchTab(b):a.o.close&&a.o.escClose&&b.keyCode===27&&(b.preventDefault(),a.close())});b(window).bind("resize.simplemodal",function(){d=a.getDimensions();a.o.autoResize?a.setContainerDimensions():a.o.autoPosition&&
a.setPosition();f||c?a.fixIE():a.o.modal&&(a.d.iframe&&a.d.iframe.css({height:d[0],width:d[1]}),a.d.overlay.css({height:d[0],width:d[1]}))})},unbindEvents:function(){b("."+this.o.closeClass).unbind("click.simplemodal");b(document).unbind("keydown.simplemodal");b(window).unbind("resize.simplemodal");this.d.overlay.unbind("click.simplemodal")},fixIE:function(){var a=this.o.position;b.each([this.d.iframe||null,!this.o.modal?null:this.d.overlay,this.d.container],function(b,g){if(g){var c=g[0].style;c.position=
"absolute";if(b<2)c.removeExpression("height"),c.removeExpression("width"),c.setExpression("height",'document.body.scrollHeight > document.body.clientHeight ? document.body.scrollHeight : document.body.clientHeight + "px"'),c.setExpression("width",'document.body.scrollWidth > document.body.clientWidth ? document.body.scrollWidth : document.body.clientWidth + "px"');else{var d;a&&a.constructor===Array?(b=a[0]?typeof a[0]==="number"?a[0].toString():a[0].replace(/px/,""):g.css("top").replace(/px/,""),
b=b.indexOf("%")===-1?b+' + (t = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + "px"':parseInt(b.replace(/%/,""))+' * ((document.documentElement.clientHeight || document.body.clientHeight) / 100) + (t = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + "px"',a[1]&&(d=typeof a[1]==="number"?a[1].toString():a[1].replace(/px/,""),d=d.indexOf("%")===-1?d+' + (t = document.documentElement.scrollLeft ? document.documentElement.scrollLeft : document.body.scrollLeft) + "px"':
parseInt(d.replace(/%/,""))+' * ((document.documentElement.clientWidth || document.body.clientWidth) / 100) + (t = document.documentElement.scrollLeft ? document.documentElement.scrollLeft : document.body.scrollLeft) + "px"')):(b='(document.documentElement.clientHeight || document.body.clientHeight) / 2 - (this.offsetHeight / 2) + (t = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + "px"',d='(document.documentElement.clientWidth || document.body.clientWidth) / 2 - (this.offsetWidth / 2) + (t = document.documentElement.scrollLeft ? document.documentElement.scrollLeft : document.body.scrollLeft) + "px"');
c.removeExpression("top");c.removeExpression("left");c.setExpression("top",b);c.setExpression("left",d)}}})},focus:function(a){var h=this,a=a&&b.inArray(a,["first","last"])!==-1?a:"first",c=b(":input:enabled:visible:"+a,h.d.wrap);setTimeout(function(){c.length>0?c.focus():h.d.wrap.focus()},10)},getDimensions:function(){var a=b(window);return[b.browser.opera&&b.browser.version>"9.5"&&b.fn.jquery<"1.3"||b.browser.opera&&b.browser.version<"9.5"&&b.fn.jquery>"1.2.6"?a[0].innerHeight:a.height(),a.width()]},
getVal:function(a,b){return a?typeof a==="number"?a:a==="auto"?0:a.indexOf("%")>0?parseInt(a.replace(/%/,""))/100*(b==="h"?d[0]:d[1]):parseInt(a.replace(/px/,"")):null},update:function(a,b){if(!this.d.data)return!1;this.d.origHeight=this.getVal(a,"h");this.d.origWidth=this.getVal(b,"w");this.d.data.hide();a&&this.d.container.css("height",a);b&&this.d.container.css("width",b);this.setContainerDimensions();this.d.data.show();this.o.focus&&this.focus();this.unbindEvents();this.bindEvents()},setContainerDimensions:function(){var a=
f||g,c=this.d.origHeight?this.d.origHeight:b.browser.opera?this.d.container.height():this.getVal(a?this.d.container[0].currentStyle.height:this.d.container.css("height"),"h"),a=this.d.origWidth?this.d.origWidth:b.browser.opera?this.d.container.width():this.getVal(a?this.d.container[0].currentStyle.width:this.d.container.css("width"),"w"),m=this.d.data.outerHeight(!0),n=this.d.data.outerWidth(!0);this.d.origHeight=this.d.origHeight||c;this.d.origWidth=this.d.origWidth||a;var e=this.o.maxHeight?this.getVal(this.o.maxHeight,
"h"):null,j=this.o.maxWidth?this.getVal(this.o.maxWidth,"w"):null,e=e&&e<d[0]?e:d[0],j=j&&j<d[1]?j:d[1],k=this.o.minHeight?this.getVal(this.o.minHeight,"h"):"auto",c=c?this.o.autoResize&&c>e?e:c<k?k:c:m?m>e?e:this.o.minHeight&&k!=="auto"&&m<k?k:m:k,e=this.o.minWidth?this.getVal(this.o.minWidth,"w"):"auto",a=a?this.o.autoResize&&a>j?j:a<e?e:a:n?n>j?j:this.o.minWidth&&e!=="auto"&&n<e?e:n:e;this.d.container.css({height:c,width:a});this.d.wrap.css({overflow:m>c||n>a?"auto":"visible"});this.o.autoPosition&&
this.setPosition()},setPosition:function(){var a,b;a=d[0]/2-this.d.container.outerHeight(!0)/2;b=d[1]/2-this.d.container.outerWidth(!0)/2;this.o.position&&Object.prototype.toString.call(this.o.position)==="[object Array]"&&(a=this.o.position[0]||a,b=this.o.position[1]||b);this.d.container.css({left:b,top:a})},watchTab:function(a){if(b(a.target).parents(".simplemodal-container").length>0){if(this.inputs=b(":input:enabled:visible:first, :input:enabled:visible:last",this.d.data[0]),!a.shiftKey&&a.target===
this.inputs[this.inputs.length-1]||a.shiftKey&&a.target===this.inputs[0]||this.inputs.length===0)a.preventDefault(),this.focus(a.shiftKey?"last":"first")}else a.preventDefault(),this.focus()},open:function(){this.d.iframe&&this.d.iframe.show();b.isFunction(this.o.onOpen)?this.o.onOpen.apply(this,[this.d]):(this.d.overlay.show(),this.d.container.show(),this.d.data.show());this.o.focus&&this.focus();this.bindEvents()},close:function(){var a=this;if(!a.d.data)return!1;a.unbindEvents();if(b.isFunction(a.o.onClose)&&
!a.occb)a.occb=!0,a.o.onClose.apply(a,[a.d]);else{if(a.d.placeholder){var c=b("#simplemodal-placeholder");a.o.persist?c.replaceWith(a.d.data.removeClass("simplemodal-data").css("display",a.display)):(a.d.data.hide().remove(),c.replaceWith(a.d.orig))}else a.d.data.hide().remove();a.d.container.hide().remove();a.d.overlay.hide();a.d.iframe&&a.d.iframe.hide().remove();setTimeout(function(){a.d.overlay.remove();a.d={}},10)}}}})(jQuery);
$(document).ready(function(){$.ajaxSetup({cache:!1});$("#socialmedia a").mouseover(function(){$(this).stop().animate({right:"-5px"},700)}).mouseout(function(){$(this).stop().animate({right:"-110px"},700)});$(".terms, #terms>.close").click(function(b){b.preventDefault();$("#terms>.close:hidden").toggle();$("#terms:visible").slideUp("slow");$("#terms:hidden").slideDown("slow")});$("a.external").attr("target","_blank");$("a").keypress(function(){this.blur();this.hideFocus=!1;this.style.outline=null});
$("a").mousedown(function(){this.blur();this.hideFocus=!0;this.style.outline="none"});var b={attachto:".contactform",containerId:"contact-container",overlayId:"simplemodal-overlay",init:function(){$(b.attachto).click(function(g){g.preventDefault();$.get("contact-form.php",function(c){$(c).modal({closeHTML:"<a href='#' title='Close' class='modal-close'>x</a>",overlayClose:!0,opacity:75,position:["20%"],overlayId:b.overlayId,containerId:b.containerId,onOpen:b.open,onShow:b.show,onClose:b.close})})})},
open:function(b){var c=$("#contact-container .contact-title").html();$("#contact-container .contact-title").html("Loading...");b.overlay.fadeIn(200,function(){b.container.fadeIn(200,function(){b.data.fadeIn(200,function(){$("#contact-container .contact-content").animate({height:"350"},function(){$("#contact-container .contact-title").html(c);$("#contact-container form").fadeIn(200,function(){$("#contact-container #contact-name").focus()})})})})})},show:function(g){$("#contact-container .contact-send").click(function(c){c.preventDefault();
if(b.validate()){var d=$("#contact-container .contact-message");d.fadeOut(function(){d.removeClass("contact-error").empty()});$("#contact-container .contact-title").html("Sending...");$("#contact-container form").fadeOut(200);$("#contact-container .contact-content").animate({height:"100px"},function(){$("#contact-container .contact-loading").fadeIn(200,function(){$.ajax({url:"contact-form.php",data:$("#contact-container form").serialize()+"&action=send",type:"post",cache:!1,dataType:"html",success:function(a){$("#contact-container .contact-loading").fadeOut(200,
function(){$("#contact-container .contact-title").html("Thank you!");d.html(a).fadeIn(200)});setTimeout(function(){b.close(g)},1500)},error:b.error})})})}})},close:function(b){$("#contact-container .contact-message").fadeOut();$("#contact-container .contact-title").html("Goodbye...");$("#contact-container form").fadeOut(200);$("#contact-container .contact-content").animate({height:40},function(){b.data.fadeOut(200,function(){b.container.fadeOut(200,function(){b.overlay.fadeOut(200,function(){$.modal.close()})})})})},
error:function(b){alert(b.statusText)},validate:function(){function g(a){$(c+" .contact-message").animate({height:"30px"}).html($('<div class="contact-error" ></div>').append(a)).slideDown(200)}var c="#"+b.containerId,d=$(c+" #contact-email").val();$(c+" .missing").removeClass("missing");$(c+" .contact-error").remove();$(c+" #contact-name").val()||$(c+" label[for=contact-name]").addClass("missing");$(c+" #contact-email").val()||$(c+" label[for=contact-email]").addClass("missing");$(c+" #contact-message").val()||
$(c+" label[for=contact-message]").addClass("missing");if($(c+" label").hasClass("missing"))return g("Missing Information"),!1;return!function(a){var b=a.lastIndexOf("@");if(b<1||b+1===a.length)return!1;if(/(\.{2,})/.test(a))return!1;var c=a.substring(0,b),a=a.substring(b+1);return c.length<1||c.length>64||a.length<4||a.length>255?!1:/(^\.|\.$)/.test(c)||/(^\.|\.$)/.test(a)?!1:!/^"(.+)"$/.test(c)&&!/^[-a-zA-Z0-9!#$%*\/?|^{}`~&'+=_\.]*$/.test(c)?!1:!/^[-a-zA-Z0-9\.]*$/.test(a)||a.indexOf(".")===-1?
!1:!0}(d)?($(c+" label[for=contact-email]").addClass("missing"),g("Invalid Email Address"),!1):!0}};$.browser.msie&&$.browser.version<7||b.init();var f={attachto:".contactwindow",containerId:"contact-container",overlayId:"simplemodal-overlay",init:function(){$(f.attachto).click(function(b){b.preventDefault();$.get("contact-info.html",function(b){$(b).modal({closeHTML:"<a href='#' title='Close' class='modal-close'>x</a>",overlayClose:!0,opacity:70,position:["20%"],overlayId:f.overlayId,containerId:f.containerId,
onOpen:f.open,onClose:f.close})})})},open:function(b){b.overlay.fadeIn(100,function(){b.container.fadeIn(100,function(){b.data.fadeIn(100,function(){$("#contact-info-container").fadeIn(100)})})})},close:function(b){$("#contact-info-container").fadeOut(200,function(){b.container.fadeOut(200,function(){b.overlay.fadeOut(200,function(){$.modal.close()})})})}};$.browser.msie&&$.browser.version<7||f.init()});$(window).load(function(){$("div.fb_like").delay(1E3).fadeIn("fast")});
var fbObjectValidationObjects=["div","span","p","ul","li"];fbObjectValidationObjects.reverse();function findFBML(b,f){return b.indexOf(f)===-1?!1:!0}
for(var x=0;x<fbObjectValidationObjects.length;){for(var fbVObjectNode=document.getElementsByTagName(fbObjectValidationObjects[x]),l=[],i=0,ll=fbVObjectNode.length;i!=ll;l.push(fbVObjectNode[i++]));l.reverse();for(var fbVObject=l,i=0;i<fbVObject.length;){var fbRObject=fbVObject[i].innerHTML;if(findFBML(fbRObject,"<\!-- FBML ")!=!1)fbRObject=fbRObject.replace(/<\!-- FBML /g,""),fbRObject=fbRObject.replace(/ FBML --\>/g,""),fbVObject[i].innerHTML=fbRObject;i++}x++};
