function noSpam() {
    if (document.getElementById) {
		var at = "@";
	  	var links = document.getElementsByTagName('a');
	  
	  	for (var i = 0; i < links.length; i++) {
		  	var linkElem = links[i];
			
		  	if (linkElem.className == 'escape') {
		  		var mail = linkElem.firstChild; var domain = linkElem.lastChild;
		  		mail.nextSibling.firstChild.innerHTML = at;
		  		linkElem.href = "mailto:" + mail.data + at + domain.data;
		  	}
			
	  	} // End for
	  
    } // End if
}

window.addEventListener?window.addEventListener('load',noSpam,false):window.attachEvent('onload',noSpam);

jQuery.accordian = function(items, first, options) {

				var active = first;
				var running = 0;

				var titles = options && options.titles || '.title';
				var contents = options && options.contents || '.content';
				var onClick = options && options.onClick || function(){};
				var onShow = options && options.onShow || function(){};
				var onHide = options && options.onHide || function(){};
				var showSpeed = options && options.showSpeed || 'slow';
				var hideSpeed = options && options.hideSpeed || 'fast';

				jQuery(items).not(active).children(contents).hide();
				jQuery(items).not(active).each(onHide);
				jQuery(active).each(onShow);

				jQuery(items).children(titles).click(function(e){

					var p = jQuery(contents, this.parentNode);
					jQuery(this.parentNode).each(onClick);

					if (running || !p.is(":hidden")) return false;
					running = 2;

					jQuery(active).children(contents).not(':hidden').slideUp(hideSpeed, function(){--running;});
					p.slideDown(showSpeed, function(){--running;});

					jQuery(active).each(onHide);
					active = '#' + jQuery(this.parentNode)[0].id;
					jQuery(active).each(onShow);

					return false;
				});

			};

			function simpleLog(message) {
				jQuery('<div>' + message + '</div>').appendTo('#log');
			}

			jQuery(function(){

				jQuery.accordian('#list1 > div', '#item11');

				jQuery.accordian('#list2 > div', '#item22', {
					titles:'.mytitle',
					contents:'.mycontent',
					onClick:function(){simpleLog(this.id + ' clicked')},
					onShow:function(){simpleLog(this.id + ' shown'); jQuery(this).removeClass('off').addClass('on');},
					onHide:function(){simpleLog(this.id + ' hidden'); jQuery(this).removeClass('on').addClass('off');},
					showSpeed:250,
					hideSpeed:550
				});

			});
