/*
 * Require jQuery JavaScript Library v1.3.2+
 * http://jquery.com/
 *
 * Copyright © 2011 MBA Multimédia (www.mba-multimedia.com)
 * 
 *
 */
 
var overTimeOut = 30000;

$(function(){
	
	// RETOUR HAUT DE PAGE
	$('#btn-hdp a').attr('href','').click(function(){ $('html').stop().scrollTo(0,500); return false; });

	// MENU
	//$('#header .menuprim-ctn').css({ height:0, display:"block"});
	//$('#header .menuprim').hover(openMenu, closeMenu);
	
	// REFLECTION
	//$("img.reflect").reflect({/* Put custom options here */});
	
	// PARAGRAPHES
	if ($('.paragraphes').length) {
		$('.paragraphes').paragraphe();
	}
	
}); 

function openMenu (){
	$('#header .menuprim-ctn').stop().animate({height:137}, 200);
}
function closeMenu (){
	$('#header .menuprim-ctn').stop().animate({height:0}, 400);
}

function caseOver () {
	//$(this).animate({opacity:0, left:Math.round(Math.random()*1000-200), top:-200}, 300, caseOverEnd);
	//$(this).hide(300, caseOverEnd);
	$(this).animate({opacity:0}, 300, caseOverEnd);
}

function caseOverEnd () {
	var c = $(this);
	c.removeAttr('style').css({display:"none"});
	setTimeout (function(){c.show(400);},overTimeOut);
}

function cadreOn () {
	$(this).addClass("on");
}

function cadreOff () {
	$(this).removeClass("on");
}

function cadreFocus () {
	$(this).addClass("focus");
}

function cadreBlur () {
	$(this).removeClass("focus");
}

function blocClick () {
	window.open($(this).find('a').attr('href'), '_top');
}


