﻿
$(document).ready(function() {
    $(".block").animate({ backgroundColor: '#303b8c' }, 1000);
    //hizmetler
    lastBlock = $("#a1");
    maxWidth = 280;
    minWidth = 40;

    $("ul li a").hover(
      function() {
          $(lastBlock).animate({ width: minWidth + "px" }, { queue: false, duration: 400 });
          $(this).animate({ width: maxWidth + "px" }, { queue: false, duration: 400 });
          lastBlock = this;
      }
    );
    //hizmetler

    //akordion    
    $("#accordion").accordion({
        autoHeight: false,
        navigation: true
        //        event: "mouseover"
    });
});

//akordion

	    $("#r1").live("click", function() {
	        var renk = document.getElementById("r1").style.backgroundColor;

	        $(".block").animate({backgroundColor: renk}, 1000);
	    });
	    $("#r2").live("click", function() {
	        var renk = document.getElementById("r2").style.backgroundColor;

	        $(".block").animate({ backgroundColor: renk }, 1000);
	    });
	    $("#r3").live("click", function() {
	        var renk = document.getElementById("r3").style.backgroundColor;

	        $(".block").animate({ backgroundColor: renk }, 1000);
	    });
	    $("#r4").live("click", function() {
	        var renk = document.getElementById("r4").style.backgroundColor;

	        $(".block").animate({ backgroundColor: renk }, 1000);
	    });
	    $("#r5").live("click", function() {
	        var renk = document.getElementById("r5").style.backgroundColor;

	        $(".block").animate({ backgroundColor: renk }, 1000);
	    });
	    
    function sayfaac(url) {
        window.open(url, '_blank', 'top=100, left=100, height=500, width=550, status=no, menubar=no, resizable=no, scrollbars=yes, toolbar=no, location=no, directories=yes', false);
    }
