jQuery(document).ready(function($){
      
    //on document load, set active
	
	//set base url for images (get SKIN_URL from head.phtml)
	var SKIN_URL = "http://www.keramikoskitchen.com/skin/frontend/default/Keramikos/";
	//alert(SKIN_URL);
	var srcRt = SKIN_URL+"images/menu_hover_rt.gif";
	var srcLt = SKIN_URL+"images/menu_hover_lt.gif";

	//alert(srcRt);	//test url path
	//alert(srcLt); //test url path
	
	//RT
	$("#nav li.active a span.spn-rt").css('background-image','url(' + srcRt +')');
	$("#nav li.active a span.spn-rt").css({ 'background-position' : 'right center', 'background-repeat' : 'repeat-x', 'display' : 'inline', 'height' : '36px', 'z-index' : 1});

	//LT	
	$("#nav li.active a span.spn-lt").css('background-image','url(' + srcLt +')');
	$("#nav li.active a span.spn-lt").css({'background-repeat' : 'no-repeat', 'display' : 'inline',  'z-index' : 11, 'height' : '36px', 'margin-top' : '-3px'});
	//alert("worked!");
	

    //onHover of each Menu item, set left and right backgaround (spn-lt && spn-rt)
	$("#nav li a").hover(
	  function() {	
  		//Get Unique Line Item TITLE attribute
		//$("#nav li a[@title=hoverText]").hover(
			$(this).addClass('hover');
		  var hoverText = $(this).attr("title");
		  //alert(hoverText);
		  
		  //Match ID so all `a` items don't get set (by @title attribute)
		  if (hoverText == hoverText) {
		  	//alert(hoverText);
			//$(this).find("spn-rt").text(hoverText);
			//$("#nav li a span.spn-rt").append("<em></em>");
			
			//REMOVE
			//if (($("#nav li a").attr("title")) == hoverText) { /*alert(hoverText)*/ }
			//if ($("#nav li a[@title]") == hoverText) { /*alert(hoverText)*/ }
			//alert($("#nav li a[@title='+hoverText+']"));
			
			//RT
			$("#nav li a.hover span.spn-rt").css('background-image','url(' + srcRt +')');
			$("#nav li a.hover span.spn-rt").css({'background-position' : 'right center', 'background-repeat' : 'repeat-x', 'display' : 'inline', 'height' : '36px', 'z-index' : 1});
		
			//LT
			$("#nav li a.hover span.spn-lt").css('background-image','url(' + srcLt +')');
			$("#nav li a.hover span.spn-lt").css({'background-repeat' : 'no-repeat', 'display' : 'inline',  'z-index' : 11, 'height' : '36px', 'margin-top' : '-3px'});
			//alert("worked!");
		  } else { /*alert("I'm sorry, didn't seem to work out..."); */ }
	  },
	  //REMOVE AFTER HOVER
	  function(){
		$(this).removeClass('hover');	
		$("#nav li a span.spn-rt").css({'background-image' : 'none'});
		$("#nav li a span.spn-lt").css({'background-image' : 'none'});
		
		//KEEP HOVER BACK ONTO ACTIVE TAB
		//RT
		$("#nav li.active a span.spn-rt").css('background-image','url(' + srcRt +')');
		$("#nav li.active a span.spn-rt").css({ 'background-position' : 'right center', 'background-repeat' : 'repeat-x', 'display' : 'inline', 'height' : '36px', 'z-index' : 1});
	
		//LT	
		$("#nav li.active a span.spn-lt").css('background-image','url(' + srcLt +')');
		$("#nav li.active a span.spn-lt").css({'background-repeat' : 'no-repeat', 'display' : 'inline',  'z-index' : 11, 'height' : '36px', 'margin-top' : '-3px'});
	    //alert("worked again!");
	  }
	);
      
  });