var $j = jQuery.noConflict();

function hidediv(id) {
  $(id).addClassName('pr_hide');
}
function showdiv(id) {
  $(id).removeClassName('pr_hide');
  $('tagline').hide();
}
function showdiv2(id) {
  $(id).removeClassName('pr_hide');
}
function resetboxes() {
  hidediv("box1_ovr");
  hidediv("box2_ovr");
  hidediv("box3_ovr");
  showdiv2("box1");
  showdiv2("box2");
  showdiv2("box3");
}
function resetsubmenu() {
  hidediv("submenu_about");
  hidediv("submenu_services");
  hidediv("submenu_portfolio");
  hidediv("submenu_employees");
  hidediv("submenu_contact");
  hidediv("submenu_news");
  $('tagline').show();
}
function open_sidemenu(thing) {
  $$('#leftmenu ul ul').each(function(s) {
    if ($(thing).next('ul') != s) {
      $j(s).slideUp("fast");
    }
  });
  $j($(thing).next('ul')).slideDown("fast");
}

function update_img(url, title, text) {
  $j('#dyn_image div').html('<img src="../images/'+url+'" />');
  $j('#port_text_t').html(title);
  $j('#port_text').html(text);
}

$j(document).ready(function() {
	$j('#thumbs img').not($j('#thumbs img').eq(0)).addClass('porthover');
	$j('#thumbs img').not($j('#thumbs img').eq(0)).mouseover(function() {
		$j('#thumbs img').not($j('#thumbs img').eq(0)).each(function() {
			var i = $j(this).attr('src');
			var x = i.replace("_ovr","");
			$j(this).attr('src',x);
			
		});
		var i = $j(this).attr('src');
		var x = i.replace("_ovr","").replace(".gif","_ovr.gif").replace(".jpg","_ovr.jpg").replace(".jpeg","_ovr.jpeg");
		$j(this).attr('src',x);
	});
	$j('#thumbs img').eq(1).mouseover();
});
