$(document).ready(function(){
	if($('#breadcrumbs').length > 0){
		$('#breadcrumbs').css('padding-left', $('.h1_title').width()+5);	
	}
	
	if($('#nq_newproducts').length > 0){
		var min_height = $('#editorial_block_center').height() + $('#nq_manufacturers_home').height() + $('#nq_blog').height() + $('#nq_categorieslink_container').height();
		if( min_height > $('#nq_newproducts').height()){
			$('#nq_newproducts').height(min_height);	
		}
	}
	
	if($('#menu_visible').length > 0){
		$('.h1_title').css('top', parseInt($('.h1_title').css('top'))+parseInt($('#menu_visible').height()));
	}
	
	if($('.primary_block_light').length > 0){
		$('.h1_title, #breadcrumbs').addClass('light');
	}
    
    //  Motifs Indispo
    $('.product_list li').hover( function() {
        if( $(this).find('.indispo_motif').length ) {
            if( $(this).attr('class') == 'mea' || $(this).attr('class') == 'mea right' ) {
                $(this).find('.indispo_motif').show(); 
                $(this).find('.link_image').css({borderBottom:'solid 2px #f35718', height:'402px'});     
            } else {
                $(this).find('.indispo_motif').hide();        
            }
        }    
    }, function() {  
        if( $(this).find('.indispo_motif').length ) {
            if( $(this).attr('class') == 'mea' || $(this).attr('class') == 'mea right' ) {
                $(this).find('.indispo_motif').hide();
                $(this).find('.link_image').css({borderBottom:'1px solid #CCCCCC', height:'403px'});      
            } else {
                $(this).find('.indispo_motif').show();        
            }
        }    
    });
    
    $('.big_motif').click( function(e) {
        var href = $(this).next().attr('href');
        window.location.href = href;    
    });
    
    if( $.browser.msie ) {
        $('#navigation_block_top').css('top', '117px');
        if( $.browser.version.substring( 0, 1 ) == '7' ) {
            $('#nav li').css('margin-right', '14px');
            $('.container_pub').css('position', 'relative');
        }
    }
	
	if($('#center_column > div').length == 0){
		$('#center_column').hide();	
	}
	
    //  Déplacement découvrez aussi : Cateogry
    if( $('#categoryLinksContainerFirst').length ) {
        $('#categoryLinksContainer').html( $('#categoryLinksContainerFirst').html() );    
        $('#categoryLinksContainerFirst').html( '' );
    }
    
    //  Déplacement découvrez aussi : Product
    if( $('#decouvrezAussiFirst').length ) {
        $('#decouvrezAussi').html( $('#decouvrezAussiFirst').html() ); 
        $('#decouvrezAussiFirst').html( '' );   
    }
	
	
	if( parseInt($('#nq_partners').height()) < 40 ){
		$('#nq_partners').height(40);	
	}

	
});
