"use strict";$(document).ready(function(){$(".avatars .col-lg-1").hover(function(){$(this).find(".note").show();},function(){$(this).find(".note").hide();});$(".b-chanel").hover(function(){$(this).find(".hover").show();},function(){$(this).find(".hover").hide();});var MYAPP={initialize:function(){MYAPP.setUpListeners();MYAPP.ready();},setUpListeners:function(){var $document=$(document),$window=$(window),$tabs=$('.custom-tabs'),$activeTab=$tabs.find('.tabs-panel > .active'),vCategor_Right=$('.v-categories.side-menu .content-block .cb-content > .row > div:last-child'),vCategor_Left=$('.v-categories.side-menu .content-block .cb-content > .row > div:first-child');$tabs.on('click','.tabs-panel > a',function(e){MYAPP.singlVideo.changeTab.call(this);e.preventDefault();e.stopPropagation();return false;});$activeTab.trigger('click');if($('.btn-copy').length)new Clipboard('.btn-copy');$('.btn-color-toggle').on('click',function(){if($('body').hasClass('light')){$('body').removeClass('light').addClass('dark');$(this).find('img').attr('src','images/icon_bulb_dark.png');}else{if($('body').hasClass('dark'))$('body').removeClass('dark').addClass('light');$(this).find('img').attr('src','images/icon_bulb_light.png');}});function align_categor_col(){vCategor_Left.removeAttr('style');if(vCategor_Left.innerHeight()<=vCategor_Right.innerHeight()){vCategor_Left.css({'height':vCategor_Right.innerHeight()});}};function add_categor_bg(){var bg_add=$('.v-categories.side-menu .bg-add'),vCategor_Left_posL=vCategor_Left.get(0).getBoundingClientRect().left;bg_add.css({height:vCategor_Left.innerHeight(),width:vCategor_Left_posL+'px',left:'-'+vCategor_Left_posL+'px'});};if($('.v-categories.side-menu').length){align_categor_col();add_categor_bg();}$(window).resize(function(){if($('.v-categories.side-menu').length){align_categor_col();add_categor_bg();}});$('.u-form input[type="checkbox"]').on('change',function(){var $this=$(this),checkboxDiv=$(this).parents('div.checkbox');if($this.next().css('display')=='block'){checkboxDiv.addClass('checked');}else{checkboxDiv.removeClass('checked');}});},singlVideo:{changeTab:function(){var $this=$(this),$dataTab=$this.attr('data-tab'),$tabs=$this.parents('.custom-tabs').find('.tabs-content').children(),i=0;for(;i<$tabs.length;i++){if($tabs.eq(i).hasClass($dataTab)){$tabs.removeClass('active');$tabs.eq(i).addClass('active');$this.parent().children().removeClass('active');$this.addClass('active');return;}}}},ready:function(){if($('video').length){$('video').mediaelementplayer({alwaysShowControls:false,videoVolume:'horizontal',features:['playpause','progress','current','duration','tracks','volume','fullscreen'],enableKeyboard:true,pauseOtherPlayers:true,enableAutosize:true});}}};MYAPP.initialize();});