\/li>',ConnectionTransferDelimiterTemplate='Přestup na {transfer}<\/label>',TrainTemplate=' {date} <\/div> <\/div> {departure_time}<\/strong> <\/td> {station_from}<\/button> <\/td> <\/tr> {arrival_time}<\/strong> <\/td> {station_to}<\/button> <\/td> <\/tr> <\/thead> <\/table> <\/div> <\/div> {type}: {title}<\/strong> <\/div> Čas: {timeLength}<\/strong> <\/div> Vzdálenost: {distance}<\/strong> <\/div> <\/div>{price}<\/div> <\/div><\/div>',authToken=null,selectedStationFrom,selectedStationTo,connInfo;card=!1;$("#select_discount :selected")[0]!=undefined&&(card=$("#select_discount :selected").attr("data-card"));$(document).ready(function(){$("#searchconnbutton").attr("disabled","disabled");$("#searchconnbutton .wait").hide();GetTariffs();SetDateTimePickers();CurrentRequest&&CurrentRequest.Tariffs&&CurrentRequest.Tariffs.forEach(function(n){if(!n.IsPrimary){let t=$('[name="plusminus_cp_'+n.Tariff+'"]');t.val(n.Count);inputNumberNeedRevalidate(t)}});setStationInput(".js-typeahead-station-from");setStationInput(".js-typeahead-station-to");$("#connsearchodkud").focus();enableDisableEmptyFields();selectedStationFrom&&selectedStationTo&&$("#searchconnbutton").removeAttr("disabled");$("#connsearchform").on("submit",function(n){let t=getWhen();if(!t||!selectedStationFrom||!selectedStationTo||!CurrentRequest.Tariffs||CurrentRequest.Tariffs.length==0){n.preventDefault();n.stopPropagation();return}$("#searchconnbutton .wait").show();var i={StationFrom:selectedStationFrom.item,StationTo:selectedStationTo.item,When:t.format("yyyyMMDDHHmm"),IsTimeOfDeparture:$("#connsearchtimeswitch").is(":checked")?0:1,MaxTransfersCount:CurrentRequest.MaxTransfersCount,MinTransferTime:CurrentRequest.MinTransferTime,MaxTransferTime:CurrentRequest.MaxTransferTime,Owners:null,Tariffs:CurrentRequest.Tariffs,Context:Context,SelectedThere:SelectedConnectionThere,SelectedReturn:SelectedConnectionReturn,PrevNextConn:PrevNextConn},r=$("").attr("type","hidden").attr("name","jsparams").val(JSON.stringify(i));$(this).append(r)});$(".eshop-connections-best-item").click(function(){selectedStationFrom={item:{listId:$(this).data("from-list"),item:$(this).data("from-item"),name:$(this).data("from-name")}};selectedStationTo={item:{listId:$(this).data("to-list"),item:$(this).data("to-item"),name:$(this).data("to-name")}};Typeahead[".js-typeahead-station-from"].item=selectedStationFrom.item;Typeahead[".js-typeahead-station-to"].item=selectedStationTo.item;$("#connsearchodkud").val($(this).data("from-name"));$("#connsearchkam").val($(this).data("to-name"));enableDisableEmptyFields()})})