function inlineFieldLabel (formid, inputid, label)
{
  var form = $(formid)  // the form
  var textInput = $(inputid)  // your text input field
  var fieldLabel = label;         // string to put in your text input
  

  /* add the field label css class to the form field and set the value */
  textInput.addClass("field-prompt").val(fieldLabel);

  /* remove the placeholder string when field gets focus */
  textInput.focus(function()
   {
      if(this.value == fieldLabel )
      {
         $(this).removeClass("field-prompt").val("");
      };
   });

  /* add the field label string when field looses focus */
  textInput.blur(function()
   {
      if(this.value == "")
      {
         $(this).addClass("field-prompt").val(fieldLabel );
      };
   });

   /* if the field is set to the fieldLabel on submit, clear the field */
   form.submit(function()
   {
      if(textInput.val() == fieldLabel)
      {
         textInput.removeClass("field-prompt").val("");
      };
   });

}

var Ticker = {
	tickerElement:"#ticker",
	
	items: [{title: 'Kids in Discipleship Blog', href: '/blog'}],
	
	currentItem: 0,
	
	delayPause: 4000,
	
	interval: null,
	
	start: function()
	{
		Ticker.showNext();
		if(this.items.length > 1)
			this.interval = setInterval(Ticker.showNext, Ticker.delayPause)
	},
	
	stop: function()
	{
		clearInterval(this.interval)
	},
	
	showNext:function()
	{
		if(Ticker.currentItem < Ticker.items.length-1)
		{
			Ticker.currentItem++;
		}
		else
		{
			Ticker.currentItem = 0;
		}
		
		$(Ticker.tickerElement).fadeOut("normal",
			function()
			{
				Ticker.switchData();
				$(Ticker.tickerElement).fadeIn();
			}
		);
	},
	
	switchData:function()
	{
		//$(this.tickerElement).setAttribute("href",this.tickerLink);
		if(this.items[Ticker.currentItem])
		{
			var item = this.items[this.currentItem];
			$(this.tickerElement).html(item['title'] + '&nbsp;&nbsp;( <a href="' + item['href'] + '">read more...</a> )');
		}
	}
}


$(document).ready(function() {
});