jQuery(document).ready
(
    function () {
        jQuery.ajax({ url: 'include/header.html', success: function (data) { jQuery("#header").html(data); } });
        jQuery.ajax({ url: 'include/footer.html', success: function (data) { jQuery("#footer").html(data); } });
        jQuery.ajax({ url: 'include/topmenu.html', success: function (data) {
            jQuery("#topMenu").html(data);
            try {
                if (jQuery.browser.msie) {
                    if (jQuery.browser.version.indexOf("7.") >= 0) {
                        jQuery("a.trouble").css("padding-right", "2px");
                    }
                    else if (jQuery.browser.version.indexOf("8.") >= 0) {
                        jQuery("a.trouble").css("padding-right", "2px");
                    }
                    else if (jQuery.browser.version.indexOf("9.") >= 0) {
                        jQuery("a.trouble").css("padding-right", "8px");
                    }
                }
                else if (jQuery.browser.mozilla) {
                    jQuery("a.trouble").css("padding-right", "2px");
                }
                else if (jQuery.browser.webkit) {
                    jQuery("a.trouble").css("padding-right", "2px");
                }

                if (url.length > 0) {
                    var li = jQuery("#topMenu a[href$='" + url + "']").parents("li:first");
                    li.attr("class", "active_menu");
                    var subId = li.attr("rel");
                    jQuery("#" + subId).show();
                    jQuery("#" + subId).addClass("current");
                }
                else {
                    jQuery("#topMenu a").parents("li:first").removeClass("active_menu");
                }

            } catch (e) { }
        }
        });

        jQuery.ajax({ url: 'include/contact.html', success: function (data) { jQuery("#contact").html(data); } });

        if (jQuery.browser.msie) {
            if (jQuery.browser.version.indexOf("7.") >= 0) {
                jQuery("img[src$='phy_sml_box_01.jpg']").css({ 'position': 'relative', 'top': '2px' });
                jQuery("img[src$='small_box_orange_01.jpg']").css({ 'position': 'relative', 'top': '2px' });
                jQuery("img[src$='small_box_green_01.jpg']").css({ 'position': 'relative', 'top': '2px' });
                jQuery("img[src$='small_box_lab2_01.jpg']").css({ 'position': 'relative', 'top': '2px' });
            }
        }
    }
); 
