;(function($,_,undefined){"use strict";ips.controller.register('courses.front.lesson.view',{initialize:function(){this.on('click','[data-action="showLesson"]',this.fetchLesson);this.setup();},setup:function(){var url=$('.ipsCourseLessonList__item--currentLesson a').attr('href');history.replaceState(null,null,url);},fetchLesson:function(e){e.preventDefault();var self=this;var lesson=$(e.currentTarget);var dataUrl=lesson.data('url');var url=lesson.attr('href');$('.ipsCourseLessonList__item--currentLesson').removeClass('ipsCourseLessonList__item--currentLesson');ips.getAjax()(dataUrl,{showLoading:true}).done(function(response){$(e.currentTarget).closest('li').addClass('ipsCourseLessonList__item--currentLesson');$('#lessonWrapper').html(response);self._updateURL(url);})},_updateURL:function(url){history.pushState(null,null,url);}});}(jQuery,_));;