jQuery(document).ready(function(){ var oPages = new Pages(); oPages.init(); }); function Pages(){ } Pages.prototype = { init:function(){ this.attachEvents() }, attachEvents:function(){ _my = this; jQuery('.release a').click(function(){ oPopup = window.open("", '', "width=585,height=585,status=yes,toolbar=no,menubar=no,scrollbars=yes,resizable=yes"); oPopup.location = this.href; return false; }); jQuery( '.pages a' ).click(function(){ jQuery( '.current' ).removeClass('current'); jQuery( this.parentNode ).addClass( 'current' ); sHref = jQuery(this).attr('href').replace(/#/, ''); jQuery('div[class=\'' + sHref + ' page' + '\']').addClass( 'current' ); jQuery('div[class=\'' + sHref + ' page' + ' text\']').addClass( 'current' ); jQuery('div[class=\'' + sHref + ' page' + ' image\']').addClass( 'current' ); return false; }); if ( jQuery('.title a[href=/news-media-press/]').length == 0 && jQuery('.title a[href=/en/news-media-press/]').length == 0){ jQuery( '.page' ).click(function(){ oCurPage = jQuery( '.pages .current' ); jQuery( '.pages .current + li' ).addClass( 'current' ); oCurPage.removeClass('current'); if ( jQuery('.pages li').hasClass('current') !== true ){ jQuery('.pages li').eq(0).addClass( 'current' ); } jQuery( '.current + .page' ).addClass( 'current' ); jQuery( this ).removeClass('current'); if ( jQuery('.page').hasClass('current') !== true ){ jQuery( '.pages + .page' ).addClass( 'current' ); } return false; }); } } }