function revInit(){
	dropDowns();
	connectTab();
	bannerRotation();
}

$(document).ready(function() { 
	revInit();
 });

function dropDowns() {
	$("header nav li").hover(
			function () {
				var ww = $(window).width(); 
				if(ww > 640) $(this).find("div").show();
			}, 
			function () {
				$(this).find("div").hide();
			}
		);
		
	$("header nav li ul li").hover(function(e){
		$(this).children('img').toggle();
	});
		// $('.nav-title').click(function() {
		// 	var ww = $(window).width(); 
		// 	if(ww > 640) {
		// 		$(this).next().toggle();
		// 		return false;
		// 	}
		// });
}

function connectTab(){
	$('#connect .tab').click(function(t){
		t.preventDefault();
		$('.slider').slideToggle();
		var arrowStatus = $(this).hasClass('down');
		if(arrowStatus == false)
			$(this).addClass('down');
		else
			$(this).removeClass('down');
	});	
}

function bannerRotation()
{
	$('#banner').cycle({
		fx: 'fade' // choose your transition type, ex: fade, scrollUp, shuffle, etc...
	});
}
