function slideSwitch() {
	var $active = $('#w-slideshow img.active');
	if ( $active.length == 0 ) $active = $('#slideshow img:last');
	
	// use this to pull the images in the order they appear in the markup
	var $next =  $active.next().length ? $active.next()
		: $('#slideshow img:first');
	
	// uncomment the 3 lines below to pull the images in random order
	/*var $sibs  = $active.siblings();
	var rndNum = Math.floor(Math.random() * $sibs.length );
	var $next  = $( $sibs[ rndNum ] );*/

	$active.addClass('last');
	
	$next.css({opacity: 0.0})
		.addClass('active')
		.animate({opacity: 1.0}, 2000, function() {
			$active.removeClass('active last');
		});
}

$(document).ready(function() { 
	//CornersInit();
	$(".corners").append('<em class="tl"></em><em class="tr"></em><em class="bl"></em><em class="br"></em>');
    $('.content table.striped tr:odd').addClass('odd');
	$('.content table.striped tr:even').addClass('even');
	//SlideShow
	//setInterval( "slideSwitch()", 5000 );
	
	//$("#goods-menu ul").simpletreeview({collapsed:true, open:'', close:''});
	/* This is basic - uses default settings */
	$("a.zoom:has(img)").fancybox({'titlePosition':'inside', 'overlayShow':true, 'hideOnContentClick':true, 'padding':15});
	/* Using custom settings */ //$("a#inline").fancybox({ 'hideOnContentClick': true });
	//$("a.group").fancybox({ 'zoomSpeedIn': 300, 'zoomSpeedOut': 300, 'overlayShow': false });
});