﻿var homePageRegex = new RegExp('/?(Default.aspx.*)?$', 'i');
var match = window.location.href.match(homePageRegex)

var noRedirect = new RegExp('nr=1', 'i');
var nRMatch = window.location.href.match(noRedirect)
if (match != null && match.length > 0 && (nRMatch == null)) {
    var smartDeviceList = /iphone|ipod|series60|symbian|android|windows ce|blackberry|palm/;
    var uagent = navigator.userAgent.toLowerCase();

    if (uagent.search(smartDeviceList) > -1)
        window.location = "/Mobile";
}
