/*
 * @brief JS for index.html
 * @author H <h@singinghorsestudio.com>
 */

$(function () {
	// show the menu!
	MENU.render();

	// set up the media player(s)
	$("#main_jplayer").jPlayer({
        ready: function () {
            $(this).jPlayer("setMedia", {
                mp3: "/mp3/menu_main.mp3"
            });
            setTimeout(MENU.animate_intro, 200);
        },
        swfPath: "/js",
        supplied: "mp3"
    }).bind($.jPlayer.event.play, function() {
		$(this).jPlayer("pauseOthers");
	});

	$("#introduction_jplayer").jPlayer({
        ready: function () {
            $(this).jPlayer("setMedia", {
                mp3: "/mp3/menu_introduction.mp3"
            });
        },
        swfPath: "/js",
        supplied: "mp3"
    }).bind($.jPlayer.event.play, function() {
		$(this).jPlayer("pauseOthers");
	});
	
	$("#film_jplayer").jPlayer({
        ready: function () {
            $(this).jPlayer("setMedia", {
                mp3: "/mp3/menu_film.mp3"
            });
        },
        swfPath: "/js",
        supplied: "mp3"
    }).bind($.jPlayer.event.play, function() {
		$(this).jPlayer("pauseOthers");
	});

	$("#television_jplayer").jPlayer({
        ready: function () {
            $(this).jPlayer("setMedia", {
                mp3: "/mp3/menu_television.mp3"
            });
        },
        swfPath: "/js",
        supplied: "mp3"
    }).bind($.jPlayer.event.play, function() {
		$(this).jPlayer("pauseOthers");
	});

	$("#commercials_jplayer").jPlayer({
        ready: function () {
            $(this).jPlayer("setMedia", {
                mp3: "/mp3/menu_commercials.mp3"
            });
        },
        swfPath: "/js",
        supplied: "mp3"
    }).bind($.jPlayer.event.play, function() {
		$(this).jPlayer("pauseOthers");
	});

	$("#stills_jplayer").jPlayer({
        ready: function () {
            $(this).jPlayer("setMedia", {
                mp3: "/mp3/menu_stills.mp3"
            });
        },
        swfPath: "/js",
        supplied: "mp3"
    }).bind($.jPlayer.event.play, function() {
		$(this).jPlayer("pauseOthers");
	});

	$("#calendar_jplayer").jPlayer({
        ready: function () {
            $(this).jPlayer("setMedia", {
                mp3: "/mp3/menu_calendar.mp3"
            });
        },
        swfPath: "/js",
        supplied: "mp3"
    }).bind($.jPlayer.event.play, function() {
		$(this).jPlayer("pauseOthers");
	});

	$("#representation_jplayer").jPlayer({
        ready: function () {
            $(this).jPlayer("setMedia", {
                mp3: "/mp3/menu_representation.mp3"
            });
        },
        swfPath: "/js",
        supplied: "mp3"
    }).bind($.jPlayer.event.play, function() {
		$(this).jPlayer("pauseOthers");
	});

});
