function orderAddPart(){
	var flag = false;
	for (var i=1; i<=5; i++){
		var tr = $("TR#autopart_tr"+i);
		if ((!flag) && (tr.css('display')=="none")){
			flag = true;
			tr.show();
		}
	}
	//if (!flag) $('#autopart_add').hide();
}

function orderRemovePart(){
	var flag = false;
	for (var i=2; i<=5; i++){
		var tr = $("TR#autopart_tr"+i);
		if ((!flag) && (tr.css('display')!="none")){
			flag = true;
			tr.hide();
		}
	}
	//if (!flag) $('#autopart_remove').hide();
}


$(document).ready(function() {
				   
	$("input.name").each(function(){ if ($(this).attr('value')=='') $(this).addClass('tt'); }); 
	$("input.code").each(function(){ if ($(this).attr('value')=='') $(this).addClass('tt'); }); 
	$("input.col").each(function(){ if ($(this).attr('value')=='') $(this).addClass('tt'); }); 
	$("input.vin-cod").each(function(){ if ($(this).attr('value')=='') $(this).addClass('tt'); }); 
	$("input.y-name").each(function(){ if ($(this).attr('value')=='') $(this).addClass('tt'); }); 
	$("input.y-email").each(function(){ if ($(this).attr('value')=='') $(this).addClass('tt'); }); 
	$("input.y-phone").each(function(){ if ($(this).attr('value')=='') $(this).addClass('tt'); }); 
			
    $("input.name").focus(function(){
		if ($(this).attr('value')=='') $(this).removeClass('tt');
	}).blur(function(){
		if ($(this).attr('value')=='') $(this).addClass('tt');
	});
	
	$("input.code").focus(function(){
		if ($(this).attr('value')=='') $(this).removeClass('tt');
	}).blur(function(){
		if ($(this).attr('value')=='') $(this).addClass('tt');
	});
	
	$("input.vin-cod").focus(function(){
		if ($(this).attr('value')=='') $(this).removeClass('tt');
	}).blur(function(){
		if ($(this).attr('value')=='') $(this).addClass('tt');
	});
	
	$("input.y-name").focus(function(){
		if ($(this).attr('value')=='') $(this).removeClass('tt');
	}).blur(function(){
		if ($(this).attr('value')=='') $(this).addClass('tt');
	});
	
	$("input.y-email").focus(function(){
		if ($(this).attr('value')=='') $(this).removeClass('tt');
	}).blur(function(){
		if ($(this).attr('value')=='') $(this).addClass('tt');
	});
	
	$("input.y-phone").focus(function(){
		if ($(this).attr('value')=='') $(this).removeClass('tt');
	}).blur(function(){
		if ($(this).attr('value')=='') $(this).addClass('tt');
	});
	
	$("input.col").focus(function(){
		if ($(this).attr('value')=='') $(this).removeClass('tt');
	}).blur(function(){
		if ($(this).attr('value')=='') $(this).addClass('tt');
	});

	$(".corners").append("<i class='tl'></i><i class='tr'></i><i class='br'></i><i class='bl'></i>");

	$('.marks li').hover(function()	{
		$('.marks li').removeClass('selected');
		$(this).addClass('selected');
	},function (){});
	
	$('.mark1').hover(function()	{
		$('.models').hide();
		$('.model1').show();
	},function (){});
	
	$('.mark2').hover(function()	{
		$('.models').hide();
		$('.model2').show();
	},function (){});
	
	$('.mark3').hover(function()	{
		$('.models').hide();
		$('.model3').show();
	},function (){});
	
	$('.mark4').hover(function()	{
		$('.models').hide();
		$('.model4').show();
	},function (){});
	
	$('.mark5').hover(function()	{
		$('.models').hide();
		$('.model5').show();
	},function (){});


});



