
  /*
  * Etopia BV
  * Init script
  */
  
  /*
  * Utils
  * Utils object, adding extra things to the libs
  */
  
  var utils = {
          scope: function( target, func ) {
                  return function(){
                          return func.apply( target, arguments ); 
                  }
          }
      },
      init = {
          run: function(){
                  jQuery( 'li.dropdown_lift' ).each(function(){
                          jQuery(this).bind( 'mouseover', function(){
                                 if( ('interval' in this) && this.interval )
                                         this.interval = clearTimeout( this.interval );
                                         
                                 jQuery(this).addClass( 'hover' );
                          }).bind( 'mouseout', function(){
                                 if( ('interval' in this) && this.interval )
                                         this.interval = clearTimeout( this.interval );
                                 this.interval = setTimeout(utils.scope(this,function(){
                                       jQuery(this).trigger( 'goOut' );
                                 }), 500);
                          }).bind( 'goOut', function(){
                                 jQuery(this).removeClass( 'hover' );
                          });
                  });
          }
  };
  
  // Run on window load
  jQuery(init.run);
