function gallery(imgPath){
    jQuery(".rotator3d").hide();
    jQuery('.galerey').show();
    var items = $$('.imagemain img') ;
    for (var i = 0; i < items.size(); i++) {
                items[i].writeAttribute("src", imgPath);
    }
}

function start3d(){
    jQuery('.galerey').hide();
    jQuery(".rotator3d").show();
}

function ckliсker(tab){
    $('t'+tab).onclick();
}
  
Event.observe(window, 'load', function() {
    var tabId = "";
    get = new String(window.location);
    x = get.indexOf("#");
    if(x != -1) {
        l = get.length;
        tabId = get.substr(x+4, l-x);
    }
    if(tabId == "") {
      tabId = 1;
    }
    var items = $$('a.tab') ;
    if(items.size() > 0) {
        tabChange(tabId);
        //jQuery('.pr_attr:first').click();
    }
});
jQuery(document).ready(function() {
  jQuery('.pr_attr:first').click();
});


function tabChange(tabId){
    var items = $$('a.tab') ;
    var col = items.size();
    for (var i = 0; i < items.size(); i++) {
                items[i].removeClassName('active');
    }
    $('t'+tabId).addClassName('active');
    var items = $$('section.tab') ;
    for (var i = 0; i < items.size(); i++) {
                items[i].removeClassName('shown');
    }
    $('tab'+tabId).addClassName('shown');
}

