$(document).ready(function ()
{
	var $urls_list = new Array('/|index.html',
						       '/products/|/products|/products/index.html|/products/workstation-edition.html|/products/gateway-edition.html|/products/screen-recording-edition.html|/partners/sdk-marketing.html|/download_iframe.html|/video_demo.html|/products/compare-editions.html|/products/remote-control-software.html|/products/remote-management-software.html|/products/remote-access-software.html|/products/testimonials.html|/products/compliance-hipaa.html|/products/compliance-itil.html|/products/compliance-glba.html|/products/compliance-fips.html',
						       '/store/|/store|/store/index.html|/get-quote.html',
							   '/partners|/partners/|/partners/index.html|/partners/oem-partners.html|/partners/channel-partners.html',
						       '/company|/company/|/company/index.html|/company/careers.html|/company/news.html|/company/pr/20081203.html|/company/pr/20100728.html|/company/pr/20100129.html|/company/pr/20091029.html|/company/pr/20090624.html|/company/pr/20090528.html',
						       '/support|/support/|/support/index.html|/support/open-support-ticket.html|/support/faqs.html',
						       '/contact|/contact/|/contact/index.html');

	var $current_url = $(location).attr('pathname');
	for(i=0; i<$urls_list.length; i++)
	{
		var $current_sub = $urls_list[i].split('|');
		for(j=0; j<$current_sub.length; j++)
		{
			if($current_sub[j] == $current_url)
			{
//				alert(i);
				if(i == 0)
				{
					$("#menu_identity").children("ul").children("li:nth-child("+(i+1)+")").removeClass("first").addClass("first_current");
					break;
				}
				else if(i == 6)
				{
					$("#menu_identity").children("ul").children("li:nth-child("+(i+1)+")").removeClass("last").addClass("last_current");
					break;
				}
				else
				{
					$("#menu_identity").children("ul").children("li:nth-child("+(i+1)+")").addClass('current');
					break;
				}
			}
		}
	}
});
