window.log = function(){
  log.history = log.history || [];   // store logs to an array for reference
  log.history.push(arguments);
  if(this.console){
    console.log( Array.prototype.slice.call(arguments) );
  }
};



// catch all document.write() calls
(function(doc){
  var write = doc.write;
  doc.write = function(q){ 
    log('document.write(): ',arguments); 
    if (/docwriteregexwhitelist/.test(q)) write.apply(doc,arguments);  
  };
})(document);


$(document).ready(function() {
/*
	var selectors = ["specialty", "clinic"];
	var inputs = $('#meet input');
	var outputs = $('#dr_display div');
	
	var actives = array(selectors.length);
	
	for (i in selectors){
		var name = selectors[i];
		$('input[name=' + name + ']').change(function(){
			var name = $(this).attr('name');

			log(actives);
			sortBy($(this).attr("id"),name);
		});
	}
	
	function sortBy(value,area) {
		
		if (area == selectors[0]){
			activeSpecialty = value;
		} else {
			activeClinic = value;
		}
		
		log(value,area);
		
		$('.keep').removeClass('keep');
		
		// sort through all, add keep to matches
		$('#dr_display div').each(function() {
			if ($(this).hasClass(activeSpecialty) || activeSpecialty == undefined ) {
				if ($(this).hasClass(activeClinic) || activeClinic == undefined ) { 
					$(this).addClass('keep');
				 }
			}
		});
		
		$('#dr_display div').show().not('.keep').hide();
	};
	*/
	
});




