jQuery.fn.center = function () {
    this.css("position","absolute");
    //this.css("top", ( $(window).height() - this.height() ) / 2+$(window).scrollTop() + "px");
    this.css("left", ( $(window).width() - this.width() ) / 2+$(window).scrollLeft() + "px");
    return this;
}

jQuery.fn.gapFromCenter = function (gap) {
    this.css("position","absolute");
	var pos =       ($(window).width() - this.width() ) / (2+$(window).scrollLeft())   +gap ;
    this.css("left", pos + "px");
    return this;
}

jQuery.fn.shift = function () {
    this.css("position","absolute");
    //this.css("top", ( $(window).height() - this.height() ) / 2+$(window).scrollTop() + "px");
     
	this.css("left",   -(this.offset().left  +$(window).scrollLeft()) + "px");
    this.css("width",    $(window).width()  +$(window).scrollLeft() + "px");
	 
    return this;
}
