{"version":3,"sources":["thim-custom.js"],"names":["$","isInIFrame","window","location","parent","document","ready","education_pack_frontend","on","toggle","focus","fancybox","load","this","header_menu","back_to_top","feature_preloading","sticky_sidebar","custom_select","contactform7","thim_blog_auto_height","lp_switcher","learnpress_media_courses","header_menu_mobile","parallax","thim_post_gallery","thim_slider","imagesLoaded","flexslider","slideshow","animation","pauseOnHover","animationSpeed","smoothHeight","directionNav","controlNav","e","stopPropagation","toggleClass","removeClass","after","next","is","slideDown","html","slideUp","$header","$navigation","$header_v1","off_Top","length","offset","top","menuH","outerHeight","navH","latestScroll","css","padding-bottom","scroll","current","scrollTop","addClass","hasClass","hover","children","stop","$element","animate","offsetTop","theiaStickySidebar","containerSelector","additionalMarginTop","additionalMarginBottom","updateSidebarHeight","minWidth","sidebarBehavior","stellar","horizontalOffset","verticalOffset","$preload","fadeOut","remove","dropkick","mobile","change","selectedIndex","data","select","find","each","index","ele","attr","removeAttr","parents","$blog","maxHeight","setH","height","cookie_name","courses_layout","$list_grid","gridClass","listClass","activeClass","cookie","switchToList","fadeIn","expires","path","switchToGrid","click","magnificPopup","type","midClick","jQuery"],"mappings":"CAYA,SAAAA,GACA,aAKA,IAAAC,EAAAC,OAAAC,UAAAD,OAAAE,OAAAD,SAEAH,EAAAK,UAAAC,MAAA,WACAC,EAAAD,QAGAN,EAAA,8BAAAQ,GAAA,QAAA,WACAR,EAAA,4BAAAS,OAAA,KACAT,EAAA,kCAAAU,UAIAV,EAAA,aAAAW,aAGAX,EAAAE,QAAAU,KAAA,WACAL,EAAAK,SAGA,IAAAL,GAKAD,MAAA,WACAO,KAAAC,cACAD,KAAAE,cACAF,KAAAG,qBACAH,KAAAI,iBACA,GAAAhB,GACAY,KAAAK,gBAEAL,KAAAM,eACAN,KAAAO,wBAEAP,KAAAQ,cACAR,KAAAS,4BAMAV,KAAA,WACAC,KAAAU,qBACAV,KAAAW,WACAX,KAAAY,oBACAZ,KAAAa,eAIAD,kBAAA,WACAzB,EAAA,sCAAA2B,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A,eACA/D,EAAA,iBAAAgH,MAAA,WACAhH,EAAA,iBAAA8D,SAAA2C,GACAzG,EAAA,iBAAAuC,YAAAkE,GACAzG,EAAA,mBAAAiF,QAAA,IAAA,WACAjF,EAAAa,MAAA0B,YAAAgE,GAAAzC,SAAA0C,GAAAI,OAAA,SAGA5G,EAAA,iBAAAgH,MAAA,WACAhH,EAAA,iBAAA8D,SAAA2C,GACAzG,EAAA,iBAAAuC,YAAAkE,GACAzG,EAAA,mBAAAiF,QAAA,IAAA,WACAjF,EAAAa,MAAA0B,YAAAiE,GAAA1C,SAAAyC,GAAAK,OAAA,WAIA5G,EAAA,iBAAAgH,MAAA,WACAhH,EAAA0G,OAAAN,IAAA,QAAApG,EAAA0G,OAAAN,IACAO,MAGA3G,EAAA,iBAAAgH,MAAA,WACAhH,EAAA0G,OAAAN,IAAA,QAAApG,EAAA0G,OAAAN,IACAW,WA2BAzF,yBAAA,WACAtB,EAAA,eAAAiH,eACAC,KAAA,WAEAlH,EAAA,iBAAAiH,eACAC,KAAA,SACAC,UAAA,OAKAC","file":"../js/main.min.js","sourcesContent":["/**\r\n * Script custom for theme\r\n *\r\n * TABLE OF CONTENT\r\n *\r\n * Header: main menu\r\n * Header: main menu mobile\r\n * Sidebar: sticky sidebar\r\n * Feature: Preloading\r\n * Feature: Back to top\r\n * Custom select use Dropkickjs.\r\n */\r\n(function ($) {\r\n\t\"use strict\";\r\n\t/**\r\n\t * Check this site in iframe.\r\n\t * @type {boolean}\r\n\t */\r\n\tvar isInIFrame = (window.location != window.parent.location);\r\n\r\n\t$(document).ready(function () {\r\n\t\teducation_pack_frontend.ready();\r\n\r\n\t\t/* Search form menu right */\r\n\t\t$('.menu-right .button_search').on(\"click\", function(){\r\n\t\t\t$('.menu-right .search-form').toggle(300);\r\n\t\t\t$('.menu-right input.search-field').focus();\r\n\t\t});\r\n\r\n\t\t/* Filter Gallery */\r\n\t\t$('.fancybox').fancybox();\r\n\t});\r\n\r\n\t$(window).load(function () {\r\n\t\teducation_pack_frontend.load();\r\n\t});\r\n\r\n\tvar education_pack_frontend = {\r\n\r\n\t\t/**\r\n\t\t * Call functions when document ready\r\n\t\t */\r\n\t\tready: function () {\r\n\t\t\tthis.header_menu();\r\n\t\t\tthis.back_to_top();\r\n\t\t\tthis.feature_preloading();\r\n\t\t\tthis.sticky_sidebar();\r\n\t\t\tif (isInIFrame != true) {\r\n\t\t\t\tthis.custom_select();\r\n\t\t\t}\r\n\t\t\tthis.contactform7();\r\n\t\t\tthis.thim_blog_auto_height();\r\n\r\n\t\t\tthis.lp_switcher();\r\n\t\t\tthis.learnpress_media_courses();\r\n\t\t},\r\n\r\n\t\t/**\r\n\t\t * Call functions when window load.\r\n\t\t */\r\n\t\tload: function () {\r\n\t\t\tthis.header_menu_mobile();\r\n\t\t\tthis.parallax();\r\n\t\t\tthis.thim_post_gallery();\r\n\t\t\tthis.thim_slider();\r\n\t\t},\r\n\r\n\t\t// CUSTOM FUNCTION IN BELOW\r\n\t\tthim_post_gallery: function () {\r\n\t\t\t$('article.format-gallery .flexslider').imagesLoaded(function () {\r\n\t\t\t\t$('.flexslider').flexslider({\r\n\t\t\t\t\tslideshow : true,\r\n\t\t\t\t\tanimation : 'fade',\r\n\t\t\t\t\tpauseOnHover : true,\r\n\t\t\t\t\tanimationSpeed: 400,\r\n\t\t\t\t\tsmoothHeight : true,\r\n\t\t\t\t\tdirectionNav : true,\r\n\t\t\t\t\tcontrolNav : false\r\n\t\t\t\t});\r\n\t\t\t});\r\n\t\t},\r\n\r\n\t\t// CUSTOM SLIDER\r\n\t\tthim_slider: function () {\r\n\t\t\t$('.thim-slider').flexslider({\r\n\t\t\t\tanimation : 'slide',\r\n\t\t\t\tslideshow : true,\r\n\t\t\t\tpauseOnHover : true,\r\n\t\t\t\tanimationSpeed: 400,\r\n\t\t\t\tsmoothHeight : true,\r\n\t\t\t\tdirectionNav : true,\r\n\t\t\t\tcontrolNav : false\r\n\t\t\t});\r\n\t\t},\r\n\r\n\t\t/**\r\n\t\t * Mobile menu\r\n\t\t */\r\n\t\theader_menu_mobile: function () {\r\n\t\t\t$(document).on('click', '.menu-mobile-effect', function (e) {\r\n\t\t\t\te.stopPropagation();\r\n\t\t\t\t$('.responsive #wrapper-container').toggleClass('mobile-menu-open');\r\n\t\t\t});\r\n\r\n\t\t\t$(document).on('click', '.mobile-menu-open #main-content', function () {\r\n\t\t\t\t$('.responsive #wrapper-container.mobile-menu-open').removeClass('mobile-menu-open');\r\n\t\t\t});\r\n\r\n\t\t\t$('.navbar>li.menu-item-has-children >a,.navbar-nav>li.menu-item-has-children >span').after('');\r\n\t\t\t$('.responsive .mobile-menu-container .navbar-nav>li.menu-item-has-children >a').after('');\r\n\r\n\t\t\t$('.responsive .mobile-menu-container .navbar-nav>li.menu-item-has-children .icon-toggle').on('click', function () {\r\n\t\t\t\tif ($(this).next('ul.sub-menu').is(':hidden')) {\r\n\t\t\t\t\t$(this).next('ul.sub-menu').slideDown(200, 'linear');\r\n\t\t\t\t\t$(this).html('');\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$(this).next('ul.sub-menu').slideUp(200, 'linear');\r\n\t\t\t\t\t$(this).html('');\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t},\r\n\r\n\t\t/**\r\n\t\t * Header menu sticky, scroll, v.v.\r\n\t\t */\r\n\t\theader_menu: function () {\r\n\t\t\tvar $header = $('#masthead.sticky-header'),\r\n\t\t\t\t$navigation = $('#masthead.sticky-header .navigation'),\r\n\t\t\t\t$header_v1 = $('#masthead.sticky-header .header-v1'),\r\n\t\t\t\toff_Top = ( $('#wrapper-container').length > 0 ) ? $('#wrapper-container').offset().top : 0,\r\n\t\t\t\tmenuH = $header.outerHeight(),\r\n\t\t\t\tnavH = $navigation.outerHeight(),\r\n\t\t\t\tlatestScroll = 0,\r\n\t\t\t\tstartFixed = 2;\r\n\r\n\t\t\tif ($header.length) {\r\n\t\t\t\t$header.css({\r\n\t\t\t\t\t'padding-bottom': navH\r\n\t\t\t\t});\r\n\t\t\t\t$navigation.css({\r\n\t\t\t\t\t'top': $header_v1.outerHeight()\r\n\t\t\t\t});\r\n\t\t\t}\r\n\r\n\t\t\t$(window).scroll(function () {\r\n\t\t\t\tvar current = $(this).scrollTop();\r\n\t\t\t\tif (current > menuH) {\r\n\t\t\t\t\t$header.removeClass('affix-top').addClass('affix').removeClass('menu-show');\r\n\t\t\t\t\t$header.css({\r\n\t\t\t\t\t\t'padding-bottom': 0\r\n\t\t\t\t\t});\r\n\t\t\t\t\t$navigation.css({\r\n\t\t\t\t\t\ttop: off_Top\r\n\t\t\t\t\t});\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$header.removeClass('affix').addClass('affix-top').addClass('no-transition');\r\n\t\t\t\t\t$header.css({\r\n\t\t\t\t\t\t'padding-bottom': navH\r\n\t\t\t\t\t});\r\n\t\t\t\t\t$navigation.css({\r\n\t\t\t\t\t\ttop: $header_v1.outerHeight()\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (current > latestScroll && current > menuH * 2) {\r\n\t\t\t\t\tif (!$header.hasClass('menu-hidden')) {\r\n\t\t\t\t\t\t$header.addClass('menu-hidden').removeClass('menu-show').removeClass('no-transition');\r\n\t\t\t\t\t\t$navigation.css({\r\n\t\t\t\t\t\t\ttop: off_Top\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif ($header.hasClass('menu-hidden')) {\r\n\t\t\t\t\t\t$header.removeClass('menu-hidden').addClass('menu-show');\r\n\t\t\t\t\t\t$navigation.css({\r\n\t\t\t\t\t\t\ttop: off_Top\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tlatestScroll = current;\r\n\t\t\t});\r\n\r\n\t\t\t$('#masthead .navbar > .menu-item-has-children, .navbar > li ul li').hover(\r\n\t\t\t\tfunction () {\r\n\t\t\t\t\t$(this).children('.sub-menu').stop(true, false).slideDown(250);\r\n\t\t\t\t},\r\n\t\t\t\tfunction () {\r\n\t\t\t\t\t$(this).children('.sub-menu').stop(true, false).slideUp(250);\r\n\t\t\t\t}\r\n\t\t\t);\r\n\t\t},\r\n\r\n\t\t/**\r\n\t\t * Back to top\r\n\t\t */\r\n\t\tback_to_top: function () {\r\n\t\t\tvar $element = $('#back-to-top');\r\n\t\t\t$(window).scroll(function () {\r\n\t\t\t\tif ($(this).scrollTop() > 100) {\r\n\t\t\t\t\t$element.addClass('scrolldown').removeClass('scrollup');\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$element.addClass('scrollup').removeClass('scrolldown');\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\t$element.on('click', function () {\r\n\t\t\t\t$('html,body').animate({scrollTop: '0px'}, 800);\r\n\t\t\t\treturn false;\r\n\t\t\t});\r\n\t\t},\r\n\r\n\t\t/**\r\n\t\t * Sticky sidebar\r\n\t\t */\r\n\t\tsticky_sidebar: function () {\r\n\t\t\tvar offsetTop = 20;\r\n\r\n\t\t\tif ($(\"#wpadminbar\").length) {\r\n\t\t\t\toffsetTop += $(\"#wpadminbar\").outerHeight();\r\n\t\t\t}\r\n\t\t\tif ($(\"#masthead.affix\").length) {\r\n\t\t\t\toffsetTop += $(\"#masthead.affix\").outerHeight();\r\n\t\t\t}\r\n\r\n\t\t\tif ($('.sticky-sidebar').length > 0) {\r\n\t\t\t\t$(\"aside.sticky-sidebar\").theiaStickySidebar({\r\n\t\t\t\t\t\"containerSelector\" : \"\",\r\n\t\t\t\t\t\"additionalMarginTop\" : offsetTop,\r\n\t\t\t\t\t\"additionalMarginBottom\": \"0\",\r\n\t\t\t\t\t\"updateSidebarHeight\" : false,\r\n\t\t\t\t\t\"minWidth\" : \"768\",\r\n\t\t\t\t\t\"sidebarBehavior\" : \"modern\"\r\n\t\t\t\t});\r\n\t\t\t}\r\n\r\n\t\t},\r\n\r\n\t\t/**\r\n\t\t * Parallax init\r\n\t\t */\r\n\t\tparallax: function () {\r\n\t\t\t$(window).stellar({\r\n\t\t\t\thorizontalOffset: 0,\r\n\t\t\t\tverticalOffset : 0\r\n\t\t\t});\r\n\t\t},\r\n\r\n\t\t/**\r\n\t\t * feature: Preloading\r\n\t\t */\r\n\t\tfeature_preloading: function () {\r\n\t\t\tvar $preload = $('#thim-preloading');\r\n\t\t\tif ($preload.length > 0) {\r\n\t\t\t\t$preload.fadeOut(1000, function () {\r\n\t\t\t\t\t$preload.remove();\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t},\r\n\r\n\r\n\t\t/**\r\n\t\t * Custom select use Dropkickjs\r\n\t\t */\r\n\t\tcustom_select: function () {\r\n\t\t\t$('select').dropkick({\r\n\t\t\t\tmobile: true,\r\n\t\t\t\tchange: function () {\r\n\t\t\t\t\tvar selectedIndex = this.selectedIndex;\r\n\t\t\t\t\t$(this.data.select).find('option').each(function (index, ele) {\r\n\t\t\t\t\t\tif (index === selectedIndex) {\r\n\t\t\t\t\t\t\t$(ele).attr('selected', 'selected');\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t$(ele).removeAttr('selected');\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t},\r\n\r\n\r\n\t\t/**\r\n\t\t * Custom effect and UX for contact form.\r\n\t\t */\r\n\t\tcontactform7: function () {\r\n\t\t\t$(\".wpcf7-submit\").on('click', function () {\r\n\t\t\t\t$(this).css(\"opacity\", 0.2);\r\n\t\t\t\t$(this).parents('.wpcf7-form').addClass('processing');\r\n\t\t\t\t$('input:not([type=submit]), textarea').attr('style', '');\r\n\t\t\t});\r\n\r\n\t\t\t$(document).on('spam.wpcf7', function () {\r\n\t\t\t\t$(\".wpcf7-submit\").css(\"opacity\", 1);\r\n\t\t\t\t$('.wpcf7-form').removeClass('processing');\r\n\t\t\t});\r\n\r\n\t\t\t$(document).on('invalid.wpcf7', function () {\r\n\t\t\t\t$(\".wpcf7-submit\").css(\"opacity\", 1);\r\n\t\t\t\t$('.wpcf7-form').removeClass('processing');\r\n\t\t\t});\r\n\r\n\t\t\t$(document).on('mailsent.wpcf7', function () {\r\n\t\t\t\t$(\".wpcf7-submit\").css(\"opacity\", 1);\r\n\t\t\t\t$('.wpcf7-form').removeClass('processing');\r\n\t\t\t});\r\n\r\n\t\t\t$(document).on('mailfailed.wpcf7', function () {\r\n\t\t\t\t$(\".wpcf7-submit\").css(\"opacity\", 1);\r\n\t\t\t\t$('.wpcf7-form').removeClass('processing');\r\n\t\t\t});\r\n\r\n\t\t\t$('body').on('click', 'input:not([type=submit]).wpcf7-not-valid, textarea.wpcf7-not-valid', function () {\r\n\t\t\t\t$(this).removeClass('wpcf7-not-valid');\r\n\t\t\t});\r\n\t\t},\r\n\r\n\r\n\t\t/**\r\n\t\t * Blog auto height\r\n\t\t */\r\n\t\tthim_blog_auto_height: function () {\r\n\t\t\tvar $blog = $('.blog-content article, .archive .blog-content article'),\r\n\t\t\t\tmaxHeight = 0,\r\n\t\t\t\tsetH = true;\r\n\r\n\t\t\t// Get max height of all items.\r\n\t\t\t$blog.each(function () {\r\n\t\t\t\tsetH = $(this).hasClass('column-1') ? false : true;\r\n\t\t\t\tif (maxHeight < $(this).find('.content-inner').height()) {\r\n\t\t\t\t\tmaxHeight = $(this).find('.content-inner').height();\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\t// Set height for all items.\r\n\t\t\tif (maxHeight > 0 && setH) {\r\n\t\t\t\t$blog.each(function () {\r\n\t\t\t\t\t$(this).find('.content-inner').css('height', maxHeight);\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t},\r\n\r\n\t\t/**\r\n\t\t * LearnPress switcher\r\n\t\t */\r\n\t\tlp_switcher: function () {\r\n\t\t\tvar cookie_name = $('.grid-list-switch').data('cookie');\r\n\t\t\tvar courses_layout = $('.grid-list-switch').data('layout');\r\n\t\t\tvar $list_grid = $('.grid-list-switch');\r\n\r\n\t\t\tif (cookie_name == 'lpr_course-switch') {\r\n\t\t\t\tvar gridClass = 'course-grid';\r\n\t\t\t\tvar listClass = 'course-list';\r\n\t\t\t} else {\r\n\t\t\t\tvar gridClass = 'course-grid';\r\n\t\t\t\tvar listClass = 'course-list';\r\n\t\t\t}\r\n\r\n\t\t\tvar check_view_mod = function () {\r\n\t\t\t\tvar activeClass = 'switcher-active';\r\n\t\t\t\tif ($list_grid.hasClass('has-layout')) {\r\n\t\t\t\t\tif (courses_layout == 'grid') {\r\n\t\t\t\t\t\t$('.archive_switch').removeClass(listClass).addClass(gridClass);\r\n\t\t\t\t\t\t$('.switchToGrid').addClass(activeClass);\r\n\t\t\t\t\t\t$('.switchToList').removeClass(activeClass);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t$('.archive_switch').removeClass(gridClass).addClass(listClass);\r\n\t\t\t\t\t\t$('.switchToList').addClass(activeClass);\r\n\t\t\t\t\t\t$('.switchToGrid').removeClass(activeClass);\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif ($.cookie(cookie_name) == 'grid') {\r\n\t\t\t\t\t\t$('.archive_switch').removeClass(listClass).addClass(gridClass);\r\n\t\t\t\t\t\t$('.switchToGrid').addClass(activeClass);\r\n\t\t\t\t\t\t$('.switchToList').removeClass(activeClass);\r\n\t\t\t\t\t} else if ($.cookie(cookie_name) == 'list') {\r\n\t\t\t\t\t\t$('.archive_switch').removeClass(gridClass).addClass(listClass);\r\n\t\t\t\t\t\t$('.switchToList').addClass(activeClass);\r\n\t\t\t\t\t\t$('.switchToGrid').removeClass(activeClass);\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\t$('.switchToList').addClass(activeClass);\r\n\t\t\t\t\t\t$('.switchToGrid').removeClass(activeClass);\r\n\t\t\t\t\t\t$('.archive_switch').removeClass(gridClass).addClass(listClass);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tcheck_view_mod();\r\n\r\n\t\t\tvar listSwitcher = function () {\r\n\t\t\t\tvar activeClass = 'switcher-active';\r\n\t\t\t\tif ($list_grid.hasClass('has-layout')) {\r\n\t\t\t\t\t$('.switchToList').click(function () {\r\n\t\t\t\t\t\t$('.switchToList').addClass(activeClass);\r\n\t\t\t\t\t\t$('.switchToGrid').removeClass(activeClass);\r\n\t\t\t\t\t\t$('.archive_switch').fadeOut(300, function () {\r\n\t\t\t\t\t\t\t$(this).removeClass(gridClass).addClass(listClass).fadeIn(300);\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t});\r\n\t\t\t\t\t$('.switchToGrid').click(function () {\r\n\t\t\t\t\t\t$('.switchToGrid').addClass(activeClass);\r\n\t\t\t\t\t\t$('.switchToList').removeClass(activeClass);\r\n\t\t\t\t\t\t$('.archive_switch').fadeOut(300, function () {\r\n\t\t\t\t\t\t\t$(this).removeClass(listClass).addClass(gridClass).fadeIn(300);\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t});\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$('.switchToList').click(function () {\r\n\t\t\t\t\t\tif (!$.cookie(cookie_name) || $.cookie(cookie_name) == 'grid') {\r\n\t\t\t\t\t\t\tswitchToList();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t\t$('.switchToGrid').click(function () {\r\n\t\t\t\t\t\tif (!$.cookie(cookie_name) || $.cookie(cookie_name) == 'list') {\r\n\t\t\t\t\t\t\tswitchToGrid();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\r\n\t\t\t\tfunction switchToList() {\r\n\t\t\t\t\t$('.switchToList').addClass(activeClass);\r\n\t\t\t\t\t$('.switchToGrid').removeClass(activeClass);\r\n\t\t\t\t\t$('.archive_switch').fadeOut(300, function () {\r\n\t\t\t\t\t\t$(this).removeClass(gridClass).addClass(listClass).fadeIn(300);\r\n\t\t\t\t\t\t$.cookie(cookie_name, 'list', {expires: 3, path: '/'});\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\r\n\t\t\t\tfunction switchToGrid() {\r\n\t\t\t\t\t$('.switchToGrid').addClass(activeClass);\r\n\t\t\t\t\t$('.switchToList').removeClass(activeClass);\r\n\t\t\t\t\t$('.archive_switch').fadeOut(300, function () {\r\n\t\t\t\t\t\t$(this).removeClass(listClass).addClass(gridClass).fadeIn(300);\r\n\t\t\t\t\t\t$.cookie(cookie_name, 'grid', {expires: 3, path: '/'});\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tlistSwitcher();\r\n\r\n\t\t},\r\n\r\n\t\tlearnpress_media_courses: function () {\r\n\t\t\t$('.media-link').magnificPopup({\r\n\t\t\t\ttype: 'iframe',\r\n\t\t\t});\r\n\t\t\t$('.media-iframe').magnificPopup({\r\n\t\t\t\ttype : 'inline',\r\n\t\t\t\tmidClick: true\r\n\t\t\t});\r\n\t\t},\r\n\t};\r\n\r\n})(jQuery);"]}