$().ready(function(){    
    function equalizeBoxesH(id){
        var numbox = $('\'' + id + ' .smallText').length;
        var numleftbox = $('\'' + id + ' .leftPbox').length;
        var numrightbox = $('\'' + id + ' .rightPbox').length;
        var numrows = 0;
     
        if(numleftbox > numrightbox){
            numrows = numrightbox;            
        }else{
            numrows = numleftbox;
        }
        for(var numctr = 0; numctr < numrows; numctr++){
            var numleftH = eval( '$(\'' + id + ' .leftPbox:eq(' + numctr + ')\').height();' );
            var numrightH = eval( '$(\'' + id + ' .rightPbox:eq(' + numctr + ')\').height();' );

            if(numleftH > numrightH){
                eval( '$(\'' + id + ' .rightPbox:eq(' + numctr + ')\').height(' + numleftH + ');' );                             
            }else if(numrightH > numleftH){
                eval( '$(\'' + id + ' .leftPbox:eq(' + numctr + ')\').height(' + numrightH + ');' );                                         
            }
        } 
           
        if(numbox % 2 == 1){
            eval( '$(\'' + id + ' .smallText:eq(' + (numbox-2) + ')\').addClass(\'bottomLine\');' );
            eval( '$(\'' + id + ' .smallText:eq(' + (numbox-3) + ')\').addClass(\'bottomLine\');' );
            eval( '$(\'' + id + ' .smallText:eq(' + (numbox-1) + ')\').removeClass(\'topLine\');' );
        }
    }
    equalizeBoxesH('#specialsListing');
    equalizeBoxesH('#specialsDefault');
    equalizeBoxesH('#featuredProducts');
    equalizeBoxesH('#whatsNew');
    equalizeBoxesH('#newProductsDefault');
});

