jQuery(document).ready(function() { //if( /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) ) { //}else{ //$('.scroll').lionbars(); //} $('#status').fadeOut(); $('#preloader').delay(500).fadeOut('slow'); $('body').delay(500).css({ 'overflow': 'visible' }); $(".exp a").click(function(event) { event.preventDefault(); $('html,body').animate( { scrollTop:$(this.hash).offset().top - 0} , 1000, 'easeOutQuint'); }); $('#mobileMenuBtn').click (function(){ $('nav#mobileMenu').slideToggle(); $("body").toggleClass('scrollHide'); }); $('li.mobileSubmenuLink').click (function(){ $(this).find("ul").slideToggle(); }); /*$('#homeBooking a').click (function(){ $(this).toggleClass('hover'); $(this).next().toggleClass('open'); });*/ $('#popup .flexslider').flexslider({ animation: "slide" }); //cihan $('.callWe').click(function(){ $('.sizi-arayalım-form').fadeIn(); $('#overlay').fadeIn(); }); $('.select_hotel').change(function(){ var hotel = $(this).find("option:selected").attr("index"); $("#rez-form").attr("action", hotel); }); $('.close').click(function(){ $('#popup').fadeOut(); $('.sizi-arayalım-form').fadeOut(); $('#overlay').fadeOut(); }); //cihan $('#homeBookingForm').hide(); /*$('#homeBookingForm').delay(5000).queue(function(){ $(this).removeClass("open").dequeue(); });*/ $('#homeLang a').click (function(){ $(this).toggleClass('hover'); $(this).next().toggleClass('open'); }); imageMenuW = $('section#imageMenu li').width(); $('section#imageMenu li').height(imageMenuW/2); $('#slider .tp-banner').show().revolution( { dottedOverlay:"none", delay:9000, hideThumbs:200, startheight:600, thumbWidth:100, thumbHeight:50, thumbAmount:5, navigationType:"none", navigationArrows:"solo", navigationStyle:"round", touchenabled:"on", onHoverStop:"on", swipe_velocity: 0.7, swipe_min_touches: 1, swipe_max_touches: 1, drag_block_vertical: false, keyboardNavigation:"on", navigationHAlign:"center", navigationVAlign:"bottom", navigationHOffset:0, navigationVOffset:20, soloArrowLeftHalign:"left", soloArrowLeftValign:"center", soloArrowLeftHOffset:20, soloArrowLeftVOffset:0, soloArrowRightHalign:"right", soloArrowRightValign:"center", soloArrowRightHOffset:20, soloArrowRightVOffset:0, shadow:0, fullWidth:"on", fullScreen:"on", spinner:"spinner0", stopLoop:"off", stopAfterLoops:-1, stopAtSlide:-1, shuffle:"off", forceFullWidth:"off", fullScreenAlignForce:"off", minFullScreenHeight:"400", hideThumbsOnMobile:"off", hideNavDelayOnMobile:1500, hideBulletsOnMobile:"off", hideArrowsOnMobile:"off", hideThumbsUnderResolution:0, hideSliderAtLimit:0, hideCaptionAtLimit:0, hideAllCaptionAtLilmit:0, startWithSlide:0, fullScreenOffsetContainer: "" }); $('#subSlider .tp-banner').show().revolution( { dottedOverlay:"none", delay:9000, hideThumbs:200, startheight:600, thumbWidth:100, thumbHeight:50, thumbAmount:5, navigationType:"none", navigationArrows:"solo", navigationStyle:"preview4", touchenabled:"on", onHoverStop:"on", swipe_velocity: 0.7, swipe_min_touches: 1, swipe_max_touches: 1, drag_block_vertical: false, keyboardNavigation:"on", navigationHAlign:"center", navigationVAlign:"bottom", navigationHOffset:0, navigationVOffset:20, soloArrowLeftHalign:"left", soloArrowLeftValign:"center", soloArrowLeftHOffset:20, soloArrowLeftVOffset:0, soloArrowRightHalign:"right", soloArrowRightValign:"center", soloArrowRightHOffset:20, soloArrowRightVOffset:0, shadow:0, fullWidth:"off", fullScreen:"off", spinner:"spinner0", stopLoop:"off", stopAfterLoops:-1, stopAtSlide:-1, shuffle:"off", forceFullWidth:"off", fullScreenAlignForce:"off", minFullScreenHeight:"400", hideThumbsOnMobile:"off", hideNavDelayOnMobile:1500, hideBulletsOnMobile:"off", hideArrowsOnMobile:"off", hideThumbsUnderResolution:0, hideSliderAtLimit:0, hideCaptionAtLimit:0, hideAllCaptionAtLilmit:0, startWithSlide:0, fullScreenOffsetContainer: "#header" }); jQuery('#ListSlider .tp-banner').show().revolution( { dottedOverlay:"none", delay:9000, hideThumbs:200, startheight:600, thumbWidth:100, thumbHeight:50, thumbAmount:5, navigationType:"none", navigationArrows:"solo", navigationStyle:"round", touchenabled:"on", onHoverStop:"on", swipe_velocity: 0.7, swipe_min_touches: 1, swipe_max_touches: 1, drag_block_vertical: false, keyboardNavigation:"on", navigationHAlign:"center", navigationVAlign:"bottom", navigationHOffset:0, navigationVOffset:20, soloArrowLeftHalign:"left", soloArrowLeftValign:"center", soloArrowLeftHOffset:20, soloArrowLeftVOffset:0, soloArrowRightHalign:"right", soloArrowRightValign:"center", soloArrowRightHOffset:20, soloArrowRightVOffset:0, shadow:0, fullWidth:"on", fullScreen:"on", spinner:"spinner0", stopLoop:"off", stopAfterLoops:-1, stopAtSlide:-1, shuffle:"off", forceFullWidth:"off", fullScreenAlignForce:"off", minFullScreenHeight:"400", hideThumbsOnMobile:"off", hideNavDelayOnMobile:1500, hideBulletsOnMobile:"off", hideArrowsOnMobile:"off", hideThumbsUnderResolution:0, hideSliderAtLimit:0, hideCaptionAtLimit:0, hideAllCaptionAtLilmit:0, startWithSlide:0, fullScreenOffsetContainer: "" }); $(".popup").fancybox().trigger('click'); $('.fancyboxOne').fancybox(); $('.fancybox').fancybox({ helpers : { thumbs : { width : 50, height : 50 } } }); $('nav#productMenu ul li a').on('click', function (event) { event.preventDefault(); $('nav#productMenu ul li.tab-active').removeClass('tab-active'); $(this).parent().addClass('tab-active'); $('section#products .content').fadeOut(500); $($(this).attr('href')).delay(500).fadeIn(500); }); $('nav#productMenu ul li:first a').trigger('click'); // Default $(".anchor").click(function(event) { event.preventDefault(); $('html,body').animate( { scrollTop:$(this.hash).offset().top} , 1000, 'easeOutQuint'); $('nav#menu ul li a.selected').removeClass('selected'); $(this).addClass('selected'); }); $('nav#menu ul li:first-child a').addClass('selected'); /*$(function(){ $('section').css({'height':(($(window).height()))+'px'}); // Now bind the event to the desired element $('section').on('mousewheel', function(e){ e.preventDefault(); if(e.originalEvent.wheelDelta < 0) { if (!$(this).is(':last-child')) $('body').animate( {scrollTop:$(this).next().offset().top} , 1000, 'easeOutQuint'); } else { if (!$(this).is(':first-child')) $('body').animate( {scrollTop:$(this).prev().offset().top} , 1000, 'easeOutQuint'); } }); $(window).resize(function(){ // On resize $('section').css({'height':(($(window).height()))+'px'}); }); });*/ }); //captcha var soru = Math.random().toString(36).substring(7); function DrawBotBoot() { cevap = ""; $('#captcha_soru').append('CAPTCHA Code: ' + soru + ' '); $('#captcha_cevap').append('' + cevap + ''); } function ValidBotBoot(){ var d = document.getElementById('BotBootInput').value; if (d == soru) { sendContactForm(); }else{ alert("Answer Wrong!"); } } DrawBotBoot(); //captcha var sendContactForm = function() { jQuery.ajax({ type: 'POST', url: '/sendForm.php', data: $('#contactForm').serialize(), success: function(data) { alert("Sended!"); } }); }; //captcha function ValidBotBoot2(){ var d = document.getElementById('BotBootInput').value; if (d == soru) { sendContactForm2(); }else{ alert("Answer Wrong!"); } } var sendContactForm2 = function() { jQuery.ajax({ type: 'POST', url: '/sendForm1.php', data: $('#siziarayalimForm').serialize(), success: function(data) { alert("Sended!"); window.location.replace("/"); } }); }; var siziarayalimForm = function() { //alert("aaa"); jQuery.ajax({ type: 'POST', url: 'https://176.235.86.187/private/api/callme/', data: $('#siziarayalimForm').serialize(), success: function(data) { alert(data); } }); }; $( function() { $("#datepicker").datepicker({ dateFormat: 'dd.mm.yy' }); }); $( function() { $("#datepicker2").datepicker({ dateFormat: 'dd.mm.yy' }); }); $(function() { $("img.lazy").lazyload({ event : "sporty" }); }); $(window).bind("load", function() { var timeout = setTimeout(function() { $("img.lazy").trigger("sporty") }, 50); }); $(window).load(function() { }); $(document).scroll(function() { var w = $(window).width(); var h = $(window).height(); var scrollPosition = $(document).scrollTop(); if (w > 1000) { if (scrollPosition < 150) { $('nav#menu').removeClass("fixed"); } else { $('nav#menu').addClass("fixed"); } if (scrollPosition < h + 0) { $('header#homeHeader').removeClass("fixed"); $('header#homeHeader').fadeOut(); } else { $('header#homeHeader').addClass("fixed"); $('header#homeHeader').fadeIn(); } } }); $(window).resize(function() { var popupH = $("#popup ul.slides li a img").height()/2; $("#popup .flexslider").css("margin-top", "-"+popupH+"px"); //$("section").height($(window).height()); //$('.selected').trigger('click'); //$('nav#mobileMenu').hide(); //$('html,body').animate( { scrollTop:$(this.hash).offset().top} , 1000, 'easeOutQuint'); });