$.fn.slidecontrol = function(params) {
	
	var defaults = {
			itemsPerPage :		2
	};
	var options = $.extend(defaults, params);
	
	
	return this.each(function() {
			
		var $this = $(this);
		
		// attachEventHandler functions on each page might try to bind this multiple times, so make sure it's unbound.
		$this.find('.slideControl').unbind('click').click(function(){
			
			var $this = $(this);
			
			var rowID = $this.attr('id').replace("slideControl_", "");
			$('#exp'+ rowID +'_content').slideToggle();
			
			var arrowImg	= $this.find(".slideControlImg");
			var arrowImgSrc = arrowImg.attr('src');
			var linkTitle	= $this.attr('title');
			if (arrowImgSrc.indexOf('_down') > 0){
				arrowImg.attr('src', arrowImgSrc.replace('_down', '_up'));
				if (linkTitle == 'Read more'){
					$this.attr('title', 'Hide');
				}else{
					$this.attr('title', linkTitle.replace('Show', 'Hide'));
				}
			}else{
				arrowImg.attr('src', arrowImgSrc.replace('_up', '_down'));
				if (linkTitle == 'Hide'){
					$this.attr('title', 'Read more');
				}else{
					$this.attr('title', linkTitle.replace('Hide', 'Show'));
				}
			}
			
			return false;
			
		});
	
	});
	
}


