
  window.addEvent("domready", function(){
					
    
   		$$('a.bn_link').each(function(item){
   		 new Element('img', {'src':'/show.php?id='+item.rel+'.jpg','alt':item.title}).inject(item,'inside'); 
       item.addEvent('click',function(e){
       new Event(e).stop();
       window.location.href='/goto.php?id='+item.rel;                 
       })
       })
    
         
    Nifty("div.roundedContent","big");  
    Nifty("div.roundedContent_bottom","bottom","big");
    
     			  
		$$('.content_nav li h1 a').each(function(item){applyShadow(item, '#000', 2)})
	
		
  if(!Browser.Engine.trident)  
    $$('.bay').each(function(item){
       
    	item.addEvent('mousedown', function(e) {
		item.setStyle('border', '1px inset #CCCCCC');
	});
	
	   	item.addEvent('mouseover', function(e) {
		item.setStyle('border', '1px outset #000');
	});

		  	item.addEvent('mouseout', function(e) {
		item.setStyle('border', '1px outset #CCCCCC');
	});
     	item.addEvent('mouseup', function(e) {
		item.setStyle('border', '1px outset #CCCCCC;');
	});
	


    })
									   });
  


function applyShadow(targetElement, shadowColor, shadowOffset) {
  if (typeof(targetElement) != 'object') {
    targetElement = $(targetElement);
  }
  var value = targetElement.firstChild.nodeValue;
  targetElement.style.position = 'relative';
  targetElement.style.zIndex = 1;
    
  var newEl = document.createElement('a');
  newEl.appendChild(document.createTextNode(value));
  newEl.className = 'shadowed';
  newEl.style.color = shadowColor;
  newEl.style.position = 'absolute';
  newEl.style.left = shadowOffset + 'px';
  newEl.style.top = shadowOffset - 13 + 'px';
  newEl.style.zIndex = -1;
  
  targetElement.appendChild(newEl);
}

