﻿//For options, go to http://users.tpg.com.au/j_birch/plugins/superfish/#options
(function(j$) {
	j$(document).ready(function() {
		j$('.superfish ul.L1').superfish({
			delay: 500,                            // one second delay on mouseout 
			animation: { opacity: 'show' },  // fade-in and slide-down animation 
			speed: 'fast',                          // faster animation speed 
			autoArrows: false,
			dropShadows: false
		}).css({'clear':'left'});
		// Webkit: apply top border to tables with .list and .list-no_lines
		j$.each(j$.browser, function(i, val) {
			if (i=='safari' && val==true) {
				j$('.list tr:first td').css("border-top", "2px solid #43848C");
				j$('.list-no_lines tr:first td').css("border-top", "2px solid #43848C");
			}
        });
        //Popup window code
        j$('a').each(function() {
            var popupWindowRegex = /\{[\w\d\s:,&;/\."\[\]\-]*\}/g;
            if (j$(this).attr('class').match('popUp')) {
                var paramsJson = j$(this).attr('class').match(popupWindowRegex); 
                j$(this).click(function() {
                    popUp(paramsJson);
                    return false;
                });
            }
        });		
	}); 
})(jQuery);

Cufon.replace("h1.home-header", { fontFamily: 'Trade Gothic LT Std' });
Cufon.replace(".contentfooter", { fontFamily: 'Trade Gothic LT Std' });
Cufon.replace(".ctaHeader", { fontFamily: 'Trade Gothic LT Std' });