


function buildFB(){

	alert(window.location.href);

}





/* Checkbox List "All" functionality */
$(document).ready(
	function() {
	
	buildFB();
	
	
	
		$(".checkboxlist").each(
			function() {
				var labels = $("label", this);
				var inputs = $("input", this);
				var all = null;
				labels.each(
					function() {
						var label = $(this);
						// Gets an <input> with the id of the <labels> for attribute
						var input = $("#"+label.attr("for"));
						if(label.text().toLowerCase() == "all") {
							input.toggle(
								function() {
									window.setTimeout(
										function() {
											inputs.each(
												function() {
													$(this).attr("checked", "checked");
												}
											);
										}
									, 10);
								},
								function() {
									window.setTimeout(
										function() {
											inputs.each(
												function() {
													$(this).removeAttr("checked");
												}
											);
										}
									, 10);
								}
							);
							all = input;
						}
						else {
							input.click(
								function() {
									if(all)
										all.removeAttr("checked");
								}
							);
						}
					}
				);
			}
		);
	}
);
		
