$(document).ready(function()
{	  
	$('#main-menu li:first-child.active .cor-b').css('background', 'white');
	$('#main-menu li.active+li').css('margin-left', '-9px')
	                            .css('position', 'relative');

  $('.logos img:first-child').css('border-left', 'none');
  $('.logos img:last-child').css('border-right', 'none');
  
  $('#search-box .int-text').focus(function(){$(this).val('');});
  
	$('.product-list li').hover(function(){$(this).css('border-color', '#ABABAB'); $('.img-box',this).css('border-color', '#ABABAB');}, function(){$(this).css('border-color', '#E3E3E3'); $('.img-box',this).css('border-color', '#E3E3E3'); });

	// Init pdBox
	$('.thickbox').pdBox({minWidth: 400});	
	
  // Tabs
	$('.contabs').tabs();
	
	$('.cat-list li').each(function(){ 
   var liH = this.offsetHeight;
   	$('.img-box', this).css('height', (liH) + 'px');
   	$('.img-box', this).each(function (){
       $(this).bind('load', function(){
        var imgH = $(this).height(); 
        $(this).css('margin-top', (liH - imgH) / 2 + 'px');
       }).attr('src', this.src);
     });    
   	
   });
	
	// Vertical align
  $('.img-box').each(function(){ 
     var imgBoxH = $(this).height();
     $('img', this).each(function (){
       $(this).bind('load', function(){
        var imgH = $(this).height();
        $(this).css('margin-top', (imgBoxH - imgH) / 2 + 'px');
       }).attr('src', this.src);
     });     
  });
  
  $('.home-crossroad .img').each(function(){ 
     var imgBoxH = $(this).height();
     $('img', this).each(function (){
       $(this).bind('load', function(){
        var imgH = $(this).height(); 
        $(this).css('margin-top', (imgBoxH - imgH) + 'px');
       }).attr('src', this.src);
     });     
  });  
});


