move document.ready logic for foundation js