   //MEGA MENU
   
      jQuery(function(){
        var SelfLocation = window.location.href.split('?');
        switch (SelfLocation[1]) {
          default:
            jQuery(".megamenu").megamenu();
        }
      });
      
    //TAB KUTULAR
    
     $(document).ready(function(){
        var aktif = 0;
        $("#tab_kutular div:eq("+aktif+")").show();
        tab_renklendir(0);
        
        $("#tab_bas span").hover(function(){
          var index = $("#tab_bas span").index(this);
          if(aktif != index)
          {
            $("#tab_kutular div:eq("+aktif+")").hide();
            aktif = index;
            tab_renklendir(aktif);
            $("#tab_kutular div:eq("+aktif+")").fadeIn("normal");
          }
        });
      });
      function tab_renklendir(index)
      {
        $("#tab_bas span").css("background-image","url(<?php echo $site;?>images/tab-bas-pasif.png)").css("color","#fff");
        $("#tab_bas span:eq("+index+")").css("background-image","url(<?php echo $site;?>images/tab-bas-aktif.png)").css("color","#147");
      }
      
      //ATAB KUTULAR
      
       $(document).ready(function(){
        var aktifa = 0;
        $("#atab_kutular div.alt:eq("+aktifa+")").show();
        atab_renklendir(0);
        
        $("#atab_bas span.alt").hover(function(){
          var index = $("#atab_bas span.alt").index(this);
          if(aktifa != index)
          {
            $("#atab_kutular div.alt:eq("+aktifa+")").hide();
            aktifa = index;
            atab_renklendir(aktifa);
            $("#atab_kutular div.alt:eq("+aktifa+")").fadeIn("normal");
          }
        });
      });
      function atab_renklendir(index)
      {
        $("#atab_bas span.alt").css("background-image","url(<?php echo $site;?>images/soft_tab.jpg)").css("color","#147");
        $("#atab_bas span.alt:eq("+index+")").css("background-image","url(<?php echo $site;?>images/soft_taba.jpg)").css("color","#147");
      }
      
      //TAB KUTULAR 2
      
      $(document).ready(function(){
        var aktif2 = 0;
        $("#tab_kutular2 div:eq("+aktif2+")").show();
        tab_renklendir2(0);
        
        $("#tab_bas2 span").click(function(){
          var index = $("#tab_bas2 span").index(this);
          if(aktif2 != index)
          {
            $("#tab_kutular2 div:eq("+aktif2+")").hide(1);
            aktif2 = index;
            tab_renklendir2(aktif2);
            $("#tab_kutular2 div:eq("+aktif2+")").fadeIn("normal");
          }
        });
      });
      function tab_renklendir2(index)
      {
        $("#tab_bas2 span").css("background-image","url(<?php echo $site;?>images/tab-bas2-pasif.png)").css("color","#fff");
        $("#tab_bas2 span:eq("+index+")").css("background-image","url(<?php echo $site;?>images/tab-bas2-aktif.png)").css("color","#147");
      }
      
      //ACCORDION MENU
      
       var actv = -1;
      jQuery(document).ready(function(){
        jQuery("#accordion span").click(function(){
          var index = jQuery("#accordion span").index(this);
          if(index != actv)
          {
            jQuery("#accordion div:eq("+actv+")").slideUp(300);
            jQuery("#accordion div:eq("+index+")").slideDown(300);
            actv = index;
          }
          else
          {
            jQuery("#accordion div:eq("+index+")").slideUp(300);actv=-1;
          }
        });
      });
      
      //GOOGLE PLUS
      
      
  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-180038-10']);
  _gaq.push(['_trackPageview']);

  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();
		
       // TREE MENU
       
       var kontrol = 0;
	  	  						
      $(document).ready(function(){
        $(".tree > div a").css("width","190px");
        $(".tree > div span").css("width","230px");
        $(".tree div .tree").css("display","block").css("padding","0").css("width","100%");
        $("#ac").toggle(function(){
          $(".tree span").css("background-image","url('<?php echo $site;?>images/yazililm_bas.png')");
          $(this).html("Hepsini Kapat");
          $(".tree div").show();
          $(".tree div .tree").css("display","block");
        },function(){
          $(".tree span").css("background-image","url('<?php echo $site;?>images/yazililm_bas.png')");
          $(this).html("Hepsini Goster");
          $(".tree div").hide();
          $(".tree div .tree").css("display","block");
        });
        $(".tree span").click(function(){
          var index = $(".tree > span").index(this);
          if($(".tree > div:eq("+index+")").is(":hidden"))
          {

            ac(index);
          }
          else
          {
            kapat(index);
          }
        });
      });
      function kapat(index)
      {
        $(".tree > span:eq("+index+")").css("background-image","url('<?php echo $site;?>images/yazililm_bas.png')");
        $(".tree > div:eq("+index+")").slideUp(600);
      }
      function ac(index)
      {
        $(".tree > span:eq("+index+")").css("background-image","url('<?php echo $site;?>images/yazililm_bas.png')");
        $(".tree > div:eq("+index+")").slideDown(600);
      }
      
      //HOVER 
      
      $(function(){
    $('span, a').hoverbox();
});

		//COLOR BOX
        
        $(document).ready(function(){
			$(".mapsbox").colorbox({iframe:true, innerWidth:645, innerHeight:600});
			$("a[rel='hizliform']").colorbox({iframe:true, innerWidth:445, innerHeight:570});
			$("a[rel='downloadform']").colorbox({iframe:true, innerWidth:445, innerHeight:570});
			$("a[rel='bayilik']").colorbox({iframe:true, innerWidth:445, innerHeight:570});
			$("a[rel='ats_dokuman']").colorbox({iframe:true, innerWidth:445, innerHeight:570});
			$("a[rel='ats_r_dokuman']").colorbox({iframe:true, innerWidth:445, innerHeight:570});
			$("a[rel='pbt_dokuman']").colorbox({iframe:true, innerWidth:445, innerHeight:570});
			$("a[rel='omega_dokuman']").colorbox({iframe:true, innerWidth:445, innerHeight:570});
			$("a[rel='ats_demo']").colorbox({iframe:true, innerWidth:445, innerHeight:900});
			$("a[rel='ats_r_demo']").colorbox({iframe:true, innerWidth:445, innerHeight:900});
			$("a[rel='pbt_demo']").colorbox({iframe:true, innerWidth:445, innerHeight:800});
			$("a[rel='omega_demo']").colorbox({iframe:true, innerWidth:445, innerHeight:800});
			$("#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;
			});
		});
        
        //S BOX
        
        $(document).ready(function() {
        $(".sbox").click(function(){
			$(".sboxalan").toggle(200);
		});
    });
           
           $(document).ready(function() {
				$(".ref_logo img").hover(function() {
				});
		   });
		   
