// JavaScript Document
function clRus() {
  var menu=$$('#langs a');
  menu.each(function(a){
	var h=location.pathname;
	h=h.replace(/^\//,'');
    a.href+=h;
  });
}
function clEng() {
  var menu=$$('#langs a');
  menu.each(function(a){
    //a.href+=location.pathname;
	var h=location.pathname;
	h=h.replace(/\/eng\//,'');
	a.href+=h;
  });
}

window.addEvent('domready', function() {
  var menu=$$('.menu a');
  menu.each(function(a){/*alert(a.href);*/if (a.href==location.href || a.href==location.href+'index.html') a.addClass('current')});
  //alert(menu);
  //alert(location.pathname);
  var langs=$$('#langs a');
  langs.each(function(a){
    if (a.href==location.href) a.addClass('current')
  });
  var langs=$$('#gallery a');
  langs.each(function(a){
    a.rel="milkbox[gal]";
	var t=a.getChildren().get('alt'); //alert(t.get('alt'));
	/*var h='';
	for (n in t) h+='<b>'+n+'</b> = '+t[n]+'<br>';
	$('log').set('html',h);*/
	if (t) a.title=t;
  });
  
  
});
