var currentlyActiveInputRef = false;
var currentlyActiveInputClassName = false;

var activeClassName = "active";
var inActiveClassName = "inActive";

function highlightActiveInput() {
	if(currentlyActiveInputRef) {
		currentlyActiveInputRef.className = currentlyActiveInputClassName;
	}
	currentlyActiveInputClassName = inActiveClassName;
	this.className = activeClassName;
	currentlyActiveInputRef = this;
}
function blurActiveInput() {
	this.className = inActiveClassName;
}
function initInputHighlightScript() {
	var tags = ["INPUT","TEXTAREA"];
	for(tagCounter=0;tagCounter<tags.length;tagCounter++) {
		var inputs = document.getElementsByTagName(tags[tagCounter]);
		for (var no=0;no<inputs.length;no++){
			if (inputs[no].className && inputs[no].className==activeClassName) {
				continue;
			}
			if (inputs[no].tagName.toLowerCase()=="textarea" || (inputs[no].tagName.toLowerCase()=="input" && inputs[no].type.toLowerCase()=="text") || (inputs[no].tagName.toLowerCase()=="input" && inputs[no].type.toLowerCase()=="password")) {
				inputs[no].onfocus = highlightActiveInput;
				inputs[no].onblur = blurActiveInput;
			}
		}
	}
}
window.onload = function() {
	initInputHighlightScript();
}
$(document).ready(function(){
	$("ul.menu li").hover(
		function(){ $(this).addClass('hover'); },
		function(){ $(this).removeClass('hover');}
	);
	$("ul.award li a").hover(
		function(){ $(this).addClass('hover'); },
		function(){ $(this).removeClass('hover');}
	);
	$("ul.form li input.submit").hover(
		function(){ $(this).addClass('hover'); },
		function(){ $(this).removeClass('hover');}
	);
	$(".image a").hover(
		function(){ $(this).addClass('hover'); },
		function(){ $(this).removeClass('hover');}
	);
	$(".slider a").hover(
		function(){ $(this).addClass('hover'); },
		function(){ $(this).removeClass('hover');}
	);
	$(".gallery").hover(
		function(){ $(this).addClass('hover'); },
		function(){ $(this).removeClass('hover');}
	);
	$(".bg").hover(
		function(){ $(this).addClass('hover'); },
		function(){ $(this).removeClass('hover');}
	);
	$(".gallery .jFlowPrev").hover(
		function(){ $(this).addClass('hover_r'); },
		function(){ $(this).removeClass('hover_r');}
	);
	$(".gallery .jFlowNext").hover(
		function(){ $(this).addClass('hover_l'); },
		function(){ $(this).removeClass('hover_l');}
	);
	$(".flowpanes").hover(
		function(){ $(this).addClass('hover'); },
		function(){ $(this).removeClass('hover');}
	);
	$(".flowpanes .next").hover(
		function(){ $(this).addClass('hover'); },
		function(){ $(this).removeClass('hover');}
	);
	$(".flowpanes .prev").hover(
		function(){ $(this).addClass('hover1'); },
		function(){ $(this).removeClass('hover1');}
	);
	$(function(){
		$(".product li .image").hover(function(){
			$(".fade-dropdown", this).stop().animate({bottom:"0px"},{queue:false,duration:400});
		}, function() {
			$(".fade-dropdown", this).stop().animate({bottom:"-53px"},{queue:false,duration:400});
		});
	});
});
