jQuery.fn.palSqueeze = function(options) {

    var options = jQuery.extend({
        border : true,              // if border account for pixel add on
        cheight : 150,              // container height
        cwidth : 800,               // container width        
        dheight: 129,               // container height
        gspeed : 500               // speed
    }, options);
    
    return this.each(function(i) {
    
        var nboxes = jQuery(this).find('div').size();
        var nboxesM = nboxes - 1;     
        var dwidth = Math.floor(options.cwidth / nboxes) - 6; // width of box is container width / number of boxes
        var lwidth = Math.floor(dwidth * 2); // long width (x2)
        var swidth = Math.floor((options.cwidth - lwidth) / nboxesM - 8);
        
        //alert(lwidth);
        
        jQuery(this).find('div').css({height: options.dheight, width: dwidth});
        
        //alert(nboxes);
        //alert(dwidth);
    
        jQuery(this).find('div').hover(function(i) {
            jQuery(this).parent('div').children('div').stop({ clearQueue : true });            
            jQuery(this).animate({width: lwidth}, options.gspeed, function() { jQuery(this).find('ul').animate({bottom: '-1px'}, 500); });                  
            jQuery(this).addClass('current');
            jQuery(this).siblings('div').not('.current').animate({width: swidth}, options.gspeed); 
        }, function() {
            jQuery(this).parent('div').children('div').stop({ clearQueue : true });
            jQuery(this).animate({width: dwidth}, options.gspeed);
            jQuery(this).siblings('div').animate({width: dwidth}, options.gspeed);
            jQuery(this).removeClass('current');
            jQuery(this).find('ul').stop({ clearQueue : true }).animate({bottom: '-17px'}, 500);
        });    
        
    });

};