﻿	var activo=1;
	$(document).ready(function(){	

	
		if($.browser.msie && $.browser.version<"7.0")
		{
		$(function(){
			$("<div>")
			.css({
				'position': 'absolute',
				'top': '0px', 
				'left': '0px',
				backgroundColor: 'black',
				'opacity': '0.7',
				'width': '100%',
				'height': $('body').height(),
				zIndex: 5000
			})
			.appendTo("body");
			$("<div style='color:#000;background: url(/layout_images/browser.jpg)'><div style='float:left;padding-top:200px;padding-left:150px;'><li><a href='http://www.microsoft.com/windows/internet-explorer/default.aspx' style='color:#000'>Internet Explorer 8<a/></li><li><a href='http://www.mozilla.com/en-US/firefox/ie.html'  style='color:#000'>Firefox<a/></li><li><a href='http://www.google.com/chrome'  style='color:#000'>Chrome<a/></li><li><a href='http://www.apple.com/safari/'  style='color:#000'>Safari<a/></li></span></div></div>")
			.css({
				backgroundColor: 'white',
				'top': '50%',
				'left': '50%',
				marginLeft: -300,
				marginTop: -200,
				width: 579,
				paddingRight: 10,
				paddingLeft: 10,
				paddingTop: 10,
				height: 379,
				'position': 'absolute',
				zIndex: 6000
			})
			.appendTo("body");
			});
		}
		
	});	
	function ver(num)
	{
		$('#desc_'+num).show('fast');			
		$('#desc_'+activo).hide('fast');		
		activo=num;
	}
	function toogle_sound()
	{		
		if(parent.frames.length>0)
		{
			soma=parent.frame_som.call_sound();
		}
		else
		{
			document.location="som.html";
			soma=0;
		}		
		if (soma=="ligado")
		{
			parent.frame_som.location="off.html";
			$('#som_txt').html('Ligar Som');
		}
		else
		{
			if (soma!="0")
			{
				parent.frame_som.location="play.html";	
				$('#som_txt').html('Desligar Som');
			}
		}
	}


function replaceText(text){
	while(text.lastIndexOf("&") > 0){
		text = text.replace('&', '[i-Stats]');
	}
	return text;
}

var web_referrer = replaceText(document.referrer);
istat = new Image(1,1);
istat.src = "/counter.php?sw="+screen.width+"&sc="+screen.colorDepth+"&referer="+web_referrer+"&page="+location.href;
	function addLoadEvent(func) {	
	  var oldonload = window.onload;	
	  if (typeof window.onload != 'function') {	
	    window.onload = func;	
	  } else {	
	    window.onload = function() {	
	      if (oldonload) {	
	        oldonload();	
	      }	
	      func();	
	    }	
	  }
}	  	

