/**
 * Created by IntelliJ IDEA.
 * User: konstantin
 * Date: 04.08.2010
 * Time: 0:42:48
 * To change this template use File | Settings | File Templates.
 */
$(document).ready(function() {

    $('#slideshow').cycle({
        fx:'fade',
        delay: -2000
    });
    $(".beautifultable tr:nth-child(even)").addClass("even");
    $('#slideshow').slideDown();

    $('#person_h_l').click(function(){
        show_hide('person_h_l', 'rating_content_h')
    });
     $('#person_w_l').click(function(){
        show_hide('person_w_l', 'rating_content_w')
    });
    $('#person_c_l').click(function(){
        show_hide('person_c_l', 'rating_content')
    });
    $('#person_s_l').click(function(){
        show_hide('person_s_l', 'rating_content_s')
    });
    function show_hide(id_l, id_c){
        $('#rating_content').hide();
        $('#rating_content_w').hide();
        $('#rating_content_h').hide();
        $('#rating_content_s').hide();
        $('#person_h_l span').removeClass('under_border');
        $('#person_w_l span').removeClass('under_border');
        $('#person_c_l span').removeClass('under_border');
        $('#person_s_l span').removeClass('under_border');
        $('#person_h_l').addClass('pointer');
        $('#person_w_l').addClass('pointer');
        $('#person_c_l').addClass('pointer');
        $('#person_s_l').addClass('pointer');
        $('#' + id_l).removeClass('pointer');
        $('#' + id_l + ' span').addClass('under_border');
        $('#' + id_c).show();
    }
});
