/**
 * @Author Xavier Arnaudin <xavier@9medias.com>
 * @version 1.0
 * @since 1.0
 * 
 */

/* Pour eviter les conflis jquery */
var $jquer = jQuery.noConflict();

$jquer(document).ready( function () 
{
	/* pour le login slide */
	$jquer('#loginNavHome #showLogin').click( function ()
	{
		$jquer(this).parent().addClass('hide');
		$jquer(this).parent().slideUp('fast', function ()
			{
			$jquer('#loginFormHome').slideDown('slow');
			}
		);
	});
	
	/* pour le login slide */
	$jquer('#loginFormHome #closeLogin').click(function()
	{
		$jquer(this).parent().addClass('hide');
		$jquer(this).parent().slideUp('fast', function ()
			{
			$jquer('#loginNavHome').slideDown('slow');
			}
		);
	});
	
	/* pour les popup */
	$jquer("a[rel^='modalBoxNotBind']").prettyPopin(
	{
		width:480, 
		loader_path: '/images/prettyPopin/loader.gif',
		bindFormAjax: false,
		opacity: 0.2
	});
	
	/* pour les popup */
	$jquer("a[rel^='modalBoxNotBind2']").prettyPopin(
	{
		width:800,
		height: 600,
		loader_path: '/images/prettyPopin/loader.gif',
		bindFormAjax: false,
		followScroll: true,
		opacity: 0.2
	});
	
	
	/* popup lightbox */
	$jquer("a[rel^='prettyPhoto']").prettyPhoto({
		animationSpeed: 'normal', /* fast/slow/normal */
		padding: 40, /* padding for each side of the picture */
		opacity: 0.35, /* Value betwee 0 and 1 */
		showTitle: true, /* true/false */
		allowresize: true, /* true/false */
		counter_separator_label: '/', /* The separator for the gallery counter 1 "of" 2 */
		theme: 'light_rounded', /* light_rounded / dark_rounded / light_square / dark_square */
		callback: function(){}
	});

	
	$jquer('.post_message, .thread_name').addClass('inactive');
	$jquer('.post_message, .thread_name').hover(
			function() { $jquer(this).removeClass('inactive')} ,
			function() { $jquer(this).addClass('inactive')}
	);
	
});