// query to ensure equal height columns in the footer - - - - - - - - - - - - - - - - - - - - -

/*
$(function(){
    var H = 0;
    $(".heightEqualizer").each(function(i){
        var h = $(".columnToEqualize").eq(i).height();
        if(h > H) H = h;
    });
    $(".columnToEqualize").height(H);
});
*/

// dropdown filter jquery for poison list - - - - - - - - - - - - - - - - - - - - - - - - - - - 

$(document).ready(function(){
	
	// START mirror filter checkbox functionality to ensure proper display on page load
	// we'll use this variable later to ensure that
	// we don't end up with an empty list
	var pph_typeFilterCheck = 0;
			
	// check all poison type filters	
	$('#pph_poisonList_typeFilters input:checkbox').each(function() {
		// make sure those checked stay checked
		if ( this.checked == true) {
			$( '#pph_poisonList li.' + $(this).val() ).show();
			// set this variable to 1 to indicate that at least 1 filter is checked
			pph_typeFilterCheck = 1;
		// hide everything that's not checked
		} else {
			$( '#pph_poisonList li.' + $(this).val() ).hide();
		}
 	});

	// if this variable is still 0, show everything -- because no filters are checked
	if (pph_typeFilterCheck == 0) {
		$( '#pph_poisonList li' ).show();
	}
	// END mirror function
	
	// START poison list checkbox filter function
	// when the user checks a poison filter
	$('#pph_poisonList_typeFilters input.pph_checkBox_filter').click(function(){
		
		// we'll use this variable later to ensure that
		// we don't end up with an empty list
		var pph_typeFilterCheck = 0;
				
		// check all poison type filters	
		$('#pph_poisonList_typeFilters input:checkbox').each(function() {
			// make sure those checked stay checked
			if ( this.checked == true) {
				$( '#pph_poisonList li.' + $(this).val() ).show();
				// set this variable to 1 to indicate that at least 1 filter is checked
				pph_typeFilterCheck = 1;
			// hide everything that's not checked
			} else {
				$( '#pph_poisonList li.' + $(this).val() ).hide();
			}
	 	});

		// if this variable is still 0, show everything -- because no filters are checked
		if (pph_typeFilterCheck == 0) {
			$( '#pph_poisonList li' ).show();
		}
		
	});
	// END poison list checkbox filter

});
