(function($){

    $.maltella = new Object();

    $.maltella.cloneObject = function (obj){
        if(obj == null || typeof(obj) != 'object')
            return obj;

        var temp = obj.constructor(); // changed

        for(var key in obj)
            temp[key] = $.maltella.cloneObject(obj[key]);
        return temp;
    }

    $.maltella.isEmptyObject = function(obj) {
        for(var prop in obj) {
            if(obj.hasOwnProperty(prop))
            return false;
        }

        return true;
    }

})(jQuery);



