{{ footerCode }} 

{% for script in scriptList %}
    <script type="text/javascript" src="{{ script }}"></script>
{% endfor %}
{# <!-- Start Trigger Notification  modal -->   #}
<script src="https://cdnjs.cloudflare.com/ajax/libs/js-cookie/2.1.3/js.cookie.min.js"></script>       
 <script type="text/javascript" >
    $("#notificationModal_1").on("hidden.bs.modal", function () {
     var popIds = $(this).attr('popids');
     console.log(this);
            $.ajax({
                type: 'POST',
                url: 'ajax_data',
                data: { 'action': "close_popup", 'popIds': popIds },
                success: function(data) {
                  
                  }
            });
});


 
   
   
   $('#notificationModal_1').modal('show');
</script>
{# <!-- End Trigger Notification  modal --> #}
<!-- for tickets -->
<script type="text/javascript">
    $(document).ready(function () {
        setInterval(function () {
            const leftWell = document.getElementById("left-well");
            const rightWell = document.getElementById("right-well");
  			if(leftWell && rightWell)
            	rightWell.style.height = leftWell.clientHeight - 68 + "px";
        }, 100);
    });

    const alertArea = document.getElementById("alertArea");
    const successArea = document.getElementById("successArea");
	if(successArea){
      successArea.style.display = "none";
      successArea.style.marginTop = "8px";
    }
  	if(alertArea){
    	alertArea.style.display = "none";
    	alertArea.style.marginTop = "8px";
	}
    function handleOrderType(selectObject) {
        var element = document.getElementById("order-grubu");
        var element2 = document.getElementById("payment-grubu");
        var optional = document.getElementById("other-grubu");
        if (selectObject.value == "Order" || selectObject.value == "VIP - Order") {
            element.style.display = "block";
            element2.style.display = "none";
            optional.style.display = "inline";
        } else if (selectObject.value == "Payment" || selectObject.value == "VIP - Payment") {
            element.style.display = "none";
            element2.style.display = "block";
            optional.style.display = "none";
        } else if (selectObject.value == "Other" || selectObject.value == "VIP - Other") {
            element.style.display = "none";
            element2.style.display = "none";
            optional.style.display = "none";
        }
    }

    function validateOrderId() {
        const status = document.getElementById("orderid").value.trim() !== "";
        if (status === false) {
            document.getElementById("orderid").className += " is-invalid";
            alertChild = document.createElement("span");
            alertChild.style.display = "block";
            alertChild.innerHTML = "It is mandatory to enter the order number!";
            alertArea.appendChild(alertChild);
            alertArea.style.display = "block";
        }
        return status;
    }

    function validateMessage() {
        var status = document.getElementById("mesaj").value.trim() !== "";
  		const statuss = document.getElementById("mesaj").value.length;
        if (status === false) {
            document.getElementById("mesaj").className += " is-invalid";
            alertChild = document.createElement("span");
            alertChild.style.display = "block";
            alertChild.innerHTML = "Entering the message is mandatory!";
            alertArea.appendChild(alertChild);
            alertArea.style.display = "block";
        }
  		else if (statuss < 10) {
  			status = false;
            document.getElementById("mesaj").className += " is-invalid";
            alertChild = document.createElement("span");
            alertChild.style.display = "block";
            alertChild.innerHTML = "You must specify your message with at least 10 characters!";
            alertArea.appendChild(alertChild);
            alertArea.style.display = "block";
        }
        return status;
    }

    $("#send-ticket").click(function (event) {
        event.preventDefault();
        alertArea.innerHTML = "";
        alertArea.style.display = "none";
        successArea.style.display = "none";

        document.getElementById("orderid").className = document.getElementById("orderid").className.replace("is-invalid", "");

        document.getElementById("mesaj").className = document.getElementById("mesaj").className.replace("is-invalid", "");

        var subject = document.getElementById("Konu").value;
        var message = "";
        if (subject == "Order" || subject == "VIP - Order") {
            var status = true;
            if (!validateOrderId()) status = false;
            if (!validateMessage()) status = false;
            if (!status) return;

            message = "Order Number: " + document.getElementById("orderid").value + "\n" + "Request: " + document.getElementById("request").value + "\n Detailed Description: " + document.getElementById("mesaj").value;
        } else if (subject == "Payment" || subject == "VIP - Payment") {
            if (!validateMessage()) return;

            message = "Payment Problem: " + document.getElementById("payment").value + "\n Detailed Description: " + document.getElementById("mesaj").value;
        } else {
            if (!validateMessage()) return;

            message = document.getElementById("mesaj").value;
        }
		document.getElementById("tmessage").value = message;
        $("#ticketsend").submit();
        return false;
    });
</script>

<!-- for tickets -->

      <div class="footerbottom">
        <div class="container">
          <div class="row">
            <div class="col-md-12">
              <div class="bottomcr">
                <p>© Copyright 2022 &nbsp;{{ site["site_name"] }}</p>
              </div>
            </div>
          </div>
        </div>
      </div>
           <script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-select/1.6.2/js/bootstrap-select.min.js" type="text/javascript"></script>
      
      <script src='https://cdnjs.cloudflare.com/ajax/libs/slick-carousel/1.8.1/slick.js'></script>
      <script>
        $(document).ready(function() {
          $('.testimonial-slider').slick({
            autoplay: false,
            autoplaySpeed: 1000,
            speed: 600,
            draggable: true,
            infinite: true,
            slidesToShow: 1,
            slidesToScroll: 1,
            arrows: false,
            dots: true,
          });

          $('.slick-dots li:nth-child(1)').html('<button style="background: url(https://i.ibb.co/JQ18QKW/asd.jpg);"></button>');
          $('.slick-dots li:nth-child(2)').html('<button style="background: url(https://i.ibb.co/hKgs8gm/profile.jpg);"></button>');
          $('.slick-dots li:nth-child(3)').html('<button style="background: url(https://i.ibb.co/Q8zzbCR/profile1.jpg);"></button>');
          $('.slick-dots li:nth-child(4)').html('<button style="background: url(https://i.ibb.co/tPFqymw/profile2.jpg);"></button>');
        }); 
      </script>
	</body>
</html>