$=jQuery,$(document).ready((function(){if($(".b2broker_widget").length){!function checkWidth(){let e=$(".b2broker_widget_titles").outerWidth(),t=$(window).width();!0===(e>$(".b2broker_widget").outerWidth()&&t>=768)&&$(".b2broker_widget").addClass("mobile_version")}(),$(".b2broker_widget_titles_single").click((function(){let e=$(this).index();$(".b2broker_widget_content_tab").removeClass("active").eq(e).addClass("active"),$(".b2broker_widget_content_tab").hide().filter(".active").show(),$(".b2broker_widget_titles_single").removeClass("active"),$(this).addClass("active")})),$(".b2broker_widget_titles_single").eq(0).addClass("active");let e=7,t=8;function updateCardsToLoad(){$(".b2broker_widget_content_tab").each((function(){let i=$(this),d=i.find(".b2broker_widget_content_tab_single"),o=d.filter(".hidden").length;i.find(".show_more").toggle(d.length>e);let n=o>t?t:o;i.find(".card-count").html(n),o<=0&&i.find(".show_more").hide()}))}updateCardsToLoad(),$(".show_more").click((function(){let e=$(this).parent().find(".b2broker_widget_content_tab_single.hidden"),i=e.length>t?t:e.length;e.slice(0,i).removeClass("hidden"),updateCardsToLoad()})),$(".b2broker_widget_mobile_titles").change((function(){!function switchTab(e){let t=$(".b2broker_widget_content_tab");t.removeClass("active"),0===e?t.first().addClass("active"):t.eq(e-1).addClass("active"),$(".b2broker_widget_mobile_titles").val(e)}(parseInt($(this).val()))}))}}));