$(document).ready(function() {



	/* Cantos arendodados PRODUCAO */
	
	$('img.rounded8').one('load',function () {
		var img = $(this);
		var img_width = img.width();
		var img_height = img.height();
		
		// build wrapper
		var wrapper = $('<div class="rounded_wrapper8"></div>');
		wrapper.width(img_width);
		wrapper.height(img_height);
		
		// move CSS properties from img to wrapper
		wrapper.css('float', img.css('float'));
		img.css('float', 'none')
		
		wrapper.css('margin-right', img.css('margin-right'));
		img.css('margin-right', '0')
	
		wrapper.css('margin-left', img.css('margin-left'));
		img.css('margin-left', '0')
	
		wrapper.css('margin-bottom', img.css('margin-bottom'));
		img.css('margin-bottom', '0')
	
		wrapper.css('margin-top', img.css('margin-top'));
		img.css('margin-top', '0')
	
		wrapper.css('display', 'block');
		img.css('display', 'block')
	
		// IE6 fix (when image height or width is odd)
		if ($.browser.msie && $.browser.version == '6.0')
		{
			if(img_width % 2 != 0)
			{
				wrapper.addClass('ie6_width')
			}
			if(img_height % 2 != 0)
			{
				wrapper.addClass('ie6_height')			
			}
		}
	
		// wrap image
		img.wrap(wrapper);
		
		// add rounded corners
		img.after('<div class="tl_8"></div>');
		img.after('<div class="tr_8"></div>');
		img.after('<div class="bl_8"></div>');
		img.after('<div class="br_8"></div>');
	}).each(function(){
		if(this.complete) $(this).trigger("load");
	});
	

	/* Cantos arendodados AGENDA */
	
	$('img.rounded7').one('load',function () {
		var img = $(this);
		var img_width = img.width();
		var img_height = img.height();
		
		// build wrapper
		var wrapper = $('<div class="rounded_wrapper7"></div>');
		wrapper.width(img_width);
		wrapper.height(img_height);
		
		// move CSS properties from img to wrapper
		wrapper.css('float', img.css('float'));
		img.css('float', 'none')
		
		wrapper.css('margin-right', img.css('margin-right'));
		img.css('margin-right', '0')
	
		wrapper.css('margin-left', img.css('margin-left'));
		img.css('margin-left', '0')
	
		wrapper.css('margin-bottom', img.css('margin-bottom'));
		img.css('margin-bottom', '0')
	
		wrapper.css('margin-top', img.css('margin-top'));
		img.css('margin-top', '0')
	
		wrapper.css('display', 'block');
		img.css('display', 'block')
	
		// IE6 fix (when image height or width is odd)
		if ($.browser.msie && $.browser.version == '6.0')
		{
			if(img_width % 2 != 0)
			{
				wrapper.addClass('ie6_width')
			}
			if(img_height % 2 != 0)
			{
				wrapper.addClass('ie6_height')			
			}
		}
	
		// wrap image
		img.wrap(wrapper);
		
		// add rounded corners
		img.after('<div class="tl_7"></div>');
		img.after('<div class="tr_7"></div>');
		img.after('<div class="bl_7"></div>');
		img.after('<div class="br_7"></div>');
	}).each(function(){
		if(this.complete) $(this).trigger("load");
	});










	/* DEFINIÇÃ DE AREDONDAMENTO ESTE PARA CLASS rounded */
	
	$('img.rounded6').one('load',function () {
		var img = $(this);
		var img_width = img.width();
		var img_height = img.height();
		
		// build wrapper
		var wrapper = $('<div class="rounded_wrapper6"></div>');
		wrapper.width(img_width);
		wrapper.height(img_height);
		
		// move CSS properties from img to wrapper
		wrapper.css('float', img.css('float'));
		img.css('float', 'none')
		
		wrapper.css('margin-right', img.css('margin-right'));
		img.css('margin-right', '0')
	
		wrapper.css('margin-left', img.css('margin-left'));
		img.css('margin-left', '0')
	
		wrapper.css('margin-bottom', img.css('margin-bottom'));
		img.css('margin-bottom', '0')
	
		wrapper.css('margin-top', img.css('margin-top'));
		img.css('margin-top', '0')
	
		wrapper.css('display', 'block');
		img.css('display', 'block')
	
		// IE6 fix (when image height or width is odd)
		if ($.browser.msie && $.browser.version == '6.0')
		{
			if(img_width % 2 != 0)
			{
				wrapper.addClass('ie6_width')
			}
			if(img_height % 2 != 0)
			{
				wrapper.addClass('ie6_height')			
			}
		}
	
		// wrap image
		img.wrap(wrapper);
		
		// add rounded corners
		img.after('<div class="tl_6"></div>');
		img.after('<div class="tr_6"></div>');
		img.after('<div class="bl_6"></div>');
		img.after('<div class="br_6"></div>');
	}).each(function(){
		if(this.complete) $(this).trigger("load");
	});


	/* DEFINIÇÃ DE AREDONDAMENTO ESTE PARA CLASS rounded */
	
	$('img.rounded5').one('load',function () {
		var img = $(this);
		var img_width = img.width();
		var img_height = img.height();
		
		// build wrapper
		var wrapper = $('<div class="rounded_wrapper5"></div>');
		wrapper.width(img_width);
		wrapper.height(img_height);
		
		// move CSS properties from img to wrapper
		wrapper.css('float', img.css('float'));
		img.css('float', 'none')
		
		wrapper.css('margin-right', img.css('margin-right'));
		img.css('margin-right', '0')
	
		wrapper.css('margin-left', img.css('margin-left'));
		img.css('margin-left', '0')
	
		wrapper.css('margin-bottom', img.css('margin-bottom'));
		img.css('margin-bottom', '0')
	
		wrapper.css('margin-top', img.css('margin-top'));
		img.css('margin-top', '0')
	
		wrapper.css('display', 'block');
		img.css('display', 'block')
	
		// IE6 fix (when image height or width is odd)
		if ($.browser.msie && $.browser.version == '6.0')
		{
			if(img_width % 2 != 0)
			{
				wrapper.addClass('ie6_width')
			}
			if(img_height % 2 != 0)
			{
				wrapper.addClass('ie6_height')			
			}
		}
	
		// wrap image
		img.wrap(wrapper);
		
		// add rounded corners
		img.after('<div class="tl_5"></div>');
		img.after('<div class="tr_5"></div>');
		img.after('<div class="bl_5"></div>');
		img.after('<div class="br_5"></div>');
	}).each(function(){
		if(this.complete) $(this).trigger("load");
	});




	
	/* DEFINIÇÃ DE AREDONDAMENTO ESTE PARA CLASS rounded */
	
	$('img.rounded').one('load',function () {
		var img = $(this);
		var img_width = img.width();
		var img_height = img.height();
		
		// build wrapper
		var wrapper = $('<div class="rounded_wrapper"></div>');
		wrapper.width(img_width);
		wrapper.height(img_height);
		
		// move CSS properties from img to wrapper
		wrapper.css('float', img.css('float'));
		img.css('float', 'none')
		
		wrapper.css('margin-right', img.css('margin-right'));
		img.css('margin-right', '0')
	
		wrapper.css('margin-left', img.css('margin-left'));
		img.css('margin-left', '0')
	
		wrapper.css('margin-bottom', img.css('margin-bottom'));
		img.css('margin-bottom', '0')
	
		wrapper.css('margin-top', img.css('margin-top'));
		img.css('margin-top', '0')
	
		wrapper.css('display', 'block');
		img.css('display', 'block')
	
		// IE6 fix (when image height or width is odd)
		if ($.browser.msie && $.browser.version == '6.0')
		{
			if(img_width % 2 != 0)
			{
				wrapper.addClass('ie6_width')
			}
			if(img_height % 2 != 0)
			{
				wrapper.addClass('ie6_height')			
			}
		}
	
		// wrap image
		img.wrap(wrapper);
		
		// add rounded corners
		img.after('<div class="tl"></div>');
		img.after('<div class="tr"></div>');
		img.after('<div class="bl"></div>');
		img.after('<div class="br"></div>');
	}).each(function(){
		if(this.complete) $(this).trigger("load");
	});


	/* DEFINIÇÃ DE AREDONDAMENTO ESTE PARA CLASS rounded4 SLIDE  */
	
	$('img.rounded4').one('load',function () {
		var img = $(this);
		var img_width = img.width();
		var img_height = img.height();
		
		// build wrapper
		var wrapper = $('<div class="rounded_wrapper4"></div>');
		wrapper.width(img_width);
		wrapper.height(img_height);
		
		// move CSS properties from img to wrapper
		wrapper.css('float', img.css('float'));
		img.css('float', 'none')
		
		wrapper.css('margin-right', img.css('margin-right'));
		img.css('margin-right', '0')
	
		wrapper.css('margin-left', img.css('margin-left'));
		img.css('margin-left', '0')
	
		wrapper.css('margin-bottom', img.css('margin-bottom'));
		img.css('margin-bottom', '0')
	
		wrapper.css('margin-top', img.css('margin-top'));
		img.css('margin-top', '0')
	
		wrapper.css('display', 'block');
		img.css('display', 'block')
	
		// IE6 fix (when image height or width is odd)
		if ($.browser.msie && $.browser.version == '6.0')
		{
			if(img_width % 2 != 0)
			{
				wrapper.addClass('ie6_width')
			}
			if(img_height % 2 != 0)
			{
				wrapper.addClass('ie6_height')			
			}
		}
	
		// wrap image
		img.wrap(wrapper);
		
		// add rounded corners
		img.after('<div class="tl_4"></div>');
		img.after('<div class="tr_4"></div>');
		img.after('<div class="bl_4"></div>');
		img.after('<div class="br_4"></div>');
	}).each(function(){
		if(this.complete) $(this).trigger("load");
	});
	

	/* DEFINIÇÃ DE AREDONDAMENTO ESTE PARA OUTRA CLASS */

	$('img.rounded2').one('load',function () {
		var img = $(this);
		var img_width = img.width();
		var img_height = img.height();
		
		// build wrapper
		var wrapper = $('<div class="rounded_wrapper2"></div>');
		wrapper.width(img_width);
		wrapper.height(img_height);
		
		// move CSS properties from img to wrapper
		wrapper.css('float', img.css('float'));
		img.css('float', 'none')
		
		wrapper.css('margin-right', img.css('margin-right'));
		img.css('margin-right', '0')
	
		wrapper.css('margin-left', img.css('margin-left'));
		img.css('margin-left', '0')
	
		wrapper.css('margin-bottom', img.css('margin-bottom'));
		img.css('margin-bottom', '0')
	
		wrapper.css('margin-top', img.css('margin-top'));
		img.css('margin-top', '0')
	
		wrapper.css('display', 'block');
		img.css('display', 'block')
	
		// IE6 fix (when image height or width is odd)
		if ($.browser.msie && $.browser.version == '6.0')
		{
			if(img_width % 2 != 0)
			{
				wrapper.addClass('ie6_width')
			}
			if(img_height % 2 != 0)
			{
				wrapper.addClass('ie6_height')			
			}
		}
	
		// wrap image
		img.wrap(wrapper);
		
		// add rounded corners
		img.after('<div class="tl_2"></div>');
		img.after('<div class="tr_2"></div>');
		img.after('<div class="bl_2"></div>');
		img.after('<div class="br_2"></div>');
	}).each(function(){
		if(this.complete) $(this).trigger("load");
	});


	/* DEFINIÇÃ DE AREDONDAMENTO ESTE PARA OUTRA CLASS */

	$('img.rounded3').one('load',function () {
		var img = $(this);
		var img_width = img.width();
		var img_height = img.height();
		
		// build wrapper
		var wrapper = $('<div class="rounded_wrapper3"></div>');
		wrapper.width(img_width);
		wrapper.height(img_height);
		
		// move CSS properties from img to wrapper
		wrapper.css('float', img.css('float'));
		img.css('float', 'none')
		
		wrapper.css('margin-right', img.css('margin-right'));
		img.css('margin-right', '0')
	
		wrapper.css('margin-left', img.css('margin-left'));
		img.css('margin-left', '0')
	
		wrapper.css('margin-bottom', img.css('margin-bottom'));
		img.css('margin-bottom', '0')
	
		wrapper.css('margin-top', img.css('margin-top'));
		img.css('margin-top', '0')
	
		wrapper.css('display', 'block');
		img.css('display', 'block')
	
		// IE6 fix (when image height or width is odd)
		if ($.browser.msie && $.browser.version == '6.0')
		{
			if(img_width % 2 != 0)
			{
				wrapper.addClass('ie6_width')
			}
			if(img_height % 2 != 0)
			{
				wrapper.addClass('ie6_height')			
			}
		}
	
		// wrap image
		img.wrap(wrapper);
		
		// add rounded corners
		img.after('<div class="tl_3"></div>');
		img.after('<div class="tr_3"></div>');
		img.after('<div class="bl_3"></div>');
		img.after('<div class="br_3"></div>');
	}).each(function(){
		if(this.complete) $(this).trigger("load");
	});

		
});

