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