$(function(){
 
    var tabContainers = $('div.tab > div'); 
    tabContainers.hide().filter(':first').show();

    $('ul.tabs a').click(function () {
          tabContainers.hide(); 
          tabContainers.filter(this.hash).fadeIn();
          $('ul.tabs a').removeClass('selected'); 
          $(this).addClass('selected');
            return false;
    }).filter(':first').click();
    
    
    if ($('ul.menu a[href$="http://beltelecabel.by/products"]').hasClass('selected')){
        $('ul.tabs a').eq(2).click();
    }
	
	
	if($('ul.menu a[href$="http://beltelecabel.by/en/products"]').hasClass('selected'))
	{
		 $('ul.tabs a').eq(1).click();
	}
	
	if($('ul.menu a[href$="http://www.beltelecabel.by/en/products"]').hasClass('selected'))
	{
		 $('ul.tabs a').eq(1).click();
	}
	
	if ($('ul.menu a[href$="http://www.beltelecabel.by/products"]').hasClass('selected')){
        $('ul.tabs a').eq(2).click();
    }



    $('ul.news li:last').addClass("last");
    
    
   // invName = $('#invName').text();
   // $('.hm-block h1').text(invName);
    
   $('.cat-cart a').lightBox({
       fixedNavigation:true
   }); 
   
   /**
   $('.certificate a').lightBox({
       fixedNavigation:true
   }); 
   **/
   
   
   $('#carousel a').lightBox({
       fixedNavigation:true
   }); 
        
    
   $("#carousel").CloudCarousel(        
        {   xPos: 165,
            yPos: 12,         
            buttonLeft: $(".next"),
            buttonRight: $(".prev"),
            altBox: $("#alt-text"),
            titleBox: $("#title-text")
        }
    );
 
    
    
    
    
    
    
    
});
