function GN_position()
{

  var Longside = 100;
  var Shortside = 50;
  var Pgmargin = 10;  
  var Yoff = $(window).scrollTop(); 
  var Xoff = $(window).scrollLeft();
  var Wwidth = $(window).width();
  var Wheight = $(window).height();
  var Elwidth = (Wwidth-Pgmargin*2)/3;
  var Elhmargin = Math.round((Elwidth-Longside)/2);
  var Elheight = (Wheight-Pgmargin*2)/3;
  var Elvmargin = Math.round((Elheight-Longside)/2);
  $('.GN_top').css('top', (Yoff)+'px');
  $('.GN_tl').css('left', (Xoff+Pgmargin+Elhmargin)+'px');
  $('.GN_tc').css('left', (Xoff+Pgmargin+Elwidth+Elhmargin)+'px');
  $('.GN_tr').css('left', (Xoff+Pgmargin+2*Elwidth+Elhmargin)+'px');
  $('.GN_lft').css('left', (Xoff)+'px');
  $('.GN_lt').css('top', (Yoff+Pgmargin+Elvmargin)+'px');
  $('.GN_lc').css('top', (Yoff+Pgmargin+Elheight+Elvmargin)+'px');
  $('.GN_lb').css('top', (Yoff+Pgmargin+2*Elheight+Elvmargin)+'px');
  $('.GN_rgt').css('left', (Xoff+Wwidth-Shortside)+'px');
  $('.GN_rt').css('top', (Yoff+Pgmargin+Elvmargin)+'px');
  $('.GN_rc').css('top', (Yoff+Pgmargin+Elheight+Elvmargin)+'px');
  $('.GN_rb').css('top', (Yoff+Pgmargin+2*Elheight+Elvmargin)+'px');
  $('.GN_btm').css('top', (Yoff+Wheight-Shortside)+'px');
  $('.GN_bl').css('left', (Xoff+Pgmargin+Elhmargin)+'px');
  $('.GN_bc').css('left', (Xoff+Pgmargin+Elwidth+Elhmargin)+'px');
  $('.GN_br').css('left', (Xoff+Pgmargin+2*Elwidth+Elhmargin)+'px');  
}

function addHoverEvent(aGN)
{
  var btnClass = 'GN_'+aGN;
  var btnSelector = '.'+btnClass;
  var btnClassH = 'GN_'+aGN+'_h';
  $(btnSelector).hover
  (
    function() { $(this).animate({ opacity : 0.8 }, 700); $(this).removeClass(btnClass).addClass(btnClassH); },
    function() { $(this).removeClass(btnClassH).addClass(btnClass); $('.GN_btn').animate({opacity : 0.4 }, 200); }
  );
}

function GN_addHoverEvents()
{
  addHoverEvent('tl'); 
  addHoverEvent('tc');
  addHoverEvent('tr');
  addHoverEvent('lt');
  addHoverEvent('lc');
  addHoverEvent('lb');
  addHoverEvent('rt');
  addHoverEvent('rc');
  addHoverEvent('rb');
  addHoverEvent('bl');
  addHoverEvent('bc');
  addHoverEvent('br');
}
