// JavaScript Document


function slideLogos() {
	$('#clients_inner').animate({
		marginLeft: '-=105'
	}, 250, function() {
		var first = $('#clients_inner img:first');
		$('#clients_inner').append(first);
		$(this).css('margin-left', 0);
	});
}

function rollover(target, from, to) {
	target.mouseenter(function() {
		$(this).stop();
		$(this).animate({
			backgroundPosition: '0 -'+to+'px'
		}, 100, 'easeOutQuad');
	});
	target.mouseleave(function() {
		$(this).stop();
		$(this).animate({
			backgroundPosition: '0 -'+from+'px'
		}, 100, 'easeInQuad');
	});
}

$(document).ready(function() {
	
	// COMMON
	
	$('nav a').mouseenter(function() {
		var span = $(this).find('span');
		span.stop();
		span.animate({
			width: $(this).width()
		}, 250);
	});
	$('nav a').mouseleave(function() {
		var span = $(this).find('span');
		span.stop();
		span.animate({
			width: 0
		}, 250);
	});
	
	// my new menu
	
		$('side-nav a').mouseenter(function() {
		var span = $(this).find('span');
		span.stop();
		span.animate({
			width: $(this).width()
		}, 250);
	});
	$('side-nav a').mouseleave(function() {
		var span = $(this).find('span');
		span.stop();
		span.animate({
			width: 0
		}, 250);
	});
	
	
	//end my new menu
	
		
	// COMMON
	
	$('#ex a').mouseenter(function() {
		var span = $(this).find('span');
		span.stop();
		span.animate({
			width: $(this).width()
		}, 250);
	});
	$('#ex a').mouseleave(function() {
		var span = $(this).find('span');
		span.stop();
		span.animate({
			width: 0
		}, 250);
	});

	
	
	$('#home-logo-container a').mouseenter(function() {
		var span = $(this).find('span');
		span.stop();
		span.animate({
			width: $(this).width()
		}, 250);
	});
	$('#home-logo-container a').mouseleave(function() {
		var span = $(this).find('span');
		span.stop();
		span.animate({
			width: 0
		}, 250);
	});

	
	

	
});
