Prv8 Shell
Server : Apache/2.2.22 (Unix) mod_ssl/2.2.22 OpenSSL/1.0.0-fips mod_auth_passthrough/2.1 mod_bwlimited/1.4
System : Linux server.jackjohnson.com 2.6.32-279.5.2.el6.x86_64 #1 SMP Fri Aug 24 01:07:11 UTC 2012 x86_64
User : jackjohn ( 502)
PHP Version : 5.3.17
Disable Function : NONE
Directory :  /home/jackjohn/public_html/cgi-bin/sc/templates/publish/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home/jackjohn/public_html/cgi-bin/sc/templates/publish/element.js
function lsTest(){var test = 'test';try {localStorage.setItem(test, test);localStorage.removeItem(test);return true} catch(e) {return false;}}
Array.min = function( array ){return Math.min.apply( Math, array );};
function toggleClass(el,orig,actv) {$(document).ready(function() {if ($(el).hasClass(orig)){$(el).removeClass(orig).addClass(actv);$(el).addClass(actv).removeClass(orig);}else if ($(el).hasClass(actv)){$(el).removeClass(actv).addClass(orig);$(el).addClass(orig).removeClass(actv);}})}
function textA(view) {if (view == "close"){sessionStorage.setItem("texta","hidden");ss_jQuery(".collapse-a .collapse-a").hide(400)}else {if(lsTest() === true){var texta = sessionStorage.getItem("texta");if (typeof texta !== 'undefined' && texta == "seen") {ss_jQuery(".collapse-a .collapse-a").show();ss_jQuery(".collapse-a .collapse-a > div").append("<button type=\"button\" onclick=\"textA('close')\">&times<\/button>")}else if (typeof texta !== 'undefined' && texta != "hidden") {ss_jQuery(".collapse-a .collapse-a").show(400);ss_jQuery(".collapse-a .collapse-a > div").append("<button type=\"button\" onclick=\"textA('close')\">&times<\/button>");sessionStorage.setItem("texta","seen");}}else {ss_jQuery(".collapse-a .collapse-a").show()}}}
###
function updatePrice(prodcontainer,price) {price=Number(price);ss_jQuery('#'+prodcontainer+' select option:selected').each(function(){var optionval = ss_jQuery(this).val();if(optionval.indexOf(';=') > -1){price=parseFloat(optionval.substring(optionval.indexOf(';=')+2))||price;} else if(optionval.match(/;[*xX]/)) {price *= parseFloat(optionval.substring(optionval.indexOf(';')+2))||1;}else if(optionval.indexOf(';') > -1 && optionval.indexOf(';n') == -1) {price += parseFloat(optionval.substring(optionval.indexOf(';')+1))||0;}});price = Number(price).toLocaleString('[-- Locale_Name --]', { style: 'decimal', maximumFractionDigits : 2, minimumFractionDigits : 2 });ss_jQuery("#"+prodcontainer+" .product-price .actual-price").html("[-- STORE.CurrencySymbol --]"+price);}
function changeMIimage(image,s_image,t_image){var smallImage = s_image;var largeImage = image;ss_jQuery('#gallery-imgs a').removeClass('active');var x=ss_jQuery("img[src='"+t_image+"']:visible");var x2=ss_jQuery("a[data-image='"+image+"']:visible");var x3=ss_jQuery("a[data-zoom-image='"+s_image+"']:visible");if(x.length){x.first().parent().addClass('active')}else if(x2.length){x2.first().addClass('active')}else if(x3.length){x3.first().addClass('active')};var ez = ss_jQuery('#zoom-img').data('elevateZoom');ez.swaptheimage(smallImage, largeImage);}
function noZoomGallery(el) {$("#gallery-imgs a.active").removeClass("active");$(el).addClass("active");document.prod_img.src=$(el).data("image");return false;el.preventDefault();}
###
[-- IF STORE.UseCompanyLogo --]function shrinkLogo(screentype){if (ss_jQuery("body").hasClass("logo-shrink")) {var scrolly = ss_jQuery(window).scrollTop();if ((scrolly > 0 || screentype == "mobile") && ss_jQuery(".logo").hasClass("logo-lg")) {ss_jQuery(".logo").removeClass("logo-lg");ss_jQuery(".logo").addClass("logo-sm");}else if (scrolly == 0 && !ss_jQuery("body").hasClass("mobile") && ss_jQuery(".logo").hasClass("logo-sm")){ss_jQuery(".logo").removeClass("logo-sm");ss_jQuery(".logo").addClass("logo-lg");}}}[-- END_IF --]
function alignProdNames() {if ($(window).width() > 768) {ss_jQuery(".card-deck,.card-group").each(function(){var maxprodheight = 0;ss_jQuery(this).find(".card-img-top").each(function(){if (ss_jQuery(this).height()>maxprodheight){maxprodheight=ss_jQuery(this).height()}});ss_jQuery(this).find(".card-img-top").attr("style","min-height:"+maxprodheight+"px");});}}
[-- IF MiniCart --]function displayMiniCart() {var cookies=document.cookie;var start = cookies.indexOf("ss_cart_[-- STORE_Serial_Number --]=");var cartvalues = "";var linecount = 0;var start1;var end1;var tmp;var minioutput = "";if (start != -1) {start = cookies.indexOf("=", start) +1;var end = cookies.indexOf(";", start);if (end == -1){end = cookies.length;};cartvalues = unescape(cookies.substring(start,end));start = 0;while ((start = cartvalues.indexOf("|", start)) != -1){start++;end = cartvalues.indexOf("|", start);if (end != -1){linecount++;if (linecount == 2){tmp = cartvalues.substring(start,end);colon = tmp.indexOf(":", 0);minioutput+=tmp.substring(colon+1,end - start);if ((tmp.substring(colon+1,end - start)) == 1 ){minioutput+="<span class=\"d-none d-lg-inline-block pl-2\">[-- STORE.Item --]<\/span>";}else{minioutput+="<span class=\"d-none d-lg-inline-block pl-2\">[-- STORE.Items --]<\/span>";};document.getElementById("minicart-text").innerHTML = minioutput;};start = end;}}}};displayMiniCart();[-- END_IF --]
#       Recently viewed check URLs
#function doesFileExist(urlToFile) {var xhr = new XMLHttpRequest();xhr.open('HEAD', urlToFile, false);xhr.send();if (xhr.status == "200") {return true}else{return false}}
function debouncer( func , timeout ) {var timeoutID , timeout = timeout || 100; return function () {var scope = this , args = arguments; clearTimeout( timeoutID ); timeoutID = setTimeout( function () {func.apply( scope , Array.prototype.slice.call( args ) );} , timeout );}}
#
[-- IF PageMenu --]
#       MENU FUNCTIONS
function flyoutHover() {
 if (ss_jQuery("body").hasClass("desktop")&&!ss_jQuery("body").hasClass("side-menu")) {
   var ulnavheight = 0;
   if (ss_jQuery(this).hasClass("open")) {ss_jQuery(this).removeClass("open");ss_jQuery(this).children("ul").height("0")}
   else if (ss_jQuery(this).has("ul").length) {
    ss_jQuery(this).attr("class","flyout open");
    ss_jQuery(this).children("ul").children().each(function(){ulnavheight = ulnavheight + ss_jQuery(this).outerHeight()});
    ss_jQuery(this).children("ul").height(ulnavheight);
   }
 }
}
function flyoutClick() {
 if (ss_jQuery("body").hasClass("mobile")) {
   var ulnavheight = 0;
   if (ss_jQuery(this).hasClass("open")) {
   }
   else if (ss_jQuery(this).has("ul").length) {
    ss_jQuery(this).attr("class","flyout open");
   }
 }
}
#// check nav width
function checkNavWidth(){
  var pgw = sessionStorage.getItem("pgw"); // page width
  var navw = sessionStorage.getItem("navw"); // navigation width
  var navr = sessionStorage.getItem("navr"); // nav-row width
  var navt = sessionStorage.getItem("navt"); // navigation type desktop/mobile
  var nott = localStorage.getItem("nott"); // detection of notouch/touch
  var nnavr = ss_jQuery("meta[name='designer']").attr("content")+"|"+ss_jQuery("#ShopSite").children().length;
  var menuliw = 0;
  var windoww = ss_jQuery(window).width();
# if the window is small OR if the theme is one with a side menu OR the theme always uses the mobile layout for the navigation
  if (windoww < 768||ss_jQuery("body").hasClass("side-menu")||ss_jQuery("body").hasClass("open-menu")) {
        ss_jQuery("body").removeClass("desktop");
        ss_jQuery("body").addClass("mobile");
        ss_jQuery(".suckertreemenu ul").each(function(){ss_jQuery(this).attr("style","")});
        sessionStorage.setItem("navt","mobile");
        [-- IF STORE.UseCompanyLogo --]shrinkLogo("mobile");[-- END_IF --]
  }
  else {
#  If it is already in           DESKTOP VIEW
    if (ss_jQuery("body").hasClass("desktop")) {
      ss_jQuery("#ShopSite").children().each(function(){menuliw = parseFloat(menuliw) + parseFloat(ss_jQuery(this).width())});
      sessionStorage.setItem("navw",menuliw.toFixed(2));
      if (parseInt(menuliw) > parseInt(ss_jQuery("#nav-container").width()+5)) {
        ss_jQuery("body").removeClass("desktop");
        ss_jQuery("body").addClass("mobile");
        ss_jQuery(".suckertreemenu ul").each(function(){ss_jQuery(this).attr("style","")});
        sessionStorage.setItem("navt","mobile");
        [-- IF STORE.UseCompanyLogo --]shrinkLogo("mobile");[-- END_IF --]
      }
      else{
        sessionStorage.setItem("navt","desktop");
        [-- IF STORE.UseCompanyLogo --]shrinkLogo("desktop");[-- END_IF --]
      }
    }
#  If it is already in           MOBILE VIEW
    else if (ss_jQuery("body").hasClass("mobile")) {
      if (nnavr == navr && pgw == ss_jQuery(window).width()) {
        // should still be mobile so ignore and move on
      }
      else {
        ss_jQuery("#nav-container").attr("style","visibility:hidden");
        ss_jQuery("body").removeClass("mobile");
        ss_jQuery("body").addClass("desktop");
        ss_jQuery("#ShopSite").children().each(function(){menuliw = parseFloat(menuliw) + parseFloat(ss_jQuery(this).width())});
        if (parseInt(menuliw) > parseInt(ss_jQuery("#nav-container").width()+5)) {
          ss_jQuery("body").removeClass("desktop");
          ss_jQuery("body").addClass("mobile");
          ss_jQuery(".suckertreemenu ul").each(function(){ss_jQuery(this).attr("style","")});
          sessionStorage.setItem("navt","mobile");
          [-- IF STORE.UseCompanyLogo --]shrinkLogo("mobile");[-- END_IF --]
        } 
        else {
          ss_jQuery(".suckertreemenu ul").each(function(){ss_jQuery(this).attr("style","")});
          sessionStorage.setItem("navt","desktop");
          [-- IF STORE.UseCompanyLogo --]shrinkLogo("mobile");[-- END_IF --]
        }
        ss_jQuery("#nav-container").attr("style","");
      }
    }
  }
sessionStorage.setItem("navr",nnavr);
sessionStorage.setItem("pgw",ss_jQuery(window).width());
}
function toggleMenu() {ss_jQuery("body").toggleClass("nav-open")}
ss_jQuery(window).resize(debouncer(function() {checkNavWidth();alignProdNames();}, 250));
[-- END_IF --]
#
#
# Product Functions
#       ADD To CART Form Verification
function qtyIncrease(el) {var cval = ss_jQuery(el).siblings(".qnty-field").children();cval.val(parseInt(cval.val())+1)}
function qtyDecrease(el) {var cval = ss_jQuery(el).siblings(".qnty-field").children();var cvalminus = parseInt(cval.val())-1;if (cvalminus<=0){cval.val("1");}else{cval.val(cvalminus);}}
#
function displayRecentlyViewed(){let recenthtml='<div class="container py-4"><h6>Recently Viewed</h6><div class="d-flex justify-content-start align-self-center flex-nowrap">',num=0,recents=localStorage.getItem('recent[-- STORE.ID --]')||'',i;recents=recents.split('||');for(i=0;i<recents.length;i++){let recentbreak=recents[i].split('|');if (recentbreak.length == 3 && recentbreak[0].length>10 && window.location.href != recentbreak[1]){num++;recenthtml=recenthtml+'<a class="d-inline-block mr-2 border d-flex justify-content-center align-items-center" href="'+recentbreak[1]+'"><span><img class="img-fluid" src="'+recentbreak[0]+'" alt="'+recentbreak[2]+'"></span></a>'}}recenthtml=recenthtml+'</div></div>';if (num > 0){ss_jQuery('#recently-viewed').html(recenthtml)}}
#
#
#
#
#
### Checking for touch capability.  If found, switch body.notouch to body.touch
function is_touch_device() {var prefixes = ' -webkit- -moz- -o- -ms- '.split(' ');var mq = function(query) {return window.matchMedia(query).matches};if (('ontouchstart' in window) || window.DocumentTouch && document instanceof DocumentTouch) {return true};var query = ['(', prefixes.join('touch-enabled),('), 'heartz', ')'].join('');return mq(query);};if (is_touch_device() == true) {ss_jQuery("body").removeClass("notouch");ss_jQuery("body").addClass("touch");localStorage.setItem("nott","touch");}else{localStorage.setItem("nott","notouch");[-- IF PageMenu --]  checkNavWidth();[-- END_IF --]}
#
################### OnScroll Functions
#
ss_jQuery( window ).scroll(function() {[-- IF STORE.UseCompanyLogo --]shrinkLogo("desktop");[-- END_IF --]});
#
################### End OnScroll Functions
#
#########################################################################
#########################################################################
#########################################################################
#########################################################################
#          Run After Page Loads
# vtype = var.type | recent = recently viewed display? | reltditems = is related category items enabled?
# lzy = is lazy load used on this page?
var vtype = "";
function onLoad(vtype,recent,reltditms,lzy,prods) {
#
#               onload for   ALL PAGE TYPES ###############################################
#
[-- IF PageMenu --]  ss_jQuery(".suckertreemenu li").hover(flyoutHover,flyoutHover);
  ss_jQuery(".suckertreemenu li").click(flyoutClick);
  ss_jQuery(".suckertreemenu li>a").click(function(ae){if (ss_jQuery(this).siblings("ul").length && ss_jQuery("body").hasClass("mobile")) {ae.preventDefault();}});
[-- END_IF --]
####################################################################################
[-- IF SC_Registration --](function($){$.fn.ss_CRSignIn = function(op){var o=$.extend(true,{},$.fn.ss_CRSignIn.defaults,op),fid='#'+o.sign_in_form_id,rid='#'+o.registration_form_id;f1=o.show_sign_in_callback,f2=o.post_sign_in_callback,f3=o.error_message_callback,reg=(function(name){var b=" "+document.cookie;var c=b.search(new RegExp("\b"+name+"="));if(c==-1)c=b.indexOf(name+"=");if(c==-1)b=null;else{c=b.indexOf("=",c)+1;var d=b.indexOf(";",c);if(d==-1)d=b.length;b=unescape(b.substring(c,d));}return b;})("ss_reg_0001513334");if(reg){reg = reg.split('|');temp={cr_status:2,cr_name:reg[0],cr_group:reg[1],signed_in:reg[2]=='yes'};reg=temp;}else{reg={};}$(this).click(function(){var ln=$(this).attr('id');$.ajax({url:'[-- SHOPPING_CART_URL Base --]/order.cgi',data:{storeid:'[-- STORE.Id --]',func:'2',html_reg:'html'},type:'get',dataType:'jsonp',jsonp:'json_callback',crossDomain:true,success:function(d){if(d.cr_status == 1){var storeid=d.storeid,sbid=d.sbid,cr_type=d.cr_type,reg_type=d.cr_reg_type,reg_form=$(rid);if(reg_form.length>0){$('<input type="hidden" name="storeid">').val(storeid).appendTo(reg_form);$('<input type="hidden" name="sbid">').val(sbid).appendTo(reg_form);$('<input type="hidden" name="cr_type">').val(reg_type).appendTo(reg_form);};$(fid).submit(function(){var data = {storeid:storeid,sbid:sbid,cr_type:cr_type},f=$(fid);data.email1=f.find('[name=email1]').val();data.text1=f.find('[name=text1]').val();data.function=f.find('[name=function]').val();$.ajax({url:'[-- SHOPPING_CART_URL Base --]/registration.cgi',data:data,type:'post',dataType:'jsonp',jsonp:'json_callback',crossDomain:true,success:function(d){var s=d.cr_status,p=location.pathname;if(s == 2) {if(p.match(/[^\/]*$/) == 'order.cgi'){location.replace(p+'?function=show&storeid='+storeid)}else{f2(d);}}else if(s == 0) {f3(d.cr_error);}}});return false;});f1(ln);}else if(d.cr_status == 0) {f3(d.cr_error);}else if(d.cr_status == 2) {f2(d);}}});return false;});if(reg.signed_in){f2(reg);}};$.fn.ss_CRSignIn.defaults = {sign_in_form_id:'ss-cr-form',registration_form_id:'ss-reg-form',show_sign_in_callback:function(link_id){},post_sign_in_callback:function(data){},error_message_callback:function(error){}};})(ss_jQuery);ss_jQuery("#sign-in-links,#signinlink").ss_CRSignIn({sign_in_form_id:"sign-in-form",show_sign_in_callback:function(link_id){ss_jQuery("div.cr_warning").html("").hide();$("#registrationModal").modal("show");},post_sign_in_callback:function(data){var v=data.cr_status;ss_jQuery("div.cr_warning").html("").hide();$("#registrationModal").modal("hide");ss_jQuery("#sign-in-links").hide();ss_jQuery("#user-links").attr("style","display:inline-block");},error_message_callback:function(error){ss_jQuery("div.cr_warning").html(error).attr("style","display:inline-block");}});
var regcookies=document.cookie;var regstart = regcookies.indexOf("[-- RegCookieName --]=");var regsigned_in = -1;if (regstart != -1) {regstart = regcookies.indexOf("|", regstart) +1;var regend = regcookies.indexOf("|", regstart);if (regend != -1) {regsigned_in = regcookies.indexOf("|yes", regstart);if (regsigned_in != -1) {ss_jQuery("#sign-in-links").hide();ss_jQuery("#user-links").attr("style","display:inline-block");}}}
[-- END_IF --]
####################################################################################
  if (lzy == "lazyload") {
    ss_jQuery('head').append(ss_jQuery('<script>').attr('type', 'text/javascript').attr('src', '[--OUTPUT_DIRECTORY_URL --]/publish/echo.js'));
    echo.init({offset: 100,throttle: 250,unload: false});
  }
  if (prods == "hasproducts") {alignProdNames()}
#
#
#               onload if   ENABLED  ####################################################
  ss_jQuery(".subs select,.product-options select,.subs-update-price input").change(function(){var prodid = ss_jQuery(this).closest("[id^='product']").attr("id");var prodprc = ss_jQuery(this).closest("[id^='form']").data("base");updatePrice(prodid,prodprc);});
  ss_jQuery(".low-quantity-price").each(function(){if (ss_jQuery(this).html().indexOf("qp_sale")!=-1){ss_jQuery(this).addClass("qp-sale-prices")}});
  ss_jQuery("a.more").click(function() {var mh = ss_jQuery(this).parent().children("div").height();var maxHeight = "max-height:calc( "+mh+"px + 1.5rem );padding-bottom:1.5rem";if (ss_jQuery(this).parent().hasClass("read-more")) {ss_jQuery(this).parent().attr("style",maxHeight);ss_jQuery(this).html("read less <span>&#9650;</span>")}else{ss_jQuery(this).parent().attr("style","");ss_jQuery(this).html("read more <span>&#9660;</span>");if (ss_jQuery(this).parent().offset().top<ss_jQuery(window).scrollTop()){window.scrollBy({top:-(parseInt(mh)),left:0,behavior:'smooth'});}};ss_jQuery(this).parent().toggleClass("read-more");ss_jQuery(this).parent().toggleClass("read-less");return false;});ss_jQuery(".more-link").each(function(){if (ss_jQuery(this).height()<ss_jQuery(this).children().height()) {ss_jQuery(this).addClass("read-more")}});
  ss_jQuery(".subs-low-price").each(function(){var prices = ss_jQuery(this).data("subsprices").split(",");var subsminimum = Array.min(prices);ss_jQuery(this).html("[-- STORE.CurrencySymbol --]"+subsminimum+"[-- STORE.VariablePricingFlag --]");});
  ss_jQuery(".collapse-a .collapse-a").each(function(){textA("check")});
#               onload if   MORE INFORMATION PAGE #########################################
  if (vtype == "moreinfo") {
     if (reltditms=="related"){ss_jQuery(".createdCrossSell img").each(function(){ss_jQuery(this).attr("height","")});}
     if (recent=="recent"){setTimeout(displayRecentlyViewed,200)}
#  breadcrumbs
     if ($("html").hasClass("crumbs")==true){var actionfieldlist = localStorage.getItem("pagelist");var breadcrumblist = localStorage.getItem("breadcrumblist");var crumbs = localStorage.getItem("crumbs");var bootcrumbs = "";var resetcrumbs = "yes";var newcrumbs = [];if (crumbs&&crumbs.length>1) {categorylist = [];if (crumbs.indexOf("menuclick") != -1) {crumbs = crumbs.replace("menuclick|","");resetcrumbs = "no";localStorage.setItem("crumbs",crumbs);};var crumbsarr = crumbs.split("|");for (var i = 0; i < crumbsarr.length; i++) {var crumbitemname = crumbsarr[i].substring(0,crumbsarr[i].indexOf("~"));var crumbitemurl = crumbsarr[i].substring(crumbsarr[i].indexOf("~")+1);if(typeof crumbitemurl !== "undefined"&&typeof bootcrumbs !== "undefined"){bootcrumbs = bootcrumbs + "<li class='breadcrumb-item'><a href='[-- OUTPUT_DIRECTORY_URL --]/"+crumbitemurl+"'>"+crumbitemname+"<\/a><\/li>"};categorylist.push(crumbitemurl.substring([("/"+crumbitemurl).lastIndexOf("/")],[crumbitemurl.lastIndexOf(".")]));newcrumbs.push(crumbitemname+"~"+crumbitemurl);if (crumbsarr[i] == crumb) {break}};if (crumbs.indexOf(crumb)==-1) {var crumbitemname = crumb.substring(0,crumb.indexOf("~"));var crumbitemurl = crumb.substring(crumb.indexOf("~")+1);if(typeof crumbitemurl !== "undefined"&&typeof bootcrumbs !== "undefined"){bootcrumbs = bootcrumbs + "<li class='breadcrumb-item active' aria-current='page'><a href='[-- OUTPUT_DIRECTORY_URL --]/"+crumbitemurl+"'>"+crumbitemname+"<\/a><\/li>"};};categorylist=categorylist.join("/");newcrumbs=newcrumbs.join("|");if (resetcrumbs == "yes") {localStorage.setItem("crumbs",newcrumbs)}}else {bootcrumbs = bootcrumbs + "<li class='breadcrumb-item active' aria-current='page'><a href='"+miurl+"'>"+unescape(miprname)+"<\/a><\/li><\/ol><\/nav>";};ss_jQuery("#bootcrumbs").append(bootcrumbs);}
#
  }
#
#
# onload if   A CATEGORY PAGE #######
    if (vtype == "page") {
#  breadcrumbs
       if ($("html").hasClass("crumbs")==true){var crumbs = localStorage.getItem("crumbs");var resetcrumbs = "yes";var bootcrumbs = "";var categorylist = [];var newcrumbs = [];if (crumbs) {if (crumbs.indexOf("menuclick") != -1) {crumbs = crumbs.replace("menuclick|","");resetcrumbs = "no";localStorage.setItem("crumbs",crumbs);};var crumbsarr = crumbs.split("|");for (var i = 0; i < crumbsarr.length; i++) {var crumbitemname = crumbsarr[i].substring(0,crumbsarr[i].indexOf("~"));var crumbitemurl = crumbsarr[i].substring(crumbsarr[i].indexOf("~")+1);bootcrumbs = bootcrumbs + "<li class='breadcrumb-item'><a href='[-- OUTPUT_DIRECTORY_URL --]/"+crumbitemurl+"'>"+crumbitemname+"<\/a><\/li>";categorylist.push(crumbitemurl.substring([("/"+crumbitemurl).lastIndexOf("/")],[crumbitemurl.lastIndexOf(".")]));newcrumbs.push(crumbitemname+"~"+crumbitemurl);if (crumbsarr[i] == crumb) {break}};if (crumbs.indexOf(crumb)==-1 && crumb.substring([crumb.indexOf("~")+1],[crumb.lastIndexOf(".")])!="/index") {var crumbitemname = crumb.substring(0,crumb.indexOf("~"));var crumbitemurl = crumb.substring(crumb.indexOf("~")+1);bootcrumbs = bootcrumbs + "<li class='breadcrumb-item active' aria-current='page'><a href='[-- OUTPUT_DIRECTORY_URL --]/"+crumbitemurl+"'>"+crumbitemname+"<\/a><\/li>";categorylist.push(crumbitemurl.substring([("/"+crumbitemurl).lastIndexOf("/")],[crumbitemurl.lastIndexOf(".")]));newcrumbs.push(crumbitemname+"~"+crumbitemurl);};categorylist=categorylist.join("/");newcrumbs=newcrumbs.join("|");if (resetcrumbs == "yes") {localStorage.setItem("crumbs",newcrumbs)}}else if (crumb.substring([crumb.indexOf("~")+1],[crumb.lastIndexOf(".")])!="/index") {localStorage.setItem("crumbs",crumb);bootcrumbs = bootcrumbs + "<li class='breadcrumb-item active' aria-current='page'><a href='[-- OUTPUT_DIRECTORY_URL --]/"+pgfilename+"'>"+unescape(pglinkname)+"<\/a><\/li><\/ol><\/nav>";};ss_jQuery("#bootcrumbs").append(bootcrumbs);}
    }
#
#
# onload if   SHOPPING CART SCREEN #######
     if (vtype == "shoppingcart") {
// if shopping cart
[-- IF SC_Email_LightBox --](function($){
$('div#ss-email-lightbox').ss_lightbox({
  cancel_func:function(){$.ajax({url:'order.cgi',data:{storeid:'[-- STORE.ID --]',sbid:ss_sbid,'function':'ueml','cancel':'true'},type:'GET',dataType:'jsonp',jsonp:'callback',crossDomain:false,success:function(d){}});},
  submit_func:function(t){var v = $('input[name="Email"]', t).val();$.ajax({data:{sbid:ss_sbid,storeid:'[-- STORE.ID --]','function':'ueml','Email':v},url:'order.cgi',type:'GET',dataType:'jsonp',jsonp:'callback',crossDomain:false,success:function(data){if(!data.success)console.log(data.error);},error: function (jqXHR, textStatus, errorThrown){console.log(errorThrown);}});
}});
}(ss_jQuery));[-- END_IF --]
    }
}
####################################################################################
# AJAX_Add_To_Cart 
if ($("html").hasClass("addpopup")==true){(function($){$.ssAddToCart = function(op) {var settings=$.extend(true,{},op),displayPopUpFunc = settings.displayPopUp,preAJAXfunc = settings.beforeAddToCart,ssAJAXCartCall = function(url, data) {	if(typeof(preAJAXfunc) == 'function') preAJAXfunc(data);$.ajax({url:url,data:data,async:true,crossDomain:true,dataType:'jsonp',jsonp:'show_jsoncart',success:displayPopUpFunc});};if(typeof(displayPopUpFunc ) == 'function') {$("form[action*='order.cgi']").each(function () {if($("input[name='function']").val().toLowerCase() != 'add') return true;var f = $(this);f.submit(function(event){var error=false;$('[name*=":finopt:"]',f).each(function(){if(/;n/.test($(this).val())){$(this).addClass('field_warn').change(function(){$(this).removeClass('field_warn')});error="[-- STORE.RequiredMenuSelection --]";}});if(error){if(typeof(ss_handleResponse)=='undefined'){alert(error)}return false;}event.preventDefault();var data='';$(f.serializeArray()).each(function(){var t=$(this)[0];data+='&'+ escape(t.name)+'='+escape(t.value).replace(/\+/g,'%2B');});ssAJAXCartCall(f.attr('action'),data.substr(1));});});$("a[href*='order.cgi'][href*='function=add']").click(function (event) {var f = $(this),href=f.attr('href').split('?');event.preventDefault();ssAJAXCartCall(href[0],href[1]);});}}})(ss_jQuery);(function(){ss_jQuery.ssAddToCart({displayPopUp : function(data){$('span.miniCount').html(''+data.quantity);if(data.product_info != undefined){var p=data.product_info;if(p.graphic != undefined)$('#cart-popup-prod-img').html($('<img>').attr('src',p.graphic));else $('#cart-popup-prod-img img').remove();$('#cart-popup-prod-name').html(p.name);$('#cart-popup-prod-sku').html(p.sku);$('#cart-popup-prod-price').html(p.price);$('#cart-popup-prod-quantity').html('[-- STORE.Qty --]: ' + p.quantity); if(p.options != undefined)$('#cart-popup-prod-options').html(p.options); else $('#cart-popup-prod-options').html(''); if(p.customer_text != undefined)$('#cart-popup-prod-customer_text').html(p.customer_text); else $('#cart-popup-prod-customer_text').html('');}$('#cart-popup-total').html(data.ordertotal);if(data.quantity > 1){$('#cart-popup-total-quantity').html(data.quantity + ' [-- STORE.Items --]')}else{$('#cart-popup-total-quantity').html(data.quantity + ' [-- STORE.Item --]')}if(data.error_messages.length > 0)$('#cart-popup-messages').html(data.error_messages.join('<br><br>')).addClass('alert alert-primary');else $('#cart-popup-messages').html('').removeClass('alert alert-primary');$('#cart-popup').modal({backdrop: 'static', keyboard: false,show:true});setTimeout(upsellAjax,1000)},beforeAddToCart:function(){}})})();function upsellAjax(){if (ss_jQuery("#mi-crosssell").length) {var upsellhtml = "<h5><span>"+(ss_jQuery("#mi-crosssell h2").html())+"<\/span><\/h5><div class=\"card-group rowcount-4\">";var i;for (i = 0; i < 4; i++) {if (ss_jQuery("#mi-crosssell .card").eq(i)) {upsellhtml=upsellhtml+"<div class=\"card\">"+(ss_jQuery("#mi-crosssell .card").eq(i).html())+"</div>";}}ss_jQuery("#upsell-upsell").html(upsellhtml+"<\/div>");}[-- IF MiniCart --];displayMiniCart()[-- END_IF --]}}

haha - 2025