	$(function(){
		$("#logo img").ifixpng();
		$('ul#gallery li a').click(function(e){
			e.preventDefault;
			var $bigImg = $(this).attr('href');
			$("#main_image").html('<img src="' + $bigImg + '" />');
			$("#projectInfo").hide();
			return false;
		});
		$("#flashheader").flash(
		{
			src: '/media/flash/som_header.swf',
			width: '1200',
			height: '101',
			scale: 'noscale',
			saling: 'lt',
			align: 'left',
			bgcolor: '#0091ff',
			wmode: 'transparent'
		});
		scroll();
		accordionMenu();

	});

	function accordionMenu() {
		$("#submenu ul li.activeNav ul").show();

		$("#submenu ul li span").click(function(){
			var openMenu = $(this).next();
			if(openMenu.is('ul')){
				if(openMenu.is(':visible')){
					openMenu.slideUp();
					return false;
				}
				else{
					$('#submenu ul ul:visible').slideUp();
					openMenu.slideDown();
					return false;
				}
			}
		});
	}

		function scroll(){
		var $containerH = 170;
		var $height = $("#newsslider ul").height();

		var $total = $("#newsslider li").length;

		var $run = $total * 7000;

		//if($height > $containerH){
			$("#newsslider ul").animate({ top: "-" + $height + "px" }, $run).hover(
				function(){
					$(this).stop(true);
				},
				function(){
					$(this).animate({ top: "-" + $height + "px" }, $run).queue(function(){
						$(this).css("top", $containerH);
						scroll()
						$(this).dequeue();
					});
				}
			).queue(function(){
				$(this).css("top", $containerH);
				scroll()
				$(this).dequeue();
			});
		//}

	}