	$(document).ready(function(){
		$('div.hd').each(function(){
			var width = $(this).parent().parent().outerWidth();
			width = eval(width-10);
			$(this).css('width',width);
		});
		$('div.ft').each(function(){
			var width = $(this).parent().parent().outerWidth();
			width = eval(width-10);
			$(this).css('width',width);
		});
		$('div.hd').each(function(){
			var width = $(this).parent().parent().outerWidth();
			width = eval(width-10);
			$(this).css('width',width);
		});
		$('div.corner_content div.bd div.c div.s').each(function(){
			var width = $(this).parent().parent().parent().parent().outerWidth();
			width = eval(width-20);
			$(this).css('width',width);
			$(this).css('paddingLeft',10);
			$(this).css('paddingRight',10);
		});
		$('div.s div').each(function(){
			$(this).css('marginRight','auto');
			$(this).css('marginLeft','auto');
		});
	});
	
	function format_wrapper(selector){
		$(selector+' div.hd').each(function(){
			var width = $(this).parent().parent().outerWidth();
			width = eval(width-10);
			$(this).css('width',width);
		});
		$(selector+' div.ft').each(function(){
			var width = $(this).parent().parent().outerWidth();
			width = eval(width-10);
			$(this).css('width',width);
		});
		$(selector+' div.hd').each(function(){
			var width = $(this).parent().parent().outerWidth();
			width = eval(width-10);
			$(this).css('width',width);
		});
		$(selector+' div.corner_content div.bd div.c div.s').each(function(){
			var width = $(this).parent().parent().parent().parent().outerWidth();
			width = eval(width-20);
			$(this).css('width',width);
			$(this).css('paddingLeft',10);
			$(this).css('paddingRight',10);
		});
		$(selector+' div.s div').each(function(){
			$(this).css('marginRight','auto');
			$(this).css('marginLeft','auto');
		});
	}
	
	function wrap_content(selector){
		$(selector).wrapInner('<div class="corner_content"><div class="hd"></div><div class="ct"></div><div class="bd"><div class="c"><div class="s"></div></div></div><div class="ft"></div><div class="cb"></div></div>');
		format_wrapper(selector);
	}
