var GiftInfo = {
   togglers : null,
   wall: null,
   actual:null,
   init: function(){
      var cont = $('body');
      if(!cont)
      return;
      if($('info_wall')){
         var wall = getChildren(cont,'className','wallpaper');
         for(var i in wall){
            addEvent(wall[i],
                     'mouseover',
                     this.shwoWallInfo.bind(this,wall[i])
            );
         }
      }
      if($('info_screen')){
         wall = getChildren(cont,'className','screensave');
         for(var i in wall){
            addEvent(wall[i],
                     'mouseover',
                     this.shwoScreenInfo.bind(this,wall[i])
            );
         }
      }

   },
   shwoWallInfo: function(link){
      addEvent(link,'mousemove',this.wallInfo);
      addEvent(link,'mouseout',this.hideInfo);
      return false;
   },
   wallInfo:function(e){
      var el = $('info_wall');
      if (window.event) {
          x = window.event.clientX + document.documentElement.scrollLeft + document.body.scrollLeft;
          y = window.event.clientY + document.documentElement.scrollTop  + document.body.scrollTop;
      } else {
          x = e.clientX + window.scrollX;
          y = e.clientY + window.scrollY;
      }
      x+= 10; y+= 10;
      el.style.left = x + "px";
      el.style.top  = y + "px";
      $('info_wall').style.visibility = 'visible';
   },
   shwoScreenInfo: function(link){
      addEvent(link,'mousemove',this.wallInfo);
      addEvent(link,'mouseout',this.hideInfo);

      return false;
   },  
   screenInfo:function(e){
      var el = $('info_screen');
      
      if (window.event) {
          x = window.event.clientX + document.documentElement.scrollLeft + document.body.scrollLeft;
          y = window.event.clientY + document.documentElement.scrollTop  + document.body.scrollTop;
      } else {
          x = e.clientX + window.scrollX;
          y = e.clientY + window.scrollY;
      }
      x+= 10; y+= 10;
      el.style.left = x + "px";
      el.style.top  = y + "px";
      $('info_screen').style.visibility = 'visible';
   },
   hideInfo:function(){
      $('info_screen').style.visibility = 'hidden';
      $('info_wall').style.visibility = 'hidden';
   }
};

addEvent(window, "load",function(){
   GiftInfo.init();
});
