$(function() {
    var blob = $('#blob');
    var currBlobLeft = blob.css('left');
    var currBlobWidth = blob.width();
    
    $('#nav ul li a').hover(
        function() {
            var selId = $(this).parent().attr('id');
            var newBlobWidth = $(this).width();
            
            var newBlobLeft = '25px';
            switch(selId){
                case 'career-development':
                    newBlobLeft = '128px';
                    break;
                
                case 'locations':
                    newBlobLeft = '330px';
                    break;
                
                case 'why-us':
                    newBlobLeft = '438px';
                    break;
                
                case 'resources':
                    newBlobLeft = '537px';
                    break;
                
                case 'apply':
                    newBlobLeft = '653px';
                    break;
            }
            
            blob.animate(
                {'left' : newBlobLeft, 'width' : newBlobWidth},
                {queue: false, duration: 500, easing: 'easeOutCirc'}
            );
        },
        function() {
            blob.animate(
                {'left' : currBlobLeft, 'width' : currBlobWidth},
                {queue: false, duration: 500, easing: 'easeOutCirc'}
            );
        }
    );
});
