$(function(){
	
		/* RollOver */
		$('.hover').hover(function(){
			$(this).css({ 'cursor':'pointer' }).addClass('current');
		},
		function(){
			$(this).removeClass('current');
		});
		$('div.hover').click(function(){
			var urlOffre = $('a.detail',this).attr('href');
			document.location.href=urlOffre;
		});
		
		/* Ombre sur les boutons */
		/*$('.aboPayant div.btn').each(function(){
			var btnText = $('strong',this).html();
			$('strong',this).after("<span>"+btnText+"</span>");
	
			var widthDiv = $('strong',this).width();
			var widthSpan = widthDiv;
			$('a',this).css({ 
				"width": (widthDiv)+"px"
			});
			$('span',this).css({
				"position":"absolute",
				"width": widthSpan+"px",
				"text-align":"center",
				"top":"-1px",
				"color":"#934d00",
				"font-weight":"bold",
				"z-index":"1"
			});
		});*/
	
	/* Adresse de facturation */
	$('#optinFacture').each(function(){
		if($('input[type=checkbox]').is(':checked')){
			var checked = true; 
			$('.facture').show();
		}
		else{
			var checked = false; 
			$('.facture').hide();
		}
		if($('input[type=checkbox]',this).checked==false){
			var checked = false; 
			$('.facture').hide();
		}
		$('input[type=checkbox]',this).click(function(){
			checked = !checked;
			if(checked==true){
				$('.facture').fadeIn();
			}
			else
				$('.facture').fadeOut();
		});
	});
	
	/* Bloc de même Hauteur */
	$('.heightBloc').each(function(){
		for(b=0;b<=$('.heightBloc').length;b++){
			var heightThis = $(this).height();
			var heightBig = "0";
			if(heightThis > heightBig){
				heightBig = heightThis+"px";
			}
			$('.heightBloc').css({
				'height':heightBig
			});
		}
	});
	
	$('input:radio').css({
		"background-color":"transparent",
		"width": "auto",
		"border":"0"
	});
	$('input:checkbox').css({
		"background-color":"transparent",
		"width": "auto",
		"border":"0"
	});
	
	// gestion des tooltips jquery
	$(function(){
		$('.tooltip').tooltip({
			track: true,
			delay: 0,
			showURL: false,
			showBody: " - ",
			fade: 250
		});
	});
});

function popupSizable(page, w, h){
	window.open(page, '', 'resizable=no, location=no, width='+w+', height='+h+', menubar=no, status=no, scrollbars=yes, menubar=no');
}

function popup(page){
	window.open(page, '', 'resizable=no, location=no, width=640, height=650, menubar=no, status=no, scrollbars=yes, menubar=no');
}

//$(document).ready(function(){
//	$('h1 strong, .rib h3, .cb h3, .detail, .choixDuree .detail, span.avantages, #cadeauOffre .cocarde, #cadeauOffre .cadeau').ifixpng();
//});
