Finaly found a solution!!!
My jQuery script now looks like this:
$doc = JFactory::getDocument();
$doc->addScript('
ajax.googleapis.com/ajax/libs/jquery/1.4.3/jquery.min.js');
$js = 'jQuery.noConflict();
window.addEvent("domready", function() {
jQuery("#kategorija").css("visibility","hidden");
jQuery("#visosKategorijos ").change(function() {
jQuery("#kategorija").val(jQuery("#visosKategorijos option:selected").val());
});
})
';
$doc->addScriptDeclaration($js);
I added:
jQuery.noConflict();
and used jQuery instead of $
I'm not sure if i have to everytime include $doc->addScript('
ajax.googleapis.com/ajax/libs/jquery/1.4.3/jquery.min.js'); but i have tried in 3 components in the same joomla and it works.
Please try it for now until this case with be solved correctly.
Regards