$(document).ready(function(){
	$('a[href*=#]').click(function() {
		if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') && location.hostname == this.hostname) {
			var $target = $(this.hash);
			$target = $target.length && $target || $('[name=' + this.hash.slice(1) +']');
			if ($target.length) {
				var targetOffset = $target.offset().top;
				$('html,body').animate({scrollTop: targetOffset}, 1000);
				return false;
			}
		}
	});

 	$('#flashHome').flash({
                swf: '/incl/flash/flashhome.swf',                
                height: 250,
                width: 357,
                flashvars: {
                }
        });

 	$('#scrollableLeft').flash({
                swf: '/incl/flash/flashleft.swf',                
                height: 150,
                width: 150,
                flashvars: {
                }
        });


	
/*
	
	$("div.scrollable div span").each(function() {
		var wSpan = $(this).width();	
		var hSpan = $(this).height();
		var wImg = $(this).prev("img").width();
		var hImg = $(this).prev("img").height();
		var maxLeft = wImg - wSpan;
		var maxTop = hImg - hSpan;
		$(this).css({
			left: Math.floor(Math.random()*maxLeft)
		});
		$(this).css({
			top: Math.floor(Math.random()*maxTop)
		});
	});


	$("div.scrollable").scrollable({
		size: 1,
		speed: 8000,
		loop: true,
		easing: "swing"
	}).circular().autoscroll({
		autoplay: true,
		autopause: true,
		interval: 8000
	});
*/
	$("div.scrollable").scrollable({size: 1, easing: "swing", speed: 4000}).circular().autoscroll({
		autoplay: true,		
		interval: 6000
	});

	
/*
	$("div.scrollable div span").dropShadow({
		left    : 2,
		top     : 2,
		blur    : 1,
		opacity : 0.4
	});
*/
});
