Convert mootools script into layout map to jQuery