// JavaScript Document

<!-- Get page ID from URL -->
var myPage=location.pathname;

myPage=myPage.substring(myPage.lastIndexOf("/")+1,myPage.lastIndexOf("/")+6);

switch(myPage) {
		case "index":
		colorShift(myPage); myPage=0; break;
		case "servi":
		colorShift(myPage);	myPage=1; break;
		case "produ":
		colorShift(myPage);	myPage=2; break;
		case "scree":
		colorShift(myPage);	myPage=3; break;
		case "proje":
		colorShift(myPage);	myPage=4; break;
		case "conta":
		colorShift(myPage);	myPage=5; break;
}

<!-- Select current page identifier -->
function colorShift(pageID) {
  var thisPage=document.getElementsByName(pageID);
  thisPage[0].id="selected";
  return;
}
<!-- Main navi cursor starting position and flow -->
$(function() {
      $('ul#menu').lavaLamp({startItem: parseInt(myPage)});
})
<!-- Left side navi cursor starting position and flow -->

$(function() {
      $('ul#menu_3').lavaLamp({startItem: parseInt('$num')});
})
