// JavaScript Document
$(document).ready(function() {

//BANNER
$("#banner_preload").ready(function() {
	
	$("#banner").html($("#banner_preload").html());
	
	$('#banner').cycle({
		fx: 'scrollLeft',
		easeIn: 'easeOutQuad',
		easeOut: 'easeOutQuad'
	});
	
});///END BANNER PRELOAD

//SEARCH HOVER
$("input#search_button").hover(function(e) {
		$(e.target).addClass("hover");		
	}, function(e){
		$(e.target).removeClass("hover");		
});//END SEARCH HOVER

//DROP DOWN MENU
var dropDownTimeOut;
$("ul#top_nav li.drop_down_active").hover(function(e) {
	//clearTimeout(dropDownTimeOut);
	$(".drop_down").css("display", "none");
	//var activeLink = $(e.target).attr("href");
	//var activeLinkPos = $(e.target).position();
	//$(".drop_down"+activeLink).css("display", "block");
	//$(".drop_down"+activeLink).addClass("active");
	$(e.target).parent().find(".drop_down").css("display", "block");
	
}, function(e) {
	//dropDownTimeOut = setTimeout(function() {
		$(e.target).parent().find(".drop_down").css("display", "none");
	//}, 100);
});

$(".drop_down").hover(function(e) {
	//clearTimeout(dropDownTimeOut);
}, function(e) {
	$(".drop_down").css("display", "none");
});

//SEARCH BOX
$('#search_box input').focus(function(e) {
	if(this.value == "Search") {
		$(this).val("");
	}
});
$('#search_box input').blur(function(e) {
	if(this.value == "") {
		$(this).val("Search");
	}
});

//DONATE BUTTON SIDE
$("a#donate_side").hover(function(e) {
	$(this).stop().animate({left:0}, 300); 
}, function(e) {
	$(this).stop().animate({left:-20}, 300); 
});


});//END JS
