

$(document).ready( function () {
	
	$(".bouton a").each(function() {
		$(this).parent().mouseover(function() {
			$(this).css("cursor", "pointer");
		});
		$(this).parent().mouseout(function() {
			$(this).css("cursor", "default");
		});
		
		var _href = $(this).attr("href");
		$(this).parent().click(function() {
			document.location.href=_href;
		});
		$(this).click(function() {
			document.location.href=_href;
			return false;
		})
		
	});

	$(".formSuite a").each(function() {
		
		var _frm = $(this).attr("href");
		if ($("#"+_frm).length == 0) {
			return;
		}
		$(this).click(function() {
			$("#"+_frm).submit();
			return false;
		});
	});

	$(".packs tr.ligne").mouseover(function() {
		$(this).css("cursor", "pointer");
		$(this).addClass("lOff");
	});
	$(".packs tr.ligne").mouseout(function() {
		$(this).css("cursor", "pointer");
		$(this).removeClass("lOff");
	});
	$(".packs tr.ligne").click(function() {
		var regex = /prod_([0-9]+)/;
		var regex_res = $(this).attr('class').match(regex);
		if (!regex_res) {
			return;
		}
		var prod_id = regex_res[1];
		$.fancybox({
	        'padding'       : 0,
	        'href'          : 'getProd.php?id=' + prod_id,
	       /* 'title'         : 'Lorem ipsum dolor sit amet', */
	        'transitionIn'  : 'elastic',
	        'transitionOut' : 'elastic'
	    });
	});
	

	
});



function trim(myString) 
{ 
	return myString.replace(/^\s+/g,'').replace(/\s+$/g,'') 
} 


