/*
File: jquery.config.js
Media: screen
Copyright: (c) 2011 Brand Rich Media
Author: Brandon Neil Richards
Author URI: http://www.brandrichmedia.com/
*/

$(function() 
{
		

		// home page quote rotator
		$('#rotator .quote').cycle({ 
		    fx:    'fade',
		    timeout: 6000, 
		    cleartype:!$.support.opacity,
			cleartypeNoBg: true,
		    speed:  1000 
		 });
		//home page hover items
		// hide items onload
		$('.lr-show,.loc-show').hide();
		//now show them when hovered, hide them when not
		$(".feature-receptionists,.feature-locations").hover(
		  function () {
		    $(this).children('div').slideToggle(400);
		  }, 
		  function () {
		  	$(this).children('div').slideToggle(400);
		  }
		);
		
		
		
		//tabbed menu
		var tabContainers = $('#LR50, #LR100, #LR200');

		$('#tabs a').click(function () {
		        tabContainers.hide().filter(this.hash).show();

		        $('#tabs a').removeClass('selected');
		        $(this).addClass('selected');

		        return false;
		    }).filter(':first').click();	
		
		//open windows without embedding target="_blank"				
		$('a[rel="external"]').each(function() {
		$(this).attr('target', '_blank');
		});
		
		// remove value text in form fields
		// remove input text
				$('[rel="rmv"]').click(function() {
					if (this.value == this.defaultValue) {
						this.value = '';
					}
				});
				
				$('[rel="rmv"]').blur(function() {
					if (this.value == '') {
						this.value = this.defaultValue;
					}
				});
		// show hide
		//toggle sermon series summary
				$('#details').hide();
				$('.show-details').click(
				  function () {
				    $('#details').slideDown(600);
				    return false;
				});
		
		

	
});
