jQuery.fn.center = function () {
this.css("position","absolute");
this.css("top", (($(window).height() - this.outerHeight()) / 2) +
$(window).scrollTop() + "px");
this.css("left", (($(window).width() - this.outerWidth()) / 2) +
$(window).scrollLeft() + "px");
return this;
}
function montre() {
$('#popupNews , #popupNews_content').show();
$('#popupNews_content').center();
$('#popupNews, #popupNews_close').click(function() {
$('#popupNews , .popupNews_content').fadeOut(function() {
$('#popupNews , #popupNews_content').hide();
});
return false;
});
}
/*
$(document).ready(function() {
$('#popupNews , #popupNews_content').show();
$('#popupNews_content').center();
$('#popupNews, #popupNews_close').click(function() {
$('#popupNews , .popupNews_content').fadeOut(function() {
$('#popupNews , #popupNews_content').hide();
});
return false;
});
});
*/