function initJumpMenus() {
    // Turns all <select> elements with the 'jumpmenu' class into jump menus
    var selectElements = document.getElementsByTagName("select");
    for (i = 0; i < selectElements.length; i++) {
        // Check for the class and make sure the element has an ID
        if (selectElements[i].className == "jumpmenu" && document.getElementById(selectElements[i].id) != "") {
            jumpmenu = document.getElementById(selectElements[i].id);
            jumpmenu.onchange = function() {
                if (this.options[this.selectedIndex].value != '') {
                    // Redirect
                    location.href = this.options[this.selectedIndex].value;
                }
            }
        }
    }
}

var jslib = {
	// Running site wide
	global_page : {
		init : function() {
			Cufon.replace('#header h1, #body_content h2', { fontFamily: 'Achthree' });
		    $("ul#nav li a").hover(function() {
		        var inputClass = $(this).attr("class");
		        $(this).parent().parent().attr("class",inputClass);
		    }, function(){
		        $(this).parent().parent().attr("class","");
		    });
			$("#bottom_search").val('Search');
			$("#bottom_search").focus(function () {
				$(this).select();
				if ($(this).val() == "Search") {
					$(this).val('');
				}
			});
			$('#bottom_search').blur(function () {
				if ($(this).val() == '') {
					$(this).val('Search');
				}
			});
		}
	},
	// Running only on sub-pages
	sub_page : {
		init : function() {
			// global jQuery functions.
		}
	},
	// Index page specific scripts
	home_page : {
		init : function() {

		}
	},
	build_a_deck : {
		init : function() {
        	initJumpMenus();
			$("#js_test").hide();
		}
	},
	other_function : {
		init : function() {
			// Other page specific jQuery functions.
		}
	},
	another_function : {
		init : function() {
			// Other page specific jQuery functions.
		}
	}
}

