
$(function() {

	$('#$enqid').editable('/enquiries/update_status', {
	id : 'data[Enquiry][id]',
	name: 'data[Enquiry][status_id]',

	data   : '$jsonList',
	 type   : 'select',
	 indicator : 'Saving...',
	submit : 'Update Status',
	cssclass: 'MER-inplace-select',
	 callback : function(value, settings) {

	    var match = /won/i.test(value);

	    if(match == true) {
	        $('#row$enqid').removeClass().addClass('jobwon');
	        return;
	    }

	    match = /lost/i.test(value);

	    if(match == true) {
	        $('#row$enqid').removeClass().addClass('joblost');
	        return;
	    }

	    match = /cancelled/i.test(value);

	    if(match == true) {
	        $('#row$enqid').removeClass().addClass('joblost');
	        return;
	    }

	    match = /information sent/i.test(value);
	    if(match == true) {
	        $('#row$enqid').removeClass().addClass('informationsent');
	        return;
	    }

	    match = /issued/i.test(value);
	    if(match == true) {
	        $('#row$enqid').removeClass().addClass('quoted');
	        return;
	    }

	    match = /request for quotation/i.test(value);
	    if(match == true) {
	        $('#row$enqid').removeClass().addClass('requestforquote');
	        return;
	    }

	    match = /assigned/i.test(value);
	    if(match == true) {
	        $('#row$enqid').removeClass();
	         return;
	     }

	 }

 });


}


function makeEditable(selectedID) {
	
	
}
