// JavaScript Document

$(document).ready(function() {
    
    $(document).keydown(function(e) {
        // left key: 37
        // right key: 39
        var key = e.charCode ? e.charCode : e.keyCode ? e.keyCode : 0;
        if (key == 37) {
            if ($("#arrow_left").length) {
                $.url = $("#arrow_left").attr('href');
                window.location = $.url;
            }
        } else if (key == 39) {
            if ($("#arrow_right").length) {
                $.url = $("#arrow_right").attr('href');
                window.location = $.url;
            }
        }
    });
    
    jQuery.fn.fadeToggle = function(speed, easing, callback) { 
        return this.animate({opacity: 'toggle'}, speed, easing, callback); 
    };
    
    $("#arrow_left").animate({marginLeft: '45px'},1000);
    $("#arrow_right").animate({marginRight: '45px'},1000);
    
    /*$(".site_url").click(function(e) {
        e.preventDefault();
        
        if ($(".site_desc").css('display') == 'none') {
            $(this).addClass('site_url_click');
            $(".site_desc").slideDown(250).show();
        } else {
            $(this).removeClass('site_url_click');
            $(".site_desc").slideUp(250);
        }
    });*/
     
});
