// -----------------------------------------------------------//
//               Screenshots Inline Galleries                 //
//             Displayed on each Portfolio Post               //
// -----------------------------------------------------------//

window.addEvent('domready',function() {
	
// -------------------- Key West Boats --------------------- //
	var elm = $('keywest'); if (elm) {
		var A1 = new viewer($('keywest').getChildren(),{
			onWalk: function(current_index){
				keywest.removeClass('active');
				keywest[current_index].addClass('active');
			}
		});
		var keywest = $$('#keywest-links span');
		keywest.each(function(el,i){el.addEvent('click',A1.walk.bind(A1,[i,false]));});
	}
	
	
// ---------------------- Rocky Tops ----------------------- //
	var elm = $('rockytops'); if (elm) {
		var A2 = new viewer($('rockytops').getChildren(),{
			onWalk: function(current_index){
				rockytops.removeClass('active');
				rockytops[current_index].addClass('active');
			}
		});
		var rockytops = $$('#rockytops-links span');
		rockytops.each(function(el,i){el.addEvent('click',A2.walk.bind(A2,[i,false]));});
	}
	
	
// ----------------- InnerSpace Flooring ------------------- //
	var elm = $('innerspace'); if (elm) {	
		var A3 = new viewer($('innerspace').getChildren(),{
			onWalk: function(current_index){
				innerspace.removeClass('active');
				innerspace[current_index].addClass('active');
			}
		});
		var innerspace = $$('#innerspace-links span');
		innerspace.each(function(el,i){el.addEvent('click',A3.walk.bind(A3,[i,false]));});
	}	
		
	
// ----------------- Hosting Outfitters -------------------- //
	var elm = $('hostingoutfitters'); if (elm) {	
		var A4 = new viewer($('hostingoutfitters').getChildren(),{
			onWalk: function(current_index){
				hostingoutfitters.removeClass('active');
				hostinfoutfitters[current_index].addClass('active');
			}
		});
		var hostingoutfitters = $$('#hostingoutfitters-links span');
		hostingoutfitters.each(function(el,i){el.addEvent('click',A4.walk.bind(A4,[i,false]));});
	}


// ---------------------- Filinski ------------------------ //
	var elm = $('filinski'); if (elm) {	
		var A5 = new viewer($('filinski').getChildren(),{
			onWalk: function(current_index){
				filinski.removeClass('active');
				filinski[current_index].addClass('active');
			}
		});
		var filinski = $$('#filinski-links span');
		filinski.each(function(el,i){el.addEvent('click',A5.walk.bind(A5,[i,false]));});
	}
	
	
// -------------------- Scott Baskin ---------------------- //
	var elm = $('scottbaskin'); if (elm) {	
		var A6 = new viewer($('scottbaskin').getChildren(),{
			onWalk: function(current_index){
				scottbaskin.removeClass('active');
				scottbaskin[current_index].addClass('active');
			}
		});
		var scottbaskin = $$('#scottbaskin-links span');
		scottbaskin.each(function(el,i){el.addEvent('click',A6.walk.bind(A6,[i,false]));});
	}
	
	
// ------------------ Motocross Files -------------------- //
	var elm = $('motocrossfiles'); if (elm) {	
		var A7 = new viewer($('motocrossfiles').getChildren(),{
			onWalk: function(current_index){
				motocrossfiles.removeClass('active');
				motocrossfiles[current_index].addClass('active');
			}
		});
		var motocrossfiles = $$('#motocrossfiles-links span');
		motocrossfiles.each(function(el,i){el.addEvent('click',A7.walk.bind(A7,[i,false]));});
	}
	
	
// ---------------------- MacMod ------------------------ //
	var elm = $('macmod'); if (elm) {	
		var A8 = new viewer($('macmod').getChildren(),{
			onWalk: function(current_index){
				macmod.removeClass('active');
				macmod[current_index].addClass('active');
			}
		});
		var macmod = $$('#macmod-links span');
		macmod.each(function(el,i){el.addEvent('click',A8.walk.bind(A8,[i,false]));});
	}
	
// --------------------- Laserturf ----------------------- //
	var elm = $('laserturf'); if (elm) {	
		var A9 = new viewer($('laserturf').getChildren(),{
			onWalk: function(current_index){
				laserturf.removeClass('active');
				laserturf[current_index].addClass('active');
			}
		});
		var laserturf = $$('#laserturf-links span');
		laserturf.each(function(el,i){el.addEvent('click',A9.walk.bind(A9,[i,false]));});
	}	
	
// --------------- Commerce Dental Group ----------------- //
	var elm = $('commercedentalgroup'); if (elm) {	
		var A10 = new viewer($('commercedentalgroup').getChildren(),{
			onWalk: function(current_index){
				commercedentalgroup.removeClass('active');
				commercedentalgroup[current_index].addClass('active');
			}
		});
		var commercedentalgroup = $$('#commercedentalgroup-links span');
		commercedentalgroup.each(function(el,i){el.addEvent('click',A10.walk.bind(A10,[i,false]));});
	}
	
// ----------------------- Rasbo ------------------------ //
	var elm = $('rasbo'); if (elm) {	
		var A11 = new viewer($('rasbo').getChildren(),{
			onWalk: function(current_index){
				rasbo.removeClass('active');
				rasbo[current_index].addClass('active');
			}
		});
		var rasbo = $$('#rasbo-links span');
		rasbo.each(function(el,i){el.addEvent('click',A11.walk.bind(A11,[i,false]));});
	}
	
});