
jQuery(document).ready(function(){

	jQuery("a[href*='http://']:not([href*='"+location.hostname+"'])").attr("target","_blank");

	jQuery("input").clearDefault();
	
	jQuery("#wrapper").corner('top');
	
	jQuery('.entry-content, #primary').equalHeight();
	
	jQuery('#fone').mask('(99) 9999-9999');
	

});

function scrollInfoMapa(elemento, numSroll){
	
	jQuery('html, body').animate({
		scrollTop: jQuery(elemento).offset().top
	}, numSroll);
			
}


function heightPadrao(){

	jQuery('#sidebar, #interna').equalHeight();

	jQuery('#home-casa, #home-videos, #home-twitter').equalHeight();



}

function httpRequestClass() {

	this.req = null;
	this.XMLHttpFactories = [
		function () {return new XMLHttpRequest()},
		function () {return new ActiveXObject("Msxml2.XMLHTTP")},
		function () {return new ActiveXObject("Msxml3.XMLHTTP")},
		function () {return new ActiveXObject("Microsoft.XMLHTTP")}
	];

	this.sendRequest = function(url, callback, postData) {
		this.req = this.createXMLHTTPObject();
		if (!this.req)
			return;
		var method = (postData) ? "POST" : "GET";
		this.req.open(method,url,true);
		this.req.setRequestHeader('User-Agent','XMLHTTP/1.0');
		if (postData)
			this.req.setRequestHeader('Content-type','application/x-www-form-urlencoded');
		this.req.onreadystatechange = function () {
			if (httpRequestObj.req.readyState != 4)
				return;
			if (httpRequestObj.req.status != 200 && httpRequestObj.status != 304) {
				return;
			}
			callback(httpRequestObj.req);
		}
		if (this.req.readyState == 4)
			return;
		this.req.send(postData);
	}
	this.createXMLHTTPObject = function() {
		var xmlhttp = false;
		for (var i=0;i< this.XMLHttpFactories.length;i++) {
			try {
				xmlhttp = this.XMLHttpFactories[i]();
			}
			catch (e) {
				continue;
			}
		}
		return xmlhttp;
	}
}




