/* News Rotator */
$(document).ready(function() {  
    $("#newsPg").jCarouselLite({  
    	vertical: true,  
        visible: 2,  
        auto:2500,  
        speed:1000,
	easing:"jswing",
	circular: true,
        pauseOnHover: true
    });  
});


// Table Alternate Rows //
$(document).ready(function(){
  $("table tr:even").addClass("alt");
});

$(document).ready(function(){ 
  $("#casestudies .study:odd").addClass("right");
});

// Newsletter Default Value //
$(document).ready(function() {
	$("#newsletterForm .input").labelify({ text: function(input) { return "Email Address"; } });
});


// Form Active //
$(document).ready(function() {
  $('#mainCol .formLeft, #mainCol .formRow input, #mainCol .formRow textarea, #mainCol .formRow select').focus(function(){
    $(this).parents('.formRow').addClass("formFocus");
    }).blur(function(){
      $(this).parents('.formRow').removeClass("formFocus");
    }); 
});


// HEADER ANIMATION
$(document).ready(function(){ 
	 $("h1#innerHead").wrapInner("<span></span>");
});

$(function(){
	$('h1#innerHead span').css({left: '-600px'});
	jQuery.easing.def = 'easeOutBack';
	setTimeout(animate, 500);
  });
function animate()
{
	$("h1#innerHead span")//.css("opacity","0")
		.animate( { left: "35"}, { queue: false, duration: 1000 } )
		//.animate( { opacity: 1 } , 5000)
};


/* Documents Fading */
$(document).ready(function(){
	$("#leaflets div").hover(function(){
		$(this).find("img").fadeTo("fast", 0.8); // This should set the opacity to 100% on hover
	},function(){
		$(this).find("img").fadeTo("fast", 1.0); // This should set the opacity back to 60% on mouseout
	});
});
