// JavaScript Document

$(document).ready(function() {

	var idx = -1;
	var work = $('.work');
	var link = work.each(function(idx){
		$(this).html()
	});
	var workShow = $('#workShow');
	work.remove();
	$('#next').click(function(e) {
		e.preventDefault();
		idx++;
		if (idx === link.length) {
			idx = 0 };
		workShow.html(link[idx]);
		workShow.hide();
		workShow.fadeIn(1000);
	});
	$('#next').click();
	$('#prev').click(function(e) {
		e.preventDefault();
		idx--;
		if (idx < 0) {
			idx = link.length -1 };
		workShow.html(link[idx]);
		workShow.hide();
		workShow.fadeIn(1000);
	});
			
});	

	



