var imagesJSON = {"images": [
	{"href": "tutorsource-01.jpg", "src": "tutorsource-01.jpg", "alt": "TutorSource Dashboard", "title": "TutorSource", "desc": "<h5>Dashboard</h5><p>HTML and CSS. Ruby on Rails-based web application to helping tutors and students find each other.</p>", "site": "http://www.tutorsource.com"},
	{"href": "tutorsource-02.jpg", "src": "tutorsource-02.jpg", "alt": "TutorSource Search Results", "title": "TutorSource", "desc": "<h5>Search Results</h5><p>HTML and CSS. Ruby on Rails-based web application to helping tutors and students find each other.</p>", "site": "http://www.tutorsource.com"},
	{"href": "shucks-01.jpg", "src": "shucks-01.jpg", "alt": "Shucks Tavern Front Page", "title": "Shucks Tavern", "desc": "<h5>Front Page</h5><p>HTML, CSS, and jQuery-powered Javascript to create a site for a Las Vegas based restaurant and pub with gaming.</p>", "site": "http://www.shuckstavern.com"},
	{"href": "shucks-02.jpg", "src": "shucks-02.jpg", "alt": "Shucks Tavern Contact Page", "title": "Shucks Tavern", "desc": "<h5>Contact Page</h5><p>Three AJAX-driven contact forms. The rest of the site is powered by JSON as well for editable areas.</p>", "site": "http://www.shuckstavern.com"},
	{"href": "mercantila-01.jpg", "src": "mercantila-01.jpg", "alt": "Mercantila Front Page", "title": "Mercantila", "desc": "<h5>Front Page</h5><p>Template-driven HTML, some CSS for styling and some Javascript. Based on offshore-developed code. Built a site-specific banner engine for having custom banners on any of the 300+ sites served by the same templates.</p>", "site": "http://www.mercantila.com"},
	{"href": "mercantila-02.jpg", "src": "mercantila-02.jpg", "alt": "Mercantila Product Page", "title": "Mercantila", "desc": "<h5>Product Page</h5><p>Product pages were a horrible mess of nested HTML and inline styles. Still are but vastly cleaned up.</p>", "site": "http://www.mercantila.com"},
	{"href": "roger-thomas-01.jpg", "src": "roger-thomas-01.jpg", "alt": "Roger Thomas Portfolio Page", "title": "The Roger Thomas Collection", "desc": "<h5>Portfolio Page</h5><p>AJAX-powered gallery of products, their descriptions, prices, and where they can be purchased. Pulls from an XML 'database' through jQuery and PHP.</p>", "site": "http://www.therogerthomascollection.com"},
	{"href": "roger-thomas-02.jpg", "src": "roger-thomas-02.jpg", "alt": "Roger Thomas Press Page", "title": "The Roger Thomas Collection", "desc": "<h5>Press Gallery</h5><p>Again, jQuery, PHP and XML to present where Roger Thomas has been mentioned in press, the cover, and a link to a PDF of the article.</p>", "site": "http://www.therogerthomascollection.com"},
	{"href": "gtr-01.jpg", "src": "gtr.jpg", "alt": "GTR Front Page", "title": "Greater Tulsa Reporter Newspaper", "desc": "<h5>Front Page</h5><p>Largest free newspaper in Oklahoma. Site is backed by a PHP CMS that allows stories and images to be easily added. Also included a rudimentary ad management system.</p>", "site": "http://www.gtrnews.com"},
	{"href": "planet-hollywood-01.jpg", "src": "planet-hollywood-01.jpg", "alt": "Planet Hollywood Navigation", "title": "Planet Hollywood Resort &amp; Casino", "desc": "<h5>Navigation</h5><p>Client was sold on a Flash navigation but we persuaded them to try a Javascript-driven menu instead. Using source-existing markup (nothing added through Javascript), we kept the site accessible to screenreaders and bots, and with a bit of polish from an effects library, gave the client the look and feel they wanted.</p>", "site": "http://www.planethollywoodresort.com"},
	{"href": "planet-hollywood-02.jpg", "src": "planet-hollywood-02.jpg", "alt": "Planet Hollywood Signup", "title": "Planet Hollywood Resort &amp; Casino", "desc": "<h5>Sign-up Form</h5><p>The client needed a way to collect names and other details about visitors that wanted to be included in mailings, promotions, and the player's club. A CSS-styled form provided the front-end which was captured by PHP on the backend, formatted, and prepared in a ready-to-use format for the client's administration team.</p>", "site": "http://www.planethollywoodresort.com"},
	{"href": "the-august-01.jpg", "src": "the-august.jpg", "alt": "The August logo/masthead", "title": "The August", "desc": "<p>Wordpress-powered blog for my wife. Design, graphics, and layout were all my creation.</p>", "site": "http://www.the-august.com"},
	{"href": "palms-place-01.jpg", "src": "palms-place-01.jpg", "alt": "Palms Place Room Page", "title": "Palms Place", "desc": "<h5>Accommodation Page</h5><p>Another example of giving the client a better option. Javascript-powered menu allows bots and less-abled visitors to still read the site but provides the client with the visual impact they desired. The accommodations pages also included a Javascript-powered slideshow reducing the total Flash impact on the site.</p>", "site": "http://www.palmsplace.com"},
	{"href": "palms-place-02.jpg", "src": "palms-place-02.jpg", "alt": "Palms Place Booking Widget", "title": "Palms Place", "desc": "<h5>Booking Widget</h5><p>Small detail, yes, but a huge source of leads for the client. Ties into a third-party room booking service and offers some basic client-side validation.</p>", "site": "http://www.palmsplace.com"},
]}

var pos = 0;

function changeImage(pos) {
	$("#slideshow-images img").hide();
	$("#slideshow-images a").attr("href", "/img/"+imagesJSON['images'][pos]['href']);
	$("#slideshow-images img:eq("+pos+")")
		// .attr("src", "/img/slideshow/"+imagesJSON['images'][pos]['src'])
		.attr("alt", imagesJSON['images'][pos]['alt'])
		.show();
	$("#slideshow-text h4").html(imagesJSON['images'][pos]['title']);
	$("#slideshow-desc").html(imagesJSON['images'][pos]['desc']);
	$("#slideshow-visit a").attr("href", imagesJSON['images'][pos]['site']);
}

$(document).ready(function(){
	changeImage(pos);
	
	$("#slideshow-prev").click(function(){
		if (pos == 0) { pos = imagesJSON['images'].length-1; } else { pos = pos-1; }
		changeImage(pos);
	});
	
	$("#slideshow-next").click(function(){
		if (pos == imagesJSON['images'].length-1) { pos = 0; } else { pos = pos+1; }
		changeImage(pos);
	});
});