function Shows() {
    $('h2#Block').animate({
        fontWeight: 'bold',
        fontSize: '44px'
    }, 1000);
    $('h2#Block').animate({
        fontWeight: 'normal',
        fontSize: '20px'
    }, 1000);
}
$(document).ready(function () {
    $('div#menu').slideDown(1200);
    $('div#logo').toggle(1000);
});

$(document).ready(function () {
    function postAnim() {
        $('div#Postit').toggle(1200);
    }
    $(document).ready(postAnim());
});

$(document).ready(function () {

    $(".PopUp").colorbox({ width: "599px", height: "648px", iframe: true, scroll: false, open: true });


});
function sendMes() {
    var NameSurname = document.getElementById('adSoyad').value;
    var Mail = document.getElementById('ePosta').value;
    var GsmNo = document.getElementById('Gsm').value;
	var Adres = document.getElementById('Adres').value;
	var Sehir = document.getElementById('Sehir').value;
	var Ilce = document.getElementById('Ilce').value;
	var atControl = Mail.indexOf("@");
    var dotControl = Mail.lastIndexOf(".");
    if (NameSurname == '') {

                alert('Ad Soyad Yazmalısınız !');

            } else if (Mail == '') {

                alert('E-Mail Adresinizi Yazmalısınız !');

            } else if (Adres == '') {

                alert('Adres Yazmalısınız !');

            } else if (atControl < 1 || dotControl < atControl + 2 || dotControl + 2 >= Mail.length) {

                alert('E-mail Adresi Hatalıdır !');

            } else {
    http.open('get', 'SendMessage.asp?Ad='+NameSurname+'&EMail='+Mail+'&No='+GsmNo+'&Sehir='+Sehir+'&Ilce='+Ilce+'&Adres='+Adres);
    http.onreadystatechange = answerMes;
    http.send(null);
}}

function answerMes() {

    if (http.readyState == 4) {

        document.getElementById('Sonuc').innerHTML = http.responseText;
		var NameSurname = document.getElementById('adSoyad').value = '';
		var Mail = document.getElementById('ePosta').value = '';
		var GsmNo = document.getElementById('Gsm').value = '';
		var Adres = document.getElementById('Adres').value = '';
		var Sehir = document.getElementById('Sehir').value = '';
		var Ilce = document.getElementById('Ilce').value = '';
        $('div#Sonuc').toggle(1200);
		$('div#Sonuc').toggle(1200);
    }

}
$(document).ready(function () {
    //Examples of how to assign the ColorBox event to elements
    $("a[rel='example1']").colorbox();
    $("a[rel='example2']").colorbox({ transition: "fade" });
    $("a[rel='example3']").colorbox({ transition: "none", width: "75%", height: "75%" });
    $("a[rel='example4']").colorbox({ slideshow: true });
    $(".example5").colorbox();
    $(".example6").colorbox({ iframe: true, innerWidth: 980, innerHeight: 540 });
    $(".example7").colorbox({ width: "80%", height: "80%", iframe: true });
    $(".example8").colorbox({ width: "50%", inline: true, href: "#inline_example1" });
	$(".Contact").colorbox({ iframe: true, innerWidth: 520, innerHeight: 270 });
    $(".example9").colorbox({
        onOpen: function () { alert('onOpen: colorbox is about to open'); },
        onLoad: function () { alert('onLoad: colorbox has started to load the targeted content'); },
        onComplete: function () { alert('onComplete: colorbox has displayed the loaded content'); },
        onCleanup: function () { alert('onCleanup: colorbox has begun the close process'); },
        onClosed: function () { alert('onClosed: colorbox has completely closed'); }
    });
    //Example of preserving a JavaScript event for inline calls.
    $("#click").click(function () {
        $('#click').css({ "background-color": "#f00", "color": "#fff", "cursor": "inherit" }).text("Open this window again and this message will still be here.");
        return false;
    });
});

$(function () {
    $('img.image1').data('ad-desc', 'Whoa! This description is set through elm.data("ad-desc") instead of using the longdesc attribute.<br>And it contains <strong>H</strong>ow <strong>T</strong>o <strong>M</strong>eet <strong>L</strong>adies... <em>What?</em> That aint what HTML stands for? Man...');
    $('img.image1').data('ad-title', 'Title through $.data');
    $('img.image4').data('ad-desc', 'This image is wider than the wrapper, so it has been scaled down');
    $('img.image5').data('ad-desc', 'This image is higher than the wrapper, so it has been scaled down');
    var galleries = $('.ad-gallery').adGallery();
    $('#switch-effect').change(
          function () {
              galleries[0].settings.effect = $(this).val();
              return false;
          }
        );
    $('#toggle-slideshow').click(
          function () {
              galleries[0].slideshow.toggle();
              return false;
          }
        );
    galleries[0].addAnimation('wild',
          function (img_container, direction, desc) {
              var current_left = parseInt(img_container.css('left'), 10);
              var current_top = parseInt(img_container.css('top'), 10);
              if (direction == 'left') {
                  var old_image_left = '-' + this.image_wrapper_width + 'px';
                  img_container.css('left', this.image_wrapper_width + 'px');
                  var old_image_top = '-' + this.image_wrapper_height + 'px';
                  img_container.css('top', this.image_wrapper_height + 'px');
              } else {
                  var old_image_left = this.image_wrapper_width + 'px';
                  img_container.css('left', '-' + this.image_wrapper_width + 'px');
                  var old_image_top = this.image_wrapper_height + 'px';
                  img_container.css('top', '-' + this.image_wrapper_height + 'px');
              };
              if (desc) {
                  desc.css('bottom', '-' + desc[0].offsetHeight + 'px');
                  desc.animate({ bottom: 0 }, this.settings.animation_speed * 2);
              };
              img_container.css('opacity', 0);
              return { old_image: { left: old_image_left, top: old_image_top, opacity: 0 },
                  new_image: { left: current_left, top: current_top, opacity: 1 },
                  easing: 'easeInBounce',
                  speed: 2500
              };
          }
        );
});
function debug(str) {
    if (window.console && window.console.log && jQuery.browser.mozilla) {
        console.log(str);
    } else {
        $('#debug').show().val($('#debug').val() + str + '\n');
    }
}

function nesneyarat() {
    var nesne;
    var tarayici = navigator.appName;
    if (tarayici == "Microsoft Internet Explorer") {
        nesne = new ActiveXObject("Microsoft.XMLHTTP");
    } else {
        nesne = new XMLHttpRequest();
    }
    return nesne;
}

var http = nesneyarat();

function yaziLinkim(Yazim) {

    window.location.href = Yazim;

}



