jQuery.noConflict();
(function ($){
$('.odkaz-interni figure>a').each(function(){
$(this).attr('rel', 'noopener');
});
$('.odkaz-externi figure>a').each(function(){
$(this).attr('rel', 'nofollow sponsored');
});
$('nav.top_menu > ul > li:not(.loterie):not(.ruleta) > a').each(function(index){
var firstWord=$(this).text().split(' ')[1];
var replaceWord="<span class='barva'>" + firstWord + "</span>";
var newString=$(this).html().replace(firstWord, replaceWord);
});
$('nav.top_menu > ul > li.loterie > a').each(function(index){
var firstWord=$(this).text().split(' ')[3];
var replaceWord="<span class='barva'>" + firstWord + "</span>";
var newString=$(this).html().replace(firstWord, replaceWord);
$(this).html(newString);
});
$('nav.top_menu > ul > li.ruleta > a').each(function(index){
var firstWord=$(this).text().split(' ')[3];
var replaceWord="<span class='barva'>" + firstWord + "</span>";
var newString=$(this).html().replace(firstWord, replaceWord);
$(this).html(newString);
});
$(".widget .menu>li:contains('(0)')").each(function (){
$(this).html($(this).html().split("(0)").join(""));
});
$('#kohut-banner .button_wrapper ').append('<a href="/clanky/novinky/" target="_self" title="STAVEBNÍ STROJE KONTAKT" class="button_  color medium"><span class="icon-new-attach-1"></span>NOVINKY</a>');
$("#first-box .text-holder a.read_more").prop("href", "/bazar-stroju/");
/**********************
var val=$("span.price").html();
var matches=val.match(/\d+/g);
if(matches!=null){
console.log('number');
}
**********/
if($(".product_meta:contains('Stavební stroje')").length){
$("body").addClass("stavebni-stroje");
}else if($(".product_meta:contains('Bazar stojů')").length){
$("body").addClass("bazar-stroju");
}
if($('#accordion-3 .toggle-content').contents().length==0){
$('#accordion-3 ').hide();
}
$("#related-products .top-product .featured_image p a.imgeffect:first-child ").append('<div class="overlay"></div>');
/********************** vysouvaci kontakt vpravo **********
var hover_off=false;
var hover_count=200;
var hover_count2=100;
$(".cart-tab .cart-link .icon-phone").mouseover(function(){
hover_off=false;
$(".cart-tab").addClass('hovering');
$(".cart-tab ").animate({right: '0px'}, 300);
});
$(".cart-tab .contact-form .close").click(function(){
hover_off=true;
setTimeout(myMouseOut, hover_count);
});
$(".cart-tab ").mouseout(function(){
hover_off=true;
setTimeout(myMouseOut, hover_count2);
});
function myMouseOut(){
if(hover_off){
$(".cart-tab ").removeClass('hovering');
$(".cart-tab ").animate({right: '-392px'}, 100);
}}
/********************** konec **********/
$.fn.scrollView=function (){
return this.each(function (){
$('html, body').animate({
scrollTop: $(this).offset().top
}, 1000);
});
}
$('.scroll-down').click(function (event){
event.preventDefault();
$('#main_content>.content_row.overlap').scrollView();
});
$(window).load(function (){
$(window).scroll(function(){
if($(this).scrollTop() > 500){
$('#topcontrol').addClass('scrollvisible');
}});
$('#srovnani .wpsm-price .wpsm-price-column:first-child .wpsm-price-content ul li:first-child').wrapInner('<a target="_blank" href="https://www.kurzovesazeni.com/sazkove-kancelare/tipsport/"></a>');
$('#srovnani .wpsm-price .wpsm-price-column:nth-child(2) .wpsm-price-content ul li:first-child').wrapInner('<a target="_blank" href="https://www.kurzovesazeni.com/sazkove-kancelare/chance/"></a>');
$('#srovnani .wpsm-price .wpsm-price-column:nth-child(3) .wpsm-price-content ul li:first-child').wrapInner('<a target="_blank" href="https://www.kurzovesazeni.com/sazkove-kancelare/fortuna/"></a>');
$('#srovnani .wpsm-price .wpsm-price-column:nth-child(4) .wpsm-price-content ul li:first-child').wrapInner('<a target="_blank" href="https://www.kurzovesazeni.com/sazkove-kancelare/synottip/"></a>');
});
})(jQuery);