var current = 0;

function swapimg( show ){

	var piece = new Array();
	var title = new Array();
	var size = new Array();
	var meta = new Array();


	piece[0] = 'images/gallery/1.jpg';
	title[0] = 'Gombeen Men';
	size[0] = '24 X 36 - Pastel on Paper';
	meta[0] = 'Collection of B. Oslin Family';

	piece[1] = 'images/gallery/2.jpg';
	title[1] = 'Still Life with Serial Killer';
	size[1] = '5 ft. X 5 ft. - Acrylic on Canvas';
	meta[1] = '';

	piece[2] = 'images/gallery/3.jpg';
	title[2] = 'The Triumph of Capitalism Over Something';
	size[2] = '5 ft. X 6 ft. - Acrylic on Canvas';
	meta[2] = '';

	piece[3] = 'images/gallery/4.jpg';
	title[3] = 'Komsa Folk';
	size[3] = '24 X 36 - Pastel on Paper';
	meta[3] = 'Collection of B. Oslin Family';

	piece[4] = 'images/gallery/5.jpg';
	title[4] = 'Self Portrait with Demons';
	size[4] = '24 X 36 - Pastel on Paper';
	meta[4] = '';

	piece[5] = 'images/gallery/6.jpg';
	title[5] = 'Naked Monkeys Entering Jerusalem';
	size[5] = '5 ft. X 6 ft. - Acrylic on Canvas';
	meta[5] = '';

	piece[6] = 'images/gallery/7.jpg';
	title[6] = 'Revenant';
	size[6] = '24 X 36 - Pastel on Paper';
	meta[6] = 'Collection of L. Dickerson';

	piece[7] = 'images/gallery/8.jpg';
	title[7] = 'Spud';
	size[7] = '18 X 24 - Pastel on Paper';
	meta[7] = 'Private Collection';

	piece[8] = 'images/gallery/9.jpg';
	title[8] = 'Jesus in Pajamas';
	size[8] = '24 X 36';
	meta[8] = 'Private Collection';

	piece[9] = 'images/gallery/10.jpg';
	title[9] = 'Self Portrait of Someone Else';
	size[9] = '4 ft. X 5 ft. - Acrylic, Chalk, Crayon on Canvas';
	meta[9] = '';

	piece[10] = 'images/gallery/11.jpg';
	title[10] = 'Plato';
	size[10] = '18 X 24 - Crayon, Chalk on Paper';
	meta[10] = 'Collection of M. Graffin';

	piece[11] = 'images/gallery/12.jpg';
	title[11] = 'Cats and Dogs';
	size[11] = '16 X 24 - Pastel on Paper';
	meta[11] = 'Private Collection';

	piece[12] = 'images/gallery/13.jpg';
	title[12] = 'The Resultant Sorrow';
	size[12] = '5 ft. X 6 ft. - Acrylic and Chalk on Canvas';
	meta[12] = '';

	piece[13] = 'images/gallery/14.jpg';
	title[13] = 'Queue I';
	size[13] = '24 X 24 - Chalk on Paper';
	meta[13] = 'Private Collection';

	piece[14] = 'images/gallery/15.jpg';
	title[14] = 'Devil Music';
	size[14] = '5 ft. X 6 ft. - Acrylic on Canvas';
	meta[14] = '';

	piece[15] = 'images/gallery/16.jpg';
	title[15] = 'The Guy Who Ran Me Off of the 405 Freeway Offramp';
	size[15] = '30 X 40 - Acrylic on Canvas';
	meta[15] = 'Collection of K. Fenenbock';

	piece[16] = 'images/gallery/17.jpg';
	title[16] = 'La Victoria Coco Bongo';
	size[16] = '5 ft. X 6 ft. - Acrylic on Canvas';
	meta[16] = '';

	piece[17] = 'images/gallery/18.jpg';
	title[17] = 'The Prospect of Love';
	size[17] = '24 X 36 - Pastel on Paper';
	meta[17] = 'Collection of Mr. and Mrs. G. Graffin';

	piece[18] = 'images/gallery/19.jpg';
	title[18] = 'Queue II';
	size[18] = '24 X 36 - Charcoal on Paper';
	meta[18] = 'Private Collection';

	piece[19] = 'images/gallery/20.jpg';
	title[19] = 'Woman in Turban';
	size[19] = '20 X 20 - Pastel on Paper';
	meta[19] = 'Private Collection';

	piece[20] = 'images/gallery/21.jpg';
	title[20] = 'Big Cash Money Man';
	size[20] = '5 ft. X 5.5 ft. - Acrylic on Canvas';
	meta[20] = 'Collection of K. Bakst';

	piece[21] = 'images/gallery/22.jpg';
	title[21] = 'The Baptism of King Harald Bluetooth of Denmark by Bishop Poppo';
	size[21] = '5 ft.  X 5.5 ft. - Acrylic on Canvas';
	meta[21] = '';

	piece[22] = 'images/gallery/23.jpg';
	title[22] = 'Red Woman';
	size[22] = '22 X 24 - Charcoal and Watercolor on Paper';
	meta[22] = 'Private Collection';

	piece[23] = 'images/gallery/24.jpg';
	title[23] = 'Conflict';
	size[23] = '24 X 24 - Charcoal on Paper';
	meta[23] = 'Private Collection';

	piece[24] = 'images/gallery/25.jpg';
	title[24] = 'Higgs-Boson';
	size[24] = '24 X 24 - Charcoal on Paper';
	meta[24] = '';

	piece[25] = 'images/gallery/26.jpg';
	title[25] = 'Divertimento';
	size[25] = '24 X 36 - Pastel on Paper';
	meta[25] = 'Collection of Mr. and Mrs. G. Graffin';

	piece[26] = 'images/gallery/27.jpg';
	title[26] = 'Momma, Daddy, Sissy and Poo-Poo';
	size[26] = '40 X 30 - Acrylic on Canvas';
	meta[26] = 'Collection of K. Hatzold Family';

	piece[27] = 'images/gallery/28.jpg';
	title[27] = 'The Sin Eaters';
	size[27] = '4.5 ft. X 5 ft. - Acrylic, Chalk and Crayon on Canvas';
	meta[27] = '';

	piece[28] = 'images/gallery/29.jpg';
	title[28] = 'Mysterioso';
	size[28] = '4.5 ft. X 5 ft. - Acrylic, Chalk and Crayn on Canvas';
	meta[28] = '';

	piece[29] = 'images/gallery/30.jpg';
	title[29] = 'Black Sox';
	size[29] = '48 X 72  - Acrylic and Oil Pastel on Canvas';
	meta[29] = '';

	piece[30] = 'images/gallery/31.jpg';
	title[30] = 'Linoleum City';
	size[30] = '4.5 ft. X 6 ft. - Acrylic on Canvas';
	meta[30] = '';
	
	piece[31] = 'images/gallery/32.jpg';
	title[31] = 'Manny';
	size[31] = '52 X 58 - Acrylic on Canvas';
	meta[31] = '';

	piece[32] = 'images/gallery/33.jpg';
	title[32] = 'Mohammed Bonso Released';
	size[32] = '4.5 ft. X 5 ft. - Acrylic on Canvas';
	meta[32] = '';
	
	document.getElementById( 'featured' ).src = piece[show];
	document.getElementById( 'featured' ).alt = title[show];
	document.getElementById( 'featuretitle' ).innerHTML = title[show];
	document.getElementById( 'featuresize' ).innerHTML = size[show];
	document.getElementById( 'featuremeta' ).innerHTML = meta[show];
	
	for( i = 0; i < meta.length; i++ ){
		document.getElementById( 'item' + i ).style.opacity = '.5';
	}
	document.getElementById( 'item' + ( show ) ).style.opacity = '.99';
	
	current = ( show );
	
	if ( current == 0 ){
		document.getElementById( 'previous' ).style.display = 'none';
	}
	else{
		document.getElementById( 'previous' ).style.display = '';
	}
	if ( current == (meta.length - 1) ){
		document.getElementById( 'next' ).style.display = 'none';
	}
	else{
		document.getElementById( 'next' ).style.display = '';
	}
}


function next(){
	working = current;
	swapimg( working + 1 );
}

function previous(){
	working = current;
	swapimg( working - 1 );
}