if ($('.cont_maps').length) { $('.cont_maps ul li').click(function() { var map = mapItMap.getInstance(); setTimeout(function() { map.updateSize(); if (map.layers.length > 0) map.layers[0].redraw(); }, 100); }); }