﻿// do not edit this file, it is created by the theme, any edits will be lost

function p2_toggle_contactform(delay) {
    if (delay == undefined) delay = 500;
    jQuery('#contact-form').slideToggle(delay);
}


sfHover = function() {
    var sfEls = document.getElementById("topnav").getElementsByTagName("LI");
    for (var i = 0; i < sfEls.length; i++) {
        sfEls[i].onmouseover = function() {
            this.className += " sfhover";
        }
        sfEls[i].onmouseout = function() {
            this.className = this.className.replace(new RegExp(" sfhover\\b"), "");
        }
    }
}
if (window.attachEvent) window.attachEvent("onload", sfHover); // for MSIE only


jQuery(document).ready(function() {

    jQuery('#topnav li ul a').attr('title', '');

    // add arrow to dropdown with nested menu
    jQuery('#topnav li ul li:has(ul)').each(function() {
        $link = jQuery(this).children('a');
        linktext = $link.html();
        $link.html(linktext + " &raquo;");
    });
    // add underline to parent while child is being viewed
    jQuery('#topnav li ul li ul').hover(function() {
        jQuery(this).parent().children('a').css('text-decoration', 'underline');
    }, function() {
        jQuery(this).parent().children('a').css('text-decoration', 'none');
    });

    if (!jQuery.browser.msie) {
        jQuery('#topnav li ul').css('opacity', 0.93);
    }
    if (jQuery.browser.msie) {
        if (jQuery('#topnav li ul li:has(ul)').size() == 0) {
            jQuery('#topnav li ul').css('opacity', 0.93);
        }
    }

});
