﻿$(function () {
    // Querystring'e Erişim
    var urlParams = {};
    (function () {
        var e,
        a = /\+/g,
        r = /([^&=]+)=?([^&]*)/g,
        d = function (s) { return decodeURIComponent(s.replace(a, " ")); },
        q = window.location.search.substring(1);

        while (e = r.exec(q))
            urlParams[d(e[1])] = d(e[2]);
    })();
    /*****************************************************************/
    if (!$.browser.msie) {

    }

    var Links = $('a.m1, a.m2, a.m3, a.m4, a.m5, a.m6');
    var Colors = ['#71a31b', '#c48a0d', '#138084', '#ff4200', '#1082bd', '#d31f1f'];
    var Opac = ['0.8', '1', '0.5'];

    Links.eq(1).css({ 'border-right': 'none' });
    Links.eq(3).css({ 'border-right': 'none' });
    Links.eq(5).css({ 'border-right': 'none' });
    Links.eq(4).css({ 'border-bottom': 'none' });
    Links.eq(5).css({ 'border-bottom': 'none' });

    Links.each(function (index) {
        $(this).hover(function () {
            $(this).stop().animate({ 'background-color': Colors[index], 'opacity': '1' }, 200, "easeOutBounce");
        }, function () {
            $(this).stop().animate({ 'background-color': '#0a0a0a' }, 200, "easeInBounce");
        });
    });

    function Rasgele() {
        var i = Math.round(Math.random() * 6);
        var j = Math.round(Math.random() * 2);
        Links.eq(i).stop().animate({ 'opacity': Opac[j] }, 900);
    }

    setInterval(Rasgele, 100);

    /******************************************************************************************/
    /******* SPONSOR FİRMALAR *********************************************************************/
    /*var PList = $('#content div.bottom-partners-container div.partners div.partners-list'),
    PItems = $('ul li', PList),
    PItemsLength = PItems.length,
    PItemsWidth = 184 * PItemsLength;

    PList.css('width', PItemsWidth);
    function PListLeft() {
    return parseInt(PList.css('margin-left'));
    }
    var Yon = "Sol";
    function PSlide() {
    if (PListLeft() >= 0) Yon = "Sol";
    else if (PListLeft() <= -(PItemsWidth - (184 * 5))) Yon = "Sag";

    switch (Yon) {
    case "Sol":
    PList.animate({ 'margin-left': '-=184px' }, 800, "easeOutBack");
    break;
    case "Sag":
    PList.animate({ 'margin-left': '+=184px' }, 800, "easeInBack");
    break;
    }
    }
    setInterval(PSlide, 3000);*/
    /******************************************************************************************/

    /******************************************************************************************/
    /******** DUYURULAR **********************************************************************/
    /*var NList = $('#content div.bottom-news-container div.news div.news-list'),
    NItems = $('ul li', NList),
    NItemsLength = NItems.length,
    NItemsWidth = 295 * NItemsLength;

    NList.css('width', NItemsWidth);
    function NListLeft() {
    return parseInt(NList.css('margin-left'));
    }
    var NYon = "Sol";
    function NSlide() {
    if (NListLeft() >= 0) NYon = "Sol";
    else if (NListLeft() <= -(NItemsWidth - (295 * 3))) NYon = "Sag";

    switch (NYon) {
    case "Sol":
    NList.animate({ 'margin-left': '-=295px' }, 400, "easeOutBack");
    break;
    case "Sag":
    NList.animate({ 'margin-left': '+=295px' }, 400, "easeInBack");
    break;
    }
    }
    setInterval(NSlide, 2000);*/
    /******************************************************************************************/





































});

