diff --git a/application/models/reports/Detailed_receivings.php b/application/models/reports/Detailed_receivings.php index 48c8eb9a4..8c521780c 100644 --- a/application/models/reports/Detailed_receivings.php +++ b/application/models/reports/Detailed_receivings.php @@ -24,7 +24,7 @@ class Detailed_receivings extends Report array('quantity' => $this->lang->line('reports_quantity')), array('employee_name' => $this->lang->line('reports_received_by')), array('supplier' => $this->lang->line('reports_supplied_by')), - array('total' => $this->lang->line('reports_total'), 'sorter' => 'currency_sorter'), + array('total' => $this->lang->line('reports_total'), 'sorter' => 'number_sorter'), array('payment_type' => $this->lang->line('reports_payment_type')), array('reference' => $this->lang->line('receivings_reference')), array('comment' => $this->lang->line('reports_comments'))), diff --git a/application/models/reports/Detailed_sales.php b/application/models/reports/Detailed_sales.php index fa1109312..2996a04be 100644 --- a/application/models/reports/Detailed_sales.php +++ b/application/models/reports/Detailed_sales.php @@ -24,11 +24,11 @@ class Detailed_sales extends Report array('quantity' => $this->lang->line('reports_quantity')), array('employee_name' => $this->lang->line('reports_sold_by')), array('customer_name' => $this->lang->line('reports_sold_to')), - array('subtotal' => $this->lang->line('reports_subtotal'), 'sorter' => 'currency_sorter'), - array('total' => $this->lang->line('reports_total'), 'sorter' => 'currency_sorter'), - array('tax' => $this->lang->line('reports_tax'), 'sorter' => 'currency_sorter'), - array('cost' => $this->lang->line('reports_cost'), 'sorter' => 'currency_sorter'), - array('profit' => $this->lang->line('reports_profit'), 'sorter' => 'currency_sorter'), + array('subtotal' => $this->lang->line('reports_subtotal'), 'sorter' => 'number_sorter'), + array('total' => $this->lang->line('reports_total'), 'sorter' => 'number_sorter'), + array('tax' => $this->lang->line('reports_tax'), 'sorter' => 'number_sorter'), + array('cost' => $this->lang->line('reports_cost'), 'sorter' => 'number_sorter'), + array('profit' => $this->lang->line('reports_profit'), 'sorter' => 'number_sorter'), array('payment_type' => $this->lang->line('sales_amount_tendered')), array('comment' => $this->lang->line('reports_comments'))), 'details' => array( diff --git a/application/models/reports/Inventory_summary.php b/application/models/reports/Inventory_summary.php index c8142343e..49c5f7df6 100644 --- a/application/models/reports/Inventory_summary.php +++ b/application/models/reports/Inventory_summary.php @@ -16,9 +16,9 @@ class Inventory_summary extends Report array('quantity' => $this->lang->line('reports_quantity')), array('reorder_level' => $this->lang->line('reports_reorder_level')), array('location_name' => $this->lang->line('reports_stock_location')), - array('cost_price' => $this->lang->line('reports_cost_price'), 'sorter' => 'currency_sorter'), - array('unit_price' => $this->lang->line('reports_unit_price'), 'sorter' => 'currency_sorter'), - array('subtotal' => $this->lang->line('reports_sub_total_value'), 'sorter' => 'currency_sorter')); + array('cost_price' => $this->lang->line('reports_cost_price'), 'sorter' => 'number_sorter'), + array('unit_price' => $this->lang->line('reports_unit_price'), 'sorter' => 'number_sorter'), + array('subtotal' => $this->lang->line('reports_sub_total_value'), 'sorter' => 'number_sorter')); } public function getData(array $inputs) diff --git a/application/models/reports/Specific_customer.php b/application/models/reports/Specific_customer.php index 83b2d2f50..71ce181ca 100644 --- a/application/models/reports/Specific_customer.php +++ b/application/models/reports/Specific_customer.php @@ -23,11 +23,11 @@ class Specific_customer extends Report array('sale_date' => $this->lang->line('reports_date')), array('quantity' => $this->lang->line('reports_quantity')), array('sold_by' => $this->lang->line('reports_sold_by')), - array('subtotal' => $this->lang->line('reports_subtotal'), 'sorter' => 'currency_sorter'), - array('tax' => $this->lang->line('reports_tax'), 'sorter' => 'currency_sorter'), - array('total' => $this->lang->line('reports_total'), 'sorter' => 'currency_sorter'), - array('cost' => $this->lang->line('reports_cost'), 'sorter' => 'currency_sorter'), - array('profit' => $this->lang->line('reports_profit'), 'sorter' => 'currency_sorter'), + array('subtotal' => $this->lang->line('reports_subtotal'), 'sorter' => 'number_sorter'), + array('tax' => $this->lang->line('reports_tax'), 'sorter' => 'number_sorter'), + array('total' => $this->lang->line('reports_total'), 'sorter' => 'number_sorter'), + array('cost' => $this->lang->line('reports_cost'), 'sorter' => 'number_sorter'), + array('profit' => $this->lang->line('reports_profit'), 'sorter' => 'number_sorter'), array('payment_type' => $this->lang->line('reports_payment_type')), array('comments' => $this->lang->line('reports_comments'))), 'details' => array( diff --git a/application/models/reports/Specific_discount.php b/application/models/reports/Specific_discount.php index 900083016..2ae0cfc11 100755 --- a/application/models/reports/Specific_discount.php +++ b/application/models/reports/Specific_discount.php @@ -23,10 +23,10 @@ class Specific_discount extends Report array('sale_date' => $this->lang->line('reports_date')), array('quantity' => $this->lang->line('reports_quantity')), array('customer_name' => $this->lang->line('reports_sold_to')), - array('subtotal' => $this->lang->line('reports_subtotal'), 'sorter' => 'currency_sorter'), - array('tax' => $this->lang->line('reports_tax'), 'sorter' => 'currency_sorter'), - array('total' => $this->lang->line('reports_total'), 'sorter' => 'currency_sorter'), - array('profit' => $this->lang->line('reports_profit'), 'sorter' => 'currency_sorter'), + array('subtotal' => $this->lang->line('reports_subtotal'), 'sorter' => 'number_sorter'), + array('tax' => $this->lang->line('reports_tax'), 'sorter' => 'number_sorter'), + array('total' => $this->lang->line('reports_total'), 'sorter' => 'number_sorter'), + array('profit' => $this->lang->line('reports_profit'), 'sorter' => 'number_sorter'), array('payment_type' => $this->lang->line('reports_payment_type')), array('comments' => $this->lang->line('reports_comments'))), 'details' => array( diff --git a/application/models/reports/Specific_employee.php b/application/models/reports/Specific_employee.php index 1366352db..2ba300d0b 100644 --- a/application/models/reports/Specific_employee.php +++ b/application/models/reports/Specific_employee.php @@ -23,11 +23,11 @@ class Specific_employee extends Report array('sale_date' => $this->lang->line('reports_date')), array('quantity' => $this->lang->line('reports_quantity')), array('customer_name' => $this->lang->line('reports_sold_to')), - array('subtotal' => $this->lang->line('reports_subtotal'), 'sorter' => 'currency_sorter'), - array('tax' => $this->lang->line('reports_tax'), 'sorter' => 'currency_sorter'), - array('total' => $this->lang->line('reports_total'), 'sorter' => 'currency_sorter'), - array('cost' => $this->lang->line('reports_cost'), 'sorter' => 'currency_sorter'), - array('profit' => $this->lang->line('reports_profit'), 'sorter' => 'currency_sorter'), + array('subtotal' => $this->lang->line('reports_subtotal'), 'sorter' => 'number_sorter'), + array('tax' => $this->lang->line('reports_tax'), 'sorter' => 'number_sorter'), + array('total' => $this->lang->line('reports_total'), 'sorter' => 'number_sorter'), + array('cost' => $this->lang->line('reports_cost'), 'sorter' => 'number_sorter'), + array('profit' => $this->lang->line('reports_profit'), 'sorter' => 'number_sorter'), array('payment_type' => $this->lang->line('reports_payment_type')), array('comments' => $this->lang->line('reports_comments'))), 'details' => array( diff --git a/application/models/reports/Summary_categories.php b/application/models/reports/Summary_categories.php index 4704f36d1..c642faab7 100644 --- a/application/models/reports/Summary_categories.php +++ b/application/models/reports/Summary_categories.php @@ -14,11 +14,11 @@ class Summary_categories extends Summary_report return array( array('category' => $this->lang->line('reports_category')), array('quantity' => $this->lang->line('reports_quantity')), - array('subtotal' => $this->lang->line('reports_subtotal'), 'sorter' => 'currency_sorter'), - array('tax' => $this->lang->line('reports_tax'), 'sorter' => 'currency_sorter'), - array('total' => $this->lang->line('reports_total'), 'sorter' => 'currency_sorter'), - array('cost' => $this->lang->line('reports_cost'), 'sorter' => 'currency_sorter'), - array('profit' => $this->lang->line('reports_profit'), 'sorter' => 'currency_sorter')); + array('subtotal' => $this->lang->line('reports_subtotal'), 'sorter' => 'number_sorter'), + array('tax' => $this->lang->line('reports_tax'), 'sorter' => 'number_sorter'), + array('total' => $this->lang->line('reports_total'), 'sorter' => 'number_sorter'), + array('cost' => $this->lang->line('reports_cost'), 'sorter' => 'number_sorter'), + array('profit' => $this->lang->line('reports_profit'), 'sorter' => 'number_sorter')); } protected function _select(array $inputs) diff --git a/application/models/reports/Summary_customers.php b/application/models/reports/Summary_customers.php index b298a1d4e..3b41c1301 100644 --- a/application/models/reports/Summary_customers.php +++ b/application/models/reports/Summary_customers.php @@ -14,11 +14,11 @@ class Summary_customers extends Summary_report return array( array('customer_name' => $this->lang->line('reports_customer')), array('quantity' => $this->lang->line('reports_quantity')), - array('subtotal' => $this->lang->line('reports_subtotal'), 'sorter' => 'currency_sorter'), - array('tax' => $this->lang->line('reports_tax'), 'sorter' => 'currency_sorter'), - array('total' => $this->lang->line('reports_total'), 'sorter' => 'currency_sorter'), - array('cost' => $this->lang->line('reports_cost'), 'sorter' => 'currency_sorter'), - array('profit' => $this->lang->line('reports_profit'), 'sorter' => 'currency_sorter')); + array('subtotal' => $this->lang->line('reports_subtotal'), 'sorter' => 'number_sorter'), + array('tax' => $this->lang->line('reports_tax'), 'sorter' => 'number_sorter'), + array('total' => $this->lang->line('reports_total'), 'sorter' => 'number_sorter'), + array('cost' => $this->lang->line('reports_cost'), 'sorter' => 'number_sorter'), + array('profit' => $this->lang->line('reports_profit'), 'sorter' => 'number_sorter')); } protected function _select(array $inputs) diff --git a/application/models/reports/Summary_discounts.php b/application/models/reports/Summary_discounts.php index 19b830440..156f58238 100644 --- a/application/models/reports/Summary_discounts.php +++ b/application/models/reports/Summary_discounts.php @@ -12,7 +12,7 @@ class Summary_discounts extends Summary_report protected function _get_data_columns() { return array( - array('discount' => $this->lang->line('reports_discount_percent'), 'sorter' => 'currency_sorter'), + array('discount' => $this->lang->line('reports_discount_percent'), 'sorter' => 'number_sorter'), array('count' => $this->lang->line('reports_count'))); } diff --git a/application/models/reports/Summary_employees.php b/application/models/reports/Summary_employees.php index d4d00f38d..788c2b720 100644 --- a/application/models/reports/Summary_employees.php +++ b/application/models/reports/Summary_employees.php @@ -14,11 +14,11 @@ class Summary_employees extends Summary_report return array( array('employee_name' => $this->lang->line('reports_employee')), array('quantity' => $this->lang->line('reports_quantity')), - array('subtotal' => $this->lang->line('reports_subtotal'), 'sorter' => 'currency_sorter'), - array('tax' => $this->lang->line('reports_tax'), 'sorter' => 'currency_sorter'), - array('total' => $this->lang->line('reports_total'), 'sorter' => 'currency_sorter'), - array('cost' => $this->lang->line('reports_cost'), 'sorter' => 'currency_sorter'), - array('profit' => $this->lang->line('reports_profit'), 'sorter' => 'currency_sorter')); + array('subtotal' => $this->lang->line('reports_subtotal'), 'sorter' => 'number_sorter'), + array('tax' => $this->lang->line('reports_tax'), 'sorter' => 'number_sorter'), + array('total' => $this->lang->line('reports_total'), 'sorter' => 'number_sorter'), + array('cost' => $this->lang->line('reports_cost'), 'sorter' => 'number_sorter'), + array('profit' => $this->lang->line('reports_profit'), 'sorter' => 'number_sorter')); } protected function _select(array $inputs) diff --git a/application/models/reports/Summary_items.php b/application/models/reports/Summary_items.php index ede319c4c..c107479f4 100644 --- a/application/models/reports/Summary_items.php +++ b/application/models/reports/Summary_items.php @@ -14,11 +14,11 @@ class Summary_items extends Summary_report return array( array('item_name' => $this->lang->line('reports_item')), array('quantity' => $this->lang->line('reports_quantity')), - array('subtotal' => $this->lang->line('reports_subtotal'), 'sorter' => 'currency_sorter'), - array('tax' => $this->lang->line('reports_tax'), 'sorter' => 'currency_sorter'), - array('total' => $this->lang->line('reports_total'), 'sorter' => 'currency_sorter'), - array('cost' => $this->lang->line('reports_cost'), 'sorter' => 'currency_sorter'), - array('profit' => $this->lang->line('reports_profit'), 'sorter' => 'currency_sorter')); + array('subtotal' => $this->lang->line('reports_subtotal'), 'sorter' => 'number_sorter'), + array('tax' => $this->lang->line('reports_tax'), 'sorter' => 'number_sorter'), + array('total' => $this->lang->line('reports_total'), 'sorter' => 'number_sorter'), + array('cost' => $this->lang->line('reports_cost'), 'sorter' => 'number_sorter'), + array('profit' => $this->lang->line('reports_profit'), 'sorter' => 'number_sorter')); } protected function _select(array $inputs) diff --git a/application/models/reports/Summary_payments.php b/application/models/reports/Summary_payments.php index f1bdd747c..2f8463b3f 100644 --- a/application/models/reports/Summary_payments.php +++ b/application/models/reports/Summary_payments.php @@ -14,7 +14,7 @@ class Summary_payments extends Summary_report return array( array('payment_type' => $this->lang->line('reports_payment_type')), array('report_count' => $this->lang->line('reports_count')), - array('amount_tendered' => $this->lang->line('sales_amount_tendered'), 'sorter' => 'currency_sorter')); + array('amount_tendered' => $this->lang->line('sales_amount_tendered'), 'sorter' => 'number_sorter')); } public function getData(array $inputs) diff --git a/application/models/reports/Summary_sales.php b/application/models/reports/Summary_sales.php index 58861df4d..db565b320 100644 --- a/application/models/reports/Summary_sales.php +++ b/application/models/reports/Summary_sales.php @@ -14,11 +14,11 @@ class Summary_sales extends Summary_report return array( array('sale_date' => $this->lang->line('reports_date')), array('quantity' => $this->lang->line('reports_quantity')), - array('subtotal' => $this->lang->line('reports_subtotal'), 'sorter' => 'currency_sorter'), - array('tax' => $this->lang->line('reports_tax'), 'sorter' => 'currency_sorter'), - array('total' => $this->lang->line('reports_total'), 'sorter' => 'currency_sorter'), - array('cost' => $this->lang->line('reports_cost'), 'sorter' => 'currency_sorter'), - array('profit' => $this->lang->line('reports_profit'), 'sorter' => 'currency_sorter')); + array('subtotal' => $this->lang->line('reports_subtotal'), 'sorter' => 'number_sorter'), + array('tax' => $this->lang->line('reports_tax'), 'sorter' => 'number_sorter'), + array('total' => $this->lang->line('reports_total'), 'sorter' => 'number_sorter'), + array('cost' => $this->lang->line('reports_cost'), 'sorter' => 'number_sorter'), + array('profit' => $this->lang->line('reports_profit'), 'sorter' => 'number_sorter')); } protected function _select(array $inputs) diff --git a/application/models/reports/Summary_suppliers.php b/application/models/reports/Summary_suppliers.php index 3b73dca7d..c639d626b 100644 --- a/application/models/reports/Summary_suppliers.php +++ b/application/models/reports/Summary_suppliers.php @@ -14,11 +14,11 @@ class Summary_suppliers extends Summary_report return array( array('supplier_name' => $this->lang->line('reports_supplier')), array('quantity' => $this->lang->line('reports_quantity')), - array('subtotal' => $this->lang->line('reports_subtotal'), 'sorter' => 'currency_sorter'), - array('tax' => $this->lang->line('reports_tax'), 'sorter' => 'currency_sorter'), - array('total' => $this->lang->line('reports_total'), 'sorter' => 'currency_sorter'), - array('cost' => $this->lang->line('reports_cost'), 'sorter' => 'currency_sorter'), - array('profit' => $this->lang->line('reports_profit'), 'sorter' => 'currency_sorter')); + array('subtotal' => $this->lang->line('reports_subtotal'), 'sorter' => 'number_sorter'), + array('tax' => $this->lang->line('reports_tax'), 'sorter' => 'number_sorter'), + array('total' => $this->lang->line('reports_total'), 'sorter' => 'number_sorter'), + array('cost' => $this->lang->line('reports_cost'), 'sorter' => 'number_sorter'), + array('profit' => $this->lang->line('reports_profit'), 'sorter' => 'number_sorter')); } protected function _select(array $inputs) diff --git a/application/models/reports/Summary_taxes.php b/application/models/reports/Summary_taxes.php index 78b4526fe..008a35dd8 100644 --- a/application/models/reports/Summary_taxes.php +++ b/application/models/reports/Summary_taxes.php @@ -12,11 +12,11 @@ class Summary_taxes extends Summary_report protected function _get_data_columns() { return array( - array('tax_percent' => $this->lang->line('reports_tax_percent'), 'sorter' => 'currency_sorter'), + array('tax' => $this->lang->line('reports_tax_percent'), 'sorter' => 'number_sorter'), array('report_count' => $this->lang->line('reports_count')), - array('subtotal' => $this->lang->line('reports_subtotal'), 'sorter' => 'currency_sorter'), - array('tax' => $this->lang->line('reports_tax'), 'sorter' => 'currency_sorter'), - array('total' => $this->lang->line('reports_total'), 'sorter' => 'currency_sorter')); + array('subtotal' => $this->lang->line('reports_subtotal'), 'sorter' => 'number_sorter'), + array('tax' => $this->lang->line('reports_tax'), 'sorter' => 'number_sorter'), + array('total' => $this->lang->line('reports_total'), 'sorter' => 'number_sorter')); } public function getData(array $inputs) diff --git a/application/views/partial/header.php b/application/views/partial/header.php index e7ac11354..2e9cab1b7 100644 --- a/application/views/partial/header.php +++ b/application/views/partial/header.php @@ -74,7 +74,7 @@ - + diff --git a/public/dist/opensourcepos.min.js b/public/dist/opensourcepos.min.js index 4076ad88d..d957bbf3e 100644 --- a/public/dist/opensourcepos.min.js +++ b/public/dist/opensourcepos.min.js @@ -1,5 +1,5 @@ /*! opensourcepos 26-11-2016 */ -function _classCallCheck(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function currency_sorter(a,b){return a=+a.replace(/[^0-9\.]+/g,""),b=+b.replace(/[^0-9\.]+/g,""),a>b?1:b>a?-1:0}if(function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){function c(a){var b=!!a&&"length"in a&&a.length,c=na.type(a);return"function"===c||na.isWindow(a)?!1:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}function d(a,b,c){if(na.isFunction(b))return na.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return na.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(xa.test(b))return na.filter(b,a,c);b=na.filter(b,a)}return na.grep(a,function(a){return na.inArray(a,b)>-1!==c})}function e(a,b){do a=a[b];while(a&&1!==a.nodeType);return a}function f(a){var b={};return na.each(a.match(Da)||[],function(a,c){b[c]=!0}),b}function g(){da.addEventListener?(da.removeEventListener("DOMContentLoaded",h),a.removeEventListener("load",h)):(da.detachEvent("onreadystatechange",h),a.detachEvent("onload",h))}function h(){(da.addEventListener||"load"===a.event.type||"complete"===da.readyState)&&(g(),na.ready())}function i(a,b,c){if(void 0===c&&1===a.nodeType){var d="data-"+b.replace(Ia,"-$1").toLowerCase();if(c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:Ha.test(c)?na.parseJSON(c):c}catch(e){}na.data(a,b,c)}else c=void 0}return c}function j(a){var b;for(b in a)if(("data"!==b||!na.isEmptyObject(a[b]))&&"toJSON"!==b)return!1;return!0}function k(a,b,c,d){if(Ga(a)){var e,f,g=na.expando,h=a.nodeType,i=h?na.cache:a,j=h?a[g]:a[g]&&g;if(j&&i[j]&&(d||i[j].data)||void 0!==c||"string"!=typeof b)return j||(j=h?a[g]=ca.pop()||na.guid++:g),i[j]||(i[j]=h?{}:{toJSON:na.noop}),("object"==typeof b||"function"==typeof b)&&(d?i[j]=na.extend(i[j],b):i[j].data=na.extend(i[j].data,b)),f=i[j],d||(f.data||(f.data={}),f=f.data),void 0!==c&&(f[na.camelCase(b)]=c),"string"==typeof b?(e=f[b],null==e&&(e=f[na.camelCase(b)])):e=f,e}}function l(a,b,c){if(Ga(a)){var d,e,f=a.nodeType,g=f?na.cache:a,h=f?a[na.expando]:na.expando;if(g[h]){if(b&&(d=c?g[h]:g[h].data)){na.isArray(b)?b=b.concat(na.map(b,na.camelCase)):b in d?b=[b]:(b=na.camelCase(b),b=b in d?[b]:b.split(" ")),e=b.length;for(;e--;)delete d[b[e]];if(c?!j(d):!na.isEmptyObject(d))return}(c||(delete g[h].data,j(g[h])))&&(f?na.cleanData([a],!0):la.deleteExpando||g!=g.window?delete g[h]:g[h]=void 0)}}}function m(a,b,c,d){var e,f=1,g=20,h=d?function(){return d.cur()}:function(){return na.css(a,b,"")},i=h(),j=c&&c[3]||(na.cssNumber[b]?"":"px"),k=(na.cssNumber[b]||"px"!==j&&+i)&&Ka.exec(na.css(a,b));if(k&&k[3]!==j){j=j||k[3],c=c||[],k=+i||1;do f=f||".5",k/=f,na.style(a,b,k+j);while(f!==(f=h()/i)&&1!==f&&--g)}return c&&(k=+k||+i||0,e=c[1]?k+(c[1]+1)*c[2]:+c[2],d&&(d.unit=j,d.start=k,d.end=e)),e}function n(a){var b=Sa.split("|"),c=a.createDocumentFragment();if(c.createElement)for(;b.length;)c.createElement(b.pop());return c}function o(a,b){var c,d,e=0,f="undefined"!=typeof a.getElementsByTagName?a.getElementsByTagName(b||"*"):"undefined"!=typeof a.querySelectorAll?a.querySelectorAll(b||"*"):void 0;if(!f)for(f=[],c=a.childNodes||a;null!=(d=c[e]);e++)!b||na.nodeName(d,b)?f.push(d):na.merge(f,o(d,b));return void 0===b||b&&na.nodeName(a,b)?na.merge([a],f):f}function p(a,b){for(var c,d=0;null!=(c=a[d]);d++)na._data(c,"globalEval",!b||na._data(b[d],"globalEval"))}function q(a){Oa.test(a.type)&&(a.defaultChecked=a.checked)}function r(a,b,c,d,e){for(var f,g,h,i,j,k,l,m=a.length,r=n(b),s=[],t=0;m>t;t++)if(g=a[t],g||0===g)if("object"===na.type(g))na.merge(s,g.nodeType?[g]:g);else if(Ua.test(g)){for(i=i||r.appendChild(b.createElement("div")),j=(Pa.exec(g)||["",""])[1].toLowerCase(),l=Ta[j]||Ta._default,i.innerHTML=l[1]+na.htmlPrefilter(g)+l[2],f=l[0];f--;)i=i.lastChild;if(!la.leadingWhitespace&&Ra.test(g)&&s.push(b.createTextNode(Ra.exec(g)[0])),!la.tbody)for(g="table"!==j||Va.test(g)?""!==l[1]||Va.test(g)?0:i:i.firstChild,f=g&&g.childNodes.length;f--;)na.nodeName(k=g.childNodes[f],"tbody")&&!k.childNodes.length&&g.removeChild(k);for(na.merge(s,i.childNodes),i.textContent="";i.firstChild;)i.removeChild(i.firstChild);i=r.lastChild}else s.push(b.createTextNode(g));for(i&&r.removeChild(i),la.appendChecked||na.grep(o(s,"input"),q),t=0;g=s[t++];)if(d&&na.inArray(g,d)>-1)e&&e.push(g);else if(h=na.contains(g.ownerDocument,g),i=o(r.appendChild(g),"script"),h&&p(i),c)for(f=0;g=i[f++];)Qa.test(g.type||"")&&c.push(g);return i=null,r}function s(){return!0}function t(){return!1}function u(){try{return da.activeElement}catch(a){}}function v(a,b,c,d,e,f){var g,h;if("object"==typeof b){"string"!=typeof c&&(d=d||c,c=void 0);for(h in b)v(a,h,c,d,b[h],f);return a}if(null==d&&null==e?(e=c,d=c=void 0):null==e&&("string"==typeof c?(e=d,d=void 0):(e=d,d=c,c=void 0)),e===!1)e=t;else if(!e)return a;return 1===f&&(g=e,e=function(a){return na().off(a),g.apply(this,arguments)},e.guid=g.guid||(g.guid=na.guid++)),a.each(function(){na.event.add(this,b,e,d,c)})}function w(a,b){return na.nodeName(a,"table")&&na.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function x(a){return a.type=(null!==na.find.attr(a,"type"))+"/"+a.type,a}function y(a){var b=eb.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function z(a,b){if(1===b.nodeType&&na.hasData(a)){var c,d,e,f=na._data(a),g=na._data(b,f),h=f.events;if(h){delete g.handle,g.events={};for(c in h)for(d=0,e=h[c].length;e>d;d++)na.event.add(b,c,h[c][d])}g.data&&(g.data=na.extend({},g.data))}}function A(a,b){var c,d,e;if(1===b.nodeType){if(c=b.nodeName.toLowerCase(),!la.noCloneEvent&&b[na.expando]){e=na._data(b);for(d in e.events)na.removeEvent(b,d,e.handle);b.removeAttribute(na.expando)}"script"===c&&b.text!==a.text?(x(b).text=a.text,y(b)):"object"===c?(b.parentNode&&(b.outerHTML=a.outerHTML),la.html5Clone&&a.innerHTML&&!na.trim(b.innerHTML)&&(b.innerHTML=a.innerHTML)):"input"===c&&Oa.test(a.type)?(b.defaultChecked=b.checked=a.checked,b.value!==a.value&&(b.value=a.value)):"option"===c?b.defaultSelected=b.selected=a.defaultSelected:("input"===c||"textarea"===c)&&(b.defaultValue=a.defaultValue)}}function B(a,b,c,d){b=fa.apply([],b);var e,f,g,h,i,j,k=0,l=a.length,m=l-1,n=b[0],p=na.isFunction(n);if(p||l>1&&"string"==typeof n&&!la.checkClone&&db.test(n))return a.each(function(e){var f=a.eq(e);p&&(b[0]=n.call(this,e,f.html())),B(f,b,c,d)});if(l&&(j=r(b,a[0].ownerDocument,!1,a,d),e=j.firstChild,1===j.childNodes.length&&(j=e),e||d)){for(h=na.map(o(j,"script"),x),g=h.length;l>k;k++)f=j,k!==m&&(f=na.clone(f,!0,!0),g&&na.merge(h,o(f,"script"))),c.call(a[k],f,k);if(g)for(i=h[h.length-1].ownerDocument,na.map(h,y),k=0;g>k;k++)f=h[k],Qa.test(f.type||"")&&!na._data(f,"globalEval")&&na.contains(i,f)&&(f.src?na._evalUrl&&na._evalUrl(f.src):na.globalEval((f.text||f.textContent||f.innerHTML||"").replace(fb,"")));j=e=null}return a}function C(a,b,c){for(var d,e=b?na.filter(b,a):a,f=0;null!=(d=e[f]);f++)c||1!==d.nodeType||na.cleanData(o(d)),d.parentNode&&(c&&na.contains(d.ownerDocument,d)&&p(o(d,"script")),d.parentNode.removeChild(d));return a}function D(a,b){var c=na(b.createElement(a)).appendTo(b.body),d=na.css(c[0],"display");return c.detach(),d}function E(a){var b=da,c=jb[a];return c||(c=D(a,b),"none"!==c&&c||(ib=(ib||na("