+ })
+ .on('focus', function() {
+ if ($(this).attr('style').indexOf('14em') < 0) {
+ $(this).animate({width: '14em'});
+ }
+ })
+ .on('blur', function() {
+ // Shrink if no input and menu is not open
+ if (!$(this).val().length && $(this).attr('style').indexOf('6em') < 0 && !$('.crm-quickSearchField:visible', '#root-menu-div').length) {
+ $(this).animate({width: '6em'});
+ }