// Video Slider
$(document).ready(function(){	
	$("#videoSlider").easySlider();
});


// Accordian Div Toggle
function toggleByClass(className) {
   	$("."+className).toggle(350);
}
	

// Accordian Div Collapse All	
function showonlyone(thechosenone) {
	$('section[name|="toggleArea"]').each(function(index) {
		if ($(this).attr("id") == thechosenone) {
        	//$(this).show(200);
          	}
        else {
            $(this).hide(450);
          	}
     });
}


// Verticle Slider
$(document).ready(function() {

	$('a.panel').click(function () {

		$('a.panel').removeClass('selected');
		$(this).addClass('selected');
		
		current = $(this);
				
		$('#vslider').scrollTo($(this).attr('href'), 500);		
		
		return false;
	});
	
	$(window).resize(function () {
		resizePanel();
	});
	
});

function resizePanel() {

	width = $(window).width();
	height = $(window).height();

	vslidermask_height = height * $('.vslideritem').length;
		
	$('#debug').html(width  + ' ' + height + ' ' + vslidermask_height);
	
	$('#vslider, .vslideritem').css({width: width, height: height});
	$('#vslidermask').css({width: width, height: vslidermask_height});
	$('#vslider').scrollTo($('a.selected').attr('href'), 0);
}
	

// Fadeshow
var mygallery9=new fadeSlideShow({
	wrapperid: "fadeshow9", //ID of blank DIV on page to house Slideshow
	dimensions: [340, 501], //width/height of gallery in pixels. Should reflect dimensions of largest image
	imagearray: [
		["images/outofleft_1.jpg"],
		["images/outofleft_2.jpg"],
		["images/outofleft_3.jpg"] //<--no trailing comma after very last image element!
	],
	displaymode: {type:'manual', pause:2500, cycles:0, wraparound:false},
	persist: false, //remember last viewed slide and recall within same session?
	fadeduration: 500, //transition duration (milliseconds)
	descreveal: "always",
	togglerid: "fadeshow9toggler"
})

var mygallery8=new fadeSlideShow({
	wrapperid: "fadeshow8", //ID of blank DIV on page to house Slideshow
	dimensions: [535, 401], //width/height of gallery in pixels. Should reflect dimensions of largest image
	imagearray: [
		["images/365_1.jpg"],
		["images/365_2.jpg"],
		["images/365_3.jpg"],
		["images/365_4.jpg"],
		["images/365_5.jpg"],
		["images/365_6.jpg"] //<--no trailing comma after very last image element!
	],
	displaymode: {type:'manual', pause:2500, cycles:0, wraparound:false},
	persist: false, //remember last viewed slide and recall within same session?
	fadeduration: 500, //transition duration (milliseconds)
	descreveal: "always",
	togglerid: "fadeshow8toggler"
})

var mygallery7=new fadeSlideShow({
	wrapperid: "fadeshow7", //ID of blank DIV on page to house Slideshow
	dimensions: [535, 428], //width/height of gallery in pixels. Should reflect dimensions of largest image
	imagearray: [
		["images/cards_1.jpg"],
		["images/cards_2.jpg"],
		["images/cards_3.jpg"],
		["images/cards_4.jpg"],
		["images/cards_5.jpg"],
		["images/cards_6.jpg"],
		["images/cards_7.jpg"],
		["images/cards_8.jpg"] //<--no trailing comma after very last image element!
	],
	displaymode: {type:'manual', pause:2500, cycles:0, wraparound:false},
	persist: false, //remember last viewed slide and recall within same session?
	fadeduration: 500, //transition duration (milliseconds)
	descreveal: "always",
	togglerid: "fadeshow7toggler"
})

var mygallery6=new fadeSlideShow({
	wrapperid: "fadeshow6", //ID of blank DIV on page to house Slideshow
	dimensions: [535, 325], //width/height of gallery in pixels. Should reflect dimensions of largest image
	imagearray: [
		["images/williamgray_1.jpg"],
		["images/williamgray_2.jpg"],
		["images/williamgray_3.jpg"]//<--no trailing comma after very last image element!
	],
	displaymode: {type:'manual', pause:2500, cycles:0, wraparound:false},
	persist: false, //remember last viewed slide and recall within same session?
	fadeduration: 500, //transition duration (milliseconds)
	descreveal: "always",
	togglerid: "fadeshow6toggler"
})

var mygallery5=new fadeSlideShow({
	wrapperid: "fadeshow5", //ID of blank DIV on page to house Slideshow
	dimensions: [535, 400], //width/height of gallery in pixels. Should reflect dimensions of largest image
	imagearray: [
		["images/sweethearts_1.jpg"],
		["images/sweethearts_2.jpg"],
		["images/sweethearts_3.jpg"],
		["images/sweethearts_4.jpg"],
		["images/sweethearts_5.jpg"],
		["images/sweethearts_6.jpg"],
		["images/sweethearts_7.jpg"] //<--no trailing comma after very last image element!
	],
	displaymode: {type:'manual', pause:2500, cycles:0, wraparound:false},
	persist: false, //remember last viewed slide and recall within same session?
	fadeduration: 500, //transition duration (milliseconds)
	descreveal: "always",
	togglerid: "fadeshow5toggler"
})

var mygallery4=new fadeSlideShow({
	wrapperid: "fadeshow4", //ID of blank DIV on page to house Slideshow
	dimensions: [535, 325], //width/height of gallery in pixels. Should reflect dimensions of largest image
	imagearray: [
		["images/aol1.jpg"],
		["images/aol2.jpg"],
		["images/aol3.jpg"] //<--no trailing comma after very last image element!
	],
	displaymode: {type:'manual', pause:2500, cycles:0, wraparound:false},
	persist: false, //remember last viewed slide and recall within same session?
	fadeduration: 500, //transition duration (milliseconds)
	descreveal: "always",
	togglerid: "fadeshow4toggler"
})

var mygallery3=new fadeSlideShow({
	wrapperid: "fadeshow3", //ID of blank DIV on page to house Slideshow
	dimensions: [535, 358], //width/height of gallery in pixels. Should reflect dimensions of largest image
	imagearray: [
		["images/Pavement_1.jpg"],
		["images/Pavement_2.jpg"],
		["images/Pavement_3.jpg"],
		["images/Pavement_4.jpg"] //<--no trailing comma after very last image element!
	],
	displaymode: {type:'manual', pause:2500, cycles:0, wraparound:false},
	persist: false, //remember last viewed slide and recall within same session?
	fadeduration: 500, //transition duration (milliseconds)
	descreveal: "always",
	togglerid: "fadeshow3toggler"
})

var mygallery2=new fadeSlideShow({
	wrapperid: "fadeshow2", //ID of blank DIV on page to house Slideshow
	dimensions: [340, 468], //width/height of gallery in pixels. Should reflect dimensions of largest image
	imagearray: [
		["images/fema_1b.jpg"],
		["images/fema_2b.jpg"],
		["images/fema_3b.jpg"],
		["images/fema_4b.jpg"],
		["images/fema_5b.jpg"],
		["images/fema_6b.jpg"],
		["images/fema_7b.jpg"] //<--no trailing comma after very last image element!
	],
	displaymode: {type:'manual', pause:2500, cycles:0, wraparound:false},
	persist: false, //remember last viewed slide and recall within same session?
	fadeduration: 500, //transition duration (milliseconds)
	descreveal: "always",
	togglerid: "fadeshow2toggler"
})
