var inanimate=false; var closable = false; var pathname = window.location.pathname; $(document).ready(function(){ var $ = jQuery.noConflict(); if (pathname == '/menyasszonyi' || pathname == '/menyecske' || pathname == '/koszorus' || pathname == '/alkalmi-bali' || pathname == '/oromanya' || pathname == '/oltony' || pathname == '/koktel' || pathname == '/broadway') { var position = $('#subCat li:first').position(); $('#topNav').css('top', position.top - 140); } $(".date").datepicker({ dateFormat: 'yy. mm. dd.', regional: 'hu', dayNames: [ "Vasárnap", "Hétfő", "Kedd", "Szerda", "Csütörtök", "Péntek", "Szombat" ], dayNamesMin: [ "V", "H", "K", "Sz", "Cs", "P", "Sz" ], monthNames: [ "Január", "Február", "Március", "Április", "Május", "Június", "Július", "Augusztus", "Szeptember", "Október", "November", "December" ], firstDay: 1 }); $(".date").focus(function() { $('#time').attr('opened', true); }); $(".date").focusout(function() { $('#time').attr('opened', false); }); var $ = jQuery.noConflict(); /*$(".article_text").dotdotdot(); $(".month_text").dotdotdot(); $(".search_description").dotdotdot(); $(".minicard_text").dotdotdot(); $(".card_text").dotdotdot();*/ $("#div_kat_text").dotdotdot({ wrap : 'word', after: "div.btn-kat-desc-more" }); $("div.btn-kat-desc-more").on("click", function(){ $("#div_kat_text").trigger('destroy'); $("#div_kat_text").css({ 'height': 'auto' }); $("div.btn-kat-desc-more").css('display','none'); }) //dropQuestion(); $(window).resize(function(){ setContainer();}); $("#yes").on("click",function(){ $.get("https://elizabethnardo.hu/caller.php", {f:"setadult"}); $(".isadult_card").remove(); $("container").animate({opacity: 1}); }); if (pathname === '/') { var jslider=$('.slider').bxSlider({ speed : 700, auto : true, autoControls : true, responsive : true, pause : 5000, controls : true, pager : false }); } var myDelay = 1500; $("ul#menu li a").mouseover(function(){ var elem = $(this).parent().children(' li a'); setTimeout(function(){elem.show();}, myDelay); }); $("#menu li a").mouseout(function(){ var elem = $(this).parent(".submenu"); elem.hide(); }); var menup_width =0; $(".termekek > li").each(function() { menup_width+=$(this).outerWidth(); }); //alert($(".menu_slide").width()+"\n"+menup_width); if(menup_width<=$(".menu_slide").outerWidth()) { $(".menupager").each(function(){ $(this).remove(); }); } $("#nextslide").click(function(event){ jslider.goToNextSlide(); event.stopPropagation(); }); $(".bx-wrapper").click(function(){ jslider.goToNextSlide(); }); $(".slide_element").on('click',function(){ top.location.href=$(this).attr("url"); }); $("#prevslide").click(function(event){ jslider.goToPrevSlide(); event.stopPropagation(); }); if (pathname === '/') { var slider_count=jslider.getSlideCount(); for(var i=0;i"); } var dotwidth=$(".sliderdot").outerWidth()+2; $(".dotholder").width(dotwidth*slider_count); $(".slider").mouseenter(function() { $("#nextslide").animate({opacity: 1}); $("#prevslide").animate({opacity: 1}); $(".slider_control").animate({opacity: 1}); //jslider.stopAuto(); }); $(".slider").mouseleave(function() { $("#nextslide").animate({opacity: 0}); $("#prevslide").animate({opacity: 0}); $(".slider_control").animate({opacity: 0}); //jslider.startAuto(); }); } $(".menu_drop").on("click", function() { var $ = jQuery.noConflict(); $("body").animate({ scrollTop: 0 }, 800); if($(this).attr("opened")=="false") { $("#menu li").addClass("submenu_top"); $("ul.termekek .searchLi").replaceWith("
  • TOVÁBBI TARTALMAK
  • "); $("ul.termekek").append($('#menu li')); $(this).children(".dropButton").children("img").addClass("menuOpen"); $(this).children(".dropButton").children("img").removeClass("menuClose"); //$(this).css("background-image", "url('https://elizabethnardo.hu//img/menuclose.svg')"); $(this).attr("opened", "true"); $("body").css("overflow", "hidden"); if(parseInt($(window).outerWidth())<1150) { $('#header').before($('#termekek')); $("ul.termekek").css("height", $(window).height() -100); } if(parseInt($(window).outerWidth())<=768) { $("ul.termekek").css("height", $(window).height() - 60); } $("ul.termekek li a").attr("opened", "false"); if(parseInt($(window).outerWidth())<1125) { $(".termekek .firstLI").css("display", "block"); $(".termekek .firstLI").html("
    "); $("#searchinput2").on("keypress", function(e) { if(e.which === 13) { var q = $("#searchinput2").val(); if (q != '') { $.get("https://elizabethnardo.hu/caller.php", {f:"getpageurl"}) .done(function(data){top.location.href=data+'search/'+q;}); } } }); } $(".termekek").slideToggle(); $(".submenu_top").on("click", function() { $(".submenu_top a.remattr").removeAttr("href"); }); } else { //$(this).css("background-image", "url('https://elizabethnardo.hu//img/menudrop.svg')"); $(this).children(".dropButton").children("img").removeClass("menuOpen"); $(this).children(".dropButton").children("img").addClass("menuClose"); $(this).attr("opened", "false"); $("body").css("overflow", "auto"); $("ul.termekek").css("height", 60); $(".termekek").slideToggle(); } }); $(".sliderdot").mouseenter(function() { $(this).animate({opacity: 0.7}); }); $(".sliderdot").mouseleave(function() { $(this).animate({opacity: 0.3}); }); $(".sliderdot").click(function(event) { jslider.goToSlide($(this).attr("x")); event.stopPropagation(); }); $(".slideholder").click(function() { var csnum=jslider.getCurrentSlide(); top.location.href=$('.slide_element[x="'+csnum+'"]').attr("href"); }); //menu2 //$(".cartbtn").click(function() { // $("#cartdd").css({"display":"inline"}); //}); $("#cartbtn").on("click", function() { $("#cartdd").slideToggle(); $("#lockdd").css({display:"none"}); $("#searchdd").css({display:"none"}); $("#menudd").css({display:"none"}); }); $("#lockbtn").on("click", function() { $("#lockdd").slideToggle(); $("#searchdd").css({display:"none"}); $("#cartdd").css({display:"none"}); $("#menudd").css({display:"none"}); }); $("#searchbtn").on("click", function() { $("#searchdd").slideToggle(); $("#lockdd").css({display:"none"}); $("#cartdd").css({display:"none"}); $("#menudd").css({display:"none"}); }); $("#menubtn").on("click", function() { closable=!closable; if(closable==true) { $("#menudd").slideToggle(); } $("#searchdd").css({display:"none"}); $("#lockdd").css({display:"none"}); $("#cartdd").css({display:"none"}); }); $(".reg_col .title").on("click",function() { $(this).parent(".reg_col").children(".regcontent").slideToggle(); }); $("#searchdd li").on("click",function(event) { event.stopPropagation(); }); $("#sumbtn").on("click",function(event) { event.stopPropagation(); }); //$(".stopprop").on("click",function(event){event.stopPropagation();}); //$(".pdel").on("click",function(event){event.stopPropagation();}); $(".productpage .grid .count").keyup(function() { var jcount = $(".productpage .grid .count").val(); var jid = $(".productpage .grid .id").val(); $.get("https://elizabethnardo.hu/caller.php",{f:"getprice",id:jid, count:jcount}) .done(function(data) { var sumprice=data; $(".productpage .grid #sumprice").html(sumprice+" Ft"); }); }); $(document).on("click",".product_contact_send", function() { var jname = $("#name").val(); $("#name").val(""); var jemail = $("#email").val(); $("#email").val(""); var jmsg = $("#msg").val(); $("#msg").val(""); var jkey = $("#key").val(); $("#key").val(""); var jtitle = $("#title").val(); //if(jname.lenght>0 && jemail.lenght>0 && jtitle.lenght>0 && jmsg.lenght>0) $.post("https://elizabethnardo.hu/caller.php", {f:"sendproductmsg",name:jname,email:jemail,message:jmsg,title:jtitle,key:jkey}) .done(function(data){ alert(data); var rand = Math.random()*50+400; $("#captcha").css("background-image","url('https://elizabethnardo.hu/cimage.php?"+rand+"')"); }); }); //uj menuslide $("ul.termekek li a").on("click", function(){ if ($(this).attr("opened")== "false") { $(this).parent().find("ul").slideDown("quick"); $(this).attr("opened","true"); } else { $(this).parent().find("ul").slideUp("quick"); $(this).attr("opened","false"); //alert('teszt'); } }); $("#addcartbtn").click(function(){ var id = $(this).attr("pid"); var count = $(this).attr("pcount"); addcart(id, count); }); $(document).on("click", "#captcha",function(){ var rand = Math.random()*50+400; $(this).css("background-image","url('https://elizabethnardo.hu/cimage.php?"+rand+"')"); }); $(".opendetails").click(function(){ $("#d_"+$(this).attr("d")).slideToggle(); }); $(".details").click(function(){ $(this).slideToggle(); }); $(".searchbtn").on("click", function(){ var q = $("#searchinput").val(); if (q != '') { $.get("https://elizabethnardo.hu/caller.php", {f:"getpageurl"}) .done(function(data){top.location.href=data+'search/'+q;}); } }); /* $(".menudown").on("click", function(){ var elementArray = $(".termekek li").get(); if ($(".menu_slide").height() >= 124 && $(".menu_slide").css("margin-top").replace("px", "") > ($(".menu_slide").height()-62)*-1){ var nexttop = parseInt($(".menu_slide").css("margin-top").replace("px", ""))-62; $(".menu_slide").animate({"margin-top":nexttop}); } }); $(".menuup").on("click", function(){ if ($(".menu_slide").height() >= 124 && $(".menu_slide").css("margin-top").replace("px", "") < 0){ //($(".termekek").height()-62)){ var nexttop = parseInt($(".menu_slide").css("margin-top").replace("px", ""))+62; $(".menu_slide").animate({"margin-top":nexttop}); } }); */ $(".menuup").on("mouseenter", function(){ slideMenuUp() }); $(".menudown").on("mouseenter", function(){ slideMenuDown() }); $(".menuup").on("click", function(){ slideMenuUp() }); $(".menudown").on("click", function(){ slideMenuDown() }); $(".tab_btn").on("click", function(){ var jorder = $(this).attr("content"); var jid = $(this).attr("pid"); $(".tab_btn").removeClass("active_tab"); $(this).addClass("active_tab"); //$(this).css({"background-color", "#b5b5b5 !important"},{"color","white !important"},{"z-index","3"}); /* background-color: #b5b5b5 !important; color: white !important; z-index: 3; */ $.get("https://elizabethnardo.hu/caller.php",{f:"tab_content", order:jorder, id:jid}) .done(function(data){ $(".tab_content").html(data); }); }); $("#searchinput").on("keypress", function(e) { if(e.which === 13) { $("#searchButton").trigger("click"); } }); $("#searchButton").on("click", function(e) { var q = $("#searchinput").val(); if (q != '') { $.get("https://elizabethnardo.hu/caller.php", {f:"getpageurl"}) .done(function(data){top.location.href=data+'search/'+q;}); } }); $("#searchinput2").on("keypress", function(e) { if(e.which === 13) { var q = $("#searchinput2").val(); if (q != '') { $.get("https://elizabethnardo.hu/caller.php", {f:"getpageurl"}) .done(function(data){top.location.href=data+'search/'+q;}); } } }); }); /////////////////////////////////////////////////////////////////////////////////////////////////////// function slideMenuUp() { var elementArray= $(".termekek li").get(); var actIndex=parseInt($(".termekek").attr("index")); var nextWidth = parseInt($(".termekek").css("margin-left"))+parseInt($(elementArray[actIndex-1]).outerWidth()); if($.isNumeric(nextWidth) && window.inanimate==false){ window.inanimate=true; $(".termekek").animate({"margin-left":nextWidth}, 300, "linear",function(){$(".termekek").attr("index", actIndex-1); window.inanimate=false;}); if(actIndex-1==0) { $(".termekek").animate({"margin-left":0}, 300); } } $(".termekek").attr("ml", nextWidth); } function slideMenuDown() { var elementArray= $(".termekek li").get(); var actIndex=parseInt($(".termekek").attr("index")); var nextWidth = parseInt($(".termekek").css("margin-left"))-parseInt($(elementArray[actIndex]).outerWidth()); if(actIndex<((elementArray).length-3) && inanimate==false){ window.inanimate=true; $(".termekek").attr("index", actIndex+1); $(".termekek").animate({"margin-left":nextWidth}, 300, "linear",function(){$(".termekek").attr("index", actIndex+1); window.inanimate=true;inanimate=false;}); } $(".termekek").attr("ml", nextWidth); } function addcart(jid, jcount) { if(jcount==0) { jcount=$("#count_"+jid).val(); } $.get("https://elizabethnardo.hu/caller.php", {f:"addcart", id:jid, count:jcount}).done (function(data){ alert(data); menu2Reload(); }); } function modcart(jid, jcount, reload, popup) { if(jcount==0) { jcount=$("#count_"+jid).val(); } if(jcount<=0){delcart(jid);}else{ $.get("https://elizabethnardo.hu/caller.php", {f:"modcart", id:jid, count:jcount}).done (function(data){ if(popup==true) { alert(data); } menu2Reload(); if(reload==true) { top.location.href=''; } });} } function delcart(jid) { var res=confirm("Biztosan törölni akarja a tételt?"); if(res==true){ var jcount=0; var reload=true; $.get("https://elizabethnardo.hu/caller.php", {f:"modcart", id:jid, count:jcount}).done (function(data){ menu2Reload(); if(reload==true) { top.location.href=''; } });} } function initSlider() { var elementh = $(".slide_element").height(); max = elementh*$(".slide_element").length; } function menu2Reload() { //alert($(".cartdd").html()); $.get("https://elizabethnardo.hu/caller.php", {f:"menu2reload"}) .done(function(reload){ $("#cartdd").html(reload); }); cartnumber(); } function cartnumber() { $.get("https://elizabethnardo.hu/caller.php", {f:"cartnumber"}) .done(function(data2){ var string ="("+data2+")"; $(".cartcount").html(string) }); } /*function resetPwd() { var jemail = $("#email").val(); if(jemail=="") { alert("Írja be a bejelentkező mezőbe az email címét, majd kattintson ismét a linkre!"); } else { $.get("https://elizabethnardo.hu/caller.php",{f:"resetpwd", email:jemail}) .done(function(data){ alert(data); }); } }*/ function labelclick(jid) { $.get("https://elizabethnardo.hu/caller.php", {f:"labelclick", id:jid}); } function dropQuestion() { $.get("https://elizabethnardo.hu/caller.php", {f:"isadult"}) .done(function(data) { if(data=="0") { $(".container").animate({opacity: 0}, function(){ $("#over18").css({display: 'block'}); $("#over18").animate({opacity: 1}); /* if(isadult) { $.get("https://elizabethnardo.hu/caller.php", {f:"setadult"}).done(function(){ $(".container").animate({opacity: 1}, function(){ $("#over18").animate({opacity: 1});}); }); } else { $.get("https://elizabethnardo.hu/caller.php", {f:"noadult"}).done(function(){ top.location.href="http://www.futuremarket.hu/"; }); } */ }); } if(data=="no") { top.location.href="http://www.futuremarket.hu/"; } }); } function sayYes() { $.get("https://elizabethnardo.hu/caller.php", {f:"setadult"}).done(function(){ $(".container").animate({opacity: 1}, function(){ $("#over18").animate({opacity: 1});}); $("#over18").css({display: 'none'}); }); } function sayNo() { $.get("https://elizabethnardo.hu/caller.php", {f:"noadult"}).done(function(){ top.location.href="http://www.futuremarket.hu/"; }); } function setContainer() { var $ = jQuery.noConflict(); //$(".container").css("margin-top", $(".head").outerHeight()); //$(".container").css("height",$(this).height()-parseInt($("#head").outerHeight())); if(parseInt($(window).outerWidth())>1151) { $(".termekek").css("display","block"); $(".menu_drop").attr("opened","true"); $(".termekek").attr("dropable","false"); $(".termekek .firstLI").css("display", "none"); } else { $(".termekek").css("display","none"); $(".menu_drop").attr("opened","false"); $(".termekek").attr("dropable","true"); } }