jQuery.fn.centering = function () {
    return this.each(function () {
        var offset = jQuery(this).offset(),
            w = jQuery(this).width(),
            h = jQuery(this).height();
						
				 if(jQuery.browser.msie)
	       {
	   	     vers=parseInt(jQuery.browser.version);
		       if (vers==6)
					 {
					   jQuery(this).css({
                'position': 'absolute',
                'width': w,
                'height': h,
                'top': parseInt(jQuery(window).scrollTop()+
                         (jQuery('#content').height() - h- offset.top) / 2, 10)-120,
                'left': parseInt(jQuery(window).scrollLeft() +
                         (jQuery(window).width()-w) / 2, 10)- offset.left
            });
					}
		    	 else
  				 {
            jQuery(this).css({
                'position': 'absolute',
                'width': w,
                'height': h,
                'top': parseInt(jQuery(window).scrollTop()+
                         (jQuery(window).height() - h) / 2, 10)-50,
                'left': parseInt(jQuery(window).scrollLeft() +
                         (jQuery(window).width() - w) / 2, 10)
            });
  				}
				}
    });
};
