jQuery.noConflict();
jQuery(document).ready(function(){

      //hover firmy
      jQuery('.contactMenuChild').live('mouseover', function() {
        jQuery(this).css('background','url(http://technolen.eu/themes/Common/img/currentBig.png) left center no-repeat');
      });
      jQuery('.contactMenuChild').live('mouseout', function() {
        jQuery(this).css('background','none');
      });
      //hover firmy

      //click
      jQuery('.contactMenuChild').live('click', function() {
        jQuery(this).addClass('activeLink');
        var elementId = jQuery(this).attr('id');
        var tempArray = elementId.split("-");
        elementId = tempArray[0];

        var elementTitle = '';
        for(i=1;i<tempArray.length;i++){
            elementTitle = elementTitle + tempArray[i] + '-';
        }
        if(elementTitle.indexOf('-',elementTitle.length - 1) > -1){
            elementTitle = elementTitle.substr(0,elementTitle.length - 1);
        }
        
        var root = jQuery('.activeMainMenu').attr('alt');
        currentLang = jQuery('.currentLang').attr('id');

        jQuery.ajax({
                type: "POST",
                url: "http://technolen.eu/index.php/"+currentLang+"/catalog/",
                data: "action=contact&lang="+currentLang+"&root="+root+"&title="+elementTitle+"&cat_id="+elementId+"&product_id=",
                success: function(data){
                        jQuery('#ajaxRenderWrapper').html(data);
                        if(jQuery('#contactMenuChildren').is(':visible')){
                                var minWidth = 200;
                                var tempWidth = jQuery('#contactMenuChildren').width();
                                jQuery('.contactMenuChild strong').each(function (){
                                    if(minWidth > tempWidth){
                                        tempWidth = minWidth - 10;
                                    }else{
                                        tempWidth = tempWidth;
                                    }
                                });
                                jQuery('#contactMenuChildren').css('width',tempWidth + 'px');
                                jQuery('#contactCurrentDetail').css('right',(30+tempWidth) + 'px');
                            }
                    },
                    error: function(xmlhttp, status, error){
                        alert(error);
                    },
                    beforeSend: function(){
                    },
                    complete: function(){
                    }
              });
      });
      //click




});

