HEX
Server: Microsoft-IIS/8.5
System: Windows NT YDAWBH120 6.3 build 9600 (Windows Server 2012 R2 Standard Edition) AMD64
User: tentjecom_web (0)
PHP: 7.4.14
Disabled: NONE
Upload Files
File: D:/HostingSpaces/SBogers10/rooymansde.komma-mediadesign.nl/wwwroot/css-js/rooymans.js
// JavaScript Document

$(document).ready(function(){

    function isIE () {
        var myNav = navigator.userAgent.toLowerCase();
        return (myNav.indexOf('msie') != -1) ? parseInt(myNav.split('msie')[1]) : false;
    }

	if($('#content').height() > $('#sidebar').height()){
		var contentHeight = $('#content').height();
        if (isIE () != 7) {
		    $('#sidebar').css('height',contentHeight);
        }
	}
	
	$('.hoofdmenu li').click(function(){
        if(($(this).hasClass("!noJs"))){
            window.location.href = $('a',this).attr('href');
        }
	});

	$('.hoofdmenu li.notActive').hover(function(){
		$("> a", this).stop().animate({color: "#0063BD", "border-color": "#0063BD"}, "fast");
		$("> .arrow .hover", this).stop().animate({"opacity": "1"}, "fast");
		$("> .arrow .up", this).stop().animate({"opacity": "0"}, "fast");
	},
	function(){
        $("> a", this).stop().animate({color: "#878984", "border-color": "#aaaaaa"}, "fast");
		$("> .arrow .up", this).stop().animate({"opacity": "1"}, "fast");
		$("> .arrow .hover", this).stop().animate({"opacity": "0"}, "fast");
	});
	
	$('#talen li.notActive').hover(function(){
		$(this).stop().animate({"opacity": "1"}, "fast");
	},
	function(){	
		$(this).stop().animate({"opacity": "0.5"}, "fast");
	});
	$('#talen li').click(function(){
		window.location.href = $('a',this).attr('href');
	});

	$('.animate li.notActive').hover(function(){
		$("> a", this).stop().animate({color: "#4070B6"}, "fast");
		$("> .arrow .hover", this).stop().animate({"opacity": "1"}, "fast");
		$("> .arrow .up", this).stop().animate({"opacity": "0"}, "fast");
	},
	function(){
		$("> a", this).stop().animate({color: "#B7BBBC"}, "fast");
		$("> .arrow .up", this).stop().animate({"opacity": "1"}, "fast");
		$("> .arrow .hover", this).stop().animate({"opacity": "0"}, "fast");
	});
	
	$('a.actionBtn').hover(function(){
		$("> .hover", this).stop().animate({"opacity": "1"}, "fast");
		//$("> .up", this).stop().animate({"opacity": "0"}, "fast");
		$("> .hoverRight", this).stop().animate({"opacity": "1"}, "fast");
		//$("> .upRight", this).stop().animate({"opacity": "0"}, "fast");
	},
	function(){
		//$("> .up", this).stop().animate({"opacity": "1"}, "fast");
		$("> .hover", this).stop().animate({"opacity": "0"}, "fast");
		//$("> .upRight", this).stop().animate({"opacity": "1"}, "fast");
		$("> .hoverRight", this).stop().animate({"opacity": "0"}, "fast");
	});
	
	var meerTekst = false;
	
	$('#sidebar a.slideAction').click(function(){
		leesMeerOpenClose();
	});
    $('#sidebar .weloveties').click(function(){
        window.open($('a',this).attr('href'));
    });


	function leesMeerOpenClose(){
		if(meerTekst == false){
			$("#sidebar .leesMeerTekst").slideDown();
			$('#sidebar a.slideAction').removeClass("leesMeer");
			$('#sidebar a.slideAction').addClass("inklappen");		
			meerTekst = true;
		}else{
			$("#sidebar .leesMeerTekst").slideUp();
			$('#sidebar a.slideAction').addClass("leesMeer");
			$('#sidebar a.slideAction').removeClass("inklappen");
			meerTekst = false;
		}
	}

	
	$('#frameHeader .label .button').click(function(){
		if($(this).hasClass('notActive')){
			$(this).removeClass('notActive');
			$("> .arrow", this).addClass('cross');
			$("> .arrow", this).removeClass('arrow');
			$('#frameHeader .label .content').stop().animate({"width": "310px"}, "slow");
			$('#frameHeader .label .shadow').stop().animate({"width": "343px"}, "slow");
			$(this).stop().animate({"right": "-30px"}, "slow");
		}else{
			$(this).addClass('notActive');
			$("> .cross", this).addClass('arrow');
			$("> .cross", this).removeClass('cross');
			$('#frameHeader .label .content').stop().animate({"width": "0px"}, "slow");
			$('#frameHeader .label .shadow').stop().animate({"width": "29px"}, "slow");
			$(this).stop().animate({"right": "280px"}, "slow");
		}
	});
	
	
	$('#frameHeader .headerMenu .content li').hover(function(){
		if($(this).hasClass('notActive')){
			$("> .hover", this).stop().animate({"opacity": "1"}, "fast");
			$("> .up", this).stop().animate({"opacity": "0"}, "fast");
		}
	},
	function(){
		if($(this).hasClass('notActive')){
			$("> .up", this).stop().animate({"opacity": "1"}, "fast");
			$("> .hover", this).stop().animate({"opacity": "0"}, "fast");
		}
	});
	
	
	var activeFoto = 0;
	var totalFotos = $("#frameHeader .headerMenu li.gevuld").length;
	var galleryPlay = true;
	$("#frameHeader .fotoFrame li").eq(0).css({'display':'block'});
	$("#frameHeader .label li").eq(0).css({'display':'block'});
	$("#frameHeader .headerMenu li.gevuld .up").eq(0).css("opacity","0");
	$("#frameHeader .headerMenu li.gevuld .hover").eq(0).css("opacity","1");
	
	function fotoRotate(){
		if(galleryPlay){	
			$.doTimeout( 4000, function(){
				if(galleryPlay){	
					$("#frameHeader .fotoFrame li").eq(activeFoto).fadeOut('slow');
					$("#frameHeader .label li").eq(activeFoto).fadeOut('slow');
					$("#frameHeader .headerMenu li.gevuld").eq(activeFoto).toggleClass("active");
					$("#frameHeader .headerMenu li.gevuld").eq(activeFoto).toggleClass("notActive");
					$("#frameHeader .headerMenu li.gevuld .up").eq(activeFoto).stop().animate({"opacity": "1"}, "medium");
					$("#frameHeader .headerMenu li.gevuld .hover").eq(activeFoto).stop().animate({"opacity": "0"}, "medium");
					activeFoto = activeFoto + 1;
					if(activeFoto == totalFotos){ activeFoto = 0; }

                    if($("#frameHeader .headerMenu li.logo").length){
                        if(activeFoto > 4){
                            var aantalKeer = activeFoto - 5;
                            var aantalPixels = aantalKeer * -120;
                            aantalPixels = (aantalPixels + 70) + "px";
                            var aantalPixelsLogo = aantalKeer * 120;
                            aantalPixelsLogo = aantalPixelsLogo + "px";

                            $("#frameHeader .headerMenu li.logo").stop().animate({"left": aantalPixelsLogo}, "medium");
                            $("#frameHeader .headerMenu ul").stop().animate({"left": aantalPixels}, "medium")
                        }else{
                            $("#frameHeader .headerMenu li.logo").stop().animate({"left": "-120px"}, "medium");
                            $("#frameHeader .headerMenu ul").stop().animate({"left": "192px"}, "medium");
                        }
                    }else{
                        if(activeFoto > 5){
                            var aantalKeer = activeFoto - 6;
                            var aantalPixels = aantalKeer * -120;
                            aantalPixels = (aantalPixels - 49) + "px";
                            $("#frameHeader .headerMenu ul").stop().animate({"left": aantalPixels}, "medium");
                        }else{
                            $("#frameHeader .headerMenu ul").stop().animate({"left": "70px"}, "medium");
                        }
                    }

					$("#frameHeader .headerMenu li.gevuld").eq(activeFoto).toggleClass("active");
					$("#frameHeader .headerMenu li.gevuld").eq(activeFoto).toggleClass("notActive");
					$("#frameHeader .headerMenu li.gevuld .up").eq(activeFoto).stop().animate({"opacity": "0"}, "medium");
					$("#frameHeader .headerMenu li.gevuld .hover").eq(activeFoto).stop().animate({"opacity": "1"}, "medium");
					$("#frameHeader .fotoFrame li").eq(activeFoto).fadeIn('slow');
					$("#frameHeader .label li").eq(activeFoto).fadeIn('slow');
					fotoRotate();
				}
			});
		}
	}
	fotoRotate();
	
	
	$('#frameHeader .headerMenu li.gevuld').each(function(index) {
		$(this).click(function(e){
			e.preventDefault;
			clickAction(index);
		});
	});
    if($("#headerArrowLeft").length){
        $("#headerArrowLeft").click(function(e){
            e.preventDefault;
            newActiveFoto = activeFoto - 1;
            if(newActiveFoto < 0){ newActiveFoto = totalFotos - 1;}
            clickAction(newActiveFoto);
        });
    }

    if($("#headerArrowRight").length){
        $("#headerArrowRight").click(function(e){
            e.preventDefault;
            newActiveFoto = activeFoto + 1;
            if(newActiveFoto == totalFotos){ newActiveFoto = 0;}
            clickAction(newActiveFoto);
        });
    }

    function clickAction(newActive){
			$("#frameHeader .fotoFrame li").eq(activeFoto).fadeOut('slow');
			$("#frameHeader .label li").eq(activeFoto).fadeOut('slow');
			$("#frameHeader .headerMenu li.gevuld").eq(activeFoto).toggleClass("active");
			$("#frameHeader .headerMenu li.gevuld").eq(activeFoto).toggleClass("notActive");
			$("#frameHeader .headerMenu li.gevuld .up").eq(activeFoto).stop().animate({"opacity": "1"}, "medium");
			$("#frameHeader .headerMenu li.gevuld .hover").eq(activeFoto).stop().animate({"opacity": "0"}, "medium");
			galleryPlay = false;

            if($("#frameHeader .headerMenu li.logo").length){
                if(newActive > 4){
                    var aantalKeer = newActive - 5;
                    var aantalPixels = aantalKeer * -120;
                    aantalPixels = (aantalPixels + 70) + "px";
                    var aantalPixelsLogo = aantalKeer * 120;
                    aantalPixelsLogo = aantalPixelsLogo + "px";

                    $("#frameHeader .headerMenu li.logo").stop().animate({"left": aantalPixelsLogo}, "medium");
                    $("#frameHeader .headerMenu ul").stop().animate({"left": aantalPixels}, "medium")
                }else{
                    $("#frameHeader .headerMenu li.logo").stop().animate({"left": "-120px"}, "medium");
                    $("#frameHeader .headerMenu ul").stop().animate({"left": "192px"}, "medium");
                }
            }else{
                if(newActive > 5){
                    var aantalKeer = newActive - 6;
                    var aantalPixels = aantalKeer * -120;
                    aantalPixels = (aantalPixels - 49) + "px";
                    $("#frameHeader .headerMenu ul").stop().animate({"left": aantalPixels}, "medium");
                }else{
                    $("#frameHeader .headerMenu ul").stop().animate({"left": "70px"}, "medium");
                }
            }

			$("#frameHeader .headerMenu li.gevuld").eq(newActive).toggleClass("active");
			$("#frameHeader .headerMenu li.gevuld").eq(newActive).toggleClass("notActive");
			$("#frameHeader .headerMenu li.gevuld .up").eq(newActive).stop().animate({"opacity": "0"}, "medium");
			$("#frameHeader .headerMenu li.gevuld .hover").eq(newActive).stop().animate({"opacity": "1"}, "medium");
			$("#frameHeader .fotoFrame li").eq(newActive).fadeIn('slow');
			$("#frameHeader .label li").eq(newActive).fadeIn('slow');
			activeFoto = newActive;
	}
    if(!$("#werkwijzeMenu").length){
        $('ul.producten li').click(function(){
            window.location.href = $('a',this).attr('href');
        });
    }
	$('ul.producten li').hover(function(){
		if($(this).hasClass('notActive')){
			$("> a", this).stop().animate({color: "#0063BD"}, "fast");
			$("> a span", this).stop().animate({color: "#0063BD"}, "fast");
			$("> .label", this).stop().animate({"width": "100px"}, "fast");
			//$("> .image .hover", this).stop().animate({"opacity": "1"}, "fast");
			//$("> .image .up", this).stop().animate({"opacity": "0"}, "fast");
		}
	},
	function(){
		if($(this).hasClass('notActive')){
			$("> a", this).stop().animate({color: "#6B6663"}, "fast");
			$("> a span", this).stop().animate({color: "#d9d9d9"}, "fast");
			$("> .label", this).stop().animate({"width": "30px"}, "fast");
			//$("> .image .up", this).stop().animate({"opacity": "1"}, "fast");
			//$("> .image .hover", this).stop().animate({"opacity": "0"}, "fast");
		}
	});
	$('ul.klanten li').hover(function(){
		$("> a", this).stop().animate({color: "#0063BD"}, "fast");
        $(this).stop().animate({borderBottomColor: "#0063BD"}, "fast");
	},
	function(){
		$("> a", this).stop().animate({color: "#6B6663"}, "fast");
        $(this).stop().animate({borderBottomColor: "#efefef"}, "fast");
	});
	$('ul.productReferenties li').click(function(){
		window.location.href = $('a',this).attr('href');
	});
	$('ul.productReferenties li').hover(function(){
		$("> .hover", this).stop().animate({"opacity": "1"}, "fast");
		$("> .up", this).stop().animate({"opacity": "0"}, "fast");
	},
	function(){
		$("> .up", this).stop().animate({"opacity": "1"}, "fast");
		$("> .hover", this).stop().animate({"opacity": "0"}, "fast");
	});
	
	$('#frameHeader .logoOverzicht').click(function(){
		
		if($("> a", this).hasClass("cross")){
			$("> a", this).removeClass("cross");
			$("#frameHeader .headerMenu .content iframe").fadeOut("slow",function(){
				$("#frameHeader .headerMenu .content iframe").remove();
				$("#frameHeader .headerMenu .content ul").fadeIn("slow", function(){
					$("#frameHeader .headerMenu").stop().animate({"height": "81px"}, "slow");	
					$("#frameHeader .headerMenu .content").stop().animate({"height": "70px"}, "slow", function(){
						$("#portfolioLabel").stop().animate({"opacity": "100"}, "fast");
					});
				});
			});
		}else{
			$("> a", this).addClass("cross");
			
			$("#portfolioLabel").stop().animate({"opacity": "0"}, "fast");
			$("#frameHeader .headerMenu").stop().animate({"height": "370px"}, "slow");
			$("#frameHeader .headerMenu .content").stop().animate({"height": "360px"}, "slow",
			function(){
				$("#frameHeader .headerMenu .content ul").fadeOut("slow");
				$('<iframe src="/logoOverzicht.php"></iframe>').appendTo(this);
				$.doTimeout( 1000, function(){ $("#frameHeader .headerMenu .content iframe").fadeIn("slow"); });
			});
		}
	});
	
	$('#frameHeader .label .content li').click(function(){
		window.location.href = $('a',this).attr('href');
	});

    $(".colorbox").click(function(){
        galleryPlay = false;
    });

    $(".colorbox").colorbox();

    var activeWerkwijze = 0;

    function werkwijzeClickAction($obj){
        $obj.toggleClass("active");
        $obj.toggleClass("notActive");

        var $li =  $("#werkwijzeMenu li").eq(activeWerkwijze);
        $li.toggleClass("active");
        $li.toggleClass("notActive");
        $li.children("a").stop().animate({color: "#6B6663"}, "fast");
        $li.children("a").children("span").stop().animate({color: "#d9d9d9"}, "fast");
        $li.children(".label").css('width','30px');
        activeWerkwijze = $obj.index();
    }

    $("#werkwijzeMenu li").eq(0).click(function(){
        $("#werkwijzeHolder ul").stop().animate({"left": "0px"}, "slow");
        werkwijzeClickAction($(this));
    });
    $("#werkwijzeMenu li").eq(2).click(function(){
        $("#werkwijzeHolder ul").stop().animate({"left": "-225px"}, "slow");
        werkwijzeClickAction($(this));
    });
    $("#werkwijzeMenu li").eq(4).click(function(){
        $("#werkwijzeHolder ul").stop().animate({"left": "-450px"}, "slow");
        werkwijzeClickAction($(this));
    });
    $("#werkwijzeMenu li").eq(6).click(function(){
        $("#werkwijzeHolder ul").stop().animate({"left": "-675px"}, "slow");
        werkwijzeClickAction($(this));
    });

    $("#naarStap1").click(function(){
        $("#werkwijzeHolder ul").stop().animate({"left": "0px"}, "slow");
        werkwijzeClickAction($(this));
    });
    $("#naarStap2").click(function(){
        $("#werkwijzeHolder ul").stop().animate({"left": "-225px"}, "slow");
        werkwijzeClickAction($(this));
    });
    $("#naarStap3").click(function(){
        $("#werkwijzeHolder ul").stop().animate({"left": "-450px"}, "slow");
        werkwijzeClickAction($(this));
    });
    $("#naarStap4").click(function(){
        $("#werkwijzeHolder ul").stop().animate({"left": "-675px"}, "slow");
        werkwijzeClickAction($(this));
    });

    if($('#belMeTerug').length){

        var orgValueBelNaam = "Name";
        var orgValueBelNummer = "Telephone number";
        $('#belNaam').focus(function() { if($(this).val()==orgValueBelNaam) { $(this).val("");}});
        $('#belNaam').blur(function() { if($(this).val()=="") { $(this).val(orgValueBelNaam);}	});
        $('#belNummer').focus(function() { if($(this).val()==orgValueBelNummer) { $(this).val("");}});
        $('#belNummer').blur(function() { if($(this).val()=="") { $(this).val(orgValueBelNummer);}	});
    }

    if($('#belMeTerug')){
        $('<input type="hidden" />').attr({
            name: 'secretcode',
            id: 'secretcode',
            value: 'spamcheckkomma'
        }).appendTo("#belMeTerug");
    }

    $( "#belMeTerug input" ).change(function() {
        $(this).css('color','#aaa');
    });

    $("#belMeTerugSubmit").click(function(e){
        e.preventDefault();
        $(".error").hide();
        var hasContactError = false;

        var contactNaamVal = $("#belNaam").val();
        if(contactNaamVal == '' || contactNaamVal == 'Naam') {
            $("#belNaam").css('color','#E70000');
            hasContactError = true;
        }else{
            $("#name").css('color','#aaa');
        }
        var contactNummerVal = $("#belNummer").val();
        if(contactNummerVal == '' || contactNummerVal == 'Telefoonnummer') {
            $("#belNummer").css('color','#E70000');
            hasContactError = true;
        }else{
            $("#phonenumber").css('color','#aaa');
        }
        var secretcode = $("#secretcode").val();
        var paginaURL = $("#paginaURL").val();

        if(hasContactError == false) {
            $.post("/belMeTerugVerzenden.php",
                { naam: contactNaamVal, telefoon: contactNummerVal, paginaURL: paginaURL , secretcode: secretcode },
                function(data){
                    $("#belMeTerugSubmit").fadeOut("slow");
                    $("#belMeTerug").fadeOut("slow", function() {

                        $("#belMeTerugReplacement").fadeIn("slow");
                    });
                }
            );
        }
        return false;
    });

    $( "#contactform input" ).change(function() {
        $(this).css('color','#aaa');
    });
    $("#contact_geslacht_man").change(function() {
        $("#contact_geslacht_manLabel").css('color','#6B6663');
        $("#contact_geslacht_vrouwLabel").css('color','#6B6663');
    });
    $("#contact_geslacht_vrouw").change(function() {
        $("#contact_geslacht_manLabel").css('color','#6B6663');
        $("#contact_geslacht_vrouwLabel").css('color','#6B6663');
    });

    if($('#contactform').length){

        var orgNaam = "Name";
        var orgTelefoonnummer = "Telephone number";
        var orgBedrijfsnaam = "Company";
        var orgEmailadres = "E-mail";
        var orgOpmerkingen = "Your question/remark";
        $('#contact_naam').focus(function() { if($(this).val()== orgNaam) { $(this).val("");}});
        $('#contact_naam').blur(function() { if($(this).val()== "") { $(this).val(orgNaam); }});
        $('#contact_bedrijfsnaam').focus(function() { if($(this).val()==orgBedrijfsnaam) { $(this).val("");}});
        $('#contact_bedrijfsnaam').blur(function() { if($(this).val()== "") { $(this).val(orgBedrijfsnaam);}	});
        $('#contact_telefoonnummer').focus(function() { if($(this).val()==orgTelefoonnummer) { $(this).val("");}});
        $('#contact_telefoonnummer').blur(function() { if($(this).val()=="") { $(this).val(orgTelefoonnummer);}	});
        $('#contact_emailadres').focus(function() { if($(this).val()==orgEmailadres) { $(this).val(""); }});
        $('#contact_emailadres').blur(function() { if($(this).val()=="") { $(this).val(orgEmailadres);}	});
        $('#contact_opmerkingen').focus(function() { if($(this).val()==orgOpmerkingen) { $(this).val("");}});
        $('#contact_opmerkingen').blur(function() { if($(this).val()=="") {$(this).val(orgOpmerkingen);}	});
    }

    if($('#contactformForm')){
        $('<input type="hidden" />').attr({
            name: 'secretcode',
            id: 'secretcode',
            value: 'spamcheckkomma'
        }).appendTo("#contactformForm");
    }

    $("a.contactformSubmit").click(function(){
        $(".error").hide();
        var hasContactError = false;
        var emailReg = /[\w-\.]+@([\w-]+\.)+[\w-]{2,4}/;

        var contactNaamVal = $("#contact_naam").val();
        if(contactNaamVal == '' || contactNaamVal == 'Name') {
            $("#contact_naam").css('color','#E70000');
            hasContactError = true;
        }else{
            $("#contact_naam").css('color','#aaa');
        }

        if($('#contact_geslacht_man:checked').val()) {
            var contactGeslachtVal = $("#contact_geslacht_man").val();
            $("#contact_geslacht_manLabel").css('color','#6B6663');
            $("#contact_geslacht_vrouwLabel").css('color','#6B6663');
        }else if($('#contact_geslacht_vrouw:checked').val()) {
            var contactGeslachtVal = $("#contact_geslacht_vrouw").val();
            $("#contact_geslacht_manLabel").css('color','#6B6663');
            $("#contact_geslacht_vrouwLabel").css('color','#6B6663');
        }else{
            $("#contact_geslacht_manLabel").css('color','#E70000');
            $("#contact_geslacht_vrouwLabel").css('color','#E70000');
        }

        var contactBedrijfsnaamVal = $("#contact_bedrijfsnaam").val();
        var contactTelefoonVal = $("#contact_telefoonnummer").val();

        var contactEmailVal = $("#contact_emailadres").val();
        if(contactEmailVal == '' || contactEmailVal == 'E-mail' || !emailReg.test(contactEmailVal)) {
            $("#contact_emailadres").css('color','#E70000');
            hasContactError = true;
        }else{
            $("#contact_emailadres").css('color','#aaa');
        }
        var contactBerichtVal = $("#contact_opmerkingen").val();

        var contactType = $("#contact_type").val();
        var vorigePagina = $("#vorige_pagina").val();
        var secretcode = $("#secretcode").val();


        if(hasContactError == false) {
            $.post("/contactformVerzenden.php",
                { naam: contactNaamVal, geslacht: contactGeslachtVal, bedrijfsnaam: contactBedrijfsnaamVal, telefoon: contactTelefoonVal, email: contactEmailVal, bericht: contactBerichtVal, typeFormulier: contactType, vorigePagina: vorigePagina, secretcode: secretcode },
                function(data){
                    $("#contactform").fadeOut("slow", function() {
                        $("#contactformReplacement").fadeIn("slow");
                    });
                }
            );
        }else{
            $("#foutmelding").fadeIn("slow");
        }
        return false;
    });

    if($('#routeAdres').length){
        var orgAdres = "Tragen Sie hier Ihre Adresse ein";
        $('#routeAdres').focus(function() { if($(this).val()== orgAdres) { $(this).val("");}});
        $('#routeAdres').blur(function() { if($(this).val()== "") { $(this).val(orgAdres); }});

        $("#routeSubmit").click(function(e){
            e.preventDefault();
            $('#routeForm').submit();
        });
    }

});