// wait for the DOM to load using jQuery 
$(function() { 
     
    // setup player normally 
    $f("player1", "http://djmachalebooks.com/wp-content/themes/djmachale/swf/flowplayer-3.1.5.swf", { 
     	
     	//customize the player background
     	canvas: {
            backgroundGradient: 'none',
            backgroundColor: '#000000'
     	},
     
        // clip properties common to all playlist entries 
        clip: { 
            baseUrl: 'http://djmachalebooks.com/wp-content/uploads/video/', 
            subTitle: 'DJ', 
            time: '20 sec' 
        }, 
         
        // our playlist 
        playlist: [ 
            { 
                url: 'morpheus-road.flv', 
                scaling: 'orig',
                title: 'Morpheus Road', 
                subTitle: 'Promotional video for Morpheus Road.'
            },     
            { 
                url: 'Question1.flv', 
                title: 'Favorite characters', 
                subTitle: 'D.J. discusses his favorite characters from the Pendragon series.'
            },     
            { 
                url: 'Question2.flv', 
                title: 'Outlines', 
                subTitle: 'D.J. explains how he uses outlines in his writing process.' 
            },     
            { 
                url: 'Question3.flv', 
                title: 'Why is First Earth set in 1937?', 
                subTitle: 'D.J. disusses his love of that time period.'
            },
            { 
                url: 'Question4.flv', 
                title: 'Writing about the Queen Mary', 
                subTitle: 'D.J. discusses writing from personal experience.'
            },     
            { 
                url: 'Question5.flv', 
                title: 'Will Spader and Gunny return?', 
                subTitle: 'D.J. discusses the convergance.'
            },     
            { 
                url: 'Question6.flv', 
                title: 'More than 10 territories?', 
                subTitle: 'D.J. answers the question, "What would the 11th territory be?"'
            },
            { 
                url: 'Question7.flv', 
                title: 'Bobby&rsquo;s Father', 
                subTitle: 'D.J. reveals whether Saint Dane is Bobby&rsquo;s father.'
            },     
            { 
                url: 'Question8.flv', 
                title: 'After Pendragon', 
                subTitle: 'D.J. announces his new supernatural series, Morpheus Road.'
            },     
            { 
                url: 'pronounciation-guide.flv', 
                title: 'Pronounciation Guide', 
                subTitle: 'D.J. explains how to pronounce the names and places from Pendragon.'
            }, 
            { 
                url: 'fan-video.flv', 
                title: 'Fan Reactions', 
                subTitle: 'Fans discuss their favorite books and characters.'
            }             
        ], 
         
        // show playlist buttons in controlbar 
        plugins: { 
            controls: { 
                playlist: true 
            } 
        } 
    }); 
     
    /* 
        here comes the magic plugin. It uses first div.clips element as the  
        root for as playlist entries. loop parameter makes clips play 
        from the beginning to the end. 
    */ 
    $f("player1").playlist("div.clips:first", {loop:true}); 


    // initialize scrollable 
    $("div.scrollable").scrollable({
    
    	vertical: true,
    	size: 5
    
    }); 
    
    
    
     
});