/* This file was compressed using MbCompression library. http://blog.mironabramson.com */ 
var indiana=function($){var hits=3;$fs=11;var fontSize=function(action,container){container=typeof(container)!='undefined'?container:'div.texto';var hitIncrease=0;var hitDecrease=0;if(action=='plus'&&hits<6){$fs+=1;hitIncrease=1;}
else if(action=='minus'&&hits>0){$fs-=1;hitDecrease=1;}
jQuery(container).css('font-size',$fs);if(hitIncrease==1)hits+=1;else if(hitDecrease==1)hits-=1;}
var ___getPageSize=function(){var xScroll,yScroll;if(window.innerHeight&&window.scrollMaxY){xScroll=window.innerWidth+window.scrollMaxX;yScroll=window.innerHeight+window.scrollMaxY;}else if(document.body.scrollHeight>document.body.offsetHeight){xScroll=document.body.scrollWidth;yScroll=document.body.scrollHeight;}else{xScroll=document.body.offsetWidth;yScroll=document.body.offsetHeight;}
var windowWidth,windowHeight;if(self.innerHeight){if(document.documentElement.clientWidth){windowWidth=document.documentElement.clientWidth;}else{windowWidth=self.innerWidth;}
windowHeight=self.innerHeight;}else if(document.documentElement&&document.documentElement.clientHeight){windowWidth=document.documentElement.clientWidth;windowHeight=document.documentElement.clientHeight;}else if(document.body){windowWidth=document.body.clientWidth;windowHeight=document.body.clientHeight;}
if(yScroll<windowHeight){pageHeight=windowHeight;}else{pageHeight=yScroll;}
if(xScroll<windowWidth){pageWidth=xScroll;}else{pageWidth=windowWidth;}
arrayPageSize=new Array(pageWidth,pageHeight,windowWidth,windowHeight);return arrayPageSize;};var replaceAll=String.prototype.replaceAll=function(de,para){var str=this;var pos=str.indexOf(de);while(pos>-1){str=str.replace(de,para);pos=str.indexOf(de);}
return(str);}
var makeOverlay=function(callback){$('body').append('<div class="overlay"></div>');var o=$('body .overlay:last');var oQtd=$('body .overlay').size();oQtd=900+oQtd*10;var arrPageSizes=___getPageSize();$(o).css({'opacity':'0.5','width':arrPageSizes[0]+'px','height':arrPageSizes[1]+'px','position':'absolute','top':'0px','left':'0px','z-index':oQtd,'background-color':'#000'}).fadeIn('fast',function(){if(typeof callback=='function')callback();});}
var removeOverlay=function(id){var o=$('body .overlay:last');$(o).fadeOut(function(){$(o).remove();});}
var history=[];var openPage=function(id,p,callback){hits=3;$fs=11;$.ajax({type:'GET',url:'inc/'+p,dataType:'html',beforeSend:function(){$('#loadingDiv').fadeIn();},error:function(){$('#errorDiv').fadeIn();setTimeout(function(){$('#errorDiv').fadeOut();},7000);},complete:function(){$('#loadingDiv').fadeOut();},success:function(data){$('body').prepend(data);makeOverlay(function(){$('#'+id).animate({'top':'50%'},'fast',function(){history[history.length]=p;var oQtd=$('body .overlay').size();oQtd=900+oQtd*10;$('#'+id).css('z-index',oQtd+1)
window.location.hash='#'+p;if(typeof callback=='function')callback();})});},timeout:60000});};var closePage=function(id){$('#'+id).animate({'top':'-542px'},'fast',function(){removeOverlay(id);if(id){$('#'+id).remove();history.splice(history.length-1,1);if(history.length>0){window.location.hash=history[history.length-1];}
else{window.location.hash='_blank';}}})};return{init:function(){$(document).ready(function(){$(window).resize(function(){var arrPageSizes=___getPageSize();$('.overlay').css({'width':arrPageSizes[0],'height':arrPageSizes[1]});});var hash=window.location.hash;if(hash!=''&&hash!='#'&&hash!='#_blank'){openPage(hash.replace('#','').replaceAll('_','-').substring(0,(hash.indexOf('.ashx')?hash.indexOf('.ashx'):hash.length)-1),hash.replace('#',''));};$('.page').live('click',function(){openPage($(this).attr('href').replace('#',''),$(this).attr('rel'));return false;})
$('.bt_fechar').live('click',function(){var e=$(this);closePage($(e).parent().attr('id'));return false;})})}}}(jQuery);indiana.init();
