var $a = jQuery.noConflict();
$a(document).ready(function(){
	$a('div.colors-color').click(function() {
		var attrId = $a(this).attr('attrId');
		var oId = $a(this).attr('oId');
		var exists = $a('div#txtmsg_uc_color_attribute').html();
		var title = $a(this).attr('title');

		$a('#edit-attributes-'+attrId).val(oId);

		if(exists){
			$a('div#txtmsg_uc_color_attribute').html('<strong>Cor selecionada:</strong> '+title);
		}else{
			$a('div#colors-background').before('<div id="txtmsg_uc_color_attribute"><strong>Cor selecionada:</strong> '+title+'</div>');
		}  
	});
    $a("div.colors-color").mouseover(
        function () {
          $a(this).css('border', '1px solid #000');
          $a(this).css('padding', '0px');
        }
    );
    $a("div.colors-color").mouseout(
        function () {
          $a(this).css('border', '1px solid #808080');
          $a(this).css('padding', '0px');
        }
    );
});
