window.addEvent('domready', function() { if($('showMore')){ var content = $('descripcion_serie'); var contentHeight = content.getSize().scrollSize.y; var abrir = 1; var fxMore = new Fx.Styles(content, {duration:200, wait:false}); $('showMore').addEvent('click', function(e) { if(abrir == 1){ var altura = contentHeight; abrir = 0; $('showMore').innerHTML = 'Menos información.'; }else{ var altura = 350; abrir = 1; $('showMore').innerHTML = 'Más información.'; } fxMore.start({ height: altura+'px' }); }); } if($('descripcion_serie')){ var theExtracto = $('descripcion_serie'); var theExtractoHeight = theExtracto.getSize().scrollSize.y; var Fxextracto = new Fx.Styles(theExtracto, {duration:200, wait:false}); var abrir = 1; Fxextracto.start({ height: '240px' }); $('moreExtracto').addEvent('click', function(e) { if(abrir == 1){ abrir = 0; var altura = theExtractoHeight; //$('moreExtracto').innerHTML = '...Ocultar'; $('moreExtracto').removeClass('moreInfo'); $('moreExtracto').addClass('lessInfo'); }else{ abrir = 1; var altura = 240; //$('moreExtracto').innerHTML = '...seguir leyendo'; $('moreExtracto').removeClass('lessInfo'); $('moreExtracto').addClass('moreInfo'); } Fxextracto.start({ height: altura+'px' }); }); } if($('lastsCategoryUpdated')){ var hor = new Ticker('lastsCategoryUpdated',{speed:750,delay:1500,direction:'horizontal'}); } if($('divSeriesActualizadasBox')){ var nSultimasSeriesActualizadas = new noobSlide({ box: $('divSeriesActualizadasBox'), items: divSeriesActualizadasBox, size: 264, interval: 1000 }); $('divSeriesActualizadasButtonPrev').addEvent('click', function(event) { event = new Event(event).stop(); nSultimasSeriesActualizadas.previous(); }); $('divSeriesActualizadasButtonNext').addEvent('click', function(event) { event = new Event(event).stop(); nSultimasSeriesActualizadas.next(); }); } if($('linkPaginaDeInicio')){ $('linkPaginaDeInicio').addEvent('click', function(event) { event = new Event(event).stop(); setHomepage(); }); } if($('linkAgregarAFavoritos')){ $('linkAgregarAFavoritos').addEvent('click', function(event) { event = new Event(event).stop(); bookmark('TuMejorTv.com', 'http://www.tumejortv.com/'); }); } if($('myTabs')){ myTabs1 = new mootabs('myTabs', {changeTransition: 'none',height: '600px', width: '520px', mouseOverClass: 'over'}); if(firstTabIndex != undefined){ myTabs1.activate(firstTabIndex); } } if($('offS')){ var wh = window.getScrollHeight(); new Element('div').setProperty('id', 'oscuridad').injectInside(document.body); $("oscuridad").setStyles({height : (wh+350)+'px', opacity : 0, top: 0+'px'}) $('offS').addEvent('click', function(event) { changeShadow(); event = new Event(event).stop(); }); $("oscuridad").addEvent('click', function(event) { event = new Event(event).stop(); changeShadow(); }); } }); function changeShadow(){ var fxo = new Fx.Styles($("oscuridad"), {duration: 0, wait: false}) if($("oscuridad").getStyle('opacity') == 0){ fxo.start({opacity : 0.8}); $("offS").removeClass('link_ligth_off').addClass('link_ligth_on'); }else{ fxo.start({opacity : 0}); $("offS").removeClass('link_ligth_on').addClass('link_ligth_off'); } } var os; if(document.layers) os = "n4"; else if(document.getElementById&&!document.all) os = "n6"; else if(document.all) os = "ie"; function bookmark(){ var url = window.location; var title = document.title; if(os == "ie"){ window.external.AddFavorite(url,title); }else if(window.sidebar){ if(title!="") window.sidebar.addPanel(title,url,""); else window.sidebar.addPanel(url,url,""); }else if(window.opera && window.print){ var elem = document.createElement('a'); elem.setAttribute('href',url); elem.setAttribute('title',title); elem.setAttribute('rel','sidebar'); elem.click(); } } function setHomepage() { if (document.all){ document.body.style.behavior='url(#default#homepage)'; document.body.setHomePage('http://www.tumejortv.com/'); }else if (window.sidebar){ if(window.netscape){ try{ netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect"); }catch(e){ alert(("Tu browser no permite esta acción. \nPara agregar tu mismo tumejortv.com debe ir a \nMenú Herramientas > Opciones\n en la pestaña Principal, coloca http://www.tumejortv.com como página de inicio.")); } } var prefs = Components.classes['@mozilla.org/preferences-service;1'].getService(Components. interfaces.nsIPrefBranch); prefs.setCharPref('browser.startup.homepage','http://www.asp.net/130.aspx'); } } function utf8_encode ( string ) { // http://kevin.vanzonneveld.net // + original by: Webtoolkit.info (http://www.webtoolkit.info/) // + improved by: Kevin van Zonneveld (http://kevin.vanzonneveld.net) // + improved by: sowberry // + tweaked by: Jack // + bugfixed by: Onno Marsman // + improved by: Yves Sucaet // + bugfixed by: Onno Marsman // * example 1: utf8_encode('Kevin van Zonneveld'); // * returns 1: 'Kevin van Zonneveld' string = (string+'').replace(/\r\n/g, "\n").replace(/\r/g, "\n"); var utftext = ""; var start, end; var stringl = 0; start = end = 0; stringl = string.length; for (var n = 0; n < stringl; n++) { var c1 = string.charCodeAt(n); var enc = null; if (c1 < 128) { end++; } else if((c1 > 127) && (c1 < 2048)) { enc = String.fromCharCode((c1 >> 6) | 192) + String.fromCharCode((c1 & 63) | 128); } else { enc = String.fromCharCode((c1 >> 12) | 224) + String.fromCharCode(((c1 >> 6) & 63) | 128) + String.fromCharCode((c1 & 63) | 128); } if (enc != null) { if (end > start) { utftext += string.substring(start, end); } utftext += enc; start = end = n+1; } } if (end > start) { utftext += string.substring(start, string.length); } return utftext; }