/*    var numbox = $('#whatsNew .smallText').length;
    var numleftbox = $('#whatsNew .leftPbox').length;
    var numrightbox = $('#whatsNew .rightPbox').length;
    var numrows = 0;
    
    if(numleftbox > numrightbox){
        numrows = numrightbox;            
    }else{
        numrows = numleftbox;
    }
   
    for(var numctr = 0; numctr < numrows; numctr++){
        var numleftH = eval( '$(\'#whatsNew .leftPbox:eq(' + numctr + ')\').height();' );
        var numrightH = eval( '$(\'#whatsNew .rightPbox:eq(' + numctr + ')\').height();' ); 

        if(numleftH > numrightH){
            eval( '$(\'#whatsNew .rightPbox:eq(' + numctr + ')\').height(' + numleftH + ')' );                             
        }else if(numrightH > numleftH){
            eval( '$(\'#whatsNew .leftPbox:eq(' + numctr + ')\').height(' + numrightH + ')' );                                         
        }
    } 
       
    if(numbox % 2 == 1){
        eval( '$(\'#whatsNew .smallText:eq(' + (numbox-2) + ')\').addClass(\'bottomLine\');' );
        eval( '$(\'#whatsNew .smallText:eq(' + (numbox-3) + ')\').addClass(\'bottomLine\');' );
        eval( '$(\'#whatsNew .smallText:eq(' + (numbox-1) + ')\').removeClass(\'topLine\');' );
    } */
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/*    var numbox = $('#featuredProducts .smallText').length;
    var numleftbox = $('#featuredProducts .leftPbox').length;
    var numrightbox = $('#featuredProducts .rightPbox').length;
    var numrows = 0;
    
    if(numleftbox > numrightbox){
        numrows = numrightbox;            
    }else{
        numrows = numleftbox;
    }
   
    for(var numctr = 0; numctr < numrows; numctr++){
        var numleftH = eval( '$(\'#featuredProducts .leftPbox:eq(' + numctr + ')\').height();' );
        var numrightH = eval( '$(\'#featuredProducts .rightPbox:eq(' + numctr + ')\').height();' ); 

        if(numleftH > numrightH){
            eval( '$(\'#featuredProducts .rightPbox:eq(' + numctr + ')\').height(' + numleftH + ')' );                             
        }else if(numrightH > numleftH){
            eval( '$(\'#featuredProducts .leftPbox:eq(' + numctr + ')\').height(' + numrightH + ')' );                                         
        }
    } 
       
    if(numbox % 2 == 1){
        eval( '$(\'#featuredProducts .smallText:eq(' + (numbox-2) + ')\').addClass(\'bottomLine\');' );
        eval( '$(\'#featuredProducts .smallText:eq(' + (numbox-3) + ')\').addClass(\'bottomLine\');' );
        eval( '$(\'#featuredProducts .smallText:eq(' + (numbox-1) + ')\').removeClass(\'topLine\');' );
    }*/
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/*    var numbox = $('#specialsDefault .smallText').length;
    var numleftbox = $('#specialsDefault .leftPbox').length;
    var numrightbox = $('#specialsDefault .rightPbox').length;
    var numrows = 0;
    
    if(numleftbox > numrightbox){
        numrows = numrightbox;            
    }else{
        numrows = numleftbox;
    }
   
    for(var numctr = 0; numctr < numrows; numctr++){
        var numleftH = eval( '$(\'#specialsDefault .leftPbox:eq(' + numctr + ')\').height();' );
        var numrightH = eval( '$(\'#specialsDefault .rightPbox:eq(' + numctr + ')\').height();' ); 

        if(numleftH > numrightH){
            eval( '$(\'#specialsDefault .rightPbox:eq(' + numctr + ')\').height(' + numleftH + ')' );                             
        }else if(numrightH > numleftH){
            eval( '$(\'#specialsDefault .leftPbox:eq(' + numctr + ')\').height(' + numrightH + ')' );                                         
        }
    } 
       
    if(numbox % 2 == 1){
        eval( '$(\'#specialsDefault .smallText:eq(' + (numbox-2) + ')\').addClass(\'bottomLine\');' );
        eval( '$(\'#specialsDefault .smallText:eq(' + (numbox-3) + ')\').addClass(\'bottomLine\');' );
        eval( '$(\'#specialsDefault .smallText:eq(' + (numbox-1) + ')\').removeClass(\'topLine\');' );
    } */
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/*    var numbox = $('#specialsListing .smallText').length;
    var numleftbox = $('#specialsListing .leftPbox').length;
    var numrightbox = $('#specialsListing .rightPbox').length;
    var numrows = 0;
    
    if(numleftbox > numrightbox){
        numrows = numrightbox;            
    }else{
        numrows = numleftbox;
    }
   
    for(var numctr = 0; numctr < numrows; numctr++){
        var numleftH = eval( '$(\'#specialsListing .leftPbox:eq(' + numctr + ')\').height();' );
        var numrightH = eval( '$(\'#specialsListing .rightPbox:eq(' + numctr + ')\').height();' ); 

        if(numleftH > numrightH){
            eval( '$(\'#specialsListing .rightPbox:eq(' + numctr + ')\').height(' + numleftH + ')' );                             
        }else if(numrightH > numleftH){
            eval( '$(\'#specialsListing .leftPbox:eq(' + numctr + ')\').height(' + numrightH + ')' );                                         
        }
    } 
       
    if(numbox % 2 == 1){
        eval( '$(\'DIV#specialsListing .smallText:eq(' + (numbox-2) + ')\').addClass(\'bottomLine\');' );
        eval( '$(\'DIV#specialsListing .smallText:eq(' + (numbox-3) + ')\').addClass(\'bottomLine\');' );
        eval( '$(\'DIV#specialsListing .smallText:eq(' + (numbox-1) + ')\').removeClass(\'topLine\');' );
    } */
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/*    var numbox = $('#newProductsDefault .smallText').length;
    var numleftbox = $('#newProductsDefault .leftPbox').length;
    var numrightbox = $('#newProductsDefault .rightPbox').length;
    var numrows = 0;
 
    if(numleftbox > numrightbox){
        numrows = numrightbox;            
    }else{
        numrows = numleftbox;
    }

    for(var numctr = 0; numctr < numrows; numctr++){
        var numleftH = eval( '$(\'#newProductsDefault .leftPbox:eq(' + numctr + ')\').height();' );
        var numrightH = eval( '$(\'#newProductsDefault .rightPbox:eq(' + numctr + ')\').height();' ); 

        if(numleftH > numrightH){
            eval( '$(\'#newProductsDefault .rightPbox:eq(' + numctr + ')\').height(' + numleftH + ')' );                             
        }else if(numrightH > numleftH){
            eval( '$(\'#newProductsDefault .leftPbox:eq(' + numctr + ')\').height(' + numrightH + ')' );                                         
        }
    } 
       
    if(numbox % 2 == 1){
        eval( '$(\'DIV#newProductsDefault .smallText:eq(' + (numbox-2) + ')\').addClass(\'bottomLine\');' );
        eval( '$(\'DIV#newProductsDefault .smallText:eq(' + (numbox-3) + ')\').addClass(\'bottomLine\');' );
        eval( '$(\'DIV#newProductsDefault .smallText:eq(' + (numbox-1) + ')\').removeClass(\'topLine\');' );
    }
*/ 