// JavaScript Document
$(document).ready(function()
{
	$("#askQuestion").hide();
	$("#toggleQuestion").click(function ()
	{
		$("#askQuestion").slideToggle();
	});
	
	$("#invite").flash({
		src: '/flash/invite.swf',
		width: 244,
		height: 176
	});
	
	$("#thehouse").flash({
		src: '/flash/the_house.swf',
		width: 221,
		height: 69
	});
	
	$("#prayers").flash({
		src: '/flash/1000prayers.swf',
		width: 221,
		height: 69
	});
	
	$("#countDown").flash({
		src: '/flash/countdownTimer.swf',
		width: 451,
		height: 120
	});
	
	$("#logoHolder").html("");
	$("#logoHolder").flash({
		src: '/flash/logo.swf',
		width: 353,
		height: 214
	});
	

  
  var d = new Date();
  if(d.getHours() >= 19 && d.getHours() <= 22 && d.getDay() == 1) //If it is between 7-10 show live stream and getDay1 = monday, 0 = sunday
  {
	  var myFlashvars =
	  {
		streamer:             'rtmp://fml.lax.07BA.edgecastcdn.net/2007BA',
		file:                 'CCCM.flv',
		type:                 'video',
		stretching:           'fill',
		autostart:            'true',
		width:         	      '640',
		height:               '360',
		controlbar:			  'over',
		backcolor:            'FFFFFF', // face of buttons
		frontcolor:           '404040', // button symbols & playlist text
		lightcolor:           '808080', // highlighted playlist item
		screencolor:          '000000'  // screen background color
	  };
		$("#mediaBox").html("").flash({
			src: '/flash/player.swf',
			width: 640,
			height: 360,
			flashvars: myFlashvars,
			allowscriptaccess:    'always',
			allowfullscreen:      'true'
	
		});
  }
  
  
});