Warning: file_get_contents(/home/eleconomista/js/flowplayer.js) [function.file-get-contents]: failed to open stream: No such file or directory in /home/eleconomista/cache/combine.php on line 121

Warning: Cannot modify header information - headers already sent by (output started at /home/eleconomista/cache/combine.php:121) in /home/eleconomista/cache/combine.php on line 106

Warning: Cannot modify header information - headers already sent by (output started at /home/eleconomista/cache/combine.php:121) in /home/eleconomista/cache/combine.php on line 107

Warning: Cannot modify header information - headers already sent by (output started at /home/eleconomista/cache/combine.php:121) in /home/eleconomista/cache/combine.php on line 108

Warning: Cannot modify header information - headers already sent by (output started at /home/eleconomista/cache/combine.php:121) in /home/eleconomista/cache/combine.php on line 109

Warning: Cannot modify header information - headers already sent by (output started at /home/eleconomista/cache/combine.php:121) in /home/eleconomista/cache/combine.php on line 110
if(typeof Effect=="undefined"){throw ("lightwindow.js requires including script.aculo.us' effects.js library!")}try{document.execCommand("BackgroundImageCache",false,true)}catch(e){}var lightwindow=Class.create();lightwindow.prototype={element:null,contentToFetch:null,windowActive:false,dataEffects:[],dimensions:{cruft:null,container:null,viewport:{height:null,width:null,offsetTop:null,offsetLeft:null}},pagePosition:{x:0,y:0},pageDimensions:{width:null,height:null},preloadImage:[],preloadedImage:[],galleries:[],resizeTo:{height:null,heightPercent:null,width:null,widthPercent:null,fixedTop:null,fixedLeft:null},scrollbarOffset:18,navigationObservers:{previous:null,next:null},containerChange:{height:0,width:0},activeGallery:false,galleryLocation:{current:0,total:0},initialize:function(A){this.options=Object.extend({resizeSpeed:8,contentOffset:{height:20,width:20},dimensions:{image:{height:250,width:250},page:{height:250,width:250},inline:{height:250,width:250},media:{height:250,width:250},external:{height:250,width:250},titleHeight:25},classNames:{standard:"lightwindow",action:"lightwindow_action"},fileTypes:{page:["asp","aspx","cgi","cfm","htm","html","pl","php4","php3","php","php5","phtml","rhtml","shtml","txt","vbs","rb"],media:["aif","aiff","asf","avi","divx","m1v","m2a","m2v","m3u","mid","midi","mov","moov","movie","mp2","mp3","mpa","mpa","mpe","mpeg","mpg","mpg","mpga","pps","qt","rm","ram","swf","viv","vivo","wav"],image:["bmp","gif","jpg","png","tiff"]},mimeTypes:{avi:"video/avi",aif:"audio/aiff",aiff:"audio/aiff",gif:"image/gif",bmp:"image/bmp",jpeg:"image/jpeg",m1v:"video/mpeg",m2a:"audio/mpeg",m2v:"video/mpeg",m3u:"audio/x-mpequrl",mid:"audio/x-midi",midi:"audio/x-midi",mjpg:"video/x-motion-jpeg",moov:"video/quicktime",mov:"video/quicktime",movie:"video/x-sgi-movie",mp2:"audio/mpeg",mp3:"audio/mpeg3",mpa:"audio/mpeg",mpa:"video/mpeg",mpe:"video/mpeg",mpeg:"video/mpeg",mpg:"audio/mpeg",mpg:"video/mpeg",mpga:"audio/mpeg",pdf:"application/pdf",png:"image/png",pps:"application/mspowerpoint",qt:"video/quicktime",ram:"audio/x-pn-realaudio-plugin",rm:"application/vnd.rn-realmedia",swf:"application/x-shockwave-flash",tiff:"image/tiff",viv:"video/vivo",vivo:"video/vivo",wav:"audio/wav",wmv:"application/x-mplayer2"},classids:{mov:"clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B",swf:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",wmv:"clsid:6BF52A52-394A-11d3-B153-00C04F79FAA6"},codebases:{mov:"http://www.apple.com/qtactivex/qtplugin.cab#version=6,0,2,0",swf:"http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0",wmv:"http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,5,715"},viewportPadding:10,EOLASFix:"swf,wmv,fla,flv",overlay:{opacity:0.7,image:"/imagenes/fondos/black.png",presetImage:"/imagenes/fondos/black-70.png"},skin:{main:'
Por
',loading:'
loadingCargando la imagen | Cancelar
',iframe:'{body_replace}',gallery:{top:'

{gallery_title_replace}

"}},formMethod:"get",hideFlash:false,hideGalleryTab:false,showTitleBar:true,animationHandler:false,navigationHandler:false,transitionHandler:false,finalAnimationHandler:false,formHandler:false,galleryAnimationHandler:false,showGalleryCount:true},A||{});this.duration=((11-this.options.resizeSpeed)*0.15);this._setupLinks();this._getScroll();this._getPageDimensions();this._browserDimensions();this._addLightWindowMarkup(false);this._setupDimensions();this.buildGalleryList()},activate:function(B,A){this._clearWindowContents(true);this._addLoadingWindowMarkup();this._setupWindowElements(A);this._getScroll();this._browserDimensions();this._setupDimensions();this._toggleTroubleElements("hidden",false);this._displayLightWindow("block","hidden");this._setStatus(true);this._monitorKeyboard(true);this._prepareIE(true);this._loadWindow()},deactivate:function(){this.windowActive=false;this.activeGallery=false;if(!this.options.hideGalleryTab){this._handleGalleryAnimation(false)}this.animating=false;this.element=null;this._displayLightWindow("none","visible");this._clearWindowContents(false);var A=Effect.Queues.get("lightwindowAnimation").each(function(B){B.cancel()});this._prepareIE(false);this._setupDimensions();this._toggleTroubleElements("visible",false);this._monitorKeyboard(false)},createWindow:function(B,A){this._processLink($(B))},activateWindow:function(A){this.element=Object.extend({href:null,title:null,author:null,caption:null,rel:null,top:null,left:null,type:null,showImages:null,height:null,width:null,loadingAnimation:null,iframeEmbed:null,form:null},A||{});this.contentToFetch=this.element.href;this.windowType=this.element.type?this.element.type:this._fileType(this.element.href);this._clearWindowContents(true);this._addLoadingWindowMarkup();this._getScroll();this._browserDimensions();this._setupDimensions();this._toggleTroubleElements("hidden",false);this._displayLightWindow("block","hidden");this._setStatus(true);this._monitorKeyboard(true);this._prepareIE(true);this._loadWindow()},submitForm:function(A){if(this.options.formHandler){this.options.formHandler(A)}else{this._defaultFormHandler(A)}},openWindow:function(A){var A=$(A);this.windowActive=true;this._clearWindowContents(true);this._addLoadingWindowMarkup();this._setupWindowElements(A);this._setStatus(true);this._handleTransition()},navigateWindow:function(A){this._handleNavigation(false);if(A=="previous"){this.openWindow(this.navigationObservers.previous)}else{if(A=="next"){this.openWindow(this.navigationObservers.next)}}},buildGalleryList:function(){var A="";var B;for(i in this.galleries){if(typeof this.galleries[i]=="object"){A+=(this.options.skin.gallery.top).replace("{gallery_title_replace}",unescape(i));for(j in this.galleries[i]){if(typeof this.galleries[i][j]=="object"){B=''+unescape(j)+"";A+=(this.options.skin.gallery.middle).replace("{gallery_link_replace}",B)}}A+=this.options.skin.gallery.bottom}}new Insertion.Top("lightwindow_galleries_list",A);for(i in this.galleries){if(typeof this.galleries[i]=="object"){for(j in this.galleries[i]){if(typeof this.galleries[i][j]=="object"){Event.observe($("lightwindow_gallery_"+i+"_"+j),"click",this.openWindow.bind(this,this.galleries[i][j][0]),false);$("lightwindow_gallery_"+i+"_"+j).onclick=function(){return false}}}}}},_setupLinks:function(){var A=$$("."+this.options.classNames.standard);A.each(function(B){this._processLink(B)}.bind(this))},_processLink:function(C){if((this._fileType(C.getAttribute("href"))=="image"||this._fileType(C.getAttribute("href"))=="media")){if(gallery=this._getGalleryInfo(C.rel)){if(!this.galleries[gallery[0]]){this.galleries[gallery[0]]=new Array()}if(!this.galleries[gallery[0]][gallery[1]]){this.galleries[gallery[0]][gallery[1]]=new Array()}this.galleries[gallery[0]][gallery[1]].push(C)}}var A=C.getAttribute("href");if(A.indexOf("?")>-1){A=A.substring(0,A.indexOf("?"))}var B=A.substring(A.indexOf("#")+1);if($(B)){$(B).setStyle({display:"none"})}Event.observe(C,"click",this.activate.bindAsEventListener(this,C),false);C.onclick=function(){return false}},_setupActions:function(){var A=$$("#lightwindow_container ."+this.options.classNames.action);A.each(function(B){Event.observe(B,"click",this[B.getAttribute("rel")].bindAsEventListener(this,B),false);B.onclick=function(){return false}}.bind(this))},_addLightWindowMarkup:function(B){var C=Element.extend(document.createElement("div"));C.setAttribute("id","lightwindow_overlay");if(Prototype.Browser.Gecko){C.setStyle({backgroundImage:"url("+this.options.overlay.presetImage+")",backgroundRepeat:"repeat",height:this.pageDimensions.height+"px"})}else{C.setStyle({opacity:this.options.overlay.opacity,backgroundImage:"url("+this.options.overlay.image+")",backgroundRepeat:"repeat",height:this.pageDimensions.height+"px"})}var D=document.createElement("div");D.setAttribute("id","lightwindow");D.innerHTML=this.options.skin.main;var A=document.getElementsByTagName("body")[0];A.appendChild(C);A.appendChild(D);if($("lightwindow_title_bar_close_link")){Event.observe("lightwindow_title_bar_close_link","click",this.deactivate.bindAsEventListener(this));$("lightwindow_title_bar_close_link").onclick=function(){return false}}Event.observe($("lightwindow_previous"),"click",this.navigateWindow.bind(this,"previous"),false);$("lightwindow_previous").onclick=function(){return false};Event.observe($("lightwindow_next"),"click",this.navigateWindow.bind(this,"next"),false);$("lightwindow_next").onclick=function(){return false};if(!this.options.hideGalleryTab){Event.observe($("lightwindow_galleries_tab"),"click",this._handleGalleryAnimation.bind(this,true),false);$("lightwindow_galleries_tab").onclick=function(){return false}}if(Prototype.Browser.IE){Event.observe(document,"mousewheel",this._stopScrolling.bindAsEventListener(this),false)}else{Event.observe(window,"DOMMouseScroll",this._stopScrolling.bindAsEventListener(this),false)}Event.observe(C,"click",this.deactivate.bindAsEventListener(this),false);C.onclick=function(){return false}},_addLoadingWindowMarkup:function(){$("lightwindow_contents").innerHTML+=this.options.skin.loading},_setupWindowElements:function(A){this.element=A;this.element.title=null?"":A.getAttribute("title");this.element.author=null?"":A.getAttribute("author");this.element.caption=null?"":A.getAttribute("caption");this.element.rel=null?"":A.getAttribute("rel");this.element.params=null?"":A.getAttribute("params");this.contentToFetch=this.element.href;this.windowType=this._getParameter("lightwindow_type")?this._getParameter("lightwindow_type"):this._fileType(this.contentToFetch)},_clearWindowContents:function(A){if($("lightwindow_iframe")){Element.remove($("lightwindow_iframe"))}if($("lightwindow_media_primary")){try{$("lightwindow_media_primary").Stop()}catch(B){}Element.remove($("lightwindow_media_primary"))}if($("lightwindow_media_secondary")){try{$("lightwindow_media_secondary").Stop()}catch(B){}Element.remove($("lightwindow_media_secondary"))}this.activeGallery=false;this._handleNavigation(this.activeGallery);if(A){$("lightwindow_contents").innerHTML="";$("lightwindow_contents").setStyle({overflow:"hidden"});if(!this.windowActive){$("lightwindow_data_slide_inner").setStyle({display:"none"});$("lightwindow_title_bar_title").innerHTML=""}$("lightwindow_data_slide").setStyle({height:"auto"})}this.resizeTo.height=null;this.resizeTo.width=null},_setStatus:function(A){this.animating=A;if(A){Element.show("lightwindow_loading")}if(!(/MSIE 6./i.test(navigator.userAgent))){this._fixedWindow(A)}},_fixedWindow:function(A){if(A){if(this.windowActive){this._getScroll();$("lightwindow").setStyle({position:"absolute",top:parseFloat($("lightwindow").getStyle("top"))+this.pagePosition.y+"px",left:parseFloat($("lightwindow").getStyle("left"))+this.pagePosition.x+"px"})}else{$("lightwindow").setStyle({position:"absolute"})}}else{if(this.windowActive){this._getScroll();$("lightwindow").setStyle({position:"fixed",top:parseFloat($("lightwindow").getStyle("top"))-this.pagePosition.y+"px",left:parseFloat($("lightwindow").getStyle("left"))-this.pagePosition.x+"px"})}else{if($("lightwindow_iframe")){this._browserDimensions()}$("lightwindow").setStyle({position:"fixed",top:(parseFloat(this._getParameter("lightwindow_top"))?parseFloat(this._getParameter("lightwindow_top"))+"px":this.dimensions.viewport.height/2+"px"),left:(parseFloat(this._getParameter("lightwindow_left"))?parseFloat(this._getParameter("lightwindow_left"))+"px":this.dimensions.viewport.width/2+"px")})}}},_prepareIE:function(B){if(Prototype.Browser.IE){var F,D,E;if(B){var F="100%"}else{var F="auto"}var A=document.getElementsByTagName("body")[0];var C=document.getElementsByTagName("html")[0];C.style.height=A.style.height=F}},_stopScrolling:function(A){if(this.animating){if(A.preventDefault){A.preventDefault()}A.returnValue=false}},_getScroll:function(){if(typeof (window.pageYOffset)=="number"){this.pagePosition.x=window.pageXOffset;this.pagePosition.y=window.pageYOffset}else{if(document.body&&(document.body.scrollLeft||document.body.scrollTop)){this.pagePosition.x=document.body.scrollLeft;this.pagePosition.y=document.body.scrollTop}else{if(document.documentElement){this.pagePosition.x=document.documentElement.scrollLeft;this.pagePosition.y=document.documentElement.scrollTop}}}},_setScroll:function(A,B){document.documentElement.scrollLeft=A;document.documentElement.scrollTop=B},_toggleTroubleElements:function(C,F){if(F){var E=$("lightwindow_contents").getElementsByTagName("select")}else{var E=document.getElementsByTagName("select")}for(var D=0;Ddocument.body.offsetHeight){C=document.body.scrollWidth;B=document.body.scrollHeight}else{C=document.body.offsetWidth;B=document.body.offsetHeight}}var A,D;if(self.innerHeight){A=self.innerWidth;D=self.innerHeight}else{if(document.documentElement&&document.documentElement.clientHeight){A=document.documentElement.clientWidth;D=document.documentElement.clientHeight}else{if(document.body){A=document.body.clientWidth;D=document.body.clientHeight}}}if(B-1&&(document.domain==this._getDomain(A))){return"inline"}if(A.indexOf("?")>-1){A=A.substring(0,A.indexOf("?"))}var B="unknown";var C=new RegExp("[^.].("+this.options.fileTypes.page.join("|")+")s*$","i");var D=new RegExp("[^.].("+this.options.fileTypes.media.join("|")+")s*$","i");if(document.domain!=this._getDomain(A)){B="external"}if(D.test(A)){B="media"}if(B=="external"||B=="media"){return B}if(C.test(A)||A.substr((A.length-1),A.length)=="/"){B="page"}return B},_fileExtension:function(B){if(B.indexOf("?")>-1){B=B.substring(0,B.indexOf("?"))}var C="";for(var A=(B.length-1);A>-1;A--){if(B.charAt(A)=="."){return C}C=B.charAt(A)+C}},_monitorKeyboard:function(A){if(A){document.onkeydown=this._eventKeypress.bind(this)}else{document.onkeydown=""}},_eventKeypress:function(B){if(B==null){var A=event.keyCode}else{var A=B.which}switch(A){case 27:this.deactivate();break;case 13:return ;default:break}if(this.animating){return false}switch(String.fromCharCode(A).toLowerCase()){case"p":if(this.navigationObservers.previous){this.navigateWindow("previous")}break;case"n":if(this.navigationObservers.next){this.navigateWindow("next")}break;default:break}},_getGalleryInfo:function(A){if(!A){return false}if(A.indexOf("[")>-1){return new Array(escape(A.substring(0,A.indexOf("["))),escape(A.substring(A.indexOf("[")+1,A.indexOf("]"))))}else{return false}},_getDomain:function(E){var G=E.indexOf("//");var C=G+2;var F=E.substring(C,E.length);var B=F.indexOf("/");var A=F.substring(0,B);if(A.indexOf(":")>-1){var D=A.indexOf(":");A=A.substring(0,D)}return A},_getParameter:function(H,C){if(!this.element){return false}if(H=="lightwindow_top"&&this.element.top){return unescape(this.element.top)}else{if(H=="lightwindow_left"&&this.element.left){return unescape(this.element.left)}else{if(H=="lightwindow_type"&&this.element.type){return unescape(this.element.type)}else{if(H=="lightwindow_show_images"&&this.element.showImages){return unescape(this.element.showImages)}else{if(H=="lightwindow_height"&&this.element.height){return unescape(this.element.height)}else{if(H=="lightwindow_width"&&this.element.width){return unescape(this.element.width)}else{if(H=="lightwindow_loading_animation"&&this.element.loadingAnimation){return unescape(this.element.loadingAnimation)}else{if(H=="lightwindow_iframe_embed"&&this.element.iframeEmbed){return unescape(this.element.iframeEmbed)}else{if(H=="lightwindow_form"&&this.element.form){return unescape(this.element.form)}else{if(!C){if(this.element.params){C=this.element.params}else{return }}var F;var E=C.split(",");var A=H+"=";var G=A.length;for(var B=0;B","");if(Prototype.Browser.IE){for(var B=0;B"}return D},_appendObject:function(E,C,B){if(Prototype.Browser.IE){B.innerHTML+=this._convertToMarkup(E,C);if(this.options.EOLASFix.indexOf(this._fileType(this.element.href))>-1){var A=document.getElementsByTagName("object");for(var D=0;D-1){break}}if(this.galleries[gallery[0]][gallery[1]][E-this.imageCount]){this.navigationObservers.previous=this.galleries[gallery[0]][gallery[1]][E-this.imageCount]}else{this.navigationObservers.previous=false}if(this.galleries[gallery[0]][gallery[1]][E+this.imageCount]){this.navigationObservers.next=this.galleries[gallery[0]][gallery[1]][E+this.imageCount]}else{this.navigationObservers.next=false}this.activeGallery=true}else{this.navigationObservers.previous=false;this.navigationObservers.next=false;this.activeGallery=false}for(var B=E;B<(E+this.imageCount);B++){if(gallery&&this.galleries[gallery[0]][gallery[1]][B]){this.contentToFetch=this.galleries[gallery[0]][gallery[1]][B].href;this.galleryLocation={current:(B+1)/this.imageCount,total:(this.galleries[gallery[0]][gallery[1]].length)/this.imageCount};if(!this.galleries[gallery[0]][gallery[1]][B+this.imageCount]){$("lightwindow_next").setStyle({display:"none"})}else{$("lightwindow_next").setStyle({display:"block"});$("lightwindow_next_title").innerHTML=this.galleries[gallery[0]][gallery[1]][B+this.imageCount].title}if(!this.galleries[gallery[0]][gallery[1]][B-this.imageCount]){$("lightwindow_previous").setStyle({display:"none"})}else{$("lightwindow_previous").setStyle({display:"block"});$("lightwindow_previous_title").innerHTML=this.galleries[gallery[0]][gallery[1]][B-this.imageCount].title}}D[B]=document.createElement("img");D[B].setAttribute("id","lightwindow_image_"+B);D[B].setAttribute("border","0");D[B].setAttribute("src",this.contentToFetch);$("lightwindow_contents").appendChild(D[B]);this.checkImage[B]=new PeriodicalExecuter(function(G){if(!(typeof $("lightwindow_image_"+G).naturalWidth!="undefined"&&$("lightwindow_image_"+G).naturalWidth==0)){this.checkImage[G].stop();var F=$("lightwindow_image_"+G).getHeight();if(F>this.resizeTo.height){this.resizeTo.height=F}this.resizeTo.width+=$("lightwindow_image_"+G).getWidth();this.imageCount--;$("lightwindow_image_"+G).setStyle({height:"100%"});if(this.imageCount==0){this._processWindow()}}}.bind(this,B),1)}break;case"media":var E=0;this.resizeTo.height=this.resizeTo.width=0;if(gallery=this._getGalleryInfo(this.element.rel)){for(E=0;E-1){break}}if(this.galleries[gallery[0]][gallery[1]][E-1]){this.navigationObservers.previous=this.galleries[gallery[0]][gallery[1]][E-1]}else{this.navigationObservers.previous=false}if(this.galleries[gallery[0]][gallery[1]][E+1]){this.navigationObservers.next=this.galleries[gallery[0]][gallery[1]][E+1]}else{this.navigationObservers.next=false}this.activeGallery=true}else{this.navigationObservers.previous=false;this.navigationObservers.next=false;this.activeGallery=false}if(gallery&&this.galleries[gallery[0]][gallery[1]][E]){this.contentToFetch=this.galleries[gallery[0]][gallery[1]][E].href;this.galleryLocation={current:E+1,total:this.galleries[gallery[0]][gallery[1]].length};if(!this.galleries[gallery[0]][gallery[1]][E+1]){$("lightwindow_next").setStyle({display:"none"})}else{$("lightwindow_next").setStyle({display:"block"});$("lightwindow_next_title").innerHTML=this.galleries[gallery[0]][gallery[1]][E+1].title}if(!this.galleries[gallery[0]][gallery[1]][E-1]){$("lightwindow_previous").setStyle({display:"none"})}else{$("lightwindow_previous").setStyle({display:"block"});$("lightwindow_previous_title").innerHTML=this.galleries[gallery[0]][gallery[1]][E-1].title}}if(this._getParameter("lightwindow_iframe_embed")){this.resizeTo.height=this.dimensions.viewport.height;this.resizeTo.width=this.dimensions.viewport.width}else{this.resizeTo.height=this._getParameter("lightwindow_height");this.resizeTo.width=this._getParameter("lightwindow_width")}this._processWindow();break;case"external":this._appendIframe("auto");this.resizeTo.height=this.dimensions.viewport.height;this.resizeTo.width=this.dimensions.viewport.width;this._processWindow();break;case"page":var A=new Ajax.Request(this.contentToFetch,{method:"get",parameters:"",onComplete:function(F){$("lightwindow_contents").innerHTML+=F.responseText;this.resizeTo.height=$("lightwindow_contents").scrollHeight+(this.options.contentOffset.height);this.resizeTo.width=$("lightwindow_contents").scrollWidth+(this.options.contentOffset.width);this._processWindow()}.bind(this)});break;case"inline":var C=this.contentToFetch;if(C.indexOf("?")>-1){C=C.substring(0,C.indexOf("?"))}C=C.substring(C.indexOf("#")+1);new Insertion.Top($("lightwindow_contents"),$(C).innerHTML);this.resizeTo.height=$("lightwindow_contents").scrollHeight+(this.options.contentOffset.height);this.resizeTo.width=$("lightwindow_contents").scrollWidth+(this.options.contentOffset.width);this._toggleTroubleElements("hidden",true);this._processWindow();break;default:throw ("Page Type could not be determined, please amend this lightwindow URL "+this.contentToFetch);break}},_resizeWindowToFit:function(){if(this.resizeTo.height+this.dimensions.cruft.height>this.dimensions.viewport.height){var B=this.resizeTo.height/this.resizeTo.width;this.resizeTo.height=this.dimensions.viewport.height-this.dimensions.cruft.height-(2*this.options.viewportPadding);if(this.windowType=="image"||(this.windowType=="media"&&!this._getParameter("lightwindow_iframe_embed"))){this.resizeTo.width=this.resizeTo.height/B;$("lightwindow_data_slide_inner").setStyle({width:this.resizeTo.width+"px"})}}if(this.resizeTo.width+this.dimensions.cruft.width>this.dimensions.viewport.width){var A=this.resizeTo.width/this.resizeTo.height;this.resizeTo.width=this.dimensions.viewport.width-2*this.dimensions.cruft.width-(2*this.options.viewportPadding);if(this.windowType=="image"||(this.windowType=="media"&&!this._getParameter("lightwindow_iframe_embed"))){this.resizeTo.height=this.resizeTo.width/A;$("lightwindow_data_slide_inner").setStyle({height:this.resizeTo.height+"px"})}}},_presetWindowSize:function(){if(this._getParameter("lightwindow_height")){this.resizeTo.height=parseFloat(this._getParameter("lightwindow_height"))}if(this._getParameter("lightwindow_width")){this.resizeTo.width=parseFloat(this._getParameter("lightwindow_width"))}},_processWindow:function(){this.dimensions.dataEffects=[];if(this.element.caption||this.element.author||(this.activeGallery&&this.options.showGalleryCount)){if(this.element.caption){$("lightwindow_data_caption").innerHTML=this.element.caption;$("lightwindow_data_caption").setStyle({display:"block"})}else{$("lightwindow_data_caption").setStyle({display:"none"})}if(this.element.author){$("lightwindow_data_author").innerHTML=this.element.author;$("lightwindow_data_author_container").setStyle({display:"block"})}else{$("lightwindow_data_author_container").setStyle({display:"none"})}if(this.activeGallery&&this.options.showGalleryCount){$("lightwindow_data_gallery_current").innerHTML=this.galleryLocation.current;$("lightwindow_data_gallery_total").innerHTML=this.galleryLocation.total;$("lightwindow_data_gallery_container").setStyle({display:"block"})}else{$("lightwindow_data_gallery_container").setStyle({display:"none"})}$("lightwindow_data_slide_inner").setStyle({width:this.resizeTo.width+"px",height:"auto",visibility:"visible",display:"block"});$("lightwindow_data_slide").setStyle({height:$("lightwindow_data_slide").getHeight()+"px",width:"1px",overflow:"hidden",display:"block"})}else{$("lightwindow_data_slide").setStyle({display:"none",width:"auto"});$("lightwindow_data_slide_inner").setStyle({display:"none",visibility:"hidden",width:this.resizeTo.width+"px",height:"0px"})}if(this.element.title!="null"){$("lightwindow_title_bar_title").innerHTML=this.element.title}else{$("lightwindow_title_bar_title").innerHTML=""}var B={height:$("lightwindow_container").getHeight(),width:$("lightwindow_container").getWidth()};$("lightwindow_container").setStyle({height:"auto",width:$("lightwindow_container").getWidth()+this.options.contentOffset.width-(this.windowActive?this.options.contentOffset.width:0)+"px"});var A={height:$("lightwindow_container").getHeight(),width:$("lightwindow_container").getWidth()};this.containerChange={height:B.height-A.height,width:B.width-A.width};this.dimensions.container={height:$("lightwindow_container").getHeight(),width:$("lightwindow_container").getWidth()};this.dimensions.cruft={height:this.dimensions.container.height-$("lightwindow_contents").getHeight()+this.options.contentOffset.height,width:this.dimensions.container.width-$("lightwindow_contents").getWidth()+this.options.contentOffset.width};this._presetWindowSize();this._resizeWindowToFit();if(!this.windowActive){$("lightwindow_container").setStyle({left:-(this.dimensions.container.width/2)+"px",top:-(this.dimensions.container.height/2)+"px"})}$("lightwindow_container").setStyle({height:this.dimensions.container.height+"px",width:this.dimensions.container.width+"px"});this._displayLightWindow("block","visible");this._animateLightWindow()},_animateLightWindow:function(){if(this.options.animationHandler){this.options.animationHandler().bind(this)}else{this._defaultAnimationHandler()}},_handleNavigation:function(A){if(this.options.navigationHandler){this.options.navigationHandler().bind(this,A)}else{this._defaultDisplayNavigation(A)}},_handleTransition:function(){if(this.options.transitionHandler){this.options.transitionHandler().bind(this)}else{this._defaultTransitionHandler()}},_handleFinalWindowAnimation:function(A){if(this.options.finalAnimationHandler){this.options.finalAnimationHandler().bind(this,A)}else{this._defaultfinalWindowAnimationHandler(A)}},_handleGalleryAnimation:function(A){if(this.options.galleryAnimationHandler){this.options.galleryAnimationHandler().bind(this,A)}else{this._defaultGalleryAnimationHandler(A)}},_defaultDisplayNavigation:function(A){if(A){$("lightwindow_navigation").setStyle({display:"block",height:$("lightwindow_contents").getHeight()+"px",width:"100%",marginTop:this.options.dimensions.titleHeight+"px"})}else{$("lightwindow_navigation").setStyle({display:"none",height:"auto",width:"auto"})}},_defaultAnimationHandler:function(){if(this.element.caption||this.element.author||(this.activeGallery&&this.options.showGalleryCount)){$("lightwindow_data_slide").setStyle({display:"none",width:"auto"});this.dimensions.dataEffects.push(new Effect.SlideDown("lightwindow_data_slide",{sync:true}),new Effect.Appear("lightwindow_data_slide",{sync:true,from:0,to:1}))}$("lightwindow_title_bar_inner").setStyle({height:"0px",marginTop:this.options.dimensions.titleHeight+"px"});this.dimensions.dataEffects.push(new Effect.Morph("lightwindow_title_bar_inner",{sync:true,style:{height:this.options.dimensions.titleHeight+"px",marginTop:"0px"}}),new Effect.Appear("lightwindow_title_bar_inner",{sync:true,from:0,to:1}));if(!this.options.hideGalleryTab){this._handleGalleryAnimation(false);if($("lightwindow_galleries_tab_container").getHeight()==0){this.dimensions.dataEffects.push(new Effect.Morph("lightwindow_galleries_tab_container",{sync:true,style:{height:"20px",marginTop:"0px"}}));$("lightwindow_galleries").setStyle({width:"0px"})}}var A=false;var B=this.dimensions.container.width-$("lightwindow_contents").getWidth()+this.resizeTo.width+this.options.contentOffset.width;if(B!=$("lightwindow_container").getWidth()){new Effect.Parallel([new Effect.Scale("lightwindow_contents",100*(this.resizeTo.width/$("lightwindow_contents").getWidth()),{scaleFrom:100*($("lightwindow_contents").getWidth()/($("lightwindow_contents").getWidth()+(this.options.contentOffset.width))),sync:true,scaleY:false,scaleContent:false}),new Effect.Scale("lightwindow_container",100*(B/(this.dimensions.container.width)),{sync:true,scaleY:false,scaleFromCenter:true,scaleContent:false})],{duration:this.duration,delay:0.25,queue:{position:"end",scope:"lightwindowAnimation"}})}B=this.dimensions.container.height-$("lightwindow_contents").getHeight()+this.resizeTo.height+this.options.contentOffset.height;if(B!=$("lightwindow_container").getHeight()){new Effect.Parallel([new Effect.Scale("lightwindow_contents",100*(this.resizeTo.height/$("lightwindow_contents").getHeight()),{scaleFrom:100*($("lightwindow_contents").getHeight()/($("lightwindow_contents").getHeight()+(this.options.contentOffset.height))),sync:true,scaleX:false,scaleContent:false}),new Effect.Scale("lightwindow_container",100*(B/(this.dimensions.container.height)),{sync:true,scaleX:false,scaleFromCenter:true,scaleContent:false})],{duration:this.duration,afterFinish:function(){if(this.dimensions.dataEffects.length>0){if(!this.options.hideGalleryTab){$("lightwindow_galleries").setStyle({width:this.resizeTo.width+"px"})}new Effect.Parallel(this.dimensions.dataEffects,{duration:this.duration,afterFinish:function(){this._finishWindow()}.bind(this),queue:{position:"end",scope:"lightwindowAnimation"}})}}.bind(this),queue:{position:"end",scope:"lightwindowAnimation"}});A=true}if(!A&&this.dimensions.dataEffects.length>0){new Effect.Parallel(this.dimensions.dataEffects,{duration:this.duration,beforeStart:function(){if(!this.options.hideGalleryTab){$("lightwindow_galleries").setStyle({width:this.resizeTo.width+"px"})}if(this.containerChange.height!=0||this.containerChange.width!=0){new Effect.MoveBy("lightwindow_container",this.containerChange.height,this.containerChange.width,{transition:Effect.Transitions.sinoidal})}}.bind(this),afterFinish:function(){this._finishWindow()}.bind(this),queue:{position:"end",scope:"lightwindowAnimation"}})}},_defaultfinalWindowAnimationHandler:function(A){if(this.windowType=="media"||this._getParameter("lightwindow_loading_animation")){Element.hide("lightwindow_loading");this._handleNavigation(this.activeGallery);this._setStatus(false)}else{Effect.Fade("lightwindow_loading",{duration:0.75,delay:1,afterFinish:function(){if(this.windowType!="image"&&this.windowType!="media"&&this.windowType!="external"){$("lightwindow_contents").setStyle({overflow:"auto"})}this._handleNavigation(this.activeGallery);this._defaultGalleryAnimationHandler();this._setStatus(false)}.bind(this),queue:{position:"end",scope:"lightwindowAnimation"}})}},_defaultGalleryAnimationHandler:function(B){if(this.activeGallery){$("lightwindow_galleries").setStyle({display:"block",marginBottom:$("lightwindow_data_slide").getHeight()+this.options.contentOffset.height/2+"px"});$("lightwindow_navigation").setStyle({height:$("lightwindow_contents").getHeight()-20+"px"})}else{$("lightwindow_galleries").setStyle({display:"none"});$("lightwindow_galleries_tab_container").setStyle({height:"0px",marginTop:"20px"});$("lightwindow_galleries_list").setStyle({height:"0px"});return false}if(B){if($("lightwindow_galleries_list").getHeight()==0){var A=$("lightwindow_contents").getHeight()*0.8;$("lightwindow_galleries_tab_span").className="down"}else{var A=0;$("lightwindow_galleries_tab_span").className="up"}new Effect.Morph("lightwindow_galleries_list",{duration:this.duration,transition:Effect.Transitions.sinoidal,style:{height:A+"px"},beforeStart:function(){$("lightwindow_galleries_list").setStyle({overflow:"hidden"})},afterFinish:function(){$("lightwindow_galleries_list").setStyle({overflow:"auto"})},queue:{position:"end",scope:"lightwindowAnimation"}})}},_defaultTransitionHandler:function(){this.dimensions.dataEffects=[];if($("lightwindow_data_slide").getStyle("display")!="none"){this.dimensions.dataEffects.push(new Effect.SlideUp("lightwindow_data_slide",{sync:true}),new Effect.Fade("lightwindow_data_slide",{sync:true,from:1,to:0}))}if(!this.options.hideGalleryTab){if($("lightwindow_galleries").getHeight()!=0&&!this.options.hideGalleryTab){this.dimensions.dataEffects.push(new Effect.Morph("lightwindow_galleries_tab_container",{sync:true,style:{height:"0px",marginTop:"20px"}}))}if($("lightwindow_galleries_list").getHeight()!=0){$("lightwindow_galleries_tab_span").className="up";this.dimensions.dataEffects.push(new Effect.Morph("lightwindow_galleries_list",{sync:true,style:{height:"0px"},transition:Effect.Transitions.sinoidal,beforeStart:function(){$("lightwindow_galleries_list").setStyle({overflow:"hidden"})},afterFinish:function(){$("lightwindow_galleries_list").setStyle({overflow:"auto"})}}))}}this.dimensions.dataEffects.push(new Effect.Morph("lightwindow_title_bar_inner",{sync:true,style:{height:"0px",marginTop:this.options.dimensions.titleHeight+"px"}}),new Effect.Fade("lightwindow_title_bar_inner",{sync:true,from:1,to:0}));new Effect.Parallel(this.dimensions.dataEffects,{duration:this.duration,afterFinish:function(){this._loadWindow()}.bind(this),queue:{position:"end",scope:"lightwindowAnimation"}})},_defaultFormHandler:function(D){var B=Event.element(D).parentNode;var C=Form.serialize(this._getParameter("lightwindow_form",B.getAttribute("params")));if(this.options.formMethod=="post"){var A=new Ajax.Request(B.href,{method:"post",postBody:C,onComplete:this.openWindow.bind(this,B)})}else{if(this.options.formMethod=="get"){var A=new Ajax.Request(B.href,{method:"get",parameters:C,onComplete:this.openWindow.bind(this,B)})}}},_finishWindow:function(){if(this.windowType=="external"){$("lightwindow_iframe").setAttribute("src",this.element.href);this._handleFinalWindowAnimation(1)}else{if(this.windowType=="media"){var B=document.createElement("object");B.setAttribute("classid",this.options.classids[this._fileExtension(this.contentToFetch)]);B.setAttribute("codebase",this.options.codebases[this._fileExtension(this.contentToFetch)]);B.setAttribute("id","lightwindow_media_primary");B.setAttribute("name","lightwindow_media_primary");B.setAttribute("width",this.resizeTo.width);B.setAttribute("height",this.resizeTo.height);B=this._addParamToObject("movie",this.contentToFetch,B);B=this._addParamToObject("src",this.contentToFetch,B);B=this._addParamToObject("controller","true",B);B=this._addParamToObject("wmode","transparent",B);B=this._addParamToObject("cache","false",B);B=this._addParamToObject("quality","high",B);if(!Prototype.Browser.IE){var A=document.createElement("object");A.setAttribute("type",this.options.mimeTypes[this._fileExtension(this.contentToFetch)]);A.setAttribute("data",this.contentToFetch);A.setAttribute("id","lightwindow_media_secondary");A.setAttribute("name","lightwindow_media_secondary");A.setAttribute("width",this.resizeTo.width);A.setAttribute("height",this.resizeTo.height);A=this._addParamToObject("controller","true",A);A=this._addParamToObject("wmode","transparent",A);A=this._addParamToObject("cache","false",A);A=this._addParamToObject("quality","high",A);B.appendChild(A)}if(this._getParameter("lightwindow_iframe_embed")){this._appendIframe("no");this._writeToIframe(this._convertToMarkup(B,"object"))}else{this._appendObject(B,"object",$("lightwindow_contents"))}this._handleFinalWindowAnimation(0)}else{this._handleFinalWindowAnimation(0)}}this._setupActions()}};Event.observe(window,"load",lightwindowInit,false);var myLightWindow=null;function lightwindowInit(){myLightWindow=new lightwindow()};flp_galeria_videos=Class.create();flp_galeria_videos.prototype={initialize:function(A,B,C){this.idModulo=A;this.width=B;this.height=C;this.modo="video";this.flplay=$f("flp_player_"+A,"/vVideos/flowplayer-3.0.7.swf",{clip:{autoBuffering:false,autoPlay:false},plugins:{myContent:{url:"/vVideos/flowplayer.content-3.0.2.swf",stylesheet:"/css3/flowplayer.content.css",padding:0,top:0,left:0,backgroundColor:"#000000",borderRadius:0,height:C,width:B}}});this.flplay.onStart(function(){var D=this.getPlugin("myContent");D.hide()});this.flplay.onLoad(function(){this.inicio()}.bind(this))},inicio:function(){if($("modulo_tipo_"+this.idModulo+"_1").innerHTML=="video"){this.modo="imagen";this.ponerImagen_Video(1)}else{this.modo="video";this.ponerImagen(1)}},ponerImagen:function(D){var A=$("modulo_imagen_"+this.idModulo+"_"+D).src;var C="";var B=this.flplay.getPlugin("myContent");if(this.modo=="video"){this.flplay.getControls().hide();this.flplay.getPlugin("play").hide();B.animate({height:"300",opacity:1})}B.setHtml(C);B.show();this.modo="imagen";$("gal_titulo_"+this.idModulo).update($("modulo_titulo_"+this.idModulo+"_"+D).innerHTML);$("gal_texto_"+this.idModulo).update($("modulo_texto_"+this.idModulo+"_"+D).innerHTML)},ponerImagen_Video:function(D){var A=$("modulo_imagen_"+this.idModulo+"_"+D).src;var C="";var B=this.flplay.getPlugin("myContent");if(this.modo=="imagen"){B.animate({height:this.height-25,opacity:1});this.flplay.getControls().show();this.flplay.getPlugin("play").show()}B.setHtml(C);B.show();this.modo="video";$("gal_titulo_"+this.idModulo).update($("modulo_titulo_"+this.idModulo+"_"+D).innerHTML);$("gal_texto_"+this.idModulo).update($("modulo_texto_"+this.idModulo+"_"+D).innerHTML)},startVideo:function(B){var A=this.flplay.getPlugin("myContent");A.hide();this.flplay.play(B)}};if(typeof Prototype=="undefined"||!Prototype.Version.match("1.6")){throw ("Prototype-UI library require Prototype library >= 1.6.0")}if(Prototype.Browser.WebKit){Prototype.Browser.WebKitVersion=parseFloat(navigator.userAgent.match(/AppleWebKit\/([\d\.\+]*)/)[1]);Prototype.Browser.Safari2=(Prototype.Browser.WebKitVersion<420)}if(Prototype.Browser.IE){Prototype.Browser.IEVersion=parseFloat(navigator.appVersion.split(";")[1].strip().split(" ")[1]);Prototype.Browser.IE6=Prototype.Browser.IEVersion==6;Prototype.Browser.IE7=Prototype.Browser.IEVersion==7}Prototype.falseFunction=function(){return false};Prototype.trueFunction=function(){return true};var UI={Abstract:{},Ajax:{}};Object.extend(Class.Methods,{extend:Object.extend.methodize(),addMethods:Class.Methods.addMethods.wrap(function(B,A){if(!A){return this}if(!A.hasOwnProperty("methodsAdded")){return B(A)}var C=A.methodsAdded;delete A.methodsAdded;B(A);C.call(A,this);A.methodsAdded=C;return this}),addMethod:function(B,C){var A={};A[B]=C;return this.addMethods(A)},method:function(A){return this.prototype[A].valueOf()},classMethod:function(){$A(arguments).flatten().each(function(A){this[A]=(function(){return this[A].apply(this,arguments)}).bind(this.prototype)},this);return this},undefMethod:function(A){this.prototype[A]=undefined;return this},removeMethod:function(A){delete this.prototype[A];return this},aliasMethod:function(A,B){this.prototype[A]=this.prototype[B];return this},aliasMethodChain:function(B,A){A=A.camelcase();this.aliasMethod(B+"Without"+A,B);this.aliasMethod(B,B+"With"+A);return this}});Object.extend(Number.prototype,{snap:function(A){return parseInt(A==1?this:(this/A).floor()*A)}});Object.extend(String.prototype,{camelcase:function(){var A=this.dasherize().camelize();return A.charAt(0).toUpperCase()+A.slice(1)},makeElement:function(){var A=new Element("div");A.innerHTML=this;return A.down()}});Object.extend(Array.prototype,{empty:function(){return !this.length},extractOptions:function(){return this.last().constructor===Object?this.pop():{}},removeAt:function(A){var B=this[A];this.splice(A,1);return B},remove:function(B){var A;while((A=this.indexOf(B))!=-1){this.removeAt(A)}return B},insert:function(B){var A=$A(arguments);A.shift();this.splice.apply(this,[B,0].concat(A));return this}});Element.addMethods({getScrollDimensions:function(A){return{width:A.scrollWidth,height:A.scrollHeight}},getScrollOffset:function(A){return Element._returnOffset(A.scrollLeft,A.scrollTop)},setScrollOffset:function(A,B){A=$(A);if(arguments.length==3){B={left:B,top:arguments[2]}}A.scrollLeft=B.left;A.scrollTop=B.top;return A},getNumStyle:function(A,B){var C=parseFloat($(A).getStyle(B));return isNaN(C)?null:C},appendText:function(A,B){A=$(A);B=String.interpret(B);A.appendChild(document.createTextNode(B));return A}});document.whenReady=function(A){if(document.loaded){A.call(document)}else{document.observe("dom:loaded",A)}};Object.extend(document.viewport,{getScrollOffset:document.viewport.getScrollOffsets,setScrollOffset:function(A){Element.setScrollOffset(Prototype.Browser.WebKit?document.body:document.documentElement,A)},getScrollDimensions:function(){return Element.getScrollDimensions(Prototype.Browser.WebKit?document.body:document.documentElement)}});(function(){UI.Options={methodsAdded:function(B){B.classMethod($w(" setOptions allOptions optionsGetter optionsSetter optionsAccessor "))},setOptions:function(B){if(!this.hasOwnProperty("options")){this.options=this.allOptions()}this.options=Object.extend(this.options,B||{})},allOptions:function(){var C=this.constructor.superclass,B=C&&C.prototype;return(B&&B.allOptions)?Object.extend(B.allOptions(),this.options):Object.clone(this.options)},optionsGetter:function(){A(this,arguments,false)},optionsSetter:function(){A(this,arguments,true)},optionsAccessor:function(){this.optionsGetter.apply(this,arguments);this.optionsSetter.apply(this,arguments)}};function A(C,D,B){D=$A(D).flatten();if(D.empty()){D=Object.keys(C.allOptions())}D.each(function(E){var F=(B?"set":"get")+E.camelcase();C[F]=C[F]||(B?function(G){return this.options[E]=G}:function(){return this.options[E]})})}})();UI.Carousel=Class.create(UI.Options,{options:{direction:"horizontal",previousButton:".previous_button",nextButton:".next_button",container:".container",scrollInc:"auto",disabledButtonSuffix:"_disabled",overButtonSuffix:"_over"},initialize:function(A,B){this.setOptions(B);this.element=$(A);this.id=this.element.id;this.container=this.element.down(this.options.container).firstDescendant();this.elements=this.container.childElements();this.previousButton=this.options.previousButton==false?null:this.element.down(this.options.previousButton);this.nextButton=this.options.nextButton==false?null:this.element.down(this.options.nextButton);this.posAttribute=(this.options.direction=="horizontal"?"left":"top");this.dimAttribute=(this.options.direction=="horizontal"?"width":"height");this.elementSize=this.computeElementSize();this.nbVisible=this.currentSize()/this.elementSize;var C=this.options.scrollInc;if(C=="auto"){C=Math.floor(this.nbVisible)}[this.previousButton,this.nextButton].each(function(E){if(!E){return }var D=(E==this.nextButton?"next_button":"previous_button")+this.options.overButtonSuffix;E.clickHandler=this.scroll.bind(this,(E==this.nextButton?-1:1)*C*this.elementSize);E.observe("click",E.clickHandler).observe("mouseover",function(){E.addClassName(D)}.bind(this)).observe("mouseout",function(){E.removeClassName(D)}.bind(this))},this);this.updateButtons()},destroy:function($super){[this.previousButton,this.nextButton].each(function(A){if(!A){return }A.stopObserving("click",A.clickHandler)},this);this.element.remove();this.fire("destroyed")},fire:function(B,A){A=A||{};A.carousel=this;return this.element.fire("carousel:"+B,A)},observe:function(A,B){this.element.observe("carousel:"+A,B.bind(this));return this},stopObserving:function(A,B){this.element.stopObserving("carousel:"+A,B);return this},checkScroll:function(A,D){if(A>0){A=0}else{var B=this.elements.last().positionedOffset()[this.posAttribute]+this.elementSize;var C=this.currentSize();if(A+Bthis.elements.length||A==this.currentIndex()||isNaN(parseInt(A))){return this}return this.scroll((this.currentIndex()-A)*this.elementSize)},updateButtons:function(){this.updatePreviousButton();this.updateNextButton();return this},updatePreviousButton:function(){var A=this.currentPosition();var B="previous_button"+this.options.disabledButtonSuffix;if(this.previousButton.hasClassName(B)&&A!=0){this.previousButton.removeClassName(B);this.fire("previousButton:enabled")}if(!this.previousButton.hasClassName(B)&&A==0){this.previousButton.addClassName(B);this.fire("previousButton:disabled")}},updateNextButton:function(){var C=this.currentLastPosition();var A=this.currentSize();var B="next_button"+this.options.disabledButtonSuffix;if(this.nextButton.hasClassName(B)&&C!=A){this.nextButton.removeClassName(B);this.fire("nextButton:enabled")}if(!this.nextButton.hasClassName(B)&&C==A){this.nextButton.addClassName(B);this.fire("nextButton:disabled")}},computeElementSize:function(){return this.elements.first().getDimensions()[this.dimAttribute]},currentIndex:function(){return -this.currentPosition()/this.elementSize},currentLastPosition:function(){if(this.container.childElements().empty()){return 0}return this.currentPosition()+this.elements.last().positionedOffset()[this.posAttribute]+this.elementSize},currentPosition:function(){return this.container.getNumStyle(this.posAttribute)},currentSize:function(){return this.container.parentNode.getDimensions()[this.dimAttribute]},updateSize:function(){this.nbVisible=this.currentSize()/this.elementSize;var A=this.options.scrollInc;if(A=="auto"){A=Math.floor(this.nbVisible)}[this.previousButton,this.nextButton].each(function(B){if(!B){return }B.stopObserving("click",B.clickHandler);B.clickHandler=this.scroll.bind(this,(B==this.nextButton?-1:1)*A*this.elementSize);B.observe("click",B.clickHandler)},this);this.checkScroll(this.currentPosition(),true);this.updateButtons().fire("sizeUpdated");return this}});UI.Ajax.Carousel=Class.create(UI.Carousel,{options:{elementSize:-1,url:null},initialize:function($super,A,B){if(!B.url){throw ("url option is required for UI.Ajax.Carousel")}if(!B.elementSize){throw ("elementSize option is required for UI.Ajax.Carousel")}$super(A,B);this.endIndex=0;this.hasMore=true;this.updateHandler=this.update.bind(this);this.updateAndScrollHandler=function(D,E,C){this.update(E,C);this.scroll(D)}.bind(this);this.runRequest.bind(this).defer({parameters:{from:0,to:Math.ceil(this.nbVisible)-1},onSuccess:this.updateHandler})},runRequest:function(A){this.requestRunning=true;new Ajax.Request(this.options.url,Object.extend({method:"GET"},A));this.fire("request:started");return this},scroll:function($super,A){if(this.animating||this.requestRunning){return this}var B=(-A)/this.elementSize;if(this.hasMore&&B>0&&this.currentIndex()+this.nbVisible+B-1>this.endIndex){var D=this.endIndex+1;var C=Math.ceil(D+this.nbVisible-1);this.runRequest({parameters:{from:D,to:C},onSuccess:this.updateAndScrollHandler.curry(A).bind(this)});return this}else{$super(A)}},update:function(B,A){this.requestRunning=false;this.fire("request:ended");if(!A){A=B.responseJSON}this.hasMore=A.more;this.endIndex=Math.max(this.endIndex,A.to);this.elements=this.container.insert({bottom:A.html}).childElements();return this.updateButtons()},computeElementSize:function(){return this.options.elementSize},updateSize:function($super){var B=this.nbVisible;$super();if(Math.floor(this.nbVisible)-Math.floor(B)>=1&&this.hasMore){if(this.currentIndex()+Math.floor(this.nbVisible)>=this.endIndex){var A=Math.floor(this.currentIndex()+Math.floor(this.nbVisible)-this.endIndex);this.runRequest({parameters:{from:this.endIndex+1,to:this.endIndex+A},onSuccess:this.updateHandler})}}return this},updateNextButton:function($super){var C=this.currentLastPosition();var A=this.currentSize();var B="next_button"+this.options.disabledButtonSuffix;if(this.nextButton.hasClassName(B)&&C!=A){this.nextButton.removeClassName(B);this.fire("nextButton:enabled")}if(!this.nextButton.hasClassName(B)&&C==A&&!this.hasMore){this.nextButton.addClassName(B);this.fire("nextButton:disabled")}}});sneaker_UltimosComentarios=Class.create({initialize:function(A){this.id=A;this.div="sneaker-ultimos-comentarios-"+A;this.interval=null;this.intervalName="";this.todoList=new Array();this.doneList=new Array()},addComment:function(A){this.todoList.push(A)},closeComment:function(A){this.doneList.push(A)},checkCommentIsClosed:function(B){for(var A=0;A0){var comment=this.todoList.pop();Effect.SlideDown("sneaker-comentario-"+comment,{duration:1});this.closeComment(comment)}else{var div=this.div+"-wraper";var fncAddComment=this.addComment.bind(this);var fncCheck=this.checkCommentIsClosed.bind(this);var fncResetInterval=this.resetInterval.bind(this);new Ajax.Request("/portada/index.php?ModoAjax="+this.id+"&comentario="+this.doneList[this.doneList.length-1],{onSuccess:function(transport){fncResetInterval(30000);var objJSON=eval("("+transport.responseText+")");objJSON.comentarios.reverse();for(var i=0;i