/**
http://stackoverflow.com/questions/210717/what-is-the-best-way-to-center-a-div-on-the-screen-using-jquery
**/
jQuery.fn.centerWindow = function(params) {

		var options = {

			vertical: true,
			horizontal: true,
			parent:null

		}
		op = jQuery.extend(options, params);

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

)};