/* Validation envoyer à un ami dans la meme popin */
$(document).ready(function() {
	$("#tipafriendform").submit(function() {  s = $(this).serialize(); 
		$.ajax({ 
			type: "GET", 
			data: s, 
			url: $(this).attr("action"), 
			success: function(retour){ 
				$(".popin-content").empty().append(retour);
			}
		}); 
		return false; 
	});
    if($(".editorial").size()>0) {
		$(".popin-close").click(function(){
			PPNclose();
			return false
		});
	}
});
$(document).ready(function() {
	$("#tx_kleebrochure_pi1_form").submit(function() {  s = $(this).serialize(); 
		$.ajax({ 
			type: "GET", 
			data: s, 
			url: $(this).attr("action"), 
			success: function(retour){ 
				$(".popin-content").empty().append(retour);
			}
		}); 
		return false; 
	});
	
	if($(".editorial").size()>0) {
		$(".popin-close").click(function(){
			PPNclose();
			return false
		});
	}
});

$(document).ready(function() {
	
    $("#ratingformationform").submit(function() {  s = $(this).serialize(); 
		$.ajax({ 
			type: "POST", 
			data: s, 
			url: $(this).attr("action"), 
			success: function(retour){ 
				$(".popin-content").empty().append(retour);
			}
		}); 
		return false; 
	});
	if($(".tx-kleeratingformation-main").size()>0) {
		$(".popin-close").click(function(){
			PPNclose();
			return false
		});
	}
});

$(document).ready(function() {
	$("#tx_kleedocumentation_pi1_form").submit(function() {  s = $(this).serialize();
		$.ajax({ 
			type: "GET",
			data: s,
			url: $(this).attr("action"),
			success: function(retour){
				$(".popin-content").empty().append(retour);
			}
		});
		return false;
	});
	
	if($(".editorial").size()>0) {
		$(".popin-close").click(function(){
			PPNclose();
			return false
		});
	}
});

function PPNclose(){
	$("html").unbind("keydown");
	$(".popin").fadeOut("slow",function(){$(".popin-voile").animate({opacity:0,height:0},function(){if(ie6==true){$("html, body").css("height","auto");$("html, body").css("overflow","auto");$("html, body").css("overflow-x","hidden");$("body").css("top",0);window.scrollTo(0,(PPNhtmlScroll))}else{$("html, body").css("overflow","auto")}$(".popin, .popin-voile").remove();})})
	}
