$(function () {

    var screen = 1;

    $('.wrapper').addClass('bg1');
    $('path').attr('style', 'display:none');
    $('path#screen-1').attr('style', '');

    $('path').click(function () {
	$('#jplayer_well').jPlayer('play');
	$(this).attr('style', 'display:none');
	$('#text-'+screen).fadeIn(300);
	setTimeout(function () {
	    screen++;
	    if (screen < 4) {
		$('.wrapper').addClass('bg' + screen);
		$('path#screen-' + screen).attr('style', '');
		$('#text-'+(screen-1)).css('display', 'none');
	    }
	}, 1500);
    });

    $('rect').click(function () {
	$('#jplayer_wrong').jPlayer('play');
    });
});