// Core, Popup, Page
function isAlien(b){return isObject(b)&&typeof b.constructor!="function"}function isArray(b){return isObject(b)&&b.constructor==Array}function isBoolean(b){return typeof b=="boolean"}function isFunction(b){return typeof b=="function"}function isNull(b){return typeof b=="object"&&!b}function isNumber(b){return typeof b=="number"&&isFinite(b)}function isObject(b){return(b&&typeof b=="object")||isFunction(b)}function isRegexp(b){return b&&b.constructor==RegExp}function isString(b){return typeof b=="string"}function isUndefined(b){return typeof b=="undefined"}function isEmpty(c){var b,a;if(isObject(c)){for(b in c){a=c[b];if(isUndefined(a)&&isFunction(a)){return false}}}return true}if(isUndefined(Array.indexOf)){Array.prototype.indexOf=function(d,e,a){var b,c;e=e||0;for(b=e;b<this.length;b++){c=this[b];if(a?c===d:isRegexp(d)?d.test(c):isFunction(d)?d(c):c==d){return b}}return -1}}function evaluate(str){eval(str)}var Popup={_POPUP_FEATURES:"",raw:function(a,d,b){b=b||Popup._POPUP_FEATURES;d=d||"_blank";var c=window.open(a,d,b);c.focus();return c},link:function(b,a){return Popup.raw(b.getAttribute("href"),b.getAttribute("rel")||"_blank",a)},event:function(a){Popup.link(a.currentTarget);return false},eventFeatures:function(a){return function(b){Popup.link(b.currentTarget,a);return false}},close:function(){window.close();return false}};var Page={current:window.location.href.toLowerCase(),locked:false,getCurrent:function(a){var b;a=a||Page.current;b=a.replace("http://"+window.location.host,"");b=(b.indexOf(".asp")!=-1)?b.substring(0,b.indexOf(".asp")+4):(b.indexOf("?")!=-1)?b.substring(0,b.lastIndexOf("?")):(b.indexOf("#")!=-1)?b.substring(0,b.lastIndexOf("#")):b;return b},is:function(){return $(Page.is.arguments).filter(function(){return(Page.getCurrent().substring(Page.getCurrent().length-this.length)==this)}).length>0},contains:function(b){var a=new RegExp(b);return a.test(Page.current)},lock:function(a,b){b=b||"O formulário já está sendo processado. Por favor, aguarde alguns instantes.";$(a).submit(function(){if(Page.locked){alert(b);return false}Page.locked=true;return true})},unlock:function(){Page.locked=false;return true}};

// Geral

$(function() {
	
	// Acrescenta classe "js" no elemento "body"
	$("body").addClass("js");
	
	// Ações para formulários que enviam dados
	if (Page.is("/contato/")) Page.lock("#conteudo form"); 
	
	// Abre links com classe "externo" em nova página
	$("a.externo").click(Popup.event); 

	$.preloadCssImages();  
	
}); 
