$(document).ready(function(){
	
	//Simple Dropdowns
		$("ul.menu li").hoverIntent(function(){
			$(this).addClass("hover");
			$('ul:first',this).css('visibility', 'visible');
		}, function(){
			$(this).removeClass("hover");
			$('ul:first',this).css('visibility', 'hidden');
		});
		$("ul.menu li ul li:has(ul)").find("a:first").append(" <span>&raquo;</span> ");

		
	//add class to last product in each line.
		$('#content.productlist .list .product').filter(function(index) {
			return index % 3 == 2;
		}).addClass('last');

	
	//Add rounded corners
		$('#content.productlist .paging a').corner('3px');
		$('a.btn').corner('3px');
		
	//Guidon help text
		$('#guidon .image .gtext').hoverIntent( 
			function(){
				$(this).children('.help').show('fast');
			}, function(){
				$(this).children('.help').hide('fast');
			}
		);
	
	//Cycle Plugin
	$('#cycle').cycle({
		fx:			'fade',
		speed:		1000,
		timeout:	4000
	});
		
	//Checkout stuff
		$('#billing tr td:nth-child(1)').addClass('alignright');
		$('#verify tr td:nth-child(1)').addClass('alignright');
		$('#billing tr:odd').addClass('odd');
		$('#content.checkout table#billing td .help').hoverIntent(
			function(){
				$(this).children('span').show('fast');
			}, function(){
				$(this).children('span').hide('fast');
			}			
		);
		
	//fancy Box
		$(".sample").fancybox({
			'padding'		: 20,
			'opacity'		: true,
			'width'			: 900,
			'height'		: 700,
			'overlayShow'	: true,
			'transitionIn'	: 'elastic',
			'transitionOut'	: 'none',
			'type'			: 'iframe'
		});
		
}); 

