move javascript to page footer; change background position for iOS support