Return the major version of IE. Code stolen from AngularJS: http://www.explainjs.com/explain?src=http://ajax.googleapis.com/ajax/libs/angularjs/1.0.6/angular.js
// define a couple of functions to make things a bit cleaner
var lowercase = function(string){
return isString(string) ? string.toLowerCase() : string;
};
function isString(value){
return typeof value == 'string';
}
// test for the major version of IE
var msie = int((/msie (\d+)/.exec(lowercase(navigator.userAgent)) || [])[1]);
// Results will return a simple integer, e.g. '10'