$(document).ready(function() {

	showCounter();

	$("a.imgZoom").fancybox({
		'zoomOpacity' : true,
		'overlayShow' : true,
		'zoomSpeedIn' : 'fast',
		'zoomSpeedOut' : 'fast',
		'transitionIn': 'elastic',
		'transitionOut': 'elastic'
	});
});



function toggleParagraph(obj_id){
	var header = $('h'+obj_id);
	if(header.className == 'minH')
	{
		Effect.BlindDown('p'+obj_id, { duration: 0.3 });
		header.className = 'minHCur';
	}
	else
	{
		Effect.BlindUp('p'+obj_id, { duration: 0.3 });
		header.className = 'minH';
	}
}
	
	
function closeParagraph(obj_id){
	Effect.BlindUp('p'+obj_id, { duration: 0.3 });
}



function viewParagraph(Obj_id, mode_obj_id){
	var itemObj = document.getElementById("tab" + Obj_id);
	var tableObj = document.getElementById("complictationDiv" + Obj_id);
	var tabs = document.getElementById('car_mode_tabs' + mode_obj_id).getElementsByTagName( 'div' );
	var span = document.getElementById('car_mode_tabs' + mode_obj_id).getElementsByTagName( 'span' );
	
	for( var i = 0 ; tabs.length > i; i++ )
		if(tabs[i].className == 'tabs_item_on')
			tabs[i].className = 'tabs_item_off';
	
	for( var i = 0 ; span.length > i; i++ )
		if(span[i].className == 'tabs_table_on')
			span[i].className = 'tabs_table_off';
	
	itemObj.className = 'tabs_item_on';
	tableObj.className = 'tabs_table_on';
}

function showCounter()
{
document.getElementById('footerCounter').innerHTML = '<a href="http://www.liveinternet.ru/click" '+
'target=_blank><img src="http://counter.yadro.ru/hit?t14.1;r'+
escape(document.referrer)+((typeof(screen)=='undefined')?'':
';s'+screen.width+'*'+screen.height+'*'+(screen.colorDepth?
screen.colorDepth:screen.pixelDepth))+';'+Math.random()+
'" alt="liveinternet.ru: iieacaii ?enei oeoia ca 24 ?ana, iinaoeoaeae ca 24 ?ana e ca naaiai\y" '+
'border=0 width=88 height=31></a>';
}
