﻿$(function () {
    $("#accordion").accordion({ header: "h3",
        collapsible: true
    });
});

$(function () {
function RenkMix(clsOrId, clr, exColor, where, speed) {
    //Where's : backgroundColor    borderBottomColor    borderLeftColor    borderRightColor   borderColor    borderTopColor    color    outlineColor
    if (!speed) { speed = 500; } if (!where) { where = 'color'; } if (!clr) { clr = '#C00'; }
    if (!exColor) { exColor = $(clsOrId).css(where); }
    var params = {}; params[where] = clr; var paramsex = {}; paramsex[where] = exColor;
    $(clsOrId).hover(function () { $(this).stop(true, false).animate(params, { duration: speed }); });
    $(clsOrId).mouseout(function () { $(this).stop(true, false).animate(paramsex, { duration: speed }); });
}
        function runEffect() {
        //        var selectedEffect = $("#effectTypes").val();
        keywords = ["blind", "fade", "slide", "fold", "explode", "drop", "clip"]
        var selectedEffect = keywords[Math.floor(Math.random() * keywords.length)]
        var options = {};
        $("#effect").effect(selectedEffect, options, "slow", callback);
    };

    function callback() {
        setTimeout(function () {
            $("#effect").removeAttr("style").hide().fadeIn();
        }, 1000);

    };

    $("#btn1").click(function () {
        document.getElementById('ortaic').innerHTML = '';
        runEffect();
        makeRequest('hakkimizda.php', 'ortaic');
    });
    $("#btn2").click(function () {
        document.getElementById('ortaic').innerHTML = '';
        runEffect();
        makeRequest('koleksiyon.htm', 'ortaic');
    });
    $("#btn3").click(function () {
        document.getElementById('ortaic').innerHTML = '';
        runEffect();
        makeRequest('bayiler.php', 'ortaic');
    });
    $("#btn4").click(function () {
        document.getElementById('ortaic').innerHTML = '';
        runEffect();
		$('#ortaic').load('galeri.php',function(){$("a[rel='example2']").colorbox({ transition: "fade" });
		RenkMix('.cerceve','#333','#eee','borderColor',2000);																		  
});
		});
    $("#btn5").click(function () {
        document.getElementById('ortaic').innerHTML = '';
        runEffect();
        makeRequest('shoplar.php', 'ortaic');
    });
    $("#btn6").click(function () {
        document.getElementById('ortaic').innerHTML = '';
        runEffect();
        makeRequest('iletisim.php', 'ortaic');
    });
});

