window.addEvent('domready', function () {
	// Hook the feature entry divs to their anchor href
	$$('.feature_entry').each(function (item, index) {

		var anchor = item.getElement('a').getProperty('href');
		item.addEvent('click', function() {
			window.location = anchor;
			
		});
		
	});
	
	// Hide all the physician info from the specialties list
	$$('.specialty_entry_info').each(function(item, index) {
		item.setStyle('display', 'none');
		
	});
	
	// Display js-related instructions to the end user
	$$('p.js_only').each(function (item, index) {
		item.setStyle('display', 'block');
		
	});
	
	// Toggle the physician info when the specialty is selected
	$$('.specialty').each(function (item, index) {
		item.addEvent('click', function() {
			var elem = $$('#'+ this.getProperty('rel') +' .specialty_entry_info');
			if (elem.getStyle('display') != 'block') {
				elem.setStyle('display', 'block');
				
			} else {
				elem.setStyle('display', 'none');
				
			}
			
		});
	});
});
