$(document).ready(function() {
  //  $selected_link = $('#topnav li.selected');
/*	var config = {    
    	 over: function() { 
 		if ( $(this).hasClass('active') ) return;
       	 $(this).addClass('selected');
      		},    
   	  timeout: 1000, // number = milliseconds delay before onMouseOut  
	  sensitivity: 2, // number = sensitivity threshold (must be 1 or higher)    
         interval: 100, // number = milliseconds for onMouseOver polling interval    
   	  out: function() { 
      		  $(this).removeClass('selected');
     		 }};

   $('#links_main ul li').hoverIntent( config );   */


  $("a.parentLink").parent('li').hover( function() { 
      if ( $(this).hasClass('active') ) return;
        $(this).addClass('selected');
	$(this).children('.sub').addClass('selected');
	},
	 function() {
	if ( $(this).hasClass('active') ) return;
        $(this).removeClass();    //  removeClass('selected') doesn't work in IE6
	$(this).children('.sub').removeClass('selected');
      });   


   /*      $("a.parentLink").parent('li').hoverIntent({ 
                over: showMenus, 
                timeout: 1000, 
                out: hideMenus 
            }); 

            function showMenus() { 
                $("div.sub").stop().fadeTo('700', 0).hide(); 
                var me = $(this).children('a.parentLink'); 
                me.next("div.sub").stop().fadeTo('700', 1).show(); 
                $("a.parentLink").stop().parents("li").css({ "background-color": "transparent" }); 
                me.parents("li").stop().css({ "background-color": "#f2d7aa" }); 
            } 
            function hideMenus() { 
                var me = $(this).children('a.parentLink'); 
                me.parents("li").css({ "background-color": "transparent" }); 
                me.next("div.sub").stop().fadeTo('700', 0).hide(); 
                $("li.active").children("div.sub").stop().fadeTo('700', 1).show(); 
            } 
*/

 });


 function wb_onclick() {
wb = window.open('/php/journal/WBentry.php', 'workbook',
 'scrollbars,toolbar,menubar,resizable,location,width=750,height=600,innerWidth=750,innerHeight=600,left=0,top=0'); 
wb.focus();
wb.opener = self;
}

