﻿function AjaxLinkClick(elementId) {
    location.href = '#' + $(elementId).attr('href');
	$(".sag").hide();
	$(".sol").append($("#uyelik-bolumu"));
	$(".sol").append($("#sol-urunler-menu"));
	$(".altsayfa-orta").attr('class', 'altsayfa-ikisutun-orta');
    $('#alt_sayfa_orta_icerik').attr('class', 'altsayfa-arkaplan');
	
	if($(".altsayfa-ikisutun-orta div[class=altsayfa-arkaplan-alt]").length == 0) {
		$(".altsayfa-ikisutun-orta").append("<div class=\"altsayfa-arkaplan-alt\"></div>");
	}
		
	$("#header").hide();
    _gaq.push(['_trackPageview', $(elementId).attr('href')]);
}

$(document).ready(function () {


        //Get all the LI from the #tabMenu UL
        $('#tabMenu > li').click(function () {

            //remove the selected class from all LI    
            $('#tabMenu > li').removeClass('selected');

            //Reassign the LI
            $(this).addClass('selected');

            //Hide all the DIV in .boxBody
            $('.boxBody div').slideUp('1500');

            //Look for the right DIV in boxBody according to the Navigation UL index, therefore, the arrangement is very important.
            $('.boxBody div:eq(' + $('#tabMenu > li').index(this) + ')').slideDown('1500');

        }).mouseover(function () {

            //Add and remove class, Personally I dont think this is the right way to do it, anyone please suggest    
            $(this).addClass('mouseover');
            $(this).removeClass('mouseout');

        }).mouseout(function () {

            //Add and remove class
            $(this).addClass('mouseout');
            $(this).removeClass('mouseover');

        });



    });
