// JavaScript Document
	 			
/*
	Website effects
*/
$(document).ready(function() {
	//Quick animation
	$('.showme').hide();//init
	$('.showme').show(350);
	
	$('.fademein').hide();//init
	$('.fademein').fadeIn('fast', function() {
	// Animation complete
	}); 
	
	$('.fademeout').fadeOut('fast', function() {
	// Animation complete.
	})
	
	$('.slidedown').slideDown('fast', function() {
	// Animation complete.
	});
	$('.slideup').slideUp('fast', function() {
	// Animation complete.
	});
});



/*
	Evenement s'affichant dans un delaie specifique
	
	$(".quicknotif").html('<b>Success!:</b> The picture was deleted.');
	_attachPopEvent("quicknotif", "greennotif"); //yellownotif,rednotif,greennotif
*/
function _attachPopEvent(it, style){
	
	$('.'+it).hide();
	$('.'+it).delay(5).fadeIn(50,function(event) {
		$(this).delay(2000).fadeOut(50); //hide
	});
	$('.'+it).attr('class', it+'  '+style);
}
$(document).ready(function(){
   $(".sessionnotif").delay(5).fadeIn(50,function(event) {
		$(this).delay(2000).fadeOut(50); //hide
	});
});


	
/*
	Sort table Jquery
*/
//http://jqueryui.com/demos/sortable/#event-change
//http://docs.jquery.com/UI/Sortable
//http://awesomeful.net/posts/47-sortable-lists-with-jquery-in-rails
//http://stackoverflow.com/questions/654535/jquery-what-to-do-with-the-list-that-sortableserialize-returns
$(document).ready(function() {
	
	//Defines the opacity of the helper while sorting. From 0.01 to 1
	
	/*$("#sortable").sortable({
		axis: 'y', 
		dropOnEmpty:false, 
		handle: '.handle', 
		cursor: 'crosshair',
		items: 'li',
		opacity: 0.4
		,scroll: true
	});*/
	
	/*$("#sortable").sortable({
		//This event is triggered when sortable is created.
		create: function(event, ui) { 
			//$(".quicknotif").html(' <b>create</b>').show();
		},
		//This event is triggered when sorting starts.
   		start: function(event, ui) {
			//$(".quicknotif").html(' <b>start</b>').show();
		},
		//This event is triggered during sorting.
   		sort: function(event, ui) {
			//$(".quicknotif").append(' <b>sort</b>').show();
		},
		//This event is triggered when sorting has stopped.
   		stop: function(event, ui) {
			//$(".quicknotif").append(' <b>stop</b>').show();
		},
		//This event is triggered when the user stopped sorting and the DOM position has changed.
   		update: function(event, ui) {
			//$(".quicknotif").append(' <b>update</b>').show();
		}
	});*/
	
});
			   

