$(document).ready(
		function() {
			var A = location.href.split("?")[0];
			$("div.n_Main_Navigation.navigation ul")
					.each(function() {
						var B = $(this);
						var C = false;
						B.find("a").each(function() {
							var D = this.href.split("?")[0];
							var pos1 = this.href.lastIndexOf("/");
							//get the url minus the page name
							var url = this.href.substring(0,pos1+1);
							D = url;
							//get rid of http://
							url  = url.substring(8);
							//get rid of the domain
							pos1 = url.indexOf("/");
							url = url.substring(pos1);
							if (url.length > 4 && A.indexOf(url) != -1) {
								if (A.indexOf(D) != -1) {
									$(this).parent().addClass("selected");
									C = true;
									if (A == D) {
										$(this).removeAttr("href")
									} else {
										$(this).css("cursor", "pointer")
									}
								}
							}
						});
						if (!C) {
							B.find("a").eq(0).parent().addClass("selected")
						}
					})
			// JAVASCRIPT FOR SINGLE MODULES
		   // remove span tags in accordion put there by Tridion
			var acc = $(".accordionList");

			$('.accordionList li').each(function(i) {
				var innerHtml = $(this).children('span').html();
				if (innerHtml != null)
				{ 
					$(this).children('span').remove();
					$(this).html(innerHtml);
				}
			});
			
			// event for linde share
		  $('.tab').click(function() {
			var graphName = this.className.match(/\bgraph-\w+\b/);
			$('.m_Info_Feed_Tab li.selected').removeClass('selected');
			$(this).parent().addClass("selected");
			$('.graph').attr('src', $('#' + graphName).text());
			return false;
		  });
		  

		});
		

