	cvi_reflex.defaultTilt = 'none'; //STR 'n|l|r'-'none|left|right'
	cvi_reflex.defaultHeight = 32; //INT 10-100 (%)
	cvi_reflex.defaultDistance = 0; //INT 0-100 (px)
	cvi_reflex.defaultTransparency = 50; //INT 1-100 (%)
	cvi_reflex.defaultBorder = 0; //INT 0-20 (px)
	cvi_reflex.defaultColor = '#ffffff'; //STR '#000000'-'#ffffff'
	cvi_reflex.defaultBoxmode = true; //BOOLEAN

$(document).ready(function() {
  // Handler for .ready() called.  
  
   var url = $.url();
	var thepath = url.attr('path'); 
	var thehost = url.attr('host');//Needed for IE
	
	//Determining if the current page should be styled differently in the nav
	if(thepath){
		var linkpath = '';
		$('#nav a').each(function() {
            linkpath = $(this).attr("href");
			//console.log(linkpath);
			if(linkpath == thepath || thehost+linkpath == thehost+thepath || linkpath == "/index.php" && thepath == "/" || linkpath == "/index.php" && thepath == ""){
				$(this).children().addClass("active");
				}else{
					$(this).children().addClass("reflex");
				};
        });
		};
  
  $(".active").each(function(){
	  cvi_reflex.add(this, {tilt: 'none', height:30, distance: 5 });
	  });


if(!$.browser.msie || $.browser.msie && $.browser.version > 7){	  
  $(".reflex").each(function() {
   cvi_reflex.add(this, {tilt:'right', height:30, distance: 5 }); 
	});
}else{
	$(".reflex").each(function() {
   cvi_reflex.add(this, {tilt:'none', height:30, distance: 5 }); 
	});
	}
		
$("#nav > a > span").bind({//Rollover called to next function so the reflect changes when rolling over the text.
	mouseover: function(){
		$(this).mousemove(function(e){
			$(this).prev(".reflex").trigger("mouseover");
		});
		},
	mouseout: function(){
		$(this).prev(".reflex").trigger("mouseout");
		}
	});

if(!$.browser.msie || $.browser.msie && $.browser.version > 8){
$(".reflex").hover(
  function () {
    cvi_reflex.modify(this, { tilt: 'none' });
  },
  function () {
    cvi_reflex.modify(this, { tilt: 'right' });
  }); 
}
	//Adjustment to the links in the nav per issues with linking the reflections with IE.
	$(".reflex, .active").bind("click", function(e){
		e.preventDefault();
		var linker = $(this).parent("a").attr("href");
		window.location = linker;
		$(this).children().bind("click", function(e){
			window.location = linker;
		});
	});

});
