/**
 * Fichier : jeux.js
 * Description : fonctions JS spécifiques aux jeux
 * Auteur : Hamza Iqbal - hiqbal[at]actualys.com
 * Copyright: Actualys
 ******************************************/

/**
 * Initialisation
 ******************************************/
$(document).ready( function()
{
	if($('#liste_jeux_full') && !$('#liste_jeux_full').hasClass('jeux_big')) rolloverJeux();

        if($('#liste_jeux_full') && $('#liste_jeux_full').hasClass('jeux_big')) rolloverJeuxBig();
});

/**
 * Rollover jeux
 ******************************************/
var rolloverJeux = function()
{
	var jeux = $('#liste_jeux_full .jeu');

	var largeur_init = jeux.css("width");
	var top_init = jeux.css("top");

	var largeur_fin = "272px";
	var top_fin = "15px";

	jeux.hover
	(
		function () { $(this).animate({ width: largeur_fin, top : top_fin }, 300 ); },
		function () { $(this).animate({ width: largeur_init, top : top_init }, 300 ); }
	);
}

var rolloverJeuxBig = function()
{
	var jeux = $('#liste_jeux_full .jeu');

	var largeur_init = jeux.css("width");
	var top_init = jeux.css("top");

	var largeur_fin = "400px";
	var top_fin = "18px";

	jeux.hover
	(
		function () { $(this).animate({ width: largeur_fin, top : top_fin }, 300 ); },
		function () { $(this).animate({ width: largeur_init, top : top_init }, 300 ); }
	);
}