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

jQuery.fn.hide_show = function()
	{
		if (this.css("display") == 'none'){
			this.show();
		} else {
			this.hide();
		}
		return this;
	}

jQuery.fn.site_size = function(id,width_max,id_left,id_right,id_center){
		var w = $(window);
		if (w.width() > this.width()){
			if (w.width() < width_max){
				this.css("width",w.width() + "px");
			} else {
				this.css("width",width_max + "px");
			}
			var site_left = $(id_left);
			var site_right = $(id_right);
			var site_center = $(id_center);
			
			site_center.css("width",this.width()-site_left.width()-site_right.width());
			
		}
		var site = this.find(id);
		if (site.height() < w.height()){
			site.css("height",w.height() + "px");
		}
		
		
	}
