1var currencySelectObj,languageSelectObj,recentCategoriesObj,recentItemsObj;function updateLoginArea(){jQuery.ajax({url:"getlogin.ajx?vid="+vendorIdentifier,dataType:"json",cache:!1,data:{},success:function(e){var a=e.__Result,t="";1200>jQuery(window).width()?a.loggedin?(jQuery("#welcome_user_name").html("<a aria-label='Login button' href='"+userWelcome.account_link+'\'><span class="bsticon bst-user"></span>'+a.loginname+"</a>"),jQuery("#user_login, #welcome-data").html("<a aria-label='Logout button' href='"+userWelcome.logout_link+'\'> <span class="bsticon bst-log-out"></span> </a>')):(jQuery("#welcome_user_name").html('<div><span class="bsticon bst-user"></span> Welcome</div>'),jQuery("#user_login, #welcome-data").html("<a aria-label='Login button' href='"+userWelcome.login_link+'\'><span class="bsticon bst-user"></span></a>')):(t=a.loggedin?"<a aria-label='User name: "+a.loginname+"' href='"+userWelcome.account_link+"'>"+a.loginname+"</a><a aria-label='Logout button' href='"+userWelcome.logout_link+'\'><span class="bsticon bst-log-out"></span></a>':"<a aria-label='Login button' href='"+userWelcome.login_link+'\'><span class="bsticon bst-user"></span></a>',jQuery("#welcome-data").html(t),t=a.loggedin?"<a href='"+userWelcome.account_link+'\'><span class="bsticon bst-user"></span></a>':"<a href='"+userWelcome.login_link+'\'><span class="bsticon bst-user"></span><span>'+userWelcome.login+"</span></a>",jQuery("#welcome-data2").html(t))}})}function renderRecentlyViewedCategories(){jQuery.ajax({url:"getrecentlyviewedcategories.ajx?vid="+vendorIdentifier+"&cid="+categoryId,dataType:"json",cache:!1,data:{},success:function(e){var a=e.__Result;if(a.length>0){var t={},n=Avetti.partials,c=Avetti.mustaches.recentlyViewedCategories,s="";t.categories=a,s=Mustache.render(c,t,n),recentCategoriesObj.html(s),recentCategoriesObj.show()}else recentCategoriesObj.hide()}})}function renderRecentlyViewedItems(){var e=recentItemsObj.attr("data-vid");jQuery.ajax({url:"getrecentlyvieweditems.ajx?vid="+e,dataType:"json",cache:!1,data:{},success:function(e){var a=e.__Result;if(a.length>0){var t={},n=Avetti.partials,c=Avetti.mustaches.recentlyViewedItems,s="";t.items=a,s=Mustache.render(c,t,n),recentItemsObj.html(s),recentItemsObj.show()}else recentItemsObj.hide()}})}function createLanguageSelect(){jQuery.ajax({url:"getlanguage.ajx?vid="+vendorIdentifier,dataType:"json",cache:!1,data:{},success:function(e){var a=e.__Result;languageSelectObj.length>0&&(languageSelectObj.val(a),bindLanguageSelect())}})}function bindLanguageSelect(){languageSelectObj.length>0&&languageSelectObj.bind("change",function(){"es"==jQuery(this).val()?window.document.location.href="http://es.avetti.ca":jQuery.ajax({url:"updatelanguage.ajx?vid="+vendorIdentifier+"&ml="+jQuery(this).val(),dataType:"json",cache:!1,data:{},success:function(e){e.__Result,window.location.reload()}})})}function createCurrencySelect(){jQuery.ajax({url:"getcurrencyid.ajx?vid="+vendorIdentifier,dataType:"json",cache:!1,data:{},success:function(e){var a=e.__Result;currencySelectObj.length>0&&(currencySelectObj.val(a),bindCurrencySelect())}})}function bindCurrencySelect(){currencySelectObj.length>0&¤cySelectObj.bind("change",function(){jQuery.ajax({url:"updatecurrencyid.ajx?vid="+vendorIdentifier+"¤cyid="+jQuery(this).val(),dataType:"json",cache:!1,data:{},success:function(e){e.__Result,window.location.reload()}})})}function update_top_basket(){jQuery.ajax({url:"getbasket.ajx?vid="+jQuery("#js-vid").val(),dataType:"json",cache:!1,data:{},success:function(e){var a=e.__Result,t=0,n=a.products.length,c=0;if(n>0){for(;t<n;t+=1)c+=a.products[t].qty;jQuery("#basket-amount,#basket-amount-m").text(""+c),jQuery(".mobile-basket").text(c)}}})}jQuery(document).ready(function(){currencySelectObj=jQuery("#select_currency"),languageSelectObj=jQuery("#ml"),recentCategoriesObj=jQuery("#recentCategories"),recentItemsObj=jQuery("#recentItems"),updateLoginArea(),createLanguageSelect(),createCurrencySelect(),recentCategoriesObj.length>0&&renderRecentlyViewedCategories(),recentItemsObj.length>0&&renderRecentlyViewedItems()});
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.