var isMasonryActive=0;function getMyCourses(){$.ajax({type:"POST",url:"/ajax/allCoursesAjax.php",data:{requestType:"getMyCourses"},success:function(response){let data=JSON.parse(response);if(data["status"]=="FAILED"){return}else if(data["response"]["template"]==""){$("#myCourseContainer").append(`
You haven't registered for any course yet.
`);return}$("#myCourseWrapper").append(`${data["response"]["template"]}
`);if(!isMasonryActive++){$("#myCourseWrapper").masonry({initLayout:true,itemSelector:".item"})}else{$("#myCourseWrapper").masonry("appended",$(data)).masonry("reloadItems").masonry({transitionDuration:0})}},complete:function(){$("#myCourseLoader").remove()}})}function smoothScrollingTo(target){if($(target).length)$("html,body").animate({scrollTop:$(target).offset().top},500)}$("a[href*=\\#]").on("click",function(event){event.preventDefault();smoothScrollingTo(this.hash)});$(document).ready(function(){$("body").addClass(".slick-next slick-arrow").on("click",function(){lazyload()});$(window).scroll(function(){if($(this).scrollTop()>50){$(".black-friday-large").stop().fadeOut();$(".black-friday-small").stop().fadeIn()}else{$(".black-friday-large").stop().fadeIn();$(".black-friday-small").stop().fadeOut()}});smoothScrollingTo(location.hash);jQuery.each(window.location.search.substring(1).split("&"),function(i,t){var p=t.split("=");if(p[0]&&p[0]=="query"){$('input[name="'+p[0]+'"]').attr("value",p[1].replace(/\%20/g," "));$(".removeFilter").show()}else if(p[0]&&p[0]=="type"){$('input[value="'+decodeURIComponent(p[1])+'"]').prop("checked",true)}});$('input[name="courseType"]:checked').parent().addClass("active");$(".allFilters").html("");$("input[name='query'][value!='']").each(function(e){$(".allFilters").append(''+$(this).attr("value")+'
')});if($(".allFilters").html()){$("#filtersDiv").css("display","block");$(".recommended-search-div").css("display","none")}else{$("#filtersDiv").css("display","none")}$("[data-toggle=offcanvas]").click(function(){$(this).find("i").toggleClass("glyphicon-chevron-left glyphicon-chevron-right");$(".floating-crs-nav").toggle();isClose=isClose==0?1:0});$(".carousel-inner").slick({infinite:true,autoplay:true,autoplaySpeed:3e3,centerMode:true,centerPadding:"15%",slidesToShow:1,arrows:false,dots:true,responsive:[{breakpoint:1601,settings:{centerPadding:"12%"}},{breakpoint:1401,settings:{centerPadding:"7%"}},{breakpoint:1201,settings:{centerPadding:"5%"}},{breakpoint:600,settings:{centerPadding:"5%"}},{breakpoint:480,settings:{centerMode:false,centerPadding:"0px"}}]});$(".carousel-inner").on("afterChange",function(event,slick,currentSlide,nextSlide){lazyload()});$(".offline-courses, .online-courses, .active-courses, .featured-courses").slick({slidesToShow:4,slidesToScroll:4,arrows:true,infinite:false,responsive:[{breakpoint:1200,settings:{slidesToShow:3,slidesToScroll:3}},{breakpoint:992,settings:{slidesToShow:2,slidesToScroll:2}},{breakpoint:768,settings:{slidesToShow:1,slidesToScroll:1}}]});$(".testimonial-courses").slick({slidesToShow:3,slidesToScroll:3,arrows:true,infinite:false,responsive:[{breakpoint:768,settings:{slidesToShow:1,slidesToScroll:1}}]});$.extend({getUrlVars:function(){var vars=[],hash;var hashes=window.location.href.slice(window.location.href.indexOf("?")+1).split("&");for(var i=0;i