function addonBangketqua(t,a){var i=$(".shadow.somien"),n=$(".tanso_hangchuc"),e=$(".tanso_hangdonvi"),h=$(t.target).parents(".box_kqxs"),c="hangActive";("mouseenter"==a||"click"==a)&&(c="hangActiveClick") var s=!0 if(so_chinh=$(t.target).parents(".box_kqxs").find("."+c).parent().find(".somien").text(),i.is(t.target)||0!==i.has(t.target).length){if(hover.target_before=hover.target_now,hover.target_now=$(t.target).text(),so_target=$(t.target).text(),i.is(t.target))var o=$(t.target).parent() else var o=$(t.target).parent().parent() if(bang_target=$(o).parents(".bangSo").attr("data"),hover.bang_target_before=hover.bang_target_now,hover.bang_target_now=bang_target,hover.target_now==hover.target_before&&hover.bang_target_before==hover.bang_target_now&&0!=$(".ketquaHightlight.mouseover").length&&"cahaihang"==hover.row_now||"mouseover"!=a){if("click"==a)if(click.target_before=click.target_now,click.target_now=$(t.target).text(),click.row_before=click.row_now,click.row_now="cahaihang",click.bang_target_before=click.bang_target_now,click.bang_target_now=bang_target,click_hang="cahaihang",console.log("11111"),$(h).find(".ketquaHightlight.click").each(function(){var t=$(this).parents(".bangketquaSo").attr("data") click.bang_target_now==t&&$(this).removeClass("ketquaHightlight").removeClass("click")}),0==$(o).find(".shadow.somien.hangActiveClick").length||0==$(o).parent().find(".shadow.somien.hangActiveClick").length){0==$(o).find(".shadow.somien.hangActiveClick").length&&($(o).parents(".boxdauduoimien").find(".hangActiveClick").each(function(){var t=$(this).parents(".bangSo").attr("data") click.bang_target_now==t&&$(this).removeClass("hangActiveClick")}),$(o).parents(".boxdauduoimien").find(".hangActive").each(function(){$(this).removeClass("hangActive")})),$(o).find(".shadow.somien").each(function(){$(this).addClass("hangActiveClick")}),$(o).find(".tanso_hangchuc").each(function(){$(this).addClass("hangActiveClick")}),$(o).find(".tanso_hangdonvi").each(function(){$(this).addClass("hangActiveClick")}) var g=$(h).find(".ketquaHightlight.click").length $(o).find(".tanso_hangchuc").find(".numberHightlight").each(function(t){for(var i=0;inumber_config_show&&(number_config_show=0)),text=text.substr(number_config_show,j) for(var i=0;i'+lotos+""),lotos+=3,lotos>=10&&(lotos-=10) return text=text.replace(/\*/g,'')}function xulyvalue_so(text){var lotos=Math.floor(10*Math.random()+0),number_config_show=$(".config_Bangketqua_list .config_Item_Hover").attr("data"),j=text.length 0==number_config_show||null==number_config_show||void 0===number_config_show?number_config_show=0:(number_config_show=j-eval(number_config_show)+2,0>number_config_show&&(number_config_show=0)),text=text.substring(number_config_show,j) for(var i=0;i'+lotos+""),lotos+=3,lotos>=10&&(lotos-=10) return text=text.replace(/\*/g,'')}function ketthuc(){}function quetBangketqua(t,a,i,n,e,h){console.log(e) var c,s,o,g,r,l=-1,d=-1,_="ketquaHightlight" r=0===$(a).has($(".bangketquaSo_"+hover.bang_target_now)).length?a:$(a).find(".bangketquaSo_"+bang_target),$(r).find(t).each(function(){if(c=$(this).attr("data"),g=$(this).attr("data"),s=c.substr(c.length-2,2),o=c.substring(0,c.length-2),"hangchuc"==n&&(l=s.substring(1,2)),"hangdonvi"==n&&(d=s.substring(0,1)),"cahaihang"==n&&(l=s.substring(1,2),d=s.substring(0,1)),hover.target_now==d&&(_="ketquaHightlight "+click_event+" hangdonvi"),hover.target_now==l&&(_="ketquaHightlight "+click_event+" hangchuc"),hover.target_now==d&&hover.target_now==l&&(_="ketquaHightlight "+click_event+" cahaihang"),e==s){if(!$(this).find(".ketquadaysoHightlight").hasClass("ketquadaysoHightlight")&&!$(this).find(".ketquaHightlight").hasClass("click")){var t=xulyvalue_so(o) $(this).html(t+''+xulyvalue(s)+"")}}else if(!$(this).find(".ketquaHightlight").hasClass("click")&&!$(this).find(".ketquadaysoHightlight").hasClass("click")&&hover.target_now!=l&&hover.target_now!=d){var t=xulyvalue(c) $(this).html(t)}})}function quetBangketquaClick(t,a,i,n,e,h,c){var s,o,g,r=-1,l=-1,d="ketquaHightlight" console.log("count_ketquaClick"+c) var _ _=0===$(a).has($(".bangketquaSo_"+click.bang_target_now)).length?a:$(a).find(".bangketquaSo_"+bang_target),$(_).find(t).each(function(){if(s=$(this).attr("data"),o=s.substr(s.length-2,2),g=s.substring(0,s.length-2),"hangchuc"==n&&(r=o.substring(1,2)),"hangdonvi"==n&&(l=o.substring(0,1)),"cahaihang"==n&&(r=o.substring(1,2),l=o.substring(0,1)),click.target_now==l&&(d="ketquaHightlight "+h+" hangdonvi"),click.target_now==r&&(d="ketquaHightlight "+h+" hangchuc"),click.target_now==l&&click.target_now==r&&(d="ketquaHightlight "+h+" cahaihang"),e==o){var t=xulyvalue_so(g) $(this).html(t+''+xulyvalue(o)+"")}else if(click.target_now!=r&&click.target_now!=l){var t=xulyvalue(s) $(this).html(t)}})}function phuchoiBangketqua(){detect_hang="",$(document).find(".ketquaHightlight").each(function(){var t=$(this).parent(),a=xulyvalue($(t).attr("data")) $(t).html(a)})}function phuchoiBangketquaOut(){detect_hang="",$(document).find(".ketquaHightlight").each(function(){if(!$(this).hasClass("click")){var t=$(this).parent(),a=xulyvalue($(t).attr("data")) $(t).html(a)}})}function phuchoiBangketquaHang(t){console.log("oks2"),$(document).find(".ketquaHightlight").each(function(){if(!$(this).hasClass(t)&&!$(this).hasClass("cahaihang")){var a=$(this).parent(),i=xulyvalue($(a).attr("data")) $(a).html(i)}})}function hoverGiai(t){var a=[".thu",".ngay",".giaidbl",".giai1l",".giai2l",".giai3l",".giai4l",".giai5l",".giai6l",".giai7l",".giai8l",".leftcl .giaidb",".leftcl .giai1",".leftcl .giai2",".leftcl .giai3",".leftcl .giai4",".leftcl .giai5",".leftcl .giai6",".leftcl .giai7",".leftcl .giai8"] $(document).find(".giaiActive").each(function(){$(this).removeClass("giaiActive")}) for(var i=0;i0){for(var i="",n=0;n0?$(this).addClass("giaiSo").attr("data","*"):$(this).addClass("giaiSo").attr("data",$(this).text())}) $(this).find(".rightcl").each(function(t){$(this).addClass("bangketquaSo").addClass("bangketquaSo_"+t).attr("data",t)}),$(this).find(".bkqtinhmienbac").each(function(t){$(this).addClass("bangketquaSo").addClass("bangketquaSo_"+t).attr("data",t)})})})}function clickGiaiSo(t){var a,i,n,e,h,c=$(".giaiSo") c.is(t.target)||0!==c.has(t.target).length?(h=c.is(t.target)?$(t.target):$(t.target).parent(),a=$(h).text(),0!==$(h).has(".ketquaHightlight_giaiSo").length?($(h).removeClass("ketquaHightlight_giaiSo"),$(".box_kqxs_content").find(".giaiSo").each(function(){$(this).html($(this).attr("data"))})):(a=a.substr(a.length-2,2),$(".box_kqxs_content").find(".giaiSo").each(function(){i=$(this).attr("data"),n=i.substr(i.length-2,2),e=i.substring(0,i.length-2),n==a?$(this).html(e+''+n+""):$(this).html(i)}))):$(".ketquaHightlight_giaiSo").removeClass("ketquaHightlight_giaiSo")}function clickdaysoThongke(t,a){var i,n,e,h,c,s,o=$(".daysoThongke"),g=!0 if(o.is(t.target)||0!==o.has(t.target).length)c=o.is(t.target)?$(t.target):$(t.target).parent(),i=$(c).text(),hover_daythongke.target_before=hover_daythongke.target_now,hover_daythongke.target_now=i,"click"==a?($(c).parents(".box_kqxs").find(".bangSo").each(function(){$(this).find(".shadow.somien").each(function(){$(this).text()==i&&($(this).parent().find(".tanso_hangchuc").addClass("hangActiveClick"),$(this).parent().find(".tanso_hangdonvi").addClass("hangActiveClick"),$(this).addClass("hangActiveClick"))})}),click_daythongke.target_before=click_daythongke.target_now,click_daythongke.target_now=i,$(c).hasClass("daysoThongkeClick")?($(c).removeClass("daysoThongkeClick").removeClass("daysoThongkeHover"),$(c).parents(".box_kqxs").find(".bangSo").each(function(){$(this).find(".shadow.somien").each(function(){$(this).text()==i&&($(this).parent().find(".tanso_hangchuc").removeClass("hangActiveClick").removeClass("hangActive"),$(this).parent().find(".tanso_hangdonvi").removeClass("hangActiveClick").removeClass("hangActive"),$(this).removeClass("hangActiveClick").removeClass("hangActive"))})})):($(c).parent().find(".daysoThongkeClick").removeClass("daysoThongkeClick").removeClass("daysoThongkeHover"),$(c).addClass("daysoThongkeClick").removeClass("daysoThongkeHover")),$(c).parents(".box_kqxs").find(".giaiSo").each(function(){if(n=$(this).attr("data"),e=n.substr(n.length-2,2),h=n.substring(0,n.length-2),gia_tri_o_hang_chuc=e.substring(1,2),gia_tri_o_hang_donvi=e.substring(0,1),click_daythongke.target_now==gia_tri_o_hang_donvi&&(s="ketquadaysoHightlight "+a+" hangdonvi"),click_daythongke.target_now==gia_tri_o_hang_chuc&&(s="ketquadaysoHightlight "+a+" hangchuc"),click_daythongke.target_now==gia_tri_o_hang_donvi&&hover_daythongke.target_now==gia_tri_o_hang_chuc&&(s="ketquadaysoHightlight "+a+" cahaihang"),click_daythongke.target_now==gia_tri_o_hang_chuc||click_daythongke.target_now==gia_tri_o_hang_donvi)if(click_daythongke.target_before!=click_daythongke.target_now||$(c).hasClass("daysoThongkeClick")){var t=xulyvalue_so(h) $(this).html(t+''+xulyvalue(e)+"")}else $(this).html(xulyvalue(n)) else $(this).html(xulyvalue(n))})):($(c).parents(".box_kqxs").find(".bangSo").each(function(){$(this).find(".shadow.somien").each(function(){$(this).text()==i&&($(this).parent().find(".tanso_hangchuc").addClass("hangActive"),$(this).parent().find(".tanso_hangdonvi").addClass("hangActive"),$(this).addClass("hangActive"))})}),$(c).parent().find(".daysoThongkeHover").removeClass("daysoThongkeHover"),$(c).addClass("daysoThongkeHover"),$(c).parents(".box_kqxs").find(".giaiSo").each(function(){if(n=$(this).attr("data"),e=n.substr(n.length-2,2),h=n.substring(0,n.length-2),gia_tri_o_hang_chuc=e.substring(1,2),gia_tri_o_hang_donvi=e.substring(0,1),hover_daythongke.target_now==gia_tri_o_hang_donvi&&(s="ketquadaysoHightlight "+a+" hangdonvi"),hover_daythongke.target_now==gia_tri_o_hang_chuc&&(s="ketquadaysoHightlight "+a+" hangchuc"),hover_daythongke.target_now==gia_tri_o_hang_donvi&&hover_daythongke.target_now==gia_tri_o_hang_chuc&&(s="ketquadaysoHightlight "+a+" cahaihang"),hover_daythongke.target_now==gia_tri_o_hang_chuc||hover_daythongke.target_now==gia_tri_o_hang_donvi){if(!$(this).find(".ketquadaysoHightlight").hasClass("click")&&!$(this).find(".ketquaHightlight").hasClass("click"))if(hover_daythongke.target_before!=hover_daythongke.target_now||$(c).hasClass("daysoThongkeHover")){var t=xulyvalue_so(h) $(this).html(t+''+xulyvalue(e)+"")}else{var t=xulyvalue(n) $(this).html(t)}}else if(!$(this).find(".ketquadaysoHightlight").hasClass("click")&&!$(this).find(".ketquaHightlight").hasClass("click")){var t=xulyvalue(n) $(this).html(t)}})) else{for(var r=0;r0||$(".ketquadaysoHightlight").length>0)&&$(document).find(".box_kqxs .giaiSo").each(function(){var t=xulyvalue($(this).attr("data")) $(this).html(t)}) else{var l=0,d=0 $(t.target).parents(".box_kqxs").find(".bangSo").each(function(){d++ var t=$(this).find(".shadow.somien.hangActiveClick").text() t==click.target_now&&l++}),l==d&&$(t.target).parents(".box_kqxs").find(".daysoThongke").each(function(){$(this).text()==click.target_now&&$(this).addClass("daysoThongkeClick")})}else if($(document).find(".daysoThongkeHover").removeClass("daysoThongkeHover"),g)($(".ketquaHightlight").length>0||$(".ketquadaysoHightlight").length>0)&&$(document).find(".box_kqxs .giaiSo").each(function(){if(!$(this).find(".ketquadaysoHightlight").hasClass("click")&&!$(this).find(".ketquaHightlight").hasClass("click")){var t=xulyvalue($(this).attr("data")) $(this).html(t)}}) else{var l=0,d=0 $(t.target).parents(".box_kqxs").find(".bangSo").each(function(){d++ var t=$(this).find(".shadow.somien.hangActiveClick").text(),a=$(this).find(".shadow.somien.hangActive").text();(t==hover.target_now||a==hover.target_now)&&l++}),l==d&&$(t.target).parents(".box_kqxs").find(".daysoThongke").each(function(){$(this).text()==hover.target_now&&$(this).addClass("daysoThongkeHover")})}}}var array_class_giai=[".giaidb div",".giai1 div",".giai2 div",".giai3 div",".giai4 div",".giai5 div",".giai6 div",".giai7 div",".giai8 div"],so_target=10,so_chinh=10,detect_hang="",click_detect_hang="",chay_mot_lan=1,element_click,click_event="",click_hang="",click_chua=0,hover={target_now:"",target_before:"",row_now:"",row_before:"",bang_target_now:"",bang_target_before:""},click={target_now:"",target_before:"",row_now:"",row_before:"",bang_target_now:"",bang_target_before:""},hover_daythongke={target_now:"",target_before:""},click_daythongke={target_now:"",target_before:""},day_vacham=[".daysoThongke",".tanso_hangchuc",".tanso_hangdonvi",".shadow.somien"],hover_target_now="",hover_target_before="",hover_row_now="",hover_row_before="",click_target_now="",click_target_before="",click_row_now="",click_row_before="",bang_target="" $(document).on("click","body",function(t){click_event="click",addonBangketqua(t,click_event),clickdaysoThongke(t,click_event),hoverGiai(t),ketthuc()}).on("mouseover","body",function(t){click_event="mouseover",addonBangketqua(t,click_event),clickdaysoThongke(t,click_event),hoverGiai(t),ketthuc(),chay_mot_lan=1}),loadPage(),$(document).on("click",".showLoto",function(e){var event_onclick=$(this).attr("eventonclick"),boxdauduoimien=$(this).parents(".box_kqxs").find(".boxdauduoimien div") $(boxdauduoimien).is(":visible")?$(this).html("Xem Bảng Loto"):$(this).html("x"),""==event_onclick?$(boxdauduoimien).toggle():($(this).attr("eventonclick",""),eval(event_onclick)),$(".btndauduoimien").hide()}),$(document).on("click",".config_Item",function(t){if($(this).hasClass("config_Item_Hover"))$(this).removeClass("config_Item_Hover"),$(this).parents(".box_kqxs").each(function(){for(var t=0;t