corrected javascript globalize paths in layout