timely.define(["jquery_timely","external_libs/moment","external_libs/bootstrap_timepicker"],function(e,t,n){var r=function(){var n=e(this);if(typeof n.data("timepicker")=="undefined"){if(n.val()===""){var r=t().local(),i=n.data("showMeridian")?"hh:mm A":"HH:mm";n.val(r.format(i))}n.timepicker({showMeridian:n.data("showMeridian"),showInputs:!1,defaultTime:n.val()}).on("show.timepicker",function(){n.parents(".ai1ec-collapse").addClass("ai1ec-timepicker-visible")}).on("hide.timepicker",function(){n.parents(".ai1ec-collapse").removeClass("ai1ec-timepicker-visible")});var s=n.data("timepicker").$widget;s.addClass("timely")}},i=function(t){typeof t=="undefined"&&(t=e(document)),t.on("focus",".ai1ec-timepicker",r)};return{init:i}});