////////////////////////////////////////////////////////////////////////////////
// mint.js
//

	$(document).ready( function() {

		// Menus
		$("#menu img").hover(
			function() { $(this).attr( "src", $(this).attr( "src" ).replace( ".", "_over." ) ); },
			function() { $(this).attr( "src", $(this).attr( "src" ).replace( "_over.", "." ) ); }
		);
		$("#brands img").hover(
			function() { $(this).attr( "src", $(this).attr( "src" ).replace( ".", "_over." ) ); },
			function() { $(this).attr( "src", $(this).attr( "src" ).replace( "_over.", "." ) ); }
		);
		$("#icons img").hover(
			function() { $(this).attr( "src", $(this).attr( "src" ).replace( ".", "_over." ) ); },
			function() { $(this).attr( "src", $(this).attr( "src" ).replace( "_over.", "." ) ); }
		);
		
		// Scroller
		if( $("#scroller").length > 0 )
			doScroller();
	});
	
	var imgPos = new Array();
	var imgCur = 0;
	var aniDuration = 5000;
	function doScroller()
	{
		// Determine Position of each image
		$("#scroller_body img").each( function() {
			imgPos.push( $(this).position().left );
		});
		
		// Scroll
		setTimeout( "doScroll()", 1000 );

	}
	function doScroll()
	{
		var half = imgPos.length / 2;
		var speed = imgPos[half] * 15;
		
		// Pan
		$("#scroller_body").animate( { left: -imgPos[half] }, speed, "linear", function() {
			
			$(this).css( "left", 0 );
			doScroll();
			
		});
	}

//
//
////////////////////////////////////////////////////////////////////////////////	
