$(document).ready(function() {
						   
	/*pop up pour afficher la facture*/
	if ($("a[id^='demovid']").length) {
		$("a[id^='demovid']").bind('click', function() {
			var ID = $(this).attr('href');
			
			options = "Width=1200,Height=400,menubar=no,toolbar=no" ;
    		window.open( ID, "demovid", options ) ;	
    		return false;
		})
	}						   
	
if($(".fancy").length){
	$(".fancy").fancybox({overlayOpacity: 0.1, frameWidth: 1000, frameHeight: 285});}
						   
	$.easy.rotate({
	'selector' : '.rotate',
	'pause' : '20000'
	});//for easy front-end	
	
	
		$.easy.rotate({
	'selector' : '.rotate2',
	'pause' : '5000'
	});//for easy front-end					   
	
	for($i=0;$i<100;$i++){
		$(".temporary").animate({opacity:0}, 1000);
		$(".temporary").animate({opacity:1}, 1000);}
	
  						   	
	/*var flashvars = {};
	var params = {};
	var attributes = {};
	
	swfobject.embedSWF("index.swf", "catalogue", "963", "755", "9.0.0","expressInstall.swf", flashvars, params, attributes);

	$("a.newsletter").fancybox(
		{
			overlayShow:true, 
			overlayOpacity:0.65, 
			zoomOpacity:true, 
			frameWidth:450, 
			frameHeight:570,
			callbackOnShow: function() {
				$('#placeholder').hide();
			},
			callbackOnClose: function() {
				$('#placeholder').show();
			}
		}
	);	*/
	if ( $("#submenu").length ) {
		$("#submenu ul li").hover( function(e) {
			//$("#submenu ul.selected").removeClass("selected").css({display:'none'});
			//$(".arrow").css({display:'none'});
		});
	}
	
	
	if ( $.support.opacity ) 
		$(".opacity").css('opacity', 0.67).hover(
					function () {
						$(this).fadeTo('fast', 1.0);
					}, 
					function () {
						$(this).fadeTo('fast', 0.67);
					}
				);
		
	$("input[title]").each(function(e) {
		if ( $(this).val() == '') {
			$(this).val( $(this).attr('title')  );
		}
	});
	
	$("input[title]").bind('focus', function(e) {
		if ( $(this).val() == $(this).attr('title') ) 	{
			$(this).val('');
		}
	});
	
	
	$("input[title]").bind('blur', function(e) {
		if ( $(this).val() == '' ) 	{
			$(this).val( $(this).attr('title')  );
		}
	});
	
	$("form.rel").bind('submit', function() {
		var ID = $(this).attr('id');
		
		$("#" + ID + " input[title]").each( function(e) {
			if ( $(this).val() == $(this).attr('title') ) 
				$(this).val('');
		});
	});
	
	$(".temporary").animate({opacity:0}, 10000);
});
