﻿
$(document).ready(function() {
    $('.videoHolder a').each(function() {
        var id = this.id;
        var init = 0;
        if ($(this).html().toLowerCase().indexOf('img') > 0) { // only autoplay when image button is used
            init = 1;
        }
        $f(id, "/scripts/flowplayer-3.1.4.swf", {
            clip: {
                autoPlay: true,
                scaling: 'fit',
                onStart: function() {
                    if (init < 1) {
                        $f(id).stop();
                        init = 2;
                    }
                }
            }
        });
    });
});


