$(document).ready(function(){
		
		// Add focus pseudo-selector functionality to IE and older browsers for form elements
		$("div.form-style-a .txt").focus(function() { $(this).addClass('focused'); } ).blur(function() {$(this).removeClass('focused');})
		$("div.form-style-b .txt").focus(function() { $(this).addClass('focused'); } ).blur(function() {$(this).removeClass('focused');})
		
		// Home Slideshow
		$('.testimonial-slides').cycle({
			pause: true,
			timeout: 7000,
			fx: 'scrollLeft',
			speed: 800,
			cleartype: false
		});
		
		$("div.faq h2").click(function(){
		 $(this).nextAll(".faq-answer:first").slideToggle();
		$(this).parent().toggleClass('expanded'); return false;
		});
		
		// Dynamically add a class to the last element
		$("div.faq:last-child").addClass("last");
		
		$("a.lightbox").fancybox();
		
		var el = $('div.form-style-a input[type=text], textarea');
    el.focus(function(e) {
        if (e.target.value == e.target.defaultValue)
            e.target.value = '';
    });
    el.blur(function(e) {
        if (e.target.value == '')
            e.target.value = e.target.defaultValue;
    });
		
		
});
