/* CSS */
var css_browser_selector = function() {var ua=navigator.userAgent.toLowerCase(),is=function(t){return ua.indexOf(t) != -1;},h=document.getElementsByTagName('html')[0],b=(!(/opera|webtv/i.test(ua))&&/msie (\d)/.test(ua))?('ie ie'+RegExp.$1):is('firefox/2')?'gecko ff2':is('firefox/3')?'gecko ff3':is('gecko/')?'gecko':is('opera/9')?'opera opera9':/opera (\d)/.test(ua)?'opera opera'+RegExp.$1:is('konqueror')?'konqueror':is('applewebkit/')?'webkit safari':is('mozilla/')?'gecko':'',os=(is('x11')||is('linux'))?' linux':is('mac')?' mac':is('win')?' win':'';var c=b+os+' js'; h.className += h.className?' '+c:c;}();
/* scroll noticias */
var headline_count;var headline_interval;var old_headline=0;var current_headline=0;$(document).ready(function(){headline_count=$("div.headline").size();$("div.headline:eq("+current_headline+")").css('top','5px');headline_interval=setInterval(headline_rotate,5000);$('#scrollup').hover(function(){clearInterval(headline_interval)},function(){headline_interval=setInterval(headline_rotate,5000);headline_rotate()})});function headline_rotate(){current_headline=(old_headline+1)%headline_count;$("div.headline:eq("+old_headline+")").animate({top:-65},"slow",function(){$(this).css('top','105px')});$("div.headline:eq("+current_headline+")").animate({top:5},"slow");old_headline=current_headline}
/* External _blank */
function externalLinks(){if(document.getElementsByTagName)for(var c=document.getElementsByTagName("a"),a=0;a<c.length;a++){var b=c[a];if(b.getAttribute("href")&&b.getAttribute("rel")=="external")b.target="_blank"}}window.onload=externalLinks;
/* SwfObject */
var swfobject=function(){var j="undefined",o="object",S="Shockwave Flash",ca="ShockwaveFlash.ShockwaveFlash",B="application/x-shockwave-flash",T="SWFObjectExprInst",U="onreadystatechange",m=window,i=document,r=navigator,V=false,C=[da],s=[],D=[],x=[],z,E,K,W,v=false,F=false,p,L,X=true,f=function(){var a=typeof i.getElementById!=j&&typeof i.getElementsByTagName!=j&&typeof i.createElement!=j,b=r.userAgent.toLowerCase(),c=r.platform.toLowerCase(),d=c?/win/.test(c):/win/.test(b);c=c?/mac/.test(c):/mac/.test(b); b=/webkit/.test(b)?parseFloat(b.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):false;var e=!+"\u000b1",g=[0,0,0],h=null;if(typeof r.plugins!=j&&typeof r.plugins[S]==o){if((h=r.plugins[S].description)&&!(typeof r.mimeTypes!=j&&r.mimeTypes[B]&&!r.mimeTypes[B].enabledPlugin)){V=true;e=false;h=h.replace(/^.*\s+(\S+\s+\S+$)/,"$1");g[0]=parseInt(h.replace(/^(.*)\..*$/,"$1"),10);g[1]=parseInt(h.replace(/^.*\.(.*)\s.*$/,"$1"),10);g[2]=/[a-zA-Z]/.test(h)?parseInt(h.replace(/^.*[a-zA-Z]+(.*)$/,"$1"),10):0}}else if(typeof m.ActiveXObject!= j)try{var k=new ActiveXObject(ca);if(k)if(h=k.GetVariable("$version")){e=true;h=h.split(" ")[1].split(",");g=[parseInt(h[0],10),parseInt(h[1],10),parseInt(h[2],10)]}}catch(l){}return{w3:a,pv:g,wk:b,ie:e,win:d,mac:c}}();(function(){if(f.w3){if(typeof i.readyState!=j&&i.readyState=="complete"||typeof i.readyState==j&&(i.getElementsByTagName("body")[0]||i.body))y();if(!v){typeof i.addEventListener!=j&&i.addEventListener("DOMContentLoaded",y,false);if(f.ie&&f.win){i.attachEvent(U,function(){if(i.readyState== "complete"){i.detachEvent(U,arguments.callee);y()}});m==top&&function(){if(!v){try{i.documentElement.doScroll("left")}catch(a){setTimeout(arguments.callee,0);return}y()}}()}f.wk&&function(){v||(/loaded|complete/.test(i.readyState)?y():setTimeout(arguments.callee,0))}();Y(y)}}})();function y(){if(!v){try{var a=i.getElementsByTagName("body")[0].appendChild(t("span"));a.parentNode.removeChild(a)}catch(b){return}v=true;a=C.length;for(var c=0;c<a;c++)C[c]()}}function Z(a){if(v)a();else C[C.length]=a}function Y(a){if(typeof m.addEventListener!= j)m.addEventListener("load",a,false);else if(typeof i.addEventListener!=j)i.addEventListener("load",a,false);else if(typeof m.attachEvent!=j)ea(m,"onload",a);else if(typeof m.onload=="function"){var b=m.onload;m.onload=function(){b();a()}}else m.onload=a}function da(){V?fa():M()}function fa(){var a=i.getElementsByTagName("body")[0],b=t(o);b.setAttribute("type",B);var c=a.appendChild(b);if(c){var d=0;(function(){if(typeof c.GetVariable!=j){var e=c.GetVariable("$version");if(e){e=e.split(" ")[1].split(","); f.pv=[parseInt(e[0],10),parseInt(e[1],10),parseInt(e[2],10)]}}else if(d<10){d++;setTimeout(arguments.callee,10);return}a.removeChild(b);c=null;M()})()}else M()}function M(){var a=s.length;if(a>0)for(var b=0;b<a;b++){var c=s[b].id,d=s[b].callbackFn,e={success:false,id:c};if(f.pv[0]>0){var g=n(c);if(g)if(G(s[b].swfVersion)&&!(f.wk&&f.wk<312)){w(c,true);if(d){e.success=true;e.ref=N(c);d(e)}}else if(s[b].expressInstall&&O()){e={};e.data=s[b].expressInstall;e.width=g.getAttribute("width")||"0";e.height= g.getAttribute("height")||"0";if(g.getAttribute("class"))e.styleclass=g.getAttribute("class");if(g.getAttribute("align"))e.align=g.getAttribute("align");var h={};g=g.getElementsByTagName("param");for(var k=g.length,l=0;l<k;l++)if(g[l].getAttribute("name").toLowerCase()!="movie")h[g[l].getAttribute("name")]=g[l].getAttribute("value");P(e,h,c,d)}else{ga(g);d&&d(e)}}else{w(c,true);if(d){if((c=N(c))&&typeof c.SetVariable!=j){e.success=true;e.ref=c}d(e)}}}}function N(a){var b=null;if((a=n(a))&&a.nodeName== "OBJECT")if(typeof a.SetVariable!=j)b=a;else if(a=a.getElementsByTagName(o)[0])b=a;return b}function O(){return!F&&G("6.0.65")&&(f.win||f.mac)&&!(f.wk&&f.wk<312)}function P(a,b,c,d){F=true;K=d||null;W={success:false,id:c};var e=n(c);if(e){if(e.nodeName=="OBJECT"){z=Q(e);E=null}else{z=e;E=c}a.id=T;if(typeof a.width==j||!/%$/.test(a.width)&&parseInt(a.width,10)<310)a.width="310";if(typeof a.height==j||!/%$/.test(a.height)&&parseInt(a.height,10)<137)a.height="137";i.title=i.title.slice(0,47)+" - Flash Player Installation"; d=f.ie&&f.win?"ActiveX":"PlugIn";d="MMredirectURL="+m.location.toString().replace(/&/g,"%26")+"&MMplayerType="+d+"&MMdoctitle="+i.title;if(typeof b.flashvars!=j)b.flashvars+="&"+d;else b.flashvars=d;if(f.ie&&f.win&&e.readyState!=4){d=t("div");c+="SWFObjectNew";d.setAttribute("id",c);e.parentNode.insertBefore(d,e);e.style.display="none";(function(){e.readyState==4?e.parentNode.removeChild(e):setTimeout(arguments.callee,10)})()}R(a,b,c)}}function ga(a){if(f.ie&&f.win&&a.readyState!=4){var b=t("div"); a.parentNode.insertBefore(b,a);b.parentNode.replaceChild(Q(a),b);a.style.display="none";(function(){a.readyState==4?a.parentNode.removeChild(a):setTimeout(arguments.callee,10)})()}else a.parentNode.replaceChild(Q(a),a)}function Q(a){var b=t("div");if(f.win&&f.ie)b.innerHTML=a.innerHTML;else if(a=a.getElementsByTagName(o)[0])if(a=a.childNodes)for(var c=a.length,d=0;d<c;d++)!(a[d].nodeType==1&&a[d].nodeName=="PARAM")&&a[d].nodeType!=8&&b.appendChild(a[d].cloneNode(true));return b}function R(a,b,c){var d, e=n(c);if(f.wk&&f.wk<312)return d;if(e){if(typeof a.id==j)a.id=c;if(f.ie&&f.win){var g="";for(var h in a)if(a[h]!=Object.prototype[h])if(h.toLowerCase()=="data")b.movie=a[h];else if(h.toLowerCase()=="styleclass")g+=' class="'+a[h]+'"';else if(h.toLowerCase()!="classid")g+=" "+h+'="'+a[h]+'"';h="";for(var k in b)if(b[k]!=Object.prototype[k])h+='<param name="'+k+'" value="'+b[k]+'" />';e.outerHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'+g+">"+h+"</object>";D[D.length]=a.id;d= n(a.id)}else{k=t(o);k.setAttribute("type",B);for(g in a)if(a[g]!=Object.prototype[g])if(g.toLowerCase()=="styleclass")k.setAttribute("class",a[g]);else g.toLowerCase()!="classid"&&k.setAttribute(g,a[g]);for(var l in b)b[l]!=Object.prototype[l]&&l.toLowerCase()!="movie"&&ha(k,l,b[l]);e.parentNode.replaceChild(k,e);d=k}}return d}function ha(a,b,c){var d=t("param");d.setAttribute("name",b);d.setAttribute("value",c);a.appendChild(d)}function $(a){var b=n(a);if(b&&b.nodeName=="OBJECT")if(f.ie&&f.win){b.style.display= "none";(function(){b.readyState==4?ia(a):setTimeout(arguments.callee,10)})()}else b.parentNode.removeChild(b)}function ia(a){if(a=n(a)){for(var b in a)if(typeof a[b]=="function")a[b]=null;a.parentNode.removeChild(a)}}function n(a){var b=null;try{b=i.getElementById(a)}catch(c){}return b}function t(a){return i.createElement(a)}function ea(a,b,c){a.attachEvent(b,c);x[x.length]=[a,b,c]}function G(a){var b=f.pv;a=a.split(".");a[0]=parseInt(a[0],10);a[1]=parseInt(a[1],10)||0;a[2]=parseInt(a[2],10)||0;return b[0]> a[0]||b[0]==a[0]&&b[1]>a[1]||b[0]==a[0]&&b[1]==a[1]&&b[2]>=a[2]?true:false}function aa(a,b,c,d){if(!(f.ie&&f.mac)){var e=i.getElementsByTagName("head")[0];if(e){c=c&&typeof c=="string"?c:"screen";if(d)L=p=null;if(!p||L!=c){d=t("style");d.setAttribute("type","text/css");d.setAttribute("media",c);p=e.appendChild(d);if(f.ie&&f.win&&typeof i.styleSheets!=j&&i.styleSheets.length>0)p=i.styleSheets[i.styleSheets.length-1];L=c}if(f.ie&&f.win)p&&typeof p.addRule==o&&p.addRule(a,b);else p&&typeof i.createTextNode!= j&&p.appendChild(i.createTextNode(a+" {"+b+"}"))}}}function w(a,b){if(X){b=b?"visible":"hidden";if(v&&n(a))n(a).style.visibility=b;else aa("#"+a,"visibility:"+b)}}function ba(a){var b=/[\\\"<>\.;]/;return(b=b.exec(a)!=null)&&typeof encodeURIComponent!=j?encodeURIComponent(a):a}(function(){f.ie&&f.win&&window.attachEvent("onunload",function(){for(var a=x.length,b=0;b<a;b++)x[b][0].detachEvent(x[b][1],x[b][2]);a=D.length;for(b=0;b<a;b++)$(D[b]);for(var c in f)f[c]=null;f=null;for(var d in swfobject)swfobject[d]= null;swfobject=null})})();return{registerObject:function(a,b,c,d){if(f.w3&&a&&b){var e={};e.id=a;e.swfVersion=b;e.expressInstall=c;e.callbackFn=d;s[s.length]=e;w(a,false)}else d&&d({success:false,id:a})},getObjectById:function(a){if(f.w3)return N(a)},embedSWF:function(a,b,c,d,e,g,h,k,l,A){var H={success:false,id:b};if(f.w3&&!(f.wk&&f.wk<312)&&a&&b&&c&&d&&e){w(b,false);Z(function(){c+="";d+="";var u={};if(l&&typeof l===o)for(var q in l)u[q]=l[q];u.data=a;u.width=c;u.height=d;q={};if(k&&typeof k=== o)for(var I in k)q[I]=k[I];if(h&&typeof h===o)for(var J in h)if(typeof q.flashvars!=j)q.flashvars+="&"+J+"="+h[J];else q.flashvars=J+"="+h[J];if(G(e)){I=R(u,q,b);u.id==b&&w(b,true);H.success=true;H.ref=I}else if(g&&O()){u.data=g;P(u,q,b,A);return}else w(b,true);A&&A(H)})}else A&&A(H)},switchOffAutoHideShow:function(){X=false},ua:f,getFlashPlayerVersion:function(){return{major:f.pv[0],minor:f.pv[1],release:f.pv[2]}},hasFlashPlayerVersion:G,createSWF:function(a,b,c){if(f.w3)return R(a,b,c)},showExpressInstall:function(a, b,c,d){f.w3&&O()&&P(a,b,c,d)},removeSWF:function(a){f.w3&&$(a)},createCSS:function(a,b,c,d){f.w3&&aa(a,b,c,d)},addDomLoadEvent:Z,addLoadEvent:Y,getQueryParamValue:function(a){var b=i.location.search||i.location.hash;if(b){if(/\?/.test(b))b=b.split("?")[1];if(a==null)return ba(b);b=b.split("&");for(var c=0;c<b.length;c++)if(b[c].substring(0,b[c].indexOf("="))==a)return ba(b[c].substring(b[c].indexOf("=")+1))}return""},expressInstallCallback:function(){if(F){var a=n(T);if(a&&z){a.parentNode.replaceChild(z, a);if(E){w(E,true);if(f.ie&&f.win)z.style.display="block"}K&&K(W)}F=false}}}}();
swfobject.embedSWF("http://static.tedae.org/swf/banner.swf", "banner", "593", "224", "8.0.0", "http://static.tedae.org/swf/expressInstall.swf");
swfobject.embedSWF("/swf/etica.swf", "etica", "190", "69", "8.0.0", "http://static.tedae.org/swf/expressInstall.swf");
swfobject.embedSWF("/swf/tedaeMA.swf", "ambiente", "190", "90", "8.0.0", "http://static.tedae.org/swf/expressInstall.swf");
swfobject.embedSWF("/swf/calidad.swf", "calidad", "190", "73", "8.0.0", "http://static.tedae.org/swf/expressInstall.swf");
swfobject.embedSWF("http://static.tedae.org/swf/banner_central.swf", "banner_central", "550", "160", "8.0.0", "http://static.tedae.org/swf/expressInstall.swf");
//swfobject.embedSWF("/christmas/christmas-tedae.swf", "estrella", "550", "400", "8.0.0", "http://static.tedae.org/swf/expressInstall.swf");
swfobject.embedSWF("http://static.tedae.org/swf/estrella.swf", "estrella", "550", "400", "8.0.0", "http://static.tedae.org/swf/expressInstall.swf");
/* Slider*/
(function(b){b.fn.easySlider=function(a){a=b.extend({prevId:"prevBtn",prevText:"Previous",nextId:"nextBtn",nextText:"Next",controlsShow:true,controlsBefore:"",controlsAfter:"",controlsFade:true,firstId:"firstBtn",firstText:"First",firstShow:false,lastId:"lastBtn",lastText:"Last",lastShow:false,vertical:false,speed:800,auto:false,pause:2E3,continuous:false,numeric:false,numericId:"controls"},a);this.each(function(){function o(f){f=parseInt(f)+1;b("li","#"+a.numericId).removeClass("current");b("li#"+ a.numericId+f).addClass("current")}function q(){if(c>h)c=0;if(c<0)c=h;a.vertical?b("ul",d).css("margin-left",c*l*-1):b("ul",d).css("margin-left",c*i*-1);m=true;a.numeric&&o(c)}function g(f,r){if(m){m=false;var j=c;switch(f){case "next":c=j>=h?a.continuous?c+1:h:c+1;break;case "prev":c=c<=0?a.continuous?c-1:0:c-1;break;case "first":c=0;break;case "last":c=h;break;default:c=f;break}j=Math.abs(j-c);var s=j*a.speed;if(a.vertical){p=c*l*-1;b("ul",d).animate({marginTop:p},{queue:false,duration:s,complete:q})}else{p= c*i*-1;b("ul",d).animate({marginLeft:p},{queue:false,duration:s,complete:q})}if(!a.continuous&&a.controlsFade){if(c==h){b("a","#"+a.nextId).hide();b("a","#"+a.lastId).hide()}else{b("a","#"+a.nextId).show();b("a","#"+a.lastId).show()}if(c==0){b("a","#"+a.prevId).hide();b("a","#"+a.firstId).hide()}else{b("a","#"+a.prevId).show();b("a","#"+a.firstId).show()}}r&&clearTimeout(n);if(a.auto&&f=="next"&&!r)n=setTimeout(function(){g("next",false)},j*a.speed+a.pause)}}var d=b(this),k=b("li",d).length,i=b("li", d).width(),l=b("li",d).height(),m=true;d.width(i);d.height(l);d.css("overflow","hidden");var h=k-1,c=0;b("ul",d).css("width",k*i);if(a.continuous){b("ul",d).prepend(b("ul li:last-child",d).clone().css("margin-left","-"+i+"px"));b("ul",d).append(b("ul li:nth-child(2)",d).clone());b("ul",d).css("width",(k+1)*i)}a.vertical||b("li",d).css("float","left");if(a.controlsShow){var e=a.controlsBefore;if(a.numeric)e+='<ol id="'+a.numericId+'"></ol>';else{if(a.firstShow)e+='<span id="'+a.firstId+'"><a href="javascript:void(0);">'+ a.firstText+"</a></span>";e+=' <span id="'+a.prevId+'"><a href="javascript:void(0);">'+a.prevText+"</a></span>";e+=' <span id="'+a.nextId+'"><a href="javascript:void(0);">'+a.nextText+"</a></span>";if(a.lastShow)e+=' <span id="'+a.lastId+'"><a href="javascript:void(0);">'+a.lastText+"</a></span>"}e+=a.controlsAfter;b(d).after(e)}if(a.numeric)for(e=0;e<k;e++)b(document.createElement("li")).attr("id",a.numericId+(e+1)).html("<a rel="+e+' href="javascript:void(0);">'+(e+1)+"</a>").appendTo(b("#"+a.numericId)).click(function(){g(b("a", b(this)).attr("rel"),true)});else{b("a","#"+a.nextId).click(function(){g("next",true)});b("a","#"+a.prevId).click(function(){g("prev",true)});b("a","#"+a.firstId).click(function(){g("first",true)});b("a","#"+a.lastId).click(function(){g("last",true)})}var n;if(a.auto)n=setTimeout(function(){g("next",false)},a.pause);a.numeric&&o(0);if(!a.continuous&&a.controlsFade){b("a","#"+a.prevId).hide();b("a","#"+a.firstId).hide()}})}})(jQuery);
$(document).ready(function(){$("#slider").easySlider({auto:true,continuous:true,controlsShow:false})});
/* bg height */
$(window).bind("load",function(){$("#content").height()>$(document.body).height()&&$("#wrapper").height($("#content").height()+100);});
/* bg chang
$(document).ready(function(){var a=Math.floor(Math.random()*3)+1;$("body").css("background-image","url(http://static.tedae.org/images/bg"+a+".jpg)")});
*/