1tc_load("/s/tc-www/js/modules/scriptaculous/effects.js");var tc_ImageGallery=Class.create();tc_ImageGallery.instances={};tc_ImageGallery.prototype={_behavior:undefined,_callbacks:undefined,_currentIndex:undefined,_images:undefined,_loaders:{},_name:undefined,_prefix:undefined,_prefixedName:undefined,_slideShow:false,_slideShowRunning:true,_slideShowSpeed:5000,_slideShowTimeout:undefined,_status:"closed",_clearSlideShow:function(){if(this._slideShowTimeout!==undefined){window.clearTimeout(this._slideShowTimeout);this._slideShowTimeout=undefined}},_getNextIndex:function(){var index=this._currentIndex+1;if(isNaN(index)===true||index>=this._images.length){index=0}return index},_getPrevIndex:function(){var index=this._currentIndex-1;if(isNaN(index)===true||index<0){index=this._images.length-1}return index},_hideEffectCallback:function(element,callback){if(callback!==undefined){callback()}},_removeOpenCallback:function(id,callback){var element=$(id);if(element){Event.stopObserving(element,"click",callback)}},_preload:function(url){if(this._loaders[url]===undefined){this._loaders[url]=new Image();this._loaders[url].src=url}return this._loaders[url]},_setOpenCallback:function(id,callback){var element=$(id);if(element){Event.observe(element,"click",callback);element.addClassName("clickable")}},_showEffectCallback:function(element,callback){if(callback!==undefined){callback()}},initialize:function(name,images,options,cssPrefix,idPrefix){tc_ImageGallery.instances[name]=this;this._name=name;this._images=images;if(cssPrefix===undefined){cssPrefix="tc_image_gallery"}this._prefix=cssPrefix;this._prefixedName="";if(idPrefix===undefined){idPrefix="tc_image_gallery"}if(idPrefix!==""){this._prefixedName+=idPrefix+"_"}this._prefixedName+=this._name;var callbacks={open:function(){},show:function(){},close:function(){}};if(options!==undefined){if(options.slideShow!==undefined){this._slideShow=options.slideShow}if(options.slideShowSpeed!==undefined){this._slideShowSpeed=options.slideShowSpeed}if(options.setEvents!==undefined){this._setOpenCallback=options.setEvents}if(options.removeEvents!==undefined){this._removeOpenCallback=options.removeEvents}if(options.showEffect!==undefined){this._showEffectCallback=options.showEffect}if(options.hideEffect!==undefined){this._hideEffectCallback=options.hideEffect}if(options.behavior!==undefined){this._behavior=options.behavior}if(options.openCallback!==undefined){callbacks.open=options.openCallback}if(options.showCallback!==undefined){callbacks.show=options.showCallback}if(options.closeCallback!==undefined){callbacks.close=options.closeCallback}}this._callbacks=callbacks;if(this._behavior===undefined){var texts={loading:"",page_number:"%1$s / %2$s",prev:"<",next:">",start_slide_show:">>",stop_slide_show:"II",close:"X"};if(options!==undefined&&options.texts!==undefined){texts=options.texts}this._behavior=new tc_ImageGallery.behavior.window(texts)}},close:function(){this._callbacks.close();this._clearSlideShow();this._status="closed";this._currentIndex=undefined;this._behavior.close()},open:function(index){index=index||0;if(index>=this._images.length||index<0){index=0}this._callbacks.open(index);this._preload(this._images[index].url);this._status="open";this._behavior.open(index);this.showImage(index)},run:function(){if(this._images.length===0){return }var hash=document.location.hash.substr(1);var directOpen;this._behavior.init(this);var instance=this;var callback=function(index){var ig=instance;var image=index;return function(){ig.open(image);return false}};for(var index=0;index<this._images.length;index++){if(this._images[index].id!==null){this._images[index].callback=callback(index);this._setOpenCallback(this._images[index].id,this._images[index].callback);if(hash!==""&&hash===this._images[index].id){directOpen=index}}}if(directOpen!==undefined){this.open(directOpen)}},showImage:function(index){if(index===this._currentIndex){return }this._clearSlideShow();this._preload(this._images[index].url);var instance=this;var callback=function(){if(instance._slideShow===true&&instance._slideShowRunning===true){instance.startSlideShow()}instance._callbacks.show(index)};var imageNumber=$(this._prefixedName+"_current_image");if(imageNumber){imageNumber.innerHTML=index+1}this._status="open";this._behavior.show(index,callback);this._currentIndex=index;if(this._images.length!==1){this._preload(this._images[this._getNextIndex()].url)}if(this._images.length!==2){this._preload(this._images[this._getPrevIndex()].url)}},showNext:function(){this.showImage(this._getNextIndex())},showPrev:function(){this.showImage(this._getPrevIndex())},startSlideShow:function(){this._clearSlideShow();this._slideShowRunning=true;var instance=this;this._slideShowTimeout=window.setTimeout(function(){instance.showNext()},this._slideShowSpeed)},stopSlideShow:function(){this._slideShowRunning=false;this._clearSlideShow()}};tc_ImageGallery.functions={getLink:function(prefix,image){var a=document.createElement("a");a.href=image.link;a.className=prefix+"_image_link";if(image.target!==null){a.className+=" "+prefix+"_image_link_has_target";a.target=image.target}return a},makeImageMap:function(name,areas){if(areas.length!==0){var map=document.createElement("map");map.id=name;map.name=name;for(var index=0;
1index<areas.length;index++){var area=document.createElement("area");if(areas[index].title!==null){area.alt=areas[index].title;area.title=areas[index].title}if(areas[index].href!==null){area.href=areas[index].href;if(areas[index].target!==null){area.target=areas[index].target}}else{area.nohref="nohref"}area.shape=areas[index].shape;area.coords=areas[index].coords;map.appendChild(area)}return map}},replaceImageMap:function(container,prefix,image,imageElement){if(image.code!==null&&image.code!==undefined){var temp=document.createElement("div");temp.innerHTML=image.code.stripScripts();while(temp.hasChildNodes()===true){container.appendChild(temp.firstChild)}if(image.attributes!==null){for(var attribute in image.attributes){imageElement[attribute]=image.attributes[attribute]}}image.code.evalScripts()}else{var map=$(prefix+"_image_map");if(map!==null){map.remove()}if(image.imageMap!==null&&image.imageMap.length!==0){container.appendChild(tc_ImageGallery.functions.makeImageMap(prefix+"_image_map",image.imageMap))}}},setContainerData:function(container,prefix,image){if(image.imageMap!==null&&image.imageMap.length!==0){container.addClassName(prefix+"_image_container_has_map")}else{container.removeClassName(prefix+"_image_container_has_map")}if(image.link!==null){container.addClassName(prefix+"_image_container_has_link")}else{container.removeClassName(prefix+"_image_container_has_link")}if(image.width!==null){container.style.width=image.width+"px"}else{container.style.width="auto"}if(image.height!==null){container.style.height=image.height+"px"}else{container.style.height="auto"}},setContentClasses:function(content,prefix,index,images,image){if(index===0){content.addClassName(prefix+"_first_image")}else{content.removeClassName(prefix+"_first_image")}if(index===images-1){content.addClassName(prefix+"_last_image")}else{content.removeClassName(prefix+"_last_image")}if(image.description!==null){content.addClassName(prefix+"_has_description");content.removeClassName(prefix+"_has_no_description")}else{content.removeClassName(prefix+"_has_description");content.addClassName(prefix+"_has_no_description")}},setDescription:function(element,description){if(description!==null){element.innerHTML=description;Element.show(element)}else{Element.hide(element);while(element.firstChild!==null){element.removeChild(element.firstChild)}}},setDetailsLink:function(element,label,prefix,image){Element.hide(element);while(element.firstChild!==null){element.removeChild(element.firstChild)}if(image.link!==null){var span=document.createElement("span");span.className="label";var a=tc_ImageGallery.functions.getLink(prefix,image);label=document.createTextNode(label);var seperator=document.createElement("span");seperator.className="seperator";seperatorText=document.createTextNode(":");gap=document.createTextNode(" ");seperator.appendChild(seperatorText);a.appendChild(label);a.appendChild(seperator);span.appendChild(a);span.appendChild(gap);element.appendChild(span);span=document.createElement("span");span.className="content";a=tc_ImageGallery.functions.getLink(prefix,image);var link=document.createTextNode(image.link);a.appendChild(link);span.appendChild(a);element.appendChild(span);Element.show(element)}},setImageActions:function(container,prefix,actions){while(container.hasChildNodes()===true){container.removeChild(container.firstChild)}if(actions!==undefined&&actions.length!==0){for(var index=0,length=actions.length;index<length;index++){var text=document.createTextNode(actions[index].text);var inner=document.createElement("span");inner.className="inner";inner.appendChild(text);var outer=document.createElement("span");outer.className="outer";outer.appendChild(inner);var action=document.createElement("a");action.className=prefix+"_image_action "+prefix+"_image_action_"+actions[index].suffix;action.title=actions[index].title;action.href=actions[index].action;action.appendChild(outer);container.appendChild(action)}}},setImageAttributes:function(imageElement,prefix,image){imageElement.id=prefix+"_image";imageElement.alt="";if(image.title!==null){imageElement.title=image.title;imageElement.alt=image.title}if(image.alt!==null){imageElement.alt=image.alt}if(image.width!==null){imageElement.width=image.width}if(image.height!==null){imageElement.height=image.height}if(image.imageMap!==null&&image.imageMap.length!==0){imageElement.useMap="#"+prefix+"_image_map"}else{imageElement.useMap=""}},setTitle:function(titleElement,prefix,image){if(image.title===null){while(titleElement.firstChild!==null){titleElement.removeChild(titleElement.firstChild)}return }var title=document.createTextNode(image.title);if(image.link!==null){var a=tc_ImageGallery.functions.getLink(prefix,image);a.appendChild(title);title=a}if(titleElement.childNodes.length!==0){titleElement.replaceChild(title,titleElement.childNodes[0])}else{titleElement.appendChild(title)}},showLoading:function(image,prefix,loading,height){var element=document.createElement("div");if(height!==null){element.style.paddingTop=Math.floor(height/2)+"px"}element.className=prefix+"_image_loading";element.innerHTML=loading;image.parentNode.replaceChild(element,image);return element}};tc_ImageGallery.effects={blend:{_prepare:function(element,callback){element=$(element);var dimensions=element.getDimensions();dimensions.height-=parseInt(element.getStyle("paddingTop"),10)+parseInt(element.getStyle("paddingBottom"),10);dimensions.width-=parseInt(element.getStyle("paddingLeft"),10)+parseInt(element.getStyle("paddingRight"),10);element.style.width=dimensions.width+"px";var options={duration:1,scaleMode:{originalHeight:dimensions.height,originalWidth:dimensions.width},afterFinish:function(){element.style.width="";if(callback!==undefined){callback()}}};return options},show:function(element,callback){$(element).style.display="none";var options=tc_ImageGallery.effects.blend._prepare(element,callback);Effect.BlindDown(element,options)},hide:function(element,callback){var options=tc_ImageGallery.effects.blend._prepare(element,callback);Effect.BlindUp(element,options)}},opacity:{show:function(element,callback){element=$(element);element.setOpacity(0);element.style.visibility="visible";var options={duration:0.5,transition:Effect.Transitions.linear,from:0,to:1};if(callback!==undefined){options.afterFinish=callback}new Effect.Opacity(element,options)},hide:function(element,callback){var options={duration:0.5,transition:Effect.Transitions.linear,from:1,to:0,afterFinish:function(){element=$(element);element.style.visibility="hidden";element.setOpacity(1);if(callback!==undefined){callback()}}};new Effect.Opacity(element,options)}},drop:{show:function(element,callback){var options={duration:1};if(callback!==undefined){options.afterFinish=callback}Effect.DropIn(element,options)},hide:function(element,callback){var options={duration:1};if(callback!==undefined){options.afterFinish=callback}Effect.DropOut(element,options)}}};tc_ImageGallery.behavior={};tc_ImageGallery.behavior.window=function(texts,options){tc_load("/s/tc-www/js/window.js");this._texts=texts;if(options!==undefined){if(options.imageBorder!==undefined){this._imageBorder=options.imageBorder}if(options.maxWidth!==undefined){this._maxWidth=options.maxWidth}if(options.container!==undefined){this._container=options.container}}
1};tc_ImageGallery.behavior.window.prototype={_container:undefined,_imageBorder:0,_imageGallery:undefined,_maxWidth:1000,_overlay:undefined,_texts:undefined,_window:undefined,_setMaxWindowWidth:function(){var containerMaxWidth=this._maxWidth-2*10;var container=$(this._imageGallery._prefixedName+"_image_container_outer");var width=parseInt($(this._imageGallery._prefixedName+"_image_container").style.width,10);width+=this._imageBorder*2;if(width>containerMaxWidth){width=containerMaxWidth}container.style.minWidth=width+"px";if(Prototype.Browser.IE===true&&window.XMLHttpRequest===undefined){var windowElement=this._window.get();windowElement.style.width="auto";container.style.width="auto";if(windowElement.clientWidth-parseInt(windowElement.currentStyle.paddingLeft,10)-parseInt(windowElement.currentStyle.paddingRight,10)>this._maxWidth){windowElement.style.width=this._maxWidth+"px";container.style.width="100%"}}},init:function(imageGallery){this._imageGallery=imageGallery;this._window=new tc_Window(this._imageGallery._name,undefined,this._imageGallery._prefix+"_window",this._container);this._window.closeCallback=function(w,a,c){imageGallery._hideEffectCallback(w,c)};var w=this._window;this._overlay=new tc_Overlay(this._imageGallery._name,undefined,this._imageGallery._prefix+"_overlay",this._container);this._overlay.addObserver({update:function(subject){if(subject.getStatus()==="close"&&imageGallery._status!=="closed"){imageGallery.close()}}})},open:function(){this._overlay.open();if(this._window.get().visible()!==true){var classes=" ";if(this._imageGallery._images.length===1){classes+=this._imageGallery._prefix+"_single_image"}else{classes+=this._imageGallery._prefix+"_multiple_images"}var code='<div id="'+this._imageGallery._prefixedName+'_content" class="'+this._imageGallery._prefix+"_content"+classes+'"><div id="'+this._imageGallery._prefixedName+'_image_container_outer" class="'+this._imageGallery._prefix+'_image_container_outer"><div id="'+this._imageGallery._prefixedName+'_image_container" class="'+this._imageGallery._prefix+'_image_container"><br id="'+this._imageGallery._prefixedName+'_image" /></div></div><div id="'+this._imageGallery._prefixedName+'_description_outer" class="'+this._imageGallery._prefix+'_description_outer"><div id="'+this._imageGallery._prefixedName+'_description" class="'+this._imageGallery._prefix+'_description"></div></div><div class="'+this._imageGallery._prefix+'_details_link_outer"><div id="'+this._imageGallery._prefixedName+'_details_link" class="'+this._imageGallery._prefix+'_details_link"></div></div>';if(this._imageGallery._images.length!==1){code+='<div id="'+this._imageGallery._prefixedName+'_info_outer" class="'+this._imageGallery._prefix+'_info_outer"><div id="'+this._imageGallery._prefixedName+'_info" class="'+this._imageGallery._prefix+'_info">'+this._texts.page_number.replace("%1$s",'<span id="'+this._imageGallery._prefixedName+'_current_image"></span>').replace("%2$s",this._imageGallery._images.length)+"</div></div>"}code+='<div id="'+this._imageGallery._prefixedName+'_navigation_outer" class="'+this._imageGallery._prefix+'_navigation_outer"><div id="'+this._imageGallery._prefixedName+'_navigation" class="'+this._imageGallery._prefix+'_navigation">';if(this._imageGallery._images.length!==1){code+='<a id="'+this._imageGallery._prefixedName+'_navigation_prev" href="javascript:tc_ImageGallery.instances[\''+this._imageGallery._name+'\'].showPrev();" class="'+this._imageGallery._prefix+"_navigation_prev "+this._imageGallery._prefix+'_navigation_link"><span class="outer"><span class="inner">'+this._texts.prev+'</span></span></a><a id="'+this._imageGallery._prefixedName+'_navigation_next" href="javascript:tc_ImageGallery.instances[\''+this._imageGallery._name+'\'].showNext();" class="'+this._imageGallery._prefix+"_navigation_next "+this._imageGallery._prefix+'_navigation_link"><span class="outer"><span class="inner">'+this._texts.next+"</span></span></a>"}if(this._imageGallery._slideShow===true){var startStyle="",stopStyle="";if(this._imageGallery._slideShowRunning===true){startStyle=' style="display: none;"'}else{stopStyle=' style="display: none;"'}code+='<a id="'+this._imageGallery._prefixedName+'_navigation_start_slide_show" href="javascript:$(\''+this._imageGallery._prefixedName+"_navigation_start_slide_show').hide();$('"+this._imageGallery._prefixedName+"_navigation_stop_slide_show').show();tc_ImageGallery.instances['"+this._imageGallery._name+'\'].startSlideShow();" class="'+this._imageGallery._prefix+"_navigation_start_slide_show "+this._imageGallery._prefix+'_navigation_link"'+startStyle+'><span class="outer"><span class="inner">'+this._texts.start_slide_show+'</span></span></a><a id="'+this._imageGallery._prefixedName+'_navigation_stop_slide_show" href="javascript:$(\''+this._imageGallery._prefixedName+"_navigation_stop_slide_show').hide();$('"+this._imageGallery._prefixedName+"_navigation_start_slide_show').show();tc_ImageGallery.instances['"+this._imageGallery._name+'\'].stopSlideShow();" class="'+this._imageGallery._prefix+"_navigation_stop_slide_show "+this._imageGallery._prefix+'_navigation_link"'+stopStyle+'><span class="outer"><span class="inner">'+this._texts.stop_slide_show+"</span></span></a>"}code+='<a id="'+this._imageGallery._prefixedName+'_navigation_close" href="javascript:tc_ImageGallery.instances[\''+this._imageGallery._name+'\'].close();" class="'+this._imageGallery._prefix+"_navigation_close "+this._imageGallery._prefix+'_navigation_link"><span class="outer"><span class="inner">'+this._texts.close+'</span></span></a></div></div><div id="'+this._imageGallery._prefixedName+'_image_actions_outer" class="'+this._imageGallery._prefix+'_image_actions_outer"><div id="'+this._imageGallery._prefixedName+'_image_actions" class="'+this._imageGallery._prefix+'_image_actions"></div></div><div class="'+this._imageGallery._prefix+'_content_clear clear"></div></div>';this._window.setContentHTML(code);var currentImage=$(this._imageGallery._prefixedName+"_current_image");if(currentImage){var text=currentImage.nextSibling;if(text!==null&&text.nodeValue.substr(0,1)!==" "){text.nodeValue=" "+text.nodeValue}}}},show:function(index,callback){if(this._window.get().visible()===true){var instance=this;var show=function(){instance._show(index,callback)};this._imageGallery._hideEffectCallback(this._window.get(),show)}else{this._window.open();this._show(index,callback)}},_show:function(index,callback){var image=this._imageGallery._images[index];var imageElement=this._imageGallery._preload(image.url);var title=image.title;if(image.title!==null&&image.link!==null){var linkStart='<a href="'+image.link+'" class="'+this._imageGallery._prefix+"_image_link";if(image.target!==null){linkStart+=" "+this._imageGallery._prefix+'_image_link_has_target" target="'+image.target}linkStart+='">';var linkEnd="</a>";title=linkStart+title+linkEnd}this._window.setTitle(title);var content=$(this._imageGallery._prefixedName+"_content");
1if(!content){return }tc_ImageGallery.functions.setContentClasses(content,this._imageGallery._prefix,index,this._imageGallery._images.length,image);tc_ImageGallery.functions.setImageActions($(this._imageGallery._prefixedName+"_image_actions"),this._imageGallery._prefix,image.actions);var imageContainer=$(this._imageGallery._prefixedName+"_image_container");var outerImageContainer=imageContainer;tc_ImageGallery.functions.setContainerData(imageContainer,this._imageGallery._prefix,image);if(image.link!==null){var link=tc_ImageGallery.functions.getLink(this._imageGallery._prefix,image);imageContainer.replaceChild(link,imageContainer.childNodes[0]);imageContainer=link}imageContainer.innerHTML='<br id="'+this._imageGallery._prefixedName+'_image" />';var oldImageElement=$(this._imageGallery._prefixedName+"_image");tc_ImageGallery.functions.setImageAttributes(imageElement,this._imageGallery._prefixedName,image);tc_ImageGallery.functions.replaceImageMap(outerImageContainer,this._imageGallery._prefixedName,image,imageElement);tc_ImageGallery.functions.setDescription($(this._imageGallery._prefixedName+"_description"),image.description);tc_ImageGallery.functions.setDetailsLink($(this._imageGallery._prefixedName+"_details_link"),this._texts.moreInfo,this._imageGallery._prefix,image);if(imageElement.complete===true){oldImageElement.parentNode.replaceChild(imageElement,oldImageElement)}else{var loading=tc_ImageGallery.functions.showLoading(oldImageElement,this._imageGallery._prefix,this._texts.loading,image.height);var instance=this._imageGallery;var w=this._window;var o=this._overlay;var c=callback;var load=function(){if(loading.parentNode!==null){loading.parentNode.replaceChild(this,loading);w.refresh();o.refresh();instance._showEffectCallback(this,c)}this.onload=Prototype.emptyFunction};callback=function(){imageElement.onload=load;if(imageElement.complete===true){imageElement.onload()}}}this._setMaxWindowWidth();this._window.refresh();this._overlay.refresh();this._imageGallery._showEffectCallback(this._window.get(),callback)},close:function(){if(this._window!==undefined){this._window.close()}if(this._overlay!==undefined){this._overlay.close()}}};tc_ImageGallery.behavior.toogle=function(texts,firstImage,options){this._texts=texts;this._firstImage=firstImage||0;if(options!==undefined){if(options.preview!==undefined){this._preview=options.preview}if(options.setDetails!==undefined){this._setDetails=options.setDetails}if(options.setPreview!==undefined){this._setPreview=options.setPreview}}};tc_ImageGallery.behavior.toogle.prototype={_firstImage:undefined,_imageGallery:undefined,_preview:false,_texts:undefined,_setDetails:function(index,callback){var image=this._imageGallery._images[index];var imageElement=this._imageGallery._preload(image.url);var title=$(this._imageGallery._prefixedName+"_title");if(title){tc_ImageGallery.functions.setTitle(title,this._imageGallery._prefix,image)}var content=$(this._imageGallery._prefixedName+"_content");if(content){tc_ImageGallery.functions.setContentClasses(content,this._imageGallery._prefix,index,this._imageGallery._images.length,image)}var actionContainer=$(this._imageGallery._prefixedName+"_image_actions");if(actionContainer!==null){tc_ImageGallery.functions.setImageActions(actionContainer,this._imageGallery._prefix,image.actions)}var imageContainer=$(this._imageGallery._prefixedName+"_image_container");var outerImageContainer=imageContainer;tc_ImageGallery.functions.setContainerData(imageContainer,this._imageGallery._prefix,image);if(image.link!==null){var link=tc_ImageGallery.functions.getLink(this._imageGallery._prefix,image);imageContainer.replaceChild(link,imageContainer.childNodes[0]);imageContainer=link}imageContainer.innerHTML='<br id="'+this._imageGallery._prefixedName+'_image" />';var oldImageElement=$(this._imageGallery._prefixedName+"_image");tc_ImageGallery.functions.setImageAttributes(imageElement,this._imageGallery._prefixedName,image);tc_ImageGallery.functions.replaceImageMap(outerImageContainer,this._imageGallery._prefixedName,image,imageElement);var description=$(this._imageGallery._prefixedName+"_description");if(description){tc_ImageGallery.functions.setDescription(description,image.description)}var detailsLink=$(this._imageGallery._prefixedName+"_details_link");if(detailsLink){tc_ImageGallery.functions.setDetailsLink(detailsLink,this._texts.moreInfo,this._imageGallery._prefix,image)}if(imageElement.complete===true){oldImageElement.parentNode.replaceChild(imageElement,oldImageElement);this._imageGallery._showEffectCallback(content||imageContainer,callback)}else{oldImageElement.parentNode.replaceChild(imageElement,oldImageElement);this._imageGallery._showEffectCallback(content||imageContainer,callback); var loading=tc_ImageGallery.functions.showLoading(oldImageElement,this._imageGallery._prefix,this._texts.loading,image.height);var instance=this._imageGallery;imageElement.onload=function(){if(loading.parentNode!==null){loading.parentNode.replaceChild(this,loading);
1instance._showEffectCallback(this,callback)}this.onload=Prototype.emptyFunction};this._imageGallery._showEffectCallback(content||imageContainer)}},_setPreview:function(newIndex,oldIndex){var oldPreview=this._imageGallery._images[oldIndex];var newPreview=this._imageGallery._images[newIndex];var imageElement=this._imageGallery._preload(newPreview.previewUrl);this._imageGallery._removeOpenCallback(oldPreview.id,oldPreview.callback);var title=$(oldPreview.id+"_title");if(title){title.id=newPreview.id+"_title";if(newPreview.title!==null){var text=document.createTextNode(newPreview.title);title.replaceChild(text,title.childNodes[0])}else{title.removeChild(title.firstChild)}}var content=$(oldPreview.id);content.id=newPreview.id;var oldImageElement=$(oldPreview.id+"_image");if(imageElement.complete===true){oldImageElement.parentNode.replaceChild(imageElement,oldImageElement)}else{var loading=tc_ImageGallery.functions.showLoading(oldImageElement,this._imageGallery._prefix,this._texts.loading,newPreview.previewHeight);var instance=this._imageGallery;imageElement.onload=function(){loading.parentNode.replaceChild(this,loading);instance._showEffectCallback(this)}}
1var image={title:newPreview.title,alt:newPreview.alt,width:newPreview.previewWidth,height:newPreview.previewHeight,imageMap:null};tc_ImageGallery.functions.setImageAttributes(imageElement,newPreview.id,image);this._imageGallery._setOpenCallback(newPreview.id,newPreview.callback);this._imageGallery._showEffectCallback(content)},init:function(imageGallery){this._imageGallery=imageGallery;this._imageGallery._currentIndex=this._firstImage;if(this._imageGallery._slideShow===true){this._imageGallery.startSlideShow()}},open:function(){if(this._preview===true){this._imageGallery._preload(this._imageGallery._images[this._imageGallery._currentIndex].previewUrl)}},show:function(index,callback){var instance=this;var content=$(this._imageGallery._prefixedName+"_content")||$(this._imageGallery._prefixedName+"_image_container");var setDetails=function(){instance._setDetails(index,callback)};this._imageGallery._hideEffectCallback(content,setDetails);if(this._preview===true){var preview=$(this._imageGallery._images[index].id);var setPreview=function(){instance._setPreview(index,instance._imageGallery._currentIndex)};this._imageGallery._hideEffectCallback(preview,setPreview)}},close:function(){}};Effect.DropIn=function(element){element=$(element);element.setOpacity(0);var oldStyle={top:element.getStyle("top"),left:element.getStyle("left")};return new Effect.Parallel([new Effect.Opacity(element,{sync:true,to:1,form:0}),new Effect.Move(element,{x:0,y:100,sync:true})],Object.extend({duration:0.5,beforeSetup:function(effect){element.style.top=(parseInt(oldStyle.top,10)||0)-100+"px";element.makePositioned().show()},afterFinishInternal:function(effect){effect.effects[0].element.undoPositioned().setStyle(oldStyle)}},arguments[1]||{}))};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.