BLK FRIDAY DEAL: ZT 0909 $99.95 Details
BLK FRIDAY DEAL: ZT 0909 $99.95 Details
Shaving
  • Multi-Tools
  • Swords
  • Sharpening
  • Security
  • Scissors and Shears
  • Sign Up to the KnifeCenter Newsletter for exclusive offers!

    KnifeCenter on Pinterest KnifeCenter Blog

    © 1995-2017 by Howard Korn and KnifeCenter Inc. All rights reserved. 5201 Lad Land Dr, Fredericksburg, VA 22407 - 800.338.6799 (Phone Orders Welcome)

    !xH+xH+.99, override : true } ]; var countryObj = _.findWhere(shippingFlagsConfig, {countryName: countryName}); var source = $("#headerShippingTemplate").html(); var template = Handlebars.compile(source); console.log("country", {countryObj: countryObj, countryName: countryName, countryCode: countryCode}) if ( countryObj ) { $('.freeshipping.hidden-phone').html(template(countryObj)); $('.mobile-shipping-info').html(template(countryObj)); if ( (window.location.pathname == "/" || window.location.pathname == "/index.html") && countryCode !== "us" && countryCode !== "US") { var bannerSource = $("#freeShippingBannerTemplate").html(); var bannerTemplate = Handlebars.compile(bannerSource); var banner = $("
    "); banner.prop("id", "free-shipping-banner"); banner.html(bannerTemplate(countryObj)); $(".welcome-box").prepend(banner); } } else { var blacklist = ['iran', 'egypt', 'lebanon'], isBlacklisted = false; // check to see if visitor country is blacklisted or not. for ( var i = 0, o = blacklist.length; i < o; i++ ) { if ( countryName.toLowerCase() == blacklist[i].toLowerCase() ) isBlacklisted = true; } countryObj = { countryName: countryName, countryCode: countryCode, blacklisted: isBlacklisted }; $('.freeshipping.hidden-phone').html(template(countryObj)); $('.mobile-shipping-info').html(template(countryObj)); } }); Handlebars.registerHelper('bold', function (options) { return new Handlebars.SafeString( '' + options.fn(this) + ''); }); Handlebars.registerHelper('capitalize', function (str) { str = str.toLowerCase().split(' '); // will split the string delimited by space into an array of words for ( var i = 0; i < str.length; i++ ) { // str.length holds the number of occurrences of the array... str[i] = str[i].split(''); // splits the array occurrence into an array of letters str[i][0] = str[i][0].toUpperCase(); // converts the first occurrence of the array to uppercase str[i] = str[i].join(''); // converts the array of letters back into a word. } return str.join(' '); }); Handlebars.registerHelper('uppercase', function (str) { return str.toUpperCase(); });