/***********************************************
* Simple Controls Gallery- (c) Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for this script and 100s more
***********************************************/


//** Simple Controls Gallery- (c) Dynamic Drive DHTML code library: http://www.dynamicdrive.com
//** Dec 7th, 08'- Script created (Requires jquery 1.2.x)
//** February 6th, 09'- Updated to v 1.3:
	//1) Adds Description Panel to optionally show a textual description for each slide
	//2) In Auto Play mode, you can now set the number of cycles before gallery stops.
	//3) Inside oninit() and onslide(), keyword "this" now references the current gallery instance

var mygallery=new simpleGallery({
	wrapperid: "offer_gallery", //ID of main gallery container,
	dimensions: [462, 419], //width/height of gallery in pixels. Should reflect dimensions of the images exactly
	imagearray: [
		["http://www.sparshattsgroup.co.uk/images/homepage/kazashi.jpg", "http://www.sparshattsgroup.co.uk/offers/suzuki/newcars/", "", ""],
		["http://www.sparshattsgroup.co.uk/images/homepage/new-subaru-xv-beaulieu.jpg", "http://www.sparshattsgroup.co.uk/new-subaru-xv", "", ""],
		["http://www.sparshattsgroup.co.uk/images/homepage/subaru-500-part-ex.jpg", "http://www.sparshattsgroup.co.uk/offers/subaru/newcars/", "", ""],
		["http://www.sparshattsgroup.co.uk/images/homepage/mitsubishi-4x4-winter-range.jpg", "http://www.sparshattsgroup.co.uk/offers/mitsubishi/newcars/", "", ""],
		//["http://www.sparshattsgroup.co.uk/images/homepage/new-suzuki-alto.jpg", "http://www.sparshattsgroup.co.uk/offers/suzuki/newcars/", "", ""],
		//["http://www.sparshattsgroup.co.uk/images/homepage/new-suzuki-swift-vat-free.jpg", "http://www.sparshattsgroup.co.uk/offers/suzuki/newcars/", "", ""],  
		["http://www.sparshattsgroup.co.uk/images/homepage/new-legacy.jpg", "http://www.sparshattsgroup.co.uk/offers/subaru/newcars/", "", ""],
		["http://www.sparshattsgroup.co.uk/images/skoda/homepage/5-percent-VAT.jpg", "http://www.sparshattsgroup.co.uk/offers/skoda/newcars/", "", ""],
		["http://www.sparshattsgroup.co.uk/images/skoda/homepage/skoda-fabia-monte-carlo.jpg", "http://www.sparshattsgroup.co.uk/offers/skoda/newcars/", "", ""],
		["http://www.sparshattsgroup.co.uk/images/skoda/homepage/skoda-se-plus-range.jpg", "http://www.sparshattsgroup.co.uk/offers/skoda/newcars/", "", ""],
		["http://www.sparshattsgroup.co.uk/images/homepage/2.jpg", "http://www.sparshattsgroup.co.uk/service", "", ""],	
		["http://www.sparshattsgroup.co.uk/images/homepage/3.jpg", "http://www.sparshattsgroup.co.uk/contract-hire", "", ""]
		// No comma after last image	
	],
	autoplay: [true, 3000, 2], //[auto_play_boolean, delay_btw_slide_millisec, cycles_before_stopping_int]
	persist: false, //remember last viewed slide and recall within same session?
	fadeduration: 500, //transition duration (milliseconds)
	oninit:function(){ //event that fires when gallery has initialized/ ready to run
		//Keyword "this": references current gallery instance (ie: try this.navigate("play/pause"))
	},
	onslide:function(curslide, i){ //event that fires after each slide is shown
		//Keyword "this": references current gallery instance
		//curslide: returns DOM reference to current slide's DIV (ie: try alert(curslide.innerHTML)
		//i: integer reflecting current image within collection being shown (0=1st image, 1=2nd etc)
	}
})

