window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-154598704-1');
$(function(){
$('[name^=newsid]').next().addClass('ul_novinky');
if (window.isFrontpage)
{
$('body').addClass('uvod');
}
if (window.isFrontpage) {
$('[name^=newsid]').next().find('li').each(function(){
var a = $(this).find('a:last');
if (a.length>0)
{$(this).find('h3').wrap($('').attr({href:a.attr('href'),target:a.attr('target')}));}
});
}
if(location.pathname.match(/^\/search$/g)){
$('#main .post').addClass('page_search');
$('#main .post:first').addClass('page_search_title');
}
if ($(window).width() < 1001) {
$('body').addClass('resp');
}
$("#sidebar>ul>li>ul>li>ul>li>ul>li.current").parent().parent().addClass('current aktivni');
$("#sidebar>ul>li>ul>li>ul>li.current").parent().parent().addClass('current aktivni');
$("#sidebar>ul>li>ul>li.current").parent().parent().addClass('current aktivni');
$("#sidebar>ul>li.current").addClass('aktivni');
$("body").prepend("");
$("#header").wrap("");
$("").appendTo("#header");
$("#max-header").prependTo("body");
$("#menu").appendTo("#max-menu");
$(".slider-wrapper").appendTo("#max-slide");
$('input.button').val('odeslat');
$("#wrap").append("");
$("#head-bez-starosti").appendTo("#max-slide");
/*$(".home-head").appendTo("#max-slide");*/
$(".home-kontroladomen").prependTo("body.uvod #wrap");
$("#rightbar").appendTo("wrap");
$(".home-top-kontakty").prependTo("body");
$(".home-top-odkazy").appendTo(".home-top-kontakty");
$("#header .boxed").prependTo("#rightbar");
$("#locales").appendTo(".home-top-kontakty");
$("body>#max-slide>.slider-wrapper").parent().parent().addClass('akt-slide');
$("#sidebar>ul>li.aktivni").parent().parent().parent().addClass('split');
$("#rightbar .boxed:first-child h2").text('Potřebujete poradit s webem či doménou? Hledejte v nápovědě a našem webu');
$("#xxrightbar .boxed:first-child h2").remove();
$("#rightbar .boxed form.hledani table tr td input.button").val('Hledat');
$(".home-footer").prependTo("#footer");
$(".chatbublina_big, .chatbublina_big_hidden, .chatbublina_small").prependTo("#footer");
$("#main>h1").wrap("");
$(".paticka_banan a:first-child").text("Webové stránky");
$('.paticka_banan a:first-child').attr('title', 'Webové stránky od BANAN.CZ');
$("body.resp #sidebar").insertAfter("#main");
if ($(window).width() < 1001) {
$("#locales").appendTo("#max-header");
}
})
//responzivni menu
$(function() {
$('#menu').prepend('Menu');
var $pull = ('#pull');
var $menu = $('#menu > ul');
$(pull).on('click', function(e) {
e.preventDefault();
if(!$menu.data('show')){
$menu.height('initial').height($(document).height() - $("#menu > ul").offset().top);
$menu.stop(true, true).data({show: true}).animate({'margin-left': '0'});
}else
$menu.stop(true, true).data({show: false}).animate({'margin-left': -$menu.width()}, function(){
var height = $(this).height();
$(this).removeAttr("style").height(height);
});
});
$(document).bind('click', function(e) {
if($menu.data('show')){
if(!$(e.target).is('#menu *')) {
$menu.stop(true, true).data({show: false}).animate({'margin-left': -$menu.width()}, function(){
var height = $(this).height();
$(this).removeAttr("style").height(height);
});
}
}
});
$(window).resize(function(){
CheckMenu($menu);
});
CheckMenu($menu);
function CheckMenu($menu){
var w = window.innerWidth;
if(w > 1000) {
$menu.removeAttr('style');
$menu.find('.menu_add_row').remove();
$menu.height('initial');
$menu.data('show', false);
} else {
$menu.find('.menu_add_row').remove();
$menu.find('li').each(function(){
var $ull = $(this).find('ul:first');
if($ull.length){
$(this).append($('').data('$ul', $ull).click(function(){
if(!$(this).data('$ul').data('active'))
$(this).addClass('active').data('$ul').data('active', true).addClass('menu_add_show').parents('li:first').addClass('menu_add_active');
else
$(this).removeClass('active').data('$ul').data('active', false).removeClass('menu_add_show').parents('li:first').removeClass('menu_add_active');
}));
}
})
$menu.height('initial').height($(document).height() - $("#menu > ul").offset().top);
}
}
ChatBublinu($.cookie('chatbublina_deactive')=='true');
var queryDict = {};
location.search.substr(1).split("&").forEach(function(item) {queryDict[item.split("=")[0]] = item.split("=")[1]})
if(location.search.match(/^[?]google/)){
$.get(location.origin+'/modal-code.php?email='+(queryDict['email']||""),function(data){$('body').append(data);})
}
});
function ChatBublinu(deactive){
var hourNow = new Date().getHours();
$('.chatbublina_big, .chatbublina_big_hidden, .chatbublina_small').hide();
if(hourNow=21){
$('.chatbublina_small').show();
$('.hidden_chat_link').hide();
} else {
if(deactive){$('.chatbublina_big_hidden').show(); $.cookie('chatbublina_deactive', true);}
if(!deactive){$('.chatbublina_big').show(); $.cookie('chatbublina_deactive', false);}
}
}
$(function(){
if(window.outerWidth > 800)
{
$("#rightbar").prepend("");
}
else
{
$("#rightbar").prepend("");
$("#main").prepend("");
}
})
1.2.2020 20:36:23