script.js 1.1 KB

123456789101112131415161718192021222324252627282930
  1. // if jQuery was loaded, let's make it noConflict here.
  2. if ('function' === typeof jQuery && 'function' === typeof jQuery.noConflict) {
  3. jQuery.noConflict();
  4. }
  5. /**
  6. * Some browser detection
  7. */
  8. var clientPC = navigator.userAgent.toLowerCase(); // Get client info
  9. var is_macos = navigator.appVersion.indexOf('Mac') != -1;
  10. var is_gecko = ((clientPC.indexOf('gecko')!=-1) && (clientPC.indexOf('spoofer')==-1) &&
  11. (clientPC.indexOf('khtml') == -1) && (clientPC.indexOf('netscape/7.0')==-1));
  12. var is_safari = ((clientPC.indexOf('applewebkit')!=-1) && (clientPC.indexOf('spoofer')==-1));
  13. var is_khtml = (navigator.vendor == 'KDE' || ( document.childNodes && !document.all && !navigator.taintEnabled ));
  14. if (clientPC.indexOf('opera')!=-1) {
  15. var is_opera = true;
  16. var is_opera_preseven = (window.opera && !document.childNodes);
  17. var is_opera_seven = (window.opera && document.childNodes);
  18. }
  19. /**
  20. * Handler to close all open Popups
  21. */
  22. function closePopups(){
  23. jQuery('div.JSpopup').hide();
  24. }
  25. jQuery(function () {
  26. jQuery(document).on('click', closePopups);
  27. });