$(window).load(function(){
    var ang = 0;
    var width = $('.photo').width();
    var height = $('.photo').height();
    $('#photo-wrapper').css('height', height);
    $('.rotator-cw').click(function(){
        $('.photo').rotate({angle: (ang+90), preservePositionBoolean: 1});
        //console.log(width);
        //console.log(height);
        ang += 90;
        });
        $('.rotator-ccw').click(function(){
        $('.photo').rotate({angle: (ang-90), preservePositionBoolean: 1});
        ang -= 90;
        });
});

$(document).ready(function() {
/*
    $('#commentsForm').submit(function(e) {
        $(document).mask({color: '#999999', closeSpeed: 'normal'});
        e.preventDefault();
        $('#commentsForm button').attr('disabled', 'disabled');
        $.post(this.action, $(this).serialize(), function(data){
           $('.single-comment').removeClass('last');
           $('#commentsForm .single-comment').addClass('last');
           $('.no-comments-yet').remove();
           $('#commentsForm textarea').val('');
           $('.add-comment-wrapper').before(data);
           $('#commentsForm button').attr('disabled', '');
           $.mask.close();
        })     
    });
*/
});
