/**************************************
*  GUI functions tool kit (non obscruptive js)

*  required jQuery
*      
* author:  erational(http://www.erational.org)
* version: 0.1
* date:    2009.05.25 (alexandra minus one)
* licence: GPL 2.0    
***********************************/


$(document).ready(function(){
    // menu 
    $(".submenu ul").hide();     
    
    $(".submenu").hover(    
    	function(){	         
        $(this).children().show(); 
        var $menu =  $(this).children("h3").children("a");
        $menu.css("background","#D7D7FF");
        $menu.css("color","#4C4C4C");        
        
    	},
    	function(){ 
        $(".submenu ul").hide();
        var $menu =  $(this).children("h3").children("a");
       
        //if (!$menu.hasClass("on")) { //jquery 112
        if (!$menu.is(".on")) { 
          $menu.css("background","transparent");
          $menu.css("color","#FFFFFF");
        } else {
          $menu.css("background","#FFF");                             
          $menu.css("color","#FF8400");        
        };  
    	}
    );
    

        
});

//
// autres fonctions
// 
function popup(url,nom,largeur,hauteur,options) {
  var haut=(screen.height-hauteur)/2;
  var Gauche=(screen.width-largeur)/2;
  fencent = window.open(url,nom,"top="+haut+",left="+Gauche+",width="+largeur+",height="+hauteur+","+options);
}

