(function($){
	$.fn.jmap = function(method, options, callback) {
		return this.each(function(){
			if (method == "init") {
				new $.jmap.init(this, options, callback);
			} else if (typeof method == 'object' || method == null) {
				new $.jmap.init(this, method, options);
			} else if (typeof options == 'function'){
				new $.jmap[method](options);
			} else {
				try {
					new $.jmap[method](options, callback);
				} catch(err) {
					throw Error($.jmap.JErrors[$.jmap.JOptions.language].functionDoesNotExist);
				}
			}
		});
	}
})(jQuery);