$('document').ready(function(){
	
	if($('.roundcorner').length){
	
		$('.roundcorner').each(function(){
		
			$(this).before('<div class="roundcorner-top"></div>');
			$(this).after('<div class="roundcorner-bottom"></div>');
			
		});
		
		$('.roundcorner').css({
			'background':'url(/images/roundcorner_body.png) repeat-y',
			'padding':'10px 30px',
			'width':'620px',
			'border':'none',
			'margin':'0 0 0 0'
		});
		
		
	}
	
	if($('.roundcorner-three').length){
	
		$('.roundcorner-three').each(function(){
			$(this).before('<div class="roundcorner-three-top"></div>');
			$(this).after('<div class="roundcorner-three-bottom"></div>');
		});
		
		$('.roundcorner-three').css({
			'background':'url(/images/roundcorner-three_body.png) repeat-y 50%',
			'width':'680px'
		});
		
		$('.roundcorner-three-top').css({
			'height' : '10px',
			'overflow':'hidden',
			'background':'url(/images/roundcorner-three_tb.png) no-repeat 50% 0',
			'width':'680px'
		});
		
		$('.roundcorner-three-bottom').css({
			'height' : '10px',
			'overflow':'hidden',
			'background':'url(/images/roundcorner-three_tb.png) no-repeat 50% -10px',
			'margin' : '0 0 10px 0',
			'width':'680px'
		});
		
		
	}
	
	if($('.roundcorner-two').length){
	
		$('.roundcorner-two').each(function(){
			$(this).before('<div class="roundcorner-two-top"></div>');
			$(this).after('<div class="roundcorner-two-bottom"></div>');
		});
		
		$('.roundcorner-two').css({
			'background':'url(/images/roundcorner-two_body.png) repeat-y 50%'
		});
		
		$('.roundcorner-two-top').css({
			'height' : '10px',
			'overflow':'hidden',
			'background':'url(/images/roundcorner-two_tb.png) no-repeat 50% 0'
		});
		
		$('.roundcorner-two-bottom').css({
			'height' : '10px',
			'overflow':'hidden',
			'background':'url(/images/roundcorner-two_tb.png) no-repeat 50% -10px',
			'margin' : '0 0 10px 0'
		});
		
		
	}
	
	if( $.browser.msie && $.browser.version.split('.')[0] <= 7){
		
	}else{
	
		$('.btn').each(function(){
			var b = $(this);
			var tt = b.text() || b.val();
			if ($(':submit,:button',this)) {
				b = $('<a>').insertAfter(this).addClass(this.className).attr('id',this.id).click(function(){ $(this).parent('form').submit(); });
				$(this).remove();
			}
			b.text('').css({cursor:'pointer'}).prepend('<i></i>').append($('<span>').
			text(tt).append('<i></i><span></span>'));
		});
	}
});
	
