$(document).ready(function(){
    $('*').keydown(function (event) {
        e = event;
        if (e.ctrlKey && e.keyCode == 39) {
            if (links = $(".nextpaginator").attr("href")) self.location.href = links;
        } else if (e.ctrlKey && e.keyCode == 37) {
            if (links = $(".prevpaginator").attr("href")) self.location.href = links;
        }
    });

    $('.gradient').gradientText({
        colors: ['#a0adcd', '#030d25']
    });
    $('.menu input').focus(function(){
        $('.menu label[for=' + $(this).get(0).name + ']').html('');
    });
    $('.menu input').blur(function(){
        if ($(this).val() == '')
            $('.menu label[for=' + $(this).get(0).name + ']').html($('.menu label[for=' + $(this).get(0).name + ']').attr('rel'));
    });


    $('#content span.index span').click(function(){
        if ($(this).hasClass('notactive'))
        {
            $('#'+$(this).removeClass('notactive').attr('rel')).show()
            $('#'+$(this).attr('rel2')).hide()
            $('#content span.index span[rel='+$(this).attr('rel2')+']').addClass('notactive')
        }
    })
    $('#'+$('#content span.index .deactive').addClass('notactive').attr('rel')).hide();
    $('a.facebox, .sertificate td a').facebox()
    if (!$.browser.msie || $.browser.version != 6) {
        $(".sertificate .pict").append("<span><img src='/design/images/light.png' /></span>");
    }
    $(".area").mouseout(function(){
        $('#geography_popup').hide()
    }).mouseover(function(e){
        $('#geography_popup').html($('#'+$(this).attr('area')).html()).css('top',e.pageY-20).css('left',e.pageX+20).show();
    });
});

