var win8orhigher = (function() {
// windows browsers has str like "Windows NT 6.2" in its UA
// Win8 UAs' version is "6.2"
// browsers above this version may has touch events.
var ua = navigator.userAgent;
var matched = ua.match(/Windows NT ([\d\.]+)/);
if(!matched) { return false; }
var version = matched[1] * 1;
if(version < 6.2) { return false; }
return true;
}());
Modernizr.believablehover = (function() {
if(win8orhigher) { return true; } // everything seems to be ok for Win8, maybe.
if(Modernizr.touch) { return false; } // every other touch devices does not need hover.
return true; // ah yes, I am a normal browser.
}());
var cls = Modernizr.believablehover ? 'believablehover' : 'no-believablehover';
$('html').addClass(cls);