// ********** Chris horisontal resizer
// ********** Optimum-Web
(function($){
jQuery.fn.ch_rightbar = function(opt) {
	  return this.each(function() {        	
            new j_ch_rightbar_class(this, opt);
      });
}
var defaults = {	
	css_class:'',
	container:''
};
jQuery.ch_rightbar_class = function(el,opt){	
	this.options = jQuery.extend({}, defaults, opt || {});
	var self = this;
	jQuery(window).resize(function(){
		resizeAll();						   
	});	
	function resizeAll(){
		jQuery(self.options.css_class).each(function(){
								 
			var w = Math.round(($(window).width()-$(self.options.container).width())/2);
			var r = -w;
			jQuery(this).css({'right':r+'px','width':w+'px'});
		});
	}
	resizeAll();
}
var j_ch_rightbar_class = jQuery.ch_rightbar_class;
})(jQuery);

