/**
 * @author Kiril
 */

var apurl = 'http://vegercar.com/';

function swapImage( imgId, swapImg, over )
{
    if ( over == true )
    {
        document.getElementById(imgId).src = apurl + 'images/' + swapImg + '_over.jpg';
    } else {
        document.getElementById(imgId).src = apurl + 'images/' + swapImg + '.jpg';
    }
}

function swapCarImage( imgId, newImg )
{
	document.getElementById(imgId).src = apurl + 'uploads/cars/t2/' + newImg;
}

function toggleBlock(id) {
   var e = document.getElementById(id);
   if(e.style.display == 'block') {
      e.style.display = 'none';
	  var ls = document.getElementById('lsWrapper');
	  if ( ls != null ) ls.style.display = 'block';
   } else{
      e.style.display = 'block';
   	  var ls = document.getElementById('lsWrapper');
	  if ( ls != null ) ls.style.display = 'none';
      e.focus();
    }
}

  function openMore(id) {
    var disp = jQuery('#supExtras_'+id).css('display');
    if ( disp == 'block' ) {
      jQuery('#supExtras_'+id).slideUp();
    } else {
      jQuery('#supExtras_'+id).slideDown();  
    }
    return false;
  }
  
