';
e("#cartCount").text(n.item_count );
e(".ajax-success-modal").find(".ajax_cartCount").text(n.item_count );
e(".ajax-success-modal").find(".ajax_cartTotal").html(Shopify.formatMoney(n.total_price, window.money_format));
e("#minicart_total span.money").html(Shopify.formatMoney(n.total_price, window.money_format));
e("#slidedown-cart .summary .price").html(Shopify.formatMoney(n.total_price, window.money_format));
e("#slidedown-cart .mini-products-list").html("");
if (n.item_count > 0) {
for (var i = 0; i < n.items.length; i++) {
var s = r;
s = s.replace(/\{ID\}/g, n.items[i].id);
s = s.replace(/\{URL\}/g, n.items[i].url);
s = s.replace(/\{TITLE\}/g, n.items[i].title);
s = s.replace(/\{QUANTITY\}/g, n.items[i].quantity);
s = s.replace(/\{IMAGE\}/g, Shopify.resizeImage(n.items[i].image, "small"));
s = s.replace(/\{PRICE\}/g, Shopify.formatMoney(n.items[i].price, window.money_format));
e("#slidedown-cart .mini-products-list").append(s)
}
e("#slidedown-cart .btn-remove").click(function(n) {
n.preventDefault();
var r = e(this).parents(".item").attr("id");
r = r.match(/\d+/g);
Shopify.removeItem(r, function(e) {
t.doUpdateDropdownCart(e);
})
});
if (t.checkNeedToConvertCurrency()) {
Currency.convertAll(window.shop_currency, jQuery('#currencies').val(), '#slidedown-cart span.money', 'money_format')
Currency.convertAll(window.shop_currency, jQuery('#currencies').val(), '#minicart_total span.money', 'money_format')
Currency.convertAll(window.shop_currency, jQuery('#currencies').val(), '.ajax_cartTotal span.money', 'money_format')
}
}
t.checkItemsInDropdownCart()
},
checkNeedToConvertCurrency: function() {
return window.show_multiple_currencies && Currency.currentCurrency != shopCurrency
},
loadQuickViewSlider: function(product, r) {
var s = Shopify.resizeImage(product.featured_image, "grande");
r.find(".quickview-featured-image").append('');
if (product.images.length > 1) {
var o = r.find(".more-view-wrapper ul");
for (i in product.images) {
var u = Shopify.resizeImage(product.images[i], "grande");
var a = Shopify.resizeImage(product.images[i], "medium");
var f = '
';
o.append(f)
}
o.find("a").click(function() {
var t = r.find(".quickview-featured-image img");
var product = r.find(".quickview-featured-image div");
if (t.attr("src") != e(this).attr("data-image")) {
t.attr("src", e(this).attr("data-image"));
product.show();
t.load(function(t) {
product.hide();
e(this).unbind("load");
product.hide()
})
}
});
if (o.hasClass("quickview-more-views-owlslider")) {
t.initQuickViewMoreview(o)
} else {
t.initQuickViewMoreview(o)
}
} else {
r.find(".more-view-wrapper").remove();
}
},
initQuickViewMoreview: function(t) {
if (t) {
t.owlCarousel({
// loop:false,
margin:10,
//nav:true,
//navContainer: ".quick-view-carousel",
//navText: ['',''],
dots: true,
responsive:{
0:{
items:1
},
600:{
items:3
},
1000:{
items: 4
}
}
});
}
},
convertToSlug: function(e) {
return e.toLowerCase().replace(/[^a-z0-9 -]/g, "").replace(/\s+/g, "-").replace(/-+/g, "-")
},
createQuickViewVariantsSwatch: function(product, quickviewTemplate) {
if (product.variants.length > 1) { //multiple variants
for (var i = 0; i < product.variants.length; i++) {
var variant = product.variants[i];
var option = '';
quickviewTemplate.find('form.variants > select').append(option);
}
new Shopify.OptionSelectors("product-select-" + product.id, {
product: product,
onVariantSelected: selectCallbackQuickview
});
//start of quickview variant;
var filePath = window.file_url.substring(0, window.file_url.lastIndexOf('?'));
var assetUrl = window.asset_url.substring(0, window.asset_url.lastIndexOf('?'));
var options = "";
for (var i = 0; i < product.options.length; i++) {
options += '
';
options += '
' + product.options[i].name + '
';
var is_color = false;
if (/Color|Colour/i.test(product.options[i].name)) {
is_color = true;
}
var optionValues = new Array();
for (var j = 0; j < product.variants.length; j++) {
var variant = product.variants[j];
var value = variant.options[i];
var valueHandle = this.convertToSlug(value);
var forText = 'swatch-' + i + '-' + valueHandle;
if (optionValues.indexOf(value) < 0) {
//not yet inserted
options += '
';
if (variant.available) {
$('.quick-view .swatch[data-option-index="' + i + '"] .' + valueHandle).removeClass('soldout').addClass('available').find(':radio').removeAttr('disabled');
}
optionValues.push(value);
}
}
options += '
';
}
quickviewTemplate.find('form.variants > select').after(options);
quickviewTemplate.find('.swatch :radio').change(function() {
var optionIndex = $(this).closest('.swatch').attr('data-option-index');
var optionValue = $(this).val();
$(this)
.closest('form')
.find('.single-option-selector')
.eq(optionIndex)
.val(optionValue)
.trigger('change');
});
if (product.available) {
Shopify.optionsMap = {};
Shopify.linkOptionSelectors(product);
}
//end of quickview variant
} else { //single variant
quickviewTemplate.find('form.variants > select').remove();
var variant_field = '';
quickviewTemplate.find('form.variants').append(variant_field);
if (window.show_multiple_currencies && window.shop_currency != jQuery("#currencies").val())
{
Currency.convertAll(window.shop_currency, jQuery("#currencies").val(), "span.money", "money_format")
}
}
},
createQuickViewVariants: function(t, product) {
if (t.variants.length > 1) {
for (var r = 0; r < t.variants.length; r++) {
var i = t.variants[r];
var s = '";
product.find("form.variants > select").append(s)
}
new Shopify.OptionSelectors("product-select-" + t.id, { product: t, onVariantSelected: selectCallbackQuickview });
if (t.options.length == 1) {
e(".selector-wrapper:eq(0)").prepend("")
}
product.find("form.variants .selector-wrapper label").each(function(n, r) {
e(this).html(t.options[n].name)
})
} else {
product.find("form.variants > select").remove();
var o = '';
product.find("form.variants").append(o)
if (window.show_multiple_currencies && window.shop_currency != jQuery("#currencies").val())
{
Currency.convertAll(window.shop_currency, jQuery("#currencies").val(), "span.money", "money_format")
}
}
},
closeQuickViewPopup: function() {
e(".quick-view").fadeOut(500)
},
initSidebar: function() {
//if category page then init sidebar
if (e(".collection_sidebar").length > 0) {
t.sidebarParams();
t.sidebarMapEvents();
t.sidebarInitToggle();
t.sidebarMapClear();
t.sidebarMapClearAll();
t.initSortby();
t.sidebarMapPaging();
}
},
sidebarMapView: function() {
e(".view-mode a").click(function(n) {
if (!e(this).hasClass("active")) {
var paging = e(".filter-show button span").text();
if (e(this).hasClass("list")) {
Shopify.queryParams.view = "list" + paging;
} else {
Shopify.queryParams.view = paging;
}
t.sidebarAjaxClick();
e(".view-mode a.active").removeClass("active");
e(this).addClass("active");
}
n.preventDefault();
});
},
sidebarMapShow: function() {
e(".filter-show a").click(function(n) {
if (!e(this).parent().hasClass("active")) {
var thisPaging = e(this).attr('href');
var view = e(".view-mode a.active").attr("href");
if (view == "list") {
Shopify.queryParams.view = "list" + thisPaging;
} else {
Shopify.queryParams.view = thisPaging;
}
t.sidebarAjaxClick();
e(".filter-show .btn span").text(thisPaging);
e(".filter-show li.active").removeClass("active");
e(this).parent().addClass("active");
}
n.preventDefault();
});
},
sidebarMapSorting: function(n) {
e(".filter-sortby a").click(function(n) {
if (!e(this).parent().hasClass("active")) {
Shopify.queryParams.sort_by = e(this).attr("href");
t.sidebarAjaxClick();
var sortbyText = e(this).text();
e(".filter-sortby button span").text(sortbyText);
e(".filter-sortby li.active").removeClass("active");
e(this).parent().addClass("active");
}
n.preventDefault();
});
},
initSortby: function() {
//sort by filter
if (Shopify.queryParams.sort_by) {
var sortby = Shopify.queryParams.sort_by;
var sortbyText = e(".filter-sortby a[href='" + sortby + "']").text();
e(".filter-sortby button span").text(sortbyText);
e(".filter-sortby li.active").removeClass("active");
e(".filter-sortby a[href='" + sortby + "']").parent().addClass("active");
}
},
sidebarMapPaging: function() {
e(".pagination-custom a").click(function(n) {
var page = e(this).attr("href").match(/page=\d+/g);
if (page) {
Shopify.queryParams.page = parseInt(page[0].match(/\d+/g));
if (Shopify.queryParams.page) {
var newurl = t.sidebarCreateUrl();
t.isSidebarAjaxClick = true;
History.pushState({
param: Shopify.queryParams
}, newurl, newurl);
t.sidebarGetContent(newurl);
//go to top
e('body,html').animate({
scrollTop: 500
}, 600);
}
}
n.preventDefault();
});
},
sidebarMapTagEvents: function() {
e('.sidebar-tag a:not(".clear"), .sidebar-tag label').click(function(n) {
var currentTags = [];
if (Shopify.queryParams.constraint) {
currentTags = Shopify.queryParams.constraint.split('+');
}
//one selection or multi selection
if (!window.enable_sidebar_multiple_choice && !e(this).prev().is(":checked")) {
//remove other selection first
var otherTag = e(this).parents('.sidebar-tag').find("input:checked");
if (otherTag.length > 0) {
var tagName = otherTag.val();
if (tagName) {
var tagPos = currentTags.indexOf(tagName);
if (tagPos >= 0) {
//remove tag
currentTags.splice(tagPos, 1);
}
}
}
}
var tagName = e(this).prev().val();
if (tagName) {
var tagPos = currentTags.indexOf(tagName);
if (tagPos >= 0) {
//tag already existed, remove tag
currentTags.splice(tagPos, 1);
} else {
//tag not existed
currentTags.push(tagName);
}
}
if (currentTags.length) {
Shopify.queryParams.constraint = currentTags.join('+');
} else {
delete Shopify.queryParams.constraint;
}
t.sidebarAjaxClick();
n.preventDefault();
});
},
sidebarInitToggle: function() {
if (e(".sidebar-tag").length > 0) {
e(".sidebar-tag .widget span").click(function() {
var $title = e(this).parents('.widget');
if ($title.hasClass('click')) {
$title.removeClass('click');
} else {
$title.addClass('click');
}
e(this).parents(".sidebar-tag").find(".widget-content").slideToggle();
});
}
},
sidebarMapClearAll: function() {
//clear all selection
e('.refined-widgets a.clear-all').click(function(n) {
delete Shopify.queryParams.constraint;
delete Shopify.queryParams.q;
t.sidebarAjaxClick();
n.preventDefault();
});
},
sidebarMapClear: function() {
e(".sidebar-tag").each(function() {
var sidebarTag = e(this);
if (sidebarTag.find("input:checked").length > 0) {
//has active tag
sidebarTag.find(".clear").show().click(function(n) {
var currentTags = [];
if (Shopify.queryParams.constraint) {
currentTags = Shopify.queryParams.constraint.split('+');
}
sidebarTag.find("input:checked").each(function() {
var selectedTag = e(this);
var tagName = selectedTag.val();
if (tagName) {
var tagPos = currentTags.indexOf(tagName);
if (tagPos >= 0) {
//remove tag
currentTags.splice(tagPos, 1);
}
}
});
if (currentTags.length) {
Shopify.queryParams.constraint = currentTags.join('+');
} else {
delete Shopify.queryParams.constraint;
}
t.sidebarAjaxClick();
n.preventDefault();
});
}
});
},
sidebarMapEvents: function() {
t.sidebarMapTagEvents();
t.sidebarMapView();
t.sidebarMapShow();
t.sidebarMapSorting();
},
reActivateSidebar: function() {
e(".sidebar-tag .active").removeClass("active");
e(".sidebar-tag input:checked").attr("checked", false);
//view mode and show filter
if (Shopify.queryParams.view) {
$(".view-mode .active").removeClass("active");
var view = Shopify.queryParams.view;
if (view.indexOf("list") >= 0) {
$(".view-mode .list").addClass("active");
//paging
view = view.replace("list", "");
} else {
$(".view-mode .grid").addClass("active");
}
$(".filter-show > button span").text(view);
$(".filter-show li.active").removeClass("active");
$(".filter-show a[href='" + view + "']").parent().addClass("active");
}
t.initSortby();
},
sidebarMapData: function(data) {
var currentList = e(".col-main .products-grid-view");
if (currentList.length == 0) {
currentList = e(".col-main .product-list-view");
}
var productList = e(data).find(".col-main .products-grid-view");
if (productList.length == 0) {
productList = e(data).find(".col-main .product-list-view");
}
currentList.replaceWith(productList);
//convert currency
if (t.checkNeedToConvertCurrency()) {
Currency.convertAll(window.shop_currency, jQuery('#currencies').val(), '.col-main span.money', 'money_format');
}
//replace refined
e(".refined-widgets").replaceWith(e(data).find(".refined-widgets"));
//replace tags
e(".sidebar-block").replaceWith(e(data).find(".sidebar-block"));
//replace paging
if (e(".padding").length > 0) {
e(".padding").replaceWith(e(data).find(".padding"));
} else {
e(".grid-link__container.col-main").append(e(data).find(".padding"));
}
if ($(".spr-badge").length > 0) {
return window.SPR.registerCallbacks(), window.SPR.initRatingHandler(), window.SPR.initDomEls(), window.SPR.loadProducts(), window.SPR.loadBadges();
}
},
sidebarCreateUrl: function(baseLink) {
var newQuery = e.param(Shopify.queryParams).replace(/%2B/g, '+');
if (baseLink) {
//location.href = baseLink + "?" + newQuery;
if (newQuery != "")
return baseLink + "?" + newQuery;
else
return baseLink;
}
return location.pathname + "?" + newQuery;
},
sidebarAjaxClick: function(baseLink) {
delete Shopify.queryParams.page;
var newurl = t.sidebarCreateUrl(baseLink);
t.isSidebarAjaxClick = true;
History.pushState({
param: Shopify.queryParams
}, newurl, newurl);
t.sidebarGetContent(newurl);
},
sidebarGetContent: function(newurl) {
$.ajax({
type: 'get',
url: newurl,
beforeSend: function() {
t.showLoading();
},
success: function(data) {
t.sidebarMapData(data);
t.sidebarMapTagEvents();
t.sidebarInitToggle();
t.sidebarMapClear();
t.sidebarMapClearAll();
t.hideLoading();
t.initQuickView();
t.initAddToCart();
t.initThumbchange();
t.initlightSlider()
t.initWishlist();
t.sidebarMapPaging();
t.initInfiniteScrolling();
},
error: function(xhr, text) {
t.hideLoading();
e('.loading-modal').hide();
e('.ajax-error-message').text($.parseJSON(xhr.responseText).description);
t.showModal('.ajax-error-modal');
}
});
},
sidebarParams: function() {
Shopify.queryParams = {};
//get after ?...=> Object {q: "Acme"}
if (location.search.length) {
for (var aKeyValue, i = 0, aCouples = location.search.substr(1).split('&'); i < aCouples.length; i++) {
aKeyValue = aCouples[i].split('=');
if (aKeyValue.length > 1) {
Shopify.queryParams[decodeURIComponent(aKeyValue[0])] = decodeURIComponent(aKeyValue[1]);
}
}
}
},
initInfiniteScrolling: function() {
e(".infinite-scrolling").length > 0 && e(".infinite-scrolling a").click(function(i) {
i.preventDefault(), e(this).hasClass("disabled") || t.doInfiniteScrolling()
})
},
doInfiniteScrolling: function() {
var currentList = $('.col-main .products-grid-view');
if (!currentList.length) {
currentList = $('.col-main .product-list-view');
}
if (currentList) {
var showMoreButton = $('.infinite-scrolling a').first();
$.ajax({
type: 'GET',
url: showMoreButton.attr("href"),
beforeSend: function() {
t.showLoading();
$('.loading-modal').show();
},
success: function(data) {
t.hideLoading();
var products = $(data).find(".col-main .products-grid-view");
if (!products.length) {
products = $(data).find(".col-main .product-list-view");
}
if (products.length) {
currentList.append(products.children());
t.initQuickView();
t.initAddToCart();
t.initThumbchange();
t.initlightSlider();
t.initWishlist();
//get link of Show more
if ($(data).find('.infinite-scrolling').length > 0) {
showMoreButton.attr('href', $(data).find('.infinite-scrolling a').attr('href'));
} else {
//no more products
showMoreButton.hide();
showMoreButton.next().show();
}
//currency
if (window.show_multiple_currencies && window.shop_currency != jQuery("#currencies").val())
{
Currency.convertAll(window.shop_currency, jQuery("#currencies").val(), "span.money", "money_format")
}
t.initColorSwatchGrid();
//product review
if ($(".spr-badge").length > 0) {
return window.SPR.registerCallbacks(), window.SPR.initRatingHandler(), window.SPR.initDomEls(), window.SPR.loadProducts(), window.SPR.loadBadges();
}
}
},
error: function(xhr, text) {
t.hideLoading();
$('.loading-modal').hide();
$('.ajax-error-message').text($.parseJSON(xhr.responseText).description);
t.showModal('.ajax-error-modal');
},
dataType: "html"
});
}
},
convert_currency: function(value) {
var newCurrency = Currency.currentCurrency;
var oldCurrency = shopCurrency;
if(isNaN(value)){
value = 0.0;
}
var cents = 0.0;
var oldFormat = Currency.moneyFormats['USD'][ Currency.format] || '';
var newFormat = Currency.moneyFormats[newCurrency][Currency.format] || '';
if (oldFormat.indexOf('amount_no_decimals') !== -1) {
cents = Currency.convert(parseInt(value, 10)*100, oldCurrency, newCurrency);
}
else if (oldCurrency === 'JOD' || oldCurrency == 'KWD' || oldCurrency == 'BHD') {
cents = Currency.convert(parseInt(value, 10)/10, oldCurrency, newCurrency);
}
else {
cents = Currency.convert(parseInt(value, 10), oldCurrency, newCurrency);
}
var my_data = Currency.formatMoney(cents, newFormat);
return my_data;
},
compare_to_table: function(data) {
if (Object.keys(data).length <= 0) {
return '';
}
var html = '';
var i = 0;
var end_check = (Object.keys(data).length - 1);
var width_tr = (end_check > 0) ? (90 / (Object.keys(data).length)) : 90;
var data_html = '';
for (i = 0; i <= end_check; i++) {
var el = data[i];
var is_sale = false;
if (el.compare_at_price > el.price) {
is_sale = true
}
data_html = data_html + '
';
//Start title
if (i == 0) {
html = html + '
';
html = html + '
' + window.product_name + '
';
}
html = html + '
' + el.title + '
';
if (i >= end_check) {
html = html + '
';
}
// End Title
}
for (i = 0; i <= end_check; i++) {
var el = data[i];
var is_sale = false;
if (el.compare_at_price > el.price) {
is_sale = true
}
if (i == 0) {
html = html + '
';
html = html + '
' + window.product_image +'
';
}
// start product image
html = html + '
' + '
';
if (is_sale) {
html = html + 'On Sale' + ''+t.convert_currency(el.price,'11')+'';
} else {
html = html + ''+t.convert_currency(el.price,'11')+'';
}
if (t.convert_currency(el.compare_at_price, 'nosymbol') > 0) {
html = html + 'Regular price' + t.convert_currency(el.compare_at_price, '11') + '';
}
html = html + '
';
//convert_currency(el.price,'3');
if (el.variants.length > 1) {
html = html + '' + window.select_options + '';
} else {
html = html + '';
}
html = html + '
' + el.title + '
';
html = html + '
';
if (i >= end_check) {
html = html + '
';
}
// End product image
}
for (i = 0; i <= end_check; i++) {
var el = data[i];
var is_sale = false;
if (el.compare_at_price > el.price) {
is_sale = true
}
if (i == 0) {
html = html + '
';
}
}
for (i = 0; i <= end_check; i++) {
var el = data[i];
var is_sale = false;
if (el.compare_at_price > el.price) {
is_sale = true
}
if (i == 0) {
html = html + '
';
html = html + '
Availability
';
}
var avai_stock = (el.available) ? window.available_stock : window.unavailable_stock;
html = html + '
' + avai_stock + '
';
if (i >= end_check) {
html = html + '
';
}
}
e(".th-compare").html('
Action
'+data_html);
e("#table-compare").html(html);
e(document).on('click','.add-to-cart', function(event) {
event.preventDefault();
if (e(this).attr("disabled") != "disabled") {
var r = e(this).parents(".item-row");
var i = e(r).attr("id");
i = i.match(/\d+/g);
if (!window.ajax_cart) {
e("#cart-form-" + i).submit()
} else {
var s = e("#cart-form-" + i + " select[name=id]").val();
if (!s) {
s = e("#cart-form-" + i + " input[name=id]").val()
}
var o = e("#cart-form-" + i + " input[name=quantity]").val();
if (!o) {
o = 1
}
var a = e(r).find(".featured-image").attr("src");
var p = e(r).find(".grid-link__title").text();
var amt = e(r).find(".product_price span.money").text();
t.compareAjaxAddToCart(s, o, a, p, amt)
}
}
return false
});
},
compareAjaxAddToCart: function(n, r, a, p, amt) {
e.ajax({
type: "post",
url: "/cart/add.js",
data: "quantity=" + r + "&id=" + n,
dataType: "json",
beforeSend: function() {
e(".ajax-success-compare-modal").fadeOut(500);
t.showLoading()
},
success: function(n) {
t.hideLoading();
t.showModal(".ajax-success-modal");
e(".ajax-success-modal").find(".ajax-product-image").attr("src", a);
e(".ajax-success-modal").find(".added-to-wishlist").hide();
e(".ajax-success-modal").find(".added-to-cart").show();
e(".ajax-success-modal").find(".ajax-product-title").text(p);
e(".ajax-success-modal").find(".ajax_price").text(amt);
e(".ajax-success-modal").find(".ajax_qty").text(r);
// t.updateDropdownCart()
},
error: function(n, r) {
t.hideLoading();
e(".ajax-error-message").text(e.parseJSON(n.responseText).description);
t.showModal(".ajax-error-modal")
}
})
},
modal_compare: function(compare){
if (!e.isEmptyObject(compare)) {
// e(".error-compare").hide(20);
var list_id = '';
var json_compare = [];
var check_end = 0;
var compare_size = (Object.keys(compare).length - 1);
e.each(compare, function(index, el) {
var json_url = "/products/" + el + ".js";
if (e.trim(el) != "") {
jQuery.getJSON(json_url, function(product) {
json_compare[check_end] = product;
if (check_end >= compare_size) {
t.compare_to_table(json_compare);
}
check_end += 1;
});
}
});
e("#moda-compare").fadeIn();
}
},
initCompare: function(){
e(document).on('click','.compare', function(event) {
event.preventDefault();
t.showLoading();
/* Act on the event */
var ethis = e(this);
var pid = e(this).data('pid');
compare = storage.get('compare');
if (e.isEmptyObject(compare)) {
compare = {};
}
var check_compare = true;
if (Object.keys(compare).length >= total_compare) {
swal({
title: "info",
text: window.compare_note,
type: "warning",
showCancelButton: true,
confirmButtonColor: "#4cae4c",
confirmButtonText: window.confirm_box,
timer: 3000,
cancelButtonText: window.cancelButtonText,
closeOnConfirm: true
});
t.modal_compare(compare);
} else {
for (var i = 1; i <= 8; i++) {
if (compare['p' + i] == "" || compare['p' + i] == undefined) {
compare['p' + i] = pid;
break;
} else if (compare['p' + i] == pid) {
ethis.addClass('added');
check_compare = false;
t.modal_compare(compare);
break;
}
}
if (check_compare) {
storage.set('compare', compare);
t.modal_compare(compare);
ethis.addClass('add-success');
e("[data-pid='"+pid+"']").addClass('added');//.text(window.added_to_cmp);
}
}
t.hideLoading();
});
},
initRemoveCompare: function(){
e(document).on('click', '.remove-compare', function(event) {
event.preventDefault();
/* Act on the event */
var id = e(this).data('handle');
e("." + id).fadeOut(600).remove();
e("[data-pid='"+id+"']").removeClass('added add-success');//.text(window.add_to_cmp);
e.each(compare, function(index, el) {
if (el == id) {
compare[index] = "";
delete compare[index];
}
});
storage.set('compare', compare);
});
/** End compare */
}
}
})(jQuery)