/**
 * Mutes firebug console code and errors on browsers where firebug is not installed
 */
if (!window.console || !console.firebug) {
    var names = ["log", "debug", "info", "warn", "error", "assert", "dir", "dirxml", "group", "groupEnd", 
	"groupCollapsed", "time", "timeEnd", "count", "trace", "profile", "profileEnd"];
    window.console = {};
    for (var i = 0; i < names.length; ++i) {
        window.console[names[i]] = function() {};
	}
}

/*	DOM-READY FUNCTION
-------------------------------------------------------------- */
$(function() {
	
	$('#imgGallery').cycle({
	    timeout: 7000,
	    speed: 1000
	});
	
	// Handle the city/region hiding.
	$('#stateList > ul > li').each( function() {
		$(this).find('> a').click( function() {
			$(this).parent('li').find('ul').comboToggle();
			return false;
		});
	}).find('> ul').hide();
	
	// Fixes a stupid problem in IE6 I couldn't solve in CSS. 
	// Footer was overlapping sidebar when above function was run/
	if ( $.browser.className == 'msie6' ) {
		var sideHeight = $('#contentSide').height();
		var innerHeight = $('#contentInner').height();
		if ( sideHeight >= innerHeight ) {
			$('#contentInner').css('height',sideHeight);
		} else {
			$('#contentSide').css('height',innerHeight);
		}
	}
	

	
});

/*	WINDOW LOADED FUNCTION
-------------------------------------------------------------- */
// $(window).load(function () {
// 	
// 	// Page loaded stuff here
// 
// });

