
var $j = jQuery.noConflict();



$j(document).ready(function(){
	
	
	

	var newsitems = $j("#news-bd li").length;
	var i=0;
		
	function newsScroll() {
		if (i < newsitems) {
			$j("#news-bd li").eq(i).fadeIn("slow");
			setTimeout(function(){
				$j("#news-bd li").eq(i).fadeOut("slow");
				if (i!=4) {
					i=i+1;
				} else {
					i=0;
				}
				setTimeout(function(){
					newsScroll();
				}, 1000);
			}, 3000);
		}
	}
	$j(document).ready(newsScroll);
	
	
	
	

});

$j("#welcome-hd")
		.click(function () { 
			var disp = $j("#welcome-bd").css("display");
			if (disp == "none") {
				//$("#welcome-bd").css({ left:"auto"});
				$j("#welcome-bd").slideDown("slow");
				$j(this).css("background-position","0 -15px");
			} else {
				//$("#welcome-bd").css({ left:"-10000px"});
				$j("#welcome-bd").slideUp();
				$j(this).css("background-position","0 0");
			}
    	});


$j("#query")
		.click(function () { 
			if($j(this).attr("value")=="search our site") {
				$j(this).attr("value","");
			}
	    });	
		
		
$j(".thumb img").hover(
		function () {
			var alt = $j(this).attr("alt");
			$j(this).after('<div><a href="#"></a></div>');
			$j(".thumb div a").text(alt);
			$j(this).parent().parent().css("z-index", "101");
		}, 
		function () {
			$j(".thumb div").remove();
			$j(this).parent().parent().css("z-index", "1");
		}
	);
		
