$(function() {

    $(window).resize(function() {

        var deg2radians = Math.PI * 2 / 360;
        var h = $(window).height();
        var w = $(window).width();
        var a = 180*Math.atan2(h, w) / Math.PI;

        var rad      = a * deg2radians;
        var costheta = Math.cos(rad);
        var sintheta = Math.sin(rad);

        $("#webDev").css('height', h-250+'px');

        $('#angle').css('left',                 0)
                   .css('top',                  '0px')
                   .css('width',                2000)
                   .css('-webkit-transform',    'rotate('+a+'deg)')
                   .css('-moz-transform',       'rotate('+a+'deg)')
                   .css('-o-transform',         'rotate('+a+'deg)')
                   .css('-ms-transform',        'rotate('+a+'deg)')
                   .css('transform',            'rotate('+a+'deg)')

                   .css('filter', "progid:DXImageTransform.Microsoft.Matrix(sizingMethod='auto expand', "
                        + 'M11='+costheta+', M12='+-sintheta+', M21='+sintheta+', M22='+costheta+')')

                   .css('zoom',                 '1');
    }).trigger('resize');

    $('#symfony').click(function() {

        
        $('#slider .inactive').animate({
            opacity:  1,
            right:   '0px',
            left:    'auto'
        }, 1000, function() {
            $(this).removeClass('inactive')
                   .addClass('active');
        });

        $('#slider .active').animate({
            opacity: 0,
            left:    '-1000px',
            right:   'auto'
        }, 1000, function() {
            $(this).removeClass('active')
                   .css('right', '-1000px')
                   .addClass('inactive');
        });

        return false
    });

});
