function show(a)
{
	$("#"+a).show();
}
function hide(a)
{
	$("#"+a).hide();
}

function setMenu(trig,a)
{
	for(i=0; i<1000; i++)
	{
		if(tec=document.getElementById(trig+'_'+i))
		{
        	if(tec.style.display!='none') hide(trig+'_'+i);
        }
	}

    show(trig+"_"+a);
}

function setMenuCar(a)
{
	for(i=1; i<1000; i++)
	{
		if(tec=document.getElementById('car_'+i))
		{
        	if(tec.style.display!='none') hide('car_'+i);
        }
       /* if(tec=document.getElementById('car_button_'+i))
		{
           if (cNum==0) tec.className='car_top'
		   else tec.className='car';
        }*/
	}

    show('car_'+a);
	if(d=document.getElementById('car_button_'+a))
	{
	  d.className='car_active';
	}
}

function setMenuClass(cNum)
{
	for(i=1; i<100; i++)
	{
	 if(tec=document.getElementById('car_button_'+i))
		{
           if (cNum==0) { tec.className='car_top'; break}
		   else tec.className='car';
        }
	}
}

function equalHeight(group) {
    tallest = 0;
    group.each(function() {
        thisHeight = $(this).height();
        if(thisHeight > tallest) {
        tallest = thisHeight;
        }
    });
    group.height(tallest);
}

$(document).ready(function() {
    equalHeight($(".lifestyle h3"));
    equalHeight($(".lifestyle_text"));

	
$(".picspage").click(function(event){
     event.preventDefault();
	 var bigpic = $(this).attr('rel');
     $(".mc_pic img").attr("src",bigpic);	 
   });	
});
