document.onclick = function(e){
  var target = e ? e.target : window.event.srcElement;
  while (target && !/^(a|body)$/i.test(target.nodeName)){target = target.parentNode;}
  if (target && target.getAttribute("rel")&& target.rel == "external"){
    var linkExterno = window.open(target.href);
    return linkExterno.closed;
  }
}
$(document).ready(function(){

$('ul#show').animatedinnerfade({
						speed: 1000,
						timeout: 5000,
						type: 'random',
						containerheight: '248px',
						containerwidth: '550px',
						animationSpeed: 6000,
						animationtype: 'fade',
						bgFrame: 'none',
						controlBox: 'none',
						displayTitle: 'none'
});

$('ul#showr').animatedinnerfade({
						speed: 6000,
						timeout: 5000,
						type: 'sequence',
						containerheight: '185px',
						containerwidth: '238px',
						animationSpeed: 10000,
						animationtype: 'fade',
						bgFrame: 'none',
						controlBox: 'show',
						displayTitle: 'none'
					});
	$(".tab_content").hide();
	$("ul.tabsr li:first").addClass("active").show();
	$(".tab_content:first").show();
	
	$("ul.tabsr li").click(function() {
		$("ul.tabsr li").removeClass("active");
		$(this).addClass("active");
		$(".tab_content").hide();
		var activeTab = $(this).find("a").attr("href");
		$(activeTab).fadeIn();
		return false;
	});

$('a.iframe').each(
			function (i) {
				$(this).replaceWith("<iframe src='http://www.idiso.com/csl/reservations/jsp/C_Search_Dates.jsp?&codigoHotel=6992&lang=es&idPartner=HUSAGRANPROA&idPrm=MBGRANPROA&idONg=P39&idNom=webpropia&hayPopUp=true&rutaEstilos=http://www.hotelgranproa.com/css/' frameborder='0' scrolling='auto' allowtransparency='allowtransparency' width='100%' height='300'></iframe>");
			}
		);
});



