function eject_loginfrom(){var n=$("#LoginForm").length;n?($(".w_toplogin_tcbg").fadeIn(),$("#bg").fadeIn(),$("#LoginForm [name=returnUrl]").val(window.location.href),$("#email").focus()):window.location.href=loginUrl}function checkLangOrCurrency(){$("#languagecz .w_current").removeClass("w_current");$("#languagecz [langid="+langId+"]").addClass("w_current");$("#Currencyxz .w_current").removeClass("w_current");$('#Currencyxz [flag="'+currency+'"]').addClass("w_current")}function overloadFunc(n,t,i){switch(i.toLowerCase()){case"eproduct003":Eproduct003Paging(n,t)}}function settime(n){countdown==0?clearOneInterval(n):($(n).addClass("disabledsend"),countdown==countdownSource&&(sourceTexr=n.innerText),n.setAttribute("disabled",!0),n.innerText=window.txt_Resend+"("+countdown+")",countdown--)}function clearOneInterval(n){n!=undefined&&($(n).removeClass("disabledsend"),n.removeAttribute("disabled"),sourceTexr!=""&&(n.innerText=sourceTexr),countdown=120,window.clearInterval(cleartime))}function checkPwd(n){var t=$("#"+n).val();return t==""?($("#"+n+"-error").text(window.txt_MustEnter).show(),!1):t.length<6?($("#"+n+"-error").text(window.txt_PasswordLeastSix).show(),!1):!0}function checkConfirmPwd(n,t){var r=$("#"+n).val(),i=$("#"+t).val();return i==""?($("#"+t+"-error").text(window.txt_MustEnter).show(),!1):r!=i?($("#"+t+"-error").text(window.txt_PwdAreDifferent).show(),!1):!0}function publicGetList(n){var t,i;n==undefined&&(n=1);t={};$("#publicSearchForm")&&(t=$("#publicSearchForm").serialize());msgBox.showMsgWait(txt_Loading);i=window.beforePaging||function(){};i();$.post(window.publicListUrl+"?page="+n,t,function(t){if(t.status==1){var i=$.templates($("#publicListTemp").text()).render(t.data[0].Items);$("#publicTable").html(i);publicPageHtml(n,"publicGetList",t.data[0].TotalPages)}msgBox.hidBox();t.data[0].TotalPages<=0&&window.onEmptyList&&window.onEmptyList()},"json")}function publicPageHtml(n,t,i){var f,r,e,o,u;if(i>1){for(f="",f+=n==1?'<li class="prev disabled"><span aria-hidden="true">«<\/span><\/li>':'<li><a href="javascript:void(0)" onclick="'+t+'(1)" aria-label="Previous"><span aria-hidden="true">«<\/span><\/a><\/li>',r=parseInt((n-1)/5+1),e=parseInt((i-1)/5+1),r>1&&(f+='<li><a href="javascript:void(0)" onclick="'+t+"("+(r-1)*5+')" >...<\/a><\/li>'),o=r*5>i?i:r*5,u=(r-1)*5+1;u<=o;u++)f+=n==u?'<li class="active"><a href="javascript:void(0)" onclick="'+t+"("+u+')">'+u+"<\/a><\/li>":'<li><a href="javascript:void(0)" onclick="'+t+"("+u+')">'+u+"<\/a><\/li>";r<e&&(f+='<li><a href="javascript:void(0)" onclick="'+t+"("+(r*5+1)+')">...<\/a><\/li>');f+=n==i?'<li class="prev disabled"><a><span aria-hidden="true">»<\/span><\/a><\/li>':'<li><a href="javascript:void(0)" onclick="'+t+"("+i+')" aria-label="Next"><span aria-hidden="true">»<\/span><\/a><\/li>';$("#pageUl").html(f)}else $("#pageUl").html("")}function Mouse_Event(){h_GetModuleTranslate();h_NoInventorySales();var n=$(".topcart_menu");n.mouseenter(function(){parseInt($(".shopping_cart_quantity").text())>0&&$(this).children(".topcart_pop").show()});$(".topcart_pop").mouseleave(function(){$(this).children(".topcart_pop").hide()});n.mouseleave(function(){$(".topcart_pop").hide()})}function GetList(){if(DataHelper.ToBool(window.isOlderVersionShoppingInterface)){$(".topcart_pop").html("");var n={siteid:siteId};$.post(h_cartlisturl,n,function(n){var t,f,e,o;if(n==""){$(".shopping_cart_quantity").text(0);return}n=JSON.parse(n);var i=0,r=0,u=0;for(t=0;t<n.length;t++)n[t].IsChecked&&(i=(parseFloat(i)+n[t].Price*n[t].Quantity).toFixed(2),f=parseFloat(n[t].Price*n[t].Quantity).toFixed(2),n[t].Price=f,r+=n[t].Quantity),u+=n[t].Quantity;$(".shopping_cart_quantity").text(u);e={CartList:n,sumprice:i};o=$("#HeaderCart").tmpl(e);$(".topcart_pop").html(o);$("#shop_total").val(r);easesales&&easesales.googleTagMgr&&easesales.googleTagMgr.storeShoppingCartProducts({products:n});$(".iCheck").iCheck({checkboxClass:"icheckbox_flat-green",increaseArea:"0"});$(".topcart_1  .iCheck-helper").on("click",function(){var i,n,t,r;if(parseInt(h_IsNoInventorySales)==0&&($("#h_check_all").is(":checked")?$(".topcart_con input").iCheck("check"):$(".topcart_con input").iCheck("uncheck"),newCheck(),h_spCodesTemp.length>0)){for(i=$.parseJSON(h_GetProductQuantity(h_spCodesTemp)),n="",t=0;t<i.length;t++)r=parseInt($("#h_txtProductCount_"+i[t].Id).text()),r>i[t].Inventory&&(n+=$("#productname_"+i[t].Id).text().trim()+",");if(n.length>0){n=n.substring(0,n.length-1);$("#h_check_all").iCheck("uncheck");$(".topcart_con input").iCheck("uncheck");h_strModuleTranslate.length>0?msgBox.showMsgErr(n+""+h_strModuleTranslate):msgBox.showMsgErr(n+""+txt_InventoryShortage);h_EditProduct({isCheck:!1,siteId:siteId},h_checkallurl);return}}$("#h_check_all").is(":checked")?($(".topcart_con input").iCheck("check"),h_selectBox("true",h_checkallurl)):($(".topcart_con input").iCheck("uncheck"),h_selectBox("false",h_checkallurl))});$(".topcart_list .iCheck-helper").on("click",function(){var t=!1,h=$(this).siblings("input"),n=$(this).siblings("input").val(),c=$(this).siblings("input").attr("data-package"),i,u,s,r,f;if(parseInt(c)==1){$(".topcart_con input").iCheck("check");return}if(parseInt(h_IsNoInventorySales)==0)if(h[0].id.indexOf("_suit")>-1){t=!0;var e=!0,o=h_GetSuitEshopquantity(n),r=parseInt($("#h_txtProductCount_"+n+"_suit").val());for(i=0;i<o.length;i++)u=o[i],r*u.Quantity>u.AllQuantity&&(h_strModuleTranslate.length>0?msgBox.showMsgErr(h_strModuleTranslate):msgBox.showMsgErr(txt_InventoryShortage),h_IsCheckBox("false",n,h_updatecheckurl,t),$("#h_check_product_"+n+"_suit").iCheck("uncheck"),e=!1);if(!e)return}else if(s=parseInt(h_eshopquantity(n)),r=parseInt($("#h_txtProductCount_"+n).val()),r>s){h_strModuleTranslate.length>0?msgBox.showMsgErr(h_strModuleTranslate):msgBox.showMsgErr(txt_InventoryShortage);h_IsCheckBox("false",n,h_updatecheckurl,t);$("#h_check_product_"+n).iCheck("uncheck");return}f="#h_check_product_"+n;t&&(f+="_suit");$(f).is(":checked")?h_IsCheckBox("true",n,h_updatecheckurl,t):h_IsCheckBox("false",n,h_updatecheckurl,t)})})}}function h_ischeck(){h_spCodesTemp="";$(".topcart_con input:checkbox:checked").each(function(n){0==n?h_spCodesTemp=$(this).val():h_spCodesTemp+=","+$(this).val()})}function h_plusCart(n,t){var i,r;i=t?parseInt($("#h_txtProductCount_"+n+"_suit").val()):parseInt($("#h_txtProductCount_"+n).val());i+=1;r={count:parseInt(i),product:n,siteId:siteId,isSuit:t};h_EditProduct(r,h_updateCountUrl,"+")}function h_reducesCart(n,t){var i,r;i=t?parseInt($("#h_txtProductCount_"+n+"_suit").val()):parseInt($("#h_txtProductCount_"+n).val());i>1&&(i-=1,r={count:parseInt(i),product:n,siteId:siteId,isSuit:t},h_EditProduct(r,h_updateCountUrl,"-"))}function h_IsCheckBox(n,t,i,r){$("#h_check_product_"+t);var u={siteId:siteId,isCheck:n,product:t};r&&(u.isSuit=r);h_EditProduct(u,i)}function h_selectBox(n,t){h_ischeck();var i={siteId:siteId,isCheck:n};h_EditProduct(i,t)}function newCheck(){h_spCodesTemp="";$(".topcart_con:eq(0) input:checkbox:checked").each(function(n){0==n?h_spCodesTemp=$(this).val():h_spCodesTemp+=","+$(this).val();$(this).attr("data-suit")!=undefined&&(h_spCodesTemp+="_suit")})}function h_checkOut(n){var i,r,t,u;if(newCheck(),parseInt(h_IsNoInventorySales)==0&&h_spCodesTemp.length>0){for(i=$.parseJSON(h_GetProductQuantity(h_spCodesTemp)),r="",t=0;t<i.length;t++)u=0,u=i[t].IsSuit?parseInt($("#h_txtProductCount_"+i[t].Id+"_suit").val()):parseInt($("#h_txtProductCount_"+i[t].Id).val()),$("#h_check_product_"+i[t].Id).iCheck("uncheck"),i[t].IsSuit||u>i[t].Inventory&&(r+=($("#productname_"+i[t].Id).text()+",").trim());if(r.length>0){r=r.substring(0,r.length-1);$("#h_check_all").iCheck("uncheck");h_strModuleTranslate.length>0?msgBox.showMsgErr(r+""+h_strModuleTranslate):msgBox.showMsgErr(r+""+txt_InventoryShortage);h_EditProduct({isCheck:!1,siteId:siteId},h_checkallurl);return}}h_spCodesTemp!=""&&h_spCodesTemp!=undefined?location=n:msgBox.showMsgErr(txt_PleaseSelectProduct)}function h_datasum(){var n=0,i,t,u,r;if(h_ischeck(),h_spCodesTemp!="")for(i=h_spCodesTemp.split(","),t=0;t<i.length;t++)u=$("#product_price_"+parseInt(i[t])).text(),n=(parseFloat(n)+parseFloat($("#product_price_"+parseInt(i[t])).attr("totaprice"))).toFixed(2);r={price:n,siteId:siteId};$.post(h_matcPackUrl,r,function(t){var i,u,r;if(t.status==1)if(AR=t,i=t.data[0].Lst_packInfo,u="",i!=""&&i!=undefined)for(r=0;r<i.length;r++)packInfo=i[r],packInfo.SavingMoney>0?($(".topcart_sale").show(),packInfo.InfoType==1?i[0].Information!=null&&i[0].Information!="null"&&i[0].Information!=undefined&&(u=packInfo.Information.replace("{X}",'<b class="wz_red">'+packInfo.LackPrice+"<\/b>").replace("{Y}",'<b class="wz_red">'+packInfo.DecreaseNumber+"<\/b>"),$("#promotions_title").html(u)):packInfo.InfoType==2&&($("#promotions_title").text(packInfo.PackageName),$("#promotions_price").text(parseFloat(packInfo.SavingMoney).toFixed(2)),$("#price_sum").val((parseFloat(n)-parseFloat(packInfo.SavingMoney)).toFixed(2)))):($(".topcart_sale").hide(),$("#price_sum").val(n));else $("#price_sum").val(n),$(".topcart_sale").hide()})}function h_removeProdcut(n,t){var i=confirm(txt_SureDelete,function(){if(n=="undefined"){var i=$("input:checkbox[name='h_check_product']:checked");newCheck();i.length>0?h_EditProduct({chkIsCheck:h_spCodesTemp,siteId:siteId},h_removeurl):msgBox.showMsgErr(txt_PleaseSelectProduct)}else h_EditProduct({product:n,siteId:siteId,isSuit:t},h_removeurl)},function(){})}function h_EditProduct(n,t,i){var r=$.post(t,n,function(r){var h,s,f,l,a,p,w,c,e,v,y,o,u,b;if(r.status==1){if(r.msg!=""&&msgBox.showMsgOk(r.msg),n.isSuit?(h=$("#h_txtProductCount_"+n.product+"_suit"),s=$("#product_price_"+n.product+"_suit")):(h=$("#h_txtProductCount_"+n.product),s=$("#product_price_"+n.product)),t.indexOf("Cart/UpdateCount")>-1&&(i=="+"?(f=parseInt(h.val()),l=parseFloat(s.attr("totaprice"))/f,f+=1,a=(parseFloat(l)*parseInt(f)).toFixed(2),e=parseInt($(".shopping_cart_quantity")[0].innerText)+1,h.val(f),s.val(a),s.attr("totaprice",a),$("#shop_total").val(e),$("#price_sum").val((parseFloat($("#price_sum").val())+parseFloat(l)).toFixed(2))):(f=parseInt(h.val()),l=parseFloat(s.attr("totaprice"))/f,f>1?(f-=1,e=parseInt($(".shopping_cart_quantity")[0].innerText)-1):(f=1,e=1),a=(parseFloat(l)*parseInt(f)).toFixed(2),h.val(f),s.val(a),s.attr("totaprice",a),$("#shop_total").val(e),$("#price_sum").val((parseFloat($("#price_sum").val())-parseFloat(l)).toFixed(2))),easesales&&easesales.googleTagMgr&&easesales.googleTagMgr.storeShoppingCartProducts({products:[{POSChildProductId:n.product,Quantity:n.count}]})),t.indexOf("Cart/DeleteProduct")>-1){if(p=[],n!=undefined&&n.product!=undefined)c=parseInt(h.val()),e=parseInt($(".shopping_cart_quantity")[0].innerText)-c,$(".shopping_cart_quantity").text(e),p.push({productId:n.product,quantity:c});else for(w=n.chkIsCheck.split(","),u=0;u<w.length;u++)c=0,c=parseInt($("#h_txtProductCount_"+w[u]).val()),e=parseInt($(".shopping_cart_quantity")[0].innerText)-c,$(".shopping_cart_quantity").text(e),p.push({productId:w[u],quantity:c});$(".topcart_pop").html("");$(".shopping_cart_quantity").text(0);GetList();easesales&&easesales.googleTagMgr&&easesales.googleTagMgr.removeFromCart({products:p})}if(v=0,y=0,newCheck(),h_spCodesTemp!="")for(o=h_spCodesTemp.split(","),u=0;u<o.length;u++)n.isSuit||o[u].indexOf("_suit")>-1?(b=$("#product_price_"+o[u]).val(),v=(parseFloat(v)+parseFloat($("#product_price_"+o[u]).attr("totaprice"))).toFixed(2),y=parseFloat(y)+parseFloat($("#h_txtProductCount_"+o[u]).val())):(b=$("#product_price_"+parseInt(o[u])).val(),v=(parseFloat(v)+parseFloat($("#product_price_"+parseInt(o[u])).attr("totaprice"))).toFixed(2),y=parseFloat(y)+parseFloat($("#h_txtProductCount_"+parseInt(o[u])).val()));$("#shop_total").val(y);$("#price_sum").val(v)}else r.msg!=""&&msgBox.showMsgErr(r.msg)});r.error=function(n){console.log(JSON.stringify(n))}}function h_eshopquantity(n){var t;return $.ajax({async:!1,type:"post",url:h_eshopquantityurl,data:{POSChildProductId:n},success:function(n){t=n}}),t}function h_NoInventorySales(){window.isAMP||window.isConvenientShopping||(window.staticCanBuyZero!==null&&window.staticCanBuyZero!==undefined?h_IsNoInventorySales=window.staticCanBuyZero:$.ajax({async:!1,type:"post",url:h_canbuyzerourl,success:function(n){h_IsNoInventorySales=n}}))}function h_GetProductQuantity(n){var t;return $.ajax({async:!1,type:"post",datatype:"json",url:h_productquantityurl,data:{POSChildProductId:n},success:function(n){t=n}}),t}function h_GetModuleTranslate(){}function h_GetSuitEshopquantity(n){var t;return $.ajaxSettings.async=!1,$.post(h_suiteshopquantityurl,{SuitId:n},function(n){t=n.rows}),$.ajaxSettings.async=!0,t}function ConditionList(){function t(n){n.indexOf("isHasValue")>-1?($(".input_group_jt").show(),$(".search_last").removeClass("search_last"),$(".ConditionList").html(n),headsearch.init(),$(".w_search_tc").mouseleave(function(){$(".w_search_tc").slideUp()})):($(".input_group_jt").remove(),$(".w_search_tc").remove(),$(".left_search_box").remove())}var n,i;if(window.h_conditionlisturl){n=null;try{n=localStorage.getItem("search")}catch(r){console.log(r);n=null}window.headerCondition?t(window.headerCondition):(i=n==null||n=="undefined"||n==null?{cviewname:"_ConditionHeader"}:{Sc:n,cviewname:"_ConditionHeader"},$.get(h_conditionlisturl,i,t,"text"))}}function IsPhone(){var n=navigator.userAgent.toLowerCase(),t=n.match(/ipad/i)=="ipad",i=n.match(/iphone os/i)=="iphone os",r=n.match(/midp/i)=="midp",u=n.match(/rv:1.2.3.4/i)=="rv:1.2.3.4",f=n.match(/ucweb/i)=="ucweb",e=n.match(/android/i)=="android",o=n.match(/windows ce/i)=="windows ce",s=n.match(/windows mobile/i)=="windows mobile";return t||i||r||u||f||e||o||s?!0:!1}function GetMember(n){$.post(memberurl,{memberstr:n},function(n){n.status==1?n.data?n.data==1&&($(".page_logintc2_tabcon .logintc2_form .login_start").eq(0).hide(),$(".page_logintc2_tabcon .logintc2_form .login_start").eq(1).show()):(msgBox.showMsgOk(n.msg),$(".cancel").hide(),window.location.href=n.url!=undefined&&n.url!=null&&n.url!=""?n.url:location.href,$(".cancel").show()):(msgBox.showMsgErr(n.msg),pageMemberLoginResetSlider())})}function getParam(n){var e=window.location.href,o,i,r,t,u,f;if(e.indexOf("code")>=0){if(o=e.split("?"),i=o[1],i.length>0){for(r=i.split("&"),t=0;t<r.length;t++)if(u=r[t],u!=""&&(f=u.split("="),f[0]==n))return f[1];return""}return""}return""}function initTelInput(){$(document).on("click",".intl-tel-input .flag-container .country-list li",function(){var n=$(this).parents(".intl-tel-input").prev();n.length>0&&n.val($(this).attr("data-dial-code"))});siteId==344?$(".phone-ares-code").intlTelInput({utilsScript:window.utilsJsCdnFile||"/js/utils.js"}):$(".phone-ares-code").each(function(){var t=$(this).attr("data-form-cmid"),n=$(this);t?onlyCountries.length<=0?$.get(window.phoneCodeUrl+"?cmid="+t,function(t){var u,r,i;if(t.status==1&&(onlyCountries=t.data[0].data,siteId==461)){for(u=[],r=-1,i=0;i<onlyCountries.length;i++)langId=="91"&&onlyCountries[i]=="cn"?r=i:langId=="90"&&onlyCountries[i]=="hk"?r=i:u.push(onlyCountries[i]);r>=0&&(u.splice(0,0,onlyCountries[r]),onlyCountries=u)}n.intlTelInput({onlyCountries:onlyCountries,preferredCountries:onlyCountries,utilsScript:window.utilsJsCdnFile||"/js/utils.js"});onlyCountries.length>0&&($(n).prev(".flag-container").find("ul li.divider").hide(),$(n).prev(".flag-container").find("ul li.divider").nextAll("li").hide())}):(n.intlTelInput({onlyCountries:onlyCountries,preferredCountries:onlyCountries,utilsScript:window.utilsJsCdnFile||"/js/utils.js"}),onlyCountries.length>0&&($(n).prev(".flag-container").find("ul li.divider").hide(),$(n).prev(".flag-container").find("ul li.divider").nextAll("li").hide())):siteId==429?$(".phone-ares-code").intlTelInput({utilsScript:window.utilsJsCdnFile||"/js/utils.js",preferredCountries:["cn","hk","mo","tw","jp","kr","us"]}):$(this).intlTelInput({preferredCountries:["hk","cn","mo","tw","jp","kr","us"],utilsScript:window.utilsJsCdnFile||"/js/utils.js"});$(n).parents(".intl-tel-input").prev("input[type='hidden']").val($(n).prev(".flag-container").find("ul li.active").attr("data-dial-code"));console.log($(n).parents(".intl-tel-input").prev("input[type='hidden']").val());n.blur(function(){var n=$(this).parents(".intl-tel-input").prev("input[type='hidden']");n!=undefined&&n!=null&&n.length>0&&n.val($(this).prev(".flag-container").find("ul li.active").attr("data-dial-code"))})})}function delCommCookie(n){var t=new Date,i;t.setTime(t.getTime()-1);i=getCommCookie(n);i!=null&&(document.cookie=n+"="+i+";expires="+t.toGMTString()+"; path =/")}function getCommsec(n){var t=n.substring(1,n.length)*1,i=n.substring(0,1);return i=="s"?t*1e3:i=="h"?t*36e5:i=="d"?t*864e5:void 0}function setCommCookie(n,t,i){(i==undefined||i==null||i=="")&&(i="h1");var u=getCommsec(i),r=new Date;r.setTime(r.getTime()+u*1);document.cookie=n+"="+escape(t)+";expires="+r.toGMTString()+"; path =/"}function getCommCookie(n){var t,i=new RegExp("(^| )"+n+"=([^;]*)(;|$)");return(t=document.cookie.match(i))?unescape(t[2]):null}function windowOut(n){var t=$(n.target).parents(".popup_prompt");winOut(t)}function alterIn(n){var t=$(".popup_prompt_alter");winIn(t);showMsg(t,n)}function alterOut(){var n=$(".popup_prompt_alter");winOut(n);showMsg(n,"")}function confirmIn(n){var t=$(".popup_prpmpt_confirm");winIn(t,"bounceIn");showMsg(t,n)}function confirmOut(){var n=$(".popup_prpmpt_confirm");winOut(n);showMsg(n,"")}function winIn(n,t){t=t||"zoomIn";var i=$(".popup_prompt_bg:last");i.size()||(i=$("<div class='popup_prompt_bg' style='width:100%; height:100%; position:fixed; top:0; left:0; background-color:#000; opacity:0.3;'><\/div>"),$("body").append(i));i.fadeIn(50,function(){$(n).addClass("animated").addClass(t).removeClass("popup_prompt_none zoomOut").focus()})}function winOut(n){$(n).removeClass("bounceIn zoomIn").addClass("zoomOut");$(".popup_prompt_bg:last").fadeOut(200)}function showMsg(n,t){$(n).find(".popup_prompt_text").html(t)}function IsMobile(){for(var i=navigator.userAgent,t=["Android","iPhone","SymbianOS","Windows Phone","iPod","iPad"],n=0;n<t.length;n++)if(i.indexOf(t[n])>=0)return!0;return!1}function resizeHeight(){var n=0;$(".pro_fourpic").each(function(){var t=$(this).width();t>n&&(n=t)});n=n-20;$(".pro_fourpic").height(n)}function acceptCookie(n){var t="AcceptCookie_"+window.siteId;setCommCookie(t,"AcceptCookie","d30");$(n).hide(400)}function isUrl(n){var t=new RegExp("^((https|http)?://)?(([0-9a-z_!~*'().&=+$%-]+: )?[0-9a-z_!~*'().&=+$%-]+@)?(([0-9]{1,3}.){3}[0-9]{1,3}|([0-9a-z_!~*'()-]+.)*([0-9a-z][0-9a-z-]{0,61})?[0-9a-z].[a-z]{2,6})(:[0-9]{1,4})?((/?)|(/[0-9a-z_!~*'().;?:@&=+$,%#-]+)+/?)$");return t.test(n)?!0:!1}function isEmail(n){if(n==undefined||n==""||n.length<=0)return!1;return n.match(/^[a-zA-Z0-9]+([._\\-]*[a-zA-Z0-9])*@([a-zA-Z0-9]+[-a-zA-Z0-9]*[a-zA-Z0-9]+.){1,63}[a-z0-9]+$/)}function Scrolling(){var t=IsMobile(),n=t?$(".w_mobile_head .scroll-box"):$("header .scroll-box");$(n).each(function(){var i=$(this).find("ul").eq(0),t=$(i).find("li"),r=$(this),u;(window.scrollTimer&&(clearInterval(window.scrollTimer),window.scrollTimer=null),t.length<=1)||(r.unbind(),r.hover(function(){console.log(1);clearInterval(window.scrollTimer);window.scrollTimer=null},function(){console.log(0);clearInterval(window.scrollTimer);window.scrollTimer=setInterval(function(){window.scrollTimer!=null&&scrollList(n,i)},5e3)}).trigger("mouseleave"),u=$(t)[0].clientHeight,$(n).css({height:u}),t.removeClass("hide"))})}function scrollList(n,t){var r=$(t).find("li"),i=$(r)[1].clientHeight;i<=0||($(t).css("margin-top")!="0px"&&($(r).eq(0).appendTo(t),$(t).css({marginTop:0})),$(n).animate({height:i},500),$(t).animate({marginTop:-i},500))}function checkDate(n){var t=n.match(/^(\d{1,4})(-|\/)(\d{1,2})\2(\d{1,2})$/),i;return t==null?!1:(i=new Date(t[1],t[3]-1,t[4]),i.getFullYear()==t[1]&&i.getMonth()+1==t[3]&&i.getDate()==t[4])}function getUrlParam(n){var r=window.location.href,i,t;try{return(i=new RegExp("(^|&)"+n+"=([^&]*)(&|$)","i"),t=window.location.search.substr(1).match(i),t!=null)?unescape(t[2]):""}catch(u){return""}}function ajaxFileUpload(n,t,i){return msgBox.showMsgWait(txt_TryingToUploading),$.ajaxFileUpload({url:n+"FileUpload.ashx",secureuri:!1,fileElementId:t,dataType:"json",success:function(n){if(n.error==0){var t=n.url+"_"+imgSizeArray[0]+"x"+imgSizeArray[1]+".ashx";i!=undefined&&$("#"+i).val(n.url)}else msgBox.showMsgErr(n.message)},error:function(n){msgBox.showMsgErr(n.message)}}),!1}function ajaxImageUpload(n,t,i,r,u){var o=$("#"+t),e,f,s,h;if(o.length==0){msgBox.showMsgErr(txt_MustHaveRecommandSize);return}if(e=o.text(),e.indexOf("*")==-1){msgBox.showMsgErr(txt_RecommendedSizeError);return}if(f=e.split("*"),f.length!=2){msgBox.showMsgErr(txt_RecommendedSizeError);return}if(isNaN(f[0])||isNaN(f[1])){msgBox.showMsgErr(txt_RecommendedSizeError);return}return s=parseInt(f[0]),h=parseInt(f[1]),msgBox.showMsgWait(txt_TryingToUploading),$.ajaxFileUpload({url:n+"FileUpload.ashx",secureuri:!1,fileElementId:i,dataType:"json",success:function(n){if(n.error==0){var t=n.url+"_"+f[0]+"x"+f[1]+".ashx";r!=undefined&&$("#"+r).val(n.url);u!=undefined?($("#"+u).attr("src",t),msgBox.hidBox()):msgBox.showMsgErr(n.message)}},error:function(n){msgBox.showMsgErr(n.message)}}),!1}var headsearch,Qin,urlHelper,h_spCodesTemp,h_IsNoInventorySales,h_strModuleTranslate,onlyCountries,Accordion,easesales;if(!function(n,t){"object"==typeof module&&"object"==typeof module.exports?module.exports=n.document?t(n,!0):function(n){if(!n.document)throw new Error("jQuery requires a window with a document");return t(n)}:t(n)}("undefined"!=typeof window?window:this,function(n,t){function ri(n){var t="length"in n&&n.length,r=i.type(n);return"function"===r||i.isWindow(n)?!1:1===n.nodeType&&t?!0:"array"===r||0===t||"number"==typeof t&&t>0&&t-1 in n}function ui(n,t,r){if(i.isFunction(t))return i.grep(n,function(n,i){return!!t.call(n,i,n)!==r});if(t.nodeType)return i.grep(n,function(n){return n===t!==r});if("string"==typeof t){if(re.test(t))return i.filter(t,n,r);t=i.filter(t,n)}return i.grep(n,function(n){return i.inArray(n,t)>=0!==r})}function hr(n,t){do n=n[t];while(n&&1!==n.nodeType);return n}function ee(n){var t=fi[n]={};return i.each(n.match(h)||[],function(n,i){t[i]=!0}),t}function cr(){u.addEventListener?(u.removeEventListener("DOMContentLoaded",a,!1),n.removeEventListener("load",a,!1)):(u.detachEvent("onreadystatechange",a),n.detachEvent("onload",a))}function a(){(u.addEventListener||"load"===event.type||"complete"===u.readyState)&&(cr(),i.ready())}function yr(n,t,r){if(void 0===r&&1===n.nodeType){var u="data-"+t.replace(vr,"-$1").toLowerCase();if(r=n.getAttribute(u),"string"==typeof r){try{r="true"===r?!0:"false"===r?!1:"null"===r?null:+r+""===r?+r:ar.test(r)?i.parseJSON(r):r}catch(f){}i.data(n,t,r)}else r=void 0}return r}function ei(n){for(var t in n)if(("data"!==t||!i.isEmptyObject(n[t]))&&"toJSON"!==t)return!1;return!0}function pr(n,t,r,u){if(i.acceptData(n)){var s,e,h=i.expando,l=n.nodeType,o=l?i.cache:n,f=l?n[h]:n[h]&&h;if(f&&o[f]&&(u||o[f].data)||void 0!==r||"string"!=typeof t)return f||(f=l?n[h]=c.pop()||i.guid++:h),o[f]||(o[f]=l?{}:{toJSON:i.noop}),("object"==typeof t||"function"==typeof t)&&(u?o[f]=i.extend(o[f],t):o[f].data=i.extend(o[f].data,t)),e=o[f],u||(e.data||(e.data={}),e=e.data),void 0!==r&&(e[i.camelCase(t)]=r),"string"==typeof t?(s=e[t],null==s&&(s=e[i.camelCase(t)])):s=e,s}}function wr(n,t,u){if(i.acceptData(n)){var o,s,h=n.nodeType,f=h?i.cache:n,e=h?n[i.expando]:i.expando;if(f[e]){if(t&&(o=u?f[e]:f[e].data)){for(i.isArray(t)?t=t.concat(i.map(t,i.camelCase)):(t in o)?t=[t]:(t=i.camelCase(t),t=(t in o)?[t]:t.split(" ")),s=t.length;s--;)delete o[t[s]];if(u?!ei(o):!i.isEmptyObject(o))return}(u||(delete f[e].data,ei(f[e])))&&(h?i.cleanData([n],!0):r.deleteExpando||f!=f.window?delete f[e]:f[e]=null)}}}function vt(){return!0}function it(){return!1}function dr(){try{return u.activeElement}catch(n){}}function gr(n){var i=nu.split("|"),t=n.createDocumentFragment();if(t.createElement)while(i.length)t.createElement(i.pop());return t}function f(n,t){var e,u,s=0,r=typeof n.getElementsByTagName!==o?n.getElementsByTagName(t||"*"):typeof n.querySelectorAll!==o?n.querySelectorAll(t||"*"):void 0;if(!r)for(r=[],e=n.childNodes||n;null!=(u=e[s]);s++)!t||i.nodeName(u,t)?r.push(u):i.merge(r,f(u,t));return void 0===t||t&&i.nodeName(n,t)?i.merge([n],r):r}function we(n){oi.test(n.type)&&(n.defaultChecked=n.checked)}function eu(n,t){return i.nodeName(n,"table")&&i.nodeName(11!==t.nodeType?t:t.firstChild,"tr")?n.getElementsByTagName("tbody")[0]||n.appendChild(n.ownerDocument.createElement("tbody")):n}function ou(n){return n.type=(null!==i.find.attr(n,"type"))+"/"+n.type,n}function su(n){var t=ve.exec(n.type);return t?n.type=t[1]:n.removeAttribute("type"),n}function li(n,t){for(var u,r=0;null!=(u=n[r]);r++)i._data(u,"globalEval",!t||i._data(t[r],"globalEval"))}function hu(n,t){if(1===t.nodeType&&i.hasData(n)){var u,f,o,s=i._data(n),r=i._data(t,s),e=s.events;if(e){delete r.handle;r.events={};for(u in e)for(f=0,o=e[u].length;o>f;f++)i.event.add(t,u,e[u][f])}r.data&&(r.data=i.extend({},r.data))}}function be(n,t){var u,e,f;if(1===t.nodeType){if(u=t.nodeName.toLowerCase(),!r.noCloneEvent&&t[i.expando]){f=i._data(t);for(e in f.events)i.removeEvent(t,e,f.handle);t.removeAttribute(i.expando)}"script"===u&&t.text!==n.text?(ou(t).text=n.text,su(t)):"object"===u?(t.parentNode&&(t.outerHTML=n.outerHTML),r.html5Clone&&n.innerHTML&&!i.trim(t.innerHTML)&&(t.innerHTML=n.innerHTML)):"input"===u&&oi.test(n.type)?(t.defaultChecked=t.checked=n.checked,t.value!==n.value&&(t.value=n.value)):"option"===u?t.defaultSelected=t.selected=n.defaultSelected:("input"===u||"textarea"===u)&&(t.defaultValue=n.defaultValue)}}function cu(t,r){var f,u=i(r.createElement(t)).appendTo(r.body),e=n.getDefaultComputedStyle&&(f=n.getDefaultComputedStyle(u[0]))?f.display:i.css(u[0],"display");return u.detach(),e}function yt(n){var r=u,t=ai[n];return t||(t=cu(n,r),"none"!==t&&t||(ot=(ot||i("<iframe frameborder='0' width='0' height='0'/>")).appendTo(r.documentElement),r=(ot[0].contentWindow||ot[0].contentDocument).document,r.write(),r.close(),t=cu(n,r),ot.detach()),ai[n]=t),t}function au(n,t){return{get:function(){var i=n();if(null!=i)return i?void delete this.get:(this.get=t).apply(this,arguments)}}}function pu(n,t){if(t in n)return t;for(var r=t.charAt(0).toUpperCase()+t.slice(1),u=t,i=yu.length;i--;)if(t=yu[i]+r,t in n)return t;return u}function wu(n,t){for(var f,r,o,e=[],u=0,s=n.length;s>u;u++)r=n[u],r.style&&(e[u]=i._data(r,"olddisplay"),f=r.style.display,t?(e[u]||"none"!==f||(r.style.display=""),""===r.style.display&&et(r)&&(e[u]=i._data(r,"olddisplay",yt(r.nodeName)))):(o=et(r),(f&&"none"!==f||!o)&&i._data(r,"olddisplay",o?f:i.css(r,"display"))));for(u=0;s>u;u++)r=n[u],r.style&&(t&&"none"!==r.style.display&&""!==r.style.display||(r.style.display=t?e[u]||"":"none"));return n}function bu(n,t,i){var r=no.exec(t);return r?Math.max(0,r[1]-(i||0))+(r[2]||"px"):t}function ku(n,t,r,u,f){for(var e=r===(u?"border":"content")?4:"width"===t?1:0,o=0;4>e;e+=2)"margin"===r&&(o+=i.css(n,r+w[e],!0,f)),u?("content"===r&&(o-=i.css(n,"padding"+w[e],!0,f)),"margin"!==r&&(o-=i.css(n,"border"+w[e]+"Width",!0,f))):(o+=i.css(n,"padding"+w[e],!0,f),"padding"!==r&&(o+=i.css(n,"border"+w[e]+"Width",!0,f)));return o}function du(n,t,u){var o=!0,f="width"===t?n.offsetWidth:n.offsetHeight,e=k(n),s=r.boxSizing&&"border-box"===i.css(n,"boxSizing",!1,e);if(0>=f||null==f){if(f=d(n,t,e),(0>f||null==f)&&(f=n.style[t]),pt.test(f))return f;o=s&&(r.boxSizingReliable()||f===n.style[t]);f=parseFloat(f)||0}return f+ku(n,t,u||(s?"border":"content"),o,e)+"px"}function e(n,t,i,r,u){return new e.prototype.init(n,t,i,r,u)}function nf(){return setTimeout(function(){rt=void 0}),rt=i.now()}function kt(n,t){var r,i={height:n},u=0;for(t=t?1:0;4>u;u+=2-t)r=w[u],i["margin"+r]=i["padding"+r]=n;return t&&(i.opacity=i.width=n),i}function tf(n,t,i){for(var u,f=(st[t]||[]).concat(st["*"]),r=0,e=f.length;e>r;r++)if(u=f[r].call(i,t,n))return u}function fo(n,t,u){var f,a,p,v,s,w,h,b,l=this,y={},o=n.style,c=n.nodeType&&et(n),e=i._data(n,"fxshow");u.queue||(s=i._queueHooks(n,"fx"),null==s.unqueued&&(s.unqueued=0,w=s.empty.fire,s.empty.fire=function(){s.unqueued||w()}),s.unqueued++,l.always(function(){l.always(function(){s.unqueued--;i.queue(n,"fx").length||s.empty.fire()})}));1===n.nodeType&&("height"in t||"width"in t)&&(u.overflow=[o.overflow,o.overflowX,o.overflowY],h=i.css(n,"display"),b="none"===h?i._data(n,"olddisplay")||yt(n.nodeName):h,"inline"===b&&"none"===i.css(n,"float")&&(r.inlineBlockNeedsLayout&&"inline"!==yt(n.nodeName)?o.zoom=1:o.display="inline-block"));u.overflow&&(o.overflow="hidden",r.shrinkWrapBlocks()||l.always(function(){o.overflow=u.overflow[0];o.overflowX=u.overflow[1];o.overflowY=u.overflow[2]}));for(f in t)if(a=t[f],ro.exec(a)){if(delete t[f],p=p||"toggle"===a,a===(c?"hide":"show")){if("show"!==a||!e||void 0===e[f])continue;c=!0}y[f]=e&&e[f]||i.style(n,f)}else h=void 0;if(i.isEmptyObject(y))"inline"===("none"===h?yt(n.nodeName):h)&&(o.display=h);else{e?"hidden"in e&&(c=e.hidden):e=i._data(n,"fxshow",{});p&&(e.hidden=!c);c?i(n).show():l.done(function(){i(n).hide()});l.done(function(){var t;i._removeData(n,"fxshow");for(t in y)i.style(n,t,y[t])});for(f in y)v=tf(c?e[f]:0,f,l),f in e||(e[f]=v.start,c&&(v.end=v.start,v.start="width"===f||"height"===f?1:0))}}function eo(n,t){var r,f,e,u,o;for(r in n)if(f=i.camelCase(r),e=t[f],u=n[r],i.isArray(u)&&(e=u[1],u=n[r]=u[0]),r!==f&&(n[f]=u,delete n[r]),o=i.cssHooks[f],o&&"expand"in o){u=o.expand(u);delete n[f];for(r in u)r in n||(n[r]=u[r],t[r]=e)}else t[f]=e}function rf(n,t,r){var h,e,o=0,l=bt.length,f=i.Deferred().always(function(){delete c.elem}),c=function(){if(e)return!1;for(var s=rt||nf(),t=Math.max(0,u.startTime+u.duration-s),h=t/u.duration||0,i=1-h,r=0,o=u.tweens.length;o>r;r++)u.tweens[r].run(i);return f.notifyWith(n,[u,i,t]),1>i&&o?t:(f.resolveWith(n,[u]),!1)},u=f.promise({elem:n,props:i.extend({},t),opts:i.extend(!0,{specialEasing:{}},r),originalProperties:t,originalOptions:r,startTime:rt||nf(),duration:r.duration,tweens:[],createTween:function(t,r){var f=i.Tween(n,u.opts,t,r,u.opts.specialEasing[t]||u.opts.easing);return u.tweens.push(f),f},stop:function(t){var i=0,r=t?u.tweens.length:0;if(e)return this;for(e=!0;r>i;i++)u.tweens[i].run(1);return t?f.resolveWith(n,[u,t]):f.rejectWith(n,[u,t]),this}}),s=u.props;for(eo(s,u.opts.specialEasing);l>o;o++)if(h=bt[o].call(u,n,s,u.opts))return h;return i.map(s,tf,u),i.isFunction(u.opts.start)&&u.opts.start.call(n,u),i.fx.timer(i.extend(c,{elem:n,anim:u,queue:u.opts.queue})),u.progress(u.opts.progress).done(u.opts.done,u.opts.complete).fail(u.opts.fail).always(u.opts.always)}function af(n){return function(t,r){"string"!=typeof t&&(r=t,t="*");var u,f=0,e=t.toLowerCase().match(h)||[];if(i.isFunction(r))while(u=e[f++])"+"===u.charAt(0)?(u=u.slice(1)||"*",(n[u]=n[u]||[]).unshift(r)):(n[u]=n[u]||[]).push(r)}}function vf(n,t,r,u){function e(s){var h;return f[s]=!0,i.each(n[s]||[],function(n,i){var s=i(t,r,u);return"string"!=typeof s||o||f[s]?o?!(h=s):void 0:(t.dataTypes.unshift(s),e(s),!1)}),h}var f={},o=n===bi;return e(t.dataTypes[0])||!f["*"]&&e("*")}function ki(n,t){var u,r,f=i.ajaxSettings.flatOptions||{};for(r in t)void 0!==t[r]&&((f[r]?n:u||(u={}))[r]=t[r]);return u&&i.extend(!0,n,u),n}function ao(n,t,i){for(var o,e,u,f,s=n.contents,r=n.dataTypes;"*"===r[0];)r.shift(),void 0===e&&(e=n.mimeType||t.getResponseHeader("Content-Type"));if(e)for(f in s)if(s[f]&&s[f].test(e)){r.unshift(f);break}if(r[0]in i)u=r[0];else{for(f in i){if(!r[0]||n.converters[f+" "+r[0]]){u=f;break}o||(o=f)}u=u||o}if(u)return(u!==r[0]&&r.unshift(u),i[u])}function vo(n,t,i,r){var h,u,f,s,e,o={},c=n.dataTypes.slice();if(c[1])for(f in n.converters)o[f.toLowerCase()]=n.converters[f];for(u=c.shift();u;)if(n.responseFields[u]&&(i[n.responseFields[u]]=t),!e&&r&&n.dataFilter&&(t=n.dataFilter(t,n.dataType)),e=u,u=c.shift())if("*"===u)u=e;else if("*"!==e&&e!==u){if(f=o[e+" "+u]||o["* "+u],!f)for(h in o)if(s=h.split(" "),s[1]===u&&(f=o[e+" "+s[0]]||o["* "+s[0]])){f===!0?f=o[h]:o[h]!==!0&&(u=s[0],c.unshift(s[1]));break}if(f!==!0)if(f&&n.throws)t=f(t);else try{t=f(t)}catch(l){return{state:"parsererror",error:f?l:"No conversion from "+e+" to "+u}}}return{state:"success",data:t}}function di(n,t,r,u){var f;if(i.isArray(t))i.each(t,function(t,i){r||po.test(n)?u(n,i):di(n+"["+("object"==typeof i?t:"")+"]",i,r,u)});else if(r||"object"!==i.type(t))u(n,t);else for(f in t)di(n+"["+f+"]",t[f],r,u)}function pf(){try{return new n.XMLHttpRequest}catch(t){}}function go(){try{return new n.ActiveXObject("Microsoft.XMLHTTP")}catch(t){}}function wf(n){return i.isWindow(n)?n:9===n.nodeType?n.defaultView||n.parentWindow:!1}var c=[],l=c.slice,ir=c.concat,ii=c.push,rr=c.indexOf,ct={},df=ct.toString,tt=ct.hasOwnProperty,r={},ur="1.11.3",i=function(n,t){return new i.fn.init(n,t)},gf=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,ne=/^-ms-/,te=/-([\da-z])/gi,ie=function(n,t){return t.toUpperCase()},p,or,sr,h,fi,lt,o,lr,ar,vr,ot,ai,uf,ef,of,gt,gi,ti,nr,tr,bf,kf;i.fn=i.prototype={jquery:ur,constructor:i,selector:"",length:0,toArray:function(){return l.call(this)},get:function(n){return null!=n?0>n?this[n+this.length]:this[n]:l.call(this)},pushStack:function(n){var t=i.merge(this.constructor(),n);return t.prevObject=this,t.context=this.context,t},each:function(n,t){return i.each(this,n,t)},map:function(n){return this.pushStack(i.map(this,function(t,i){return n.call(t,i,t)}))},slice:function(){return this.pushStack(l.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(n){var i=this.length,t=+n+(0>n?i:0);return this.pushStack(t>=0&&i>t?[this[t]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:ii,sort:c.sort,splice:c.splice};i.extend=i.fn.extend=function(){var r,e,t,f,o,s,n=arguments[0]||{},u=1,c=arguments.length,h=!1;for("boolean"==typeof n&&(h=n,n=arguments[u]||{},u++),"object"==typeof n||i.isFunction(n)||(n={}),u===c&&(n=this,u--);c>u;u++)if(null!=(o=arguments[u]))for(f in o)r=n[f],t=o[f],n!==t&&(h&&t&&(i.isPlainObject(t)||(e=i.isArray(t)))?(e?(e=!1,s=r&&i.isArray(r)?r:[]):s=r&&i.isPlainObject(r)?r:{},n[f]=i.extend(h,s,t)):void 0!==t&&(n[f]=t));return n};i.extend({expando:"jQuery"+(ur+Math.random()).replace(/\D/g,""),isReady:!0,error:function(n){throw new Error(n);},noop:function(){},isFunction:function(n){return"function"===i.type(n)},isArray:Array.isArray||function(n){return"array"===i.type(n)},isWindow:function(n){return null!=n&&n==n.window},isNumeric:function(n){return!i.isArray(n)&&n-parseFloat(n)+1>=0},isEmptyObject:function(n){for(var t in n)return!1;return!0},isPlainObject:function(n){var t;if(!n||"object"!==i.type(n)||n.nodeType||i.isWindow(n))return!1;try{if(n.constructor&&!tt.call(n,"constructor")&&!tt.call(n.constructor.prototype,"isPrototypeOf"))return!1}catch(u){return!1}if(r.ownLast)for(t in n)return tt.call(n,t);for(t in n);return void 0===t||tt.call(n,t)},type:function(n){return null==n?n+"":"object"==typeof n||"function"==typeof n?ct[df.call(n)]||"object":typeof n},globalEval:function(t){t&&i.trim(t)&&(n.execScript||function(t){n.eval.call(n,t)})(t)},camelCase:function(n){return n.replace(ne,"ms-").replace(te,ie)},nodeName:function(n,t){return n.nodeName&&n.nodeName.toLowerCase()===t.toLowerCase()},each:function(n,t,i){var u,r=0,f=n.length,e=ri(n);if(i){if(e){for(;f>r;r++)if(u=t.apply(n[r],i),u===!1)break}else for(r in n)if(u=t.apply(n[r],i),u===!1)break}else if(e){for(;f>r;r++)if(u=t.call(n[r],r,n[r]),u===!1)break}else for(r in n)if(u=t.call(n[r],r,n[r]),u===!1)break;return n},trim:function(n){return null==n?"":(n+"").replace(gf,"")},makeArray:function(n,t){var r=t||[];return null!=n&&(ri(Object(n))?i.merge(r,"string"==typeof n?[n]:n):ii.call(r,n)),r},inArray:function(n,t,i){var r;if(t){if(rr)return rr.call(t,n,i);for(r=t.length,i=i?0>i?Math.max(0,r+i):i:0;r>i;i++)if(i in t&&t[i]===n)return i}return-1},merge:function(n,t){for(var r=+t.length,i=0,u=n.length;r>i;)n[u++]=t[i++];if(r!==r)while(void 0!==t[i])n[u++]=t[i++];return n.length=u,n},grep:function(n,t,i){for(var u,f=[],r=0,e=n.length,o=!i;e>r;r++)u=!t(n[r],r),u!==o&&f.push(n[r]);return f},map:function(n,t,i){var u,r=0,e=n.length,o=ri(n),f=[];if(o)for(;e>r;r++)u=t(n[r],r,i),null!=u&&f.push(u);else for(r in n)u=t(n[r],r,i),null!=u&&f.push(u);return ir.apply([],f)},guid:1,proxy:function(n,t){var u,r,f;return"string"==typeof t&&(f=n[t],t=n,n=f),i.isFunction(n)?(u=l.call(arguments,2),r=function(){return n.apply(t||this,u.concat(l.call(arguments)))},r.guid=n.guid=n.guid||i.guid++,r):void 0},now:function(){return+new Date},support:r});i.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(n,t){ct["[object "+t+"]"]=t.toLowerCase()});p=function(n){function r(n,t,i,r){var p,s,a,c,w,y,d,v,nt,g;if((t?t.ownerDocument||t:h)!==o&&k(t),t=t||o,i=i||[],c=t.nodeType,"string"!=typeof n||!n||1!==c&&9!==c&&11!==c)return i;if(!r&&l){if(11!==c&&(p=hr.exec(n)))if(a=p[1]){if(9===c){if(s=t.getElementById(a),!s||!s.parentNode)return i;if(s.id===a)return i.push(s),i}else if(t.ownerDocument&&(s=t.ownerDocument.getElementById(a))&&et(t,s)&&s.id===a)return i.push(s),i}else{if(p[2])return b.apply(i,t.getElementsByTagName(n)),i;if((a=p[3])&&u.getElementsByClassName)return b.apply(i,t.getElementsByClassName(a)),i}if(u.qsa&&(!e||!e.test(n))){if(v=d=f,nt=t,g=1!==c&&n,1===c&&"object"!==t.nodeName.toLowerCase()){for(y=ft(n),(d=t.getAttribute("id"))?v=d.replace(cr,"\\$&"):t.setAttribute("id",v),v="[id='"+v+"'] ",w=y.length;w--;)y[w]=v+vt(y[w]);nt=dt.test(n)&&ti(t.parentNode)||t;g=y.join(",")}if(g)try{return b.apply(i,nt.querySelectorAll(g)),i}catch(tt){}finally{d||t.removeAttribute("id")}}}return oi(n.replace(lt,"$1"),t,i,r)}function gt(){function n(r,u){return i.push(r+" ")>t.cacheLength&&delete n[i.shift()],n[r+" "]=u}var i=[];return n}function c(n){return n[f]=!0,n}function v(n){var t=o.createElement("div");try{return!!n(t)}catch(i){return!1}finally{t.parentNode&&t.parentNode.removeChild(t);t=null}}function ni(n,i){for(var u=n.split("|"),r=n.length;r--;)t.attrHandle[u[r]]=i}function wi(n,t){var i=t&&n,r=i&&1===n.nodeType&&1===t.nodeType&&(~t.sourceIndex||li)-(~n.sourceIndex||li);if(r)return r;if(i)while(i=i.nextSibling)if(i===t)return-1;return n?1:-1}function lr(n){return function(t){var i=t.nodeName.toLowerCase();return"input"===i&&t.type===n}}function ar(n){return function(t){var i=t.nodeName.toLowerCase();return("input"===i||"button"===i)&&t.type===n}}function tt(n){return c(function(t){return t=+t,c(function(i,r){for(var u,f=n([],i.length,t),e=f.length;e--;)i[u=f[e]]&&(i[u]=!(r[u]=i[u]))})})}function ti(n){return n&&"undefined"!=typeof n.getElementsByTagName&&n}function bi(){}function vt(n){for(var t=0,r=n.length,i="";r>t;t++)i+=n[t].value;return i}function ii(n,t,i){var r=t.dir,u=i&&"parentNode"===r,e=ki++;return t.first?function(t,i,f){while(t=t[r])if(1===t.nodeType||u)return n(t,i,f)}:function(t,i,o){var s,h,c=[a,e];if(o){while(t=t[r])if((1===t.nodeType||u)&&n(t,i,o))return!0}else while(t=t[r])if(1===t.nodeType||u){if(h=t[f]||(t[f]={}),(s=h[r])&&s[0]===a&&s[1]===e)return c[2]=s[2];if(h[r]=c,c[2]=n(t,i,o))return!0}}}function ri(n){return n.length>1?function(t,i,r){for(var u=n.length;u--;)if(!n[u](t,i,r))return!1;return!0}:n[0]}function vr(n,t,i){for(var u=0,f=t.length;f>u;u++)r(n,t[u],i);return i}function yt(n,t,i,r,u){for(var e,o=[],f=0,s=n.length,h=null!=t;s>f;f++)(e=n[f])&&(!i||i(e,r,u))&&(o.push(e),h&&t.push(f));return o}function ui(n,t,i,r,u,e){return r&&!r[f]&&(r=ui(r)),u&&!u[f]&&(u=ui(u,e)),c(function(f,e,o,s){var l,c,a,p=[],y=[],w=e.length,k=f||vr(t||"*",o.nodeType?[o]:o,[]),v=!n||!f&&t?k:yt(k,p,n,o,s),h=i?u||(f?n:w||r)?[]:e:v;if(i&&i(v,h,o,s),r)for(l=yt(h,y),r(l,[],o,s),c=l.length;c--;)(a=l[c])&&(h[y[c]]=!(v[y[c]]=a));if(f){if(u||n){if(u){for(l=[],c=h.length;c--;)(a=h[c])&&l.push(v[c]=a);u(null,h=[],l,s)}for(c=h.length;c--;)(a=h[c])&&(l=u?nt(f,a):p[c])>-1&&(f[l]=!(e[l]=a))}}else h=yt(h===e?h.splice(w,h.length):h),u?u(null,e,h,s):b.apply(e,h)})}function fi(n){for(var o,u,r,s=n.length,h=t.relative[n[0].type],c=h||t.relative[" "],i=h?1:0,l=ii(function(n){return n===o},c,!0),a=ii(function(n){return nt(o,n)>-1},c,!0),e=[function(n,t,i){var r=!h&&(i||t!==ht)||((o=t).nodeType?l(n,t,i):a(n,t,i));return o=null,r}];s>i;i++)if(u=t.relative[n[i].type])e=[ii(ri(e),u)];else{if(u=t.filter[n[i].type].apply(null,n[i].matches),u[f]){for(r=++i;s>r;r++)if(t.relative[n[r].type])break;return ui(i>1&&ri(e),i>1&&vt(n.slice(0,i-1).concat({value:" "===n[i-2].type?"*":""})).replace(lt,"$1"),u,r>i&&fi(n.slice(i,r)),s>r&&fi(n=n.slice(r)),s>r&&vt(n))}e.push(u)}return ri(e)}function yr(n,i){var u=i.length>0,f=n.length>0,e=function(e,s,h,c,l){var y,d,w,k=0,v="0",g=e&&[],p=[],nt=ht,tt=e||f&&t.find.TAG("*",l),it=a+=null==nt?1:Math.random()||.1,rt=tt.length;for(l&&(ht=s!==o&&s);v!==rt&&null!=(y=tt[v]);v++){if(f&&y){for(d=0;w=n[d++];)if(w(y,s,h)){c.push(y);break}l&&(a=it)}u&&((y=!w&&y)&&k--,e&&g.push(y))}if(k+=v,u&&v!==k){for(d=0;w=i[d++];)w(g,p,s,h);if(e){if(k>0)while(v--)g[v]||p[v]||(p[v]=gi.call(c));p=yt(p)}b.apply(c,p);l&&!e&&p.length>0&&k+i.length>1&&r.uniqueSort(c)}return l&&(a=it,ht=nt),g};return u?c(e):e}var it,u,t,st,ei,ft,pt,oi,ht,w,rt,k,o,s,l,e,d,ct,et,f="sizzle"+1*new Date,h=n.document,a=0,ki=0,si=gt(),hi=gt(),ci=gt(),wt=function(n,t){return n===t&&(rt=!0),0},li=-2147483648,di={}.hasOwnProperty,g=[],gi=g.pop,nr=g.push,b=g.push,ai=g.slice,nt=function(n,t){for(var i=0,r=n.length;r>i;i++)if(n[i]===t)return i;return-1},bt="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",i="[\\x20\\t\\r\\n\\f]",ut="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",vi=ut.replace("w","w#"),yi="\\["+i+"*("+ut+")(?:"+i+"*([*^$|!~]?=)"+i+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+vi+"))|)"+i+"*\\]",kt=":("+ut+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+yi+")*)|.*)\\)|)",tr=new RegExp(i+"+","g"),lt=new RegExp("^"+i+"+|((?:^|[^\\\\])(?:\\\\.)*)"+i+"+$","g"),ir=new RegExp("^"+i+"*,"+i+"*"),rr=new RegExp("^"+i+"*([>+~]|"+i+")"+i+"*"),ur=new RegExp("="+i+"*([^\\]'\"]*?)"+i+"*\\]","g"),fr=new RegExp(kt),er=new RegExp("^"+vi+"$"),at={ID:new RegExp("^#("+ut+")"),CLASS:new RegExp("^\\.("+ut+")"),TAG:new RegExp("^("+ut.replace("w","w*")+")"),ATTR:new RegExp("^"+yi),PSEUDO:new RegExp("^"+kt),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+i+"*(even|odd|(([+-]|)(\\d*)n|)"+i+"*(?:([+-]|)"+i+"*(\\d+)|))"+i+"*\\)|)","i"),bool:new RegExp("^(?:"+bt+")$","i"),needsContext:new RegExp("^"+i+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+i+"*((?:-\\d)?\\d*)"+i+"*\\)|)(?=[^-]|$)","i")},or=/^(?:input|select|textarea|button)$/i,sr=/^h\d$/i,ot=/^[^{]+\{\s*\[native \w/,hr=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,dt=/[+~]/,cr=/'|\\/g,y=new RegExp("\\\\([\\da-f]{1,6}"+i+"?|("+i+")|.)","ig"),p=function(n,t,i){var r="0x"+t-65536;return r!==r||i?t:0>r?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,1023&r|56320)},pi=function(){k()};try{b.apply(g=ai.call(h.childNodes),h.childNodes);g[h.childNodes.length].nodeType}catch(pr){b={apply:g.length?function(n,t){nr.apply(n,ai.call(t))}:function(n,t){for(var i=n.length,r=0;n[i++]=t[r++];);n.length=i-1}}}u=r.support={};ei=r.isXML=function(n){var t=n&&(n.ownerDocument||n).documentElement;return t?"HTML"!==t.nodeName:!1};k=r.setDocument=function(n){var a,c,r=n?n.ownerDocument||n:h;return r!==o&&9===r.nodeType&&r.documentElement?(o=r,s=r.documentElement,c=r.defaultView,c&&c!==c.top&&(c.addEventListener?c.addEventListener("unload",pi,!1):c.attachEvent&&c.attachEvent("onunload",pi)),l=!ei(r),u.attributes=v(function(n){return n.className="i",!n.getAttribute("className")}),u.getElementsByTagName=v(function(n){return n.appendChild(r.createComment("")),!n.getElementsByTagName("*").length}),u.getElementsByClassName=ot.test(r.getElementsByClassName),u.getById=v(function(n){return s.appendChild(n).id=f,!r.getElementsByName||!r.getElementsByName(f).length}),u.getById?(t.find.ID=function(n,t){if("undefined"!=typeof t.getElementById&&l){var i=t.getElementById(n);return i&&i.parentNode?[i]:[]}},t.filter.ID=function(n){var t=n.replace(y,p);return function(n){return n.getAttribute("id")===t}}):(delete t.find.ID,t.filter.ID=function(n){var t=n.replace(y,p);return function(n){var i="undefined"!=typeof n.getAttributeNode&&n.getAttributeNode("id");return i&&i.value===t}}),t.find.TAG=u.getElementsByTagName?function(n,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(n):u.qsa?t.querySelectorAll(n):void 0}:function(n,t){var i,r=[],f=0,u=t.getElementsByTagName(n);if("*"===n){while(i=u[f++])1===i.nodeType&&r.push(i);return r}return u},t.find.CLASS=u.getElementsByClassName&&function(n,t){if(l)return t.getElementsByClassName(n)},d=[],e=[],(u.qsa=ot.test(r.querySelectorAll))&&(v(function(n){s.appendChild(n).innerHTML="<a id='"+f+"'><\/a><select id='"+f+"-\f]' msallowcapture=''><option selected=''><\/option><\/select>";n.querySelectorAll("[msallowcapture^='']").length&&e.push("[*^$]="+i+"*(?:''|\"\")");n.querySelectorAll("[selected]").length||e.push("\\["+i+"*(?:value|"+bt+")");n.querySelectorAll("[id~="+f+"-]").length||e.push("~=");n.querySelectorAll(":checked").length||e.push(":checked");n.querySelectorAll("a#"+f+"+*").length||e.push(".#.+[+~]")}),v(function(n){var t=r.createElement("input");t.setAttribute("type","hidden");n.appendChild(t).setAttribute("name","D");n.querySelectorAll("[name=d]").length&&e.push("name"+i+"*[*^$|!~]?=");n.querySelectorAll(":enabled").length||e.push(":enabled",":disabled");n.querySelectorAll("*,:x");e.push(",.*:")})),(u.matchesSelector=ot.test(ct=s.matches||s.webkitMatchesSelector||s.mozMatchesSelector||s.oMatchesSelector||s.msMatchesSelector))&&v(function(n){u.disconnectedMatch=ct.call(n,"div");ct.call(n,"[s!='']:x");d.push("!=",kt)}),e=e.length&&new RegExp(e.join("|")),d=d.length&&new RegExp(d.join("|")),a=ot.test(s.compareDocumentPosition),et=a||ot.test(s.contains)?function(n,t){var r=9===n.nodeType?n.documentElement:n,i=t&&t.parentNode;return n===i||!(!i||1!==i.nodeType||!(r.contains?r.contains(i):n.compareDocumentPosition&&16&n.compareDocumentPosition(i)))}:function(n,t){if(t)while(t=t.parentNode)if(t===n)return!0;return!1},wt=a?function(n,t){if(n===t)return rt=!0,0;var i=!n.compareDocumentPosition-!t.compareDocumentPosition;return i?i:(i=(n.ownerDocument||n)===(t.ownerDocument||t)?n.compareDocumentPosition(t):1,1&i||!u.sortDetached&&t.compareDocumentPosition(n)===i?n===r||n.ownerDocument===h&&et(h,n)?-1:t===r||t.ownerDocument===h&&et(h,t)?1:w?nt(w,n)-nt(w,t):0:4&i?-1:1)}:function(n,t){if(n===t)return rt=!0,0;var i,u=0,o=n.parentNode,s=t.parentNode,f=[n],e=[t];if(!o||!s)return n===r?-1:t===r?1:o?-1:s?1:w?nt(w,n)-nt(w,t):0;if(o===s)return wi(n,t);for(i=n;i=i.parentNode;)f.unshift(i);for(i=t;i=i.parentNode;)e.unshift(i);while(f[u]===e[u])u++;return u?wi(f[u],e[u]):f[u]===h?-1:e[u]===h?1:0},r):o};r.matches=function(n,t){return r(n,null,null,t)};r.matchesSelector=function(n,t){if((n.ownerDocument||n)!==o&&k(n),t=t.replace(ur,"='$1']"),!(!u.matchesSelector||!l||d&&d.test(t)||e&&e.test(t)))try{var i=ct.call(n,t);if(i||u.disconnectedMatch||n.document&&11!==n.document.nodeType)return i}catch(f){}return r(t,o,null,[n]).length>0};r.contains=function(n,t){return(n.ownerDocument||n)!==o&&k(n),et(n,t)};r.attr=function(n,i){(n.ownerDocument||n)!==o&&k(n);var f=t.attrHandle[i.toLowerCase()],r=f&&di.call(t.attrHandle,i.toLowerCase())?f(n,i,!l):void 0;return void 0!==r?r:u.attributes||!l?n.getAttribute(i):(r=n.getAttributeNode(i))&&r.specified?r.value:null};r.error=function(n){throw new Error("Syntax error, unrecognized expression: "+n);};r.uniqueSort=function(n){var r,f=[],t=0,i=0;if(rt=!u.detectDuplicates,w=!u.sortStable&&n.slice(0),n.sort(wt),rt){while(r=n[i++])r===n[i]&&(t=f.push(i));while(t--)n.splice(f[t],1)}return w=null,n};st=r.getText=function(n){var r,i="",u=0,t=n.nodeType;if(t){if(1===t||9===t||11===t){if("string"==typeof n.textContent)return n.textContent;for(n=n.firstChild;n;n=n.nextSibling)i+=st(n)}else if(3===t||4===t)return n.nodeValue}else while(r=n[u++])i+=st(r);return i};t=r.selectors={cacheLength:50,createPseudo:c,match:at,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(n){return n[1]=n[1].replace(y,p),n[3]=(n[3]||n[4]||n[5]||"").replace(y,p),"~="===n[2]&&(n[3]=" "+n[3]+" "),n.slice(0,4)},CHILD:function(n){return n[1]=n[1].toLowerCase(),"nth"===n[1].slice(0,3)?(n[3]||r.error(n[0]),n[4]=+(n[4]?n[5]+(n[6]||1):2*("even"===n[3]||"odd"===n[3])),n[5]=+(n[7]+n[8]||"odd"===n[3])):n[3]&&r.error(n[0]),n},PSEUDO:function(n){var i,t=!n[6]&&n[2];return at.CHILD.test(n[0])?null:(n[3]?n[2]=n[4]||n[5]||"":t&&fr.test(t)&&(i=ft(t,!0))&&(i=t.indexOf(")",t.length-i)-t.length)&&(n[0]=n[0].slice(0,i),n[2]=t.slice(0,i)),n.slice(0,3))}},filter:{TAG:function(n){var t=n.replace(y,p).toLowerCase();return"*"===n?function(){return!0}:function(n){return n.nodeName&&n.nodeName.toLowerCase()===t}},CLASS:function(n){var t=si[n+" "];return t||(t=new RegExp("(^|"+i+")"+n+"("+i+"|$)"))&&si(n,function(n){return t.test("string"==typeof n.className&&n.className||"undefined"!=typeof n.getAttribute&&n.getAttribute("class")||"")})},ATTR:function(n,t,i){return function(u){var f=r.attr(u,n);return null==f?"!="===t:t?(f+="","="===t?f===i:"!="===t?f!==i:"^="===t?i&&0===f.indexOf(i):"*="===t?i&&f.indexOf(i)>-1:"$="===t?i&&f.slice(-i.length)===i:"~="===t?(" "+f.replace(tr," ")+" ").indexOf(i)>-1:"|="===t?f===i||f.slice(0,i.length+1)===i+"-":!1):!0}},CHILD:function(n,t,i,r,u){var s="nth"!==n.slice(0,3),o="last"!==n.slice(-4),e="of-type"===t;return 1===r&&0===u?function(n){return!!n.parentNode}:function(t,i,h){var v,k,c,l,y,w,b=s!==o?"nextSibling":"previousSibling",p=t.parentNode,g=e&&t.nodeName.toLowerCase(),d=!h&&!e;if(p){if(s){while(b){for(c=t;c=c[b];)if(e?c.nodeName.toLowerCase()===g:1===c.nodeType)return!1;w=b="only"===n&&!w&&"nextSibling"}return!0}if(w=[o?p.firstChild:p.lastChild],o&&d){for(k=p[f]||(p[f]={}),v=k[n]||[],y=v[0]===a&&v[1],l=v[0]===a&&v[2],c=y&&p.childNodes[y];c=++y&&c&&c[b]||(l=y=0)||w.pop();)if(1===c.nodeType&&++l&&c===t){k[n]=[a,y,l];break}}else if(d&&(v=(t[f]||(t[f]={}))[n])&&v[0]===a)l=v[1];else while(c=++y&&c&&c[b]||(l=y=0)||w.pop())if((e?c.nodeName.toLowerCase()===g:1===c.nodeType)&&++l&&(d&&((c[f]||(c[f]={}))[n]=[a,l]),c===t))break;return l-=u,l===r||l%r==0&&l/r>=0}}},PSEUDO:function(n,i){var e,u=t.pseudos[n]||t.setFilters[n.toLowerCase()]||r.error("unsupported pseudo: "+n);return u[f]?u(i):u.length>1?(e=[n,n,"",i],t.setFilters.hasOwnProperty(n.toLowerCase())?c(function(n,t){for(var r,f=u(n,i),e=f.length;e--;)r=nt(n,f[e]),n[r]=!(t[r]=f[e])}):function(n){return u(n,0,e)}):u}},pseudos:{not:c(function(n){var t=[],r=[],i=pt(n.replace(lt,"$1"));return i[f]?c(function(n,t,r,u){for(var e,o=i(n,null,u,[]),f=n.length;f--;)(e=o[f])&&(n[f]=!(t[f]=e))}):function(n,u,f){return t[0]=n,i(t,null,f,r),t[0]=null,!r.pop()}}),has:c(function(n){return function(t){return r(n,t).length>0}}),contains:c(function(n){return n=n.replace(y,p),function(t){return(t.textContent||t.innerText||st(t)).indexOf(n)>-1}}),lang:c(function(n){return er.test(n||"")||r.error("unsupported lang: "+n),n=n.replace(y,p).toLowerCase(),function(t){var i;do if(i=l?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return i=i.toLowerCase(),i===n||0===i.indexOf(n+"-");while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var i=n.location&&n.location.hash;return i&&i.slice(1)===t.id},root:function(n){return n===s},focus:function(n){return n===o.activeElement&&(!o.hasFocus||o.hasFocus())&&!!(n.type||n.href||~n.tabIndex)},enabled:function(n){return n.disabled===!1},disabled:function(n){return n.disabled===!0},checked:function(n){var t=n.nodeName.toLowerCase();return"input"===t&&!!n.checked||"option"===t&&!!n.selected},selected:function(n){return n.parentNode&&n.parentNode.selectedIndex,n.selected===!0},empty:function(n){for(n=n.firstChild;n;n=n.nextSibling)if(n.nodeType<6)return!1;return!0},parent:function(n){return!t.pseudos.empty(n)},header:function(n){return sr.test(n.nodeName)},input:function(n){return or.test(n.nodeName)},button:function(n){var t=n.nodeName.toLowerCase();return"input"===t&&"button"===n.type||"button"===t},text:function(n){var t;return"input"===n.nodeName.toLowerCase()&&"text"===n.type&&(null==(t=n.getAttribute("type"))||"text"===t.toLowerCase())},first:tt(function(){return[0]}),last:tt(function(n,t){return[t-1]}),eq:tt(function(n,t,i){return[0>i?i+t:i]}),even:tt(function(n,t){for(var i=0;t>i;i+=2)n.push(i);return n}),odd:tt(function(n,t){for(var i=1;t>i;i+=2)n.push(i);return n}),lt:tt(function(n,t,i){for(var r=0>i?i+t:i;--r>=0;)n.push(r);return n}),gt:tt(function(n,t,i){for(var r=0>i?i+t:i;++r<t;)n.push(r);return n})}};t.pseudos.nth=t.pseudos.eq;for(it in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})t.pseudos[it]=lr(it);for(it in{submit:!0,reset:!0})t.pseudos[it]=ar(it);return bi.prototype=t.filters=t.pseudos,t.setFilters=new bi,ft=r.tokenize=function(n,i){var e,f,s,o,u,h,c,l=hi[n+" "];if(l)return i?0:l.slice(0);for(u=n,h=[],c=t.preFilter;u;){(!e||(f=ir.exec(u)))&&(f&&(u=u.slice(f[0].length)||u),h.push(s=[]));e=!1;(f=rr.exec(u))&&(e=f.shift(),s.push({value:e,type:f[0].replace(lt," ")}),u=u.slice(e.length));for(o in t.filter)(f=at[o].exec(u))&&(!c[o]||(f=c[o](f)))&&(e=f.shift(),s.push({value:e,type:o,matches:f}),u=u.slice(e.length));if(!e)break}return i?u.length:u?r.error(n):hi(n,h).slice(0)},pt=r.compile=function(n,t){var r,u=[],e=[],i=ci[n+" "];if(!i){for(t||(t=ft(n)),r=t.length;r--;)i=fi(t[r]),i[f]?u.push(i):e.push(i);i=ci(n,yr(e,u));i.selector=n}return i},oi=r.select=function(n,i,r,f){var s,e,o,a,v,c="function"==typeof n&&n,h=!f&&ft(n=c.selector||n);if(r=r||[],1===h.length){if(e=h[0]=h[0].slice(0),e.length>2&&"ID"===(o=e[0]).type&&u.getById&&9===i.nodeType&&l&&t.relative[e[1].type]){if(i=(t.find.ID(o.matches[0].replace(y,p),i)||[])[0],!i)return r;c&&(i=i.parentNode);n=n.slice(e.shift().value.length)}for(s=at.needsContext.test(n)?0:e.length;s--;){if(o=e[s],t.relative[a=o.type])break;if((v=t.find[a])&&(f=v(o.matches[0].replace(y,p),dt.test(e[0].type)&&ti(i.parentNode)||i))){if(e.splice(s,1),n=f.length&&vt(e),!n)return b.apply(r,f),r;break}}}return(c||pt(n,h))(f,i,!l,r,dt.test(n)&&ti(i.parentNode)||i),r},u.sortStable=f.split("").sort(wt).join("")===f,u.detectDuplicates=!!rt,k(),u.sortDetached=v(function(n){return 1&n.compareDocumentPosition(o.createElement("div"))}),v(function(n){return n.innerHTML="<a href='#'><\/a>","#"===n.firstChild.getAttribute("href")})||ni("type|href|height|width",function(n,t,i){if(!i)return n.getAttribute(t,"type"===t.toLowerCase()?1:2)}),u.attributes&&v(function(n){return n.innerHTML="<input/>",n.firstChild.setAttribute("value",""),""===n.firstChild.getAttribute("value")})||ni("value",function(n,t,i){if(!i&&"input"===n.nodeName.toLowerCase())return n.defaultValue}),v(function(n){return null==n.getAttribute("disabled")})||ni(bt,function(n,t,i){var r;if(!i)return n[t]===!0?t.toLowerCase():(r=n.getAttributeNode(t))&&r.specified?r.value:null}),r}(n);i.find=p;i.expr=p.selectors;i.expr[":"]=i.expr.pseudos;i.unique=p.uniqueSort;i.text=p.getText;i.isXMLDoc=p.isXML;i.contains=p.contains;var fr=i.expr.match.needsContext,er=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,re=/^.[^:#\[\.,]*$/;i.filter=function(n,t,r){var u=t[0];return r&&(n=":not("+n+")"),1===t.length&&1===u.nodeType?i.find.matchesSelector(u,n)?[u]:[]:i.find.matches(n,i.grep(t,function(n){return 1===n.nodeType}))};i.fn.extend({find:function(n){var t,r=[],u=this,f=u.length;if("string"!=typeof n)return this.pushStack(i(n).filter(function(){for(t=0;f>t;t++)if(i.contains(u[t],this))return!0}));for(t=0;f>t;t++)i.find(n,u[t],r);return r=this.pushStack(f>1?i.unique(r):r),r.selector=this.selector?this.selector+" "+n:n,r},filter:function(n){return this.pushStack(ui(this,n||[],!1))},not:function(n){return this.pushStack(ui(this,n||[],!0))},is:function(n){return!!ui(this,"string"==typeof n&&fr.test(n)?i(n):n||[],!1).length}});var ft,u=n.document,ue=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,fe=i.fn.init=function(n,t){var r,f;if(!n)return this;if("string"==typeof n){if(r="<"===n.charAt(0)&&">"===n.charAt(n.length-1)&&n.length>=3?[null,n,null]:ue.exec(n),!r||!r[1]&&t)return!t||t.jquery?(t||ft).find(n):this.constructor(t).find(n);if(r[1]){if(t=t instanceof i?t[0]:t,i.merge(this,i.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:u,!0)),er.test(r[1])&&i.isPlainObject(t))for(r in t)i.isFunction(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}if(f=u.getElementById(r[2]),f&&f.parentNode){if(f.id!==r[2])return ft.find(n);this.length=1;this[0]=f}return this.context=u,this.selector=n,this}return n.nodeType?(this.context=this[0]=n,this.length=1,this):i.isFunction(n)?"undefined"!=typeof ft.ready?ft.ready(n):n(i):(void 0!==n.selector&&(this.selector=n.selector,this.context=n.context),i.makeArray(n,this))};fe.prototype=i.fn;ft=i(u);or=/^(?:parents|prev(?:Until|All))/;sr={children:!0,contents:!0,next:!0,prev:!0};i.extend({dir:function(n,t,r){for(var f=[],u=n[t];u&&9!==u.nodeType&&(void 0===r||1!==u.nodeType||!i(u).is(r));)1===u.nodeType&&f.push(u),u=u[t];return f},sibling:function(n,t){for(var i=[];n;n=n.nextSibling)1===n.nodeType&&n!==t&&i.push(n);return i}});i.fn.extend({has:function(n){var t,r=i(n,this),u=r.length;return this.filter(function(){for(t=0;u>t;t++)if(i.contains(this,r[t]))return!0})},closest:function(n,t){for(var r,f=0,o=this.length,u=[],e=fr.test(n)||"string"!=typeof n?i(n,t||this.context):0;o>f;f++)for(r=this[f];r&&r!==t;r=r.parentNode)if(r.nodeType<11&&(e?e.index(r)>-1:1===r.nodeType&&i.find.matchesSelector(r,n))){u.push(r);break}return this.pushStack(u.length>1?i.unique(u):u)},index:function(n){return n?"string"==typeof n?i.inArray(this[0],i(n)):i.inArray(n.jquery?n[0]:n,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(n,t){return this.pushStack(i.unique(i.merge(this.get(),i(n,t))))},addBack:function(n){return this.add(null==n?this.prevObject:this.prevObject.filter(n))}});i.each({parent:function(n){var t=n.parentNode;return t&&11!==t.nodeType?t:null},parents:function(n){return i.dir(n,"parentNode")},parentsUntil:function(n,t,r){return i.dir(n,"parentNode",r)},next:function(n){return hr(n,"nextSibling")},prev:function(n){return hr(n,"previousSibling")},nextAll:function(n){return i.dir(n,"nextSibling")},prevAll:function(n){return i.dir(n,"previousSibling")},nextUntil:function(n,t,r){return i.dir(n,"nextSibling",r)},prevUntil:function(n,t,r){return i.dir(n,"previousSibling",r)},siblings:function(n){return i.sibling((n.parentNode||{}).firstChild,n)},children:function(n){return i.sibling(n.firstChild)},contents:function(n){return i.nodeName(n,"iframe")?n.contentDocument||n.contentWindow.document:i.merge([],n.childNodes)}},function(n,t){i.fn[n]=function(r,u){var f=i.map(this,t,r);return"Until"!==n.slice(-5)&&(u=r),u&&"string"==typeof u&&(f=i.filter(u,f)),this.length>1&&(sr[n]||(f=i.unique(f)),or.test(n)&&(f=f.reverse())),this.pushStack(f)}});h=/\S+/g;fi={};i.Callbacks=function(n){n="string"==typeof n?fi[n]||ee(n):i.extend({},n);var o,u,h,f,e,c,t=[],r=!n.once&&[],l=function(i){for(u=n.memory&&i,h=!0,e=c||0,c=0,f=t.length,o=!0;t&&f>e;e++)if(t[e].apply(i[0],i[1])===!1&&n.stopOnFalse){u=!1;break}o=!1;t&&(r?r.length&&l(r.shift()):u?t=[]:s.disable())},s={add:function(){if(t){var r=t.length;!function e(r){i.each(r,function(r,u){var f=i.type(u);"function"===f?n.unique&&s.has(u)||t.push(u):u&&u.length&&"string"!==f&&e(u)})}(arguments);o?f=t.length:u&&(c=r,l(u))}return this},remove:function(){return t&&i.each(arguments,function(n,r){for(var u;(u=i.inArray(r,t,u))>-1;)t.splice(u,1),o&&(f>=u&&f--,e>=u&&e--)}),this},has:function(n){return n?i.inArray(n,t)>-1:!(!t||!t.length)},empty:function(){return t=[],f=0,this},disable:function(){return t=r=u=void 0,this},disabled:function(){return!t},lock:function(){return r=void 0,u||s.disable(),this},locked:function(){return!r},fireWith:function(n,i){return!t||h&&!r||(i=i||[],i=[n,i.slice?i.slice():i],o?r.push(i):l(i)),this},fire:function(){return s.fireWith(this,arguments),this},fired:function(){return!!h}};return s};i.extend({Deferred:function(n){var u=[["resolve","done",i.Callbacks("once memory"),"resolved"],["reject","fail",i.Callbacks("once memory"),"rejected"],["notify","progress",i.Callbacks("memory")]],f="pending",r={state:function(){return f},always:function(){return t.done(arguments).fail(arguments),this},then:function(){var n=arguments;return i.Deferred(function(f){i.each(u,function(u,e){var o=i.isFunction(n[u])&&n[u];t[e[1]](function(){var n=o&&o.apply(this,arguments);n&&i.isFunction(n.promise)?n.promise().done(f.resolve).fail(f.reject).progress(f.notify):f[e[0]+"With"](this===r?f.promise():this,o?[n]:arguments)})});n=null}).promise()},promise:function(n){return null!=n?i.extend(n,r):r}},t={};return r.pipe=r.then,i.each(u,function(n,i){var e=i[2],o=i[3];r[i[1]]=e.add;o&&e.add(function(){f=o},u[1^n][2].disable,u[2][2].lock);t[i[0]]=function(){return t[i[0]+"With"](this===t?r:this,arguments),this};t[i[0]+"With"]=e.fireWith}),r.promise(t),n&&n.call(t,t),t},when:function(n){var t=0,u=l.call(arguments),r=u.length,e=1!==r||n&&i.isFunction(n.promise)?r:0,f=1===e?n:i.Deferred(),h=function(n,t,i){return function(r){t[n]=this;i[n]=arguments.length>1?l.call(arguments):r;i===o?f.notifyWith(t,i):--e||f.resolveWith(t,i)}},o,c,s;if(r>1)for(o=new Array(r),c=new Array(r),s=new Array(r);r>t;t++)u[t]&&i.isFunction(u[t].promise)?u[t].promise().done(h(t,s,u)).fail(f.reject).progress(h(t,c,o)):--e;return e||f.resolveWith(s,u),f.promise()}});i.fn.ready=function(n){return i.ready.promise().done(n),this};i.extend({isReady:!1,readyWait:1,holdReady:function(n){n?i.readyWait++:i.ready(!0)},ready:function(n){if(n===!0?!--i.readyWait:!i.isReady){if(!u.body)return setTimeout(i.ready);i.isReady=!0;n!==!0&&--i.readyWait>0||(lt.resolveWith(u,[i]),i.fn.triggerHandler&&(i(u).triggerHandler("ready"),i(u).off("ready")))}}});i.ready.promise=function(t){if(!lt)if(lt=i.Deferred(),"complete"===u.readyState)setTimeout(i.ready);else if(u.addEventListener)u.addEventListener("DOMContentLoaded",a,!1),n.addEventListener("load",a,!1);else{u.attachEvent("onreadystatechange",a);n.attachEvent("onload",a);var r=!1;try{r=null==n.frameElement&&u.documentElement}catch(e){}r&&r.doScroll&&!function f(){if(!i.isReady){try{r.doScroll("left")}catch(n){return setTimeout(f,50)}cr();i.ready()}}()}return lt.promise(t)};o="undefined";for(lr in i(r))break;r.ownLast="0"!==lr;r.inlineBlockNeedsLayout=!1;i(function(){var f,t,n,i;n=u.getElementsByTagName("body")[0];n&&n.style&&(t=u.createElement("div"),i=u.createElement("div"),i.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",n.appendChild(i).appendChild(t),typeof t.style.zoom!==o&&(t.style.cssText="display:inline;margin:0;border:0;padding:1px;width:1px;zoom:1",r.inlineBlockNeedsLayout=f=3===t.offsetWidth,f&&(n.style.zoom=1)),n.removeChild(i))}),function(){var n=u.createElement("div");if(null==r.deleteExpando){r.deleteExpando=!0;try{delete n.test}catch(t){r.deleteExpando=!1}}n=null}();i.acceptData=function(n){var t=i.noData[(n.nodeName+" ").toLowerCase()],r=+n.nodeType||1;return 1!==r&&9!==r?!1:!t||t!==!0&&n.getAttribute("classid")===t};ar=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/;vr=/([A-Z])/g;i.extend({cache:{},noData:{"applet ":!0,"embed ":!0,"object ":"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(n){return n=n.nodeType?i.cache[n[i.expando]]:n[i.expando],!!n&&!ei(n)},data:function(n,t,i){return pr(n,t,i)},removeData:function(n,t){return wr(n,t)},_data:function(n,t,i){return pr(n,t,i,!0)},_removeData:function(n,t){return wr(n,t,!0)}});i.fn.extend({data:function(n,t){var f,u,e,r=this[0],o=r&&r.attributes;if(void 0===n){if(this.length&&(e=i.data(r),1===r.nodeType&&!i._data(r,"parsedAttrs"))){for(f=o.length;f--;)o[f]&&(u=o[f].name,0===u.indexOf("data-")&&(u=i.camelCase(u.slice(5)),yr(r,u,e[u])));i._data(r,"parsedAttrs",!0)}return e}return"object"==typeof n?this.each(function(){i.data(this,n)}):arguments.length>1?this.each(function(){i.data(this,n,t)}):r?yr(r,n,i.data(r,n)):void 0},removeData:function(n){return this.each(function(){i.removeData(this,n)})}});i.extend({queue:function(n,t,r){var u;if(n)return(t=(t||"fx")+"queue",u=i._data(n,t),r&&(!u||i.isArray(r)?u=i._data(n,t,i.makeArray(r)):u.push(r)),u||[])},dequeue:function(n,t){t=t||"fx";var r=i.queue(n,t),e=r.length,u=r.shift(),f=i._queueHooks(n,t),o=function(){i.dequeue(n,t)};"inprogress"===u&&(u=r.shift(),e--);u&&("fx"===t&&r.unshift("inprogress"),delete f.stop,u.call(n,o,f));!e&&f&&f.empty.fire()},_queueHooks:function(n,t){var r=t+"queueHooks";return i._data(n,r)||i._data(n,r,{empty:i.Callbacks("once memory").add(function(){i._removeData(n,t+"queue");i._removeData(n,r)})})}});i.fn.extend({queue:function(n,t){var r=2;return"string"!=typeof n&&(t=n,n="fx",r--),arguments.length<r?i.queue(this[0],n):void 0===t?this:this.each(function(){var r=i.queue(this,n,t);i._queueHooks(this,n);"fx"===n&&"inprogress"!==r[0]&&i.dequeue(this,n)})},dequeue:function(n){return this.each(function(){i.dequeue(this,n)})},clearQueue:function(n){return this.queue(n||"fx",[])},promise:function(n,t){var r,f=1,e=i.Deferred(),u=this,o=this.length,s=function(){--f||e.resolveWith(u,[u])};for("string"!=typeof n&&(t=n,n=void 0),n=n||"fx";o--;)r=i._data(u[o],n+"queueHooks"),r&&r.empty&&(f++,r.empty.add(s));return s(),e.promise(t)}});var at=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,w=["Top","Right","Bottom","Left"],et=function(n,t){return n=t||n,"none"===i.css(n,"display")||!i.contains(n.ownerDocument,n)},b=i.access=function(n,t,r,u,f,e,o){var s=0,c=n.length,h=null==r;if("object"===i.type(r)){f=!0;for(s in r)i.access(n,t,s,r[s],!0,e,o)}else if(void 0!==u&&(f=!0,i.isFunction(u)||(o=!0),h&&(o?(t.call(n,u),t=null):(h=t,t=function(n,t,r){return h.call(i(n),r)})),t))for(;c>s;s++)t(n[s],r,o?u:u.call(n[s],s,t(n[s],r)));return f?n:h?t.call(n):c?t(n[0],r):e},oi=/^(?:checkbox|radio)$/i;!function(){var t=u.createElement("input"),n=u.createElement("div"),i=u.createDocumentFragment();if(n.innerHTML="  <link/><table><\/table><a href='/a'>a<\/a><input type='checkbox'/>",r.leadingWhitespace=3===n.firstChild.nodeType,r.tbody=!n.getElementsByTagName("tbody").length,r.htmlSerialize=!!n.getElementsByTagName("link").length,r.html5Clone="<:nav><\/:nav>"!==u.createElement("nav").cloneNode(!0).outerHTML,t.type="checkbox",t.checked=!0,i.appendChild(t),r.appendChecked=t.checked,n.innerHTML="<textarea>x<\/textarea>",r.noCloneChecked=!!n.cloneNode(!0).lastChild.defaultValue,i.appendChild(n),n.innerHTML="<input type='radio' checked='checked' name='t'/>",r.checkClone=n.cloneNode(!0).cloneNode(!0).lastChild.checked,r.noCloneEvent=!0,n.attachEvent&&(n.attachEvent("onclick",function(){r.noCloneEvent=!1}),n.cloneNode(!0).click()),null==r.deleteExpando){r.deleteExpando=!0;try{delete n.test}catch(f){r.deleteExpando=!1}}}(),function(){var t,i,f=u.createElement("div");for(t in{submit:!0,change:!0,focusin:!0})i="on"+t,(r[t+"Bubbles"]=i in n)||(f.setAttribute(i,"t"),r[t+"Bubbles"]=f.attributes[i].expando===!1);f=null}();var si=/^(?:input|select|textarea)$/i,oe=/^key/,se=/^(?:mouse|pointer|contextmenu)|click/,br=/^(?:focusinfocus|focusoutblur)$/,kr=/^([^.]*)(?:\.(.+)|)$/;i.event={global:{},add:function(n,t,r,u,f){var w,y,b,p,s,c,l,a,e,k,d,v=i._data(n);if(v){for(r.handler&&(p=r,r=p.handler,f=p.selector),r.guid||(r.guid=i.guid++),(y=v.events)||(y=v.events={}),(c=v.handle)||(c=v.handle=function(n){if(typeof i!==o&&(!n||i.event.triggered!==n.type))return i.event.dispatch.apply(c.elem,arguments)},c.elem=n),t=(t||"").match(h)||[""],b=t.length;b--;)w=kr.exec(t[b])||[],e=d=w[1],k=(w[2]||"").split(".").sort(),e&&(s=i.event.special[e]||{},e=(f?s.delegateType:s.bindType)||e,s=i.event.special[e]||{},l=i.extend({type:e,origType:d,data:u,handler:r,guid:r.guid,selector:f,needsContext:f&&i.expr.match.needsContext.test(f),namespace:k.join(".")},p),(a=y[e])||(a=y[e]=[],a.delegateCount=0,s.setup&&s.setup.call(n,u,k,c)!==!1||(n.addEventListener?n.addEventListener(e,c,!1):n.attachEvent&&n.attachEvent("on"+e,c))),s.add&&(s.add.call(n,l),l.handler.guid||(l.handler.guid=r.guid)),f?a.splice(a.delegateCount++,0,l):a.push(l),i.event.global[e]=!0);n=null}},remove:function(n,t,r,u,f){var y,o,s,b,p,a,c,l,e,w,k,v=i.hasData(n)&&i._data(n);if(v&&(a=v.events)){for(t=(t||"").match(h)||[""],p=t.length;p--;)if(s=kr.exec(t[p])||[],e=k=s[1],w=(s[2]||"").split(".").sort(),e){for(c=i.event.special[e]||{},e=(u?c.delegateType:c.bindType)||e,l=a[e]||[],s=s[2]&&new RegExp("(^|\\.)"+w.join("\\.(?:.*\\.|)")+"(\\.|$)"),b=y=l.length;y--;)o=l[y],!f&&k!==o.origType||r&&r.guid!==o.guid||s&&!s.test(o.namespace)||u&&u!==o.selector&&("**"!==u||!o.selector)||(l.splice(y,1),o.selector&&l.delegateCount--,c.remove&&c.remove.call(n,o));b&&!l.length&&(c.teardown&&c.teardown.call(n,w,v.handle)!==!1||i.removeEvent(n,e,v.handle),delete a[e])}else for(e in a)i.event.remove(n,e+t[p],r,u,!0);i.isEmptyObject(a)&&(delete v.handle,i._removeData(n,"events"))}},trigger:function(t,r,f,e){var l,a,o,p,c,h,w,y=[f||u],s=tt.call(t,"type")?t.type:t,v=tt.call(t,"namespace")?t.namespace.split("."):[];if(o=h=f=f||u,3!==f.nodeType&&8!==f.nodeType&&!br.test(s+i.event.triggered)&&(s.indexOf(".")>=0&&(v=s.split("."),s=v.shift(),v.sort()),a=s.indexOf(":")<0&&"on"+s,t=t[i.expando]?t:new i.Event(s,"object"==typeof t&&t),t.isTrigger=e?2:3,t.namespace=v.join("."),t.namespace_re=t.namespace?new RegExp("(^|\\.)"+v.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=void 0,t.target||(t.target=f),r=null==r?[t]:i.makeArray(r,[t]),c=i.event.special[s]||{},e||!c.trigger||c.trigger.apply(f,r)!==!1)){if(!e&&!c.noBubble&&!i.isWindow(f)){for(p=c.delegateType||s,br.test(p+s)||(o=o.parentNode);o;o=o.parentNode)y.push(o),h=o;h===(f.ownerDocument||u)&&y.push(h.defaultView||h.parentWindow||n)}for(w=0;(o=y[w++])&&!t.isPropagationStopped();)t.type=w>1?p:c.bindType||s,l=(i._data(o,"events")||{})[t.type]&&i._data(o,"handle"),l&&l.apply(o,r),l=a&&o[a],l&&l.apply&&i.acceptData(o)&&(t.result=l.apply(o,r),t.result===!1&&t.preventDefault());if(t.type=s,!e&&!t.isDefaultPrevented()&&(!c._default||c._default.apply(y.pop(),r)===!1)&&i.acceptData(f)&&a&&f[s]&&!i.isWindow(f)){h=f[a];h&&(f[a]=null);i.event.triggered=s;try{f[s]()}catch(b){}i.event.triggered=void 0;h&&(f[a]=h)}return t.result}},dispatch:function(n){n=i.event.fix(n);var e,f,t,r,o,s=[],h=l.call(arguments),c=(i._data(this,"events")||{})[n.type]||[],u=i.event.special[n.type]||{};if(h[0]=n,n.delegateTarget=this,!u.preDispatch||u.preDispatch.call(this,n)!==!1){for(s=i.event.handlers.call(this,n,c),e=0;(r=s[e++])&&!n.isPropagationStopped();)for(n.currentTarget=r.elem,o=0;(t=r.handlers[o++])&&!n.isImmediatePropagationStopped();)(!n.namespace_re||n.namespace_re.test(t.namespace))&&(n.handleObj=t,n.data=t.data,f=((i.event.special[t.origType]||{}).handle||t.handler).apply(r.elem,h),void 0!==f&&(n.result=f)===!1&&(n.preventDefault(),n.stopPropagation()));return u.postDispatch&&u.postDispatch.call(this,n),n.result}},handlers:function(n,t){var f,e,u,o,h=[],s=t.delegateCount,r=n.target;if(s&&r.nodeType&&(!n.button||"click"!==n.type))for(;r!=this;r=r.parentNode||this)if(1===r.nodeType&&(r.disabled!==!0||"click"!==n.type)){for(u=[],o=0;s>o;o++)e=t[o],f=e.selector+" ",void 0===u[f]&&(u[f]=e.needsContext?i(f,this).index(r)>=0:i.find(f,this,null,[r]).length),u[f]&&u.push(e);u.length&&h.push({elem:r,handlers:u})}return s<t.length&&h.push({elem:this,handlers:t.slice(s)}),h},fix:function(n){if(n[i.expando])return n;var e,o,s,r=n.type,f=n,t=this.fixHooks[r];for(t||(this.fixHooks[r]=t=se.test(r)?this.mouseHooks:oe.test(r)?this.keyHooks:{}),s=t.props?this.props.concat(t.props):this.props,n=new i.Event(f),e=s.length;e--;)o=s[e],n[o]=f[o];return n.target||(n.target=f.srcElement||u),3===n.target.nodeType&&(n.target=n.target.parentNode),n.metaKey=!!n.metaKey,t.filter?t.filter(n,f):n},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(n,t){return null==n.which&&(n.which=null!=t.charCode?t.charCode:t.keyCode),n}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(n,t){var i,e,r,f=t.button,o=t.fromElement;return null==n.pageX&&null!=t.clientX&&(e=n.target.ownerDocument||u,r=e.documentElement,i=e.body,n.pageX=t.clientX+(r&&r.scrollLeft||i&&i.scrollLeft||0)-(r&&r.clientLeft||i&&i.clientLeft||0),n.pageY=t.clientY+(r&&r.scrollTop||i&&i.scrollTop||0)-(r&&r.clientTop||i&&i.clientTop||0)),!n.relatedTarget&&o&&(n.relatedTarget=o===n.target?t.toElement:o),n.which||void 0===f||(n.which=1&f?1:2&f?3:4&f?2:0),n}},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==dr()&&this.focus)try{return this.focus(),!1}catch(n){}},delegateType:"focusin"},blur:{trigger:function(){if(this===dr()&&this.blur)return(this.blur(),!1)},delegateType:"focusout"},click:{trigger:function(){if(i.nodeName(this,"input")&&"checkbox"===this.type&&this.click)return(this.click(),!1)},_default:function(n){return i.nodeName(n.target,"a")}},beforeunload:{postDispatch:function(n){void 0!==n.result&&n.originalEvent&&(n.originalEvent.returnValue=n.result)}}},simulate:function(n,t,r,u){var f=i.extend(new i.Event,r,{type:n,isSimulated:!0,originalEvent:{}});u?i.event.trigger(f,null,t):i.event.dispatch.call(t,f);f.isDefaultPrevented()&&r.preventDefault()}};i.removeEvent=u.removeEventListener?function(n,t,i){n.removeEventListener&&n.removeEventListener(t,i,!1)}:function(n,t,i){var r="on"+t;n.detachEvent&&(typeof n[r]===o&&(n[r]=null),n.detachEvent(r,i))};i.Event=function(n,t){return this instanceof i.Event?(n&&n.type?(this.originalEvent=n,this.type=n.type,this.isDefaultPrevented=n.defaultPrevented||void 0===n.defaultPrevented&&n.returnValue===!1?vt:it):this.type=n,t&&i.extend(this,t),this.timeStamp=n&&n.timeStamp||i.now(),void(this[i.expando]=!0)):new i.Event(n,t)};i.Event.prototype={isDefaultPrevented:it,isPropagationStopped:it,isImmediatePropagationStopped:it,preventDefault:function(){var n=this.originalEvent;this.isDefaultPrevented=vt;n&&(n.preventDefault?n.preventDefault():n.returnValue=!1)},stopPropagation:function(){var n=this.originalEvent;this.isPropagationStopped=vt;n&&(n.stopPropagation&&n.stopPropagation(),n.cancelBubble=!0)},stopImmediatePropagation:function(){var n=this.originalEvent;this.isImmediatePropagationStopped=vt;n&&n.stopImmediatePropagation&&n.stopImmediatePropagation();this.stopPropagation()}};i.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(n,t){i.event.special[n]={delegateType:t,bindType:t,handle:function(n){var u,f=this,r=n.relatedTarget,e=n.handleObj;return(!r||r!==f&&!i.contains(f,r))&&(n.type=e.origType,u=e.handler.apply(this,arguments),n.type=t),u}}});r.submitBubbles||(i.event.special.submit={setup:function(){return i.nodeName(this,"form")?!1:void i.event.add(this,"click._submit keypress._submit",function(n){var r=n.target,t=i.nodeName(r,"input")||i.nodeName(r,"button")?r.form:void 0;t&&!i._data(t,"submitBubbles")&&(i.event.add(t,"submit._submit",function(n){n._submit_bubble=!0}),i._data(t,"submitBubbles",!0))})},postDispatch:function(n){n._submit_bubble&&(delete n._submit_bubble,this.parentNode&&!n.isTrigger&&i.event.simulate("submit",this.parentNode,n,!0))},teardown:function(){return i.nodeName(this,"form")?!1:void i.event.remove(this,"._submit")}});r.changeBubbles||(i.event.special.change={setup:function(){return si.test(this.nodeName)?(("checkbox"===this.type||"radio"===this.type)&&(i.event.add(this,"propertychange._change",function(n){"checked"===n.originalEvent.propertyName&&(this._just_changed=!0)}),i.event.add(this,"click._change",function(n){this._just_changed&&!n.isTrigger&&(this._just_changed=!1);i.event.simulate("change",this,n,!0)})),!1):void i.event.add(this,"beforeactivate._change",function(n){var t=n.target;si.test(t.nodeName)&&!i._data(t,"changeBubbles")&&(i.event.add(t,"change._change",function(n){!this.parentNode||n.isSimulated||n.isTrigger||i.event.simulate("change",this.parentNode,n,!0)}),i._data(t,"changeBubbles",!0))})},handle:function(n){var t=n.target;if(this!==t||n.isSimulated||n.isTrigger||"radio"!==t.type&&"checkbox"!==t.type)return n.handleObj.handler.apply(this,arguments)},teardown:function(){return i.event.remove(this,"._change"),!si.test(this.nodeName)}});r.focusinBubbles||i.each({focus:"focusin",blur:"focusout"},function(n,t){var r=function(n){i.event.simulate(t,n.target,i.event.fix(n),!0)};i.event.special[t]={setup:function(){var u=this.ownerDocument||this,f=i._data(u,t);f||u.addEventListener(n,r,!0);i._data(u,t,(f||0)+1)},teardown:function(){var u=this.ownerDocument||this,f=i._data(u,t)-1;f?i._data(u,t,f):(u.removeEventListener(n,r,!0),i._removeData(u,t))}}});i.fn.extend({on:function(n,t,r,u,f){var o,e;if("object"==typeof n){"string"!=typeof t&&(r=r||t,t=void 0);for(o in n)this.on(o,t,r,n[o],f);return this}if(null==r&&null==u?(u=t,r=t=void 0):null==u&&("string"==typeof t?(u=r,r=void 0):(u=r,r=t,t=void 0)),u===!1)u=it;else if(!u)return this;return 1===f&&(e=u,u=function(n){return i().off(n),e.apply(this,arguments)},u.guid=e.guid||(e.guid=i.guid++)),this.each(function(){i.event.add(this,n,u,r,t)})},one:function(n,t,i,r){return this.on(n,t,i,r,1)},off:function(n,t,r){var u,f;if(n&&n.preventDefault&&n.handleObj)return u=n.handleObj,i(n.delegateTarget).off(u.namespace?u.origType+"."+u.namespace:u.origType,u.selector,u.handler),this;if("object"==typeof n){for(f in n)this.off(f,t,n[f]);return this}return(t===!1||"function"==typeof t)&&(r=t,t=void 0),r===!1&&(r=it),this.each(function(){i.event.remove(this,n,r,t)})},trigger:function(n,t){return this.each(function(){i.event.trigger(n,t,this)})},triggerHandler:function(n,t){var r=this[0];if(r)return i.event.trigger(n,t,r,!0)}});var nu="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",he=/ jQuery\d+="(?:null|\d+)"/g,tu=new RegExp("<(?:"+nu+")[\\s/>]","i"),hi=/^\s+/,iu=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,ru=/<([\w:]+)/,uu=/<tbody/i,ce=/<|&#?\w+;/,le=/<(?:script|style|link)/i,ae=/checked\s*(?:[^=]|=\s*.checked.)/i,fu=/^$|\/(?:java|ecma)script/i,ve=/^true\/(.*)/,ye=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,s={option:[1,"<select multiple='multiple'>","<\/select>"],legend:[1,"<fieldset>","<\/fieldset>"],area:[1,"<map>","<\/map>"],param:[1,"<object>","<\/object>"],thead:[1,"<table>","<\/table>"],tr:[2,"<table><tbody>","<\/tbody><\/table>"],col:[2,"<table><tbody><\/tbody><colgroup>","<\/colgroup><\/table>"],td:[3,"<table><tbody><tr>","<\/tr><\/tbody><\/table>"],_default:r.htmlSerialize?[0,"",""]:[1,"X<div>","<\/div>"]},pe=gr(u),ci=pe.appendChild(u.createElement("div"));s.optgroup=s.option;s.tbody=s.tfoot=s.colgroup=s.caption=s.thead;s.th=s.td;i.extend({clone:function(n,t,u){var e,c,s,o,h,l=i.contains(n.ownerDocument,n);if(r.html5Clone||i.isXMLDoc(n)||!tu.test("<"+n.nodeName+">")?s=n.cloneNode(!0):(ci.innerHTML=n.outerHTML,ci.removeChild(s=ci.firstChild)),!(r.noCloneEvent&&r.noCloneChecked||1!==n.nodeType&&11!==n.nodeType||i.isXMLDoc(n)))for(e=f(s),h=f(n),o=0;null!=(c=h[o]);++o)e[o]&&be(c,e[o]);if(t)if(u)for(h=h||f(n),e=e||f(s),o=0;null!=(c=h[o]);o++)hu(c,e[o]);else hu(n,s);return e=f(s,"script"),e.length>0&&li(e,!l&&f(n,"script")),e=h=c=null,s},buildFragment:function(n,t,u,e){for(var c,o,b,h,p,w,a,k=n.length,v=gr(t),l=[],y=0;k>y;y++)if(o=n[y],o||0===o)if("object"===i.type(o))i.merge(l,o.nodeType?[o]:o);else if(ce.test(o)){for(h=h||v.appendChild(t.createElement("div")),p=(ru.exec(o)||["",""])[1].toLowerCase(),a=s[p]||s._default,h.innerHTML=a[1]+o.replace(iu,"<$1><\/$2>")+a[2],c=a[0];c--;)h=h.lastChild;if(!r.leadingWhitespace&&hi.test(o)&&l.push(t.createTextNode(hi.exec(o)[0])),!r.tbody)for(o="table"!==p||uu.test(o)?"<table>"!==a[1]||uu.test(o)?0:h:h.firstChild,c=o&&o.childNodes.length;c--;)i.nodeName(w=o.childNodes[c],"tbody")&&!w.childNodes.length&&o.removeChild(w);for(i.merge(l,h.childNodes),h.textContent="";h.firstChild;)h.removeChild(h.firstChild);h=v.lastChild}else l.push(t.createTextNode(o));for(h&&v.removeChild(h),r.appendChecked||i.grep(f(l,"input"),we),y=0;o=l[y++];)if((!e||-1===i.inArray(o,e))&&(b=i.contains(o.ownerDocument,o),h=f(v.appendChild(o),"script"),b&&li(h),u))for(c=0;o=h[c++];)fu.test(o.type||"")&&u.push(o);return h=null,v},cleanData:function(n,t){for(var u,e,f,s,a=0,h=i.expando,l=i.cache,v=r.deleteExpando,y=i.event.special;null!=(u=n[a]);a++)if((t||i.acceptData(u))&&(f=u[h],s=f&&l[f])){if(s.events)for(e in s.events)y[e]?i.event.remove(u,e):i.removeEvent(u,e,s.handle);l[f]&&(delete l[f],v?delete u[h]:typeof u.removeAttribute!==o?u.removeAttribute(h):u[h]=null,c.push(f))}}});i.fn.extend({text:function(n){return b(this,function(n){return void 0===n?i.text(this):this.empty().append((this[0]&&this[0].ownerDocument||u).createTextNode(n))},null,n,arguments.length)},append:function(){return this.domManip(arguments,function(n){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=eu(this,n);t.appendChild(n)}})},prepend:function(){return this.domManip(arguments,function(n){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=eu(this,n);t.insertBefore(n,t.firstChild)}})},before:function(){return this.domManip(arguments,function(n){this.parentNode&&this.parentNode.insertBefore(n,this)})},after:function(){return this.domManip(arguments,function(n){this.parentNode&&this.parentNode.insertBefore(n,this.nextSibling)})},remove:function(n,t){for(var r,e=n?i.filter(n,this):this,u=0;null!=(r=e[u]);u++)t||1!==r.nodeType||i.cleanData(f(r)),r.parentNode&&(t&&i.contains(r.ownerDocument,r)&&li(f(r,"script")),r.parentNode.removeChild(r));return this},empty:function(){for(var n,t=0;null!=(n=this[t]);t++){for(1===n.nodeType&&i.cleanData(f(n,!1));n.firstChild;)n.removeChild(n.firstChild);n.options&&i.nodeName(n,"select")&&(n.options.length=0)}return this},clone:function(n,t){return n=null==n?!1:n,t=null==t?n:t,this.map(function(){return i.clone(this,n,t)})},html:function(n){return b(this,function(n){var t=this[0]||{},u=0,e=this.length;if(void 0===n)return 1===t.nodeType?t.innerHTML.replace(he,""):void 0;if(!("string"!=typeof n||le.test(n)||!r.htmlSerialize&&tu.test(n)||!r.leadingWhitespace&&hi.test(n)||s[(ru.exec(n)||["",""])[1].toLowerCase()])){n=n.replace(iu,"<$1><\/$2>");try{for(;e>u;u++)t=this[u]||{},1===t.nodeType&&(i.cleanData(f(t,!1)),t.innerHTML=n);t=0}catch(o){}}t&&this.empty().append(n)},null,n,arguments.length)},replaceWith:function(){var n=arguments[0];return this.domManip(arguments,function(t){n=this.parentNode;i.cleanData(f(this));n&&n.replaceChild(t,this)}),n&&(n.length||n.nodeType)?this:this.remove()},detach:function(n){return this.remove(n,!0)},domManip:function(n,t){n=ir.apply([],n);var h,u,c,o,v,s,e=0,l=this.length,p=this,w=l-1,a=n[0],y=i.isFunction(a);if(y||l>1&&"string"==typeof a&&!r.checkClone&&ae.test(a))return this.each(function(i){var r=p.eq(i);y&&(n[0]=a.call(this,i,r.html()));r.domManip(n,t)});if(l&&(s=i.buildFragment(n,this[0].ownerDocument,!1,this),h=s.firstChild,1===s.childNodes.length&&(s=h),h)){for(o=i.map(f(s,"script"),ou),c=o.length;l>e;e++)u=s,e!==w&&(u=i.clone(u,!0,!0),c&&i.merge(o,f(u,"script"))),t.call(this[e],u,e);if(c)for(v=o[o.length-1].ownerDocument,i.map(o,su),e=0;c>e;e++)u=o[e],fu.test(u.type||"")&&!i._data(u,"globalEval")&&i.contains(v,u)&&(u.src?i._evalUrl&&i._evalUrl(u.src):i.globalEval((u.text||u.textContent||u.innerHTML||"").replace(ye,"")));s=h=null}return this}});i.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(n,t){i.fn[n]=function(n){for(var u,r=0,f=[],e=i(n),o=e.length-1;o>=r;r++)u=r===o?this:this.clone(!0),i(e[r])[t](u),ii.apply(f,u.get());return this.pushStack(f)}});ai={};!function(){var n;r.shrinkWrapBlocks=function(){if(null!=n)return n;n=!1;var t,i,r;return i=u.getElementsByTagName("body")[0],i&&i.style?(t=u.createElement("div"),r=u.createElement("div"),r.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",i.appendChild(r).appendChild(t),typeof t.style.zoom!==o&&(t.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:1px;width:1px;zoom:1",t.appendChild(u.createElement("div")).style.width="5px",n=3!==t.offsetWidth),i.removeChild(r),n):void 0}}();var lu=/^margin/,pt=new RegExp("^("+at+")(?!px)[a-z%]+$","i"),k,d,ke=/^(top|right|bottom|left)$/;n.getComputedStyle?(k=function(t){return t.ownerDocument.defaultView.opener?t.ownerDocument.defaultView.getComputedStyle(t,null):n.getComputedStyle(t,null)},d=function(n,t,r){var e,o,s,u,f=n.style;return r=r||k(n),u=r?r.getPropertyValue(t)||r[t]:void 0,r&&(""!==u||i.contains(n.ownerDocument,n)||(u=i.style(n,t)),pt.test(u)&&lu.test(t)&&(e=f.width,o=f.minWidth,s=f.maxWidth,f.minWidth=f.maxWidth=f.width=u,u=r.width,f.width=e,f.minWidth=o,f.maxWidth=s)),void 0===u?u:u+""}):u.documentElement.currentStyle&&(k=function(n){return n.currentStyle},d=function(n,t,i){var o,f,e,r,u=n.style;return i=i||k(n),r=i?i[t]:void 0,null==r&&u&&u[t]&&(r=u[t]),pt.test(r)&&!ke.test(t)&&(o=u.left,f=n.runtimeStyle,e=f&&f.left,e&&(f.left=n.currentStyle.left),u.left="fontSize"===t?"1em":r,r=u.pixelLeft+"px",u.left=o,e&&(f.left=e)),void 0===r?r:r+""||"auto"});!function(){var f,t,c,o,s,e,h;if(f=u.createElement("div"),f.innerHTML="  <link/><table><\/table><a href='/a'>a<\/a><input type='checkbox'/>",c=f.getElementsByTagName("a")[0],t=c&&c.style){t.cssText="float:left;opacity:.5";r.opacity="0.5"===t.opacity;r.cssFloat=!!t.cssFloat;f.style.backgroundClip="content-box";f.cloneNode(!0).style.backgroundClip="";r.clearCloneStyle="content-box"===f.style.backgroundClip;r.boxSizing=""===t.boxSizing||""===t.MozBoxSizing||""===t.WebkitBoxSizing;i.extend(r,{reliableHiddenOffsets:function(){return null==e&&c(),e},boxSizingReliable:function(){return null==s&&c(),s},pixelPosition:function(){return null==o&&c(),o},reliableMarginRight:function(){return null==h&&c(),h}});function c(){var i,r,f,t;r=u.getElementsByTagName("body")[0];r&&r.style&&(i=u.createElement("div"),f=u.createElement("div"),f.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",r.appendChild(f).appendChild(i),i.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;display:block;margin-top:1%;top:1%;border:1px;padding:1px;width:4px;position:absolute",o=s=!1,h=!0,n.getComputedStyle&&(o="1%"!==(n.getComputedStyle(i,null)||{}).top,s="4px"===(n.getComputedStyle(i,null)||{width:"4px"}).width,t=i.appendChild(u.createElement("div")),t.style.cssText=i.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0",t.style.marginRight=t.style.width="0",i.style.width="1px",h=!parseFloat((n.getComputedStyle(t,null)||{}).marginRight),i.removeChild(t)),i.innerHTML="<table><tr><td><\/td><td>t<\/td><\/tr><\/table>",t=i.getElementsByTagName("td"),t[0].style.cssText="margin:0;border:0;padding:0;display:none",e=0===t[0].offsetHeight,e&&(t[0].style.display="",t[1].style.display="none",e=0===t[0].offsetHeight),r.removeChild(f))}}}();i.swap=function(n,t,i,r){var f,u,e={};for(u in t)e[u]=n.style[u],n.style[u]=t[u];f=i.apply(n,r||[]);for(u in t)n.style[u]=e[u];return f};var vi=/alpha\([^)]*\)/i,de=/opacity\s*=\s*([^)]*)/,ge=/^(none|table(?!-c[ea]).+)/,no=new RegExp("^("+at+")(.*)$","i"),to=new RegExp("^([+-])=("+at+")","i"),io={position:"absolute",visibility:"hidden",display:"block"},vu={letterSpacing:"0",fontWeight:"400"},yu=["Webkit","O","Moz","ms"];i.extend({cssHooks:{opacity:{get:function(n,t){if(t){var i=d(n,"opacity");return""===i?"1":i}}}},cssNumber:{columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{float:r.cssFloat?"cssFloat":"styleFloat"},style:function(n,t,u,f){if(n&&3!==n.nodeType&&8!==n.nodeType&&n.style){var o,h,e,s=i.camelCase(t),c=n.style;if(t=i.cssProps[s]||(i.cssProps[s]=pu(c,s)),e=i.cssHooks[t]||i.cssHooks[s],void 0===u)return e&&"get"in e&&void 0!==(o=e.get(n,!1,f))?o:c[t];if(h=typeof u,"string"===h&&(o=to.exec(u))&&(u=(o[1]+1)*o[2]+parseFloat(i.css(n,t)),h="number"),null!=u&&u===u&&("number"!==h||i.cssNumber[s]||(u+="px"),r.clearCloneStyle||""!==u||0!==t.indexOf("background")||(c[t]="inherit"),!(e&&"set"in e&&void 0===(u=e.set(n,u,f)))))try{c[t]=u}catch(l){}}},css:function(n,t,r,u){var s,f,e,o=i.camelCase(t);return t=i.cssProps[o]||(i.cssProps[o]=pu(n.style,o)),e=i.cssHooks[t]||i.cssHooks[o],e&&"get"in e&&(f=e.get(n,!0,r)),void 0===f&&(f=d(n,t,u)),"normal"===f&&t in vu&&(f=vu[t]),""===r||r?(s=parseFloat(f),r===!0||i.isNumeric(s)?s||0:f):f}});i.each(["height","width"],function(n,t){i.cssHooks[t]={get:function(n,r,u){if(r)return ge.test(i.css(n,"display"))&&0===n.offsetWidth?i.swap(n,io,function(){return du(n,t,u)}):du(n,t,u)},set:function(n,u,f){var e=f&&k(n);return bu(n,u,f?ku(n,t,f,r.boxSizing&&"border-box"===i.css(n,"boxSizing",!1,e),e):0)}}});r.opacity||(i.cssHooks.opacity={get:function(n,t){return de.test((t&&n.currentStyle?n.currentStyle.filter:n.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":t?"1":""},set:function(n,t){var r=n.style,u=n.currentStyle,e=i.isNumeric(t)?"alpha(opacity="+100*t+")":"",f=u&&u.filter||r.filter||"";r.zoom=1;(t>=1||""===t)&&""===i.trim(f.replace(vi,""))&&r.removeAttribute&&(r.removeAttribute("filter"),""===t||u&&!u.filter)||(r.filter=vi.test(f)?f.replace(vi,e):f+" "+e)}});i.cssHooks.marginRight=au(r.reliableMarginRight,function(n,t){if(t)return i.swap(n,{display:"inline-block"},d,[n,"marginRight"])});i.each({margin:"",padding:"",border:"Width"},function(n,t){i.cssHooks[n+t]={expand:function(i){for(var r=0,f={},u="string"==typeof i?i.split(" "):[i];4>r;r++)f[n+w[r]+t]=u[r]||u[r-2]||u[0];return f}};lu.test(n)||(i.cssHooks[n+t].set=bu)});i.fn.extend({css:function(n,t){return b(this,function(n,t,r){var f,e,o={},u=0;if(i.isArray(t)){for(f=k(n),e=t.length;e>u;u++)o[t[u]]=i.css(n,t[u],!1,f);return o}return void 0!==r?i.style(n,t,r):i.css(n,t)},n,t,arguments.length>1)},show:function(){return wu(this,!0)},hide:function(){return wu(this)},toggle:function(n){return"boolean"==typeof n?n?this.show():this.hide():this.each(function(){et(this)?i(this).show():i(this).hide()})}});i.Tween=e;e.prototype={constructor:e,init:function(n,t,r,u,f,e){this.elem=n;this.prop=r;this.easing=f||"swing";this.options=t;this.start=this.now=this.cur();this.end=u;this.unit=e||(i.cssNumber[r]?"":"px")},cur:function(){var n=e.propHooks[this.prop];return n&&n.get?n.get(this):e.propHooks._default.get(this)},run:function(n){var t,r=e.propHooks[this.prop];return this.pos=this.options.duration?t=i.easing[this.easing](n,this.options.duration*n,0,1,this.options.duration):t=n,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),r&&r.set?r.set(this):e.propHooks._default.set(this),this}};e.prototype.init.prototype=e.prototype;e.propHooks={_default:{get:function(n){var t;return null==n.elem[n.prop]||n.elem.style&&null!=n.elem.style[n.prop]?(t=i.css(n.elem,n.prop,""),t&&"auto"!==t?t:0):n.elem[n.prop]},set:function(n){i.fx.step[n.prop]?i.fx.step[n.prop](n):n.elem.style&&(null!=n.elem.style[i.cssProps[n.prop]]||i.cssHooks[n.prop])?i.style(n.elem,n.prop,n.now+n.unit):n.elem[n.prop]=n.now}}};e.propHooks.scrollTop=e.propHooks.scrollLeft={set:function(n){n.elem.nodeType&&n.elem.parentNode&&(n.elem[n.prop]=n.now)}};i.easing={linear:function(n){return n},swing:function(n){return.5-Math.cos(n*Math.PI)/2}};i.fx=e.prototype.init;i.fx.step={};var rt,wt,ro=/^(?:toggle|show|hide)$/,gu=new RegExp("^(?:([+-])=|)("+at+")([a-z%]*)$","i"),uo=/queueHooks$/,bt=[fo],st={"*":[function(n,t){var f=this.createTween(n,t),s=f.cur(),r=gu.exec(t),e=r&&r[3]||(i.cssNumber[n]?"":"px"),u=(i.cssNumber[n]||"px"!==e&&+s)&&gu.exec(i.css(f.elem,n)),o=1,h=20;if(u&&u[3]!==e){e=e||u[3];r=r||[];u=+s||1;do o=o||".5",u/=o,i.style(f.elem,n,u+e);while(o!==(o=f.cur()/s)&&1!==o&&--h)}return r&&(u=f.start=+u||+s||0,f.unit=e,f.end=r[1]?u+(r[1]+1)*r[2]:+r[2]),f}]};i.Animation=i.extend(rf,{tweener:function(n,t){i.isFunction(n)?(t=n,n=["*"]):n=n.split(" ");for(var r,u=0,f=n.length;f>u;u++)r=n[u],st[r]=st[r]||[],st[r].unshift(t)},prefilter:function(n,t){t?bt.unshift(n):bt.push(n)}});i.speed=function(n,t,r){var u=n&&"object"==typeof n?i.extend({},n):{complete:r||!r&&t||i.isFunction(n)&&n,duration:n,easing:r&&t||t&&!i.isFunction(t)&&t};return u.duration=i.fx.off?0:"number"==typeof u.duration?u.duration:u.duration in i.fx.speeds?i.fx.speeds[u.duration]:i.fx.speeds._default,(null==u.queue||u.queue===!0)&&(u.queue="fx"),u.old=u.complete,u.complete=function(){i.isFunction(u.old)&&u.old.call(this);u.queue&&i.dequeue(this,u.queue)},u};i.fn.extend({fadeTo:function(n,t,i,r){return this.filter(et).css("opacity",0).show().end().animate({opacity:t},n,i,r)},animate:function(n,t,r,u){var o=i.isEmptyObject(n),e=i.speed(t,r,u),f=function(){var t=rf(this,i.extend({},n),e);(o||i._data(this,"finish"))&&t.stop(!0)};return f.finish=f,o||e.queue===!1?this.each(f):this.queue(e.queue,f)},stop:function(n,t,r){var u=function(n){var t=n.stop;delete n.stop;t(r)};return"string"!=typeof n&&(r=t,t=n,n=void 0),t&&n!==!1&&this.queue(n||"fx",[]),this.each(function(){var o=!0,t=null!=n&&n+"queueHooks",e=i.timers,f=i._data(this);if(t)f[t]&&f[t].stop&&u(f[t]);else for(t in f)f[t]&&f[t].stop&&uo.test(t)&&u(f[t]);for(t=e.length;t--;)e[t].elem!==this||null!=n&&e[t].queue!==n||(e[t].anim.stop(r),o=!1,e.splice(t,1));(o||!r)&&i.dequeue(this,n)})},finish:function(n){return n!==!1&&(n=n||"fx"),this.each(function(){var t,f=i._data(this),r=f[n+"queue"],e=f[n+"queueHooks"],u=i.timers,o=r?r.length:0;for(f.finish=!0,i.queue(this,n,[]),e&&e.stop&&e.stop.call(this,!0),t=u.length;t--;)u[t].elem===this&&u[t].queue===n&&(u[t].anim.stop(!0),u.splice(t,1));for(t=0;o>t;t++)r[t]&&r[t].finish&&r[t].finish.call(this);delete f.finish})}});i.each(["toggle","show","hide"],function(n,t){var r=i.fn[t];i.fn[t]=function(n,i,u){return null==n||"boolean"==typeof n?r.apply(this,arguments):this.animate(kt(t,!0),n,i,u)}});i.each({slideDown:kt("show"),slideUp:kt("hide"),slideToggle:kt("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(n,t){i.fn[n]=function(n,i,r){return this.animate(t,n,i,r)}});i.timers=[];i.fx.tick=function(){var r,n=i.timers,t=0;for(rt=i.now();t<n.length;t++)r=n[t],r()||n[t]!==r||n.splice(t--,1);n.length||i.fx.stop();rt=void 0};i.fx.timer=function(n){i.timers.push(n);n()?i.fx.start():i.timers.pop()};i.fx.interval=13;i.fx.start=function(){wt||(wt=setInterval(i.fx.tick,i.fx.interval))};i.fx.stop=function(){clearInterval(wt);wt=null};i.fx.speeds={slow:600,fast:200,_default:400};i.fn.delay=function(n,t){return n=i.fx?i.fx.speeds[n]||n:n,t=t||"fx",this.queue(t,function(t,i){var r=setTimeout(t,n);i.stop=function(){clearTimeout(r)}})},function(){var n,t,f,i,e;t=u.createElement("div");t.setAttribute("className","t");t.innerHTML="  <link/><table><\/table><a href='/a'>a<\/a><input type='checkbox'/>";i=t.getElementsByTagName("a")[0];f=u.createElement("select");e=f.appendChild(u.createElement("option"));n=t.getElementsByTagName("input")[0];i.style.cssText="top:1px";r.getSetAttribute="t"!==t.className;r.style=/top/.test(i.getAttribute("style"));r.hrefNormalized="/a"===i.getAttribute("href");r.checkOn=!!n.value;r.optSelected=e.selected;r.enctype=!!u.createElement("form").enctype;f.disabled=!0;r.optDisabled=!e.disabled;n=u.createElement("input");n.setAttribute("value","");r.input=""===n.getAttribute("value");n.value="t";n.setAttribute("type","radio");r.radioValue="t"===n.value}();uf=/\r/g;i.fn.extend({val:function(n){var t,r,f,u=this[0];return arguments.length?(f=i.isFunction(n),this.each(function(r){var u;1===this.nodeType&&(u=f?n.call(this,r,i(this).val()):n,null==u?u="":"number"==typeof u?u+="":i.isArray(u)&&(u=i.map(u,function(n){return null==n?"":n+""})),t=i.valHooks[this.type]||i.valHooks[this.nodeName.toLowerCase()],t&&"set"in t&&void 0!==t.set(this,u,"value")||(this.value=u))})):u?(t=i.valHooks[u.type]||i.valHooks[u.nodeName.toLowerCase()],t&&"get"in t&&void 0!==(r=t.get(u,"value"))?r:(r=u.value,"string"==typeof r?r.replace(uf,""):null==r?"":r)):void 0}});i.extend({valHooks:{option:{get:function(n){var t=i.find.attr(n,"value");return null!=t?t:i.trim(i.text(n))}},select:{get:function(n){for(var o,t,s=n.options,u=n.selectedIndex,f="select-one"===n.type||0>u,h=f?null:[],c=f?u+1:s.length,e=0>u?c:f?u:0;c>e;e++)if(t=s[e],!(!t.selected&&e!==u||(r.optDisabled?t.disabled:null!==t.getAttribute("disabled"))||t.parentNode.disabled&&i.nodeName(t.parentNode,"optgroup"))){if(o=i(t).val(),f)return o;h.push(o)}return h},set:function(n,t){for(var f,r,u=n.options,o=i.makeArray(t),e=u.length;e--;)if(r=u[e],i.inArray(i.valHooks.option.get(r),o)>=0)try{r.selected=f=!0}catch(s){r.scrollHeight}else r.selected=!1;return f||(n.selectedIndex=-1),u}}}});i.each(["radio","checkbox"],function(){i.valHooks[this]={set:function(n,t){if(i.isArray(t))return n.checked=i.inArray(i(n).val(),t)>=0}};r.checkOn||(i.valHooks[this].get=function(n){return null===n.getAttribute("value")?"on":n.value})});var ut,ff,v=i.expr.attrHandle,yi=/^(?:checked|selected)$/i,g=r.getSetAttribute,dt=r.input;i.fn.extend({attr:function(n,t){return b(this,i.attr,n,t,arguments.length>1)},removeAttr:function(n){return this.each(function(){i.removeAttr(this,n)})}});i.extend({attr:function(n,t,r){var u,f,e=n.nodeType;if(n&&3!==e&&8!==e&&2!==e)return typeof n.getAttribute===o?i.prop(n,t,r):(1===e&&i.isXMLDoc(n)||(t=t.toLowerCase(),u=i.attrHooks[t]||(i.expr.match.bool.test(t)?ff:ut)),void 0===r?u&&"get"in u&&null!==(f=u.get(n,t))?f:(f=i.find.attr(n,t),null==f?void 0:f):null!==r?u&&"set"in u&&void 0!==(f=u.set(n,r,t))?f:(n.setAttribute(t,r+""),r):void i.removeAttr(n,t))},removeAttr:function(n,t){var r,u,e=0,f=t&&t.match(h);if(f&&1===n.nodeType)while(r=f[e++])u=i.propFix[r]||r,i.expr.match.bool.test(r)?dt&&g||!yi.test(r)?n[u]=!1:n[i.camelCase("default-"+r)]=n[u]=!1:i.attr(n,r,""),n.removeAttribute(g?r:u)},attrHooks:{type:{set:function(n,t){if(!r.radioValue&&"radio"===t&&i.nodeName(n,"input")){var u=n.value;return n.setAttribute("type",t),u&&(n.value=u),t}}}}});ff={set:function(n,t,r){return t===!1?i.removeAttr(n,r):dt&&g||!yi.test(r)?n.setAttribute(!g&&i.propFix[r]||r,r):n[i.camelCase("default-"+r)]=n[r]=!0,r}};i.each(i.expr.match.bool.source.match(/\w+/g),function(n,t){var r=v[t]||i.find.attr;v[t]=dt&&g||!yi.test(t)?function(n,t,i){var u,f;return i||(f=v[t],v[t]=u,u=null!=r(n,t,i)?t.toLowerCase():null,v[t]=f),u}:function(n,t,r){if(!r)return n[i.camelCase("default-"+t)]?t.toLowerCase():null}});dt&&g||(i.attrHooks.value={set:function(n,t,r){return i.nodeName(n,"input")?void(n.defaultValue=t):ut&&ut.set(n,t,r)}});g||(ut={set:function(n,t,i){var r=n.getAttributeNode(i);return r||n.setAttributeNode(r=n.ownerDocument.createAttribute(i)),r.value=t+="","value"===i||t===n.getAttribute(i)?t:void 0}},v.id=v.name=v.coords=function(n,t,i){var r;if(!i)return(r=n.getAttributeNode(t))&&""!==r.value?r.value:null},i.valHooks.button={get:function(n,t){var i=n.getAttributeNode(t);if(i&&i.specified)return i.value},set:ut.set},i.attrHooks.contenteditable={set:function(n,t,i){ut.set(n,""===t?!1:t,i)}},i.each(["width","height"],function(n,t){i.attrHooks[t]={set:function(n,i){if(""===i)return(n.setAttribute(t,"auto"),i)}}}));r.style||(i.attrHooks.style={get:function(n){return n.style.cssText||void 0},set:function(n,t){return n.style.cssText=t+""}});ef=/^(?:input|select|textarea|button|object)$/i;of=/^(?:a|area)$/i;i.fn.extend({prop:function(n,t){return b(this,i.prop,n,t,arguments.length>1)},removeProp:function(n){return n=i.propFix[n]||n,this.each(function(){try{this[n]=void 0;delete this[n]}catch(t){}})}});i.extend({propFix:{"for":"htmlFor","class":"className"},prop:function(n,t,r){var f,u,o,e=n.nodeType;if(n&&3!==e&&8!==e&&2!==e)return o=1!==e||!i.isXMLDoc(n),o&&(t=i.propFix[t]||t,u=i.propHooks[t]),void 0!==r?u&&"set"in u&&void 0!==(f=u.set(n,r,t))?f:n[t]=r:u&&"get"in u&&null!==(f=u.get(n,t))?f:n[t]},propHooks:{tabIndex:{get:function(n){var t=i.find.attr(n,"tabindex");return t?parseInt(t,10):ef.test(n.nodeName)||of.test(n.nodeName)&&n.href?0:-1}}}});r.hrefNormalized||i.each(["href","src"],function(n,t){i.propHooks[t]={get:function(n){return n.getAttribute(t,4)}}});r.optSelected||(i.propHooks.selected={get:function(n){var t=n.parentNode;return t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex),null}});i.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){i.propFix[this.toLowerCase()]=this});r.enctype||(i.propFix.enctype="encoding");gt=/[\t\r\n\f]/g;i.fn.extend({addClass:function(n){var o,t,r,u,s,f,e=0,c=this.length,l="string"==typeof n&&n;if(i.isFunction(n))return this.each(function(t){i(this).addClass(n.call(this,t,this.className))});if(l)for(o=(n||"").match(h)||[];c>e;e++)if(t=this[e],r=1===t.nodeType&&(t.className?(" "+t.className+" ").replace(gt," "):" ")){for(s=0;u=o[s++];)r.indexOf(" "+u+" ")<0&&(r+=u+" ");f=i.trim(r);t.className!==f&&(t.className=f)}return this},removeClass:function(n){var o,t,r,u,s,f,e=0,c=this.length,l=0===arguments.length||"string"==typeof n&&n;if(i.isFunction(n))return this.each(function(t){i(this).removeClass(n.call(this,t,this.className))});if(l)for(o=(n||"").match(h)||[];c>e;e++)if(t=this[e],r=1===t.nodeType&&(t.className?(" "+t.className+" ").replace(gt," "):"")){for(s=0;u=o[s++];)while(r.indexOf(" "+u+" ")>=0)r=r.replace(" "+u+" "," ");f=n?i.trim(r):"";t.className!==f&&(t.className=f)}return this},toggleClass:function(n,t){var r=typeof n;return"boolean"==typeof t&&"string"===r?t?this.addClass(n):this.removeClass(n):this.each(i.isFunction(n)?function(r){i(this).toggleClass(n.call(this,r,this.className,t),t)}:function(){if("string"===r)for(var t,f=0,u=i(this),e=n.match(h)||[];t=e[f++];)u.hasClass(t)?u.removeClass(t):u.addClass(t);else(r===o||"boolean"===r)&&(this.className&&i._data(this,"__className__",this.className),this.className=this.className||n===!1?"":i._data(this,"__className__")||"")})},hasClass:function(n){for(var i=" "+n+" ",t=0,r=this.length;r>t;t++)if(1===this[t].nodeType&&(" "+this[t].className+" ").replace(gt," ").indexOf(i)>=0)return!0;return!1}});i.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(n,t){i.fn[t]=function(n,i){return arguments.length>0?this.on(t,null,n,i):this.trigger(t)}});i.fn.extend({hover:function(n,t){return this.mouseenter(n).mouseleave(t||n)},bind:function(n,t,i){return this.on(n,null,t,i)},unbind:function(n,t){return this.off(n,null,t)},delegate:function(n,t,i,r){return this.on(t,n,i,r)},undelegate:function(n,t,i){return 1===arguments.length?this.off(n,"**"):this.off(t,n||"**",i)}});var pi=i.now(),wi=/\?/,oo=/(,)|(\[|{)|(}|])|"(?:[^"\\\r\n]|\\["\\\/bfnrt]|\\u[\da-fA-F]{4})*"\s*:?|true|false|null|-?(?!0\d)\d+(?:\.\d+|)(?:[eE][+-]?\d+|)/g;i.parseJSON=function(t){if(n.JSON&&n.JSON.parse)return n.JSON.parse(t+"");var f,r=null,u=i.trim(t+"");return u&&!i.trim(u.replace(oo,function(n,t,i,u){return f&&t&&(r=0),0===r?n:(f=i||t,r+=!u-!i,"")}))?Function("return "+u)():i.error("Invalid JSON: "+t)};i.parseXML=function(t){var r,u;if(!t||"string"!=typeof t)return null;try{n.DOMParser?(u=new DOMParser,r=u.parseFromString(t,"text/xml")):(r=new ActiveXObject("Microsoft.XMLDOM"),r.async="false",r.loadXML(t))}catch(f){r=void 0}return r&&r.documentElement&&!r.getElementsByTagName("parsererror").length||i.error("Invalid XML: "+t),r};var nt,y,so=/#.*$/,sf=/([?&])_=[^&]*/,ho=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,co=/^(?:GET|HEAD)$/,lo=/^\/\//,hf=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,cf={},bi={},lf="*/".concat("*");try{y=location.href}catch(ns){y=u.createElement("a");y.href="";y=y.href}nt=hf.exec(y.toLowerCase())||[];i.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:y,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(nt[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":lf,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":i.parseJSON,"text xml":i.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(n,t){return t?ki(ki(n,i.ajaxSettings),t):ki(i.ajaxSettings,n)},ajaxPrefilter:af(cf),ajaxTransport:af(bi),ajax:function(n,t){function w(n,t,s,h){var v,it,nt,y,w,c=t;2!==e&&(e=2,k&&clearTimeout(k),a=void 0,b=h||"",u.readyState=n>0?4:0,v=n>=200&&300>n||304===n,s&&(y=ao(r,u,s)),y=vo(r,y,u,v),v?(r.ifModified&&(w=u.getResponseHeader("Last-Modified"),w&&(i.lastModified[f]=w),w=u.getResponseHeader("etag"),w&&(i.etag[f]=w)),204===n||"HEAD"===r.type?c="nocontent":304===n?c="notmodified":(c=y.state,it=y.data,nt=y.error,v=!nt)):(nt=c,(n||!c)&&(c="error",0>n&&(n=0))),u.status=n,u.statusText=(t||c)+"",v?g.resolveWith(o,[it,c,u]):g.rejectWith(o,[u,c,nt]),u.statusCode(p),p=void 0,l&&d.trigger(v?"ajaxSuccess":"ajaxError",[u,r,v?it:nt]),tt.fireWith(o,[u,c]),l&&(d.trigger("ajaxComplete",[u,r]),--i.active||i.event.trigger("ajaxStop")))}"object"==typeof n&&(t=n,n=void 0);t=t||{};var s,c,f,b,k,l,a,v,r=i.ajaxSetup({},t),o=r.context||r,d=r.context&&(o.nodeType||o.jquery)?i(o):i.event,g=i.Deferred(),tt=i.Callbacks("once memory"),p=r.statusCode||{},it={},rt={},e=0,ut="canceled",u={readyState:0,getResponseHeader:function(n){var t;if(2===e){if(!v)for(v={};t=ho.exec(b);)v[t[1].toLowerCase()]=t[2];t=v[n.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return 2===e?b:null},setRequestHeader:function(n,t){var i=n.toLowerCase();return e||(n=rt[i]=rt[i]||n,it[n]=t),this},overrideMimeType:function(n){return e||(r.mimeType=n),this},statusCode:function(n){var t;if(n)if(2>e)for(t in n)p[t]=[p[t],n[t]];else u.always(n[u.status]);return this},abort:function(n){var t=n||ut;return a&&a.abort(t),w(0,t),this}};if(g.promise(u).complete=tt.add,u.success=u.done,u.error=u.fail,r.url=((n||r.url||y)+"").replace(so,"").replace(lo,nt[1]+"//"),r.type=t.method||t.type||r.method||r.type,r.dataTypes=i.trim(r.dataType||"*").toLowerCase().match(h)||[""],null==r.crossDomain&&(s=hf.exec(r.url.toLowerCase()),r.crossDomain=!(!s||s[1]===nt[1]&&s[2]===nt[2]&&(s[3]||("http:"===s[1]?"80":"443"))===(nt[3]||("http:"===nt[1]?"80":"443")))),r.data&&r.processData&&"string"!=typeof r.data&&(r.data=i.param(r.data,r.traditional)),vf(cf,r,t,u),2===e)return u;l=i.event&&r.global;l&&0==i.active++&&i.event.trigger("ajaxStart");r.type=r.type.toUpperCase();r.hasContent=!co.test(r.type);f=r.url;r.hasContent||(r.data&&(f=r.url+=(wi.test(f)?"&":"?")+r.data,delete r.data),r.cache===!1&&(r.url=sf.test(f)?f.replace(sf,"$1_="+pi++):f+(wi.test(f)?"&":"?")+"_="+pi++));r.ifModified&&(i.lastModified[f]&&u.setRequestHeader("If-Modified-Since",i.lastModified[f]),i.etag[f]&&u.setRequestHeader("If-None-Match",i.etag[f]));(r.data&&r.hasContent&&r.contentType!==!1||t.contentType)&&u.setRequestHeader("Content-Type",r.contentType);u.setRequestHeader("Accept",r.dataTypes[0]&&r.accepts[r.dataTypes[0]]?r.accepts[r.dataTypes[0]]+("*"!==r.dataTypes[0]?", "+lf+"; q=0.01":""):r.accepts["*"]);for(c in r.headers)u.setRequestHeader(c,r.headers[c]);if(r.beforeSend&&(r.beforeSend.call(o,u,r)===!1||2===e))return u.abort();ut="abort";for(c in{success:1,error:1,complete:1})u[c](r[c]);if(a=vf(bi,r,t,u)){u.readyState=1;l&&d.trigger("ajaxSend",[u,r]);r.async&&r.timeout>0&&(k=setTimeout(function(){u.abort("timeout")},r.timeout));try{e=1;a.send(it,w)}catch(ft){if(!(2>e))throw ft;w(-1,ft)}}else w(-1,"No Transport");return u},getJSON:function(n,t,r){return i.get(n,t,r,"json")},getScript:function(n,t){return i.get(n,void 0,t,"script")}});i.each(["get","post"],function(n,t){i[t]=function(n,r,u,f){return i.isFunction(r)&&(f=f||u,u=r,r=void 0),i.ajax({url:n,type:t,dataType:f,data:r,success:u})}});i._evalUrl=function(n){return i.ajax({url:n,type:"GET",dataType:"script",async:!1,global:!1,throws:!0})};i.fn.extend({wrapAll:function(n){if(i.isFunction(n))return this.each(function(t){i(this).wrapAll(n.call(this,t))});if(this[0]){var t=i(n,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&t.insertBefore(this[0]);t.map(function(){for(var n=this;n.firstChild&&1===n.firstChild.nodeType;)n=n.firstChild;return n}).append(this)}return this},wrapInner:function(n){return this.each(i.isFunction(n)?function(t){i(this).wrapInner(n.call(this,t))}:function(){var t=i(this),r=t.contents();r.length?r.wrapAll(n):t.append(n)})},wrap:function(n){var t=i.isFunction(n);return this.each(function(r){i(this).wrapAll(t?n.call(this,r):n)})},unwrap:function(){return this.parent().each(function(){i.nodeName(this,"body")||i(this).replaceWith(this.childNodes)}).end()}});i.expr.filters.hidden=function(n){return n.offsetWidth<=0&&n.offsetHeight<=0||!r.reliableHiddenOffsets()&&"none"===(n.style&&n.style.display||i.css(n,"display"))};i.expr.filters.visible=function(n){return!i.expr.filters.hidden(n)};var yo=/%20/g,po=/\[\]$/,yf=/\r?\n/g,wo=/^(?:submit|button|image|reset|file)$/i,bo=/^(?:input|select|textarea|keygen)/i;i.param=function(n,t){var r,u=[],f=function(n,t){t=i.isFunction(t)?t():null==t?"":t;u[u.length]=encodeURIComponent(n)+"="+encodeURIComponent(t)};if(void 0===t&&(t=i.ajaxSettings&&i.ajaxSettings.traditional),i.isArray(n)||n.jquery&&!i.isPlainObject(n))i.each(n,function(){f(this.name,this.value)});else for(r in n)di(r,n[r],t,f);return u.join("&").replace(yo,"+")};i.fn.extend({serialize:function(){return i.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var n=i.prop(this,"elements");return n?i.makeArray(n):this}).filter(function(){var n=this.type;return this.name&&!i(this).is(":disabled")&&bo.test(this.nodeName)&&!wo.test(n)&&(this.checked||!oi.test(n))}).map(function(n,t){var r=i(this).val();return null==r?null:i.isArray(r)?i.map(r,function(n){return{name:t.name,value:n.replace(yf,"\r\n")}}):{name:t.name,value:r.replace(yf,"\r\n")}}).get()}});i.ajaxSettings.xhr=void 0!==n.ActiveXObject?function(){return!this.isLocal&&/^(get|post|head|put|delete|options)$/i.test(this.type)&&pf()||go()}:pf;var ko=0,ni={},ht=i.ajaxSettings.xhr();return n.attachEvent&&n.attachEvent("onunload",function(){for(var n in ni)ni[n](void 0,!0)}),r.cors=!!ht&&"withCredentials"in ht,ht=r.ajax=!!ht,ht&&i.ajaxTransport(function(n){if(!n.crossDomain||r.cors){var t;return{send:function(r,u){var e,f=n.xhr(),o=++ko;if(f.open(n.type,n.url,n.async,n.username,n.password),n.xhrFields)for(e in n.xhrFields)f[e]=n.xhrFields[e];n.mimeType&&f.overrideMimeType&&f.overrideMimeType(n.mimeType);n.crossDomain||r["X-Requested-With"]||(r["X-Requested-With"]="XMLHttpRequest");for(e in r)void 0!==r[e]&&f.setRequestHeader(e,r[e]+"");f.send(n.hasContent&&n.data||null);t=function(r,e){var s,c,h;if(t&&(e||4===f.readyState))if(delete ni[o],t=void 0,f.onreadystatechange=i.noop,e)4!==f.readyState&&f.abort();else{h={};s=f.status;"string"==typeof f.responseText&&(h.text=f.responseText);try{c=f.statusText}catch(l){c=""}s||!n.isLocal||n.crossDomain?1223===s&&(s=204):s=h.text?200:404}h&&u(s,c,h,f.getAllResponseHeaders())};n.async?4===f.readyState?setTimeout(t):f.onreadystatechange=ni[o]=t:t()},abort:function(){t&&t(void 0,!0)}}}}),i.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(n){return i.globalEval(n),n}}}),i.ajaxPrefilter("script",function(n){void 0===n.cache&&(n.cache=!1);n.crossDomain&&(n.type="GET",n.global=!1)}),i.ajaxTransport("script",function(n){if(n.crossDomain){var t,r=u.head||i("head")[0]||u.documentElement;return{send:function(i,f){t=u.createElement("script");t.async=!0;n.scriptCharset&&(t.charset=n.scriptCharset);t.src=n.url;t.onload=t.onreadystatechange=function(n,i){(i||!t.readyState||/loaded|complete/.test(t.readyState))&&(t.onload=t.onreadystatechange=null,t.parentNode&&t.parentNode.removeChild(t),t=null,i||f(200,"success"))};r.insertBefore(t,r.firstChild)},abort:function(){t&&t.onload(void 0,!0)}}}}),gi=[],ti=/(=)\?(?=&|$)|\?\?/,i.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var n=gi.pop()||i.expando+"_"+pi++;return this[n]=!0,n}}),i.ajaxPrefilter("json jsonp",function(t,r,u){var f,o,e,s=t.jsonp!==!1&&(ti.test(t.url)?"url":"string"==typeof t.data&&!(t.contentType||"").indexOf("application/x-www-form-urlencoded")&&ti.test(t.data)&&"data");if(s||"jsonp"===t.dataTypes[0])return(f=t.jsonpCallback=i.isFunction(t.jsonpCallback)?t.jsonpCallback():t.jsonpCallback,s?t[s]=t[s].replace(ti,"$1"+f):t.jsonp!==!1&&(t.url+=(wi.test(t.url)?"&":"?")+t.jsonp+"="+f),t.converters["script json"]=function(){return e||i.error(f+" was not called"),e[0]},t.dataTypes[0]="json",o=n[f],n[f]=function(){e=arguments},u.always(function(){n[f]=o;t[f]&&(t.jsonpCallback=r.jsonpCallback,gi.push(f));e&&i.isFunction(o)&&o(e[0]);e=o=void 0}),"script")}),i.parseHTML=function(n,t,r){if(!n||"string"!=typeof n)return null;"boolean"==typeof t&&(r=t,t=!1);t=t||u;var f=er.exec(n),e=!r&&[];return f?[t.createElement(f[1])]:(f=i.buildFragment([n],t,e),e&&e.length&&i(e).remove(),i.merge([],f.childNodes))},nr=i.fn.load,i.fn.load=function(n,t,r){if("string"!=typeof n&&nr)return nr.apply(this,arguments);var u,o,s,f=this,e=n.indexOf(" ");return e>=0&&(u=i.trim(n.slice(e,n.length)),n=n.slice(0,e)),i.isFunction(t)?(r=t,t=void 0):t&&"object"==typeof t&&(s="POST"),f.length>0&&i.ajax({url:n,type:s,dataType:"html",data:t}).done(function(n){o=arguments;f.html(u?i("<div>").append(i.parseHTML(n)).find(u):n)}).complete(r&&function(n,t){f.each(r,o||[n.responseText,t,n])}),this},i.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(n,t){i.fn[t]=function(n){return this.on(t,n)}}),i.expr.filters.animated=function(n){return i.grep(i.timers,function(t){return n===t.elem}).length},tr=n.document.documentElement,i.offset={setOffset:function(n,t,r){var e,o,s,h,u,c,v,l=i.css(n,"position"),a=i(n),f={};"static"===l&&(n.style.position="relative");u=a.offset();s=i.css(n,"top");c=i.css(n,"left");v=("absolute"===l||"fixed"===l)&&i.inArray("auto",[s,c])>-1;v?(e=a.position(),h=e.top,o=e.left):(h=parseFloat(s)||0,o=parseFloat(c)||0);i.isFunction(t)&&(t=t.call(n,r,u));null!=t.top&&(f.top=t.top-u.top+h);null!=t.left&&(f.left=t.left-u.left+o);"using"in t?t.using.call(n,f):a.css(f)}},i.fn.extend({offset:function(n){if(arguments.length)return void 0===n?this:this.each(function(t){i.offset.setOffset(this,n,t)});var t,f,u={top:0,left:0},r=this[0],e=r&&r.ownerDocument;if(e)return t=e.documentElement,i.contains(t,r)?(typeof r.getBoundingClientRect!==o&&(u=r.getBoundingClientRect()),f=wf(e),{top:u.top+(f.pageYOffset||t.scrollTop)-(t.clientTop||0),left:u.left+(f.pageXOffset||t.scrollLeft)-(t.clientLeft||0)}):u},position:function(){if(this[0]){var n,r,t={top:0,left:0},u=this[0];return"fixed"===i.css(u,"position")?r=u.getBoundingClientRect():(n=this.offsetParent(),r=this.offset(),i.nodeName(n[0],"html")||(t=n.offset()),t.top+=i.css(n[0],"borderTopWidth",!0),t.left+=i.css(n[0],"borderLeftWidth",!0)),{top:r.top-t.top-i.css(u,"marginTop",!0),left:r.left-t.left-i.css(u,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var n=this.offsetParent||tr;n&&!i.nodeName(n,"html")&&"static"===i.css(n,"position");)n=n.offsetParent;return n||tr})}}),i.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(n,t){var r=/Y/.test(t);i.fn[n]=function(u){return b(this,function(n,u,f){var e=wf(n);return void 0===f?e?t in e?e[t]:e.document.documentElement[u]:n[u]:void(e?e.scrollTo(r?i(e).scrollLeft():f,r?f:i(e).scrollTop()):n[u]=f)},n,u,arguments.length,null)}}),i.each(["top","left"],function(n,t){i.cssHooks[t]=au(r.pixelPosition,function(n,r){if(r)return(r=d(n,t),pt.test(r)?i(n).position()[t]+"px":r)})}),i.each({Height:"height",Width:"width"},function(n,t){i.each({padding:"inner"+n,content:t,"":"outer"+n},function(r,u){i.fn[u]=function(u,f){var e=arguments.length&&(r||"boolean"!=typeof u),o=r||(u===!0||f===!0?"margin":"border");return b(this,function(t,r,u){var f;return i.isWindow(t)?t.document.documentElement["client"+n]:9===t.nodeType?(f=t.documentElement,Math.max(t.body["scroll"+n],f["scroll"+n],t.body["offset"+n],f["offset"+n],f["client"+n])):void 0===u?i.css(t,r,o):i.style(t,r,u,o)},t,e?u:void 0,e,null)}})}),i.fn.size=function(){return this.length},i.fn.andSelf=i.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],function(){return i}),bf=n.jQuery,kf=n.$,i.noConflict=function(t){return n.$===i&&(n.$=kf),t&&n.jQuery===i&&(n.jQuery=bf),i},typeof t===o&&(n.jQuery=n.$=i),i}),"undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");+function(n){"use strict";var t=n.fn.jquery.split(" ")[0].split(".");if(t[0]<2&&t[1]<9||1==t[0]&&9==t[1]&&t[2]<1)throw new Error("Bootstrap's JavaScript requires jQuery version 1.9.1 or higher");}(jQuery);+function(n){"use strict";function t(){var i=document.createElement("bootstrap"),n={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var t in n)if(void 0!==i.style[t])return{end:n[t]};return!1}n.fn.emulateTransitionEnd=function(t){var i=!1,u=this,r;n(this).one("bsTransitionEnd",function(){i=!0});return r=function(){i||n(u).trigger(n.support.transition.end)},setTimeout(r,t),this};n(function(){n.support.transition=t();n.support.transition&&(n.event.special.bsTransitionEnd={bindType:n.support.transition.end,delegateType:n.support.transition.end,handle:function(t){if(n(t.target).is(this))return t.handleObj.handler.apply(this,arguments)}})})}(jQuery);+function(n){"use strict";function u(i){return this.each(function(){var r=n(this),u=r.data("bs.alert");u||r.data("bs.alert",u=new t(this));"string"==typeof i&&u[i].call(r)})}var i='[data-dismiss="alert"]',t=function(t){n(t).on("click",i,this.close)},r;t.VERSION="3.3.5";t.TRANSITION_DURATION=150;t.prototype.close=function(i){function e(){r.detach().trigger("closed.bs.alert").remove()}var f=n(this),u=f.attr("data-target"),r;u||(u=f.attr("href"),u=u&&u.replace(/.*(?=#[^\s]*$)/,""));r=n(u);i&&i.preventDefault();r.length||(r=f.closest(".alert"));r.trigger(i=n.Event("close.bs.alert"));i.isDefaultPrevented()||(r.removeClass("in"),n.support.transition&&r.hasClass("fade")?r.one("bsTransitionEnd",e).emulateTransitionEnd(t.TRANSITION_DURATION):e())};r=n.fn.alert;n.fn.alert=u;n.fn.alert.Constructor=t;n.fn.alert.noConflict=function(){return n.fn.alert=r,this};n(document).on("click.bs.alert.data-api",i,t.prototype.close)}(jQuery);+function(n){"use strict";function i(i){return this.each(function(){var u=n(this),r=u.data("bs.button"),f="object"==typeof i&&i;r||u.data("bs.button",r=new t(this,f));"toggle"==i?r.toggle():i&&r.setState(i)})}var t=function(i,r){this.$element=n(i);this.options=n.extend({},t.DEFAULTS,r);this.isLoading=!1},r;t.VERSION="3.3.5";t.DEFAULTS={loadingText:"loading..."};t.prototype.setState=function(t){var r="disabled",i=this.$element,f=i.is("input")?"val":"html",u=i.data();t+="Text";null==u.resetText&&i.data("resetText",i[f]());setTimeout(n.proxy(function(){i[f](null==u[t]?this.options[t]:u[t]);"loadingText"==t?(this.isLoading=!0,i.addClass(r).attr(r,r)):this.isLoading&&(this.isLoading=!1,i.removeClass(r).removeAttr(r))},this),0)};t.prototype.toggle=function(){var t=!0,i=this.$element.closest('[data-toggle="buttons"]'),n;i.length?(n=this.$element.find("input"),"radio"==n.prop("type")?(n.prop("checked")&&(t=!1),i.find(".active").removeClass("active"),this.$element.addClass("active")):"checkbox"==n.prop("type")&&(n.prop("checked")!==this.$element.hasClass("active")&&(t=!1),this.$element.toggleClass("active")),n.prop("checked",this.$element.hasClass("active")),t&&n.trigger("change")):(this.$element.attr("aria-pressed",!this.$element.hasClass("active")),this.$element.toggleClass("active"))};r=n.fn.button;n.fn.button=i;n.fn.button.Constructor=t;n.fn.button.noConflict=function(){return n.fn.button=r,this};n(document).on("click.bs.button.data-api",'[data-toggle^="button"]',function(t){var r=n(t.target);r.hasClass("btn")||(r=r.closest(".btn"));i.call(r,"toggle");n(t.target).is('input[type="radio"]')||n(t.target).is('input[type="checkbox"]')||t.preventDefault()}).on("focus.bs.button.data-api blur.bs.button.data-api",'[data-toggle^="button"]',function(t){n(t.target).closest(".btn").toggleClass("focus",/^focus(in)?$/.test(t.type))})}(jQuery);+function(n){"use strict";function i(i){return this.each(function(){var u=n(this),r=u.data("bs.carousel"),f=n.extend({},t.DEFAULTS,u.data(),"object"==typeof i&&i),e="string"==typeof i?i:f.slide;r||u.data("bs.carousel",r=new t(this,f));"number"==typeof i?r.to(i):e?r[e]():f.interval&&r.pause().cycle()})}var t=function(t,i){this.$element=n(t);this.$indicators=this.$element.find(".carousel-indicators");this.options=i;this.paused=null;this.sliding=null;this.interval=null;this.$active=null;this.$items=null;this.options.keyboard&&this.$element.on("keydown.bs.carousel",n.proxy(this.keydown,this));"hover"==this.options.pause&&!("ontouchstart"in document.documentElement)&&this.$element.on("mouseenter.bs.carousel",n.proxy(this.pause,this)).on("mouseleave.bs.carousel",n.proxy(this.cycle,this))},u,r;t.VERSION="3.3.5";t.TRANSITION_DURATION=600;t.DEFAULTS={interval:5e3,pause:"hover",wrap:!0,keyboard:!0};t.prototype.keydown=function(n){if(!/input|textarea/i.test(n.target.tagName)){switch(n.which){case 37:this.prev();break;case 39:this.next();break;default:return}n.preventDefault()}};t.prototype.cycle=function(t){return t||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(n.proxy(this.next,this),this.options.interval)),this};t.prototype.getItemIndex=function(n){return this.$items=n.parent().children(".item"),this.$items.index(n||this.$active)};t.prototype.getItemForDirection=function(n,t){var i=this.getItemIndex(t),f="prev"==n&&0===i||"next"==n&&i==this.$items.length-1,r,u;return f&&!this.options.wrap?t:(r="prev"==n?-1:1,u=(i+r)%this.$items.length,this.$items.eq(u))};t.prototype.to=function(n){var i=this,t=this.getItemIndex(this.$active=this.$element.find(".item.active"));if(!(n>this.$items.length-1)&&!(0>n))return this.sliding?this.$element.one("slid.bs.carousel",function(){i.to(n)}):t==n?this.pause().cycle():this.slide(n>t?"next":"prev",this.$items.eq(n))};t.prototype.pause=function(t){return t||(this.paused=!0),this.$element.find(".next, .prev").length&&n.support.transition&&(this.$element.trigger(n.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this};t.prototype.next=function(){if(!this.sliding)return this.slide("next")};t.prototype.prev=function(){if(!this.sliding)return this.slide("prev")};t.prototype.slide=function(i,r){var e=this.$element.find(".item.active"),u=r||this.getItemForDirection(i,e),l=this.interval,f="next"==i?"left":"right",a=this,o,s,h,c;return u.hasClass("active")?this.sliding=!1:(o=u[0],s=n.Event("slide.bs.carousel",{relatedTarget:o,direction:f}),(this.$element.trigger(s),!s.isDefaultPrevented())?((this.sliding=!0,l&&this.pause(),this.$indicators.length)&&(this.$indicators.find(".active").removeClass("active"),h=n(this.$indicators.children()[this.getItemIndex(u)]),h&&h.addClass("active")),c=n.Event("slid.bs.carousel",{relatedTarget:o,direction:f}),n.support.transition&&this.$element.hasClass("slide")?(u.addClass(i),u[0].offsetWidth,e.addClass(f),u.addClass(f),e.one("bsTransitionEnd",function(){u.removeClass([i,f].join(" ")).addClass("active");e.removeClass(["active",f].join(" "));a.sliding=!1;setTimeout(function(){a.$element.trigger(c)},0)}).emulateTransitionEnd(t.TRANSITION_DURATION)):(e.removeClass("active"),u.addClass("active"),this.sliding=!1,this.$element.trigger(c)),l&&this.cycle(),this):void 0)};u=n.fn.carousel;n.fn.carousel=i;n.fn.carousel.Constructor=t;n.fn.carousel.noConflict=function(){return n.fn.carousel=u,this};r=function(t){var o,r=n(this),u=n(r.attr("data-target")||(o=r.attr("href"))&&o.replace(/.*(?=#[^\s]+$)/,"")),e,f;u.hasClass("carousel")&&(e=n.extend({},u.data(),r.data()),f=r.attr("data-slide-to"),f&&(e.interval=!1),i.call(u,e),f&&u.data("bs.carousel").to(f),t.preventDefault())};n(document).on("click.bs.carousel.data-api","[data-slide]",r).on("click.bs.carousel.data-api","[data-slide-to]",r);n(window).on("load",function(){n('[data-ride="carousel"]').each(function(){var t=n(this);i.call(t,t.data())})})}(jQuery);+function(n){"use strict";function r(t){var i,r=t.attr("data-target")||(i=t.attr("href"))&&i.replace(/.*(?=#[^\s]+$)/,"");return n(r)}function i(i){return this.each(function(){var u=n(this),r=u.data("bs.collapse"),f=n.extend({},t.DEFAULTS,u.data(),"object"==typeof i&&i);!r&&f.toggle&&/show|hide/.test(i)&&(f.toggle=!1);r||u.data("bs.collapse",r=new t(this,f));"string"==typeof i&&r[i]()})}var t=function(i,r){this.$element=n(i);this.options=n.extend({},t.DEFAULTS,r);this.$trigger=n('[data-toggle="collapse"][href="#'+i.id+'"],[data-toggle="collapse"][data-target="#'+i.id+'"]');this.transitioning=null;this.options.parent?this.$parent=this.getParent():this.addAriaAndCollapsedClass(this.$element,this.$trigger);this.options.toggle&&this.toggle()},u;t.VERSION="3.3.5";t.TRANSITION_DURATION=350;t.DEFAULTS={toggle:!0};t.prototype.dimension=function(){var n=this.$element.hasClass("width");return n?"width":"height"};t.prototype.show=function(){var f,r,e,u,o,s;if(!this.transitioning&&!this.$element.hasClass("in")&&(r=this.$parent&&this.$parent.children(".panel").children(".in, .collapsing"),!(r&&r.length&&(f=r.data("bs.collapse"),f&&f.transitioning))&&(e=n.Event("show.bs.collapse"),this.$element.trigger(e),!e.isDefaultPrevented()))){if(r&&r.length&&(i.call(r,"hide"),f||r.data("bs.collapse",null)),u=this.dimension(),this.$element.removeClass("collapse").addClass("collapsing")[u](0).attr("aria-expanded",!0),this.$trigger.removeClass("collapsed").attr("aria-expanded",!0),this.transitioning=1,o=function(){this.$element.removeClass("collapsing").addClass("collapse in")[u]("");this.transitioning=0;this.$element.trigger("shown.bs.collapse")},!n.support.transition)return o.call(this);s=n.camelCase(["scroll",u].join("-"));this.$element.one("bsTransitionEnd",n.proxy(o,this)).emulateTransitionEnd(t.TRANSITION_DURATION)[u](this.$element[0][s])}};t.prototype.hide=function(){var r,i,u;if(!this.transitioning&&this.$element.hasClass("in")&&(r=n.Event("hide.bs.collapse"),this.$element.trigger(r),!r.isDefaultPrevented()))return i=this.dimension(),this.$element[i](this.$element[i]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse in").attr("aria-expanded",!1),this.$trigger.addClass("collapsed").attr("aria-expanded",!1),this.transitioning=1,u=function(){this.transitioning=0;this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")},n.support.transition?void this.$element[i](0).one("bsTransitionEnd",n.proxy(u,this)).emulateTransitionEnd(t.TRANSITION_DURATION):u.call(this)};t.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()};t.prototype.getParent=function(){return n(this.options.parent).find('[data-toggle="collapse"][data-parent="'+this.options.parent+'"]').each(n.proxy(function(t,i){var u=n(i);this.addAriaAndCollapsedClass(r(u),u)},this)).end()};t.prototype.addAriaAndCollapsedClass=function(n,t){var i=n.hasClass("in");n.attr("aria-expanded",i);t.toggleClass("collapsed",!i).attr("aria-expanded",i)};u=n.fn.collapse;n.fn.collapse=i;n.fn.collapse.Constructor=t;n.fn.collapse.noConflict=function(){return n.fn.collapse=u,this};n(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',function(t){var u=n(this);u.attr("data-target")||t.preventDefault();var f=r(u),e=f.data("bs.collapse"),o=e?"toggle":u.data();i.call(f,o)})}(jQuery);+function(n){"use strict";function r(t){var i=t.attr("data-target"),r;return i||(i=t.attr("href"),i=i&&/#[A-Za-z]/.test(i)&&i.replace(/.*(?=#[^\s]*$)/,"")),r=i&&n(i),r&&r.length?r:t.parent()}function u(t){t&&3===t.which||(n(o).remove(),n(i).each(function(){var u=n(this),i=r(u),f={relatedTarget:this};i.hasClass("open")&&(t&&"click"==t.type&&/input|textarea/i.test(t.target.tagName)&&n.contains(i[0],t.target)||(i.trigger(t=n.Event("hide.bs.dropdown",f)),t.isDefaultPrevented()||(u.attr("aria-expanded","false"),i.removeClass("open").trigger("hidden.bs.dropdown",f))))}))}function e(i){return this.each(function(){var r=n(this),u=r.data("bs.dropdown");u||r.data("bs.dropdown",u=new t(this));"string"==typeof i&&u[i].call(r)})}var o=".dropdown-backdrop",i='[data-toggle="dropdown"]',t=function(t){n(t).on("click.bs.dropdown",this.toggle)},f;t.VERSION="3.3.5";t.prototype.toggle=function(t){var f=n(this),i,o,e;if(!f.is(".disabled, :disabled")){if(i=r(f),o=i.hasClass("open"),u(),!o){if("ontouchstart"in document.documentElement&&!i.closest(".navbar-nav").length&&n(document.createElement("div")).addClass("dropdown-backdrop").insertAfter(n(this)).on("click",u),e={relatedTarget:this},i.trigger(t=n.Event("show.bs.dropdown",e)),t.isDefaultPrevented())return;f.trigger("focus").attr("aria-expanded","true");i.toggleClass("open").trigger("shown.bs.dropdown",e)}return!1}};t.prototype.keydown=function(t){var e,o,s,h,f,u;if(/(38|40|27|32)/.test(t.which)&&!/input|textarea/i.test(t.target.tagName)&&(e=n(this),t.preventDefault(),t.stopPropagation(),!e.is(".disabled, :disabled"))){if(o=r(e),s=o.hasClass("open"),!s&&27!=t.which||s&&27==t.which)return 27==t.which&&o.find(i).trigger("focus"),e.trigger("click");h=" li:not(.disabled):visible a";f=o.find(".dropdown-menu"+h);f.length&&(u=f.index(t.target),38==t.which&&u>0&&u--,40==t.which&&u<f.length-1&&u++,~u||(u=0),f.eq(u).trigger("focus"))}};f=n.fn.dropdown;n.fn.dropdown=e;n.fn.dropdown.Constructor=t;n.fn.dropdown.noConflict=function(){return n.fn.dropdown=f,this};n(document).on("click.bs.dropdown.data-api",u).on("click.bs.dropdown.data-api",".dropdown form",function(n){n.stopPropagation()}).on("click.bs.dropdown.data-api",i,t.prototype.toggle).on("keydown.bs.dropdown.data-api",i,t.prototype.keydown).on("keydown.bs.dropdown.data-api",".dropdown-menu",t.prototype.keydown)}(jQuery);+function(n){"use strict";function i(i,r){return this.each(function(){var f=n(this),u=f.data("bs.modal"),e=n.extend({},t.DEFAULTS,f.data(),"object"==typeof i&&i);u||f.data("bs.modal",u=new t(this,e));"string"==typeof i?u[i](r):e.show&&u.show(r)})}var t=function(t,i){this.options=i;this.$body=n(document.body);this.$element=n(t);this.$dialog=this.$element.find(".modal-dialog");this.$backdrop=null;this.isShown=null;this.originalBodyPad=null;this.scrollbarWidth=0;this.ignoreBackdropClick=!1;this.options.remote&&this.$element.find(".modal-content").load(this.options.remote,n.proxy(function(){this.$element.trigger("loaded.bs.modal")},this))},r;t.VERSION="3.3.5";t.TRANSITION_DURATION=300;t.BACKDROP_TRANSITION_DURATION=150;t.DEFAULTS={backdrop:!0,keyboard:!0,show:!0};t.prototype.toggle=function(n){return this.isShown?this.hide():this.show(n)};t.prototype.show=function(i){var r=this,u=n.Event("show.bs.modal",{relatedTarget:i});this.$element.trigger(u);this.isShown||u.isDefaultPrevented()||(this.isShown=!0,this.checkScrollbar(),this.setScrollbar(),this.$body.addClass("modal-open"),this.escape(),this.resize(),this.$element.on("click.dismiss.bs.modal",'[data-dismiss="modal"]',n.proxy(this.hide,this)),this.$dialog.on("mousedown.dismiss.bs.modal",function(){r.$element.one("mouseup.dismiss.bs.modal",function(t){n(t.target).is(r.$element)&&(r.ignoreBackdropClick=!0)})}),this.backdrop(function(){var f=n.support.transition&&r.$element.hasClass("fade"),u;r.$element.parent().length||r.$element.appendTo(r.$body);r.$element.show().scrollTop(0);r.adjustDialog();f&&r.$element[0].offsetWidth;r.$element.addClass("in");r.enforceFocus();u=n.Event("shown.bs.modal",{relatedTarget:i});f?r.$dialog.one("bsTransitionEnd",function(){r.$element.trigger("focus").trigger(u)}).emulateTransitionEnd(t.TRANSITION_DURATION):r.$element.trigger("focus").trigger(u)}))};t.prototype.hide=function(i){i&&i.preventDefault();i=n.Event("hide.bs.modal");this.$element.trigger(i);this.isShown&&!i.isDefaultPrevented()&&(this.isShown=!1,this.escape(),this.resize(),n(document).off("focusin.bs.modal"),this.$element.removeClass("in").off("click.dismiss.bs.modal").off("mouseup.dismiss.bs.modal"),this.$dialog.off("mousedown.dismiss.bs.modal"),n.support.transition&&this.$element.hasClass("fade")?this.$element.one("bsTransitionEnd",n.proxy(this.hideModal,this)).emulateTransitionEnd(t.TRANSITION_DURATION):this.hideModal())};t.prototype.enforceFocus=function(){n(document).off("focusin.bs.modal").on("focusin.bs.modal",n.proxy(function(n){this.$element[0]===n.target||this.$element.has(n.target).length||this.$element.trigger("focus")},this))};t.prototype.escape=function(){this.isShown&&this.options.keyboard?this.$element.on("keydown.dismiss.bs.modal",n.proxy(function(n){27==n.which&&this.hide()},this)):this.isShown||this.$element.off("keydown.dismiss.bs.modal")};t.prototype.resize=function(){this.isShown?n(window).on("resize.bs.modal",n.proxy(this.handleUpdate,this)):n(window).off("resize.bs.modal")};t.prototype.hideModal=function(){var n=this;this.$element.hide();this.backdrop(function(){n.$body.removeClass("modal-open");n.resetAdjustments();n.resetScrollbar();n.$element.trigger("hidden.bs.modal")})};t.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove();this.$backdrop=null};t.prototype.backdrop=function(i){var e=this,f=this.$element.hasClass("fade")?"fade":"",r,u;if(this.isShown&&this.options.backdrop){if(r=n.support.transition&&f,this.$backdrop=n(document.createElement("div")).addClass("modal-backdrop "+f).appendTo(this.$body),this.$element.on("click.dismiss.bs.modal",n.proxy(function(n){return this.ignoreBackdropClick?void(this.ignoreBackdropClick=!1):void(n.target===n.currentTarget&&("static"==this.options.backdrop?this.$element[0].focus():this.hide()))},this)),r&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),!i)return;r?this.$backdrop.one("bsTransitionEnd",i).emulateTransitionEnd(t.BACKDROP_TRANSITION_DURATION):i()}else!this.isShown&&this.$backdrop?(this.$backdrop.removeClass("in"),u=function(){e.removeBackdrop();i&&i()},n.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one("bsTransitionEnd",u).emulateTransitionEnd(t.BACKDROP_TRANSITION_DURATION):u()):i&&i()};t.prototype.handleUpdate=function(){this.adjustDialog()};t.prototype.adjustDialog=function(){var n=this.$element[0].scrollHeight>document.documentElement.clientHeight;this.$element.css({paddingLeft:!this.bodyIsOverflowing&&n?this.scrollbarWidth:"",paddingRight:this.bodyIsOverflowing&&!n?this.scrollbarWidth:""})};t.prototype.resetAdjustments=function(){this.$element.css({paddingLeft:"",paddingRight:""})};t.prototype.checkScrollbar=function(){var n=window.innerWidth,t;n||(t=document.documentElement.getBoundingClientRect(),n=t.right-Math.abs(t.left));this.bodyIsOverflowing=document.body.clientWidth<n;this.scrollbarWidth=this.measureScrollbar()};t.prototype.setScrollbar=function(){var n=parseInt(this.$body.css("padding-right")||0,10);this.originalBodyPad=document.body.style.paddingRight||"";this.bodyIsOverflowing&&this.$body.css("padding-right",n+this.scrollbarWidth)};t.prototype.resetScrollbar=function(){this.$body.css("padding-right",this.originalBodyPad)};t.prototype.measureScrollbar=function(){var n=document.createElement("div"),t;return n.className="modal-scrollbar-measure",this.$body.append(n),t=n.offsetWidth-n.clientWidth,this.$body[0].removeChild(n),t};r=n.fn.modal;n.fn.modal=i;n.fn.modal.Constructor=t;n.fn.modal.noConflict=function(){return n.fn.modal=r,this};n(document).on("click.bs.modal.data-api",'[data-toggle="modal"]',function(t){var r=n(this),f=r.attr("href"),u=n(r.attr("data-target")||f&&f.replace(/.*(?=#[^\s]+$)/,"")),e=u.data("bs.modal")?"toggle":n.extend({remote:!/#/.test(f)&&f},u.data(),r.data());r.is("a")&&t.preventDefault();u.one("show.bs.modal",function(n){n.isDefaultPrevented()||u.one("hidden.bs.modal",function(){r.is(":visible")&&r.trigger("focus")})});i.call(u,e,this)})}(jQuery);+function(n){"use strict";function r(i){return this.each(function(){var u=n(this),r=u.data("bs.tooltip"),f="object"==typeof i&&i;(r||!/destroy|hide/.test(i))&&(r||u.data("bs.tooltip",r=new t(this,f)),"string"==typeof i&&r[i]())})}var t=function(n,t){this.type=null;this.options=null;this.enabled=null;this.timeout=null;this.hoverState=null;this.$element=null;this.inState=null;this.init("tooltip",n,t)},i;t.VERSION="3.3.5";t.TRANSITION_DURATION=150;t.DEFAULTS={animation:!0,placement:"top",selector:!1,template:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"><\/div><div class="tooltip-inner"><\/div><\/div>',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0}};t.prototype.init=function(t,i,r){var f,e,u,o,s;if(this.enabled=!0,this.type=t,this.$element=n(i),this.options=this.getOptions(r),this.$viewport=this.options.viewport&&n(n.isFunction(this.options.viewport)?this.options.viewport.call(this,this.$element):this.options.viewport.selector||this.options.viewport),this.inState={click:!1,hover:!1,focus:!1},this.$element[0]instanceof document.constructor&&!this.options.selector)throw new Error("`selector` option must be specified when initializing "+this.type+" on the window.document object!");for(f=this.options.trigger.split(" "),e=f.length;e--;)if(u=f[e],"click"==u)this.$element.on("click."+this.type,this.options.selector,n.proxy(this.toggle,this));else"manual"!=u&&(o="hover"==u?"mouseenter":"focusin",s="hover"==u?"mouseleave":"focusout",this.$element.on(o+"."+this.type,this.options.selector,n.proxy(this.enter,this)),this.$element.on(s+"."+this.type,this.options.selector,n.proxy(this.leave,this)));this.options.selector?this._options=n.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()};t.prototype.getDefaults=function(){return t.DEFAULTS};t.prototype.getOptions=function(t){return t=n.extend({},this.getDefaults(),this.$element.data(),t),t.delay&&"number"==typeof t.delay&&(t.delay={show:t.delay,hide:t.delay}),t};t.prototype.getDelegateOptions=function(){var t={},i=this.getDefaults();return this._options&&n.each(this._options,function(n,r){i[n]!=r&&(t[n]=r)}),t};t.prototype.enter=function(t){var i=t instanceof this.constructor?t:n(t.currentTarget).data("bs."+this.type);return i||(i=new this.constructor(t.currentTarget,this.getDelegateOptions()),n(t.currentTarget).data("bs."+this.type,i)),t instanceof n.Event&&(i.inState["focusin"==t.type?"focus":"hover"]=!0),i.tip().hasClass("in")||"in"==i.hoverState?void(i.hoverState="in"):(clearTimeout(i.timeout),i.hoverState="in",i.options.delay&&i.options.delay.show?void(i.timeout=setTimeout(function(){"in"==i.hoverState&&i.show()},i.options.delay.show)):i.show())};t.prototype.isInStateTrue=function(){for(var n in this.inState)if(this.inState[n])return!0;return!1};t.prototype.leave=function(t){var i=t instanceof this.constructor?t:n(t.currentTarget).data("bs."+this.type);return i||(i=new this.constructor(t.currentTarget,this.getDelegateOptions()),n(t.currentTarget).data("bs."+this.type,i)),t instanceof n.Event&&(i.inState["focusout"==t.type?"focus":"hover"]=!1),i.isInStateTrue()?void 0:(clearTimeout(i.timeout),i.hoverState="out",i.options.delay&&i.options.delay.hide?void(i.timeout=setTimeout(function(){"out"==i.hoverState&&i.hide()},i.options.delay.hide)):i.hide())};t.prototype.show=function(){var c=n.Event("show.bs."+this.type),l,p,e,w,h;if(this.hasContent()&&this.enabled){if(this.$element.trigger(c),l=n.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]),c.isDefaultPrevented()||!l)return;var u=this,r=this.tip(),a=this.getUID(this.type);this.setContent();r.attr("id",a);this.$element.attr("aria-describedby",a);this.options.animation&&r.addClass("fade");var i="function"==typeof this.options.placement?this.options.placement.call(this,r[0],this.$element[0]):this.options.placement,v=/\s?auto?\s?/i,y=v.test(i);y&&(i=i.replace(v,"")||"top");r.detach().css({top:0,left:0,display:"block"}).addClass(i).data("bs."+this.type,this);this.options.container?r.appendTo(this.options.container):r.insertAfter(this.$element);this.$element.trigger("inserted.bs."+this.type);var f=this.getPosition(),o=r[0].offsetWidth,s=r[0].offsetHeight;y&&(p=i,e=this.getPosition(this.$viewport),i="bottom"==i&&f.bottom+s>e.bottom?"top":"top"==i&&f.top-s<e.top?"bottom":"right"==i&&f.right+o>e.width?"left":"left"==i&&f.left-o<e.left?"right":i,r.removeClass(p).addClass(i));w=this.getCalculatedOffset(i,f,o,s);this.applyPlacement(w,i);h=function(){var n=u.hoverState;u.$element.trigger("shown.bs."+u.type);u.hoverState=null;"out"==n&&u.leave(u)};n.support.transition&&this.$tip.hasClass("fade")?r.one("bsTransitionEnd",h).emulateTransitionEnd(t.TRANSITION_DURATION):h()}};t.prototype.applyPlacement=function(t,i){var r=this.tip(),l=r[0].offsetWidth,e=r[0].offsetHeight,o=parseInt(r.css("margin-top"),10),s=parseInt(r.css("margin-left"),10),h,f,u;isNaN(o)&&(o=0);isNaN(s)&&(s=0);t.top+=o;t.left+=s;n.offset.setOffset(r[0],n.extend({using:function(n){r.css({top:Math.round(n.top),left:Math.round(n.left)})}},t),0);r.addClass("in");h=r[0].offsetWidth;f=r[0].offsetHeight;"top"==i&&f!=e&&(t.top=t.top+e-f);u=this.getViewportAdjustedDelta(i,t,h,f);u.left?t.left+=u.left:t.top+=u.top;var c=/top|bottom/.test(i),a=c?2*u.left-l+h:2*u.top-e+f,v=c?"offsetWidth":"offsetHeight";r.offset(t);this.replaceArrow(a,r[0][v],c)};t.prototype.replaceArrow=function(n,t,i){this.arrow().css(i?"left":"top",50*(1-n/t)+"%").css(i?"top":"left","")};t.prototype.setContent=function(){var n=this.tip(),t=this.getTitle();n.find(".tooltip-inner")[this.options.html?"html":"text"](t);n.removeClass("fade in top bottom left right")};t.prototype.hide=function(i){function f(){"in"!=u.hoverState&&r.detach();u.$element.removeAttr("aria-describedby").trigger("hidden.bs."+u.type);i&&i()}var u=this,r=n(this.$tip),e=n.Event("hide.bs."+this.type);return this.$element.trigger(e),e.isDefaultPrevented()?void 0:(r.removeClass("in"),n.support.transition&&r.hasClass("fade")?r.one("bsTransitionEnd",f).emulateTransitionEnd(t.TRANSITION_DURATION):f(),this.hoverState=null,this)};t.prototype.fixTitle=function(){var n=this.$element;(n.attr("title")||"string"!=typeof n.attr("data-original-title"))&&n.attr("data-original-title",n.attr("title")||"").attr("title","")};t.prototype.hasContent=function(){return this.getTitle()};t.prototype.getPosition=function(t){t=t||this.$element;var u=t[0],r="BODY"==u.tagName,i=u.getBoundingClientRect();null==i.width&&(i=n.extend({},i,{width:i.right-i.left,height:i.bottom-i.top}));var f=r?{top:0,left:0}:t.offset(),e={scroll:r?document.documentElement.scrollTop||document.body.scrollTop:t.scrollTop()},o=r?{width:n(window).width(),height:n(window).height()}:null;return n.extend({},i,e,o,f)};t.prototype.getCalculatedOffset=function(n,t,i,r){return"bottom"==n?{top:t.top+t.height,left:t.left+t.width/2-i/2}:"top"==n?{top:t.top-r,left:t.left+t.width/2-i/2}:"left"==n?{top:t.top+t.height/2-r/2,left:t.left-i}:{top:t.top+t.height/2-r/2,left:t.left+t.width}};t.prototype.getViewportAdjustedDelta=function(n,t,i,r){var f={top:0,left:0},e,u,o,s,h,c;return this.$viewport?(e=this.options.viewport&&this.options.viewport.padding||0,u=this.getPosition(this.$viewport),/right|left/.test(n)?(o=t.top-e-u.scroll,s=t.top+e-u.scroll+r,o<u.top?f.top=u.top-o:s>u.top+u.height&&(f.top=u.top+u.height-s)):(h=t.left-e,c=t.left+e+i,h<u.left?f.left=u.left-h:c>u.right&&(f.left=u.left+u.width-c)),f):f};t.prototype.getTitle=function(){var t=this.$element,n=this.options;return t.attr("data-original-title")||("function"==typeof n.title?n.title.call(t[0]):n.title)};t.prototype.getUID=function(n){do n+=~~(1e6*Math.random());while(document.getElementById(n));return n};t.prototype.tip=function(){if(!this.$tip&&(this.$tip=n(this.options.template),1!=this.$tip.length))throw new Error(this.type+" `template` option must consist of exactly 1 top-level element!");return this.$tip};t.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")};t.prototype.enable=function(){this.enabled=!0};t.prototype.disable=function(){this.enabled=!1};t.prototype.toggleEnabled=function(){this.enabled=!this.enabled};t.prototype.toggle=function(t){var i=this;t&&(i=n(t.currentTarget).data("bs."+this.type),i||(i=new this.constructor(t.currentTarget,this.getDelegateOptions()),n(t.currentTarget).data("bs."+this.type,i)));t?(i.inState.click=!i.inState.click,i.isInStateTrue()?i.enter(i):i.leave(i)):i.tip().hasClass("in")?i.leave(i):i.enter(i)};t.prototype.destroy=function(){var n=this;clearTimeout(this.timeout);this.hide(function(){n.$element.off("."+n.type).removeData("bs."+n.type);n.$tip&&n.$tip.detach();n.$tip=null;n.$arrow=null;n.$viewport=null})};i=n.fn.tooltip;n.fn.tooltip=r;n.fn.tooltip.Constructor=t;n.fn.tooltip.noConflict=function(){return n.fn.tooltip=i,this}}(jQuery);+function(n){"use strict";function r(i){return this.each(function(){var u=n(this),r=u.data("bs.popover"),f="object"==typeof i&&i;(r||!/destroy|hide/.test(i))&&(r||u.data("bs.popover",r=new t(this,f)),"string"==typeof i&&r[i]())})}var t=function(n,t){this.init("popover",n,t)},i;if(!n.fn.tooltip)throw new Error("Popover requires tooltip.js");t.VERSION="3.3.5";t.DEFAULTS=n.extend({},n.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:'<div class="popover" role="tooltip"><div class="arrow"><\/div><h3 class="popover-title"><\/h3><div class="popover-content"><\/div><\/div>'});t.prototype=n.extend({},n.fn.tooltip.Constructor.prototype);t.prototype.constructor=t;t.prototype.getDefaults=function(){return t.DEFAULTS};t.prototype.setContent=function(){var n=this.tip(),i=this.getTitle(),t=this.getContent();n.find(".popover-title")[this.options.html?"html":"text"](i);n.find(".popover-content").children().detach().end()[this.options.html?"string"==typeof t?"html":"append":"text"](t);n.removeClass("fade top bottom left right in");n.find(".popover-title").html()||n.find(".popover-title").hide()};t.prototype.hasContent=function(){return this.getTitle()||this.getContent()};t.prototype.getContent=function(){var t=this.$element,n=this.options;return t.attr("data-content")||("function"==typeof n.content?n.content.call(t[0]):n.content)};t.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")};i=n.fn.popover;n.fn.popover=r;n.fn.popover.Constructor=t;n.fn.popover.noConflict=function(){return n.fn.popover=i,this}}(jQuery);+function(n){"use strict";function t(i,r){this.$body=n(document.body);this.$scrollElement=n(n(i).is(document.body)?window:i);this.options=n.extend({},t.DEFAULTS,r);this.selector=(this.options.target||"")+" .nav li > a";this.offsets=[];this.targets=[];this.activeTarget=null;this.scrollHeight=0;this.$scrollElement.on("scroll.bs.scrollspy",n.proxy(this.process,this));this.refresh();this.process()}function i(i){return this.each(function(){var u=n(this),r=u.data("bs.scrollspy"),f="object"==typeof i&&i;r||u.data("bs.scrollspy",r=new t(this,f));"string"==typeof i&&r[i]()})}t.VERSION="3.3.5";t.DEFAULTS={offset:10};t.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)};t.prototype.refresh=function(){var t=this,i="offset",r=0;this.offsets=[];this.targets=[];this.scrollHeight=this.getScrollHeight();n.isWindow(this.$scrollElement[0])||(i="position",r=this.$scrollElement.scrollTop());this.$body.find(this.selector).map(function(){var f=n(this),u=f.data("target")||f.attr("href"),t=/^#./.test(u)&&n(u);return t&&t.length&&t.is(":visible")&&[[t[i]().top+r,u]]||null}).sort(function(n,t){return n[0]-t[0]}).each(function(){t.offsets.push(this[0]);t.targets.push(this[1])})};t.prototype.process=function(){var n,i=this.$scrollElement.scrollTop()+this.options.offset,f=this.getScrollHeight(),e=this.options.offset+f-this.$scrollElement.height(),t=this.offsets,r=this.targets,u=this.activeTarget;if(this.scrollHeight!=f&&this.refresh(),i>=e)return u!=(n=r[r.length-1])&&this.activate(n);if(u&&i<t[0])return this.activeTarget=null,this.clear();for(n=t.length;n--;)u!=r[n]&&i>=t[n]&&(void 0===t[n+1]||i<t[n+1])&&this.activate(r[n])};t.prototype.activate=function(t){this.activeTarget=t;this.clear();var r=this.selector+'[data-target="'+t+'"],'+this.selector+'[href="'+t+'"]',i=n(r).parents("li").addClass("active");i.parent(".dropdown-menu").length&&(i=i.closest("li.dropdown").addClass("active"));i.trigger("activate.bs.scrollspy")};t.prototype.clear=function(){n(this.selector).parentsUntil(this.options.target,".active").removeClass("active")};var r=n.fn.scrollspy;n.fn.scrollspy=i;n.fn.scrollspy.Constructor=t;n.fn.scrollspy.noConflict=function(){return n.fn.scrollspy=r,this};n(window).on("load.bs.scrollspy.data-api",function(){n('[data-spy="scroll"]').each(function(){var t=n(this);i.call(t,t.data())})})}(jQuery);+function(n){"use strict";function r(i){return this.each(function(){var u=n(this),r=u.data("bs.tab");r||u.data("bs.tab",r=new t(this));"string"==typeof i&&r[i]()})}var t=function(t){this.element=n(t)},u,i;t.VERSION="3.3.5";t.TRANSITION_DURATION=150;t.prototype.show=function(){var t=this.element,f=t.closest("ul:not(.dropdown-menu)"),i=t.data("target"),u;if(i||(i=t.attr("href"),i=i&&i.replace(/.*(?=#[^\s]*$)/,"")),!t.parent("li").hasClass("active")){var r=f.find(".active:last a"),e=n.Event("hide.bs.tab",{relatedTarget:t[0]}),o=n.Event("show.bs.tab",{relatedTarget:r[0]});(r.trigger(e),t.trigger(o),o.isDefaultPrevented()||e.isDefaultPrevented())||(u=n(i),this.activate(t.closest("li"),f),this.activate(u,u.parent(),function(){r.trigger({type:"hidden.bs.tab",relatedTarget:t[0]});t.trigger({type:"shown.bs.tab",relatedTarget:r[0]})}))}};t.prototype.activate=function(i,r,u){function e(){f.removeClass("active").find("> .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!1);i.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded",!0);o?(i[0].offsetWidth,i.addClass("in")):i.removeClass("fade");i.parent(".dropdown-menu").length&&i.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!0);u&&u()}var f=r.find("> .active"),o=u&&n.support.transition&&(f.length&&f.hasClass("fade")||!!r.find("> .fade").length);f.length&&o?f.one("bsTransitionEnd",e).emulateTransitionEnd(t.TRANSITION_DURATION):e();f.removeClass("in")};u=n.fn.tab;n.fn.tab=r;n.fn.tab.Constructor=t;n.fn.tab.noConflict=function(){return n.fn.tab=u,this};i=function(t){t.preventDefault();r.call(n(this),"show")};n(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',i).on("click.bs.tab.data-api",'[data-toggle="pill"]',i)}(jQuery);+function(n){"use strict";function i(i){return this.each(function(){var u=n(this),r=u.data("bs.affix"),f="object"==typeof i&&i;r||u.data("bs.affix",r=new t(this,f));"string"==typeof i&&r[i]()})}var t=function(i,r){this.options=n.extend({},t.DEFAULTS,r);this.$target=n(this.options.target).on("scroll.bs.affix.data-api",n.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",n.proxy(this.checkPositionWithEventLoop,this));this.$element=n(i);this.affixed=null;this.unpin=null;this.pinnedOffset=null;this.checkPosition()},r;t.VERSION="3.3.5";t.RESET="affix affix-top affix-bottom";t.DEFAULTS={offset:0,target:window};t.prototype.getState=function(n,t,i,r){var u=this.$target.scrollTop(),f=this.$element.offset(),e=this.$target.height();if(null!=i&&"top"==this.affixed)return i>u?"top":!1;if("bottom"==this.affixed)return null!=i?u+this.unpin<=f.top?!1:"bottom":n-r>=u+e?!1:"bottom";var o=null==this.affixed,s=o?u:f.top,h=o?e:t;return null!=i&&i>=u?"top":null!=r&&s+h>=n-r?"bottom":!1};t.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(t.RESET).addClass("affix");var n=this.$target.scrollTop(),i=this.$element.offset();return this.pinnedOffset=i.top-n};t.prototype.checkPositionWithEventLoop=function(){setTimeout(n.proxy(this.checkPosition,this),1)};t.prototype.checkPosition=function(){var i,e,o;if(this.$element.is(":visible")){var s=this.$element.height(),r=this.options.offset,f=r.top,u=r.bottom,h=Math.max(n(document).height(),n(document.body).height());if("object"!=typeof r&&(u=f=r),"function"==typeof f&&(f=r.top(this.$element)),"function"==typeof u&&(u=r.bottom(this.$element)),i=this.getState(h,s,f,u),this.affixed!=i){if(null!=this.unpin&&this.$element.css("top",""),e="affix"+(i?"-"+i:""),o=n.Event(e+".bs.affix"),this.$element.trigger(o),o.isDefaultPrevented())return;this.affixed=i;this.unpin="bottom"==i?this.getPinnedOffset():null;this.$element.removeClass(t.RESET).addClass(e).trigger(e.replace("affix","affixed")+".bs.affix")}"bottom"==i&&this.$element.offset({top:h-s-u})}};r=n.fn.affix;n.fn.affix=i;n.fn.affix.Constructor=t;n.fn.affix.noConflict=function(){return n.fn.affix=r,this};n(window).on("load",function(){n('[data-spy="affix"]').each(function(){var r=n(this),t=r.data();t.offset=t.offset||{};null!=t.offsetBottom&&(t.offset.bottom=t.offsetBottom);null!=t.offsetTop&&(t.offset.top=t.offsetTop);i.call(r,t)})})}(jQuery);window.Modernizr=function(n,t,i){function w(n){d.cssText=n}function f(n,t){return typeof n===t}function ut(n,t){return!!~(""+n).indexOf(t)}function b(n,t){var u,r;for(u in n)if(r=n[u],!ut(r,"-")&&d[r]!==i)return t=="pfx"?r:!0;return!1}function ft(n,t,r){var e,u;for(e in n)if(u=t[n[e]],u!==i)return r===!1?n[e]:f(u,"function")?u.bind(r||t):u;return!1}function e(n,t,i){var r=n.charAt(0).toUpperCase()+n.slice(1),u=(n+" "+tt.join(r+" ")+r).split(" ");return f(t,"string")||f(t,"undefined")?b(u,t):(u=(n+" "+it.join(r+" ")+r).split(" "),ft(u,t,i))}var r={},l=!0,u=t.documentElement,s="modernizr",k=t.createElement(s),d=k.style,et,st={}.toString,g=" -webkit- -moz- -o- -ms- ".split(" "),nt="Webkit Moz O ms",tt=nt.split(" "),it=nt.toLowerCase().split(" "),o={},a=[],v=a.slice,h,rt=function(n,i,r,f){var l,a,c,v,e=t.createElement("div"),h=t.body,o=h||t.createElement("body");if(parseInt(r,10))while(r--)c=t.createElement("div"),c.id=f?f[r]:s+(r+1),e.appendChild(c);return l=["&#173;",'<style id="s',s,'">',n,"<\/style>"].join(""),e.id=s,(h?e:o).innerHTML+=l,o.appendChild(e),h||(o.style.background="",o.style.overflow="hidden",v=u.style.overflow,u.style.overflow="hidden",u.appendChild(o)),a=i(e,n),h?e.parentNode.removeChild(e):(o.parentNode.removeChild(o),u.style.overflow=v),!!a},y={}.hasOwnProperty,p,c;p=!f(y,"undefined")&&!f(y.call,"undefined")?function(n,t){return y.call(n,t)}:function(n,t){return t in n&&f(n.constructor.prototype[t],"undefined")};Function.prototype.bind||(Function.prototype.bind=function(n){var t=this,i,r;if(typeof t!="function")throw new TypeError;return i=v.call(arguments,1),r=function(){var f,e,u;return this instanceof r?(f=function(){},f.prototype=t.prototype,e=new f,u=t.apply(e,i.concat(v.call(arguments))),Object(u)===u?u:e):t.apply(n,i.concat(v.call(arguments)))},r});o.csstransforms=function(){return!!e("transform")};o.csstransforms3d=function(){var n=!!e("perspective");return n&&"webkitPerspective"in u.style&&rt("@media (transform-3d),(-webkit-transform-3d){#modernizr{left:9px;position:absolute;height:3px;}}",function(t){n=t.offsetLeft===9&&t.offsetHeight===3}),n};o.csstransitions=function(){return e("transition")};for(c in o)p(o,c)&&(h=c.toLowerCase(),r[h]=o[c](),a.push((r[h]?"":"no-")+h));return r.addTest=function(n,t){if(typeof n=="object")for(var f in n)p(n,f)&&r.addTest(f,n[f]);else{if(n=n.toLowerCase(),r[n]!==i)return r;t=typeof t=="function"?t():t;typeof l!="undefined"&&l&&(u.className+=" "+(t?"":"no-")+n);r[n]=t}return r},w(""),k=et=null,function(n,t){function v(n,t){var i=n.createElement("p"),r=n.getElementsByTagName("head")[0]||n.documentElement;return i.innerHTML="x<style>"+t+"<\/style>",r.insertBefore(i.lastChild,r.firstChild)}function s(){var n=r.elements;return typeof n=="string"?n.split(" "):n}function u(n){var t=a[n[l]];return t||(t={},o++,n[l]=o,a[o]=t),t}function h(n,r,f){if(r||(r=t),i)return r.createElement(n);f||(f=u(r));var e;return e=f.cache[n]?f.cache[n].cloneNode():b.test(n)?(f.cache[n]=f.createElem(n)).cloneNode():f.createElem(n),e.canHaveChildren&&!w.test(n)?f.frag.appendChild(e):e}function y(n,r){if(n||(n=t),i)return n.createDocumentFragment();r=r||u(n);for(var e=r.frag.cloneNode(),f=0,o=s(),h=o.length;f<h;f++)e.createElement(o[f]);return e}function p(n,t){t.cache||(t.cache={},t.createElem=n.createElement,t.createFrag=n.createDocumentFragment,t.frag=t.createFrag());n.createElement=function(i){return r.shivMethods?h(i,n,t):t.createElem(i)};n.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+s().join().replace(/\w+/g,function(n){return t.createElem(n),t.frag.createElement(n),'c("'+n+'")'})+");return n}")(r,t.frag)}function c(n){n||(n=t);var f=u(n);return r.shivCSS&&!e&&!f.hasCSS&&(f.hasCSS=!!v(n,"article,aside,figcaption,figure,footer,header,hgroup,nav,section{display:block}mark{background:#FF0;color:#000}")),i||p(n,f),n}var f=n.html5||{},w=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,b=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,e,l="_html5shiv",o=0,a={},i,r;(function(){try{var n=t.createElement("a");n.innerHTML="<xyz><\/xyz>";e="hidden"in n;i=n.childNodes.length==1||function(){t.createElement("a");var n=t.createDocumentFragment();return typeof n.cloneNode=="undefined"||typeof n.createDocumentFragment=="undefined"||typeof n.createElement=="undefined"}()}catch(r){e=!0;i=!0}})();r={elements:f.elements||"abbr article aside audio bdi canvas data datalist details figcaption figure footer header hgroup mark meter nav output progress section summary time video",shivCSS:f.shivCSS!==!1,supportsUnknownElements:i,shivMethods:f.shivMethods!==!1,type:"default",shivDocument:c,createElement:h,createDocumentFragment:y};n.html5=r;c(t)}(this,t),r._version="2.6.2",r._prefixes=g,r._domPrefixes=it,r._cssomPrefixes=tt,r.testProp=function(n){return b([n])},r.testAllProps=e,r.testStyles=rt,r.prefixed=function(n,t,i){return t?e(n,t,i):e(n,"pfx")},u.className=u.className.replace(/(^|\s)no-js(\s|$)/,"$1$2")+(l?" js "+a.join(" "):""),r}(this,this.document),function(n,t,i){function h(n){return"[object Function]"==y.call(n)}function c(n){return"string"==typeof n}function l(){}function w(n){return!n||"loaded"==n||"complete"==n||"uninitialized"==n}function f(){var n=a.shift();v=1;n?n.t?s(function(){("c"==n.t?u.injectCss:u.injectJs)(n.s,0,n.a,n.x,n.e,1)},0):(n(),f()):v=0}function ut(n,i,o,h,c,l,y){function k(t){if(!nt&&w(p.readyState)&&(tt.r=nt=1,!v&&f(),p.onload=p.onreadystatechange=null,t)){"img"!=n&&s(function(){g.removeChild(p)},50);for(var u in r[i])r[i].hasOwnProperty(u)&&r[i][u].onload()}}var y=y||u.errorTimeout,p=t.createElement(n),nt=0,b=0,tt={t:o,s:i,e:c,a:l,x:y};1===r[i]&&(b=1,r[i]=[]);"object"==n?p.data=i:(p.src=i,p.type=n);p.width=p.height="0";p.onerror=p.onload=p.onreadystatechange=function(){k.call(this,b)};a.splice(h,0,tt);"img"!=n&&(b||2===r[i]?(g.insertBefore(p,d?null:e),s(k,y)):r[i].push(p))}function ft(n,t,i,r,u){return v=0,t=t||"j",c(n)?ut("c"==t?et:nt,n,t,this.i++,i,r,u):(a.splice(this.i++,0,n),1==a.length&&f()),this}function b(){var n=u;return n.loader={load:ft,i:0},n}var o=t.documentElement,s=n.setTimeout,e=t.getElementsByTagName("script")[0],y={}.toString,a=[],v=0,k="MozAppearance"in o.style,d=k&&!!t.createRange().compareNode,g=d?o:e.parentNode,o=n.opera&&"[object Opera]"==y.call(n.opera),o=!!t.attachEvent&&!o,nt=k?"object":o?"script":"img",et=o?"script":nt,tt=Array.isArray||function(n){return"[object Array]"==y.call(n)},p=[],r={},it={timeout:function(n,t){return t.length&&(n.timeout=t[0]),n}},rt,u;u=function(n){function a(n){for(var n=n.split("!"),f=p.length,i=n.pop(),e=n.length,i={url:i,origUrl:i,prefixes:n},u,r,t=0;t<e;t++)r=n[t].split("="),(u=it[r.shift()])&&(i=u(i,r));for(t=0;t<f;t++)i=p[t](i);return i}function f(n,t,u,f,e){var o=a(n),s=o.autoCallback;o.url.split(".").pop().split("?").shift();o.bypass||(t&&(t=h(t)?t:t[n]||t[f]||t[n.split("/").pop().split("?")[0]]),o.instead?o.instead(n,t,u,f,e):(r[o.url]?o.noexec=!0:r[o.url]=1,u.load(o.url,o.forceCSS||!o.forceJS&&"css"==o.url.split(".").pop().split("?").shift()?"c":i,o.noexec,o.attrs,o.timeout),(h(t)||h(s))&&u.load(function(){b();t&&t(o.origUrl,e,f);s&&s(o.origUrl,e,f);r[o.url]=2})))}function s(n,t){function a(n,o){if(n){if(c(n))o||(i=function(){var n=[].slice.call(arguments);s.apply(this,n);u()}),f(n,i,t,0,e);else if(Object(n)===n)for(r in v=function(){var t=0;for(var i in n)n.hasOwnProperty(i)&&t++;return t}(),n)n.hasOwnProperty(r)&&(!o&&!--v&&(h(i)?i=function(){var n=[].slice.call(arguments);s.apply(this,n);u()}:i[r]=function(n){return function(){var t=[].slice.call(arguments);n&&n.apply(this,t);u()}}(s[r])),f(n[r],i,t,r,e))}else o||u()}var e=!!n.test,o=n.load||n.both,i=n.callback||l,s=i,u=n.complete||l,v,r;a(e?n.yep:n.nope,!!o);o&&a(o)}var e,t,o=this.yepnope.loader;if(c(n))f(n,0,o,0);else if(tt(n))for(e=0;e<n.length;e++)t=n[e],c(t)?f(t,0,o,0):tt(t)?u(t):Object(t)===t&&s(t,o);else Object(n)===n&&s(n,o)};u.addPrefix=function(n,t){it[n]=t};u.addFilter=function(n){p.push(n)};u.errorTimeout=1e4;null==t.readyState&&t.addEventListener&&(t.readyState="loading",t.addEventListener("DOMContentLoaded",rt=function(){t.removeEventListener("DOMContentLoaded",rt,0);t.readyState="complete"},0));n.yepnope=b();n.yepnope.executeStack=f;n.yepnope.injectJs=function(n,i,r,o,h,c){var a=t.createElement("script"),v,y,o=o||u.errorTimeout;a.src=n;for(y in r)a.setAttribute(y,r[y]);i=c?f:i||l;a.onreadystatechange=a.onload=function(){!v&&w(a.readyState)&&(v=1,i(),a.onload=a.onreadystatechange=null)};s(function(){v||(v=1,i(1))},o);h?a.onload():e.parentNode.insertBefore(a,e)};n.yepnope.injectCss=function(n,i,r,u,o,h){var u=t.createElement("link"),c,i=h?f:i||l;u.href=n;u.rel="stylesheet";u.type="text/css";for(c in r)u.setAttribute(c,r[c]);o||(e.parentNode.insertBefore(u,e),s(i,0))}}(this,document);Modernizr.load=function(){yepnope.apply(window,[].slice.call(arguments,0))};!function(n,t){"function"==typeof define&&define.amd?define(["jquery"],function(n){return t(n)}):"object"==typeof module&&module.exports?module.exports=t(require("jquery")):t(n.jQuery)}(this,function(n){!function(n){"use strict";function f(t){return n.each([{re:/[\xC0-\xC6]/g,ch:"A"},{re:/[\xE0-\xE6]/g,ch:"a"},{re:/[\xC8-\xCB]/g,ch:"E"},{re:/[\xE8-\xEB]/g,ch:"e"},{re:/[\xCC-\xCF]/g,ch:"I"},{re:/[\xEC-\xEF]/g,ch:"i"},{re:/[\xD2-\xD6]/g,ch:"O"},{re:/[\xF2-\xF6]/g,ch:"o"},{re:/[\xD9-\xDC]/g,ch:"U"},{re:/[\xF9-\xFC]/g,ch:"u"},{re:/[\xC7-\xE7]/g,ch:"c"},{re:/[\xD1]/g,ch:"N"},{re:/[\xF1]/g,ch:"n"}],function(){t=t?t.replace(this.re,this.ch):""}),t}function e(i){var f=arguments,r=i,u,e;return[].shift.apply(f),e=this.each(function(){var o=n(this),i,e,s,h;if(o.is("select")){if(i=o.data("selectpicker"),e="object"==typeof r&&r,i){if(e)for(s in e)e.hasOwnProperty(s)&&(i.options[s]=e[s])}else h=n.extend({},t.DEFAULTS,n.fn.selectpicker.defaults||{},o.data(),e),h.template=n.extend({},t.DEFAULTS.template,n.fn.selectpicker.defaults?n.fn.selectpicker.defaults.template:{},o.data().template,e.template),o.data("selectpicker",i=new t(this,h));"string"==typeof r&&(u=i[r]instanceof Function?i[r].apply(i,f):i.options[r])}}),"undefined"!=typeof u?u:e}var i,u,o,h;String.prototype.includes||!function(){var i={}.toString,n=function(){try{var n={},t=Object.defineProperty,i=t(n,n,n)&&t}catch(n){}return i}(),r="".indexOf,t=function(n){var u,s;if(null==this)throw new TypeError;if(u=String(this),n&&"[object RegExp]"==i.call(n))throw new TypeError;var f=u.length,e=String(n),h=e.length,o=arguments.length>1?arguments[1]:void 0,t=o?Number(o):0;return t!=t&&(t=0),s=Math.min(Math.max(t,0),f),!(h+s>f)&&r.call(u,e,t)!=-1};n?n(String.prototype,"includes",{value:t,configurable:!0,writable:!0}):String.prototype.includes=t}();String.prototype.startsWith||!function(){var n=function(){try{var n={},t=Object.defineProperty,i=t(n,n,n)&&t}catch(n){}return i}(),i={}.toString,t=function(n){var u,f,r;if(null==this)throw new TypeError;if(u=String(this),n&&"[object RegExp]"==i.call(n))throw new TypeError;var e=u.length,o=String(n),s=o.length,h=arguments.length>1?arguments[1]:void 0,t=h?Number(h):0;if(t!=t&&(t=0),f=Math.min(Math.max(t,0),e),s+f>e)return!1;for(r=-1;++r<s;)if(u.charCodeAt(f+r)!=o.charCodeAt(r))return!1;return!0};n?n(String.prototype,"startsWith",{value:t,configurable:!0,writable:!0}):String.prototype.startsWith=t}();Object.keys||(Object.keys=function(n,t,i){i=[];for(t in n)i.hasOwnProperty.call(n,t)&&i.push(t);return i});i={useDefault:!1,_set:n.valHooks.select.set};n.valHooks.select.set=function(t,r){return r&&!i.useDefault&&n(t).data("selected",!0),i._set.apply(this,arguments)};u=null;o=function(){try{return new Event("change"),!0}catch(n){return!1}}();n.fn.triggerNative=function(n){var t,i=this[0];i.dispatchEvent?(o?t=new Event(n,{bubbles:!0}):(t=document.createEvent("Event"),t.initEvent(n,!0,!1)),i.dispatchEvent(t)):i.fireEvent?(t=document.createEventObject(),t.eventType=n,i.fireEvent("on"+n,t)):this.trigger(n)};n.expr.pseudos.icontains=function(t,i,r){var u=n(t).find("a"),f=(u.data("tokens")||u.text()).toString().toUpperCase();return f.includes(r[3].toUpperCase())};n.expr.pseudos.ibegins=function(t,i,r){var u=n(t).find("a"),f=(u.data("tokens")||u.text()).toString().toUpperCase();return f.startsWith(r[3].toUpperCase())};n.expr.pseudos.aicontains=function(t,i,r){var u=n(t).find("a"),f=(u.data("tokens")||u.data("normalizedText")||u.text()).toString().toUpperCase();return f.includes(r[3].toUpperCase())};n.expr.pseudos.aibegins=function(t,i,r){var u=n(t).find("a"),f=(u.data("tokens")||u.data("normalizedText")||u.text()).toString().toUpperCase();return f.startsWith(r[3].toUpperCase())};var s=function(n){var i=function(t){return n[t]},t="(?:"+Object.keys(n).join("|")+")",r=RegExp(t),u=RegExp(t,"g");return function(n){return n=null==n?"":""+n,r.test(n)?n.replace(u,i):n}},r=s({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"}),c=s({"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#x27;":"'","&#x60;":"`"}),t=function(r,u){i.useDefault||(n.valHooks.select.set=i._set,i.useDefault=!0);this.$element=n(r);this.$newElement=null;this.$button=null;this.$menu=null;this.$lis=null;this.options=u;null===this.options.title&&(this.options.title=this.$element.attr("title"));var f=this.options.windowPadding;"number"==typeof f&&(this.options.windowPadding=[f,f,f,f]);this.val=t.prototype.val;this.render=t.prototype.render;this.refresh=t.prototype.refresh;this.setStyle=t.prototype.setStyle;this.selectAll=t.prototype.selectAll;this.deselectAll=t.prototype.deselectAll;this.destroy=t.prototype.destroy;this.remove=t.prototype.remove;this.show=t.prototype.show;this.hide=t.prototype.hide;this.init()};t.VERSION="1.12.4";t.DEFAULTS={noneSelectedText:"Nothing selected",noneResultsText:"No results matched {0}",countSelectedText:function(n){return 1==n?"{0} item selected":"{0} items selected"},maxOptionsText:function(n,t){return[1==n?"Limit reached ({n} item max)":"Limit reached ({n} items max)",1==t?"Group limit reached ({n} item max)":"Group limit reached ({n} items max)"]},selectAllText:"Select All",deselectAllText:"Deselect All",doneButton:!1,doneButtonText:"Close",multipleSeparator:", ",styleBase:"btn",style:"btn-default",size:"auto",title:null,selectedTextFormat:"values",width:!1,container:!1,hideDisabled:!1,showSubtext:!1,showIcon:!0,showContent:!0,dropupAuto:!0,header:!1,liveSearch:!1,liveSearchPlaceholder:null,liveSearchNormalize:!1,liveSearchStyle:"contains",actionsBox:!1,iconBase:"glyphicon",tickIcon:"glyphicon-ok",showTick:!1,template:{caret:'<span class="caret"><\/span>'},maxOptions:!1,mobile:!1,selectOnTab:!1,dropdownAlignRight:!1,windowPadding:0};t.prototype={constructor:t,init:function(){var t=this,i=this.$element.attr("id");this.$element.addClass("bs-select-hidden");this.liObj={};this.multiple=this.$element.prop("multiple");this.autofocus=this.$element.prop("autofocus");this.$newElement=this.createView();this.$element.after(this.$newElement).appendTo(this.$newElement);this.$button=this.$newElement.children("button");this.$menu=this.$newElement.children(".dropdown-menu");this.$menuInner=this.$menu.children(".inner");this.$searchbox=this.$menu.find("input");this.$element.removeClass("bs-select-hidden");this.options.dropdownAlignRight===!0&&this.$menu.addClass("dropdown-menu-right");"undefined"!=typeof i&&(this.$button.attr("data-id",i),n('label[for="'+i+'"]').click(function(n){n.preventDefault();t.$button.focus()}));this.checkDisabled();this.clickListener();this.options.liveSearch&&this.liveSearchListener();this.render();this.setStyle();this.setWidth();this.options.container&&this.selectPosition();this.$menu.data("this",this);this.$newElement.data("this",this);this.options.mobile&&this.mobile();this.$newElement.on({"hide.bs.dropdown":function(n){t.$menuInner.attr("aria-expanded",!1);t.$element.trigger("hide.bs.select",n)},"hidden.bs.dropdown":function(n){t.$element.trigger("hidden.bs.select",n)},"show.bs.dropdown":function(n){t.$menuInner.attr("aria-expanded",!0);t.$element.trigger("show.bs.select",n)},"shown.bs.dropdown":function(n){t.$element.trigger("shown.bs.select",n)}});t.$element[0].hasAttribute("required")&&this.$element.on("invalid",function(){t.$button.addClass("bs-invalid");t.$element.on({"focus.bs.select":function(){t.$button.focus();t.$element.off("focus.bs.select")},"shown.bs.select":function(){t.$element.val(t.$element.val()).off("shown.bs.select")},"rendered.bs.select":function(){this.validity.valid&&t.$button.removeClass("bs-invalid");t.$element.off("rendered.bs.select")}});t.$button.on("blur.bs.select",function(){t.$element.focus().blur();t.$button.off("blur.bs.select")})});setTimeout(function(){t.$element.trigger("loaded.bs.select")})},createDropdown:function(){var t=this.multiple||this.options.showTick?" show-tick":"",i=this.$element.parent().hasClass("input-group")?" input-group-btn":"",u=this.autofocus?" autofocus":"",f=this.options.header?'<div class="popover-title"><button type="button" class="close" aria-hidden="true">&times;<\/button>'+this.options.header+"<\/div>":"",e=this.options.liveSearch?'<div class="bs-searchbox"><input type="text" class="form-control" autocomplete="off"'+(null===this.options.liveSearchPlaceholder?"":' placeholder="'+r(this.options.liveSearchPlaceholder)+'"')+' role="textbox" aria-label="Search"><\/div>':"",o=this.multiple&&this.options.actionsBox?'<div class="bs-actionsbox"><div class="btn-group btn-group-sm btn-block"><button type="button" class="actions-btn bs-select-all btn btn-default">'+this.options.selectAllText+'<\/button><button type="button" class="actions-btn bs-deselect-all btn btn-default">'+this.options.deselectAllText+"<\/button><\/div><\/div>":"",s=this.multiple&&this.options.doneButton?'<div class="bs-donebutton"><div class="btn-group btn-block"><button type="button" class="btn btn-sm btn-default">'+this.options.doneButtonText+"<\/button><\/div><\/div>":"",h='<div class="btn-group bootstrap-select'+t+i+'"><button type="button" class="'+this.options.styleBase+' dropdown-toggle" data-toggle="dropdown"'+u+' role="button"><span class="filter-option pull-left"><\/span>&nbsp;<span class="bs-caret">'+this.options.template.caret+'<\/span><\/button><div class="dropdown-menu open" role="combobox">'+f+e+o+'<ul class="dropdown-menu inner" role="listbox" aria-expanded="false"><\/ul>'+s+"<\/div><\/div>";return n(h)},createView:function(){var n=this.createDropdown(),t=this.createLi();return n.find("ul")[0].innerHTML=t,n},reloadLi:function(){var n=this.createLi();this.$menuInner[0].innerHTML=n},createLi:function(){var t=this,i=[],o=0,s=document.createElement("option"),u=-1,e=function(n,t,i,r){return"<li"+("undefined"!=typeof i&&""!==i?' class="'+i+'"':"")+("undefined"!=typeof t&&null!==t?' data-original-index="'+t+'"':"")+("undefined"!=typeof r&&null!==r?'data-optgroup="'+r+'"':"")+">"+n+"<\/li>"},c=function(i,u,e,o){return'<a tabindex="0"'+("undefined"!=typeof u?' class="'+u+'"':"")+(e?' style="'+e+'"':"")+(t.options.liveSearchNormalize?' data-normalized-text="'+f(r(n(i).html()))+'"':"")+("undefined"!=typeof o||null!==o?' data-tokens="'+o+'"':"")+' role="option">'+i+'<span class="'+t.options.iconBase+" "+t.options.tickIcon+' check-mark"><\/span><\/a>'},h,a,l;return!this.options.title||this.multiple||(u--,this.$element.find(".bs-title-option").length)||(h=this.$element[0],s.className="bs-title-option",s.innerHTML=this.options.title,s.value="",h.insertBefore(s,h.firstChild),a=n(h.options[h.selectedIndex]),void 0===a.attr("selected")&&void 0===this.$element.data("selected")&&(s.selected=!0)),l=this.$element.find("option"),l.each(function(f){var s=n(this),tt,it,w,b;if(u++,!s.hasClass("bs-title-option")){var a,k=this.className||"",d=r(this.style.cssText),v=s.data("content")?s.data("content"):s.html(),g=s.data("tokens")?s.data("tokens"):null,ft="undefined"!=typeof s.data("subtext")?'<small class="text-muted">'+s.data("subtext")+"<\/small>":"",y="undefined"!=typeof s.data("icon")?'<span class="'+t.options.iconBase+" "+s.data("icon")+'"><\/span> ':"",h=s.parent(),nt="OPTGROUP"===h[0].tagName,ut=nt&&h[0].disabled,p=this.disabled||ut;if(""!==y&&p&&(y="<span>"+y+"<\/span>"),t.options.hideDisabled&&(p&&!nt||ut))return a=s.data("prevHiddenIndex"),s.next().data("prevHiddenIndex",void 0!==a?a:f),void u--;if(s.data("content")||(v=y+'<span class="text">'+v+ft+"<\/span>"),nt&&s.data("divider")!==!0){if(t.options.hideDisabled&&p&&(void 0===h.data("allOptionsDisabled")&&(tt=h.children(),h.data("allOptionsDisabled",tt.filter(":disabled").length===tt.length)),h.data("allOptionsDisabled")))return void u--;if(it=" "+h[0].className||"",0===s.index()){o+=1;var rt=h[0].label,et="undefined"!=typeof h.data("subtext")?'<small class="text-muted">'+h.data("subtext")+"<\/small>":"",ot=h.data("icon")?'<span class="'+t.options.iconBase+" "+h.data("icon")+'"><\/span> ':"";rt=ot+'<span class="text">'+r(rt)+et+"<\/span>";0!==f&&i.length>0&&(u++,i.push(e("",null,"divider",o+"div")));u++;i.push(e(rt,null,"dropdown-header"+it,o))}if(t.options.hideDisabled&&p)return void u--;i.push(e(c(v,"opt "+k+it,d,g),f,"",o))}else s.data("divider")===!0?i.push(e("",f,"divider")):s.data("hidden")===!0?(a=s.data("prevHiddenIndex"),s.next().data("prevHiddenIndex",void 0!==a?a:f),i.push(e(c(v,k,d,g),f,"hidden is-hidden"))):(w=this.previousElementSibling&&"OPTGROUP"===this.previousElementSibling.tagName,!w&&t.options.hideDisabled&&(a=s.data("prevHiddenIndex"),void 0!==a)&&(b=l.eq(a)[0].previousElementSibling,b&&"OPTGROUP"===b.tagName&&!b.disabled&&(w=!0)),w&&(u++,i.push(e("",null,"divider",o+"div"))),i.push(e(c(v,k,d,g),f)));t.liObj[f]=u}}),this.multiple||0!==this.$element.find("option:selected").length||this.options.title||this.$element.find("option").eq(0).prop("selected",!0).attr("selected","selected"),i.join("")},findLis:function(){return null==this.$lis&&(this.$lis=this.$menu.find("li")),this.$lis},render:function(t){var s,i=this,e=this.$element.find("option"),r,u,f,o,h;t!==!1&&e.each(function(n){var t=i.findLis().eq(i.liObj[n]);i.setDisabled(n,this.disabled||"OPTGROUP"===this.parentNode.tagName&&this.parentNode.disabled,t);i.setSelected(n,this.selected,t)});this.togglePlaceholder();this.tabIndex();r=e.map(function(){if(this.selected){if(i.options.hideDisabled&&(this.disabled||"OPTGROUP"===this.parentNode.tagName&&this.parentNode.disabled))return;var r,t=n(this),u=t.data("icon")&&i.options.showIcon?'<i class="'+i.options.iconBase+" "+t.data("icon")+'"><\/i> ':"";return r=i.options.showSubtext&&t.data("subtext")&&!i.multiple?' <small class="text-muted">'+t.data("subtext")+"<\/small>":"","undefined"!=typeof t.attr("title")?t.attr("title"):t.data("content")&&i.options.showContent?t.data("content").toString():u+t.html()+r}}).toArray();u=this.multiple?r.join(this.options.multipleSeparator):r[0];this.multiple&&this.options.selectedTextFormat.indexOf("count")>-1&&(f=this.options.selectedTextFormat.split(">"),(f.length>1&&r.length>f[1]||1==f.length&&r.length>=2)&&(s=this.options.hideDisabled?", [disabled]":"",o=e.not('[data-divider="true"], [data-hidden="true"]'+s).length,h="function"==typeof this.options.countSelectedText?this.options.countSelectedText(r.length,o):this.options.countSelectedText,u=h.replace("{0}",r.length.toString()).replace("{1}",o.toString())));void 0==this.options.title&&(this.options.title=this.$element.attr("title"));"static"==this.options.selectedTextFormat&&(u=this.options.title);u||(u="undefined"!=typeof this.options.title?this.options.title:this.options.noneSelectedText);this.$button.attr("title",c(n.trim(u.replace(/<[^>]*>?/g,""))));this.$button.children(".filter-option").html(u);this.$element.trigger("rendered.bs.select")},setStyle:function(n,t){this.$element.attr("class")&&this.$newElement.addClass(this.$element.attr("class").replace(/selectpicker|mobile-device|bs-select-hidden|validate\[.*\]/gi,""));var i=n?n:this.options.style;"add"==t?this.$button.addClass(i):"remove"==t?this.$button.removeClass(i):(this.$button.removeClass(this.options.style),this.$button.addClass(i))},liHeight:function(t){var y;if(t||this.options.size!==!1&&!this.sizeInfo){var e=document.createElement("div"),u=document.createElement("div"),o=document.createElement("ul"),l=document.createElement("li"),w=document.createElement("li"),a=document.createElement("a"),v=document.createElement("span"),s=this.options.header&&this.$menu.find(".popover-title").length>0?this.$menu.find(".popover-title")[0].cloneNode(!0):null,f=this.options.liveSearch?document.createElement("div"):null,h=this.options.actionsBox&&this.multiple&&this.$menu.find(".bs-actionsbox").length>0?this.$menu.find(".bs-actionsbox")[0].cloneNode(!0):null,c=this.options.doneButton&&this.multiple&&this.$menu.find(".bs-donebutton").length>0?this.$menu.find(".bs-donebutton")[0].cloneNode(!0):null;(v.className="text",e.className=this.$menu[0].parentNode.className+" open",u.className="dropdown-menu open",o.className="dropdown-menu inner",l.className="divider",v.appendChild(document.createTextNode("Inner text")),a.appendChild(v),w.appendChild(a),o.appendChild(w),o.appendChild(l),s&&u.appendChild(s),f)&&(y=document.createElement("input"),f.className="bs-searchbox",y.className="form-control",f.appendChild(y),u.appendChild(f));h&&u.appendChild(h);u.appendChild(o);c&&u.appendChild(c);e.appendChild(u);document.body.appendChild(e);var b=a.offsetHeight,k=s?s.offsetHeight:0,d=f?f.offsetHeight:0,g=h?h.offsetHeight:0,nt=c?c.offsetHeight:0,tt=n(l).outerHeight(!0),i="function"==typeof getComputedStyle&&getComputedStyle(u),r=i?null:n(u),p={vert:parseInt(i?i.paddingTop:r.css("paddingTop"))+parseInt(i?i.paddingBottom:r.css("paddingBottom"))+parseInt(i?i.borderTopWidth:r.css("borderTopWidth"))+parseInt(i?i.borderBottomWidth:r.css("borderBottomWidth")),horiz:parseInt(i?i.paddingLeft:r.css("paddingLeft"))+parseInt(i?i.paddingRight:r.css("paddingRight"))+parseInt(i?i.borderLeftWidth:r.css("borderLeftWidth"))+parseInt(i?i.borderRightWidth:r.css("borderRightWidth"))},it={vert:p.vert+parseInt(i?i.marginTop:r.css("marginTop"))+parseInt(i?i.marginBottom:r.css("marginBottom"))+2,horiz:p.horiz+parseInt(i?i.marginLeft:r.css("marginLeft"))+parseInt(i?i.marginRight:r.css("marginRight"))+2};document.body.removeChild(e);this.sizeInfo={liHeight:b,headerHeight:k,searchHeight:d,actionsHeight:g,doneButtonHeight:nt,dividerHeight:tt,menuPadding:p,menuExtras:it}}},setSize:function(){var l,rt,ut;if(this.findLis(),this.liHeight(),this.options.header&&this.$menu.css("padding-top",0),this.options.size!==!1){var r,k,f,a,e,s,h,v,i=this,t=this.$menu,d=this.$menuInner,o=n(window),ft=this.$newElement[0].offsetHeight,g=this.$newElement[0].offsetWidth,nt=this.sizeInfo.liHeight,y=this.sizeInfo.headerHeight,p=this.sizeInfo.searchHeight,w=this.sizeInfo.actionsHeight,b=this.sizeInfo.doneButtonHeight,et=this.sizeInfo.dividerHeight,c=this.sizeInfo.menuPadding,u=this.sizeInfo.menuExtras,tt=this.options.hideDisabled?".disabled":"",it=function(){var t,f=i.$newElement.offset(),u=n(i.options.container),r;i.options.container&&!u.is("body")?(t=u.offset(),t.top+=parseInt(u.css("borderTopWidth")),t.left+=parseInt(u.css("borderLeftWidth"))):t={top:0,left:0};r=i.options.windowPadding;e=f.top-t.top-o.scrollTop();s=o.height()-e-ft-t.top-r[2];h=f.left-t.left-o.scrollLeft();v=o.width()-h-g-t.left-r[1];e-=r[0];h-=r[3]};(it(),"auto"===this.options.size)?(l=function(){var o,tt=function(t,i){return function(r){return i?r.classList?r.classList.contains(t):n(r).hasClass(t):!(r.classList?r.classList.contains(t):n(r).hasClass(t))}},rt=i.$menuInner[0].getElementsByTagName("li"),l=Array.prototype.filter?Array.prototype.filter.call(rt,tt("hidden",!1)):i.$lis.not(".hidden"),ut=Array.prototype.filter?Array.prototype.filter.call(l,tt("dropdown-header",!0)):l.filter(".dropdown-header");it();r=s-u.vert;k=v-u.horiz;i.options.container?(t.data("height")||t.data("height",t.height()),f=t.data("height"),t.data("width")||t.data("width",t.width()),a=t.data("width")):(f=t.height(),a=t.width());i.options.dropupAuto&&i.$newElement.toggleClass("dropup",e>s&&r-u.vert<f);i.$newElement.hasClass("dropup")&&(r=e-u.vert);"auto"===i.options.dropdownAlignRight&&t.toggleClass("dropdown-menu-right",h>v&&k-u.horiz<a-g);o=l.length+ut.length>3?3*nt+u.vert-2:0;t.css({"max-height":r+"px",overflow:"hidden","min-height":o+y+p+w+b+"px"});d.css({"max-height":r-y-p-w-b-c.vert+"px","overflow-y":"auto","min-height":Math.max(o-c.vert,0)+"px"})},l(),this.$searchbox.off("input.getSize propertychange.getSize").on("input.getSize propertychange.getSize",l),o.off("resize.getSize scroll.getSize").on("resize.getSize scroll.getSize",l)):this.options.size&&"auto"!=this.options.size&&this.$lis.not(tt).length>this.options.size&&(rt=this.$lis.not(".divider").not(tt).children().slice(0,this.options.size).last().parent().index(),ut=this.$lis.slice(0,rt+1).filter(".divider").length,r=nt*this.options.size+ut*et+c.vert,i.options.container?(t.data("height")||t.data("height",t.height()),f=t.data("height")):f=t.height(),i.options.dropupAuto&&this.$newElement.toggleClass("dropup",e>s&&r-u.vert<f),t.css({"max-height":r+y+p+w+b+"px",overflow:"hidden","min-height":""}),d.css({"max-height":r-c.vert+"px","overflow-y":"auto","min-height":""}))}},setWidth:function(){if("auto"===this.options.width){this.$menu.css("min-width","0");var n=this.$menu.parent().clone().appendTo("body"),t=this.options.container?this.$newElement.clone().appendTo("body"):n,i=n.children(".dropdown-menu").outerWidth(),r=t.css("width","auto").children("button").outerWidth();n.remove();t.remove();this.$newElement.css("width",Math.max(i,r)+"px")}else"fit"===this.options.width?(this.$menu.css("min-width",""),this.$newElement.css("width","").addClass("fit-width")):this.options.width?(this.$menu.css("min-width",""),this.$newElement.css("width",this.options.width)):(this.$menu.css("min-width",""),this.$newElement.css("width",""));this.$newElement.hasClass("fit-width")&&"fit"!==this.options.width&&this.$newElement.removeClass("fit-width")},selectPosition:function(){this.$bsContainer=n('<div class="bs-container" />');var u,i,f,t=this,r=n(this.options.container),e=function(n){t.$bsContainer.addClass(n.attr("class").replace(/form-control|fit-width/gi,"")).toggleClass("dropup",n.hasClass("dropup"));u=n.offset();r.is("body")?i={top:0,left:0}:(i=r.offset(),i.top+=parseInt(r.css("borderTopWidth"))-r.scrollTop(),i.left+=parseInt(r.css("borderLeftWidth"))-r.scrollLeft());f=n.hasClass("dropup")?0:n[0].offsetHeight;t.$bsContainer.css({top:u.top-i.top+f,left:u.left-i.left,width:n[0].offsetWidth})};this.$button.on("click",function(){var i=n(this);t.isDisabled()||(e(t.$newElement),t.$bsContainer.appendTo(t.options.container).toggleClass("open",!i.hasClass("open")).append(t.$menu))});n(window).on("resize scroll",function(){e(t.$newElement)});this.$element.on("hide.bs.select",function(){t.$menu.data("height",t.$menu.height());t.$bsContainer.detach()})},setSelected:function(n,t,i){i||(this.togglePlaceholder(),i=this.findLis().eq(this.liObj[n]));i.toggleClass("selected",t).find("a").attr("aria-selected",t)},setDisabled:function(n,t,i){i||(i=this.findLis().eq(this.liObj[n]));t?i.addClass("disabled").children("a").attr("href","#").attr("tabindex",-1).attr("aria-disabled",!0):i.removeClass("disabled").children("a").removeAttr("href").attr("tabindex",0).attr("aria-disabled",!1)},isDisabled:function(){return this.$element[0].disabled},checkDisabled:function(){var n=this;this.isDisabled()?(this.$newElement.addClass("disabled"),this.$button.addClass("disabled").attr("tabindex",-1).attr("aria-disabled",!0)):(this.$button.hasClass("disabled")&&(this.$newElement.removeClass("disabled"),this.$button.removeClass("disabled").attr("aria-disabled",!1)),this.$button.attr("tabindex")!=-1||this.$element.data("tabindex")||this.$button.removeAttr("tabindex"));this.$button.click(function(){return!n.isDisabled()})},togglePlaceholder:function(){var n=this.$element.val();this.$button.toggleClass("bs-placeholder",null===n||""===n||n.constructor===Array&&0===n.length)},tabIndex:function(){this.$element.data("tabindex")!==this.$element.attr("tabindex")&&this.$element.attr("tabindex")!==-98&&"-98"!==this.$element.attr("tabindex")&&(this.$element.data("tabindex",this.$element.attr("tabindex")),this.$button.attr("tabindex",this.$element.data("tabindex")));this.$element.attr("tabindex",-98)},clickListener:function(){var t=this,i=n(document);i.data("spaceSelect",!1);this.$button.on("keyup",function(n){/(32)/.test(n.keyCode.toString(10))&&i.data("spaceSelect")&&(n.preventDefault(),i.data("spaceSelect",!1))});this.$button.on("click",function(){t.setSize()});this.$element.on("shown.bs.select",function(){var i,n;if(t.options.liveSearch||t.multiple){if(!t.multiple){if(i=t.liObj[t.$element[0].selectedIndex],"number"!=typeof i||t.options.size===!1)return;n=t.$lis.eq(i)[0].offsetTop-t.$menuInner[0].offsetTop;n=n-t.$menuInner[0].offsetHeight/2+t.sizeInfo.liHeight/2;t.$menuInner[0].scrollTop=n}}else t.$menuInner.find(".selected a").focus()});this.$menuInner.on("click","li a",function(i){var h=n(this),o=h.parent().data("originalIndex"),nt=t.$element.val(),tt=t.$element.prop("selectedIndex"),a=!0,p,w,g;if(t.multiple&&1!==t.options.maxOptions&&i.stopPropagation(),i.preventDefault(),!t.isDisabled()&&!h.parent().hasClass("disabled")){var c=t.$element.find("option"),e=c.eq(o),v=e.prop("selected"),y=e.parent("optgroup"),r=t.options.maxOptions,f=y.data("maxOptions")||!1;if(t.multiple){if((e.prop("selected",!v),t.setSelected(o,!v),h.blur(),r!==!1||f!==!1)&&(p=r<c.filter(":selected").length,w=f<y.find("option:selected").length,r&&p||f&&w))if(r&&1==r)c.prop("selected",!1),e.prop("selected",!0),t.$menuInner.find(".selected").removeClass("selected"),t.setSelected(o,!0);else if(f&&1==f)y.find("option:selected").prop("selected",!1),e.prop("selected",!0),g=h.parent().data("optgroup"),t.$menuInner.find('[data-optgroup="'+g+'"]').removeClass("selected"),t.setSelected(o,!0);else{var b="string"==typeof t.options.maxOptionsText?[t.options.maxOptionsText,t.options.maxOptionsText]:t.options.maxOptionsText,s="function"==typeof b?b(r,f):b,k=s[0].replace("{n}",r),d=s[1].replace("{n}",f),l=n('<div class="notify"><\/div>');s[2]&&(k=k.replace("{var}",s[2][r>1?0:1]),d=d.replace("{var}",s[2][f>1?0:1]));e.prop("selected",!1);t.$menu.append(l);r&&p&&(l.append(n("<div>"+k+"<\/div>")),a=!1,t.$element.trigger("maxReached.bs.select"));f&&w&&(l.append(n("<div>"+d+"<\/div>")),a=!1,t.$element.trigger("maxReachedGrp.bs.select"));setTimeout(function(){t.setSelected(o,!1)},10);l.delay(750).fadeOut(300,function(){n(this).remove()})}}else c.prop("selected",!1),e.prop("selected",!0),t.$menuInner.find(".selected").removeClass("selected").find("a").attr("aria-selected",!1),t.setSelected(o,!0);!t.multiple||t.multiple&&1===t.options.maxOptions?t.$button.focus():t.options.liveSearch&&t.$searchbox.focus();a&&(nt!=t.$element.val()&&t.multiple||tt!=t.$element.prop("selectedIndex")&&!t.multiple)&&(u=[o,e.prop("selected"),v],t.$element.triggerNative("change"))}});this.$menu.on("click","li.disabled a, .popover-title, .popover-title :not(.close)",function(i){i.currentTarget==this&&(i.preventDefault(),i.stopPropagation(),t.options.liveSearch&&!n(i.target).hasClass("close")?t.$searchbox.focus():t.$button.focus())});this.$menuInner.on("click",".divider, .dropdown-header",function(n){n.preventDefault();n.stopPropagation();t.options.liveSearch?t.$searchbox.focus():t.$button.focus()});this.$menu.on("click",".popover-title .close",function(){t.$button.click()});this.$searchbox.on("click",function(n){n.stopPropagation()});this.$menu.on("click",".actions-btn",function(i){t.options.liveSearch?t.$searchbox.focus():t.$button.focus();i.preventDefault();i.stopPropagation();n(this).hasClass("bs-select-all")?t.selectAll():t.deselectAll()});this.$element.change(function(){t.render(!1);t.$element.trigger("changed.bs.select",u);u=null})},liveSearchListener:function(){var t=this,i=n('<li class="no-results"><\/li>');this.$button.on("click.dropdown.data-api",function(){t.$menuInner.find(".active").removeClass("active");t.$searchbox.val()&&(t.$searchbox.val(""),t.$lis.not(".is-hidden").removeClass("hidden"),i.parent().length&&i.remove());t.multiple||t.$menuInner.find(".selected").addClass("active");setTimeout(function(){t.$searchbox.focus()},10)});this.$searchbox.on("click.dropdown.data-api focus.dropdown.data-api touchend.dropdown.data-api",function(n){n.stopPropagation()});this.$searchbox.on("input propertychange",function(){var o,e,u,s;(t.$lis.not(".is-hidden").removeClass("hidden"),t.$lis.filter(".active").removeClass("active"),i.remove(),t.$searchbox.val())&&(e=t.$lis.not(".is-hidden, .divider, .dropdown-header"),(o=t.options.liveSearchNormalize?e.not(":a"+t._searchStyle()+'("'+f(t.$searchbox.val())+'")'):e.not(":"+t._searchStyle()+'("'+t.$searchbox.val()+'")'),o.length===e.length)?(i.html(t.options.noneResultsText.replace("{0}",'"'+r(t.$searchbox.val())+'"')),t.$menuInner.append(i),t.$lis.addClass("hidden")):(o.addClass("hidden"),s=t.$lis.not(".hidden"),s.each(function(t){var i=n(this);i.hasClass("divider")?void 0===u?i.addClass("hidden"):(u&&u.addClass("hidden"),u=i):i.hasClass("dropdown-header")&&s.eq(t+1).data("optgroup")!==i.data("optgroup")?i.addClass("hidden"):u=null}),u&&u.addClass("hidden"),e.not(".hidden").first().addClass("active"),t.$menuInner.scrollTop(0)))})},_searchStyle:function(){return{begins:"ibegins",startsWith:"ibegins"}[this.options.liveSearchStyle]||"icontains"},val:function(n){return"undefined"!=typeof n?(this.$element.val(n),this.render(),this.$element):this.$element.val()},changeAll:function(t){var r,f;if(this.multiple){"undefined"==typeof t&&(t=!0);this.findLis();var e=this.$element.find("option"),i=this.$lis.not(".divider, .dropdown-header, .disabled, .hidden"),o=i.length,u=[];if(t){if(i.filter(".selected").length===i.length)return}else if(0===i.filter(".selected").length)return;for(i.toggleClass("selected",t),r=0;r<o;r++)f=i[r].getAttribute("data-original-index"),u[u.length]=e.eq(f)[0];n(u).prop("selected",t);this.render(!1);this.togglePlaceholder();this.$element.triggerNative("change")}},selectAll:function(){return this.changeAll(!0)},deselectAll:function(){return this.changeAll(!1)},toggle:function(n){n=n||window.event;n&&n.stopPropagation();this.$button.trigger("click")},keydown:function(t){var r,u,h,e,o=n(this),y=o.is("input")?o.parent().parent():o.parent(),i=y.data("this"),l=":not(.disabled, .hidden, .dropdown-header, .divider)",a={32:" ",48:"0",49:"1",50:"2",51:"3",52:"4",53:"5",54:"6",55:"7",56:"8",57:"9",59:";",65:"a",66:"b",67:"c",68:"d",69:"e",70:"f",71:"g",72:"h",73:"i",74:"j",75:"k",76:"l",77:"m",78:"n",79:"o",80:"p",81:"q",82:"r",83:"s",84:"t",85:"u",86:"v",87:"w",88:"x",89:"y",90:"z",96:"0",97:"1",98:"2",99:"3",100:"4",101:"5",102:"6",103:"7",104:"8",105:"9"},f,v,s,c;if(e=i.$newElement.hasClass("open"),!e&&(t.keyCode>=48&&t.keyCode<=57||t.keyCode>=96&&t.keyCode<=105||t.keyCode>=65&&t.keyCode<=90))return i.options.container?i.$button.trigger("click"):(i.setSize(),i.$menu.parent().addClass("open"),e=!0),void i.$searchbox.focus();if(i.options.liveSearch&&/(^9$|27)/.test(t.keyCode.toString(10))&&e&&(t.preventDefault(),t.stopPropagation(),i.$menuInner.click(),i.$button.focus()),/(38|40)/.test(t.keyCode.toString(10))){if(r=i.$lis.filter(l),!r.length)return;u=i.options.liveSearch?r.index(r.filter(".active")):r.index(r.find("a").filter(":focus").parent());h=i.$menuInner.data("prevIndex");38==t.keyCode?(!i.options.liveSearch&&u!=h||u==-1||u--,u<0&&(u+=r.length)):40==t.keyCode&&((i.options.liveSearch||u==h)&&u++,u%=r.length);i.$menuInner.data("prevIndex",u);i.options.liveSearch?(t.preventDefault(),o.hasClass("dropdown-toggle")||(r.removeClass("active").eq(u).addClass("active").children("a").focus(),o.focus())):r.eq(u).children("a").focus()}else o.is("input")||(s=[],r=i.$lis.filter(l),r.each(function(i){n.trim(n(this).children("a").text().toLowerCase()).substring(0,1)==a[t.keyCode]&&s.push(i)}),f=n(document).data("keycount"),f++,n(document).data("keycount",f),v=n.trim(n(":focus").text().toLowerCase()).substring(0,1),v!=a[t.keyCode]?(f=1,n(document).data("keycount",f)):f>=s.length&&(n(document).data("keycount",0),f>s.length&&(f=1)),r.eq(s[f-1]).children("a").focus());(/(13|32)/.test(t.keyCode.toString(10))||/(^9$)/.test(t.keyCode.toString(10))&&i.options.selectOnTab)&&e&&((/(32)/.test(t.keyCode.toString(10))||t.preventDefault(),i.options.liveSearch)?/(32)/.test(t.keyCode.toString(10))||(i.$menuInner.find(".active a").click(),o.focus()):(c=n(":focus"),c.click(),c.focus(),t.preventDefault(),n(document).data("spaceSelect",!0)),n(document).data("keycount",0));(/(^9$|27)/.test(t.keyCode.toString(10))&&e&&(i.multiple||i.options.liveSearch)||/(27)/.test(t.keyCode.toString(10))&&!e)&&(i.$menu.parent().removeClass("open"),i.options.container&&i.$newElement.removeClass("open"),i.$button.focus())},mobile:function(){this.$element.addClass("mobile-device")},refresh:function(){this.$lis=null;this.liObj={};this.reloadLi();this.render();this.checkDisabled();this.liHeight(!0);this.setStyle();this.setWidth();this.$lis&&this.$searchbox.trigger("propertychange");this.$element.trigger("refreshed.bs.select")},hide:function(){this.$newElement.hide()},show:function(){this.$newElement.show()},remove:function(){this.$newElement.remove();this.$element.remove()},destroy:function(){this.$newElement.before(this.$element).remove();this.$bsContainer?this.$bsContainer.remove():this.$menu.remove();this.$element.off(".bs.select").removeData("selectpicker").removeClass("bs-select-hidden selectpicker")}};h=n.fn.selectpicker;n.fn.selectpicker=e;n.fn.selectpicker.Constructor=t;n.fn.selectpicker.noConflict=function(){return n.fn.selectpicker=h,this};n(document).data("keycount",0).on("keydown.bs.select",'.bootstrap-select [data-toggle=dropdown], .bootstrap-select [role="listbox"], .bs-searchbox input',t.prototype.keydown).on("focusin.modal",'.bootstrap-select [data-toggle=dropdown], .bootstrap-select [role="listbox"], .bs-searchbox input',function(n){n.stopPropagation()});n(window).on("load.bs.select.data-api",function(){n(".selectpicker").each(function(){var t=n(this);e.call(t,t.data())})})}(n)}),function(n){typeof define=="function"&&define.amd?define(["jquery"],function(t){n(t,window,document)}):typeof module=="object"&&module.exports?module.exports=n(require("jquery"),window,document):n(jQuery,window,document)}(function(n,t,i,r){function c(t,i){this.telInput=n(t);this.options=n.extend({},l,i);this.ns="."+u+v++;this.isGoodBrowser=Boolean(t.setSelectionRange);this.hadInitialPlaceholder=Boolean(n(t).attr("placeholder"))}var u="intlTelInput",v=1,l={allowDropdown:!0,autoHideDialCode:!0,autoPlaceholder:"polite",customPlaceholder:null,dropdownContainer:"",excludeCountries:[],formatOnDisplay:!0,geoIpLookup:null,initialCountry:"",nationalMode:!0,onlyCountries:[],placeholderNumberType:"MOBILE",preferredCountries:["us","gb"],separateDialCode:!1,utilsScript:""},f={UP:38,DOWN:40,ENTER:13,ESC:27,PLUS:43,A:65,Z:90,SPACE:32,TAB:9},y=["800","822","833","844","855","866","877","880","881","882","883","884","885","886","887","888","889"],o,h,e,s,a;n(t).on("load",function(){n.fn[u].windowLoaded=!0});for(c.prototype={_init:function(){return this.options.nationalMode&&(this.options.autoHideDialCode=!1),this.options.separateDialCode&&(this.options.autoHideDialCode=this.options.nationalMode=!1),this.isMobile=!1,this.isMobile&&(n("body").addClass("iti-mobile"),this.options.dropdownContainer||(this.options.dropdownContainer="body")),this.autoCountryDeferred=new n.Deferred,this.utilsScriptDeferred=new n.Deferred,this.selectedCountryData={},this._processCountryData(),this._generateMarkup(),this._setInitialState(),this._initListeners(),this._initRequests(),[this.autoCountryDeferred,this.utilsScriptDeferred]},_processCountryData:function(){this._processAllCountries();this._processCountryCodes();this._processPreferredCountries()},_addCountryCode:function(n,t,i){t in this.countryCodes||(this.countryCodes[t]=[]);var r=i||0;this.countryCodes[t][r]=n},_processAllCountries:function(){var n,t;this.options.onlyCountries.length?(n=this.options.onlyCountries.map(function(n){return n.toLowerCase()}),this.countries=o.filter(function(t){return n.indexOf(t.iso2)>-1})):this.options.excludeCountries.length?(t=this.options.excludeCountries.map(function(n){return n.toLowerCase()}),this.countries=o.filter(function(n){return t.indexOf(n.iso2)===-1})):this.countries=o},_processCountryCodes:function(){var t,n,i;for(this.countryCodes={},t=0;t<this.countries.length;t++)if(n=this.countries[t],this._addCountryCode(n.iso2,n.dialCode,n.priority),n.areaCodes)for(i=0;i<n.areaCodes.length;i++)this._addCountryCode(n.iso2,n.dialCode+n.areaCodes[i])},_processPreferredCountries:function(){var n,i,t;for(this.preferredCountries=[],n=0;n<this.options.preferredCountries.length;n++)i=this.options.preferredCountries[n].toLowerCase(),t=this._getCountryData(i,!1,!0),t&&this.preferredCountries.push(t)},_generateMarkup:function(){var i,t;this.telInput.attr("autocomplete","off");i="intl-tel-input";this.options.allowDropdown&&(i+=" allow-dropdown");this.options.separateDialCode&&(i+=" separate-dial-code");this.telInput.wrap(n("<div>",{"class":i}));this.flagsContainer=n("<div>",{"class":"flag-container"}).insertBefore(this.telInput);t=n("<div>",{"class":"selected-flag"});t.appendTo(this.flagsContainer);this.selectedFlagInner=n("<div>",{"class":"iti-flag"}).appendTo(t);this.options.separateDialCode&&(this.selectedDialCode=n("<div>",{"class":"selected-dial-code"}).appendTo(t));this.options.allowDropdown?(t.attr("tabindex","0"),n("<div>",{"class":"iti-arrow"}).appendTo(t),this.countryList=n("<ul>",{"class":"country-list hide"}),this.preferredCountries.length&&(this._appendListItems(this.preferredCountries,"preferred"),n("<li>",{"class":"divider"}).appendTo(this.countryList)),this._appendListItems(this.countries,""),this.countryListItems=this.countryList.children(".country"),this.options.dropdownContainer?this.dropdown=n("<div>",{"class":"intl-tel-input iti-container"}).append(this.countryList):this.countryList.appendTo(this.flagsContainer)):this.countryListItems=n()},_appendListItems:function(n,i){for(var u,r="",f=0;f<n.length;f++)u=n[f],t.siteId==1071?(r+="<li class='country "+i+"' data-dial-code='"+u.dialCode+"' data-country-code='"+u.iso2+"'>",r+="<div class='flag-box'><\/div>",r+="<span class='country-name'>"+u.name+"<\/span>",r+="<span class='dial-code'>+"+u.dialCode+"<\/span>",r+="<\/li>"):(r+="<li class='country "+i+"' data-dial-code='"+u.dialCode+"' data-country-code='"+u.iso2+"'>",r+="<div class='flag-box'><div class='iti-flag "+u.iso2+"'><\/div><\/div>",r+="<span class='country-name'>"+u.name+"<\/span>",r+="<span class='dial-code'>+"+u.dialCode+"<\/span>",r+="<\/li>");this.countryList.append(r)},_setInitialState:function(){var n=this.telInput.val();this._getDialCode(n)&&!this._isRegionlessNanp(n)?this._updateFlagFromNumber(n):this.options.initialCountry!=="auto"&&(this.options.initialCountry?this._setFlag(this.options.initialCountry.toLowerCase()):(this.defaultCountry=this.preferredCountries.length?this.preferredCountries[0].iso2:this.countries[0].iso2,n||this._setFlag(this.defaultCountry)),n||this.options.nationalMode||this.options.autoHideDialCode||this.options.separateDialCode||this.telInput.val("+"+this.selectedCountryData.dialCode));n&&this._updateValFromNumber(n)},_initListeners:function(){this._initKeyListeners();this.options.autoHideDialCode&&this._initFocusListeners();this.options.allowDropdown&&this._initDropdownListeners()},_initDropdownListeners:function(){var n=this,t=this.telInput.closest("label"),i;if(t.length)t.on("click"+this.ns,function(t){n.countryList.hasClass("hide")?n.telInput.focus():t.preventDefault()});i=this.selectedFlagInner.parent();i.on("click"+this.ns,function(){!n.countryList.hasClass("hide")||n.telInput.prop("disabled")||n.telInput.prop("readonly")||n._showDropdown()});this.flagsContainer.on("keydown"+n.ns,function(t){var i=n.countryList.hasClass("hide");i&&(t.which==f.UP||t.which==f.DOWN||t.which==f.SPACE||t.which==f.ENTER)&&(t.preventDefault(),t.stopPropagation(),n._showDropdown());t.which==f.TAB&&n._closeDropdown()})},_initRequests:function(){var t=this;this.options.utilsScript?n.fn[u].loadUtils(this.options.utilsScript,this.utilsScriptDeferred):this.utilsScriptDeferred.resolve();this.options.initialCountry==="auto"?this._loadAutoCountry():this.autoCountryDeferred.resolve()},_loadAutoCountry:function(){var t=this;n.fn[u].autoCountry?this.handleAutoCountry():n.fn[u].startedLoadingAutoCountry||(n.fn[u].startedLoadingAutoCountry=!0,typeof this.options.geoIpLookup=="function"&&this.options.geoIpLookup(function(t){n.fn[u].autoCountry=t.toLowerCase();setTimeout(function(){n(".intl-tel-input input").intlTelInput("handleAutoCountry")})}))},_initKeyListeners:function(){var n=this;this.telInput.on("keyup"+this.ns,function(){n._updateFlagFromNumber(n.telInput.val())&&n._triggerCountryChange()});this.telInput.on("cut"+this.ns+" paste"+this.ns,function(){setTimeout(function(){n._updateFlagFromNumber(n.telInput.val())&&n._triggerCountryChange()})})},_cap:function(n){var t=this.telInput.attr("maxlength");return t&&n.length>t?n.substr(0,t):n},_initFocusListeners:function(){var t=this,i;this.telInput.on("mousedown"+this.ns,function(n){t.telInput.is(":focus")||t.telInput.val()||(n.preventDefault(),t.telInput.focus())});this.telInput.on("focus"+this.ns,function(){if(!t.telInput.val()&&!t.telInput.prop("readonly")&&t.selectedCountryData.dialCode){t.telInput.val("+"+t.selectedCountryData.dialCode);t.telInput.one("keypress.plus"+t.ns,function(n){n.which==f.PLUS&&t.telInput.val("")});setTimeout(function(){var i=t.telInput[0],n;t.isGoodBrowser&&(n=t.telInput.val().length,i.setSelectionRange(n,n))})}});if(i=this.telInput.prop("form"),i)n(i).on("submit"+this.ns,function(){t._removeEmptyDialCode()});this.telInput.on("blur"+this.ns,function(){t._removeEmptyDialCode()})},_removeEmptyDialCode:function(){var t=this.telInput.val(),i=t.charAt(0)=="+",n;i&&(n=this._getNumeric(t),n&&this.selectedCountryData.dialCode!=n||this.telInput.val(""));this.telInput.off("keypress.plus"+this.ns)},_getNumeric:function(n){return n.replace(/\D/g,"")},_showDropdown:function(){this._setDropdownPosition();var n=this.countryList.children(".active");n.length&&(this._highlightListItem(n),this._scrollTo(n));this._bindDropdownListeners();this.selectedFlagInner.children(".iti-arrow").addClass("up")},_setDropdownPosition:function(){var s=this,o;if(this.options.dropdownContainer&&this.dropdown.appendTo(this.options.dropdownContainer),this.dropdownHeight=this.countryList.removeClass("hide").outerHeight(),!this.isMobile){var r=this.telInput.offset(),i=r.top,u=n(t).scrollTop(),f=i+this.telInput.outerHeight()+this.dropdownHeight<u+n(t).height(),e=i-this.dropdownHeight>u;if(this.countryList.toggleClass("dropup",!f&&e),this.options.dropdownContainer){o=!f&&e?0:this.telInput.innerHeight();this.dropdown.css({top:i+o,left:r.left});n(t).on("scroll"+this.ns,function(){s._closeDropdown()})}}},_bindDropdownListeners:function(){var t=this,e,r,u;this.countryList.on("mouseover"+this.ns,".country",function(){t._highlightListItem(n(this))});this.countryList.on("click"+this.ns,".country",function(){t._selectListItem(n(this))});e=!0;n("html").on("click"+this.ns,function(){e||t._closeDropdown();e=!1});r="";u=null;n(i).on("keydown"+this.ns,function(n){n.preventDefault();n.which==f.UP||n.which==f.DOWN?t._handleUpDownKey(n.which):n.which==f.ENTER?t._handleEnterKey():n.which==f.ESC?t._closeDropdown():(n.which>=f.A&&n.which<=f.Z||n.which==f.SPACE)&&(u&&clearTimeout(u),r+=String.fromCharCode(n.which),t._searchForCountry(r),u=setTimeout(function(){r=""},1e3))})},_handleUpDownKey:function(n){var i=this.countryList.children(".highlight").first(),t=n==f.UP?i.prev():i.next();t.length&&(t.hasClass("divider")&&(t=n==f.UP?t.prev():t.next()),this._highlightListItem(t),this._scrollTo(t))},_handleEnterKey:function(){var n=this.countryList.children(".highlight").first();n.length&&this._selectListItem(n)},_searchForCountry:function(n){for(var i,t=0;t<this.countries.length;t++)if(this._startsWith(this.countries[t].name,n)){i=this.countryList.children("[data-country-code="+this.countries[t].iso2+"]").not(".preferred");this._highlightListItem(i);this._scrollTo(i,!0);break}},_startsWith:function(n,t){return n.substr(0,t.length).toUpperCase()==t},_updateValFromNumber:function(n){if(this.options.formatOnDisplay&&t.intlTelInputUtils&&this.selectedCountryData){var i=!this.options.separateDialCode&&(this.options.nationalMode||n.charAt(0)!="+")?intlTelInputUtils.numberFormat.NATIONAL:intlTelInputUtils.numberFormat.INTERNATIONAL;n=intlTelInputUtils.formatNumber(n,this.selectedCountryData.iso2,i)}n=this._beforeSetNumber(n);this.telInput.val(n)},_updateFlagFromNumber:function(t){var r;t&&this.options.nationalMode&&this.selectedCountryData.dialCode=="1"&&t.charAt(0)!="+"&&(t.charAt(0)!="1"&&(t="1"+t),t="+"+t);var f=this._getDialCode(t),i=null,e=this._getNumeric(t);if(f){var u=this.countryCodes[this._getNumeric(f)],o=n.inArray(this.selectedCountryData.iso2,u)>-1,s=f=="+1"&&e.length>=4,h=this.selectedCountryData.dialCode=="1";if(!(h&&this._isRegionlessNanp(e))&&(!o||s))for(r=0;r<u.length;r++)if(u[r]){i=u[r];break}}else t.charAt(0)=="+"&&e.length?i="":t&&t!="+"||(i=this.defaultCountry);return i!==null?this._setFlag(i):!1},_isRegionlessNanp:function(t){var i=this._getNumeric(t),r;return i.charAt(0)=="1"?(r=i.substr(1,3),n.inArray(r,y)>-1):!1},_highlightListItem:function(n){this.countryListItems.removeClass("highlight");n.addClass("highlight")},_getCountryData:function(n,t,i){for(var u=t?o:this.countries,r=0;r<u.length;r++)if(u[r].iso2==n)return u[r];if(i)return null;throw new Error("No country data for '"+n+"'");},_getCountryDataCode:function(n,t,i){for(var u=t?o:this.countries,r=0;r<u.length;r++)if(u[r].dialCode==n)return u[r];if(i)return null;throw new Error("No country data for '"+countryCode+"'");},_setFlag:function(t){var r=this.selectedCountryData.iso2?this.selectedCountryData:{},f,i,u;return this.selectedCountryData=t?this._getCountryData(t,!1,!1):{},this.selectedCountryData.iso2&&(this.defaultCountry=this.selectedCountryData.iso2),n.isFunction(this.options.setSelectedText)?this.options.setSelectedText.call(this,this):this.selectedFlagInner.text("+"+this.selectedCountryData.dialCode),this.selectedFlagInner.attr("class","iti-flag "),f=t?this.selectedCountryData.name+": +"+this.selectedCountryData.dialCode:"Unknown",this.selectedFlagInner.parent().attr("title",f),this.options.separateDialCode&&(i=this.selectedCountryData.dialCode?"+"+this.selectedCountryData.dialCode:"",u=this.telInput.parent(),r.dialCode&&u.removeClass("iti-sdc-"+(r.dialCode.length+1)),i&&u.addClass("iti-sdc-"+i.length),this.selectedDialCode.text(i)),this._updatePlaceholder(),this.countryListItems.removeClass("active"),t&&this.countryListItems.find(".iti-flag."+t).first().closest(".country").addClass("active"),r.iso2!==t},_updatePlaceholder:function(){var r=this.options.autoPlaceholder==="aggressive"||!this.hadInitialPlaceholder&&(this.options.autoPlaceholder===!0||this.options.autoPlaceholder==="polite"),i,n;t.intlTelInputUtils&&r&&(i=intlTelInputUtils.numberType[this.options.placeholderNumberType],n=this.selectedCountryData.iso2?intlTelInputUtils.getExampleNumber(this.selectedCountryData.iso2,this.options.nationalMode,i):"",n=this._beforeSetNumber(n),typeof this.options.customPlaceholder=="function"&&(n=this.options.customPlaceholder(n,this.selectedCountryData)),this.telInput.attr("placeholder",n))},_selectListItem:function(n){var i=this._setFlag(n.attr("data-country-code")),t;this._closeDropdown();this._updateDialCode(n.attr("data-dial-code"),!0);this.telInput.focus();this.isGoodBrowser&&(t=this.telInput.val().length,this.telInput[0].setSelectionRange(t,t));i&&this._triggerCountryChange()},_closeDropdown:function(){this.countryList.addClass("hide");this.selectedFlagInner.children(".iti-arrow").removeClass("up");n(i).off(this.ns);n("html").off(this.ns);this.countryList.off(this.ns);this.options.dropdownContainer&&(this.isMobile||n(t).off("scroll"+this.ns),this.dropdown.detach());this.telInput.trigger("close:countrydropdown");this.selectedFlagInner[0].classList.remove(this.selectedCountryData.iso2);this.selectedFlagInner.text("+"+this.selectedCountryData.dialCode)},_scrollTo:function(n,t){var i=this.countryList,u=i.height(),f=i.offset().top,c=f+u,e=n.outerHeight(),o=n.offset().top,l=o+e,r=o-f+i.scrollTop(),s=u/2-e/2,h;o<f?(t&&(r-=s),i.scrollTop(r)):l>c&&(t&&(r+=s),h=u-e,i.scrollTop(r-h))},_updateDialCode:function(n,t){var i=this.telInput.val(),r,u;if(n="+"+n,i.charAt(0)=="+")u=this._getDialCode(i),r=u?i.replace(u,n):n;else{if(this.options.nationalMode||this.options.separateDialCode)return;if(i)r=n+i;else if(t||!this.options.autoHideDialCode)r=n;else return}this.telInput.val(r)},_getDialCode:function(t){var f="",r,i,u;if(t.charAt(0)=="+")for(r="",i=0;i<t.length;i++)if(u=t.charAt(i),n.isNumeric(u)&&(r+=u,this.countryCodes[r]&&(f=t.substr(0,i+1)),r.length==4))break;return f},_getFullNumber:function(){var i=n.trim(this.telInput.val()),t=this.selectedCountryData.dialCode,u,r=this._getNumeric(i),f=r.charAt(0)=="1"?r:"1"+r;return u=this.options.separateDialCode?"+"+t:i.charAt(0)!="+"&&i.charAt(0)!="1"&&t&&t.charAt(0)=="1"&&t.length==4&&t!=f.substr(0,4)?t.substr(1):"",u+i},_beforeSetNumber:function(n){var t,i;return this.options.separateDialCode&&(t=this._getDialCode(n),t&&(this.selectedCountryData.areaCodes!==null&&(t="+"+this.selectedCountryData.dialCode),i=n[t.length]===" "||n[t.length]==="-"?t.length+1:t.length,n=n.substr(i))),this._cap(n)},_triggerCountryChange:function(){this.telInput.trigger("countrychange",this.selectedCountryData)},handleAutoCountry:function(){this.options.initialCountry==="auto"&&(this.defaultCountry=n.fn[u].autoCountry,this.telInput.val()||this.setCountry(this.defaultCountry),this.autoCountryDeferred.resolve())},handleUtils:function(){t.intlTelInputUtils&&(this.telInput.val()&&this._updateValFromNumber(this.telInput.val()),this._updatePlaceholder());this.utilsScriptDeferred.resolve()},destroy:function(){var t,i;this.allowDropdown&&(this._closeDropdown(),this.selectedFlagInner.parent().off(this.ns),this.telInput.closest("label").off(this.ns));this.options.autoHideDialCode&&(t=this.telInput.prop("form"),t&&n(t).off(this.ns));this.telInput.off(this.ns);i=this.telInput.parent();i.before(this.telInput).remove()},getExtension:function(){return t.intlTelInputUtils?intlTelInputUtils.getExtension(this._getFullNumber(),this.selectedCountryData.iso2):""},getNumber:function(n){return t.intlTelInputUtils?intlTelInputUtils.formatNumber(this._getFullNumber(),this.selectedCountryData.iso2,n):""},getDialCode:function(){return t.intlTelInputUtils?this.selectedCountryData.dialCode:""},getNumberType:function(){return t.intlTelInputUtils?intlTelInputUtils.getNumberType(this._getFullNumber(),this.selectedCountryData.iso2):-99},getSelectedCountryData:function(){return this.selectedCountryData},getValidationError:function(){return t.intlTelInputUtils?intlTelInputUtils.getValidationError(this._getFullNumber(),this.selectedCountryData.iso2):-99},isValidNumber:function(){var i=n.trim(this._getFullNumber()),r=this.options.nationalMode?this.selectedCountryData.iso2:"";return t.intlTelInputUtils?intlTelInputUtils.isValidNumber(i,r):null},isValidNumberCustom:function(i){var u=n.trim(this._getFullNumber()),f=this.selectedCountryData.dialCode,e,r;return(i&&(u=i),e=/^([0-9])\1{6}$/,e.test(u))?!1:(r=null,f=="852")?(r=t.siteId==1071?/^[23569]\d{7}$/:/^[23456789]\d{7}$/,r.test(u)):f=="853"?(r=/^6[2,3,5,6,8]\d{6}$/,r.test(u)):f=="86"?(r=/^(130|131|132|133|134|135|136|137|138|139|141|144|145|147|148|149|150|151|152|153|155|156|157|158|159|166|170|171|172|173|175|176|177|178|180|181|182|183|184|185|186|187|188|189|191|193|195|198|199)\d{8}$/,r.test(u)):f=="81"?(r=/^(70|80|90)\d{6}$/,r.test(u)):u.length>=8&&!isNaN(Number(u))?!0:!1},setCountry:function(n){n=n.toLowerCase();this.selectedFlagInner.hasClass(n)||(this._setFlag(n),this._updateDialCode(this.selectedCountryData.dialCode,!1),this._triggerCountryChange())},setNumber:function(n){var t=this._updateFlagFromNumber(n);this._updateValFromNumber(n);t&&this._triggerCountryChange()},setCode:function(n){var t=this._getCountryDataCode(n,!1,!0);t==null||this.selectedFlagInner.hasClass(t.iso2)||(this._setFlag(t.iso2),this._updateDialCode(this.selectedCountryData.dialCode,!1),this._triggerCountryChange())}},n.fn[u]=function(t){var e=arguments,i,f;return t===r||typeof t=="object"?(i=[],this.each(function(){if(!n.data(this,"plugin_"+u)){var r=new c(this,t),f=r._init();i.push(f[0]);i.push(f[1]);n.data(this,"plugin_"+u,r)}}),n.when.apply(null,i)):typeof t=="string"&&t[0]!=="_"?(this.each(function(){var i=n.data(this,"plugin_"+u);i instanceof c&&typeof i[t]=="function"&&(f=i[t].apply(i,Array.prototype.slice.call(e,1)));t==="destroy"&&n.data(this,"plugin_"+u,null)}),f!==r?f:this):void 0},n.fn[u].getCountryData=function(){return o},n.fn[u].loadUtils=function(t,i){n.fn[u].loadedUtilsScript?i&&i.resolve():(n.fn[u].loadedUtilsScript=!0,n.ajax({type:"GET",url:t,complete:function(){n(".intl-tel-input input").intlTelInput("handleUtils")},dataType:"script",cache:!0}))},n.fn[u].defaults=l,n.fn[u].version="11.1.3",o=[],o=typeof siteId!="undefined"&&(siteId==344||siteId==467)?[["Hong Kong，China (中國香港)","hk","852"]]:[["Afghanistan (افغانستان)","af","93"],["Albania (Shqipëri)","al","355"],["Algeria (الجزائر)","dz","213"],["American Samoa","as","1684"],["Andorra","ad","376"],["Angola","ao","244"],["Anguilla","ai","1264"],["Antigua and Barbuda","ag","1268"],["Argentina","ar","54"],["Armenia (Հայաստան)","am","374"],["Aruba","aw","297"],["Australia","au","61",0],["Austria (Österreich)","at","43"],["Azerbaijan (Azərbaycan)","az","994"],["Bahamas","bs","1242"],["Bahrain (البحرين)","bh","973"],["Bangladesh (বাংলাদেশ)","bd","880"],["Barbados","bb","1246"],["Belarus (Беларусь)","by","375"],["Belgium (België)","be","32"],["Belize","bz","501"],["Benin (Bénin)","bj","229"],["Bermuda","bm","1441"],["Bhutan (འབྲུག)","bt","975"],["Bolivia","bo","591"],["Bosnia and Herzegovina (Босна и Херцеговина)","ba","387"],["Botswana","bw","267"],["Brazil (Brasil)","br","55"],["British Indian Ocean Territory","io","246"],["British Virgin Islands","vg","1284"],["Brunei","bn","673"],["Bulgaria (България)","bg","359"],["Burkina Faso","bf","226"],["Burundi (Uburundi)","bi","257"],["Cambodia (កម្ពុជា)","kh","855"],["Cameroon (Cameroun)","cm","237"],["Canada","ca","1",1,["204","226","236","249","250","289","306","343","365","387","403","416","418","431","437","438","450","506","514","519","548","579","581","587","604","613","639","647","672","705","709","742","778","780","782","807","819","825","867","873","902","905"]],["Cape Verde (Kabu Verdi)","cv","238"],["Caribbean Netherlands","bq","599",1],["Cayman Islands","ky","1345"],["Central African Republic (République centrafricaine)","cf","236"],["Chad (Tchad)","td","235"],["Chile","cl","56"],["China (中国)","cn","86"],["Christmas Island","cx","61",2],["Cocos (Keeling) Islands","cc","61",1],["Colombia","co","57"],["Comoros (جزر القمر)","km","269"],["Congo (DRC) (Jamhuri ya Kidemokrasia ya Kongo)","cd","243"],["Congo (Republic) (Congo-Brazzaville)","cg","242"],["Cook Islands","ck","682"],["Costa Rica","cr","506"],["Côte d’Ivoire","ci","225"],["Croatia (Hrvatska)","hr","385"],["Cuba","cu","53"],["Curaçao","cw","599",0],["Cyprus (Κύπρος)","cy","357"],["Czech Republic (Česká republika)","cz","420"],["Denmark (Danmark)","dk","45"],["Djibouti","dj","253"],["Dominica","dm","1767"],["Dominican Republic (República Dominicana)","do","1",2,["809","829","849"]],["Ecuador","ec","593"],["Egypt (مصر)","eg","20"],["El Salvador","sv","503"],["Equatorial Guinea (Guinea Ecuatorial)","gq","240"],["Eritrea","er","291"],["Estonia (Eesti)","ee","372"],["Ethiopia","et","251"],["Falkland Islands (Islas Malvinas)","fk","500"],["Faroe Islands (Føroyar)","fo","298"],["Fiji","fj","679"],["Finland (Suomi)","fi","358",0],["France","fr","33"],["French Guiana (Guyane française)","gf","594"],["French Polynesia (Polynésie française)","pf","689"],["Gabon","ga","241"],["Gambia","gm","220"],["Georgia (საქართველო)","ge","995"],["Germany (Deutschland)","de","49"],["Ghana (Gaana)","gh","233"],["Gibraltar","gi","350"],["Greece (Ελλάδα)","gr","30"],["Greenland (Kalaallit Nunaat)","gl","299"],["Grenada","gd","1473"],["Guadeloupe","gp","590",0],["Guam","gu","1671"],["Guatemala","gt","502"],["Guernsey","gg","44",1],["Guinea (Guinée)","gn","224"],["Guinea-Bissau (Guiné Bissau)","gw","245"],["Guyana","gy","592"],["Haiti","ht","509"],["Honduras","hn","504"],["Hong Kong，China (中國香港)","hk","852"],["Hungary (Magyarország)","hu","36"],["Iceland (Ísland)","is","354"],["India (भारत)","in","91"],["Indonesia","id","62"],["Iran (ایران)","ir","98"],["Iraq (العراق)","iq","964"],["Ireland","ie","353"],["Isle of Man","im","44",2],["Israel (ישראל)","il","972"],["Italy (Italia)","it","39",0],["Jamaica","jm","1876"],["Japan (日本)","jp","81"],["Jersey","je","44",3],["Jordan (الأردن)","jo","962"],["Kazakhstan (Казахстан)","kz","7",1],["Kenya","ke","254"],["Kiribati","ki","686"],["Kosovo","xk","383"],["Kuwait (الكويت)","kw","965"],["Kyrgyzstan (Кыргызстан)","kg","996"],["Laos (ລາວ)","la","856"],["Latvia (Latvija)","lv","371"],["Lebanon (لبنان)","lb","961"],["Lesotho","ls","266"],["Liberia","lr","231"],["Libya (ليبيا)","ly","218"],["Liechtenstein","li","423"],["Lithuania (Lietuva)","lt","370"],["Luxembourg","lu","352"],["Macao，China(中國澳門)","mo","853"],["Macedonia (FYROM) (Македонија)","mk","389"],["Madagascar (Madagasikara)","mg","261"],["Malawi","mw","265"],["Malaysia","my","60"],["Maldives","mv","960"],["Mali","ml","223"],["Malta","mt","356"],["Marshall Islands","mh","692"],["Martinique","mq","596"],["Mauritania (موريتانيا)","mr","222"],["Mauritius (Moris)","mu","230"],["Mayotte","yt","262",1],["Mexico (México)","mx","52"],["Micronesia","fm","691"],["Moldova (Republica Moldova)","md","373"],["Monaco","mc","377"],["Mongolia (Монгол)","mn","976"],["Montenegro (Crna Gora)","me","382"],["Montserrat","ms","1664"],["Morocco (المغرب)","ma","212",0],["Mozambique (Moçambique)","mz","258"],["Myanmar (Burma) (မြန်မာ)","mm","95"],["Namibia (Namibië)","na","264"],["Nauru","nr","674"],["Nepal (नेपाल)","np","977"],["Netherlands (Nederland)","nl","31"],["New Caledonia (Nouvelle-Calédonie)","nc","687"],["New Zealand","nz","64"],["Nicaragua","ni","505"],["Niger (Nijar)","ne","227"],["Nigeria","ng","234"],["Niue","nu","683"],["Norfolk Island","nf","672"],["North Korea (조선 민주주의 인민 공화국)","kp","850"],["Northern Mariana Islands","mp","1670"],["Norway (Norge)","no","47",0],["Oman (عُمان)","om","968"],["Pakistan (پاکستان)","pk","92"],["Palau","pw","680"],["Palestine (فلسطين)","ps","970"],["Panama (Panamá)","pa","507"],["Papua New Guinea","pg","675"],["Paraguay","py","595"],["Peru (Perú)","pe","51"],["Philippines","ph","63"],["Poland (Polska)","pl","48"],["Portugal","pt","351"],["Puerto Rico","pr","1",3,["787","939"]],["Qatar (قطر)","qa","974"],["Réunion (La Réunion)","re","262",0],["Romania (România)","ro","40"],["Russia (Россия)","ru","7",0],["Rwanda","rw","250"],["Saint Barthélemy","bl","590",1],["Saint Helena","sh","290"],["Saint Kitts and Nevis","kn","1869"],["Saint Lucia","lc","1758"],["Saint Martin (Saint-Martin (partie française))","mf","590",2],["Saint Pierre and Miquelon (Saint-Pierre-et-Miquelon)","pm","508"],["Saint Vincent and the Grenadines","vc","1784"],["Samoa","ws","685"],["San Marino","sm","378"],["São Tomé and Príncipe (São Tomé e Príncipe)","st","239"],["Saudi Arabia (المملكة العربية السعودية)","sa","966"],["Senegal (Sénégal)","sn","221"],["Serbia (Србија)","rs","381"],["Seychelles","sc","248"],["Sierra Leone","sl","232"],["Singapore","sg","65"],["Sint Maarten","sx","1721"],["Slovakia (Slovensko)","sk","421"],["Slovenia (Slovenija)","si","386"],["Solomon Islands","sb","677"],["Somalia (Soomaaliya)","so","252"],["South Africa","za","27"],["South Korea (대한민국)","kr","82"],["South Sudan (جنوب السودان)","ss","211"],["Spain (España)","es","34"],["Sri Lanka (ශ්රී ලංකාව)","lk","94"],["Sudan (السودان)","sd","249"],["Suriname","sr","597"],["Svalbard and Jan Mayen","sj","47",1],["Swaziland","sz","268"],["Sweden (Sverige)","se","46"],["Switzerland (Schweiz)","ch","41"],["Syria (سوريا)","sy","963"],["Taiwan，China (中國台灣)","tw","886"],["Tajikistan","tj","992"],["Tanzania","tz","255"],["Thailand (ไทย)","th","66"],["Timor-Leste","tl","670"],["Togo","tg","228"],["Tokelau","tk","690"],["Tonga","to","676"],["Trinidad and Tobago","tt","1868"],["Tunisia (تونس)","tn","216"],["Turkey (Türkiye)","tr","90"],["Turkmenistan","tm","993"],["Turks and Caicos Islands","tc","1649"],["Tuvalu","tv","688"],["U.S. Virgin Islands","vi","1340"],["Uganda","ug","256"],["Ukraine (Україна)","ua","380"],["United Arab Emirates (الإمارات العربية المتحدة)","ae","971"],["United Kingdom","gb","44",0],["United States (美国)","us","1",0],["Uruguay","uy","598"],["Uzbekistan (Oʻzbekiston)","uz","998"],["Vanuatu","vu","678"],["Vatican City (Città del Vaticano)","va","39",1],["Venezuela","ve","58"],["Vietnam (Việt Nam)","vn","84"],["Wallis and Futuna (Wallis-et-Futuna)","wf","681"],["Western Sahara (الصحراء الغربية)","eh","212",1],["Yemen (اليمن)","ye","967"],["Zambia","zm","260"],["Zimbabwe","zw","263"],["Åland Islands","ax","358",1]],h=0;h<o.length;h++)e=o[h],siteId!=null&&siteId!=r&&siteId==534&&e[2]=="86"&&(e[0]="China (中國)"),s=e[0],t.siteId==1071&&(e[2]=="852"?s="Hong Kong SAR":e[2]=="853"?s="Macau SAR":e[2]=="886"?s="Taiwan":e[2]=="86"?s="China":s!=null&&s!=""&&(a=s.split("("),s=a[0])),o[h]={name:s,iso2:e[1],dialCode:e[2],priority:e[3]||0,areaCodes:e[4]||null}});$(function(){var n,t;$("#keywordspc").bind("keypress",function(n){var n=n||window.event;if(n.keyCode==13)return $(this).siblings("[type='button']").length>0?($(this).siblings("[type='button']").click(),!1):($(this).next().click(),!1)});$("#keywordsphone").bind("keypress",function(n){var n=n||window.event;if(n.keyCode==13)return $(".w_mobile_btn").trigger("click"),!1});$("#keywords").bind("keypress",function(n){var n=n||window.event;if(n.keyCode==13)return $(".pull-right[type='button']").click(),!1});n=$("#txt_keyword");n!=undefined&&n.bind("keypress",function(n){var n=n||window.event;if(n.keyCode==13)return $("#btn_search").click(),!1});$("#keywordsphone").change(function(){$("#keywordspc").val($(this).val())});$("#keywordsphone")!=undefined&&$("#keywordsphone")!=null&&$("#keywordsphone").length>0&&$("#keywordsphone").val(window.keyWord||"");headsearch.searchListening();$(".m_pro_filter").length>0&&(t=$(".m_pro_filter").offset().top,$(window).scroll(function(){var n="pos_fixed",r,u,i;window.siteId==894&&(n="pos_fixed_hisso");r=$(document).scrollTop();u=$(".m_pro_filter").outerHeight(!0);r>=t-$(".w_mobilcon").height()?($(".m_pro_filter").hasClass(n)||($(".m_pro_filter").addClass(n),$(".m_pro_filter").css("top",$(".w_mobilcon").height()),$(".m_pro_filter").parent().css("padding-top",u)),i=$(".m_pro_filter").attr("flag"),typeof i!="undefined"&&i=="eproduct007"&&$(".m_pro_filter").css("top","0px")):($(".m_pro_filter").removeClass(n),$(".m_pro_filter").parent().removeAttr("style"))}))});headsearch={chks:[],colordt:[],headform:{},leftform:{},topform:{},headinput:{},showChoose:function(){$(".input_group_jt").click(function(){setTimeout(function(){$(".w_search_tc").css("display")!="block"?$(".w_search_tc").stop(!1,!0).slideToggle():$(".w_search_tc").stop(!0,!1).slideToggle()},200)})},init:function(){var i=localStorage.getItem("search"),r=localStorage.getItem("search_color"),t=headsearch.getQuerystring("price"),e,o,u,f,c,n;if(t==null||t==""?t=localStorage.getItem("search_price"):(t=t.replace("M","").replace("L",","),t.trim()!=","&&localStorage.setItem("search_price",t)),i!=null)for(i=i.split(","),n=0;n<i.length;n++)$(".pro_search_dd1 input[type='checkbox']").each(function(){parseInt($(this).attr("value"))==parseInt(i[n])&&$(this).prop("checked",!0)});if(r!=null)for(r=r.split(","),n=0;n<r.length;n++)$(".pro_search_dd1_color dd").each(function(){if(parseInt($(this).attr("value"))==parseInt(r[n])){var i=this.style.backgroundColor.replace("rgb(","").replace(")",""),t=i.split(","),u=t[0]*.299+t[1]*.587+t[2]*.114;$(this).addClass("epro5_color_curr");u>=192?$(this).append('<p class="fa fa-check color_black"><\/p>'):$(this).append('<p class="fa fa-check color_withe"><\/p>')}});for(t!=null&&(e=t.split(","),o=$("[name=headSearchPrice] dd.pro_search_dd1"),o.find("[name=headFormPriceMin]").val(e[0]),o.find("[name=headFormPriceMax]").val(e[1])),u=headsearch.headform.find('input[type="checkbox"]:checked'),n=0;n<u.length;n++){var l=$(u[n]).attr("name"),a=$(u[n]).val(),v='[name="'+l+'"][value="'+a+'"]';headsearch.chks=$.grep(headsearch.chks,function(n){return $.inArray(n,$(v))==-1});headsearch.chks.push(u[n])}for(f=$(".epro5_color_curr"),c=headsearch.topform.find(".epro5_color_curr"),n=0;n<c.length;n++)headsearch.colordt.push(f[n]);for(n=0;n<f.length;n++){var s=f[n],y=s.style.backgroundColor.replace("rgb(","").replace(")",""),h=y.split(","),p=h[0]*.299+h[1]*.587+h[2]*.114;p>=192?$(s).html('<p class="fa fa-check color_black"><\/p>'):$(s).html('<p class="fa fa-check color_withe"><\/p>')}headsearch.showChoose();headsearch.clickCheckbox();headsearch.leftFromSelectColor();headsearch.clickPrice();headsearch.clickHotSearch()},reset:function(){var n=function(n){!n||($(n).find('[type="checkbox"]').each(function(n,t){$(t).prop("checked")&&$(t).prop("checked",!1)}),$(".epro5_color_curr").html("").removeClass("epro5_color_curr"),headsearch.chks=[],headsearch.colordt=[],$(n).find('input[type="text"]').each(function(n,t){$(t).val("")}))};n(headsearch.headform);n(headsearch.topform)},clickCheckbox:function(){var n=function(n,t){$(t).click(function(){var i=$(t).attr("name"),r=$(t).val(),n='[name="'+i+'"][value="'+r+'"]',u;headsearch.chks=$.grep(headsearch.chks,function(t){return $.inArray(t,$(n))==-1});$(t).prop("checked")?(headsearch.chks.push(t),$(n).prop("checked",!0)):$(n).prop("checked",!1);headsearch.chks.length>5&&(msgBox.showMsgOk(txt_SearchConditionsNotMoreThan5),u=headsearch.chks.pop(),i=$(u).attr("name"),r=$(u).val(),n='[name="'+i+'"][value="'+r+'"]',$(n).prop("checked",!1))})};!headsearch.headform||$(headsearch.headform).find('[type="checkbox"]').each(n);!headsearch.topform||$(headsearch.topform).find('[type="checkbox"]').each(n)},leftFromSelectColor:function(){var n=function(n,t){$(t).click(function(){var r=$(this),u=$(t).attr("name"),f=$(t).attr("value"),n='[name="'+u+'"][value="'+f+'"]';if(r.hasClass("epro5_color_curr"))headsearch.colordt=$.grep(headsearch.colordt,function(t){return $.inArray(t,$(n))==-1}),$(n).removeClass("epro5_color_curr"),$(n).html("");else{headsearch.colordt.push(t);var e=this.style.backgroundColor.replace("rgb(","").replace(")",""),i=e.split(","),o=i[0]*.299+i[1]*.587+i[2]*.114;$(n).addClass("epro5_color_curr");o>=192?$(n).html('<p class="fa fa-check color_black"><\/p>'):$(n).html('<p class="fa fa-check color_withe"><\/p>')}})};!headsearch.topform||$(headsearch.topform).find(".pro_search_dd1_color dd").each(n);!headsearch.headform||$(headsearch.headform).find(".pro_search_dd1_color dd").each(n)},clickPrice:function(){var n=function(n,t){$(t).click(function(){headsearch.searchHead($(this).attr("price"))})},t=function(n,t){$(t).click(function(){var i=$(this).parents("form").find($('[name="headFormPriceMin"]')),r=$(this).parents("form").find($('[name="headFormPriceMax"]')),n=0,t=0,u;try{if(n=parseFloat(i.val()),t=parseFloat(r.val()),isNaN(n)||n<0){i.focus();throw txt_PriceError;}if(isNaN(t)||t<0){r.focus();throw txt_PriceError;}}catch(f){msgBox.showMsgErr(txt_PriceError);return}if(t<=n){msgBox.showMsgErr(txt_BigPriceGreateThanLowerPrice);return}u="M"+n+"L"+t;headsearch.searchHead(u,$("#keywordspc").val())})};$(headsearch.headform.find('[name="headSearchPrice"] li a').each(n));$(headsearch.topform.find('[name="headSearchPrice"] li a').each(n))},clickHotSearch:function(){var n=function(n,t){$(t).click(function(){headsearch.searchHead(null,$(this).text())})};$(headsearch.headform.find('[name="headSearchKeyWord"] li a').each(n));$(headsearch.topform.find('[name="headSearchKeyWord"] li a').each(n));$(headsearch.headform.find('[name="leftSearchKeyWord"] li a').each(n));$(headsearch.topform.find('[name="leftSearchKeyWord"] li a').each(n))},searchHead:function(n,t,i,r){var l,y,f,e,u,o,s,v,h,c;if(t!=undefined&&t!="undefined"&&t!=null&&t!=""&&headsearch.headinput&&headsearch.headinput.val(t),headsearch.searchVerification()){if(!!headsearch.headinput&&!!headsearch.headinput.val()){try{easesalesfacebook.facebookPixel.Search({search_string:headsearch.headinput.val()})}catch(b){console.log(b)}if(i){l=headsearch.headinput.val();t==2&&(l=$("#txtSearchval").val());isSelfDomain?(e="/search/full/?sc=&keyword="+l+"&PageIndex=0&PageSize=10&Price="+n,location.href=e):(e="/search/full/"+siteId+"?sc=&keyword="+l+"&PageIndex=0&PageSize=10&Price="+n,location.href=e);return}}if(headsearch.chks.count>5){msgBox.showMsgOk(txt_SearchConditionsNotMoreThan5);y=headsearch.chks.pop();$(y).prop("checked",!1);return}var a="",p=[],w=[];if(!!headsearch.chks)for(f=0;f<headsearch.chks.length;f++)a+=$(headsearch.chks[f]).attr("name")+"_"+$(headsearch.chks[f]).attr("value")+encodeURIComponent("@"),p.push($(headsearch.chks[f]).attr("value"));if(!!headsearch.colordt)for(f=0;f<headsearch.colordt.length;f++)a+=$(headsearch.colordt[f]).attr("name")+"_"+$(headsearch.colordt[f]).attr("value")+encodeURIComponent("@"),w.push($(headsearch.colordt[f]).attr("value"));if(localStorage.removeItem("search_price"),localStorage.removeItem("search"),localStorage.removeItem("search_color"),localStorage.setItem("search",p),localStorage.setItem("search_color",w),e="",e=isSelfDomain?"/search/result/?sc="+a:"/search/result/"+siteId+"?sc="+a,u=headsearch.chks,r&&(u=$(r)),(u==undefined||u==null||u.length==0)&&(u=$("[name='topSearchForm']").find("[name='headSearchPrice']"),(u==undefined||u==null||u.length==0)&&(u=$("[name='headSearchForm']").find("[name='headSearchPrice']"))),!n&&!(u==undefined||u==null||u.length==0)&&(o=null,s=null,$(u).parents("form").length>0?(o=$(u).parents("form").find($('[name="headFormPriceMin"]')),s=$(u).parents("form").find($('[name="headFormPriceMax"]'))):$(u).parents("section").eq(0).find("form[name=topSearchForm]").length>0&&(v=$(u).parents("section").eq(0).find("form[name=topSearchForm]"),o=v.find($('[name="headFormPriceMin"]')),s=v.find($('[name="headFormPriceMax"]'))),o!=undefined&&o!=null&&o.length>0&&s!=undefined&&s!=null&&s.length>0&&(o.val()!=""||s.val()!=""))){h=0;c=0;try{if(h=parseFloat(o.val()),c=parseFloat(s.val()),isNaN(h)||h<0){o.focus();throw txt_PriceError;}if(isNaN(c)||c<0){s.focus();throw txt_PriceError;}}catch(b){msgBox.showMsgErr(txt_PriceError);return}if(c<=h){msgBox.showMsgErr(txt_BigPriceGreateThanLowerPrice);return}n="M"+h+"L"+c;localStorage.setItem("search_price",h+","+c)}!n||(e+="&price="+n);(t==undefined||t==null||t=="")&&(t=headsearch.headinput.val());!t||(e+="&keyword="+t);location.href=e;return}},searchHeadSimple:function(n,t){var i=$("#"+n).val();t?isSelfDomain?(url="/search/full/?sc=&keyword="+i+"&PageIndex=0&PageSize=10",location.href=url):(url="/search/full/"+siteId+"?sc=&keyword="+i+"&PageIndex=0&PageSize=10",location.href=url):isSelfDomain?(url="/search/result/?sc=&keyword="+i,location.href=url):(url="/search/result/"+siteId+"?sc=&keyword="+i,location.href=url)},getQuerystring:function(n){var i=new RegExp("(^|&)"+n+"=([^&]*)(&|$)"),t=window.location.search.substr(1).match(i);if(t!=null)try{return decodeURI(t[2])}catch(r){return t[2]}return null},searchListening:function(){$(".w_search3").mouseenter(function(){setTimeout(function(){$(".w_search3").hasClass("hover")||$(".w_search3").addClass("hover");$(".w_search3").find(".w_head3_input").focus()},100)});$(".w_search3 .w_head3_btn").unbind("click").click(function(){$(".w_search3").hasClass("hover")&&headsearch.searchHead(null,null,window.isEnableSiteSearch)});$(document).click(function(n){$(n.target).parents(".w_search3").length||$(".w_search3").removeClass("hover")})},searchVerification:function(){var n=headsearch.headinput.val();return typeof n=="undefined"||n==null||n==""||n.trim().length<=0?(msgBox.showMsgErr(window.txt_PleaseEnterKeyWords),!1):!0}};Object.defineProperties(headsearch,{headform:{get:function(){return $('form[name="headSearchForm"]')},writeable:!1},topform:{get:function(){return $('form[name="topSearchForm"]')}},headinput:{get:function(){return $("#keywordspc")!=undefined&&$("#keywordspc")!=null&&$("#keywordspc").length>0?$("#keywordspc"):$("#keywordsphone")!=undefined&&$("#keywordsphone")!=null&&$("#keywordsphone").length>0?$("#keywordsphone"):void 0},writeable:!1}});$(function(){if(window.CurrentSystemDate&&(setInterval(function(){var t=new Date(window.CurrentSystemDate),i=t.getFullYear(),n=t.getMonth()+1,f=t.getDate(),r=t.getHours(),u=t.getMinutes(),e=t.getSeconds()+1,o;e>=60&&(e=e-60,u=u+1,u>=60&&(u=u-60,r=r+1,r>=24&&(r=r-24,f=f+1,o=30,n==2?o=i%4==0?29:28:(n==1||n==3||n==5||n==7||n==8||n==10||n==12)&&(o=31),f>=o&&(f=1,n=n+1,n>=12&&(n=1,i=i+1)))));window.CurrentSystemDate=i+"-"+checkTime(n)+"-"+checkTime(f)+" "+checkTime(r)+":"+checkTime(u)+":"+checkTime(e);$(".copyrightYear").length>0&&!isNaN(Number(i))&&$(".copyrightYear").text(i)},1e3),$(".copyrightYear").length>0&&$(".copyrightYear").text(new Date(window.CurrentSystemDate).getFullYear())),msgBox=new MsgBox({imgHref:(window.contentFileDomain||"")+$("#msgBoximg").val().replace("~","")}),siteId!=592&&$(".nav_more_column").each(function(){var n=$(this).parents("ul").parent().width(),t=$(this).parents("li")[0].offsetLeft,i;t/n>.5&&(i=$(this).parents("li").width(),$(this).css({right:n-t-i+29}))}),setTimeout(function(){ConditionList();window.enableShoppingCart&&(Mouse_Event(),GetList());window.pageVisitRecordUrl&&$.post(pageVisitRecordUrl,{productId:window.simpleProductId},function(){})},6e3),this.location.href.indexOf("/search/result")<0)try{for(var n in localStorage)typeof n=="string"&&n.indexOf("search")==0&&localStorage.removeItem(n)}catch(t){console.log(t)}if($("[isHasValue=isHasValue]").length<=0&&($(".input_group_jt").remove(),$(".w_search_tc").remove(),$(".left_search_box").remove()),$(".imgVcode").click(function(){$(this).attr("src",window.vCodeUrl+"?r="+Math.random()+"&SiteId="+window.siteId)}),$("nav a").click(function(){var n=$(this),i,t;n!=undefined&&n.attr("href")!=""&&(n.attr("target")==""||n.attr("target")==undefined||n.attr("target")==null||n.attr("target")=="_self"?n.attr("href").indexOf("#")>0&&(n.attr("href").indexOf("?")>0?n.attr("href").substring(0,n.attr("href").indexOf("#")).indexOf("?")>0?window.location.href=n.attr("href").substring(0,n.attr("href").indexOf("#"))+"&r="+Math.random()+n.attr("href").substring(n.attr("href").indexOf("#"),n.attr("href").length):(i=n.attr("href").substring(0,n.attr("href").indexOf("#")),t=n.attr("href").substring(n.attr("href").indexOf("#"),n.attr("href").length).split("?"),window.location.href=i+"?"+t[1]+"&r="+Math.random()+t[0]):window.location.href=n.attr("href").substring(0,n.attr("href").indexOf("#"))+"?r="+Math.random()+n.attr("href").substring(n.attr("href").indexOf("#"),n.attr("href").length)):window.open(a.attr("href")))}),IsPhone())$(".showWait").on("tap",function(){msgBox.showMsgWait(txt_OnLoading)});$("#w_logolan_select").change(function(){for(var n,t=0;t<$(this)[0].length;t++)if(this.value==$(this)[0][t].value){n=$(this)[0][t];break}var f=$(n).attr("lang"),r=$(n).attr("curr"),i=$(n).attr("langurl"),u=$(n).val();i=i||location.href;msgBox.showMsgWait(window.txt_Loading);$.post(editLangOrCurrencyUrl,{siteId:siteId,currency:r,langId:langId,addressid:u},function(n){n.status==1?(n.msg!=""&&msgBox.showMsgOk(n.msg),location.href=i):n.msg!=undefined&&n.msg!=""&&msgBox.showMsgErr(n.msg)})});$(".w_li_lang").click(function(){var n=this,u=$(n).attr("lang"),i=$(n).attr("curr"),t=$(n).attr("langurl"),r=$(n).attr("value");t=t||location.href;msgBox.showMsgWait(window.txt_Loading);$.post(editLangOrCurrencyUrl,{siteId:siteId,currency:i,langId:langId,addressid:r},function(n){n.status==1?(n.msg!=""&&msgBox.showMsgOk(n.msg),location.href=t):n.msg!=undefined&&n.msg!=""&&msgBox.showMsgErr(n.msg)})});$(".nav_more_column").each(function(){var n=$(this).parents("ul").parent().width(),t=$(this).parents("li")[0].offsetLeft,i;t/n>.5&&(i=$(this).parents("li").width(),$(this).css({right:n-t-i+23}))});siteId==629&&$(".nav_more_column").each(function(){var n=$(this).parents("li")[0].offsetLeft;$(this).css({left:n}).css({right:""})});$.views.converters("priceformat",function(n){return Qin.format(n)});$.views.converters("priceDiscount",function(n){return 100-Math.round(n*100)});$.views.converters("formatdateNotSecond",function(n){const t=new Date(n),i=t.getFullYear(),r=String(t.getMonth()+1).padStart(2,"0"),u=String(t.getDate()).padStart(2,"0"),f=String(t.getHours()).padStart(2,"0"),e=String(t.getMinutes()).padStart(2,"0");return`${i}-${r}-${u} ${f}:${e}`});$(".banner,.banner4").mouseover(function(){$(this).find(".fa-chevron-left,.fa-chevron-right").attr("style","display:block !important")});$(".banner,.banner4").mouseleave(function(){$(this).find(".fa-chevron-left,.fa-chevron-right").attr("style","")});getCommCookie("AcceptCookie_"+window.siteId)==null&&$(".acceptCookie").length>0&&$(".acceptCookie").show()});var checkTime=function(n){return n<10?"0"+n:n},changLang=function(n,t,i,r,u){u=u||location.href;msgBox.showMsgWait(window.txt_Loading);$.post(editLangOrCurrencyUrl,{siteId:n,currency:t,langId:i,addressid:r},function(n){n.status==1?(n.msg!=""&&msgBox.showMsgOk(n.msg),location.href=u):n.msg!=undefined&&n.msg!=""&&msgBox.showMsgErr(n.msg)})},ProductInCart={createNew:function(){var n={};return n.PosProductId=0,n.AbleProductId=0,n.Count=0,n.SiteId=0,n.RemoveItem=[],n}},DataHelper={ToStr:function(n){return n==undefined||n==null?"":n},ToBool:function(n){return n==undefined||n==null||n==""?!1:n.toLocaleLowerCase()=="true"?!0:!1}};Qin={format:function(n){return isNaN(n)?n:(n=Number(n),(n.toFixed(Decimals)+"").replace(/\d{1,3}(?=(\d{3})+(\.\d*)?$)/g,"$&,"))},formatRound:function(n){function o(n){var r=n.indexOf("."),t,u,i;if(r===-1){for(Decimals>0&&(n+="."),t=0;t<Decimals;t++)n+="0";return n}for(u=Decimals-(n.length-r-1),i=0;i<u;i++)n+="0";return n}function i(n){return n.replace(/\d{1,3}(?=(\d{3})+(\.\d*)?$)/g,"$&,")}var r=Number(n),t,u,s,e;if(isNaN(r)||r>=Math.pow(10,21))return i(r.toString());if(typeof Decimals=="undefined"||Decimals===0)return i(Math.round(r).toString());if(t=r.toString(),u=t.split("."),u.length<2)return i(o(t));var h=u[0],f=u[1],c=f.substr(Decimals,1);return f.length===Decimals?i(t):f.length<Decimals?i(o(t)):(t=h+(Decimals==0?"":".")+f.substr(0,Decimals),parseInt(c,10)>=5&&(s=Math.pow(10,Decimals),e=Number(t.replace(".","")),e++,e/=s,t=o(e)),i(t))}};urlHelper={Requst:function(n){var i=new RegExp("(^|&)"+n+"=([^&]*)(&|$)"),t=window.location.search.substr(1).match(i);return t!=null?decodeURI(t[2]):null},PushState:function(n,t,i,r){(typeof i=="undefined"||i==undefined)&&(i="page");var u=window.location.href;u.indexOf(i)<0?u.indexOf("?")<0?u=window.location.href.substring(0,window.location.href.indexOf("#"))+("?"+i+"="+r+window.location.hash):u+="&"+i+"="+r:u=u.replace(n,t);window.history.pushState({},0,u)}};$(document).ajaxStart().ajaxSend(function(n,t,i){i.url+=i.url.indexOf("?")>-1?"&isajax=1":"?isajax=1"}).ajaxSuccess(function(){}).ajaxComplete(function(n,t){var i=t.responseJSON,r;(i==undefined||i==null)&&t.responseText!=undefined&&t.responseText.indexOf('"status":')>=0&&t.responseText.indexOf('"msg":')>=0&&t.responseText.indexOf('"islogin":')>=0&&(i=$.parseJSON(t.responseText));i!=undefined&&i.islogin==0&&(msgBox.showMsgErr(i.msg),r=location.href.toLocaleLowerCase(),r.indexOf("member/login")==-1&&r.indexOf("member/register")==-1&&loginUrl!=""&&setTimeout(function(){top.window.location=loginUrl},2e3))}).ajaxStop(function(){}).ajaxError(function(){});checkLangOrCurrency();$(function(){/Android|webOS|iPhone|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)&&$.getScript("/js/m_leftmenu_leftnav.js")});$(document).ready(function(){$lis2=$(".history_pro_con ul li");$windows2=$(".history_pro_box .history_pro_pic");$lefts2=$(".history_pro_box .history_pro_prev");$rights2=$(".history_pro_box .history_pro_next");$windows2.css("width",$lis2.length*70);$(".history_pro_box .history_pro_prev ").css("opacity",".4");var n=0,t=$lis2.length-5;$lefts2.click(function(){if($(".history_pro_box .history_pro_next ").css("opacity","1"),n<1){$(".history_pro_box .history_pro_prev ").css("opacity",".4");return}n--;t++;$windows2.animate({top:"+=100px"},100)});$rights2.click(function(){if($(".history_pro_box .history_pro_prev ").css("opacity","1"),t<1){$(".history_pro_box .history_pro_next ").css("opacity",".4");return}n++;t--;$windows2.animate({top:"-=100px"},100)})});$(document).ready(function(){initTelInput();$(document).on("click",".intl-tel-input .country-list li",function(){$(this).parents(".intl-tel-input").next("input[type='hidden']").val($(this).attr("data-dial-code"))})});var countdown=120,countdownSource=120,cleartime=null,sourceTexr="";h_spCodesTemp="";h_strModuleTranslate=window.txt_InventoryShortageTips;jQuery.fn.isChildOf=function(n){return this.parents(n).length>0};jQuery.fn.isChildAndSelfOf=function(n,t){var i=this.closest(n).length;return i+=this.closest(t).length,i>0};$(document).click(function(n){var i=window.screen.width,t;Number(i)<=450&&(t=$(n.target).isChildAndSelfOf(".w_mobilcon",".nav_collapse"),t||$(".nav_collapse").slideUp("slow"))});onlyCountries=[];window.nativeAlert=window.alert;window.alert=function(n,t){alterIn(n);$(".popup_prompt_alter .ok").one("click",function(){alterOut();t&&t()})};window.hiredirect=function(n){window.location.href=n};window.hireload=function(){window.reload()};window.nativeConfirm=window.confirm;window.confirm=function(n,t,i,r,u){r?$(".popup_prompt_menu .ok").html(r):$(".popup_prompt_menu .ok").html(txt_Confirm);u?$(".popup_prompt_menu .cancel").html(u):$(".popup_prompt_menu .cancel").html(txt_Cancel);confirmIn(n);$(".popup_prpmpt_confirm .ok").unbind("click").bind("click",function(n){t&&t();windowOut(n)});$(".popup_prpmpt_confirm .cancel").unbind("click").bind("click",function(n){i&&i();windowOut(n)})};Accordion=function(n,t){this.el=n||{};this.multiple=t||!1;var i=this.el.find(".link");i.on("click",{el:this.el,multiple:this.multiple},this.dropdown)};Accordion.prototype.dropdown=function(n){var t=n.data.el;$this=$(this);$next=$this.next();$next.stop().slideToggle(200);$this.parent().toggleClass("accor-open");n.data.multiple||t.find(".subcon").not($next).stop().slideUp(200).parent().removeClass("accor-open")};String.prototype.replaceAll=function(n,t){var i=new RegExp(n,"g");return this.replace(i,t)};var commonUploadFile={uploadPic:function(n,t,i){var e=n.id,f=$("#"+e),u=f.val(),r;if(typeof u!="undefined"&&u!=""){if(r=u.substring(u.lastIndexOf(".")+1).toLowerCase(),r!="gif"&&r!="jpeg"&&r!="jpg"&&r!="png"&&r!="jpe"&&r!="jp2"&&r!="webp"&&r!="pdf"){msgBox.showMsgErr(window.txt_PleaseSelectImageFormatUpload);return}msgBox.showMsgWait("");$.ajaxFileUpload({type:"post",secureuri:!1,fileElementId:e,dataType:"json",url:window.getCommonUploadPicUrl,success:function(n){if(msgBox.hidBox(),f.val(""),n.Code!=0){msgBox.showMsgErr(n.Message);return}t&&(n.fileName=u,t(n));msgBox.showMsgOk(window.txt_uploadSuccessTip)},error:function(n){msgBox.hidBox();i&&i(n);f.val("")}})}}},commonVerify={isEmail:function(n){if(n==undefined||n==""||n.length<=0)return!1;return n.match(/^[a-zA-Z0-9]+([._\\-]*[a-zA-Z0-9])*@([a-zA-Z0-9]+[-a-zA-Z0-9]*[a-zA-Z0-9]+.){1,63}[a-z0-9]+$/)}},commonFromVerify={init:function(){commonFromVerify.bindEvent()},bindEvent:function(){$(document).on("blur","[required]",function(){commonFromVerify.required($(this))});$(document).on("change","[required]",function(){commonFromVerify.required($(this))});$(document).on("blur","[comparison]",function(){commonFromVerify.comparison($(this))});$(document).on("change","[regexp]",function(){commonFromVerify.regexp($(this))});$(document).on("blur","[subrequired]",function(){commonFromVerify.subrequired($(this))});$(document).on("change","[subrequired]",function(){commonFromVerify.subrequired($(this))})},required:function(n){var t="",e=$(n).attr("id"),i=$(n).attr("type"),r,f,u;if($(n).is("input")&&i!="checkbox"||$(n).is("select"))if(t=$(n).val(),t&&typeof t!=undefined&&t!=null&&t!=""){if(typeof $(n).attr("groupname")!="undefined"&&(r=$(n).attr("groupname"),r!=null&&r!=""&&(f=!1,$("[groupname='"+r+"']").each(function(){var t=$(this).val();if(!t||typeof t==undefined||t==null||t=="")return commonFromVerify.setErrorTips(n,window.txt_Required),f=!0,!1}),f)))return;typeof $(n).attr("regexp")!="undefined"?commonFromVerify.regexp(n):commonFromVerify.removeErrorTips(n)}else{commonFromVerify.setErrorTips(n);return}if($(n).is("input")&&i=="tel"){setTimeout(function(){$(n).hasClass("error")?$(n).parents(".form-group").addClass("has-error"):typeof $(n).attr("mobileexist")!="undefined"||$(n).parents(".form-group").removeClass("has-error")},1e3);return}if($(n).is("input")&&i=="email"){if(!commonVerify.isEmail($(n).val())){commonFromVerify.setErrorTips(n,window.txt_EmailError);return}typeof $(n).attr("emailexistse")!="undefined"}else $(n).is("input")&&i=="checkbox"&&(typeof $(n).attr("groupname")!="undefined"?(u=$(n).attr("groupname"),u!=null&&u!=""&&($("[groupname='"+u+"']").is(":checked")?commonFromVerify.removeErrorTips(n):commonFromVerify.setErrorTips(n,window.txt_Required))):$(n).is(":checked")?commonFromVerify.removeErrorTips(n):commonFromVerify.setErrorTips(n,window.txt_PleaseCheckTips))},subrequired:function(n){var t="",e=$(n).attr("id"),i=$(n).attr("type"),r,f,u;if($(n).is("input")&&i!="checkbox"||$(n).is("select"))if(t=$(n).val(),t&&typeof t!=undefined&&t!=null&&t!=""){if(typeof $(n).attr("groupname")!="undefined"&&(r=$(n).attr("groupname"),r!=null&&r!=""&&(f=!1,$("[groupname='"+r+"']").each(function(){var t=$(this).val();if(!t||typeof t==undefined||t==null||t=="")return commonFromVerify.setSubErrorTips(n,window.txt_Required),f=!0,!1}),f)))return;typeof $(n).attr("regexp")!="undefined"?commonFromVerify.regexp(n):commonFromVerify.removeSubErrorTips(n)}else{commonFromVerify.setSubErrorTips(n);return}if($(n).is("input")&&i=="tel"){setTimeout(function(){$(n).hasClass("error")?$(n).parents(".form-group").addClass("has-error"):typeof $(n).attr("mobileexist")!="undefined"?commonFromVerify.mobileExistse($(n),function(){$(n).parents(".form-group").removeClass("has-error")}):$(n).parents(".form-group").removeClass("has-error")},1e3);return}if($(n).is("input")&&i=="email"){if(!commonVerify.isEmail($(n).val())){commonFromVerify.setSubErrorTips(n,window.txt_EmailError);return}typeof $(n).attr("emailexistse")!="undefined"&&commonFromVerify.emailExistse($(n))}else $(n).is("input")&&i=="checkbox"&&(typeof $(n).attr("groupname")!="undefined"?(u=$(n).attr("groupname"),u!=null&&u!=""&&($("[groupname='"+u+"']").is(":checked")?commonFromVerify.removeSubErrorTips(n):commonFromVerify.setSubErrorTips(n,window.txt_Required))):$(n).is(":checked")?commonFromVerify.removeSubErrorTips(n):commonFromVerify.setSubErrorTips(n,window.txt_PleaseCheckTips))},comparison:function(n){var e=$(n).attr("id"),r=$(n).attr("comparisonId"),t=$(n).attr("errorTips"),u=$(n).val(),f=$("#"+r).val(),i;if(u!=f){i="";i=t&&t!=null&&t!=""?t:window.txt_ComparisonError;commonFromVerify.setErrorTips(n,i);return}commonFromVerify.removeErrorTips(n)},regexp:function($input){var value=$($input).val(),patt=$($input).attr("regexp"),tips=$($input).attr("regexptips");if(typeof patt!=undefined&&patt!=null&&patt!=""){if(!value||typeof value==undefined||value==null||value==""){commonFromVerify.removeErrorTips($input);return}if(eval(patt).test(value)){(typeof tips==undefined||tips==null||tips=="")&&(tips="error");commonFromVerify.setErrorTips($input,tips);return}commonFromVerify.removeErrorTips($input)}},setErrorTips:function(n,t){var i=$(n).attr("id");(typeof i==undefined||i==null||i==""||$("."+i+"Error").length<=0)&&(i=$(n).attr("groupname"));$(n).addClass("has-error");typeof t!=undefined&&t!=null&&t!=""?$("."+i+"Error").html(t):$("."+i+"Error").html(window.txt_Required);return},removeErrorTips:function(n){var t=$(n).attr("id"),i;(typeof t==undefined||t==null||t==""||$("."+t+"Error").length<=0)&&(t=$(n).attr("groupname"));$(n).removeClass("has-error");i=$("."+t+"Error").attr("tips");i==undefined&&(i="");$("."+t+"Error").html(i)},setSubErrorTips:function(n){var t=$(n).attr("id");(typeof t==undefined||t==null||t==""||$("."+t+"Error").length<=0)&&(t=$(n).attr("groupname"));$(n).addClass("has-control-error");return},removeSubErrorTips:function(n){var t=$(n).attr("id");(typeof t==undefined||t==null||t==""||$("."+t+"Error").length<=0)&&(t=$(n).attr("groupname"));$(n).removeClass("has-control-error")},setGroupErrorTips:function(n,t){var i=$(n).attr("groupname");$(n).addClass("has-error");typeof t!=undefined&&t!=null&&t!=""?$("."+i+"Error").html(t):$("."+i+"Error").html(window.txt_Required);return},fromVerify:function(n){var t=!0,i=0;($(".has-error").each(function(){var n=$(this);if(!n.hasClass("hide"))return t=!1,commonFromVerify.scrollTo(n.offset().top),!1}),t)&&($(".has-control-error").each(function(){var n=$(this);if(!n.hasClass("hide"))return t=!1,commonFromVerify.scrollTo(n.offset().top),!1}),$("[required]").each(function(){var n=$(this);if(n.hasClass("hide"))return!0;n.hasClass("hide")||n.hasClass("has-error")||(commonFromVerify.required(n),n.hasClass("has-error")&&(t=!1,i==0&&commonFromVerify.scrollTo(n.offset().top),i++))}),$("[comparison]").each(function(){var n=$(this);if(n.hasClass("hide"))return!0;n.hasClass("hide")||n.hasClass("has-error")||(commonFromVerify.comparison(n),n.hasClass("has-error")&&(t=!1,i==0&&commonFromVerify.scrollTo(n.offset().top),i++))}),i=0,$("[subrequired]").each(function(){var n=$(this);if(n.hasClass("hide"))return!0;n.hasClass("hide")||n.hasClass("has-control-error")||(commonFromVerify.subrequired(n),n.hasClass("has-control-error")&&(t=!1,i==0&&commonFromVerify.scrollTo(n.offset().top),i++))}),t&&n())},scrollTo:function(n){typeof n=="undefined"&&(n=0);$("html,body").animate({scrollTop:n-15},500)}},customPhoneArea={initPhoneArea:function(n,t,i,r){if(t&&$(t).is("select")){var u=function(u){var s="",e,f,o;if(u!=null&&u.length>0)for(e=0;e<u.length;e++)f=u[e].InternationalDialCode,o=u[e].regularExpression,s+=n==f?'<option value="'+f+'" regexper="'+o+'" selected>+'+f+"<\/option>":'<option value="'+f+'" regexper="'+o+'">+'+f+"<\/option>";$(t).html(s);customPhoneArea.bindPhoneAreaChange(t,i,r);customPhoneArea.bindPhoneChange(t,i,r)};customPhoneArea.getPhoneArea(u)}},getPhoneArea:function(n,t){window.phoneAreaList=[];window.staticPhoneAreaList?(window.phoneAreaList=window.staticPhoneAreaList,n(window.phoneAreaList)):$.ajax({url:window.phoneAreaScope,type:"POST",data:{siteId:window.siteId},async:!1,cache:!1,success:function(i){if(i!=null&&i!=""){var r=JSON.parse(i);window.phoneAreaList=r.data;n(window.phoneAreaList)}else t()},error:function(n){t(n)}})},bindPhoneAreaChange:function(n,t,i){n&&t&&$(n).change(function(){var n=t.val(),r=$(this).val(),u=$(this).find("option[value='"+r+"']").attr("regexper");customPhoneArea.validPhone(n,u,t,i)})},bindPhoneChange:function(n,t,i){n&&t&&$(t).change(function(){var r=$(this).val(),u=n.val(),f=$(n).find("option[value='"+u+"']").attr("regexper");customPhoneArea.validPhone(r,f,t,i)})},bindPhoneblur:function(n,t,i){n&&t&&$(t).blur(function(){var r=$(this).val(),t=n.val(),u=$(n).find("option[value='"+t+"']").attr("regexper");isValidPhoneCustom(t,r)?($(i).html()==""||$(i).html()==window.txt_PhoneInvalid)&&($(i).addClass("hide"),$(i).html(""),$(i).hide()):($(i).removeClass("hide"),$(i).show(),$(i).html(window.txt_PhoneInvalid))})},validPhone:function(phone,regexper,$phone,$msg){var isSameNumber,tips;if(phone==null||phone==""){$msg&&($($msg).html(""),$($msg).addClass("hide"));return}if(isSameNumber=/^([0-9])\1{6}$/,isSameNumber.test(phone)){$msg&&($($msg).html(window.txt_PhoneInvalid),$($msg).removeClass("hide"));return}if(typeof regexper=="undefined"||regexper=="undefined"||regexper==null||regexper=="null"||regexper==""){$($phone).blur();return}tips=window.txt_PhoneInvalid;typeof $($phone).attr("phoneTips")!="undefined"&&$($phone).attr("phoneTips")!=""&&(tips=$($phone).attr("phoneTips"));eval(regexper).test(phone)?$msg&&($($msg).html(""),$($msg).addClass("hide")):$msg&&($($msg).removeClass("hide"),$($msg).html(tips))}};jQuery.extend({handleError:function(n,t,i,r){n.error&&n.error.call(n.context||n,t,i,r);n.global&&(n.context?jQuery(n.context):jQuery.event).trigger("ajaxError",[t,n,r])},httpData:function(xhr,type,s){var ct=xhr.getResponseHeader("content-type"),xml=type=="xml"||!type&&ct&&ct.indexOf("xml")>=0,data=xml?xhr.responseXML:xhr.responseText;if(xml&&data.documentElement.tagName=="parsererror")throw"parsererror";return s&&s.dataFilter&&(data=s.dataFilter(data,type)),typeof data=="string"&&(type=="script"&&jQuery.globalEval(data),type=="json"&&(data=window.eval("("+data+")"))),data}});jQuery.extend({ajaxFileUpload:function(n){var f,t,e,i;n=jQuery.extend({},jQuery.ajaxSettings,n);var r=(new Date).getTime(),i=jQuery.createUploadForm(r,n.fileElementId),h=jQuery.createUploadIframe(r,n.secureuri),u="jUploadFrame"+r,o="jUploadForm"+r;n.global&&!jQuery.active++&&jQuery.event.trigger("ajaxStart");f=!1;t={};n.global&&jQuery.event.trigger("ajaxSend",[t,n]);e=function(r){var e=document.getElementById(u),o,h;try{e.contentWindow?(t.responseText=e.contentWindow.document.body?e.contentWindow.document.body.innerHTML:null,t.responseXML=e.contentWindow.document.XMLDocument?e.contentWindow.document.XMLDocument:e.contentWindow.document,e.contentWindow.document.contentType==="application/json"&&(t.responseText=e.contentWindow.document.body.innerText)):e.contentDocument&&(t.responseText=e.contentDocument.document.body?e.contentDocument.document.body.innerHTML:null,t.responseXML=e.contentDocument.document.XMLDocument?e.contentDocument.document.XMLDocument:e.contentDocument.document,e.contentDocument.document.contentType==="application/json"&&(t.responseText=e.contentDocument.document.body.innerText))}catch(s){jQuery.handleError(n,t,null,s);return}if(t||r=="timeout"){f=!0;try{o=r!="timeout"?"success":"error";o!="error"?(h=jQuery.uploadHttpData(t,n.dataType),n.success&&n.success(h,o),n.global&&jQuery.event.trigger("ajaxSuccess",[t,n])):jQuery.handleError(n,t,o)}catch(s){o="error";jQuery.handleError(n,t,o,s);return}n.global&&jQuery.event.trigger("ajaxComplete",[t,n]);n.global&&!--jQuery.active&&jQuery.event.trigger("ajaxStop");n.complete&&n.complete(t,o);jQuery(e).unbind();setTimeout(function(){try{jQuery(e).remove();jQuery(i).remove()}catch(r){jQuery.handleError(n,t,null,r);return}},100);t=null}};n.timeout>0&&setTimeout(function(){f||e("timeout")},n.timeout);try{i=jQuery("#"+o);jQuery(i).attr("action",n.url);jQuery(i).attr("method","POST");jQuery(i).attr("target",u);i.encoding?jQuery(i).attr("encoding","multipart/form-data"):jQuery(i).attr("enctype","multipart/form-data");jQuery(i).submit()}catch(s){jQuery.handleError(n,t,null,s);return}return jQuery("#"+u).load(e),{abort:function(){}}},createUploadIframe:function(n,t){var r="jUploadFrame"+n,i='<iframe id="'+r+'" name="'+r+'" style="position:absolute; top:-9999px; left:-9999px"';return window.ActiveXObject&&(typeof t=="boolean"?i+=' src="javascript:false"':typeof t=="string"&&(i+=' src="'+t+'"')),i+=" />",jQuery(i).appendTo(document.body),jQuery("#"+r).get(0)},createUploadForm:function(n,t){var u="jUploadForm"+n,f="jUploadFile"+n,i=jQuery('<form  action="" method="POST" name="'+u+'" id="'+u+'" enctype="multipart/form-data"><\/form>'),r=jQuery("#"+t),e=jQuery(r).clone();return jQuery(r).attr("id",f),jQuery(r).before(e),jQuery(r).appendTo(i),jQuery(i).css("position","absolute"),jQuery(i).css("top","-1200px"),jQuery(i).css("left","-1200px"),jQuery(i).appendTo("body"),i},uploadHttpData:function(r,type){var data=!type,start,end;return data=type=="xml"||data?r.responseXML:r.responseText,type=="script"&&jQuery.globalEval(data),type=="json"&&(data=r.responseText,start=data.indexOf(">"),start!=-1&&(end=data.indexOf("<",start+1),end!=-1&&(data=data.substring(start+1,end))),eval("data = "+data)),type=="html"&&jQuery("<div>").html(data).evalScripts(),data}}),function(n){typeof define=="function"&&define.amd?define(["jquery"],n):typeof exports=="object"?n(require("jquery")):n(jQuery)}(function(n){function i(n){return t.raw?n:encodeURIComponent(n)}function f(n){return t.raw?n:decodeURIComponent(n)}function e(n){return i(t.json?JSON.stringify(n):String(n))}function o(n){n.indexOf('"')===0&&(n=n.slice(1,-1).replace(/\\"/g,'"').replace(/\\\\/g,"\\"));try{return n=decodeURIComponent(n.replace(u," ")),t.json?JSON.parse(n):n}catch(i){}}function r(i,r){var u=t.raw?i:o(i);return n.isFunction(r)?r(u):u}var u=/\+/g,t=n.cookie=function(u,o,s){var y,a,h,v,c,p;if(o!==undefined&&!n.isFunction(o))return s=n.extend({},t.defaults,s),typeof s.expires=="number"&&(y=s.expires,a=s.expires=new Date,a.setTime(+a+y*864e5)),document.cookie=[i(u),"=",e(o),s.expires?"; expires="+s.expires.toUTCString():"",s.path?"; path="+s.path:"",s.domain?"; domain="+s.domain:"",s.secure?"; secure":""].join("");for(h=u?undefined:{},v=document.cookie?document.cookie.split("; "):[],c=0,p=v.length;c<p;c++){var w=v[c].split("="),b=f(w.shift()),l=w.join("=");if(u&&u===b){h=r(l,o);break}u||(l=r(l))===undefined||(h[b]=l)}return h};t.defaults={};n.removeCookie=function(t,i){return n.cookie(t)===undefined?!1:(n.cookie(t,"",n.extend({},i,{expires:-1})),!n.cookie(t))}});easesales=window.easesales||{},function(n){var f=function(){if(window.memberNo)return window.memberNo;var t=n.cookie("GTM_UserId")||Math.random().toString(36).substring(3);return n.cookie("GTM_UserId",t),t};easesales.dataTable=easesales.dataTable||{};easesales.dataTable.googleTagTemplates=easesales.dataTable.googleTagTemplates||{};easesales.dataTable.googleTagSiteEvents={"default":["productView","productClick","productDetails","addToCart","removeFromCart","checkout","cartPageview","purchase","sign_up","viewCart"]};easesales.dataTable.googleTagTemplates["default"]={productView:function(t){var i=[],r=0;return n.each(t.products||[],function(){r++;this.list_name=this.list_name||t.list_name||document.title||"";this.list_id=this.list_id||t.list_id||document.title||"";var u={item_name:this.ProductName,item_id:this.ProductNo,price:parseFloat(this.SalesPrice||this.Price).toFixed(2).toString(),item_brand:this.Brand||"",item_category:this.ClassNames1||this.ClassNames||"",item_category_2:this.ClassNames2||"",item_category_3:this.ClassNames3||"",item_category_4:this.ClassNames4||"",item_variant:"",item_list_name:this.list_name,item_list_id:this.list_id,index:r,quantity:1};n.each(this.PropertyDetailList||[],function(n){u.item_variant+=(n>0?",":"")+(this.PropertyNameEN||this.PropertyName)+":"+(this.ValueEN||this.Value)});i.push(u)}),{event:"view_item_list",ecommerce:{items:i}}},productClick:function(t){var i,r;try{return i={item_name:t.product.ProductName,item_id:t.product.ProductNo,item_brand:t.product.Brand||"",item_category:t.product.ClassNames1||t.product.ClassNames||"",item_category_2:t.product.ClassNames2||"",item_category_3:t.product.ClassNames3||"",item_category_4:t.product.ClassNames4||"",item_variant:"",item_list_name:t.product.list_name,item_list_id:t.product.list_id,index:t.product.position,quantity:"1",price:parseFloat(t.product.SalesPrice||t.product.Price).toFixed(2).toString()},n.each(t.product.PropertyDetailList||[],function(n){i.item_variant+=(n>0?",":"")+(this.PropertyNameEN||this.PropertyName)+":"+(this.ValueEN||this.Value)}),r=[],r.push(i),{event:"select_item",ecommerce:{items:r},eventCallback:function(){t.callbackUrl?document.location=t.callbackUrl:console.log("Missing [productClickG4] callback url")}}}catch(u){return t.callbackUrl?document.location=t.callbackUrl:console.log("Missing [productClickG4] callback url"),null}},productDetails:function(t){var i={item_name:t.product.ProductName,item_id:t.product.ProductNo,price:parseFloat(t.product.SalesPrice||t.product.Price).toFixed(2).toString(),item_brand:t.product.Brand||"",item_category:t.product.ClassNames1||t.product.ClassNames||"",item_category_2:t.product.ClassNames2||"",item_category_3:t.product.ClassNames3||"",item_category_4:t.product.ClassNames4||"",item_variant:t.product.variant||"",quantity:t.quantity||1};return i.item_variant||n.each(t.product.PropertyList||[],function(t){var r=this.PropertyNameEN||this.PropertyName;n.each(this.PropertyValueList||[],function(n){i.item_variant+=(t>0||n>0?",":"")+r+":"+(this.ValueEN||this.Value)})}),{event:"view_item",ecommerce:{items:[i]}}},cartPageview:function(t){var i=[],r=0;return n.each(t.products||[],function(){r++;var t={item_name:this.ProductName,item_id:this.ProductNo,price:parseFloat(this.SalesPrice||this.Price).toFixed(2).toString(),item_brand:this.Brand||"",item_category:this.ClassNames1||this.ClassNames||document.title.replace(" - null",""),item_category_2:this.ClassNames2||"",item_category_3:this.ClassNames3||"",item_category_4:this.ClassNames4||"",item_variant:"",item_list_name:document.title,item_list_id:"Cart_Pageview",index:r,quantity:this.Quantity};n.each(this.SalesPropertyList||[],function(n){var i=this.PropertyValueList.length?this.PropertyValueList[0].ValueEN||this.PropertyValueList[0].Value:"";t.item_variant+=(n>0?",":"")+(this.PropertyNameEN||this.PropertyName)+":"+i;t.item_variant=t.item_variant.replace("\r\n","").replace("\n","")});i.push(t)}),{event:"Cart_Pageview",ecommerce:{items:i}}},viewCart:function(t){var i=[],r=[],u=0;return n.each(t.products||[],function(){u++;var t={item_name:this.ProductName,item_id:this.ProductNo,price:parseFloat((this.SalesPrice||this.Price).toFixed(2)),item_brand:this.Brand||"",item_category:this.ClassNames1||this.ClassNames||document.title.replace(" - null",""),item_category_2:this.ClassNames2||"",item_category_3:this.ClassNames3||"",item_category_4:this.ClassNames4||"",item_variant:"",item_list_name:document.title,item_list_id:"checkout",index:u,quantity:parseInt(this.Quantity||1),currency:window.currency};n.each(this.SalesPropertyList||[],function(n){var i=this.PropertyValueList.length?this.PropertyValueList[0].ValueEN||this.PropertyValueList[0].Value:"";t.item_variant+=(n>0?",":"")+(this.PropertyNameEN||this.PropertyName)+":"+i});i.push(t)}),t.order&&(t.order.payment&&r.push(t.order.payment),t.order.delivery&&r.push(t.order.delivery),window.localStorage[t.order.id]=JSON.stringify({order:t.order,products:i,option:r})),{event:"view_cart",ecommerce:{currency:window.currency,value:t.total,items:i}}},addToCart:function(t){var i=[];return n.each(t.products||[],function(){var n={item_name:this.ProductName,item_id:this.ProductNo,price:parseFloat(this.SalesPrice||this.Price).toFixed(2).toString(),item_brand:this.Brand||"",item_category:this.ClassNames1||this.ClassNames||document.title.replace(" - null",""),item_category_2:this.ClassNames2||"",item_category_3:this.ClassNames3||"",item_category_4:this.ClassNames4||"",item_variant:this.Property||"",quantity:this.Quantity||1};i.push(n)}),{event:"add_to_cart",ecommerce:{items:i}}},removeFromCart:function(t){var i=[];return n.each(t.products||[],function(){var t={item_name:this.ProductName,item_id:this.ProductNo,price:parseFloat(this.SalesPrice||this.Price).toFixed(2).toString(),item_brand:this.Brand||"",item_category:this.ClassNames1||this.ClassNames||"",item_category_2:this.ClassNames2||"",item_category_3:this.ClassNames3||"",item_category_4:this.ClassNames4||"",item_variant:this.Property||"",quantity:this.Quantity};n.each(this.SalesPropertyList||[],function(n){var i=this.PropertyValueList.length?this.PropertyValueList[0].ValueEN||this.PropertyValueList[0].Value:"";t.item_variant+=(n>0?",":"")+(this.PropertyNameEN||this.PropertyName)+":"+i});i.push(t)}),{event:"remove_from_cart",ecommerce:{items:i},eventCallback:function(){t.callback&&n.isFunction(t.callback)&&t.callback()}}},checkout:function(t){var i=[],r=[],u=0;return n.each(t.products||[],function(){u++;var t={item_name:this.ProductName,item_id:this.ProductNo,price:parseFloat(this.SalesPrice||this.Price).toFixed(2).toString(),item_brand:this.Brand||"",item_category:this.ClassNames1||this.ClassNames||document.title.replace(" - null",""),item_category_2:this.ClassNames2||"",item_category_3:this.ClassNames3||"",item_category_4:this.ClassNames4||"",item_variant:"",item_list_name:document.title,item_list_id:"checkout",index:u,quantity:this.Quantity};n.each(this.SalesPropertyList||[],function(n){var i=this.PropertyValueList.length?this.PropertyValueList[0].ValueEN||this.PropertyValueList[0].Value:"";t.item_variant+=(n>0?",":"")+(this.PropertyNameEN||this.PropertyName)+":"+i});i.push(t)}),t.order&&(t.order.payment&&r.push(t.order.payment),t.order.delivery&&r.push(t.order.delivery),window.localStorage[t.order.id]=JSON.stringify({order:t.order,products:i,option:r})),{event:"begin_checkout",ecommerce:{items:i,total:t.total},eventCallback:function(){t.callbackUrl?document.location=t.callbackUrl:console.log("Missing [checkout] callback url")}}},payment:function(n){var t=[];return n.order&&(n.order.payment&&t.push(n.order.payment),n.order.delivery&&t.push(n.order.delivery)),{event:"checkout",ecommerce:{checkout:{actionField:{step:n.step,option:t.join(";")},products:n.products}},eventCallback:function(){n.callbackUrl?document.location=n.callbackUrl:console.log("Missing [checkout] callback url")}}},sign_up:function(){return{event:"sign_up",ecommerce:{method:"Google"}}},purchase:function(n){return!n||!n.items?null:(n.value&&(n.total=isNaN(n.value)?0:parseFloat(n.value)),{event:"purchase",ecommerce:{purchase:n,total:n.total}})},displayCoupon:function(n){return!n||!n.coupons||!n.coupons.length?null:{event:"promoViewNonInteractive",ecommerce:{promoView:{promotions:n.coupons}}}},couponClick:function(n){return!n||!n.coupons||!n.coupons.length?null:{event:"promotionClick",ecommerce:{promoClick:{promotions:n.coupons}},eventCallback:function(){n.callbackUrl?document.location=n.callbackUrl:console.log("Missing [couponClick] callback url")}}},promotionView:function(t){var i=[];return n.each(t.products||[],function(){var r={item_name:this.ProductName,item_id:this.ProductNo,price:parseFloat(this.SalesPrice||this.Price).toFixed(2).toString(),item_brand:this.Brand||"",item_category:this.ClassNames||"",item_category_2:"",item_category_3:"",item_category_4:"",item_variant:"",promotion_id:t.promotion_id||"",promotion_name:t.promotion_name||"",creative_name:t.creative_name||"",creative_slot:t.creative_slot||"",location_id:t.location_id||"",quantity:this.Quantity};n.each(this.SalesPropertyList||[],function(n){var t=this.PropertyValueList.length?this.PropertyValueList[0].ValueEN||this.PropertyValueList[0].Value:"";r.item_variant+=(n>0?",":"")+(this.PropertyNameEN||this.PropertyName)+":"+t});i.push(r)}),{event:"view_promotion",ecommerce:{items:i}}},promotionClick:function(t){var i=[];return n.each(t.products||[],function(){var r={item_name:this.ProductName,item_id:this.ProductNo,price:parseFloat(this.SalesPrice||this.Price).toFixed(2).toString(),item_brand:this.Brand||"",item_category:this.ClassNames||"",item_category_2:"",item_category_3:"",item_category_4:"",item_variant:"",promotion_id:t.promotion_id||"",promotion_name:t.promotion_name||"",creative_name:t.creative_name||"",creative_slot:t.creative_slot||"",location_id:t.location_id||"",quantity:this.Quantity};n.each(this.SalesPropertyList||[],function(n){var t=this.PropertyValueList.length?this.PropertyValueList[0].ValueEN||this.PropertyValueList[0].Value:"";r.item_variant+=(n>0?",":"")+(this.PropertyNameEN||this.PropertyName)+":"+t});i.push(r)}),{event:"select_promotion",ecommerce:{items:i}}}};var t={},u={},i={},r="EaseSales_GoogleTagManager_DataStorage_"+window.siteId;easesales.googleTagMgr={start:function(){window.dataLayer=window.dataLayer||[];var t=function(){var t=JSON.parse(window.localStorage[r]||"[]"),n;if(t.length){for(console.log("Sending data in the localStorage..."),n=0;n<t.length;n++)easesales.googleTagMgr.send(t[n]);window.localStorage[r]="[]"}},n=function(){window.google_tag_manager?t():setTimeout(n,100)};n()},saveDataToLocalStorage:function(n){var t=JSON.parse(window.localStorage[r]||"[]");t.push(n);window.localStorage[r]=JSON.stringify(t)},send:function(t){return window.google_tag_manager?(t&&!t.user_id&&(t.user_id=f()),console.log(t),window.dataLayer=window.dataLayer||[],dataLayer.push({ecommerce:null}),dataLayer.push(t),t.eventCallback&&n.isFunction(t.eventCallback)&&setTimeout(t.eventCallback,10),!0):(console.log("The message could not be sent, it will be send after the GTM load"),easesales.googleTagMgr.saveDataToLocalStorage(t),!1)},template:function(n,t){!window.google_tag_manager&&t.callbackUrl&&(document.location=t.callbackUrl);var r=0,i=easesales.dataTable.googleTagTemplates[r]||easesales.dataTable.googleTagTemplates["default"],u=easesales.dataTable.googleTagSiteEvents[r]||easesales.dataTable.googleTagSiteEvents["default"];return u.indexOf(n)<0?null:i&&i[n]?i[n](t):(console.error("Missing google tag manager function:"+n),null)},productView:function(i){i=n.extend({},{currencyCode:"HKD",products:[]},i);easesales.googleTagMgr.send(this.template("productView",i));n.each(i.products,function(){this.position=Object.getOwnPropertyNames(t).length+1;t[this.POSChildProductId]||(t[this.POSChildProductId]=this)});var r=function(){if(!window.google_tag_manager){setTimeout(r,100);return}n(".link-product-details,.quickeshopdetail,.pro_fourlist a").filter("[event!='productclick']").each(function(){var u=n(this).attr("href"),r=n(this).data("productid"),f=n(this).attr("target");n(this).attr("event","productclick").click(function(n){t[r]&&(window.localStorage.ProductDetailsTracking=JSON.stringify({source:i.source||document.title,position:t[r].position}),f!="_blank"?(n.preventDefault(),console.log("callbackUrl",u),easesales.googleTagMgr.productClick({callbackUrl:u,product:t[r]})):easesales.googleTagMgr.productClick({product:t[r]}))})})};r()},productClick:function(n){easesales.googleTagMgr.send(this.template("productClick",n))},sign_up:function(n){easesales.googleTagMgr.send(this.template("sign_up",n))},productDetails:function(n,i){n.product&&n.product.POSChildProductId&&(t[n.product.POSChildProductId]||(t[n.product.POSChildProductId]=n.product),(i||!t[n.product.POSChildProductId].PropertyList)&&easesales.googleTagMgr.send(this.template("productDetails",n)))},productDetailsEvent:function(t,i,r){var u,f;t&&productDetailStorage!=undefined&&(u=productDetailStorage.product,u.SalesPrice=i.SalesPrice||u.SalesPrice,u.ProductNo=i.ProductNo||u.ProductNo,u.variant="",f={product:u,source:u.source},n.each(r,function(t){n.each(f.product.PropertyList||[],function(i){if(r[t].propertyId===this.Id){var u=this.PropertyNameEN;n.each(this.PropertyValueList||[],function(){r[t].propertyValueId===this.Id&&(f.product.variant[u]=this.ValueEN||this.Value,f.product.item_variant+=(i>0?",":"")+u+":"+(this.ValueEN||this.Value))})}})}),easesales.googleTagMgr.send(this.template("productDetails",f)))},addToCart:function(n){if(n.products)easesales.googleTagMgr.send(this.template("addToCart",n));else{if(!n.productId||!t[n.productId])return;var i=t[n.productId];i.Quantity=n.quantity;n.products=[i];easesales.googleTagMgr.send(this.template("addToCart",n))}},removeFromCart:function(t){if(t.products){var i=[];n.each(t.products,function(r){var e=this.assembleKey||this.productId,f=u[e];f?f.Category==="Package"?n(f.PackageProductDto).each(function(){var u=n.extend({},!0,this);u.ProductNo=u.Barcode||u.ProductNo;u.Quantity=t.products[r].quantity*u.Quantity;i.push(u)}):(f.Quantity=t.products[r].quantity,i.push(f)):delete t.products[r]});t.products=i;easesales.googleTagMgr.send(this.template("removeFromCart",t))}},shoppingCart:function(n){var t={products:n};t.products.length&&easesales.googleTagMgr.send(this.template("viewCart",t))},cartPageview:function(n){var t={products:n};t.products.length&&easesales.googleTagMgr.send(this.template("cartPageview",t))},checkout:function(n){n.products=i;easesales.googleTagMgr.send(this.template("checkout",n))},payment:function(t){var i=JSON.parse(window.localStorage[t.order.orderNo]||'{"order":{},"products":[]}');t=n.extend(!0,{},i,t);easesales.googleTagMgr.send(this.template("payment",t))},submit:function(t){var i=JSON.parse(window.localStorage[t.order.orderNo]||'{"order":{},"products":[]}');t=n.extend(!0,{},i,t);easesales.googleTagMgr.send(this.template("submit",t))},purchase:function(n){return easesales.googleTagMgr.send(this.template("purchase",n))},displayCoupon:function(n){easesales.googleTagMgr.send(this.template("displayCoupon",n))},couponClick:function(n){easesales.googleTagMgr.send(this.template("couponClick",n))},promotionView:function(n){easesales.googleTagMgr.send(this.template("promotionView",n))},promotionClick:function(n){easesales.googleTagMgr.send(this.template("promotionClick",n))},storeShoppingCartProducts:function(t){n.each(t.products,function(){var t=this.POSChildProductId||this.AssembleKey,i=n.extend({},u[t]||{},this);u[t]=i})},storeCheckoutProducts:function(t){i={};n.each(t.products,function(){var r=this.POSChildProductId||this.ProductId,t=n.extend({},i[r]||{},this);!t.SalesPropertyList&&t.Propertys&&(t.SalesPropertyList=t.Propertys);!t.POSChildProductId&&t.ProductId&&(t.POSChildProductId=t.ProductId);i[r]=t})}};easesales.googleTagMgr.start()}(jQuery)