define(['jquery'], function($) { var biz = {}; biz.url = function(routes, params, merch) { if (merch) { var url = './merchant.php?c=site&a=entry&m=lionfish_comshop&do=admin&controller=' + routes.replace(/\//ig, '.') } else { var url = './index.php?c=site&a=entry&m=lionfish_comshop&do=admin&controller=' + routes.replace(/\//ig, '.') } if (params) { if (typeof(params) == 'object') { url += "&" + $.toQueryString(params) } else if (typeof(params) == 'string') { url += "&" + params } } return url }; biz.selector = { select: function(params) { params = $.extend({}, params || {}); var name = params.name === undefined ? 'default' : params.name; var modalid = name + "-selector-modal"; modalObj = $('#' + modalid); if (modalObj.length <= 0) { var modal = '