function dza(){ $("#dza").click(); } $(document).ready(function() { $("#sizer").text($("#sizer").width()) if(window.location.hash == "#form1"){ alert('Ihre Anfrage wurde gesendet!'); window.location.href='/index.php'; } $("#anfragesenden").click(function(){ if($("#name").val() == "") { $("#name").css("background-color","#F49537"); return true; } if($("#Firma").val() == "") { $("#name").css("background-color","#F49537"); return true; } if($("#EMail").val() == "") { $("#name").css("background-color","#F49537"); return true; } $.post("senditNEW.php",$("#as").serialize(),function(msg){ alert('Ihre Anfrage wurde gesendet!'); $("#anfrage").fadeOut(2000); $("#anfragen").load("cart.php?count=1"); }); }); $(".item").click(function(){ $('#slide').data('rhinoslider').pause(); $(this).find("a").click(); }); $("#anker1").click(function() { if ( $("#produkt1_1").length > 0) { var toppy = $("#produkt1_1").offset().top - 270; $('html, body').animate({ scrollTop: toppy }, 2000); } else { window.location.href='Anker.html'; } }); $("#dza").click(function() { if ( $( "#hexmash_konfigurator" ).length ) { var toppy = $("#hexmash_konfigurator").offset().top - 120; } if ( $( "#hitzeschutzanfrage" ).length ) { var toppy = $("#hitza").offset().top - 210; } if ( $( "#produktanfrage" ).length ) { var toppy = $("#aanker").offset().top - 210; } if ( $( "#kontaktform" ).length ) { var toppy = $("#afeuer").offset().top - 210; } if ( $( "#drahtbiegeanfrage" ).length ) { var toppy = $("#drahta").offset().top - 210; } $('html, body').animate({ scrollTop: toppy }, 2000); }); $("#hex1").click(function() { if ( $("#produkt2_1").length > 0) { var toppy = $("#produkt2_1").offset().top - 270; $('html, body').animate({ scrollTop: toppy }, 2000); } else { window.location.href='Hexgrate-Hexmash.html'; } }); $("#hexgrate_anfrage").click(function(e){ e.preventDefault(); $.post("cart.php",$("#hexgrateform").serialize(),function(msg){ var waren = $("#anfragen").text(); waren++; $("#anfragen").load("cart.php?count=1"); if(waren){ $("#waren").css("display","block"); } alert('Ihre Anfrage wurde hinzugefügt!\n\nNun können Sie oben die Anfrage absenden oder\neinfach weitere Anfragen hinzufügen'); }); }); $("#hitze1").click(function() { if ( $("#produkt3_1").length > 0) { var toppy = $("#produkt3_1").offset().top - 270; $('html, body').animate({ scrollTop: toppy }, 2000); } else { window.location.href='Hitzeschutz.html'; } }); $("#send").click(function(e){ var file_data = $('#file1').prop('files')[0]; var form_data = new FormData(); var other_data = $('#form1').serializeArray(); $.each(other_data,function(key,input){ form_data.append(input.name,input.value); }); form_data.append('file1', file_data) $("body").append("


"); $.ajax({ xhr: function() { var xhr = new window.XMLHttpRequest(); xhr.upload.addEventListener("progress", function(evt) { if (evt.lengthComputable) { var percentComplete = evt.loaded / evt.total; percentComplete = parseInt(percentComplete * 100); $( "#status" ).css("width",percentComplete+"%"); $( "#prozent").text(percentComplete+"%"); } }, false); return xhr; }, url: 'cart.php', dataType: 'text', cache: false, contentType: false, processData: false, data: form_data, type: 'post', success: function(dat){ var waren = $("#anfragen").text(); waren++; $("#anfragen").load("cart.php?count=1"); if(waren){ $("#waren").css("display","block"); } $("#uploadani").remove(); alert('Ihre Anfrage wurde hinzugefügt!\n\nNun können Sie oben die Anfrage absenden oder\neinfach weitere Anfragen hinzufügen'); } }); }); $("#send555").click(function(e){ e.preventDefault(); $.post("cart.php",$("#ankerform").serialize(),function(msg){ var waren = $("#anfragen").text(); waren++; $("#anfragen").load("cart.php?count=1"); if(waren){ $("#waren").css("display","block"); } alert('Ihre Anfrage wurde hinzugefügt!\n\nNun können Sie oben die Anfrage absenden oder\neinfach weitere Anfragen hinzufügen'); }); }); $("#ANMERKUNG").click(function() { if($("#ANMERKUNG").val() == "Meine Anmerkung zu folgenden Hexgrate sind:"){ $("#ANMERKUNG").val(""); } }); $("#draht1").click(function() { if ( $("#produkt4_1").length > 0) { var toppy = $("#produkt4_1").offset().top - 270; $('html, body').animate({ scrollTop: toppy }, 2000); } else { window.location.href='Drahtbiegeteile.html'; } }); $( ".img" ).hover( function() { $(this).find( "div" ).animate({ marginTop: '175px' }, 500); }, function() { $(this).find( "div" ).animate({ marginTop: '255px' }, 300); } ); $("#GEWALZT_select").change(function(){ if($("#GEWALZT_select").val() == "Ja"){ $(".zuschnitt3").css("opacity","1.0"); $("#GEWALZT_man2").removeAttr("disabled"); $("#GEWALZT_man2").focus(); } }); $("#typa").change(function(){ if($("#typa").val() == "Standard") { $("#hexgrate_va").slideUp(); $("#hexgrate_va").attr("src","images/hexgrate/hexgrate_normal_va.png"); $("#hexgrate_va").slideDown(); } if($("#typa").val() == "Shell") { $("#hexgrate_va").slideUp(); $("#hexgrate_va").attr("src","images/hexgrate/hexgrate_shell_va.png"); $("#hexgrate_va").slideDown(); } } ); $("#vaho").change(function(){ if($("#vaho").val() == "19 x 2 mm") { $("#hexgrate_sa").slideUp(); $("#hexgrate_sa").attr("src","images/hexgrate/hexgrate_normal_sa.png"); $("#hexgrate_sa").slideDown(); $("#hexgratehoehe").text("19"); $("#hexmash_konfigurator").css("background","url(images/hexmash_konfigurator.png)"); $("#hexgratehoehe").css("left","1052px"); $("#hexgratehoehe2").css("left","1052px"); $("#hexgratehoehe").css("top","360px"); $("#hexgratehoehe2").hide(); } if($("#vaho").val() == "25 x 2 mm") { $("#hexgrate_sa").slideUp(); $("#hexgrate_sa").attr("src","images/hexgrate/hexgrate_normal_sa.png"); $("#hexgrate_sa").slideDown(); $("#hexgratehoehe").html("25"); $("#hexmash_konfigurator").css("background","url(images/hexmash_konfigurator.png)"); $("#hexgratehoehe").css("left","1052px"); $("#hexgratehoehe2").css("left","1052px"); $("#hexgratehoehe").css("top","360px"); $("#hexgratehoehe2").hide(); } if($("#vaho").val() == "50 x 2 mm") { $("#hexgrate_sa").slideUp(); $("#hexgrate_sa").attr("src","images/hexgrate/hexgrate_normal_sa.png"); $("#hexgrate_sa").slideDown(); $("#hexgratehoehe").html("50"); $("#hexmash_konfigurator").css("background","url(images/hexmash_konfigurator.png)"); $("#hexgratehoehe").css("left","1052px"); $("#hexgratehoehe2").css("left","1052px"); $("#hexgratehoehe").css("top","360px"); $("#hexgratehoehe2").hide(); } if($("#vaho").val() == "45/30 x 2 mm") { $("#hexgrate_sa").slideUp(); $("#hexgrate_sa").attr("src","images/hexgrate/hexgrate_shell_sa.png"); $("#hexgrate_sa").slideDown(); $("#hexmash_konfigurator").css("background","url(images/hexmash_konfigurator_2.png)"); $("#hexgratehoehe2").html("45"); $("#hexgratehoehe").html("30"); $("#hexgratehoehe").css("left","1064px"); $("#hexgratehoehe2").css("left","1064px"); $("#hexgratehoehe").css("top","334px"); $("#hexgratehoehe2").css("top","360px"); $("#hexgratehoehe2").show(); } } ); $("#abstandshalter").change(function(){ if($("#abstandshalter").val() == "Ja"){ $(".zuschnitt2").css("opacity","1.0"); $("#Halter_man2").removeAttr("disabled"); $("#Halter_man4").removeAttr("disabled"); $("#Halter_man2").focus(); } }); $('#ankertyp, #auskleidungsart').on('change', function(){ $(".ankeritem").each(function(e){ $(this).show(); var r2 = ""; var r1 = ""; }); $(".ankeritem").each(function(e){ var auswahl = $(this).html(); r1 = auswahl.indexOf($("#ankertyp").val()); r2 = auswahl.indexOf($("#auskleidungsart").val()); if($('#auskleidungsart').val() == "") { } else { } if(r1 == "-1") { $(this).hide(); } else { if(r2 == "-1") { $(this).hide(); } else { } } }); }); $('#suche').on('input', function(){ $(".ankeritem").each(function(e){ $(this).show(); }); $(".block").each(function(e){ $(this).show(); var search = $(this).html().toUpperCase(); if(search.indexOf($("#suche").val().toUpperCase()) == "-1") { $(this).hide(); } else { $(this).show(); } var i = 0; }); }); setInterval(function() { $(".ankeritem").each(function(e){ var l; l = $(this).children('.block').has(":visible").length; if(l == "0") { $(this).hide(); } else { $(this).show(); } }); }, 1000); $("#smatten").change(function(){ if($("#smatten").val() == "1500 x 1000"){ $("#b1").html("1500"); $("#h1").html("1000"); } if($("#smatten").val() == "2000 x 1000"){ $("#b1").html("2000"); $("#h1").html("1000"); } if($("#smatten").val() == "1000 x 1000"){ $("#b1").html("1000"); $("#h1").html("1000"); } if($("#smatten").val() == "Zuschnitt"){ $(".zuschnitt1").css("opacity","1.0"); $("#mattengroesse_man2").removeAttr("disabled"); $("#mattengroesse_man4").removeAttr("disabled"); $("#mattengroesse_man2").focus(); $( "#mattengroesse_man2" ).on('input',function(e){ $("#b1").html($("#mattengroesse_man2").val()); }); $( "#mattengroesse_man4" ).on('input',function(e){ $("#h1").html($("#mattengroesse_man4").val()); }); } }); var check = 0; var pos; $(window).scroll(function() { if(check == 0){ pos = $('#menu').position() } if(pos.top < $(window).scrollTop()) { check = 1; $('#menu').css('position','fixed'); //$('#menu').css('left','50%'); $('#menu').css('top','0px'); $('#menu2').css('height','68px'); $('#menu2').css('background-color','#000'); $('#menu2').css('width','100%'); $('#flylogo').attr("src","images/menu_1x1.png"); var p = $( "#mprod" ); var position = p.position(); $("#submenu").css( "positon", "realtive"); $("#submenu").css( "left", position.left); //$('#menu').css('margin-left','-575px'); } else { $('#menu2').css('height','0px'); $('#menu').css('position',''); $('#menu2').css('margin','0px auto'); check = 0; $('#flylogo').attr("src","images/menu_1x1_2.png"); } }); $('#cartout').click(function() { $('#cartout1').fadeOut(function() { $('#cartout2').fadeIn(); }); }); $( "#ueberuns, #anker, #drahtbiegeteile, #hitzeschutz, #unsereansprueche, #produkte, #wo, #kontaktform, #hexmash, #hexmash_konfigurator, #footer1, #footer2, #slideshow" ).mouseover(function() { $('#submenu').fadeOut(300); }); $( "#mprod, #submenu, #submenu li, #submenu li a" ).mouseover(function() { var p = $( "#mprod" ); var position = p.position(); $("#submenu").css( "positon", "realtive"); $("#submenu").css( "left", position.left); $('#submenu').fadeIn(300); }); $('#mprod').click(function() { if($('#submenu').is(':visible')){ $('#submenu').fadeOut(300); } else { if ( $("#produkte").length) { var weite = $("#produkte").offset().top - 80; $("body").scrollTo(""+weite+"px",2000); } $('#submenu').fadeIn(300); } }); $('#durchsuchen').click(function() { $('#file1').click(); }); $('#mobilmenu').click(function() { $("#mobilmenu2").animate({ marginTop: '0px' }, 500); }); $("#file1").change(function(){ $("#filenameinfo").html($('input[type=file]').val()); }); $('#durchsuchen2').click(function() { $('#file1').click(); }); $('#ankerauswahl .block').click(function() { window.location.href='Anker.html?AnkerDetails='+ $(this).text(); }); $('#close').click(function() { $('#anfrage').hide(); }); $('#waren').click(function() { $('#anfrage').show(); $('#anfragenoutput').load("cart.php"); }); $('#senden').click(function() { if($("#check1").is(':checked')){} else { alert("Sie müssen die Datenschutzerklärung zustimmen!"); return true; } if($("#form1 #name").attr('sec')) { if($("#form1 #name").val() == "") { alert("Please insert your Name"); $("#form1 #name").focus(); return true; } } if($("#form1 #firma").attr('sec')) { if($("#form1 #firma").val() == "") { alert("Please enter your company name"); $("#form1 #firma").focus(); return true; } } if($("#form1 #email").attr('sec')) { if($("#form1 #email").val() == "") { alert("Please enter your e-mail address"); $("#form1 #email").focus(); return true; } } var file_data = $('#file1').prop('files')[0]; var form_data = new FormData(); var other_data = $('#form1').serializeArray(); $.each(other_data,function(key,input){ form_data.append(input.name,input.value); }); form_data.append('file1', file_data) $("body").append("


"); $.ajax({ xhr: function() { var xhr = new window.XMLHttpRequest(); xhr.upload.addEventListener("progress", function(evt) { if (evt.lengthComputable) { var percentComplete = evt.loaded / evt.total; percentComplete = parseInt(percentComplete * 100); $( "#status" ).css("width",percentComplete+"%"); $( "#prozent").text(percentComplete+"%"); } }, false); return xhr; }, url: 'senditNEW.php', dataType: 'text', cache: false, contentType: false, processData: false, data: form_data, type: 'post', success: function(dat){ $("#uploadani").remove(); alert("Vielen Dank für Ihre Nachricht"); } }); }); $('.lang').click(function() { $.get( "index.php", { lang: ""+ $(this).text() +"" } ) .done(function( data ) { location.reload(); }); }); $('#lang').click(function() { $('#lang').animate({ height: 180 }, 1000, function() { }); }); var path = window.location.pathname; var proto = window.location.protocol; var host = window.location.host; var search = window.location.search; var x = ""+proto+"//"+host+""+path+""+search+""; var html1 = null; var html2 = null; $.ajax({ url: x, cache: false, dataType: 'html', timeout: 5000, success: function(html_1) { html1 = html_1; } }); var b999; setInterval(function() { $.ajax({ url: x+"#html", cache: false, dataType: 'html', timeout: 1000, success: function(html_2) { html2 = html_2; if(html1 == html2) { } else { if(!b999){ b999=1; $("body").append("


"); } $( "#status" ).animate({ width: "100%"}, 1000, function() {}); setTimeout(function(){ location.reload(); }, 1000); } } }); }, 3000); if(waren){ $("#anfragen").load("cart.php?count=1"); $("#waren").css("display","block"); } });