(function($){$.fn.ldTabs=function(options){return this.each(function(){var tabs=$(this).find("a.tab");tabs.each(function(){var c=this.href.substr(this.href.indexOf("#")+1);this.div=$("#"+c);});$(this).find("a.tab").click(function(e){e.preventDefault();var c=this.href.substr(this.href.indexOf("#")+1);tabs.each(function(){$(this).removeClass("active");this.div.css({"display":"none"});});$(this).addClass("active");$("#"+c).css({"display":"block"});});});}})(jQuery);$(document).ready(function(){$("ul.tabset").ldTabs();});(function($){$.fn.niceTitle=function(options){var opts=$.extend({},$.fn.niceTitle.defaults,options);var _self=this,_imgAlt="",_imgTitle="",_hasImg=false,_imgObj,_winWidth=$(window).width(),_winHeight=$(window).height(),_scrollTop=$(document).scrollTop(),_domHeight=$(document).height();this.initialize=function(_opts){$(window).scroll(function(){_scrollTop=$(document).scrollTop();});var htmlStr="";if(jQuery.browser.msie){htmlStr='<div id="niceTitle">'+'<span>'+'<span class="r1"></span>'+'<span class="r2"></span>'+'<span class="r3"></span>'+'<span class="r4"></span>'+'</span>'+'<div id="niceTitle-ie"><p><em></em></p></div>'+'<span>'+'<span class="r4"></span>'+'<span class="r3"></span>'+'<span class="r2"></span>'+'<span class="r1"></span>'+'</span>'+'</div>';}else{htmlStr='<div id="niceTitle"><p><em></em></p></div>';}
$(_self).mouseover(function(e){var _reg=new RegExp("\\"+_opts.brFlag,"g");this.tmpTitle=this.title.replace(_reg,"<br />");if($(this).is("a")){this.tmpHref=this.href;}else if($(this).is("img")){this.tmpHref=this.src;}else{this.tmpHref=""};_imgObj=$(this).find("img");if(_imgObj.length>0){_imgAlt=_imgObj.attr("alt");_imgObj.attr("alt","");_imgTitle=_imgObj.attr("title");_imgObj.attr("title","");_hasImg=true;}
var _length=_opts.urlSize;this.title="";if(this.tmpHref.length>0&&_opts.showLink){this.tmpHref=(this.tmpHref.length>_length?this.tmpHref.toString().substring(0,_length)+"...":this.tmpHref);$(htmlStr).appendTo("body").find("p").prepend(this.tmpTitle).css({"color":_opts.titleColor}).find("em").text(this.tmpHref).css({"color":_opts.urlColor});}else if(this.tmpTitle.length>0){$(htmlStr).appendTo("body").find("p").prepend(this.tmpTitle).css({"color":_opts.titleColor}).find("em").remove();}
var obj=$('#niceTitle');obj.css({"position":"absolute","text-align":"left","padding":"5px","opacity":_opts.opacity,"top":(_winHeight+_scrollTop-e.pageY-_opts.y)-10<obj.height()?(e.pageY-obj.height()-_opts.y)+"px":(e.pageY+_opts.y)+"px","left":(_winWidth-e.pageX-_opts.x)-10<_opts.maxWidth?(e.pageX-_opts.maxWidth-_opts.x)+"px":(e.pageX+_opts.x)+"px","z-index":_opts.zIndex,"max-width":_opts.maxWidth+"px","width":"auto !important","width":_opts.maxWidth+"px","min-height":_opts.minHeight+"px","-moz-border-radius":_opts.radius+"px","-webkit-border-radius":_opts.radius+"px"});if(!jQuery.browser.msie){obj.css({"background":_opts.bgColor});}else{$('#niceTitle span').css({"background-color":_opts.bgColor,"border-color":_opts.bgColor});$('#niceTitle-ie').css({"background":_opts.bgColor,"border-color":_opts.bgColor});}
obj.show('fast');return false;}).mouseout(function(e){this.title=this.tmpTitle;$('#niceTitle').remove();if(_hasImg){_imgObj.attr("alt",_imgAlt);_imgObj.attr("title",_imgTitle);}
return false;}).mousemove(function(e){var obj=$('#niceTitle');obj.css({"top":(_winHeight+_scrollTop-e.pageY-_opts.y)-10<obj.height()?(e.pageY-obj.height()-_opts.y)+"px":(e.pageY+_opts.y)+"px","left":(_winWidth-e.pageX-_opts.x)-10<_opts.maxWidth?(e.pageX-_opts.maxWidth-_opts.x)+"px":(e.pageX+_opts.x)+"px"});return false;});return _self;};this.initialize(opts);};$.fn.niceTitle.defaults={x:10,y:10,urlSize:30,bgColor:"#000",titleColor:"#FFF",urlColor:"#F60",zIndex:999,maxWidth:250,minHeight:30,opacity:0.8,radius:8,showLink:true,brFlag:'|'};})(jQuery);$(document).ready(function(){$(".opiniones a, .unico a, .articulo a, .columnas a").niceTitle({showLink:false,bgColor:"#fff",titleColor:"#000",opacity:0.9,maxWidth:200});});(function($){$.fn.jcaption=function(settings){settings=$.extend({wrapperElement:'div',wrapperClass:'caption',captionElement:'p',imageAttr:'alt',requireText:true,copyStyle:false,removeStyle:true,removeAlign:true,copyAlignmentToClass:false,copyFloatToClass:true,autoWidth:true,animate:false,show:{opacity:'show'},showDuration:200,hide:{opacity:'hide'},hideDuration:200},settings);return $(this).each(function(){$(this).bind('load',function(){if($(this).data('loaded'))return false;$(this).data('loaded',true);var image=$(this);if(image.attr(settings.imageAttr).length>0||!settings.requireText){image.wrap("<"+settings.wrapperElement+" class='"+settings.wrapperClass+"'></"+settings.wrapperElement+">");var imageFloat=image.css('float')
var imageStyle=image.attr('style');if(settings.removeStyle)image.removeAttr('style');var imageAlign=image.attr('align');if(settings.removeAlign)image.removeAttr('align');var div=$(this).parent().append('<'+settings.captionElement+'>'+image.attr(settings.imageAttr)+'</'+settings.captionElement+'>');if(settings.animate){$(this).next().hide();$(this).parent().hover(function(){$(this).find('p').animate(settings.show,settings.showDuration);},function(){$(this).find('p').animate(settings.hide,settings.hideDuration);});}
if(settings.copyStyle)div.attr('style',imageStyle);if(settings.copyAlignmentToClass)div.addClass(imageAlign);if(settings.copyFloatToClass)div.addClass(imageFloat);if(settings.autoWidth)div.width(image.width());}});if(this.complete||this.naturalWidth>0){$(this).trigger('load');}});}})(jQuery);$(document).ready(function(){$('.noticia img').jcaption({copyStyle:true,animate:true,show:{height:"show"},hide:{height:"hide"}});});(function($){$.fn.slideDownAndUp=function(time){if(time===undefined)time=10000;$(this).slideDown().delay(time).slideUp();}})(jQuery);
(function(f,h,i){function k(a,c){var b=(a[0]||0)-(c[0]||0);return b>0||!b&&a.length>0&&k(a.slice(1),c.slice(1))}function l(a){if(typeof a!=g)return a;var c=[],b="";for(var d in a){b=typeof a[d]==g?l(a[d]):[d,m?encodeURI(a[d]):a[d]].join("=");c.push(b)}return c.join("&")}function n(a){var c=[];for(var b in a)a[b]&&c.push([b,'="',a[b],'"'].join(""));return c.join(" ")}function o(a){var c=[];for(var b in a)c.push(['<param name="',b,'" value="',l(a[b]),'" />'].join(""));return c.join("")}var g="object",m=true;try{var j=i.description||function(){return(new i("ShockwaveFlash.ShockwaveFlash")).GetVariable("$version")}()}catch(p){j="Unavailable"}var e=j.match(/\d+/g)||[0];f[h]={available:e[0]>0,activeX:i&&!i.name,version:{original:j,array:e,string:e.join("."),major:parseInt(e[0],10)||0,minor:parseInt(e[1],10)||0,release:parseInt(e[2],10)||0},hasVersion:function(a){a=/string|number/.test(typeof a)?a.toString().split("."):/object/.test(typeof a)?[a.major,a.minor]:a||[0,0];return k(e,a)},encodeParams:true,expressInstall:"expressInstall.swf",expressInstallIsActive:false,create:function(a){if(!a.swf||this.expressInstallIsActive||!this.available&&!a.hasVersionFail)return false;if(!this.hasVersion(a.hasVersion||1)){this.expressInstallIsActive=true;if(typeof a.hasVersionFail=="function")if(!a.hasVersionFail.apply(a))return false;a={swf:a.expressInstall||this.expressInstall,height:137,width:214,flashvars:{MMredirectURL:location.href,MMplayerType:this.activeX?"ActiveX":"PlugIn",MMdoctitle:document.title.slice(0,47)+" - Flash Player Installation"}}}attrs={data:a.swf,type:"application/x-shockwave-flash",id:a.id||"flash_"+Math.floor(Math.random()*999999999),width:a.width||320,height:a.height||180,style:a.style||""};m=typeof a.useEncode!=="undefined"?a.useEncode:this.encodeParams;a.movie=a.swf;a.wmode=a.wmode||"opaque";delete a.fallback;delete a.hasVersion;delete a.hasVersionFail;delete a.height;delete a.id;delete a.swf;delete a.useEncode;delete a.width;var c=document.createElement("div");c.innerHTML=["<object ",n(attrs),">",o(a),"</object>"].join("");return c.firstChild}};f.fn[h]=function(a){var c=this.find(g).andSelf().filter(g);/string|object/.test(typeof a)&&this.each(function(){var b=f(this),d;a=typeof a==g?a:{swf:a};a.fallback=this;if(d=f[h].create(a)){b.children().remove();b.html(d)}});typeof a=="function"&&c.each(function(){var b=this;b.jsInteractionTimeoutMs=b.jsInteractionTimeoutMs||0;if(b.jsInteractionTimeoutMs<660)b.clientWidth||b.clientHeight?a.call(b):setTimeout(function(){f(b)[h](a)},b.jsInteractionTimeoutMs+66)});return c}})(jQuery,"flash",navigator.plugins["Shockwave Flash"]||window.ActiveXObject);
;(function(d){var k=d.scrollTo=function(a,i,e){d(window).scrollTo(a,i,e)};k.defaults={axis:'xy',duration:parseFloat(d.fn.jquery)>=1.3?0:1};k.window=function(a){return d(window)._scrollable()};d.fn._scrollable=function(){return this.map(function(){var a=this,i=!a.nodeName||d.inArray(a.nodeName.toLowerCase(),['iframe','#document','html','body'])!=-1;if(!i)return a;var e=(a.contentWindow||a).document||a.ownerDocument||a;return d.browser.safari||e.compatMode=='BackCompat'?e.body:e.documentElement})};d.fn.scrollTo=function(n,j,b){if(typeof j=='object'){b=j;j=0}if(typeof b=='function')b={onAfter:b};if(n=='max')n=9e9;b=d.extend({},k.defaults,b);j=j||b.speed||b.duration;b.queue=b.queue&&b.axis.length>1;if(b.queue)j/=2;b.offset=p(b.offset);b.over=p(b.over);return this._scrollable().each(function(){var q=this,r=d(q),f=n,s,g={},u=r.is('html,body');switch(typeof f){case'number':case'string':if(/^([+-]=)?\d+(\.\d+)?(px|%)?$/.test(f)){f=p(f);break}f=d(f,this);case'object':if(f.is||f.style)s=(f=d(f)).offset()}d.each(b.axis.split(''),function(a,i){var e=i=='x'?'Left':'Top',h=e.toLowerCase(),c='scroll'+e,l=q[c],m=k.max(q,i);if(s){g[c]=s[h]+(u?0:l-r.offset()[h]);if(b.margin){g[c]-=parseInt(f.css('margin'+e))||0;g[c]-=parseInt(f.css('border'+e+'Width'))||0}g[c]+=b.offset[h]||0;if(b.over[h])g[c]+=f[i=='x'?'width':'height']()*b.over[h]}else{var o=f[h];g[c]=o.slice&&o.slice(-1)=='%'?parseFloat(o)/100*m:o}if(/^\d+$/.test(g[c]))g[c]=g[c]<=0?0:Math.min(g[c],m);if(!a&&b.queue){if(l!=g[c])t(b.onAfterFirst);delete g[c]}});t(b.onAfter);function t(a){r.animate(g,j,b.easing,a&&function(){a.call(this,n,b)})}}).end()};k.max=function(a,i){var e=i=='x'?'Width':'Height',h='scroll'+e;if(!d(a).is('html,body'))return a[h]-d(a)[e.toLowerCase()]();var c='client'+e,l=a.ownerDocument.documentElement,m=a.ownerDocument.body;return Math.max(l[h],m[h])-Math.min(l[c],m[c])};function p(a){return typeof a=='object'?a:{top:a,left:a}}})(jQuery);
