Split JS block to extra_head to avoid compression.
Remove overlay JS function since we now use Magnific popup.