Add in the script (red):
Code:
init:function(){ //Initialize thumbnail viewer script
this.iefiltercapable=(this.iefiltercapable && this.enableTransition) //True or false: IE filters supported and is enabled by user
var pagelinks=document.getElementsByTagName("a")
for (var i=0; i<pagelinks.length; i++){ //BEGIN FOR LOOP
if (pagelinks[i].getAttribute("rel") && /enlargeimage:/i.test(pagelinks[i].getAttribute("rel"))){ //Begin if statement: Test for rel="enlargeimage"
var initType=pagelinks[i].getAttribute("rel").split("::")[1] //Get display type of enlarged image ("click" or "mouseover")
if (initType=="mouseover"){ //If type is "mouseover", preload the enlarged image for quicker display
this.preloadedimages[this.preloadedimages.length]=new Image()
this.preloadedimages[this.preloadedimages.length-1].src=pagelinks[i].href
pagelinks[i]["onclick"]=function(){ //Cancel default click action
if(this.rel.split('::')[2])
window.location=this.rel.split('::')[2];
return false
}
}
pagelinks[i]["on"+initType]=function(){ //Load enlarged image based on the specified display type (event)
thumbnailviewer2.loadimage(this) //Load image
return false
}
if (this.hideimgmouseout)
pagelinks[i]["onmouseout"]=function(){
thumbnailviewer2.hideimage(this)
}
this.targetlinks[this.targetlinks.length]=pagelinks[i] //store reference to target link
} //end if statement
} //END FOR LOOP
} //END init() function
Once you do that, you can have a link like so:
Code:
<a href="bulb.gif" rel="enlargeimage::mouseover::bulb_lrg.jpg" rev="loadarea">Thumbnail</a>
Or:
Code:
<a href="bulb.gif" rel="enlargeimage::mouseover::bulb_lrg.htm" rev="loadarea">Thumbnail</a>
Clicking on the link will take you to the larger image listed (first example) or a page (if you have one) with the larger image on it (second example).
Mousing over will still do what it already did.
Bookmarks