// call classes \\
var theImages = new Images();
var theInfo = new Info();
var galleryItem1 = new GalleryListClick(0);
var galleryItem2 = new GalleryListClick(1);
var galleryItem3 = new GalleryListClick(2);
var galleryItem4 = new GalleryListClick(3);
var galleryItem5 = new GalleryListClick(4);
var galleryItem6 = new GalleryListClick(5);
//var galleryItem7 = new GalleryListClick(6);
//.\\

// initial image \\
var num = Math.floor(Math.random() * 6);

with(theImages) {
	jQuery("#galleryImg").css({"background": "url("+ images[num] +") no-repeat"});
}
with(theInfo) {
	jQuery("#galleryInfo h2").html(title[num]);
	jQuery("#galleryInfo p").html(description[num]);
}
resetGalleryLinks();
jQuery("#galleryThumb"+ num +"").css({"border": "1px solid #FFF"});
//.\\

// declare classes \\
function Images() {
	this.images = new Array();
	this.images[0] = "http://ash-art.com/wp-content/themes/ash/images/home/gallery/beautifulpictureanaleese.jpg";
	this.images[1] = "http://ash-art.com/wp-content/themes/ash/images/home/gallery/noname.jpg";
	this.images[2] = "http://ash-art.com/wp-content/themes/ash/images/home/gallery/visitationsaturdaysunday.jpg";
	this.images[3] = "http://ash-art.com/wp-content/themes/ash/images/home/gallery/facingreality.jpg";
	this.images[4] = "http://ash-art.com/wp-content/themes/ash/images/home/gallery/shouldofcouldofwouldof.jpg";
	this.images[5] = "http://ash-art.com/wp-content/themes/ash/images/home/gallery/youllneedavisitorspass.jpg";
	//this.images[6] = "images/home/gallery/listen.jpg";
}
function Info() {
	this.title = new Array();
	this.title[0] = "Beautiful Picture Analeese";
	this.title[1] = "No Name";
	this.title[2] = "Visitation Is On Saturday And Sunday";
	this.title[3] = "Facing Reality";
	this.title[4] = "Should Of, Could Of, Would Of";
	this.title[5] = "You&rsquo;ll Need A Visitors Pass";
	this.description = new Array();
	this.description[0] = "Mixed media on canvas";
	this.description[1] = "Mixed media on canvas";
	this.description[2] = "Mixed media on canvas";
	this.description[3] = "Mixed media on canvas";
	this.description[4] = "Mixed media on canvas";
	this.description[5] = "Mixed media on canvas";
}
function GalleryListClick(num) {
	jQuery("#galleryThumb"+ num +"").click(function() {
		with(theImages) {
			jQuery("#galleryImg").css({"background": "url("+ images[num] +") no-repeat"});
		}
		with(theInfo) {
			jQuery("#galleryInfo h2").html(title[num]);
			jQuery("#galleryInfo p").html(description[num]);
		}
		resetGalleryLinks();
		jQuery("#galleryThumb"+ num +"").css({"border": "1px solid #FFF"});
	});
}
//.\\

// functions \\
function resetGalleryLinks() {
	jQuery("#galleryThumb0").css({"border": "1px solid #CCC"});
	jQuery("#galleryThumb1").css({"border": "1px solid #CCC"});
	jQuery("#galleryThumb2").css({"border": "1px solid #CCC"});
	jQuery("#galleryThumb3").css({"border": "1px solid #CCC"});
	jQuery("#galleryThumb4").css({"border": "1px solid #CCC"});
	jQuery("#galleryThumb5").css({"border": "1px solid #CCC"});
	//jQuery("#galleryThumb6").css({"border": "1px solid #FFF"});
}
//.\\