/***********************************************************

    @poject: dpp
    @createdDate: 2009 09 08
    @developer: Cem Sisman (cs@cemsisman.com)
    @version: 1.0.0

***********************************************************/


var j = 0;




/* dom ready */
$(function() {



    $('.m-services').hover(function() {
        $(this).find('div').fadeIn();
    },
    function() {
        $(this).find('div').fadeOut();
    });

    $('.sidebar-left').height($('.col-left').height());
     
    //alert($('.col-left').height());
    //$('.col-left').css('border','solid 5px red');
    
    
    //var leftHeight = $('.col-left').height();
    //alert(leftHeight);
        
    //if (leftHeight > 523) { $('.sidebar-left').height(leftHeight); }
    /*$('.home-os').height($('.home-s').height());*/



    /* news kayma :) */
    var i = 0;
    $('#news-next').click(function() {
        i++;
        if (i >= 3) { i = 0; }
        var ni = 315 * i;
        $('#news-belt').animate({ left: '-' + ni });
        return false;
    });


    $('#news-prev').click(function() {
        i--;
        if (i <= 0) { i = 0; }
        var ni = 315 * i;
        $('#news-belt').animate({ left: '-' + ni });
        return false;
    });










    $('.home-nav-c').mouseover(function() {
        $('.h-next').show();
        $('.h-prev').show();
    })/*.mouseleave(function() {
        $('.h-next').hide();
        $('.h-prev').hide();
    });*/

    /* home navigation kayma :) */

    $('.h-next').click(function() {
        window.clearInterval(hnext);
        _hnext();
    });


    $('.h-prev').click(function() {
        window.clearInterval(hnext);
        j--;
        if (j <= 0) { j = 0; }
        var ni = 502 * j;
        $('.home-nav-belt').animate({ left: '-' + ni });
        return false;
    });





    /* contact form checkboxes change */
    $('#dd-chks').change(function() {
        var val = $(this).val();
        $('.chk-c').hide();
        $('.' + val).show();
    });


    var hnext = window.setInterval('_hnext()', 5000);

});



function _hnext() {
    j++;
    if (j >= 3) { j = 0; }
    var ni = 502 * j;
    $('.home-nav-belt').animate({ left: '-' + ni });
    
}




