
/* CONSTANTS */
var FLASH_VERSION_SUPPORTED = '9';

/*footer fix for ie6 & ie7*/
$(document).ready(function() {
	$('#footer .nav li:last-child').css({ paddingRight: '0', border: '0' });
});

/* UTILITY VARIABLES */
var isIE = $.browser.msie;
var isIE6 = isIE && parseInt($.browser.version) === 6;


/*
 * ENABLE JS and FLASH FLAGS
 */
$('html').addClass('js-enabled');
if(typeof(swfobject) !== 'undefined' && swfobject.hasFlashPlayerVersion(FLASH_VERSION_SUPPORTED)) {
	$('html').addClass('flash-enabled');
}

/*
* ONLOAD EVENTS
*/
$(document).ready(function() {

	/* open external urls in new window */
	$('a.ext, a.doc').click(function() {
		window.open(this.href);
		return false;
	});

	/* open external urls in new window */
	$('a.pop').click(function() {
		window.open(this.href, 'popup', 'height=520, width=740');
		return false;
	});
	
	$('a.wwb').click(function() {
		window.open(this.href, 'popup', 'height=895, width=770');
		return false;
	});
	
	// Startup additions to set up tabs and slideshow
	if ($(".tabs") != null && $(".tabs").length > 0) {
		$(".tabs").tabs();
		$(".tabs ul li.tab a").click(function () {
	  	Cufon.replace('ul.page-tabs li.tab a, .tabs ul li.tab a', {fontFamily: 'TG Condensed'});
		});
		
		$(".tabs ul li.tab:first-child a").click();
	}
	
  $(function () {
  	if ($("input#search-text").length > 0) {
    	$("input#search-text")
    	.attr("old-value", $("input#search-text").attr("value"))
    	.focus(function () {
      		if($(this).val() == $(this).attr("old-value")) {
        		$(this).val('');
      		}
    	})
    	.blur(function () {
      		if($(this).val() == '') {
        		$(this).val($(this).attr("old-value"));
      		}
    	})
    }
  });

});





