// Suckerfish Dropdown menu script (to hack IE)

$().ready(function(){
	
	

	
});
/*
function embedVideo(video) {
            document.getElementById('embed').innerHTML = unescape(video.html);
}

// This function loads the data from Vimeo
function init(url) {
	var js = document.createElement('script');
	js.setAttribute('type', 'text/javascript');
	js.setAttribute('src', url);
	document.getElementsByTagName('head').item(0).appendChild(js);
}
*/
function change_vimeo(id)
{
	
	$.post( 'index/getvimeo' , { "video_id" : id } , function(data){
														
		add_html = '<a href="http://vimeo.com/'+data[0].id+'">'+data[0].title+'</a>';
		$(".sermons_header").html(add_html);
		  
	},"json");
	/*  
	// This is the URL of the video you want to load
    var videoUrl = 'http://www.vimeo.com/'+id;

    // This is the oEmbed endpoint for Vimeo (we're using JSON)
    // (Vimeo also supports oEmbed discovery. See the PHP example.)
    var endpoint = 'http://www.vimeo.com/api/oembed.json';

     // Tell Vimeo what function to call
     var callback = 'embedVideo';

    // Put together the URL
    var url = endpoint + '?url=' + encodeURIComponent(videoUrl) + '&callback=' + callback + '&width=320&height=240&color=ff0179&autoplay=true';

	init(url);
	*/
	
	add_vimeo = "";
	add_vimeo += '<object width="320" height="240">';
	add_vimeo += '<param name="allowfullscreen" value="true" />';
	add_vimeo += '<param name="allowscriptaccess" value="always" />';
	add_vimeo += '<param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id='+id+'&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=1&amp;color=ff0179&amp;fullscreen=1&amp;autoplay=true" />';
	add_vimeo += '<param name="wmode" value="transparent">';
	add_vimeo += '<embed src="http://vimeo.com/moogaloop.swf?clip_id='+id+'&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=1&amp;color=ff0179&amp;fullscreen=1&amp;autoplay=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="320" height="240" wmode="transparent"></embed>';
	add_vimeo += '</object>';
	
	$(".sermons_player").html(add_vimeo);
}
  
