function footernav_init(){var fnav=jQuery("div#footernav div#fnav");fnav.load("/static/footer.html");var expander=jQuery("div#footernav a.expander");expander.click(function(){fnav.toggle();return false});expander.toggle(function(){$(this).css({backgroundPosition:"bottom right"});jQuery("#footernav").css({marginBottom:"525px"})},function(){$(this).css({backgroundPosition:"top right"});jQuery("#footernav").css({marginBottom:"0"})})}function gateway_init(){var isIE=navigator.appName.indexOf("Microsoft")!=-1;flash_player=(isIE)?window.flash_player1:document.flash_player1}function doClear(theText){if(theText.value==theText.defaultValue){theText.value=""}}$.fn.doClear2=function(){return this.focus(function(){if(this.value==this.defaultValue){this.value=""}}).blur(function(){if(!this.value.length){this.value=this.defaultValue}})};function todaystring(){var today=new Date();var day="";switch(today.getDay()){case 0:day="Domingo";break;case 1:day="Lunes";break;case 2:day="Martes";break;case 3:day="Mi&eacute;rcoles";break;
case 4:day="Jueves";break;case 5:day="Viernes";break;case 6:day="Sabado";break}var mo=today.getMonth()+1;mo=(mo<10)?"0"+mo:mo;var daydigit=today.getDate();daydigit=(daydigit<10)?"0"+daydigit:daydigit;var year=today.getFullYear();year=(year+"").substring(2,4);return day+", "+mo+"."+daydigit+"."+year}function loadFile(id,file){$("div#"+id).load(file)}function loadGridPane_sort(file){$("div#grid div.latest").load(file+".html");$("div#grid div.alpha").load(file+"_alpha.html")}function loadGridPane(file){$("div#grid").load(file)}function reinitialiseScrollPane(){$("#grid").jScrollPane({showArrows:true,scrollbarWidth:16,scrollbarMargin:0,arrowSize:24,dragMinHeight:88})}function loadCommunity(section){$("li.load_msg").show();$("div#community_template").load("/"+section+"/v-community/index.html",function(){$("li.load_msg").hide()});return false}jQuery(document).ready(function(){window.setTimeout("footernav_init();",500);var navLink=jQuery("div.panelnav ul li:not(.sort) a, div.tab div.subnav ul li a, div.subnav_bottom ul li a");
navLink.click(function(){jQuery(this).parent("li").siblings().removeClass("x");jQuery("div.subnav_bottom ul li").removeClass("x");jQuery(this).parent("li").addClass("x");return false});$("ul.newsgrid li:eq(1)").addClass("x");$("div#newsgrid span.newsgrid").children("div.topStories:first").show();$("a.newsgridTab").click(function(){var tabID=$(this).attr("id");tabID=tabID.replace("tab_","");$("#newsgrid span.newsgrid").children("div.topStories").hide();$("div."+tabID).show();return false});var timestamps=$("span.timestamp");jQuery.each(timestamps,function(){var current_time=Math.round(new Date().getTime()/1000);var modified_time=$(this).html();var time_diff=current_time-modified_time;var timestamp=new Date(modified_time*1000);var hrs=timestamp.getHours();var ampm=(hrs<12)?" AM ":" PM ";hrs=(hrs>12)?hrs-12:hrs;var mins=timestamp.getMinutes();mins=(mins<10)?"0"+mins:mins;var mins_ago=new Date((current_time-modified_time)*1000);mins_ago=mins_ago.getMinutes();mins_ago=(mins_ago==0)?1:mins_ago;var min_string=(mins_ago==1)?" minuto":" minutos";
if(time_diff<3300){timestamp="Actualizado hace "+mins_ago+min_string}else{timestamp=hrs+":"+mins+ampm+" ET"}$(this).text("- "+timestamp);$(this).show()});$.scrollTo.defaults.axis="x";$("div.scroll").scrollTo(0);$.scrollTo(0);var paneTarget=$("div.scroll");$("img.right").click(function(){$(this).nextAll(paneTarget).stop().scrollTo("+=264px",800)});$("img.left").click(function(){$(this).nextAll(paneTarget).stop().scrollTo("-=264px",800)});$("ul.tabs li a").click(function(){jQuery(this).parent("li").siblings().removeClass("x");jQuery(this).parent("li").addClass("x");return false});$("a#alpha").click(function(){$("div.panelnav ul li.sort a").removeClass("x");$(this).addClass("x");$("div.latest").hide();$("div.alpha").show();return false});$("a#latest").click(function(){$("div.panelnav ul li.sort a").removeClass("x");$(this).addClass("x");$("div.alpha").hide();$("div.latest").show();return false});if($("#navbar ul li.f").children("a").hasClass("x")){$("#navbar ul li.f").css({backgroundPosition:"-26px 100%"})}if($("#navbar ul li.l").children("a").hasClass("x")){$("#navbar").css({backgroundPosition:"976px 100%"})
}$("#navbar ul li.f a").hover(function(){$("#navbar ul li.f").css({backgroundPosition:"-26px 100%"})},function(){if($(this).hasClass("x")){return false}else{$("#navbar ul li.f").css({backgroundPosition:"-26px 0"})}});$("#navbar ul li.l a").hover(function(){$("#navbar").css({backgroundPosition:"976px 100%"})},function(){if($(this).hasClass("x")){return false}else{$("#navbar").css({backgroundPosition:"976px 0"})}});$("ul.newsgrid li:last").addClass("end");$("a.external").append('&nbsp;<img src="/images/redesign/icons/external.gif" />');window.setTimeout("addPagerLinks();",3000)});function getQueryStrVariable(variable,hrefstring){if(!(hrefstring)){var hrefstring=window.location.href}var queryIndex=hrefstring.indexOf("?")+1;var query=hrefstring.substring(queryIndex);var vars=query.split("&");for(var i=0;i<vars.length;i++){var pair=vars[i].split("=");if(pair[0]==variable){return pair[1]}}return false}function addPagerLinks(){var pageNum=parseInt($("div#nyxComments_pager span.paginationNavLinks span").text());pageNext=pageNum+1;
var pageUrl=location.href;pageUrl=pageUrl.substring(0,pageUrl.lastIndexOf("?"));var nextUrl=pageUrl+"?pageNum="+pageNext+"&mi_pluck_action=page_nav#Comments_Container";var nextLink='<a class="pager" href="'+nextUrl+'">Next</a>';$("div#nyxComments_pager span.paginationNavLinks a:last-child").after(" "+nextLink);if(pageNum>1){pagePrev=pageNum-1;var prevUrl=pageUrl+"?pageNum="+pagePrev+"&mi_pluck_action=page_nav#Comments_Container";var prevLink='<a class="pager" href="'+prevUrl+'">Prev</a>';$("div#nyxComments_pager span.paginationNavLinks a:first-child").before(" "+prevLink+" ")}}function alertTest2(alertTestMessage){if(getQueryStrVariable("test")=="2"){alert(alertTestMessage)}}function alertTest(alertTestMessage){if(getQueryStrVariable("test")=="1"){alert(alertTestMessage)}}jQuery.fn.exists=function(){return(this.length>0)};jQuery.fn.ifExists=function(){if(this.length>0){return this}};function getFlashGalleryURL(whichGallery,hideURL){var langFileSuffix="-es";var previewSuffix="-preview";var mediaSubDomain="media";
var flashGalleryURL="";var thisDomain=window.location.hostname;var previewSuffix="";var thisSubDomain="www";if(thisDomain.indexOf("preview.")===0){previewSuffix="-preview";thisSubDomain="preview";mediaSubDomain=mediaSubDomain}var thisDomainStartChar=thisDomain.indexOf("miamiherald.com");if(thisDomainStartChar==-1){thisDomainStartChar=thisDomain.indexOf("elnuevoherald.com")}else{langFileSuffix=""}thisDomain=thisDomain.substring(thisDomainStartChar);var thisChannelURL="http://"+mediaSubDomain+"."+thisDomain+"/static/multimedia/channels/";var thisPanelURL="http://"+mediaSubDomain+"."+thisDomain+"/static/multimedia/panels/";var thisStoryDetailURL="http://"+mediaSubDomain+"."+thisDomain+"/static/multimedia/story_detail/";if(hideURL==true){thisChannelURL="";thisPanelURL="";thisStoryDetailURL=""}var thisVersionSuffix="";switch(whichGallery){case"SectionFrontPhotoGallery":flashGalleryURL=thisChannelURL+"SectionFrontPhotoGallery";thisVersionSuffix=(langFileSuffix=="")?"-v7a":"-v7a";break;case"VideoPlayer-SectionFront":flashGalleryURL=thisChannelURL+"VideoPlayer-SectionFront";
thisVersionSuffix=(langFileSuffix=="")?"-v2":"-v2a";break;case"MultimediaPanel-PhotoGallery":flashGalleryURL=thisPanelURL+"MiamiHerald-MultimediaPanel-PhotoGallery";thisVersionSuffix=(langFileSuffix=="")?"-v8a":"-v8a";break;case"MultimediaPanel-VideoPlayer":flashGalleryURL=thisPanelURL+"MiamiHerald-MultimediaPanel-VideoPlayer";thisVersionSuffix=(langFileSuffix=="")?"-v3":"-v3";break;case"CommNewsUserPhotosSectionFront-PhotoGallery":flashGalleryURL=thisPanelURL+"CommNews-MultimediaPanel-PhotoGallery";langFileSuffix="";thisVersionSuffix=(langFileSuffix=="")?"-v7":"-v7";break;case"StoryLevel-VideoPromo":flashGalleryURL=thisStoryDetailURL+"MiamiHerald-StoryLevel-VideoPromo";thisVersionSuffix="";langFileSuffix="";break;case"StoryLevel-PhotoGallery":flashGalleryURL=thisStoryDetailURL+"StoryLevel-PhotoGallery";thisVersionSuffix=(langFileSuffix=="")?"-v8m":"-v8m";break;case"UnifiedVideoPlayer":flashGalleryURL=thisStoryDetailURL+"UnifiedVideoPlayer";thisVersionSuffix="";langFileSuffix="";break}return flashGalleryURL+langFileSuffix+previewSuffix+thisVersionSuffix+".swf"
}function displayEmailForm_launcher(url){var url_=url;var email_url_version="v-emailform";if((window.location.hostname).indexOf("preview.")===0){url_=url_.replace("www.","preview.")}if(url_.indexOf(email_url_version)==-1){var urlAry=url_.split("/");var urlAryLen=urlAry.length;url_="";for(var i=0;i<(urlAryLen-2);i++){url_+=urlAry[i]+"/"}url_+=email_url_version+"/";url_+=urlAry[urlAryLen-2]+"/";url_+=urlAry[urlAryLen-1]}displayEmailForm(url_);return false};
var cookies=document.cookie;var pos=cookies.indexOf('global_comment_pref=');if(pos!=-1){var start=pos+20;var end=cookies.indexOf(";",start);if(end==-1)end=cookies.length;var comment_cookie=cookies.substring(start,end)}else if(pos==-1){var enhcomcookie='0'}if(comment_cookie=='1'){var enhcomcookie='1'}else if(comment_cookie==''){var enhcomcookie='0'}$(document).ready(function(){var date=new Date();date.setTime(date.getTime()+(365*24*60*60*1000));var expires=date.toGMTString();if(enhcomcookie=='0'){$('#comment_toggle').attr('class','hide');$('#comment_toggle span.hide, div#guidelines-wrap, div#disclaimer-wrap, div#commentingStage').show()}else if(enhcomcookie=='1'){$('#comment_toggle').attr('class','show');$('#comment_toggle span.show').show()}$('span#comment_pref a').click(function(){$('#comment_bubble_top').fadeIn()});$('#comment_bubble_up img.ok').click(function(){document.cookie='global_comment_pref=; expires='+expires+'; path=/; domain=.elnuevoherald.com';window.location.reload()});$('#comment_bubble_top img.ok').click(function(){document.cookie='global_comment_pref=; expires='+expires+'; path=/; domain=.elnuevoherald.com';window.location.reload()});$('#comment_toggle').click(function(){$('#comment_bubble').fadeIn();if($(this).attr('class')=='hide'){$('#comment_bubble p').text('Esconder los comentarios en todas las historias.')}else if($(this).attr('class')=='show'){$('#comment_bubble p').text('Mostrar los comentarios en todas las historias.')}});$('img.ok').click(function(){var state=$(this).parents('#comment_toggle').attr('class');if(state=='hide'){document.cookie='global_comment_pref=1; expires='+expires+'; path=/; domain=.elnuevoherald.com';window.location.reload()}if(state=='show'){document.cookie='global_comment_pref=; expires='+expires+'; path=/; domain=.elnuevoherald.com';window.location.reload()}});$('img.cancel').click(function(){$('#comment_bubble, #comment_bubble_up, #comment_bubble_top').fadeOut();return false})});
