var min=8;var max=24;function increaseFontSize(){var p=document.getElementsByTagName('p');for(i=0;i<p.length;i++){if(p[i].style.fontSize){var s=parseInt(p[i].style.fontSize.replace("px",""));}else{var s=12;}
if(s!=max){s+=1;}
p[i].style.fontSize=s+"px"}}
function decreaseFontSize(){var p=document.getElementsByTagName('p');for(i=0;i<p.length;i++){if(p[i].style.fontSize){var s=parseInt(p[i].style.fontSize.replace("px",""));}else{var s=12;}
if(s!=min){s-=1;}
p[i].style.fontSize=s+"px"}}
var manual_or_random="manual"
var randomsetting="3 days"
function getCookie(Name){var re=new RegExp(Name+"=[^;]+","i");if(document.cookie.match(re))
return document.cookie.match(re)[0].split("=")[1]
return null}
function setCookie(name,value,days){var expireDate=new Date()
var expstring=(typeof days!="undefined")?expireDate.setDate(expireDate.getDate()+parseInt(days)):expireDate.setDate(expireDate.getDate()-5)
document.cookie=name+"="+value+"; expires="+expireDate.toGMTString()+"; path=/";}
function deleteCookie(name){setCookie(name,"moot")}
function setStylesheet(title,randomize){var i,cacheobj,altsheets=[""]
for(i=0;(cacheobj=document.getElementsByTagName("link")[i]);i++){if(cacheobj.getAttribute("rel").toLowerCase()=="alternate stylesheet"&&cacheobj.getAttribute("title")){cacheobj.disabled=true
altsheets.push(cacheobj)
if(cacheobj.getAttribute("title")==title)
cacheobj.disabled=false}}
if(typeof randomize!="undefined"){var randomnumber=Math.floor(Math.random()*altsheets.length)
altsheets[randomnumber].disabled=false}
return(typeof randomize!="undefined"&&altsheets[randomnumber]!="")?altsheets[randomnumber].getAttribute("title"):""}
function chooseStyle(styletitle,days){if(document.getElementById){setStylesheet(styletitle)
setCookie("mysheet",styletitle,days)}}
function indicateSelected(element){if(selectedtitle!=null&&(element.type==undefined||element.type=="select-one")){var element=(element.type=="select-one")?element.options:element
for(var i=0;i<element.length;i++){if(element[i].value==selectedtitle){if(element[i].tagName=="OPTION")
element[i].selected=true
else
element[i].checked=true
break}}}}
if(manual_or_random=="manual"){var selectedtitle=getCookie("mysheet")
if(document.getElementById&&selectedtitle!=null)
setStylesheet(selectedtitle)}
else if(manual_or_random=="random"){if(randomsetting=="eachtime")
setStylesheet("","random")
else if(randomsetting=="sessiononly"){if(getCookie("mysheet_s")==null)
document.cookie="mysheet_s="+setStylesheet("","random")+"; path=/"
else
setStylesheet(getCookie("mysheet_s"))}
else if(randomsetting.search(/^[1-9]+ days/i)!=-1){if(getCookie("mysheet_r")==null||parseInt(getCookie("mysheet_r_days"))!=parseInt(randomsetting)){setCookie("mysheet_r",setStylesheet("","random"),parseInt(randomsetting))
setCookie("mysheet_r_days",randomsetting,parseInt(randomsetting))}
else
setStylesheet(getCookie("mysheet_r"))}}
var arrowimages={down:['downarrowclass','http://www.guiadacidade.pt/portugal/css10/menu/img/arrow-down.gif',25],right:['rightarrowclass','http://www.guiadacidade.pt/portugal/css10/menu/img/arrow-right.gif']}
var jquerycssmenu={fadesettings:{overduration:50,outduration:50},buildmenu:function(menuid,arrowsvar){jQuery(document).ready(function($){var $mainmenu=$("#"+menuid+">ul")
var $headers=$mainmenu.find("ul").parent()
$headers.each(function(i){var $curobj=$(this)
var $subul=$(this).find('ul:eq(0)')
this._dimensions={w:this.offsetWidth,h:this.offsetHeight,subulw:$subul.outerWidth(),subulh:$subul.outerHeight()}
this.istopheader=$curobj.parents("ul").length==1?true:false
$subul.css({top:this.istopheader?this._dimensions.h+"px":0})
$curobj.children("a:eq(0)").css(this.istopheader?{paddingRight:arrowsvar.down[2]}:{}).append('<img src="'+(this.istopheader?arrowsvar.down[1]:arrowsvar.right[1])
+'" class="'+(this.istopheader?arrowsvar.down[0]:arrowsvar.right[0])
+'" style="border:0;" />')
$curobj.hover(function(e){var $targetul=$(this).children("ul:eq(0)")
this._offsets={left:$(this).offset().left,top:$(this).offset().top}
var menuleft=this.istopheader?0:this._dimensions.w
menuleft=(this._offsets.left+menuleft+this._dimensions.subulw>$(window).width())?(this.istopheader?-this._dimensions.subulw+this._dimensions.w:-this._dimensions.w):menuleft
$targetul.css({left:menuleft+"px"}).fadeIn(jquerycssmenu.fadesettings.overduration)},function(e){$(this).children("ul:eq(0)").fadeOut(jquerycssmenu.fadesettings.outduration)})})
$mainmenu.find("ul").css({display:'none',visibility:'visible'})})}}
jquerycssmenu.buildmenu("myjquerymenu",arrowimages);(function(jQuery){$.extend($,{jtabber:function(params){var navDiv=params.mainLinkTag;var selectedClass=params.activeLinkClass;var hiddenContentDiv=params.hiddenContentClass;var showDefaultTab=params.showDefaultTab;var showErrors=params.showErrors;var effect=params.effect;var effectSpeed=params.effectSpeed;if(showErrors){if(!$(navDiv).attr('title')){alert("ERROR: The elements in your mainLinkTag paramater need a 'title' attribute.\n ("+navDiv+")");return false;}
else if(!$("."+hiddenContentDiv).attr('id')){alert("ERROR: The elements in your hiddenContentClass paramater need to have an id.\n (."+hiddenContentDiv+")");return false;}}
if(!isNaN(showDefaultTab)){showDefaultTab--;$("."+hiddenContentDiv+":eq("+showDefaultTab+")").css('display','block');$(navDiv+":eq("+showDefaultTab+")").addClass(selectedClass);}
$(navDiv).each(function(){$(this).click(function(){$(navDiv).each(function(){$(this).removeClass();})
$("."+hiddenContentDiv).css('display','none');$(this).addClass(selectedClass);var contentDivId=$(this).attr('title');if(effect!=null){switch(effect){case'slide':$("#"+contentDivId).slideDown(effectSpeed);break;case'fade':$("#"+contentDivId).fadeIn(effectSpeed);break;}}
else{$("#"+contentDivId).css('display','block');}
return false;})})}})})(jQuery);