  $(document).ready(function() {
	 //alert(jQuery.url.attr("file")); // returns 'http'
	 var file = jQuery.url.attr("file");
	 var findVal = "";
	 if (file == null)
	 {
		findVal = "a#index";
	 }
	 else
	 {
		 var fileName = file.split(".");
		 findVal = "a#" + fileName[0];
	 }
	 
	 var parent = $(findVal);
	 var grandParent = $(parent).parent();
	 grandParent.attr("id", "active");
  });

function changeImage(imgUrl,imgCaption)
{
	// Get the main picture
	var picture = document.getElementById('imgMainNews');
  	
	// If using IE,the picture will fade rather than change
	if (picture.filters)
  	{
		picture.style.filter="blendTrans(duration=1)";
		picture.filters.blendTrans.Apply();
	}
	
	// Change the image source to the new image selected.
	picture.src = imgUrl;
	if (picture.filters)
	{
		picture.filters.blendTrans.Play();
	}
	
	// Change the caption to that of the new image selected.
	document.getElementById('spanCaption').innerHTML=imgCaption;

}
