﻿
function externalLinks() {
	if (!document.getElementsByTagName) return;
	var anchors = document.getElementsByTagName("a");
	for (var i=0; i<anchors.length; i++) {
	var anchor = anchors[i];
	if (anchor.getAttribute("href") &&
		anchor.getAttribute("rel") == "external")
		anchor.target = "_blank";
	}
}

function redirectMe (sel) {
    var url = sel[sel.selectedIndex].value;
    window.location = url;
}

window.onload = externalLinks;

$(document).ready(function() { 
	$(".paper").hide();
	$(".txtsea").hide();
	$(".months li span").hide();
	
	$(".mapa li a").mouseover(function() {
		var rel = $(this).attr('rel');
		$('.'+rel).show();
	});
	$(".mapa li a").mouseout(function() {
		var rel = $(this).attr('rel');
		$('.'+rel).hide();
	});

	$(".months li a").mouseover(function() {
		$(this).find('span').show();
	});
	$(".months li a").mouseout(function() {
		$(this).find('span').hide();
	});
	
	// shop accordeon
	maxWidth = 294;
	minWidth = 110;
	$(".tomove li").mouseover(
	  function(){
		$(this).animate({width: maxWidth+"px"}, { queue:false, duration:400});
	});
	$(".tomove li").mouseout(
	  function(){
		 $(this).animate({width: minWidth+"px"}, { queue:false, duration:400 });
	});
});
 
