$(document).ready(function(){ var changed = 0; $('#menuNav_t0').show('slow'); $('.menu2 h3 a').click(function(event) { changed = 1; if(event == null) { //Workaround for missing DOM in IE event = window.event; event.currentTarget = event.srcElement; } var id = event.currentTarget.id; var tid = '#menuNav_t' + id.substring(9); $('.menuNav_t').hide('slow');; $(tid).show('slow'); if(event.preventDefault){ event.preventDefault(); } event.returnValue = false; return false; }); var m3open = 0; $('.menu3 h3 a').click(function(event) { if(event == null) { //Workaround for missing DOM in IE event = window.event; event.currentTarget = event.srcElement; } var id = event.currentTarget.id; var mid = id.substring(9); var tid = '#menuNav_t' + id.substring(9); if(m3open != mid){ $('.menu3toggle').hide('slow'); $(tid).show('slow'); m3open = mid; } event.preventDefault(); return false; }); $('.menu3 h2 a').mouseenter(function(event) { if(event == null) { //Workaround for missing DOM in IE event = window.event; event.currentTarget = event.srcElement; } var id = event.currentTarget.id; var mid = id.substring(9); var tid = '#menuNav_t' + id.substring(9); if(m3open != mid){ $('.menu3toggle').hide('slow'); $(tid).show('slow'); m3open = mid; } event.preventDefault(); return false; }); $('.middle_box').mouseleave(function(){ m3open = 0; $('.menu3toggle').hide('slow'); return false; }); var mg_open = 0; $('.mg_p').mouseenter(function(event) { if(event == null) { //Workaround for missing DOM in IE event = window.event; event.currentTarget = event.srcElement; } var id = event.currentTarget.id; var mid = id.substring(5); var tid = '#mg_i_' + id.substring(5); var pid = '#mg_p_' + id.substring(5); if(mg_open != mid){ $('.mg_img').hide(); $(tid).fadeIn('slow'); mg_open = mid; $('.mg_p').css('background-image','url(http://www.socialistworld.net/img/mg/backgray.png)'); $(pid).css('background-image', 'url(http://www.socialistworld.net/img/mg/backred.png)'); $('#mg_text_place p').css('color', '#000000'); $('#mg_text_place p b').css('color', '#000000'); $('#mg_text_place p a').css('color', '#000000'); $(pid +' p').css('color', '#ffffff'); $(pid +' p b').css('color', '#ffffff'); $(pid +' p a').css('color', '#ffffff'); } event.preventDefault(); return false; }); $('.navi h2 a').click(function(event) { changed = 1; if(event == null) { //Workaround for missing DOM in IE event = window.event; event.currentTarget = event.srcElement; } var id = event.currentTarget.id; var tid = '#m' + id.substring(4); var nid = '#n' + id.substring(4); $('#n1').css('background','url(img/tabclosed.png) no-repeat 0 0'); $('#n2').css('background','url(img/tabclosed.png) no-repeat 0 0'); $('#n3').css('background','url(img/tabclosed.png) no-repeat 0 0'); $('#n4').css('background','url(img/tabclosed.png) no-repeat 0 0'); $(nid).css('background','url(img/tab.png) no-repeat 0 0'); $('.m').hide(); $(tid).fadeIn('fast'); if(event.preventDefault){ event.preventDefault(); } event.returnValue = false; return false; }); });