Set menu item class into body

You’re going about this backwards. What you want to do is use jQuery to test for the presence of the current menu class, then see if that item has the assigned class. If it does, then you add your CSS to the body.

<script type="text/javascript">
    jQuery(document).ready(function($) {
        if($('li.current-menu-item').hasClass('your_custom_class')) {
            $('body').css('background-color', 'orange');
        }
    });
</script>

Integrating my comment… you probably want to cache the selector then loop through a few more times.

<script type="text/javascript">
    jQuery(document).ready(function($) {
        var menuitem = $('li.current-menu-item');
        if (menuitem.hasClass('your_custom_class')) {
            $('body').css({
                'background-color': 'orange',
                'background-image': 'url(http://someurl.com/thatimage.jpg'
            });
        }
        else if(menuitem.hasClass('your_custom_class')) {
            $('body').css({
                'background-color': 'orange',
                'background-image': 'url(http://someurl.com/thatimage.jpg'
            });
        }
    });
</script>