// JavaScript Document

$(document).ready(function(){
	//alert('x');

	<!--
		// You need to specify the size of your background image here (could be done automatically by some PHP code)
		var FullscreenrOptions = {  width: 1680, height: 1200, bgID: '#bgimg' };
		// This will activate the full screen background!
		jQuery.fn.fullscreenr(FullscreenrOptions);
	//-->
	var active = $('#activeCat').attr("class");
	

	
	for (var x = 1; x <= 50; x++){
		var overid = '#over' + x;
		
		//var overid = '#over' + x;
		
		if (x == active){
			var activeid = '#' + active;
			$(overid).show();
			//alert(activeid);
			$(activeid).attr("class", "linkitemactive");	
//					(hfdImg).attr("class", $(hfdImg).attr("src").replace("_r.png", "_g.png"));	
		}else{
			$(overid).hide();
		}
	}			

	$("#items div.linkitem").mouseover(function() {
		var id = $(this).attr("id");	
		var overid = '#over' + id;
		//alert (overid);
		$(overid).show();	
	});
	
	$("#items div.linkitem").mouseout(function() {
		var id = $(this).attr("id");	

		var overid = '#over' + id;
		//alert (id + ' / ' + active);
		if (id != active) $(overid).hide();	

	});			


	$(".news_detail_toggle").click(function(evt) {
		$(this).parents('.news_item').toggleClass("listed");
		$(this).parents('.news_item').children('.news_details').is(":hidden")      
		
			if ($(this).parents('.news_item').children('.news_details').is(":hidden")) {
				$(this).parents('.news_item').children('.news_details').slideDown("slow");
		  } else {
			$(this).parents('.news_item').children('.news_details').slideUp("slow");
		  }
		  evt.preventDefault();


	});
	
	$(".press_detail_toggle").click(function(evt) {
		$(this).parents('.press_item').toggleClass("listed");
		$(this).parents('.press_item').children('.press_details').is(":hidden")      
		
			if ($(this).parents('.press_item').children('.press_details').is(":hidden")) {
				$(this).parents('.press_item').children('.press_details').slideDown("slow");
		  } else {
			$(this).parents('.press_item').children('.press_details').slideUp("slow");
		  }
		  evt.preventDefault();

	});
			
	$(".job_detail_toggle").click(function() {
		$(this).parents('.job_item').toggleClass("listed");
		$(this).parents('.job_item').children('.job_details').is(":hidden")      
		
			if ($(this).parents('.job_item').children('.job_details').is(":hidden")) {
				$(this).parents('.job_item').children('.job_details').slideDown("slow");
		  } else {
			$(this).parents('.job_item').children('.job_details').slideUp("slow");
		  }

	});
	
});
	
	
 
 
 
 
