
var Core = new function() {
    
    this.Header = function () {
        if (typeof($('#newsletter-input').placeholder) == 'function') $("#newsletter-input").placeholder();
        
        $('.listen').popupWindow({ 
             centerScreen:1,
             width: 376,
             height: 150
        });
        
    },
    this.Video = function () {
        if (typeof(playing) != 'undefined')
        $f("flash", {src: "/web/desktop/video/flowplayer-3.1.5.swf", wmode:'opaque'}, {
    
                   // don't start automcatically
                   clip: {
                           autoPlay: false,
                           autoBuffering: true
                   },
                           
                   // disable default controls
                   plugins: {controls: null}
           });
    }
    
}

function stopVideo() {
    $f().stop();
    playing = false;
}

function toggleVideo () {
        if (!playing) {
                $f().play();
                playing = true;
        } else {
                $f().stop();
                playing = false;
        }
}

$(document).ready(function() {
    Core.Header();
    Core.Video();
    $("#topspin").click(function(){
        stopVideo();
    });
});