(function () {
$(document).ready(function ($) {
if ($(".js-fax").length) {
$(".js-fax").each(function () {
var numara = $(this).text();
if (numara == " ") {
$(this).hide();
}
});
}
$("#SlcProje option[value=" + location.href.split("/")[5] + "]").prop("selected", true);
if ($(".content-side-menu").length) {
var url = location.pathname;
$(".content-side-menu li a").each(function () {
var urlLinks = $(this).attr("href");
if (urlLinks == url) {
$(this).closest("li").addClass("active");
}
});
}
if ($(".kampanya-resim").length) {
if ($(".kampanya-resim").attr("src").split("/")[3].length == 0) {
$(".kampanya-resim-link").remove();
}
}
/* Menu */ $(".mobile-menu-trigger").on("click", function () {
$(".mobile-menu-wrapper,.menu-bg").addClass("opened");
});
$("#js-menu-bg").click(function () {
$(".mobile-menu-wrapper,.menu-bg").removeClass("opened");
});
$(window).resize(function () {
mobile();
});
if ($(".fancybox").length) {
$(".fancybox").fancybox({ titleShow: false });
}
$(".fancybox-video").fancybox({ width: "75%", height: "75%", autoScale: false, transitionIn: "none", transitionOut: "none", type: "iframe" });
$("[rel='external']").removeAttr("rel").attr({ target: "_blank" });
var url = location.pathname.split("/");
$("[data-language-id]").click(function () {
var dilID = $(this).attr("data-language-id");
var url = $(this).attr("href");
$.ajax({
type: "post",
dataType: "json",
url: "/LanguageChange",
data: { id: dilID },
success: function (data) {
if (data.s == 1) {
if (location.pathname == url.split("#")[0]) {
location.reload();
} else if (url.split("#")[0] == "/") {
location.href = url;
} else {
location.href = url;
}
}
},
});
return false;
});
$("[data-form='iletisim']").validation({
button: "#btnGonder",
onSubmit: function () {
$("[data-form='iletisim'] #btnGonder").attr({ disabled: true });
},
onCompleted: function () {
$("[data-form='iletisim'] #btnGonder").attr({ disabled: false });
var bs = 0;
var dd = new Date();
var status = [10];
status[0] = "";
status[1] = dd.getDate() + "." + (dd.getMonth() + 1) + "." + dd.getFullYear() + " " + dd.getHours() + ":" + dd.getMinutes();
status[2] = $("[data-form='iletisim'] #txtAd").val();
status[3] = $("[data-form='iletisim'] #txtSoyad").val();
status[4] = $("[data-form='iletisim'] #txtTelefon").val();
status[5] = $("[data-form='iletisim'] #txtEposta").val();
status[6] = $("[data-form='iletisim'] #txtKonu").val();
status[7] = $("[data-form='iletisim'] #SlcProje").val();
status[8] = $("[data-form='iletisim'] #txtMesaj").val();
status[9] = $("[data-form='iletisim'] #cxSms").is(":checked");
status[10] = $("[data-form='iletisim'] #cxEmail").is(":checked");
status[11] = $("[data-form='iletisim'] #cxTelefon").is(":checked");
$.ajax({
type: "post",
dataType: "json",
data: {
IP: IP,
AdSoyad: "" + status[2] + "" + status[3] + "",
Telefon: "" + status[4] + "",
Eposta: "" + status[5] + "",
Konu: "" + status[6] + "",
Proje: "" + status[7] + "",
Mesaj: "" + status[8] + "",
Tarih: "" + status[1] + "",
SmsOnay: "" + status[9] + "",
MailOnay: "" + status[10] + "",
TelefonOnay: "" + status[11] + "",
},
headers: { name: "Iletisim", islem: 0 },
url: "/Api",
success: function (data) {
if (data.s == "1") {
var style = 'font-weight: bold; text-align: center; background-color: #f3f3f3; height: 30px; border-top: solid 1px #dddddd; border-left: solid 1px #dddddd; border-right: solid 1px #dddddd;"';
var style1 = "padding: 5px; border-left: solid 1px #dddddd; border-bottom: solid 1px #dddddd; border-right: solid 1px #dddddd;";
var html =
'
| | |
| | | ' +
$("title").text() +
' |
| |
| | | | ';
html += 'Adı Soyadı: | ';
html += 'Telefon Numarası: | ';
html += 'E-Mail Adresi: | ';
html += 'Konu: | ';
html += 'Proje: | ';
html += 'Mesajı: | ';
html += 'Sms Onayı | ';
html += 'Mail Onayı | ';
html += 'Telefon Onayı | ';
html += " ";
html += '@AdSoyad | ';
html += '@Telefon | ';
html += '@Eposta | ';
html += '@Konu | ';
html += '@Proje | ';
html += '@Mesaj | ';
html += '@SmsOnay | ';
html += '@MailOnay | ';
html += '@TelefonOnay | ';
html +=
' | | |
| |
| | |
IP:85.105.81.145 | Tarih:@Tarih ';
html = html.replace("@AdSoyad", status[2] + " " + status[3]);
html = html.replace("@Telefon", status[4]);
html = html.replace("@Eposta", status[5]);
html = html.replace("@Konu", status[6]);
html = html.replace("@Proje", status[7]);
html = html.replace("@Mesaj", status[8]);
html = html.replace("@SmsOnay", 1 == status[9] ? "Evet" : "Hayır");
html = html.replace("@MailOnay", 1 == status[10] ? "Evet" : "Hayır");
html = html.replace("@TelefonOnay", 1 == status[11] ? "Evet" : "Hayır");
html = html.replace("85.105.81.145", IP);
html = jQuery(" ").text(html).html();
$.ajax({
type: "post",
dataType: "json",
data: { Subject: "İletişim Formu", Body: "" + html + "", To: "iletisimformu", bs: bs, validate: status[0] },
url: "/SendMail",
success: function (data) {
if (data.s == "1") {
if (confirm("Başvurunuz elimize ulaştı en kısa sürede tarafınıza dönüş yapılacaktır.")) {
location.reload();
} else {
location.reload();
}
} else {
bs += 1;
alert("Başvuru işleme esnasında hata oluştu.Lütfen tekrar deneyiniz.");
$("[data-form='iletisim'] #btnGonder").attr({ disabled: false }).val("Gönder");
}
},
});
} else {
bs += 1;
alert("Başvuru işleme esnasında hata oluştu.Lütfen tekrar deneyiniz.");
$("[data-form='iletisim'] #btnGonder").attr({ disabled: false }).val("Gönder");
}
},
});
},
onError: function () {
$("[data-form='iletisim'] #btnGonder").attr({ disabled: false });
},
});
$("[data-form='arsa']").validation({
button: "#btnGonder",
onSubmit: function () {
$("[data-form='arsa'] #btnGonder").attr({ disabled: true });
},
onCompleted: function () {
$("[data-form='arsa'] #btnGonder").attr({ disabled: false });
var bs = 0;
var dd = new Date();
var status = [10];
status[0] = "";
status[1] = dd.getDate() + "." + (dd.getMonth() + 1) + "." + dd.getFullYear() + " " + dd.getHours() + ":" + dd.getMinutes();
status[2] = $("[data-form='arsa'] #txtAd").val();
status[3] = $("[data-form='arsa'] #txtSoyad").val();
status[4] = $("[data-form='arsa'] #txtTelefon").val();
status[5] = $("[data-form='arsa'] #txtEposta").val();
status[6] = $("[data-form='arsa'] #txtAdres").val();
status[7] = $("[data-form='arsa'] #txtIlce").val();
status[8] = $("[data-form='arsa'] #txtMetreKare").val();
status[12] = $("[data-form='arsa'] #txtImarDurumu").val();
status[13] = $("[data-form='arsa'] #txtAciklama").val();
status[9] = $("[data-form='arsa'] #cxSms").is(":checked");
status[10] = $("[data-form='arsa'] #cxEmail").is(":checked");
status[11] = $("[data-form='arsa'] #cxTelefon").is(":checked");
$.ajax({
type: "post",
dataType: "json",
data: {
IP: IP,
AdSoyad: "" + status[2] + "" + status[3] + "",
Telefon: "" + status[4] + "",
Eposta: "" + status[5] + "",
Adres: "" + status[6] + "",
Ilce: "" + status[7] + "",
Metrekare: "" + status[8] + "",
ImarDurumu: "" + status[12] + "",
Aciklama: "" + status[13] + "",
Tarih: "" + status[1] + "",
SmsOnay: "" + status[9] + "",
MailOnay: "" + status[10] + "",
TelefonOnay: "" + status[11] + "",
},
headers: { name: "ArsaBildirimFormu", islem: 0 },
url: "/Api",
success: function (data) {
if (data.s == "1") {
var style = 'font-weight: bold; text-align: center; background-color: #f3f3f3; height: 30px; border-top: solid 1px #dddddd; border-left: solid 1px #dddddd; border-right: solid 1px #dddddd;"';
var style1 = "padding: 5px; border-left: solid 1px #dddddd; border-bottom: solid 1px #dddddd; border-right: solid 1px #dddddd;";
var html =
' | | |
| | | ' +
$("title").text() +
' |
| |
| | | | ';
html += 'Adı Soyadı: | ';
html += 'Telefon Numarası: | ';
html += 'E-Mail Adresi: | ';
html += 'Adres: | ';
html += 'Bulunduğu İlçe: | ';
html += 'Metrekare: | ';
html += 'İmar Durumu: | ';
html += 'Açıklama: | ';
html += 'Sms Onayı | ';
html += 'Mail Onayı | ';
html += 'Telefon Onayı | ';
html += " ";
html += '@AdSoyad | ';
html += '@Telefon | ';
html += '@Eposta | ';
html += '@Adres | ';
html += '@Ilce | ';
html += '@Metrekare | ';
html += '@ImarDurumu | ';
html += '@Aciklama | ';
html += '@SmsOnay | ';
html += '@MailOnay | ';
html += '@TelefonOnay | ';
html +=
' | | |
| |
| | |
IP:85.105.81.145 | Tarih:@Tarih ';
html = html.replace("@AdSoyad", status[2] + " " + status[3]);
html = html.replace("@Telefon", status[4]);
html = html.replace("@Eposta", status[5]);
html = html.replace("@Adres", status[6]);
html = html.replace("@Ilce", status[7]);
html = html.replace("@Metrekare", status[8]);
html = html.replace("@ImarDurumu", status[12]);
html = html.replace("@Aciklama", status[13]);
html = html.replace("@SmsOnay", 1 == status[9] ? "Evet" : "Hayır");
html = html.replace("@MailOnay", 1 == status[10] ? "Evet" : "Hayır");
html = html.replace("@TelefonOnay", 1 == status[11] ? "Evet" : "Hayır");
html = html.replace("85.105.81.145", IP);
html = jQuery(" ").text(html).html();
$.ajax({
type: "post",
dataType: "json",
data: { Subject: "Arsa Bildirim Formu", Body: "" + html + "", To: "arsabildirim", bs: bs, validate: status[0] },
url: "/SendMail",
success: function (data) {
if (data.s == "1") {
if (confirm("Başvurunuz elimize ulaştı en kısa sürede tarafınıza dönüş yapılacaktır.")) {
location.reload();
} else {
location.reload();
}
} else {
bs += 1;
alert("Başvuru işleme esnasında hata oluştu.Lütfen tekrar deneyiniz.");
$("[data-form='arsa'] #btnGonder").attr({ disabled: false }).val("Gönder");
}
},
});
} else {
bs += 1;
alert("Başvuru işleme esnasında hata oluştu.Lütfen tekrar deneyiniz.");
$("[data-form='arsa'] #btnGonder").attr({ disabled: false }).val("Gönder");
}
},
});
},
onError: function () {
$("[data-form='arsa'] #btnGonder").attr({ disabled: false });
},
});
mobile();
function mobile() {
if (window.innerWidth < 1200) {
if ($(".main-menu").length) {
$(".js-menu").removeClass("main-menu");
}
} else {
if (!$(".main-menu").length) {
$(".js-menu").addClass("main-menu");
}
}
} /****************************/
});
$("[data-form='ik-form']").validation({
button: "#btnGonder",
onSubmit: function () {
$("#btnGonder").attr({ disabled: true });
},
onCompleted: function () {
$("#btnGonder").attr({ disabled: false });
var bs = 0;
var dd = new Date();
var status = [10];
status[0] = "";
status[1] = dd.getDate() + "." + (dd.getMonth() + 1) + "." + dd.getFullYear() + " " + dd.getHours() + ":" + dd.getMinutes();
status[2] = $("[data-form='ik-form'] #txtAd").val();
status[3] = $("[data-form='ik-form'] #txtSoyad").val();
status[4] = $("[data-form='ik-form'] #txtTelefon").val();
status[5] = $("[data-form='ik-form'] #txtEposta").val();
status[6] = $("[data-form='ik-form'] #txtCV").val();
status[7] = $("[data-form='ik-form'] #txtMesaj").val();
status[9] = $("[data-form='ik-form'] #cxSms").is(":checked");
status[10] = $("[data-form='ik-form'] #cxEmail").is(":checked");
status[11] = $("[data-form='ik-form'] #cxTelefon").is(":checked");
$.ajax({
type: "post",
dataType: "json",
data: {
IP: IP,
AdSoyad: "" + status[2] + "" + status[3] + "",
Eposta: "" + status[5] + "",
Telefon: "" + status[4] + "",
Mesaj: "" + status[7] + "",
CV: "" + status[6] + "",
Tarih: "" + status[1] + "",
SmsOnay: "" + status[9] + "",
MailOnay: "" + status[10] + "",
TelefonOnay: "" + status[11] + "",
},
headers: { name: "InsanKaynaklariFormu", islem: 0 },
url: "/Api",
success: function (data) {
if (data.s == "1") {
var style = 'font-weight: bold; text-align: center; background-color: #f3f3f3; height: 30px; border-top: solid 1px #dddddd; border-left: solid 1px #dddddd; border-right: solid 1px #dddddd;"';
var style1 = "padding: 5px; border-left: solid 1px #dddddd; border-bottom: solid 1px #dddddd; border-right: solid 1px #dddddd;";
var html =
' | | |
| | | ' +
$("title").text() +
' |
| |
| | | | ';
html += 'Adı Soyadı: | ';
html += 'E-Posta Adresi: | ';
html += 'Telefon: | ';
html += 'Mesaj: | ';
html += 'CV: | ';
html += 'Sms Onay: | ';
html += 'Mail Onay: | ';
html += 'Telefon Onay: | ';
html += " ";
html += '@AdSoyad | ';
html += '@Eposta | ';
html += '@Telefon | ';
html += '@Mesaj | ';
html += '' + status[6] + " | ";
html += '@SmsOnay | ';
html += '@MailOnay | ';
html += '@TelefonOnay | ';
html +=
' | | |
| |
| | |
IP:' +
IP +
" Tarih:" +
status[1] +
" ";
html = html.replace("@AdSoyad", status[2] + " " + status[3]);
html = html.replace("@Eposta", status[5]);
html = html.replace("@Telefon", status[4]);
html = html.replace("@Mesaj", status[7]);
html = html.replace("@CV", '' + status[6] + "");
html = html.replace("@SmsOnay", 1 == status[9] ? "Evet" : "Hayır");
html = html.replace("@MailOnay", 1 == status[10] ? "Evet" : "Hayır");
html = html.replace("@TelefonOnay", 1 == status[11] ? "Evet" : "Hayır");
html = html.replace("85.105.81.145", IP);
html = jQuery(" ").text(html).html();
$.ajax({
type: "post",
dataType: "json",
data: { Subject: "İnsan Kaynakları Formu", Body: "" + html + "", To: "cv-birakma", bs: bs, validate: status[0] },
url: "/SendMail",
success: function (data) {
if (data.s == "1") {
if (confirm("Başvurunuz elimize ulaştı en kısa sürede tarafınıza dönüş yapılacaktır.")) {
location.reload();
} else {
location.reload();
}
} else {
bs += 1;
alert("Başvuru işleme esnasında hata oluştu.Lütfen tekrar deneyiniz.");
$("[data-form='ik-form'] #btnGonder").attr({ disabled: false }).val("Gönder");
}
},
});
} else {
bs += 1;
alert("Başvuru işleme esnasında hata oluştu.Lütfen tekrar deneyiniz.");
$("#btnGonder").attr({ disabled: false }).val("Gönder");
}
},
});
},
onError: function () {
$("#btnGonder").attr({ disabled: false });
},
});
$("#btnUpload").ajaxUpload({
url: "/FileUpload",
name: "file",
onSubmit: function () {
$(".uploadResult").text("Dosya yükleniyor.");
$("#txtCV").attr({ "data-status": "0" });
},
onComplete: function (result) {
if (result != '"error"') {
var adi = String(result).replace(/\"/g, "").split("|")[0];
var type = String(result).replace(/\"/g, "").split("|")[1];
$("#txtCV").attr({ "data-status": "1" });
$("#txtCV").val(adi);
$(".uploadResult").text("Yüklendi. Gönderebilirsiniz.");
} else {
$("#txtCV").attr({ "data-status": "0" });
alert("Dosya yükleme hatası");
}
},
});
$(window).load(function () {
if ($(".page-loading").length) {
setTimeout(function () {
$(".page-loading").addClass("opened");
}, 1500);
}
/* Menu Bölme */ var menuWidth = 0;
$(".main-menu li").each(function () {
menuWidth = menuWidth + $(this).outerWidth(true);
if (menuWidth > 560) {
$(this).addClass("right");
$(this).prependTo($(".main-menu"));
$(".main-menu").addClass("opened");
}
});
/**********************/ /* Slider */ $(".slider-slices").each(function () {
var count = $(this).find(".sp-slides > .slide-list > div").length;
var slicesCount = $(this).attr("data-slices-count");
var d = Math.ceil(count / slicesCount);
for (var i = 0; i < d; i++) {
$(this).find(".sp-slides").append('');
for (var c = 0; c < slicesCount; c++) {
$(this)
.find(".slide-list > div")
.eq(0)
.appendTo($(this).find(".sp-slide:eq(" + i + ")"));
}
}
$(this).find(".slide-list").remove();
});
const height = $( window ).width() > 990 ? "100%" : 500
const auto = $( window ).width() > 990 ? true : false
if ($(".slider-pro").length) {
$("#main-slider").sliderPro({
width: "100%",
height: height,
arrows: false,
buttons: true,
autoHeight: auto,
waitForLayers: true,
thumbnailPointer: true,
autoplay: true,
autoScaleLayers: false,
autoplayDelay: 4500,
loop: false,
responsive: true,
});
$("#content-slider").sliderPro({ width: "100%", height: "100%", arrows: true, buttons: false, autoHeight: true, autoplay: true, autoplayDelay: 4500, loop: false, responsive: true });
}
/* Tablar */ if ($(".projects-tab-buttons").length) {
App.tabs(".projects-tab-buttons");
}
if ($(".projects-detail-tab").length) {
App.tabs(".projects-detail-tab");
}
/*************************/ /* Slider End */ if ($(window).innerWidth() < 1200) {
if ($(".slider-footer").length) {
$(".slider-footer").appendTo("#main-slider");
}
}
$(window).resize(function () {
sliderResize();
});
sliderResize();
function sliderResize() {
if ($(window).innerWidth() > 1200) {
$(".slide-item .image").each(function () {
var image = $(this);
var height = window.innerHeight;
reziseImg(image, height);
});
} else if ($(window).innerWidth() > 992) {
$(".slide-item .image").each(function () {
var image = $(this);
var height = (window.innerHeight / 100) * 65;
reziseImg(image, height);
});
}
}
function reziseImg(element, jsHeight) {
var windowsHeight = jsHeight;
var windowsWidth = window.innerWidth;
var mobil = window.innerWidth;
var browserwidth = window.innerWidth,
browserheight = jsHeight,
offset;
var thisSlide = element;
var ratio = (thisSlide.innerHeight() / thisSlide.innerWidth()).toFixed(2);
if (thisSlide.closest(".slide-half").length) {
if ($(window).innerWidth() > 1200) {
browserwidth = window.innerWidth / 2;
}
}
var min_height = 0;
var min_width = 0;
var fit_always = 0;
var fit_landscape = 0;
var fit_portrait = 1;
var horizontal_center = 1;
var vertical_center = 1;
/*-----Resize Image-----*/ if (fit_always) {
if (browserheight / browserwidth > ratio) {
resizeWidth();
} else {
resizeHeight();
}
} else {
if (browserheight <= min_height && browserwidth <= min_width) {
if (browserheight / browserwidth > ratio) {
fit_landscape && ratio < 1 ? resizeWidth(true) : resizeHeight(true);
} else {
fit_portrait && ratio >= 1 ? resizeHeight(true) : resizeWidth(true);
}
} else if (browserwidth <= min_width) {
if (browserheight / browserwidth > ratio) {
fit_landscape && ratio < 1 ? resizeWidth(true) : resizeHeight();
} else {
fit_portrait && ratio >= 1 ? resizeHeight() : resizeWidth(true);
}
} else if (browserheight <= min_height) {
if (browserheight / browserwidth > ratio) {
fit_landscape && ratio < 1 ? resizeWidth() : resizeHeight(true);
} else {
fit_portrait && ratio >= 1 ? resizeHeight(true) : resizeWidth();
}
} else {
if (browserheight / browserwidth > ratio) {
fit_landscape && ratio < 1 ? resizeWidth() : resizeHeight();
} else {
fit_portrait && ratio >= 1 ? resizeHeight() : resizeWidth();
}
}
}
/*-----End Image Resize-----*/ /*-----Resize Functions-----*/ function resizeWidth(minimum) {
if (minimum) {
if (thisSlide.width() < browserwidth || thisSlide.width() < min_width) {
if (thisSlide.width() * ratio >= min_height) {
thisSlide.width(min_width);
thisSlide.height(thisSlide.width() * ratio);
} else {
resizeHeight();
}
}
} else {
if (min_height >= browserheight && !fit_landscape) {
if (browserwidth * ratio >= min_height || (browserwidth * ratio >= min_height && ratio <= 1)) {
thisSlide.width(browserwidth);
thisSlide.height(browserwidth * ratio);
} else if (ratio > 1) {
thisSlide.height(min_height);
thisSlide.width(thisSlide.height() / ratio);
} else if (thisSlide.width() < browserwidth) {
thisSlide.width(browserwidth);
thisSlide.height(thisSlide.width() * ratio);
}
} else {
thisSlide.width(browserwidth);
thisSlide.height(browserwidth * ratio);
}
}
}
function resizeHeight(minimum) {
if (minimum) {
if (thisSlide.height() < browserheight) {
if (thisSlide.height() / ratio >= min_width) {
thisSlide.height(min_height);
thisSlide.width(thisSlide.height() / ratio);
} else {
resizeWidth(true);
}
}
} else {
if (min_width >= browserwidth) {
if (browserheight / ratio >= min_width || ratio > 1) {
thisSlide.height(browserheight);
thisSlide.width(browserheight / ratio);
} else if (ratio <= 1) {
thisSlide.width(min_width);
thisSlide.height(thisSlide.width() * ratio);
}
} else {
thisSlide.height(browserheight);
thisSlide.width(browserheight / ratio);
}
}
}
if (horizontal_center) {
$(this).css("left", (browserwidth - $(this).width()) / 2);
}
if (vertical_center) {
$(this).css("top", (browserheight - $(this).height()) / 2);
}
}
});
App = {
tabs: function (tabs) {
var locationHash = location.hash;
var item = $("" + tabs + "");
item.find(".tab").each(function () {
if (locationHash != "") {
$(this).removeClass("active");
$(".tab[data-tab=" + locationHash.split("#")[1] + "]").addClass("active");
}
var href = $(this).not(".active").attr("data-tab");
$("#" + href + ".js-tabs").hide();
});
$(document).on("click", ".tab", function () {
var href = $(this).attr("data-tab");
$(".tab").removeClass("active");
$(this).addClass("active");
item.closest(".tabs-wrapper").find(".js-tabs").hide();
item.closest(".tabs-wrapper")
.find("#" + href + "")
.show();
});
$(".js-tabs").each(function () {
function isEmpty(el) {
return !$.trim(el.html());
}
if (isEmpty($(this))) {
$(".tab[data-tab=" + Number($(this).attr("id")) + "]").hide("");
}
});
},
};
}.call(this));