//Create Neighborhood Data Array
neighborhoods = new Array(7);
for (i = 0; i < neighborhoods.length; i++ ) {
	neighborhoods[i] = new Array(3);
}
neighborhoods [0] [0] = "Pine Creek";
neighborhoods [0] [1] = "Sammamish";
neighborhoods [0] [2] = "High $600,000s";
neighborhoods [0] [3] = "HomesofPineCreek.com";

neighborhoods [1] [0] = "Redmond Ridge East";
neighborhoods [1] [1] = "in Redmond";
neighborhoods [1] [2] = "$594,990";
neighborhoods [1] [3] = "RedmondRidgeEast.com";

neighborhoods [2] [0] = "Prescott at English Hill";
neighborhoods [2] [1] = "in Redmond";
neighborhoods [2] [2] = "$600,000's";
neighborhoods [2] [3] = "PrescottAtEnglishHill.com";

neighborhoods [3] [0] = "Greenbriar";
neighborhoods [3] [1] = "in Sammamish";
neighborhoods [3] [2] = "$619,990";
neighborhoods [3] [3] = "LivingAtGreenbriar.com";

neighborhoods [4] [0] = "Glencoe";
neighborhoods [4] [1] = "in Sammamish";
neighborhoods [4] [2] = "$600,000's";
neighborhoods [4] [3] = "GlencoeAtTrossachs.com";

neighborhoods [5] [0] = "Laurel Hill";
neighborhoods [5] [1] = "in Sammamish";
neighborhoods [5] [2] = "$600,000's";
neighborhoods [5] [3] = "NewHomesAtLaurelHill.com";

neighborhoods [6] [0] = "Pine Meadows";
neighborhoods [6] [1] = "in Sammamish";
neighborhoods [6] [2] = "$500,000's";
neighborhoods [6] [3] = "PineMeadowsInSammamish.com";



$(function() {  
    var $container = $('.pics').cycle({ 
			fx:    'fade', 
			speed:  5000, 
      pager:   '#slideshowNav', 
 		  pauseOnPagerHover: 1,
      pagerAnchorBuilder: pagerFactory,
			before:     function() {
					$('#captionNeighborhood').html(neighborhoods[this.alt][0]);
					$('#captionDescription').html(neighborhoods[this.alt][1] + " | From " + neighborhoods[this.alt][2]);
					$('#captionURL').html("<a href=\"http://" + neighborhoods[this.alt][3] + "\" >" + neighborhoods[this.alt][3] + "</a>");
			}
    }); 
 
    function pagerFactory(idx, slide) {
        var s = idx > 6 ? ' style="display:none"' : '';
        return '<li'+s+'><a href="#">&nbsp;</a></li>';
    };
 
}); 
