var vc_orgTitle=26; 
var vc_orgLabel=25; 
var vc_orgHeight=157; 

addOnLoadEvent(function(){vc_prodbar_init()});

function vc_prodbar_init(){
 var titleHeight=vc_match_height('vc_prodbar_title');
 titleHeight=titleHeight?titleHeight:vc_orgTitle;

 if(titleHeight>vc_orgTitle){
  var nodes=document.getElementsByClassName('vc_prodbar_tab');
  for(i=0;i<nodes.length;i++){
   nodes[i].style.backgroundPosition='left '+(titleHeight-vc_orgTitle)+'px';
  }
  nodes=document.getElementsByClassName('vc_prodbar_over1');
  for(i=0;i<nodes.length;i++){
   nodes[i].style.top=titleHeight+'px';
  }
 }
 var labelHeight=vc_match_height('vc_prodbar_label');
 labelHeight=labelHeight?labelHeight:vc_orgLabel;
 if(labelHeight>vc_orgLabel){
  nodes=document.getElementsByClassName('vc_prodbar_over3');
  for(i=0;i<nodes.length;i++){
   nodes[i].style.height=((vc_orgHeight-vc_orgLabel)+labelHeight)+'px';
  }
 }
 var brow1=vc_match_height('vc_block_row1');
 var brow2=vc_match_height('vc_block_row2');
 if(!window.XMLHttpRequest){
  vc_prodbar_hover_init('vc_prodbar');
  vc_prodbar_hover_init('vc_prodbar_tab');
 }
}
function vc_match_height(n){
 var maxHeight=0;
 var divHeight=0;
 var nodes=document.getElementsByClassName(n);
 for(i=0;i<nodes.length;i++){
  if(nodes[i].offsetHeight){
   divHeight=nodes[i].offsetHeight;
  }else if(nodes[i].style.pixelHeight){
   divHeight=nodes[i].style.pixelHeight;
  }
  maxHeight=Math.max(maxHeight,divHeight);
 }
 for(i=0;i<nodes.length;i++){
  nodes[i].style.height=maxHeight+'px'; 
 }
 return maxHeight;
}
function vc_prodbar_hover_init(n){ 
 var nodes=document.getElementsByClassName(n);
 for(i=0;i<nodes.length;i++){
  vc_add_event(nodes[i],'mouseenter',vc_prodbar_hover_add(nodes[i],n));
 	vc_add_event(nodes[i],'mouseleave',vc_prodbar_hover_del(nodes[i],n));
 }
}
function vc_prodbar_hover_add(o,n){
 return function(){
  o.className+=' '+n+'_hover';
 }
}
function vc_prodbar_hover_del(o,n){
 return function(){
  eval('o.className=o.className.replace(/ '+n+'_hover/gi,\'\');');
 }
}
function vc_add_event(o,e,f){
 if(o.addEventListener){
  o.addEventListener(e,f,false);
 }else if(o.attachEvent){
  o.attachEvent("on"+e,f);
 }
}