﻿// Author: Lawrence T. Manuel
// Date: October 16, 2011
// Detects if a user is connecting via a smartphone device and redirects them to the mobile site.
var ua = navigator.userAgent.toLowerCase();
// Detetion for iPhone / iPod devices.
if (ua.search('iphone') > -1 || ua.search('ipod') > -1) {
    location.href = 'i';
}
// Detection for Android Mobile (smartphone) devices.
else if (ua.search('mobile') > -1){
    location.href = 'a';
}
