jQuery.fn.jcIR = function(options) {
	//default settings
	var options = jQuery.extend( {
		image_dir: 'headings',     // directory where image is located this would be a sub directory inside "images"
		image_ext: '.gif', // replacement image file extension
		elem_width: '',    // width of element being replaced
		elem_height: ''    // height of element being replaced
	},options);
	return this.each(function(){
		var dir = ''; // set empty variable
		if (options.image_dir) { // if image_dir is set when calling jcIR
			$(dir = 'images/' + options.image_dir + '/');	
		} else { // else set default
			$(dir = 'images/')
		}
		var image_name = jQuery(this).attr('class'); // gets the class of the item and uses that as the name of replacement image
		var alt_text = jQuery(this).text();
		jQuery(this).addClass('replaced')
			.css('width', options.elem_width + 'px')
			.css('height', options.elem_height + 'px')
			.css('background-image','url(' + dir + image_name + options.image_ext + ')')
			.css('background-repeat','none');
	});
}
