/**
  <p>A way to find a classname by supplying a prefix piece of a classname.
  This is used as a simple way to both have a selector and a meta string to the selector</p>
	
  @author <a href="dilltree.com">Jeremy Dill</a>
  @param {Object} obj The html dom object or jquery object that has class applied
  @param {String} cl The class begins with this.. example to find "lnk_test", set this param to "lnk_"
  @param {Bool} rip If true, remove the cl piece of the classname and return the remainder
*/
(function($){
// AS A FUNCTION
$.findClass = function (obj,cl,rip) {
	var jobj=$(obj);
	if(!jobj.attr('class')) return "";
	var list=jobj.attr('class').split(" ");
	for(i = 0; i < list.length; i++){
 		if(list[i].indexOf(cl) >= 0) {
			if (rip) return list[i].substr(cl.length);
			else  return list[i];
		}
	};
	return "";
};
})(jQuery);
