//incl. .js
if (window.jsPath == null)
var jsPath = "scripts/";
document.write('<scr'+'ipt type="text/javascript" src="' + jsPath + 'jquery.js"><\/scr'+'ipt>');

function show(link, elem) {
  $(".gallery a").each(function() {
    $(this).removeClass('active');
  });
  
  $(link).addClass('active');
  
  $(".description").each(function() {
    $(this).addClass('inactive');
  });
  
  $(".photos").each(function() {
    $(this).addClass('inactive');
  });
  
  $("#"+elem).removeClass('inactive');
  $("#"+elem+"_txt").removeClass('inactive');
  
}

function tabFixIe6() {
  if($.browser.msie && $.browser.version == '6.0') {
    $('#tabs li').each(function() {
      if($(this).hasClass('active')) {
        $(this).addClass($(this).attr('class').replace(" ", "_")); 
        $(this).removeClass('active');
      } 
    })
  }
 
}

//DOM loader, Dean Edwards/Matthias Miller/John Resig
function init() {
  if (arguments.callee.done) return;
  arguments.callee.done = true;
  if (_timer) clearInterval(_timer);

  
  
  tabFixIe6();  
  
  
   
	try {document.execCommand('BackgroundImageCache', false, true);} catch(e) {};
};

if (document.addEventListener) {
  document.addEventListener("DOMContentLoaded", init, false);
}
// for Internet Explorer (using conditional comments)
/*@cc_on @*/
/*@if (@_win32)document.write("<script id=__ie_onload defer src=javascript:void(0)><\/script>");
var script = document.getElementById("__ie_onload");
script.onreadystatechange = function() {    
  if (this.readyState == "complete") {        
    init();  
  }
};
/*@end @*/
if (/WebKit/i.test(navigator.userAgent)) {  
var _timer = setInterval(function() {        
  if (/loaded|complete/.test(document.readyState)) {            
    clearInterval(_timer); init();}}, 10);
};

window.onload = init;

