{literal}
<script type="text/javascript">
/* <![CDATA[ */
function WriteImg(obj, count, resize){
	count = count%3;
	if (count == 0) count = 3;
    if(resize){
        $(obj).after("<label for='" + obj.attr('id') + "'><img title=\"{/literal}{$lang.alt.dont}{literal}\" alt=\"{/literal}{$lang.alt.dont}{literal}\" src='{/literal}{$site_root}{$index_theme_path}{$index_theme_images_path}{literal}/int_"+count+".png'><\/label><br>");
    }
    else{
        $(obj).after("&nbsp;<label for='" + obj.attr('id') + "'><img title=\"{/literal}{$lang.alt.dont}{literal}\" alt=\"{/literal}{$lang.alt.dont}{literal}\" src='{/literal}{$site_root}{$index_theme_path}{$index_theme_images_path}{literal}/int_"+count+".png'><\/label>&nbsp; ");
    }
}

$(document).ready(function(){
	var count = 0;
	if(typeof(resize) == "undefined")
		resize = 0;


	$('div[cat=interests]').find('input').each(function(){
		count++;
		count = count%3;
		if (count == 0) count = 3;
		$(this).attr('id', $(this).attr('name')+count);
		WriteImg($(this),count, resize);
	});


	count = 0;
	$('div[cat=partner_interests]').find('input').each(function(){
		count++;
		count = count%3;
        if (count == 0) count = 3;
		$(this).attr('id', $(this).attr('name'));
		WriteImg($(this),count, resize);
	});

	var name;
	$('.div_name_for_lang[cat="custom"]').find('select').each(function(){
		if(!$(this).attr('multiply')){
			name = $(this).attr('name');
			if(name.substr(name.length-2, name.length) != '[]'){
				$(this).attr('name', name + '[]');
			}
		}
	});
	$('.div_name_for_lang[cat="custom"]').find('input[type="radio"]').each(function(){
		name = $(this).attr('name');
		if(name.substr(name.length-2, name.length) != '[]'){
			$(this).attr('name', name + '[]');
		}
	});
		
	
});
 /* ]]> */
</script>
{/literal}