    <script type="text/javascript">var base='{$main_url}/';var _rel="{$main_url}/{$c_section}";var current_url=base;var menu_section='{$c_section}';var jslang=new Array();jslang["lss"]='{if $smarty.session.USER_ID gt 0}1{else}0{/if}';jslang["loading"]='{lang_entry key="frontend.global.loading"}';jslang["inwatchlist"]='{lang_entry key="files.menu.watch.in"}';jslang["nowatchlist"]='{lang_entry key="files.menu.watch.login"}';jslang["showmore"]='{lang_entry key="main.text.show.more"}';jslang["showless"]='{lang_entry key="main.text.show.less"}';var f_lang=new Array();f_lang["add_new"]='{lang_entry key="files.menu.add.new"}';f_lang["l"]='{lang_entry key="frontend.global.l.c"}';f_lang["v"]='{lang_entry key="frontend.global.v.c"}';f_lang["s"]='{lang_entry key="frontend.global.s.c"}';f_lang["i"]='{lang_entry key="frontend.global.i.c"}';f_lang["a"]='{lang_entry key="frontend.global.a.c"}';f_lang["d"]='{lang_entry key="frontend.global.d.c"}';f_lang["b"]='{lang_entry key="frontend.global.b.c"}';f_lang["upload"]='{$main_url}/{href_entry key="upload"}';var upload_lang=new Array();upload_lang["h1"]='{lang_entry key="upload.text.h1.select"}';upload_lang["h2"]='{lang_entry key="upload.text.h2.select"}';upload_lang["category"]='{lang_entry key="upload.text.categ"}';upload_lang["username"]='{lang_entry key="upload.text.user"}';upload_lang["assign"]='{lang_entry key="upload.text.assign.tip"}';upload_lang["tip"]='{lang_entry key="upload.text.categ.tip"}';upload_lang["utip"]='{lang_entry key="upload.text.user.tip"}';upload_lang["filename"]='{lang_entry key="upload.text.filename"}';upload_lang["size"]='{lang_entry key="upload.text.size"}';upload_lang["status"]='{lang_entry key="upload.text.status"}';upload_lang["drag"]='{lang_entry key="upload.text.drag"}';upload_lang["select"]='{lang_entry key="upload.text.select"}';upload_lang["start"]='{lang_entry key="upload.text.btn.start"}';</script>
    <script type="text/javascript" src="{$javascript_url}/min/init0.min.js"></script>
{insert name="loadjsplugins"}
{if $page_display eq "tpl_browse" or $page_display eq "tpl_blogs" or ($page_display eq "tpl_search" and ($smarty.get.tf eq "" or $smarty.get.tf eq "1" or $smarty.get.tf eq "2" or $smarty.get.tf eq "3" or $smarty.get.tf eq "4" or $smarty.get.tf eq "7" or $smarty.get.tf eq "8" or $smarty.get.tf eq "9")) or ($page_display eq "tpl_channel" and ($channel_module eq {href_entry key="shorts"} or $channel_module eq {href_entry key="broadcasts"} or $channel_module eq {href_entry key="videos"} or $channel_module eq {href_entry key="images"} or $channel_module eq {href_entry key="audios"} or $channel_module eq {href_entry key="documents"} or $channel_module eq {href_entry key="blogs"}))}
	<script type="text/javascript" src="{$javascript_url}/min/fwtabs.browse.init.min.js"></script>
{elseif $page_display eq "tpl_channels" or ($page_display eq "tpl_search" and $smarty.get.tf eq 6)}
	<script type="text/javascript" src="{$javascript_url}/min/fwtabs.channels.init.min.js"></script>
{elseif $page_display eq "tpl_files" or ($page_display eq "tpl_search" and $smarty.get.tf eq "5") or $page_display eq "tpl_playlists" or $page_display eq "tpl_subs" or ($page_display eq "tpl_channel" and $channel_module eq {href_entry key="playlists"})}
	<script type="text/javascript" src="{$javascript_url}/min/fwtabs.files.init.min.js"></script>
{/if}
{if $page_display eq "tpl_account" or $page_display eq "tpl_files_edit"}
        <script type="text/javascript">$(document).ready(function() {ldelim}$('.uinfo-entry').mouseover(function(){ldelim}$(this).addClass("y-bg");{rdelim}).mouseout(function(){ldelim}$(this).removeClass("y-bg");{rdelim});url={if $page_display eq "tpl_account"}current_url + menu_section + '?s=account-menu-entry1&do=loading'{else}'{$main_url}/{$c_section}?fe=1&{$file_type}={$file_key}&do=thumb'{/if};$(".thumb-popup").fancybox({ldelim} type: "ajax", margin: 20, minWidth: "70%", href: url, height: "auto", autoHeight: "true", autoResize: "true", autoCenter: "true" {rdelim});{rdelim});</script>
{/if}
{if $smarty.session.USER_ID gt 0 and ($page_display eq "tpl_view" or $page_display eq "tpl_shorts" or $page_display eq "tpl_channel" or $page_display eq "tpl_channels" or $page_display eq "tpl_index")}
	<script type="text/javascript">$(document).on("click", ".unsubscribe-button", function() {ldelim}var cd="{$smarty.session.USER_KEY}";{if $page_display eq "tpl_view" or $page_display eq "tpl_shorts"}var cc="{$usr_key}"; act_url=current_url + menu_section + "?{$file_type[0]}={$file_key}&do=unsub-option";{elseif $page_display eq "tpl_index" or $page_display eq "tpl_channels"}var cc=$(this).attr("rel-usr"); act_url="?do=unsub-option&u="+cc;{else}var cc="{$channel_key}"; act_url="?a=&do=unsub-option";{/if}if (cc !== cd) $.fancybox({ldelim} type: "ajax", minWidth: "80%", minHeight: "50%", margin: 20, href: act_url {rdelim});{rdelim});$(document).on("click", ".subscribe-button", function() {ldelim}var cd="{$smarty.session.USER_KEY}";{if $page_display eq "tpl_view" or $page_display eq "tpl_shorts"}var cc="{$usr_key}"; act_url=current_url + menu_section + "?{$file_type[0]}={$file_key}&do=sub-option";{elseif $page_display eq "tpl_index" or $page_display eq "tpl_channels"}var cc=$(this).attr("rel-usr"); act_url="?do=sub-option&u="+$(this).attr("rel-usr");{else}var cc="{$channel_key}"; act_url="?a=&do=sub-option";{/if}if (cc !== cd) $.fancybox({ldelim} type: "ajax", minWidth: "80%", minHeight: "50%", margin: 20, href: act_url {rdelim});{rdelim});</script>
{elseif $page_display eq "tpl_files_edit" or $page_display eq "tpl_respond"}
	<script type="text/javascript" src="{$scripts_url}/shared/tinymce/tinymce.min.js"></script>
	<script type="text/javascript">var _u=current_url + menu_section + '?fe=1&{$file_type}={$file_key}';{if $live_module eq "1"}var lm=1;{/if}{if $video_module eq "1"}var vm=1;{/if}{if $short_module eq "1"}var sm=1;{/if}{if $image_module eq "1"}var im=1;{/if}{if $audio_module eq "1"}var am=1;{/if}{if $document_module eq "1"}var dm=1;{/if}</script>
	<script type="text/javascript" src="{$javascript_url}/min/tinymce.init.min.js"></script>
{/if}
	<script type="text/javascript" src="{$javascript_url}/jquery.init.min.js"></script>
    <script type="text/javascript">$(function(){ldelim}$(".search-filter-mode").dlmenu({ldelim}animationClasses:{ldelim}classin:"dl-animate-in-5",classout:"dl-animate-out-5"{rdelim}{rdelim});$(".search-filter-mode ul li a").on("click",function(e){ldelim}e.preventDefault();var t=$(this);var v=t.attr("rel-value");$(".sb-search-ft").val(v);$("footer").click();$("#filter-search-type .dl-trigger i").removeClass().addClass(t.attr("class"));$("#search").focus();{rdelim});$("#filter-search-type .dl-trigger").on("click",function(){ldelim}$(".main-filter-mode").dlmenu("closeMenu");{rdelim});$(".main-filter-mode .dl-trigger").on("click",function(){ldelim}$("#filter-search-type").dlmenu("closeMenu");{rdelim});{rdelim});function init(){ldelim}window.addEventListener('scroll',function(e){ldelim}var distanceY=window.pageYOffset||document.documentElement.scrollTop,shrinkOn=0,header=document.querySelector("header");if (distanceY>shrinkOn){ldelim}classie.add(header,"smaller");{rdelim}else{ldelim}if(classie.has(header,"smaller")){ldelim}classie.remove(header,"smaller");{rdelim}{rdelim}{rdelim});{rdelim}window.onload=init();$(document).ready(function(){ldelim}$(".icon-rs-arrow-left").on("click",function(){ldelim}$(".search_holder").removeClass("open");$("#sb-search-off").removeClass("sb-search-open");$('.dynamic_container').removeClass('s-open');$('.navbar-brand').css({ldelim}'visibility':'visible'{rdelim}){rdelim});{rdelim});$(document).ready(function(){ldelim}$("#search").keydown(function(){ldelim}var st='video';switch($(".sb-search-ft").val()){ldelim}case "9":st="short";break;case "8":st="live";break;case "1":st="video";break;case "2":st="image";break;case "3":st="audio";break;case "4":st="doc";break;case "5":st="blog";break;case "6":st="channel";break;{rdelim}$("#search").autocomplete({ldelim}type:"post",params:{ldelim}"t":st{rdelim},serviceUrl:current_url+"search"+"?do=autocomplete",onSearchStart:function(){ldelim}{rdelim},onSelect:function(suggestion){ldelim}$(".sb-search-submit").trigger("click");{rdelim}{rdelim});{rdelim});{rdelim});$(document).ready(function(){ldelim}{literal}jQuery(document).on({click: function(e){if($(e.target).hasClass("fancybox-opened"))$("a.fancybox-close").click();}},".fancybox-overlay");{/literal}{rdelim});</script>
