var stockticker_loaded=!1,stocktickers_load=function(){var stocktickers=jQuery(".stock-ticker-wrapper");void 0!==stocktickers&&jQuery.each(stocktickers,(function(i,v){var obj=jQuery(this);jQuery.ajax({type:"post",dataType:"json",url:stockTickerJs.ajax_url,data:{action:"stockticker_load",symbols:jQuery(this).data("stockticker_symbols"),show:jQuery(this).data("stockticker_show"),number_format:jQuery(this).data("stockticker_number_format"),decimals:jQuery(this).data("stockticker_decimals"),static:jQuery(this).data("stockticker_static"),class:jQuery(this).data("stockticker_class"),speed:jQuery(this).data("stockticker_speed"),empty:jQuery(this).data("stockticker_empty"),duplicate:jQuery(this).data("stockticker_duplicate"),nonce:stockTickerJs.nonce},success:function(response){"success"==response.status&&(stockticker_loaded=!0,obj.html(response.message),obj.data("stockticker_static")||jQuery(obj).find(".stock_ticker").stockTicker({startEmpty:jQuery(obj).data("stockticker_empty"),duplicate:jQuery(obj).data("stockticker_duplicate"),speed:jQuery(obj).data("stockticker_speed")}))}})}))};jQuery(document).ready((function(){stocktickers_load();var stockTickerReload=setInterval((function(){stockticker_loaded?clearInterval(stockTickerReload):stocktickers_load()}),5e3);setTimeout((function(){jQuery.ajax({type:"post",dataType:"json",async:!0,url:stockTickerJs.ajax_url,data:{action:"stockticker_update_quotes",nonce:stockTickerJs.nonce}}).done((function(response){console.log("Stock Ticker update quotes response: "+response.message)}))}),2e3),"undefined"!=typeof wp&&wp.customize&&wp.customize.selectiveRefresh&&wp.customize.selectiveRefresh.bind("partial-content-rendered",(function(placement){placement.container&&stocktickers_load()}))}));