Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Event.observe('pageWrap', 'mouseover', function(event) {
- var element = Event.element(event);
- if($(element).tagName.toLowerCase() === "a" && $(element).hasClassName("tt")){
- linkUrl = ($(element).getAttribute('href').indexOf('index')!=-1)?$(element).getAttribute('href'):'';
- linkID = (linkUrl)?(((linkUrl.split("?"))[1].split("&"))[0].split("="))[1]:linkID;
- }
- if ($(element).tagName.toLowerCase() === 'img' && $(element).hasClassName('thumbnail')) {
- var url = location.protocol+'//'+location.host;
- var newLocation = ($(element).src).replace(url, "");
- $($(element)).observe('click', function(obj){
- $($(element)).up('a').setAttribute('href', newLocation.replace("/tn_","/"));
- $($(element)).up('a').setAttribute('rel', "lightbox_assets/galleries/"+linkID+"/gallery");
- validateInitLightBox();
- });
- $($(element)).observe('mouseout', function(obj){
- $($(element)).up('a').setAttribute('href',linkUrl);
- });
- }
- if ($(element).tagName.toLowerCase() === 'span' && $(element).hasClassName('bottom')){
- $(element).setAttribute('title', "Click here to view the property information");
- $($(element)).observe('click', function(obj){
- $($(element)).up('a').removeAttribute('rel');
- $($(element)).up('a').setAttribute('href',linkUrl);
- if(validateInitLightBox()){
- document.location.href = linkUrl;
- }
- });
- }
- });
Add Comment
Please, Sign In to add comment