var BrowserDetect = { init : function() { this.browser = this.searchString(this.dataBrowser) || "An unknown browser"; this.version = this.searchVersion(navigator.userAgent) || this.searchVersion(navigator.appVersion) || "an unknown version"; this.OS = this.searchString(this.dataOS) || "an unknown OS"; }, searchString : function(data) { for ( var i = 0; i < data.length; i++) { var dataString = data[i].string; var dataProp = data[i].prop; this.versionSearchString = data[i].versionSearch || data[i].identity; if (dataString) { if (dataString.indexOf(data[i].subString) != -1) return data[i].identity; } else if (dataProp) return data[i].identity; } }, searchVersion : function(dataString) { var index = dataString.indexOf(this.versionSearchString); if (index == -1) return; return parseFloat(dataString.substring(index + this.versionSearchString.length + 1)); }, dataBrowser : [ { string : navigator.userAgent, subString : "Chrome", identity : "Chrome" }, { string : navigator.userAgent, subString : "OmniWeb", versionSearch : "OmniWeb/", identity : "OmniWeb" }, { string : navigator.vendor, subString : "Apple", identity : "Safari" }, { prop : window.opera, identity : "Opera" }, { string : navigator.vendor, subString : "iCab", identity : "iCab" }, { string : navigator.vendor, subString : "KDE", identity : "Konqueror" }, { string : navigator.userAgent, subString : "Firefox", identity : "Firefox" }, { string : navigator.vendor, subString : "Camino", identity : "Camino" }, { string : navigator.userAgent, subString : "Netscape", identity : "Netscape" }, { string : navigator.userAgent, subString : "MSIE", identity : "Internet Explorer", versionSearch : "MSIE" }, { string : navigator.userAgent, subString : "Gecko", identity : "Mozilla", versionSearch : "rv" }, { string : navigator.userAgent, subString : "Mozilla", identity : "Netscape", versionSearch : "Mozilla" } ], dataOS : [ { string : navigator.platform, subString : "Win", identity : "Windows" }, { string : navigator.platform, subString : "Mac", identity : "Mac" }, { string : navigator.platform, subString : "Linux", identity : "Linux" } ] }; BrowserDetect.init(); var UpdateYourBrowserInit = function() { var asn_resize = null; $(document) .ready( function() { asn_resize = function() { if ($('#asn-warning').width() < 600) { $('#asn-outofdate').hide(); } else if ($('#asn-warning').width() < 790) { $('#asn-outofdate').show().html('!'); } else { $('#asn-outofdate').show().html( 'Navegador desatualizado!'); } }; winplatform = navigator.platform; winappversion = navigator.appVersion; winOS = BrowserDetect.OS; if ((((BrowserDetect.OS == 'Windows')) && (BrowserDetect.browser == "Internet Explorer") && (parseInt(BrowserDetect.version) <= 8)) || ((BrowserDetect.browser == "Internet Explorer") && (parseInt(BrowserDetect.version) <= 7)) || ((BrowserDetect.browser == "Chrome") && (parseInt(BrowserDetect.version) <= 24)) || ((BrowserDetect.browser == "Opera") && (parseInt(BrowserDetect.version) <= 12)) || ((BrowserDetect.browser == "Safari") && (parseInt(BrowserDetect.version) < 5)) || ((BrowserDetect.browser == "Firefox") && (parseInt(BrowserDetect.version) <= 22))) { $('body').remove('#asn-warning'); $('body') .prepend( "
" + "" + "" + "Navegador desatualizado!" + "Você está usando uma versão antiga do " + BrowserDetect.browser + ". Recomendamos que atualize seu navegador." + "
"); $('#asn-warning').fadeIn(1000); $('#asn-close').click(function() { $('#asn-warning').fadeOut(400); }); $('#asn-warning a').mouseover(function() { $(this).css('color', '#8F8D7B'); }); $('#asn-warning a').mouseout(function() { $(this).css('color', '#4F4D3B'); }); if ((BrowserDetect.browser == "Internet Explorer") && (parseInt(BrowserDetect.version) <= 6)) { } else { $('#asn-warning').css('position', 'fixed'); } asn_resize(); } }); $(window).resize(function() { asn_resize(); }); }; if (typeof jQuery == 'undefined') { if (typeof $ == 'function') { thisPageUsingOtherJSLibrary = true; } function getScript(url, success) { var script = document.createElement('script'); script.src = url; var head = document.getElementsByTagName('head')[0], done = false; script.onload = script.onreadystatechange = function() { if (!done && (!this.readyState || this.readyState == 'loaded' || this.readyState == 'complete')) { done = true; success(); script.onload = script.onreadystatechange = null; head.removeChild(script); } ; }; head.appendChild(script); } ; getScript( 'http://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js', function() { if (typeof jQuery == 'undefined') { } else { jQuery.noConflict()(function() { UpdateYourBrowserInit(); }); if (thisPageUsingOtherJSLibrary) { } else { } } }); } else { UpdateYourBrowserInit(); };