$(document).ready(function() {

  // link per le classifiche homepage ed altri vari
  $('#score_combat_top_5_homepage').click(function () {
     
     location.href='/pages/site/classifica-combat.html';
     
});

$('#score_fde_top_5_homepage').click(function () {
     
     location.href='/pages/site/classifica-frammenti.html';
     
});

$('#freetoplay').click(function(){

location.href='/pages/site/game-server-disponibili.html';

});
  
  // gestione lingua
  
  var lingua = $.cookies.get('enua_culture');
  if(lingua == null)
  {
    $.cookies.set('enua_culture', "en");
  }
      $('.flag').click(function() {
      $.cookies.set('enua_culture', $(this).attr('id'));
      location.href="http://www.enuaonline.com/";
    });
    
  
  // gestione menu
  $('#goto_homepage').click(function() {$.cookies.del('nav_cookie');});
  $('.menu_site').each(function() {
    if($(this).attr('id') == $.cookies.get('nav_cookie')) 
    {
      $('#link_' + $(this).attr('id')).show();
    }
  });
  $('.menu_site').click(function() {
    $('.menu_site').each(function () { $('#link_' + $(this).attr('id')).hide(); });
	  $('#link_' + $(this).attr('id')).show();
    $.cookies.del('nav_cookie');
    $.cookies.set('nav_cookie', $(this).attr('id'));
  });
  
  // login dalla homepage
  /*
  $('#login_hp_1').focus(function() {
    if(jQuery.trim($(this).attr('value')) == 'username')
    {
      $(this).attr('value', '');
    }
  });
  $('#login_hp_2').focus(function() {
    if(jQuery.trim($(this).attr('value')) == 'password')
    {
      var newp = $(this).clone();
      newp.attr('type',  'password');
      newp.attr('value', '');
      newp.insertBefore($(this));
      $(this).remove();
    }
  });
  $('#login_hp_1').blur(function() {
    if(jQuery.trim($(this).attr('value')) == '')
    {
      $(this).attr('value', 'username');  
    }
  });
  $('#login_hp_2').blur(function() {
    if(jQuery.trim($(this).attr('value')) == '')
    {
      var newp = $(this).clone();
      newp.attr('type',  'text');
      newp.attr('value', 'password');
      newp.insertBefore($(this));
      $(this).remove(); 
    }
  });
  */
  $('#login_hp_3').click(function() {$('[name=login_homepage]').submit();});
  /* ---------- */
  
      check_client_browser = _utility_get_browser();
    $("[name=login_homepage]").submit(function() { return check_submit('login_homepage', true); });
    
  // gestione ballon degli elementi impostati come tali
  $("div[id^='ballon_']").each(function () { 
    $('#' + $(this).attr('id').replace('ballon_', '')).hover(
      function () {utility_ballon($(this));},
      function () { utility_ballon($(this), 'hide'); }
    );   
  });
  
  // screenshot
  try {$("a.zoom").fancybox();} catch(err) {}});

// render in 0.1215 seconds / memory: 0.95MB<!-- /pages/javascript -->