/**
 * @author	David Panzalović
 * @version	1.0
 */
window.addEvent('domready', function() {
    $('iphone_video').show();

    /* Video switching */
    $$('.menu_video a').addEvent('click', function(event){
        var phone_model = event.target.hash;
        var link_selected = event.target;

        $$('.video').hide();
        $$(phone_model + '_video').show();

        $$('.menu_video a').removeClass('selected');
        $$(link_selected).addClass('selected');
    });

    var obj = new Swiff('/static/flash/VideoPlayer_StripTweet.swf', {
        container: $('iphone_video'),
        width: 820,
        height: 490,
        play: true,
        vars: {
            src: '/static/flash/STiphone.mp4',
            thumb: '/static/images/video_start.jpg'
        },
        params: {
            wmode: 'opaque',
            bgcolor: '#2e2a27'
        }
    });

    var obj2 = new Swiff('/static/flash/VideoPlayer_StripTweet.swf', {
        container: $('android_video'),
        width: 820,
        height: 490,
        play: true,
        vars: {
            src: '/static/flash/STandroid.mp4',
            thumb: '/static/images/video_start.jpg'
        },
        params: {
            wmode: 'opaque',
            bgcolor: '#2e2a27'
        }
    });
});
