function language(lang) { $.post( "", { langs: 'change', language: lang}) .done(function( data ) { location.reload(); }); } function ahref(url) { window.location = url; } jQuery.fn.cssNumber = function(prop){ var v = parseInt(this.css(prop),10); return isNaN(v) ? 0 : v; }; /*++++++++ ---- MENU ---- +++++++++*/ var menu_statu = 0; function mobile_menu() { if(menu_statu == 0){ menu_statu = 1; $('.mobile_menu').css({ height : '100%' }); $('#mobile_menu_icon').css({ stroke: '#ffffff' }); }else { menu_statu = 0; $('.mobile_menu').css({ height : '0' }); $('#mobile_menu_icon').css({ stroke: '#2A2A2A' }); } }/* var open_menu_statu = 0; var openHeight; function open_menu() { if(open_menu_statu == 0){ open_menu_statu = 1; $('.open_menu').css({ height : openHeight + 'px' }); }else { open_menu_statu = 0; $('.open_menu').css({ height : '0' }); } }*/ var openMenuStatu = []; var openHeight; var headerHeight; function open_menu(idx) { if(!openMenuStatu[idx] || openMenuStatu[idx] == 0){ openMenuReset(); openMenuStatu[idx] = 1; var openHeight = document.getElementById(idx).scrollHeight; $('#' + idx).css({ height : openHeight + 'px' }); $('.header').css({ height : (openHeight + headerHeight) + 'px' }); }else { openMenuStatu[idx] = 0; $('#' + idx).css({ height : '0' }); $('.header').css({ height : (headerHeight) + 'px' }); } } function openMenuReset() { for (var prop in openMenuStatu) { if(openMenuStatu[prop] == 1){ openMenuStatu[prop] = 0; $('#' + prop).css({ height : '0' }); $('.header').css({ height : (headerHeight) + 'px' }); } } } var opennedPannel = []; function openDevami(cls) { if(!opennedPannel[cls] || opennedPannel[cls] == 0){ opennedPannel[cls] = 1; var heigt = document.getElementById(cls).scrollHeight; console.log(heigt); $('#' + cls).css({ height: heigt + 'px' }); } else { opennedPannel[cls] = 0; $('#' + cls).css({ height: '0' }); console.log('else'); } } /*++++++++ ---- MENU ---- +++++++++*/ $().ready(function () { $(window).resize(function () { if(menu_statu == 1){ var scrWidth = $(window).width(); if(scrWidth > 768){ mobile_menu(); } } }); var scrolStart = 0; var scrolStop = 0; var scrolTime ; var menuTop = $('.header').cssNumber("top"); $(window).scroll(function () { scrolStop = $(this).scrollTop(); if ( scrolStart < scrolStop && scrolStop > 125 ) { var menuHeight = $('.header').height() +90; $('.header').css('top', '-' + menuHeight + 'px'); clearTimeout(scrolTime); scrolTime = setTimeout(function () { scrolStart = scrolStop; }, 200); } else { $('.header').css('top', menuTop + 'px'); clearTimeout(scrolTime); scrolTime = setTimeout(function () { scrolStart = scrolStop; }, 200); } }); var idd = 0; $('.std_button').click(function () { //$('.contact_button').attr('disabled', 'disabled'); //var formName = $('.form_name').val(); var name = $('.name').val(); var email = $('.email').val(); var tel = $('.tel').val(); var message = $('.message').val(); var pos = 'name=' + name + '&email=' + email + '&tel=' + tel + '&message=' + message; //console.log(pos); $('._tel, ._email, ._name').css({ fontWeight: '100' }); if(email.indexOf('@') < 2 || email.indexOf('.') < 6 ){ //$('._email').html(' Bu Bölümü eksik yada yanlış doldurdunuz').css('display', 'inline'); $('._email').html(' - Bu Bölümü eksik yada yanlış doldurdunuz'); idd = 1; } //console.log(email.indexOf('.')); var tell = tel.split(' ').join(''); tell = (tell.substr(-10) * 1); var teln = parseInt(tell); //console.log(String(tell).length + '---'); if(String(tell).length != 10 || teln != tell){ //$('._tel').html(' Bu Bölüme 5554443322 Şeklinde Doldurunuz').css('display', 'inline'); $('._tel').html(' - Bu Bölüme 5554443322 Şeklinde Doldurunuz'); idd = 1; } if(name.length <= 2){ //$('._name').html('Bu bölüme en az 3 karakter girmeniz gerekmektedir').css('display', 'inline'); $('._name').html(' - Bu bölüme en az 3 karakter girmeniz gerekmektedir'); idd = 1; } if(message.length <= 2){ //$('._name').html('Bu bölüme en az 3 karakter girmeniz gerekmektedir').css('display', 'inline'); $('._message').html(' - Bu bölümü Boş Bırakamazsınız.'); idd = 1; } if (idd == 0) { idd = 1; console.log('idd_ok'); pos = 'name=' + name + '&email=' + email + '&tel=' + tel + '&message=' + message; $.post('/?act=submit', {'name':name,'email':email,'tel':tel,'mesage':message}).done(function (e) { console.log(e); var data = JSON.parse(e); if (data.statu == 'eksik') { idd = 0; $('.modal-content p').html('Formu Eksik Doldurdunuz Lütfen Kontrol Ediniz').css({ fontSize : '18px', color: '#ffffff' }); $('.modal-content').css({ backgroundColor: '#ff0000' }); } else if (data.statu == true) { $('.modal-content p').html('Bilgileriniz İletilmiştir Sizi En Kısa Sürede Arayacağız.').css({ fontSize : '18px', color: '#ffffff' }); $('.modal-content').css({ backgroundColor: '#00cf10' }); $('.name').val(''); $('.email').val(''); $('.tel').val(''); $('.message').val(''); idd = 0; } else { idd = 0; $('.modal-content p').html('Bir Hata Oluştu!').css({ fontSize : '18px', color: '#ffffff' }); $('.modal-content').css({ backgroundColor: '#ff0000' }); } $('.modal').css({ display: 'inline' }); //$('.contact_button').attr('disabled', ''); }); } idd = 0; }); $('.tel, .email, .name, .message').click(function () { $('._tel, ._email, ._name, ._message').html('');//.css('display', 'none'); }); }); /*++++++++ ---- Açılır Sayfa ---- +++++++++*/ function openMenuHeigth() { $('.open_menu').css({ overflow : 'visible', display : 'none', height : 'auto' }); openHeight = $('.open_menu').height(); $('.open_menu').css({ overflow : 'hidden', display : 'block', height : '0' }); } /*++++++++ ---- Açılır Sayfa ---- +++++++++*/ /*++++++++ ---- Örnekler ---- +++++++++*/ /* >
buton
// video ekleme $('[data-fancybox="tanitim"]').fancybox({ thumbs : { autoStart : true }, buttons : [ 'zoom', 'close' ] }); var data = { sliderClass:'.banner', ovalClass:'.slider_oval', ovalBg:'#C09C5E', ovalBorder:'#333333', scrWidth:'', scrHeight:850, scrHeight1024:700, scrHeight768:500, imgResize:'false', imgHeightResize:'false', autoNext: 5000 //sliderOpacityTextClass:'.haber_slider_text' }; var haberslider = new banner(data); $().ready(function () { //modalCome('Hoş Geldiniz'); openMenuHeigth(); $(window).resize(function(){ openMenuHeigth(); }); var scrolStart = 0; var scrolStop = 0; var scrolTime ; $(window).scroll(function () { /*++++++++ ---- MENU ---- +++++++++* / scrolStop = $(this).scrollTop(); if ( scrolStart < scrolStop && scrolStop > 125 ) { $('.header_flex').addClass("header_top"); clearTimeout(scrolTime); scrolTime = setTimeout(function () { scrolStart = scrolStop; }, 200); } else { $('.header_flex').removeClass("header_top"); clearTimeout(scrolTime); scrolTime = setTimeout(function () { scrolStart = scrolStop; }, 200); } }); /*++++++++ ---- MENU Sabitleme ---- +++++++++* / )}; /*++++++++ ---- Popi Popup ---- +++++++++* / function doctorCome(tur) { $.post('/hekimlerimiz/?act=doktor', {'tur': tur}).done(function (e) { $('.popi_conteiner').html(e); $('.popi').css({ display: 'inline' }); $('html').css({ overflow: 'hidden' }); window.history.pushState('hekimlerimiz', 'hekimlerimiz', '/hekimlerimiz'); }); } function popiExit() { $('.popi').css({ display: 'none' }); $('html').css({ overflow: 'scroll' }); window.history.pushState('hekimlerimiz', 'Title', '/hekimlerimiz'); } /*++++++++ ---- Popi Popup ---- +++++++++* / */ /*++++++++ ---- Nice Scroll ---- +++++++++* / $(".scrolll").niceScroll(); */ /*++++++++ ---- Nice Scroll ---- +++++++++* / */ /*++++++++ ---- Örnekler ---- +++++++++*/