Now, this is a bit tricky. But, if you have your rev attributes set correctly as shown in my previous post, you can get the thumbnails to use those as well to open a new window onclick by adding this script right before your closing </body> tag:
Code:
<script type="text/javascript">
function link_em(){
var link_func=function(e){
var e=window.event? window.event : e? e : null;
var lk=e&&e.target? e.target.parentNode : e&&e.srcElement? e.srcElement.parentNode : null;
if(lk&&lk.getAttribute('rev',0)&&lk.getAttribute('rev',0).split('::')[1])
window.open(lk.getAttribute('rev',0).split('::')[1]);
return false;
}
for (var i_tem = 0, ls=document.links; i_tem < ls.length; i_tem++)
if(/enlargeimage/.test(ls[i_tem].getAttribute('rel',0)))
ls[i_tem].onclick=link_func;
}
if ( typeof window.addEventListener != "undefined" )
window.addEventListener( "load", link_em, false );
else if ( typeof window.attachEvent != "undefined" )
window.attachEvent( "onload", link_em );
else {
if ( window.onload != null ) {
var oldOnload = window.onload;
window.onload = function ( e ) {
oldOnload( e );
link_em();
};
}
else
window.onload = link_em;
}
</script>
Bookmarks