A little snippet from one of my experiments with javascript. Written for a phonegap application's website, it features either the App Store or the Play Store more prominently depending upon your user agent.