function OnFailure(){$(".resp-tab-content:visible .loading").hide();$(".resp-tab-content:visible .wrap_tab_content").append($(".error-msg-text").show())}function OnSolutionPartialComplete(){$("#lithiumLoad a").click()}function DownloadOrderSuccess(){var n=$("#DownLoadTabSortField").val(),t=$("#DownLoadTabSortOrder").val();n=="Content"?t=="Descending"?$("#DownloadTitleOrder").addClass("down"):$("#DownloadTitleOrder").removeClass("down"):n=="Modified"&&(t=="Descending"?$("#DownloadDateOrder").addClass("down"):$("#DownloadDateOrder").removeClass("down"))}function DownloadDateOrderClick(){$("#DownLoadTabSortField").val("Modified");$("#DownloadTitleOrder").hasClass("down")?$("#DownLoadTabSortOrder").val("Ascending"):$("#DownloadDateOrder").hasClass("down")?$("#DownLoadTabSortOrder").val("Ascending"):$("#DownLoadTabSortOrder").val("Descending")}function DownloadTitleOrderClick(){$("#DownLoadTabSortField").val("Content");$("#DownloadDateOrder").hasClass("down")?$("#DownLoadTabSortOrder").val("Ascending"):$("#DownloadTitleOrder").hasClass("down")?$("#DownLoadTabSortOrder").val("Ascending"):$("#DownLoadTabSortOrder").val("Descending")}function DownloadCategoryOrderClick(){$("#DownloadCategoryOrder").hasClass("down")?$("#DownLoadTabSortOrderCategory").val("Ascending"):$("#DownLoadTabSortOrderCategory").val("Descending")}function DownloadOrderSuccessCategory(){var n=$("#DownLoadTabSortOrderCategory").val();n=="Descending"?$("#DownloadCategoryOrder").addClass("down"):$("#DownloadCategoryOrder").removeClass("down")}function ShowLoadingImage(n){n?$(".loading").show():$(".loading").hide()}function SearchHowToSuccess(n){var i=AjaxUtil.getJsonBodyPart(n),t=JSON.parse(i);t.Languages!=undefined&&UpdateDropDown($("#SelectLanguage"),t.Languages);$(".tree-view-list.howto li[data-role='"+$("#SelectCategory").attr("value")+"']").find("a").addClass("tree-item-active");$("#SelectCategory").attr("value").toLocaleLowerCase()=="all"&&$(".tree-view-list.howto li").find("a").first().addClass("tree-item-active");$(".page-nav").children().eq(1).addClass("select");window.productHowTo.initTreeEvents();$("#ContentInMobile").html($("#body_content").html())}function PagingSuccess(){$("#ContentInMobile").html($("#body_content").html());$(".prod-header-toggle").click(function(){window.productHowTo.SearchHowTo()})}function UpdateDropDown(n,t){n.empty();$.each(t,function(t,i){n.append($("<option><\/option>").attr("value",i.Value).attr("selected",i.Selected).text(i.Text))})}function OrderSuccess(){$("#BySortOrder").val()=="Descending"&&$("#HowToTitleOrder").addClass("down");$("#HowToTitleOrder").click(function(){$("#HowToTitleOrder").hasClass("down")?$("#BySortOrder").attr("value","Ascending"):$("#BySortOrder").attr("value","Descending")})}function ShowLoadingImage(n){n?$(".loading").show():$(".loading").hide()}function OrderSuccess(){$("#accessories-order").find("span").click(function(){var n=$("#accessories-category").selectize({create:!1}),t=n[0].selectize;$(this).toggleClass("down");$("#BySortOrder").val($(this).attr("class").indexOf("down")!=-1?"Descending":"Ascending");Lenovo.ProductAccessoriesTab.instance.SetQueryValues(t);Lenovo.ProductAccessoriesTab.instance.SubmitListAction()})}function ShowLoadingImage(n){n?$(".loading").show():$(".loading").hide()}function SearchSuccess(){$("#ordericon").click(function(){var i=$("#ordericon").attr("class"),n=$("#ordericon"),t;i.indexOf("up")>0?(n.removeClass("up"),n.addClass("down"),$(".videoSortOrder").val("Descending")):(n.removeClass("down"),n.addClass("up"),$(".videoSortOrder").val("Ascending"));t="Product Detail";Lenovo.GA.RegisterVirtualView(t,"Search Video",$(".select-prod-search-input").val());$(".videossorting").submit();$(".select-prod-search-input").blur()});$(".toggle-button-ico").hasClass("current")&&($(".product-lister-ico").show(),$(".product-lister").hide());$(".toggle-button-list").hasClass("current")&&($(".product-lister").show(),$(".product-lister-ico").hide());$(".video-item-wrapper").hide();$(".video-lister-wrapper").show();$(".video-item-wrapper").html("")}function LoadVideoPlayerComplete(){$(".video-item-wrapper").show();$(".video-lister-wrapper").hide()}function ShowLoadingImage(n){n?$(".loading").show():$(".loading").hide()}function resetCondition(n){$("#productType").val("");window.location.href=n}function hideTableOrList(){$(".toggle-button-list").hasClass("current")&&($(".product-lister").show(),$(".product-lister-ico").hide());$(".toggle-button-ico").hasClass("current")&&($(".product-lister").hide(),$(".product-lister-ico").show())}function ShowLoadingImage(n){n?$(".loading").show():$(".loading").hide()}function SearchSolutionSuccess(n){var t=AjaxUtil.getJsonBodyPart(n),i=JSON.parse(t);window.productSolution.LoadData(i);window.productSolution.BindFilterEvent();$(".tree-view-list.solution li[data-role='"+$("#SelectCategory").attr("value")+"']").find("a").addClass("tree-item-active");$("#SelectCategory").attr("value").toLocaleLowerCase()=="all"&&$(".tree-view-list.solution li").find("a").first().addClass("tree-item-active");$(".page-nav").children().eq(1).addClass("select");window.productSolution.initTreeEvents();$("#ContentInMobile").html($("#Solution_body_content").html());$(".solution-subcategory-select").selectize({create:!1})}function PagingSuccess(){$("#ContentInMobile").html($("#Solution_body_content").html())}function SolutionOrderSuccess(){$("#BySortOrder").val()=="Descending"&&$("#SolutionTitleOrder").addClass("down");$("#SolutionTitleOrder").click(function(){$("#SolutionTitleOrder").hasClass("down")?$("#BySortOrder").attr("value","Ascending"):$("#BySortOrder").attr("value","Descending")})}function ShowLoadingImage(n){n?$(".loading").show():$(".loading").hide()}Lenovo.ProductDetails=function(n){this.TabName=n.attr("data-tabname");this.init()};Lenovo.ProductDetails.prototype={init:function(){var n=this;$("a[name=productDetailGoogle]").trigger("click");$("#productDetailTabs").easyResponsiveTabs({});$("#"+n.TabName).click();switch(n.TabName){case"manuals":$(".resp-tab-item#onemanuals").trigger("click");break;case"howto":$(".resp-tab-item#onehowto").trigger("click");break;case"video":$(".resp-tab-item#onevideo").trigger("click");break;case"downloads":$(".resp-tab-item#onedownloads").trigger("click");break;case"solutions":$(".resp-tab-item#onesolutions").trigger("click");break;case"productparts":$(".resp-tab-item#oneproductparts").trigger("click");break;case"accessories":$(".resp-tab-item#oneaccessories").trigger("click")}n.AddBreadCrumb($("#"+n.TabName).text());$(".resp-tab-item").click(function(){var t=$(this).children("a");n.AddBreadCrumb(t.text())});$(".resp-accordion").click(function(){var t=$(this).children("a");n.AddBreadCrumb(t.text())})},Blank:function(n){n.value==n.defaultValue&&(n.value="")},AddBreadCrumb:function(n){var t=$(".bread-crumb");t.find("span").length>0?t.find("span").text(" - "+n):t.append("<span> - "+n+"<\/span>")}};Lenovo.ProductDownloadTab=function(){this.init()};Lenovo.ProductDownloadTab.prototype={init:function(){var n=this;$("#DownloadTabSearchKeyword").keydown(function(t){var i=t?t:window.event?window.event:null;i.keyCode==13&&n.SubmitAction()});$("#DownloadOperatingSystem").change(function(){n.ResetSort();n.SubmitAction()});$(".select-prod-search-button").click(function(){n.SubmitAction()});$("#DownloadCategory").change(function(){n.ResetSort();n.SubmitAction()});$.Placeholder.init()},SubmitAction:function(){Lenovo.GA.RegisterVirtualView("Product Detail","Search Download",$("#SearchKeywords").val());$("#downloadTabSearchForm").submit();$("#SearchKeywords").blur()},ResetSort:function(){$("#DownLoadTabSortOrder").val("Descending");$("#DownLoadTabSortField").val("Content")}};Lenovo.ProductHowTo=function(){window.productHowTo=this;this.init()};Lenovo.ProductHowTo.prototype={init:function(){var n=this;$(".select-prod-search-input").keydown(function(t){var i=t?t:window.event?window.event:null;i.keyCode==13&&n.SearchHowTo()});$("#select-beast-disabled").selectize({create:!1});$("#SelectLanguage.howtotab").change(function(){n.SearchHowTo()});$(".howtoSearchKey").keydown(function(t){t.keyCode==13&&n.SearchHowTo()});$(".prod-header-toggle").click(function(){$(this).hasClass("down")?$("#BySortOrder").attr("value","Ascending"):$("#BySortOrder").attr("value","Descending")});$("#select-beast-disabled").change(function(){$("#SelectCategory").attr("value",$("#select-beast-disabled").val());n.changeCategory($(this).val())});n.initTreeEvents();$(".tree-view-list.howto li").find("a").first().addClass("tree-item-active");$.Placeholder.init()},initTreeEvents:function(){var n=this;$(".tree-view-list.howto li").click(function(){$(".tree-view-list.howto li").find("a").removeClass("tree-item-active");$(this).find("a").addClass("tree-item-active");$("#SelectCategory").attr("value",$(this).attr("data-role"))})},SearchHowTo:function(){Lenovo.GA.RegisterVirtualView("Product Detail","Search FAQ",$("#SearchKey").val());$("#SearchContentForm").submit();$("#SearchKey").blur()},changeCategory:function(n){$.ajax({url:n,type:"GET",success:function(n){var t=$("#ContentInMobile").html(n);InitComponentsFromPartialUpdate(t)}})}};Lenovo.ProductManualsTab=function(){this.init()};Lenovo.ProductManualsTab.prototype={init:function(){var n=this,i=$("#manuals-category").selectize({create:!1}),t=i[0].selectize;$("#SearchKey.manuals-tab").keydown(function(t){var i=t?t:window.event?window.event:null;i.keyCode==13&&(n.ResetSort(),n.SubmitAction())});$("#SelectLanguage.manuals-tab").change(function(){var t=$(this).val();$(".hidden-language").each(function(){$(this).val(t)});n.ResetSort();n.SubmitAction()});$("#manuals-category").change(function(){n.SetQueryValues(t);n.ResetSort();n.SubmitListAction()});$("#manualsPage").find("li").click(function(){var n=$(this).attr("data-value");n!=t.getValue()&&($(".tree-view-list li a").removeClass("selected"),$(this).find("a").addClass("selected"),t.setValue(n))});$("#manuals-order").find("span").click(function(){$(".prod-header-toggle").removeClass("active");$(this).addClass("active");$(this).toggleClass("down");var i=$(this).parent().attr("data-sortField");$("#ManualSortField").val(i);$("#ManualSortOrder").val($(this).attr("class").indexOf("down")!=-1?"Descending":"Ascending");n.SetQueryValues(t);n.SubmitListAction()});$.Placeholder.init()},SubmitAction:function(){Lenovo.GA.RegisterVirtualView("Product Detail","Search Manuals",$("#SearchKey.manuals-tab").val());$("#manuals-form").submit()},SubmitListAction:function(){Lenovo.GA.RegisterVirtualView("Product Detail","Search Manuals",$("#SearchKey.manuals-tab").val());$("#manualslist-form").submit()},ResetSort:function(){$("#ManualSortOrder").val("Descending");$("#ManualSortField").val("ReleaseDate");$(".prod-header-toggle").removeClass("active");$(".prod-header-toggle").removeClass("down");$("#manuals-version").addClass("active");$("#manuals-version").addClass("down")},SetQueryValues:function(n){$("#manual-category").val(n.getValue());$("#SelectCategory.manuals-tab").val(n.getValue())}};Lenovo.ProductAccessoriesTab=function(){Lenovo.ProductAccessoriesTab.instance=this;this.init()};Lenovo.ProductAccessoriesTab.prototype={init:function(){var n=this,i=$("#accessories-category").selectize({create:!1}),t=i[0].selectize;$("#SearchKey.accessories-tab").keydown(function(t){var i=t?t:window.event?window.event:null;i.keyCode==13&&(n.ResetSort(),n.SubmitAction())});$("#accessories-category").change(function(){n.SetQueryValues(t);n.SubmitListAction()});$("#accessoriesPage").find("li").click(function(){var n=$(this).attr("data-value");n!=t.getValue()&&($(".tree-view-list li a").removeClass("selected"),$(this).find("a").addClass("selected"),t.setValue(n))});$("#accessories-order").find("span").click(function(){$(this).toggleClass("down");$("#BySortOrder").val($(this).attr("class").indexOf("down")!=-1?"Descending":"Ascending");n.SetQueryValues(t);n.SubmitListAction()});$.Placeholder.init()},SubmitAction:function(){Lenovo.GA.RegisterVirtualView("Product Detail","Search Accessories",$("#SearchKey.accessories-tab").val());$("#accessories-form").submit()},SubmitListAction:function(){Lenovo.GA.RegisterVirtualView("Product Detail","Search Accessories",$("#SearchKey.accessories-tab").val());$("#accessorieslist-form").submit()},ResetSort:function(){$("#BySortOrder").val("Descending");$(".prod-header-toggle").removeClass("down")},SetQueryValues:function(n){$("#accessory-category").val(n.getValue());$("#SelectCategory.accessories-tab").val(n.getValue())}};Lenovo.VideoSelector=function(){this.init()};Lenovo.VideoSelector.prototype={init:function(){var n=this;$("#video_search_input").keydown(function(t){var i=t?t:window.event?window.event:null;i.keyCode==13&&n.SubmitAction()});$("#VideoCategory").change(function(){$("#video_search_input").val("");n.SubmitAction()});$("#video_list_reset").click(function(){$("#video_search_input").val("");n.SubmitAction()});$("#ordericon").click(function(){var i=$("#ordericon").attr("class"),t=$("#ordericon");i.indexOf("up")>0?(t.removeClass("up"),t.addClass("down"),$(".videoSortOrder").val("Descending")):(t.removeClass("down"),t.addClass("up"),$(".videoSortOrder").val("Ascending"));n.SubmitAction()});$("#Sortordercondition").change(function(){n.SubmitAction()});$("#videos_search").click(function(){n.SubmitAction()});$(".product-lister-ico").hide();$(".toggle-button-list").click(function(){$(".toggle-button-list").addClass("current");$(".toggle-button-ico").removeClass("current");$(".product-lister").show();$(".product-lister-ico").hide()});$(".toggle-button-ico").click(function(){$(".toggle-button-ico").addClass("current");$(".toggle-button-list").removeClass("current");$(".product-lister-ico").show();$(".product-lister").hide()});$.Placeholder.init()},SubmitAction:function(){Lenovo.GA.RegisterVirtualView("Product Detail","Search Video",$(".select-prod-search-input").val());$(".videossorting").submit();$(".select-prod-search-input").blur()}};Lenovo.ProductSearch=function(n){this.ActionExp=n.attr("data-action-url");this.CurrentKeywords="CurrentKeywords";this.DataSource=null;this.init()};Lenovo.ProductSearch.prototype={init:function(){var n=this;$(function(){var n=document.getElementById("AdvancedSearchText").offsetTop,t=document.getElementById("LinkText").offsetTop;n==t&&$("#LinkText").css("float","right")});$("#SearchKeywords").keydown(function(n){var t=n?n:window.event?window.event:null;t.keyCode==13&&$(".scfForm").submit()});$("#search-device").selectize({valueField:"UrlParts",labelField:"SubseriesName",searchField:"SubseriesName",options:[],create:!1,render:{option:function(n,t){return"<div>"+t(n.SubseriesName)+"<\/div>"}},load:function(t,i){return t.length?t.length<3?i():(n.AdvancedSearchDisplay(),$.ajax({url:n.ActionExp,type:"Get",dataType:"json",data:{SearchKeywords:t},success:function(r){n.DataSource=r;n.CurrentKeywords=t;n.AdvancedSearchDisplay();i(n.DataSource)},error:function(){i()}}),i()):i()},onChange:function(n){window.location.href=n+location.search}});$.Placeholder.init()},AdvancedSearchDisplay:function(){}};Lenovo.ProductList=function(n){Lenovo.ProductList.instance=this;this.searchText=n.attr("data-searchtext");this.init();var t=n.attr("data-producttype");$("#productType").val(t)};Lenovo.ProductList.productListContentLoadComplete=function(n){var t=AjaxUtil.getJsonBodyPart(n),i=JSON.parse(t);Lenovo.ProductList.instance.updateOptions(i)};Lenovo.ProductList.prototype={init:function(){var n=this;n.disableDropDownIfNotApplicable($("#series"));n.disableDropDownIfNotApplicable($("#model"));$("#productType").change(function(){$(".input_search_product").val("");$("#searchText").val("");$("#series").val("");$("#model").val("");n.updateList()});$("#series").change(function(){$(".input_search_product").val("");$("#searchText").val("");$("#model").val("");n.updateList()});$("#model").change(function(){$(".input_search_product").val("");$("#searchText").val("");n.updateList()});$("#sortOrder").change(function(){n.updateList()});$(".product-lister-ico").hide();$(".toggle-button-list").click(function(){$(".toggle-button-list").addClass("current");$(".toggle-button-ico").removeClass("current");$(".product-lister").show();$(".product-lister-ico").hide()});$(".toggle-button-ico").click(function(){$(".toggle-button-ico").addClass("current");$(".toggle-button-list").removeClass("current");$(".product-lister-ico").show();$(".product-lister").hide()})},updateList:function(){var n=this;Lenovo.GA.RegisterVirtualView("Product List","Search Product",$("#SearchKeywords").val());$(".input_search_product").blur();$(".dropDownForm").submit()},updateOptions:function(n){var t=this;n.ProductTypes!=undefined&&t.updateDropDown($("#productType"),n.ProductTypes);n.Series!=undefined&&t.updateDropDown($("#series"),n.Series);n.Models!=undefined&&t.updateDropDown($("#model"),n.Models);n.SortFields!=undefined&&t.updateDropDown($("#sortOrder"),n.SortFields);$(".toggle-button-list").hasClass("current")&&($(".product-lister").show(),$(".product-lister-ico").hide());$(".toggle-button-ico").hasClass("current")&&($(".product-lister").hide(),$(".product-lister-ico").show())},updateDropDown:function(n,t){var i=this;n.empty();$.each(t,function(t,i){n.append($("<option><\/option>").attr("value",i.Value).attr("selected",i.Selected).text(i.Text))});i.disableDropDownIfNotApplicable(n)},disableDropDownIfNotApplicable:function(n){n.children().length==1&&n.children().first().val()===""?n.attr("disabled","disabled"):n.removeAttr("disabled")},videoListClick:function(){$(".videoicon").children("a").removeClass("current");$(".videolist").children("a").addClass("current");$(".wrap_photo_list").removeClass("icon_photo_list").addClass("list_photo_list");$(".flex-active-slide").removeAttr("style")},videoIconClick:function(){$(".videolist").children("a").removeClass("current");$(".videoicon").children("a").addClass("current");$(".wrap_photo_list").removeClass("list_photo_list").addClass("icon_photo_list");$(".flex-active-slide").removeAttr("style");$(".flex-active-slide").css({width:"100%",float:"left","margin-right":"-100%",position:"relative",display:"list-item"})}};Lenovo.ProductPartsTab=function(){this.init()};Lenovo.ProductPartsTab.prototype={init:function(){var t=this,i=$("#product-parts-category").selectize({create:!1}),n=i[0].selectize;$("#product-parts-page").find("input#SelectCategory").val(n.getValue());$("#SearchKey.product-parts-tab").keydown(function(i){var r=i?i:window.event?window.event:null;if(r.keyCode==13){if(n.getValue()=="Specifications"&&$("div[data-hasSpecifications]").attr("data-hasSpecifications")=="False")return;t.SubmitAction()}});$("#product-parts-category").change(function(){n.getValue()=="Specifications"&&$("div[data-hasSpecifications]").attr("data-hasSpecifications")=="False"?$("#parts-product-detail").show():(n.getValue()=="Specifications"?$("#specifications").show():n.getValue()=="PartsLookup"?$("#partsLookupEntry").show():$("#parts-files-list").show(),$("#product-parts-page").find("input#SelectCategory").val(n.getValue()),$("#product-parts-page").find("input#IsFruBom").val("false"),n.getValue()=="PartsList"&&$("#product-parts-page").find("input#IsFruBom").val("true"),t.SubmitAction())});$("#product-parts-page").find("li").click(function(){var i=$(this).attr("data-value");t.GetPartsLookup(i);i!=n.getValue()&&(t.ContentChangeSetting(),$(this).find("a").addClass("selected"),n.setValue(i))});$.Placeholder.init()},SubmitAction:function(){Lenovo.GA.RegisterVirtualView("Product Detail","Search Product Parts",$("#SearchKey.manuals-tab").val());$("#product-parts-form").submit()},ContentChangeSetting:function(){$("#product-parts-page").find("li a").removeClass("selected");$("#product-parts-page").find(".needHidden").each(function(){$(this).hide()})},GetPartsLookup:function(n){var t=this;$("#product-parts-page").find("input#IsFruBom").val("false");n=="PartsList"&&($("#product-parts-page").find("input#IsFruBom").val("true"),t.SubmitAction())}};Lenovo.ProductSolution=function(){window.productSolution=this;this.init()};Lenovo.ProductSolution.prototype={init:function(){var n=this,t;$(".solutionSearchKey").keydown(function(t){t.keyCode==13&&n.SearchSolution()});$(".solution-subcategory-select").selectize({create:!1});$(".prod-header-toggle").click(function(){$(this).hasClass("down")?$("#BySortOrder").attr("value","Ascending"):$("#BySortOrder").attr("value","Descending")});$("#filterReset").click(function(){$("#FileterContent input[type=checkbox]").removeAttr("checked");$("#FileterContent .dropDown").hide();$("#CheckedCategories").attr("value","");$(".solutionSearchKey").val("");n.SearchSolution()});t=new Lenovo.UI_DropDownList("view all");t.SelectObj=$("#FileterContent .dropBox");t.BindEvent();t._Change(function(t){$("#CheckedCategories").attr("value","");$(".dropDown ul input[type=checkbox]:checked").each(function(){var n=$("#CheckedCategories").attr("value");$("#CheckedCategories").attr("value",n+","+$(this).val())});n.changeCategory($("#_PartialContentUrl").attr("value"));$("#FileterContent .dropBox .dropDown").not(t.parents(".dropDown")).hide()});$(".tree-view-group-title").click(function(){$(this).parent(".tree-view-group-item ").toggleClass("visible")});$("input[name=SelectedCategories]").change(function(){n.CheckBoxSearch($(this))});n.initTreeEvents();$(".tree-view-list.solution li").find("a").first().addClass("tree-item-active");$.Placeholder.init();n.BindFilterEvent();n.ResizeEvent();$(window).resize(function(){n.ResizeEvent()})},initTreeEvents:function(){var n=this;$(".tree-view-list.solution li").click(function(){$(".tree-view-list.solution li").find("a").removeClass("tree-item-active");$(this).find("a").addClass("tree-item-active");$("#SelectCategory").attr("value",$(this).attr("data-role"))})},ResizeEvent:function(){$(window).width()>579?$("#FileterContent .dropDown").css("position","static"):$("#FileterContent .dropDown").css("position","absolute")},SearchSolution:function(){Lenovo.GA.RegisterVirtualView("Product Detail","Search FAQ",$("#SearchKey").val());$("#SubmitType").attr("value","1");$("#SearchSolutionContentForm").submit();$("#SearchKey").blur()},changeCategory:function(){$("#SubmitType").attr("value","0");$("#SearchSolutionContentForm").submit()},LoadData:function(n){var t=this;$("#FilterSelectedContent").empty();n.Categories.length>0&&($("#FileterContent .dropBox ul li").hide(),$("#FileterContent .dropBox ul li").removeAttr("shown"),$(n.Categories).each(function(n,t){t.Children.length>0&&$(t.Children).each(function(n,t){var i=$("#FileterContent .dropBox ul input[type=checkbox]").filter("[value='"+t.Categorykey+"']");i.is(":checked")&&$("#FilterSelectedContent").append('<div class="product-filter-selected"><strong>'+i.parents(".dropBox").find(">a").text()+":<\/strong>"+t.CategoryName+'<a class="close" value=\''+t.Categorykey+"'><\/a><\/div>");i.parent().show().attr("shown","true")})}),$("#FileterContent .dropBox").each(function(){$(this).find("ul li[shown=true]").length>0?$(this).show():$(this).hide()}));$("#FilterSelectedContent").append('<div class="reset"><\/div>')},BindFilterEvent:function(){var n=this;$("#FileterContent select").change(function(){$("#CheckedCategories").attr("value","");$("#FileterContent select").each(function(){if($(this).val().indexOf("/")>0){var n=$("#CheckedCategories").attr("value");$("#CheckedCategories").attr("value",n+","+$(this).val())}});n.changeCategory($("#_PartialContentUrl").attr("value"))});$("#FilterSelectedContent .close").click(function(){$("#FileterContent ul input[value='"+$(this).attr("value")+"']").click();$(this).parent(".product-filter-selected").remove()})},SubmitFilterForm:function(){var n=this;$("#CheckedCategories").attr("value","");$(".dropDown ul input[type=checkbox]:checked").each(function(){var n=$("#CheckedCategories").attr("value");$("#CheckedCategories").attr("value",n+","+$(this).val())});n.changeCategory($("#_PartialContentUrl").attr("value"))}};Lenovo.UI_DropDownList=function(n){this.ViewAllLab=n;this.SelectObj=$('<div class="dropBox"><\/div>');this.CategoryLab=$('<a class="selectBox">Operating System<\/a>');this.Content=$('<div class="dropDown" style="display: none;"><\/div>');this.SubContent=$("<ul><\/ul>");this.DdlOption=function(n,t){return $('<li><input type="checkbox" data-value="'+n+'"><label>'+t+"<\/label><\/li>")};this.Init()};Lenovo.UI_DropDownList.prototype={Init:function(){var n=this;n.SelectObj.append(n.CategoryLab);n.Content.append(n.ViewAll).append(n.SubContent);n.SelectObj.append(n.Content)},AddOption:function(n,t){var i=this;i.SubContent.append(new i.DdlOption(n,t))},SetCategoryLab:function(n){var t=this;t.SelectObj.find(".selectBox").text(n)},Output:function(){this.SelectObj.html()},BindEvent:function(){var n=this;n.SelectObj.find(".selectBox").on("click",function(){n.SelectObj.find(".dropDown").not($(this).next(".dropDown")).hide();$(this).next(".dropDown").is(":visible")?$(this).next(".dropDown").hide():$(this).next(".dropDown").show()});$(".dropDown").hover(function(){},function(){$(this).hide()})},_Change:function(n){var t=this;t.SelectObj.find("input[type=checkbox]").change(function(){$(this).parents(".dropDown").find("ul input:checked").length!=$(this).parents(".dropDown").find("ul input").length&&$(this).parents(".dropDown").find("p>input").removeAttr("checked");$(this).parent().get(0).tagName=="LI"&&n($(this))})}};Lenovo.ForumRedirect=function(){this.init()};Lenovo.ForumRedirect.prototype={init:function(){$(document).ready(function(){window.location.replace($("#redirectUrl").val())})}};Lenovo.ForumRedirect.GetForumUrl=function(n){var t=n.responseJSON;window.open(t)};$(document).ready(function(){function i(n){n.wrap("<div class='table-wrapper' />");var t=n.clone();t.find("td:not(:first-child), th:not(:first-child)").css("display","none");t.removeClass("responsive");n.closest(".table-wrapper").append(t);t.wrap("<div class='pinned' />");n.wrap("<div class='scrollable' />");u(n,t)}function r(n){n.closest(".table-wrapper").find(".pinned").remove();n.unwrap();n.unwrap()}function u(n,t){var r=n.find("tr"),u=t.find("tr"),i=[];r.each(function(n){var t=$(this),r=t.find("th, td");r.each(function(){var t=$(this).outerHeight(!0);i[n]=i[n]||0;t>i[n]&&(i[n]=t)})});u.each(function(n){$(this).height(i[n])})}var n=!1,t=function(){if($(window).width()<767&&!n)return n=!0,$("table.responsive").each(function(n,t){i($(t))}),!0;n&&$(window).width()>767&&(n=!1,$("table.responsive").each(function(n,t){r($(t))}))};$(window).load(t);$(window).on("redraw",function(){n=!1;t()});$(window).on("resize",t)});Lenovo.ProductSubscription=function(){this.init();Lenovo.ProductSubscription.instance=this};Lenovo.ProductSubscription.SucceedBind=function(n){$("#productlabal").html($("#ProductDetailLabel").text());$("#gotoMyAccount").attr("href",$("#gotoMyAccount").attr("href")+"?id=1");$("#gotoMySubscription").attr("href",$("#gotoMySubscription").attr("href")+"?id=3");var t=AjaxUtil.getJsonBodyPart(n);t.trim()=="true"&&($("#succeedproductImages").hide(),$("#succeedImages").show());$("#oKBtn").click(function(){Lenovo.ProductSubscription.CheckLogin($("#oKSubmit"))});Lenovo.ProductSubscription.CheckCanSubmit()};Lenovo.ProductSubscription.AddToProFileSucess=function(){$("#succeedproductImages").show();$("#addProductFile").hide();$("#addProductFile").prev("span").hide()};Lenovo.ProductSubscription.ReEditBindEvent=function(){Lenovo.ProductSubscription.instance.SetDefaultValue();$("#cancelBtn").click(function(){$("#GetDefaultBtn").removeAttr("checked");Lenovo.ProductSubscription.CheckLogin($("#cancelSubmit"))});$("#updateSubmit").click(function(){Lenovo.ProductSubscription.UpdateSubmit()});$("#submitBtn").click(function(){Lenovo.ProductSubscription.UpdateSubmit()});$("#GetDefaultBtn").click(function(){$(this).is(":checked")&&$("#cancelBtn").removeClass("grayBtn")});$("input").click(function(){$("#cancelBtn").removeClass("grayBtn")});Lenovo.ProductSubscription.CheckCanSubmit()};Lenovo.ProductSubscription.prototype={init:function(){var n=this;n.bindEvents();n.SetDefaultValue();n.CancelEvent()},bindEvents:function(){var n=this;$("#submitBtn").click(function(){Lenovo.ProductSubscription.UpdateSubmit()});$(".subscribeBtn").click(function(){$(this).parents(".subscribeBox").addClass("show")});$("#cancelBtn").click(function(){Lenovo.ProductSubscription.CheckLogin($("#cancelSubmit"))});$("#updateSubmit").click(function(){Lenovo.ProductSubscription.UpdateSubmit()});$("#addProductFile").click(function(){$("#addToProFile").submit()});Lenovo.ProductSubscription.CheckCanSubmit()},CancelEvent:function(){$("#GetDefaultBtn").click(function(){$(this).is(":checked")&&$("#cancelBtn").removeClass("grayBtn")});$("input").click(function(){$("#cancelBtn").removeClass("grayBtn")})},SetDefaultValue:function(){var n=this;$("input[name='idDriverDownload']").click(function(){$(this).is(":checked")==!0?($("#driversdownDisabled").find("fieldset").removeAttr("disabled"),$("input[name='selectAllOs']")[0].checked=!0,$("input[name='operateSystems']").each(function(){$(this)[0].checked=!0})):($("#driversdownDisabled").find("fieldset").attr("disabled","disabled"),$("#driversdownDisabled").find("fieldset").find("input").each(function(){$(this)[0].checked=!1}));Lenovo.ProductSubscription.instance.ClickInput()});$("input[name='selectAllOs']").click(function(){$(this).is(":checked")==!0?$("input[name='operateSystems']").each(function(){$(this)[0].checked=!0}):$("input[name='operateSystems']").each(function(){$(this)[0].checked=!1});Lenovo.ProductSubscription.instance.ClickInput()});$("#driversdownDisabled").find("input").click(function(){var n="";$("#driversdownDisabled").find("input").each(function(){$(this).is(":checked")==!0&&$(this).attr("name")!="selectAllOs"&&(n+=$(this).attr("value"))});n==""?($("input[name='idDriverDownload']")[0].checked=!1,$("input[name='selectAllOs']")[0].checked=!1):$("input[name='idDriverDownload']")[0].checked=!0;Lenovo.ProductSubscription.instance.ClickInput()});var t=$("input[name=EmailSendType]"),i=$("input[name=OperatingSystem]"),r=$("input[name='SubscriptionTopics']");if(r.val()==""){$("input[name='idDriverDownload']").attr("defaultSelected")=="True"&&($("input[name='idDriverDownload']")[0].checked=!0,$("input[name='driverDownload']")[0].checked=!0,$("#driversdownDisabled").find("fieldset").removeAttr("disabled"));n.DefaultSelectedForSubscription($("input[name=SubscriptionTopicsChk]"));return}t.val()!=""||i.val()!=""?($("#driversdownDisabled").find("fieldset").removeAttr("disabled"),$("input[name='idDriverDownload']").attr("checked",!0),$("input[name=driverDownload]").each(function(){n.SetCheckBoxDefaultValue(t,$(this))}),$("input[name=operateSystems]").each(function(){n.SetCheckBoxDefaultValue(i,$(this))})):$("#driversdownDisabled").find("fieldset").attr("disabled","disabled");$("input[name=EmailFrequencyRdo]").each(function(){n.SetRadioButtonDefaultValue($("input[name=EmailFrequency]"),$(this))});$("input[name=SubscriptionTopicsChk]").each(function(){n.SetCheckBoxDefaultValue($("input[name=SubscriptionTopics]"),$(this))})},SetRadioButtonDefaultValue:function(n,t){n.attr("value")==t.attr("value")&&t.attr("checked","true")},SetCheckBoxDefaultValue:function(n,t){for(var r=n.attr("value").split(","),i=0;i<r.length;i++)r[i]==t.attr("value")&&t.attr("checked","true")},DefaultSelectedForSubscription:function(n){n[0].checked=n.attr("groupchecked")=="True"?!0:!1},ClickInput:function(){var n="";$("div[name=subscriptionlist]").find("input").each(function(){$(this).is(":checked")==!0&&(n+=$(this).attr("value"))});n==""?($("a[name=errorGroup]").hide(),$("#errormessage").show(),$("#errorSelect").show(),$("a[name=submitGroup]").attr("class","scribeBtn grayBtn"),$("#SubscriptionContentForm").attr("isSubmit","unallow")):($("#errorSelect").hide(),$("#errormessage").hide(),$("a[name=submitGroup]").attr("class","scribeBtn closeBtn"),$("#SubscriptionContentForm").attr("isSubmit","allow"))}};Lenovo.ProductSubscription.UpdateSubmit=function(){var n="",t;$("input[name='idDriverDownload']").is(":checked")==!0&&(n="0,");$("input[name=SubscriptionTopicsChk]").each(function(){$(this).is(":checked")&&(n+=$(this).attr("value")+",")});$("input[name=SubscriptionTopics]").attr("value",n.substring(0,n.length-1));$("input[name=EmailFrequencyRdo]").each(function(){$(this).is(":checked")&&$("input[name=EmailFrequency]").attr("value",$(this).attr("value"))});$("input[name=driverDownload]").is(":checked")?$("input[name=EmailSendType]").attr("value",$("input[name=driverDownload]").val()):$("input[name=EmailSendType]").val("");t="";$("input[name=operateSystems]").each(function(){$(this).is(":checked")&&(t+=$(this).attr("value")+",")});$("input[name=OperatingSystem]").attr("value",t.substring(0,t.length-1));Lenovo.ProductSubscription.CheckLogin($("#SubscriptionContentForm"))};Lenovo.ProductSubscription.CheckLogin=function(n){$.ajax({url:$("#account_content").attr("checkloginurl"),type:"Get",dataType:"json",success:function(t){if(t){if(n[0]!=undefined&&n.attr("isSubmit")=="allow")switch(n[0].tagName){case"FORM":n.submit();case"A":n.trigger("click")}}else return $("a[name=errorGroup]").hide(),$("#errormessage").show(),$("#reLogin").show(),$("#submitBtn").attr("class","scribeBtn grayBtn"),$("#updateSubmit").attr("class","scribeBtn grayBtn"),$("#cancelBtn").attr("class","scribeBtn grayBtn"),$("#submitBtn").removeAttr("id"),!1}})};Lenovo.ProductSubscription.CheckCanSubmit=function(){$("input[name=SubscriptionTopicsChk]").click(function(){Lenovo.ProductSubscription.instance.ClickInput()})}