/*-------------------------------------------

Author : Irving Dela Cruz
URL : http://www.idelacruz.com

Navigator ver .1


*/


  $.fn.slides = function(settings) {
  		// $(this) = $(".slideScreenWrapper")
  		var root = $(this);
  		var slides = $(this).find(".featuredSlide");
		
		var dotsdef = "http://www.technotestinc.com/press/wp-content/themes/technotest.com/js/dotinactive.png";
		var dotsact = "http://www.technotestinc.com/press/wp-content/themes/technotest.com/js/dotactive.png";
		var dotContainer = slides.find(".dotsNav");
		var dotItem = [];
		
		var slideValue = 421;
		
		for(i = 0; i < slides.length; i++)
		{
			var atagopen = "<a id='dot" + i + "' href='"+ i +"' class='dot'>";
			$element = $(atagopen + "<img src='" + dotsdef + "' />" + "</a>");
			$element.appendTo($(this).find(".dotsNav"));
		}
		
		$(".dot").mouseover(function(){	
			$(this).find("img").attr("src",dotsact);			
		});
		
		$(".dot").mouseout(function(){
			$(this).find("img").attr("src",dotsdef);
		});
		
		root.find(".dot").click(function(){
			$(this).find("img").attr("src",dotsact);		
			var tweenValue = $(this).attr("href");			
			
			root.find(".slides").animate({
				 marginLeft : tweenValue * -slideValue + "px"
			});	
			
			
			return false;
		});
		
	
};

