I suggest you a more general approach, without involving jQuery.
You can always create your own namespace, and extend it.
Read this beautiful article by Addy Osmani for further details.
/* define a global var, the root of your namespace */
var myNamespace = myNamespace || {};
/*
* init and populate your ns inside a immediately invoked function expression
* you can pass the jQuery object as argument if you need it in your business logic
* but it is not necessary
*/
(function(ns, $){
ns.ScriptObject = function($script){
var $s = $script;
this.getDataColor = function(){
return $s.data("color");
}
this.getDataId = function(){
return $s.data("id");
}
/* add further methods */
}
})(myNamespace ,jQuery)