/* FW100R5 */
/* (c)2011 SugarHill Works LLC - http://www.sugarhillworks.com */

var i, slideshow = [], ssn, player;


//	 NOTE: THE PREFERRED WAY OF EDITING A GALLERY IS BY USING THE SUGARHILL WORKS PORTFOLIO UPDATER
//
//	 IF YOU DON'T HAVE THE PORTFOLIO UPDATER MODULE, CONTACT US AT sweet@sugarhillworks.com FOR MORE INFO




//--BEG_PHP_INSERT---------------------- BEGIN PORTFOLIO GALLERY ITEMS -------------------------------------
	slideshow[slideshow.length] = {
		order: '10',
		image: 'LAP_1_005.jpg',
		video: '',
		v_type: '',
		v_title: '',
		v_image: '',
		thumb: 'NONE',
		imgtxt_names : {
			title: 'Lori Adamski-Peek'
		}
	};

	slideshow[slideshow.length] = {
		order: '20',
		image: 'LAP_1_022.jpg',
		video: '',
		v_type: '',
		v_title: '',
		v_image: '',
		thumb: 'NONE',
		imgtxt_names : {
			title: 'Lori Adamski-Peek'
		}
	};

	slideshow[slideshow.length] = {
		order: '30',
		image: 'LAP_3_mother.jpg',
		video: '',
		v_type: '',
		v_title: '',
		v_image: '',
		thumb: 'NONE',
		imgtxt_names : {
			title: 'Lori Adamski-Peek'
		}
	};

	slideshow[slideshow.length] = {
		order: '40',
		image: 'LAP_6_017.jpg',
		video: '',
		v_type: '',
		v_title: '',
		v_image: '',
		thumb: 'NONE',
		imgtxt_names : {
			title: 'Lori Adamski-Peek'
		}
	};

	slideshow[slideshow.length] = {
		order: '50',
		image: 'LAP_7_sunsets.jpg',
		video: '',
		v_type: '',
		v_title: '',
		v_image: '',
		thumb: 'NONE',
		imgtxt_names : {
			title: 'Lori Adamski-Peek'
		}
	};

	slideshow[slideshow.length] = {
		order: '60',
		image: 'AB_1_1hangover.jpg',
		video: '',
		v_type: '',
		v_title: '',
		v_image: '',
		thumb: 'NONE',
		imgtxt_names : {
			title: 'Andrew Brusso'
		}
	};

	slideshow[slideshow.length] = {
		order: '70',
		image: 'AB_1_1RESCUE_INK.jpg',
		video: '',
		v_type: '',
		v_title: '',
		v_image: '',
		thumb: 'NONE',
		imgtxt_names : {
			title: 'Andrew Brusso'
		}
	};

	slideshow[slideshow.length] = {
		order: '80',
		image: 'AB_1_1040.jpg',
		video: '',
		v_type: '',
		v_title: '',
		v_image: '',
		thumb: 'NONE',
		imgtxt_names : {
			title: 'Andrew Brusso'
		}
	};

	slideshow[slideshow.length] = {
		order: '90',
		image: 'AB_2_1000.jpg',
		video: '',
		v_type: '',
		v_title: '',
		v_image: '',
		thumb: 'NONE',
		imgtxt_names : {
			title: 'Andrew Brusso'
		}
	};

	slideshow[slideshow.length] = {
		order: '100',
		image: 'AB_5_1010.jpg',
		video: '',
		v_type: '',
		v_title: '',
		v_image: '',
		thumb: 'NONE',
		imgtxt_names : {
			title: 'Andrew Brusso'
		}
	};

	slideshow[slideshow.length] = {
		order: '110',
		image: 'FC_Conceptual001.jpg',
		video: '',
		v_type: '',
		v_title: '',
		v_image: '',
		thumb: 'NONE',
		imgtxt_names : {
			title: 'Francois Chevalier'
		}
	};

	slideshow[slideshow.length] = {
		order: '120',
		image: 'FC_Conceptual002.jpg',
		video: '',
		v_type: '',
		v_title: '',
		v_image: '',
		thumb: 'NONE',
		imgtxt_names : {
			title: 'Francois Chevalier'
		}
	};

	slideshow[slideshow.length] = {
		order: '130',
		image: 'FC_Conceptual004.jpg',
		video: '',
		v_type: '',
		v_title: '',
		v_image: '',
		thumb: 'NONE',
		imgtxt_names : {
			title: 'Francois Chevalier'
		}
	};

	slideshow[slideshow.length] = {
		order: '140',
		image: 'FC_Conceptual007.jpg',
		video: '',
		v_type: '',
		v_title: '',
		v_image: '',
		thumb: 'NONE',
		imgtxt_names : {
			title: 'Francois Chevalier'
		}
	};

	slideshow[slideshow.length] = {
		order: '150',
		image: 'FC_Conceptual012.jpg',
		video: '',
		v_type: '',
		v_title: '',
		v_image: '',
		thumb: 'NONE',
		imgtxt_names : {
			title: 'Francois Chevalier'
		}
	};

	slideshow[slideshow.length] = {
		order: '210',
		image: 'SG_002berry-cake.jpg',
		video: '',
		v_type: '',
		v_title: '',
		v_image: '',
		thumb: 'NONE',
		imgtxt_names : {
			title: 'Susan Goldman'
		}
	};

	slideshow[slideshow.length] = {
		order: '220',
		image: 'SG_006asparagus.jpg',
		video: '',
		v_type: '',
		v_title: '',
		v_image: '',
		thumb: 'NONE',
		imgtxt_names : {
			title: 'Susan Goldman'
		}
	};

	slideshow[slideshow.length] = {
		order: '230',
		image: 'SG_008soba_watercresssalad.jpg',
		video: '',
		v_type: '',
		v_title: '',
		v_image: '',
		thumb: 'NONE',
		imgtxt_names : {
			title: 'Susan Goldman'
		}
	};

	slideshow[slideshow.length] = {
		order: '240',
		image: 'SG_010pepper_martini.jpg',
		video: '',
		v_type: '',
		v_title: '',
		v_image: '',
		thumb: 'NONE',
		imgtxt_names : {
			title: 'Susan Goldman'
		}
	};

	slideshow[slideshow.length] = {
		order: '250',
		image: 'SG_024ricenoodles.jpg',
		video: '',
		v_type: '',
		v_title: '',
		v_image: '',
		thumb: 'NONE',
		imgtxt_names : {
			title: 'Susan Goldman'
		}
	};

	slideshow[slideshow.length] = {
		order: '260',
		image: 'CG_001A.jpg',
		video: '',
		v_type: '',
		v_title: '',
		v_image: '',
		thumb: 'NONE',
		imgtxt_names : {
			title: 'Chris Gordaneer'
		}
	};

	slideshow[slideshow.length] = {
		order: '270',
		image: 'CG_004.jpg',
		video: '',
		v_type: '',
		v_title: '',
		v_image: '',
		thumb: 'NONE',
		imgtxt_names : {
			title: 'Chris Gordaneer'
		}
	};

	slideshow[slideshow.length] = {
		order: '280',
		image: 'CG_8694_eatonscentre-003818 chris.jpg',
		video: '',
		v_type: '',
		v_title: '',
		v_image: '',
		thumb: 'NONE',
		imgtxt_names : {
			title: 'Chris Gordaneer'
		}
	};

	slideshow[slideshow.length] = {
		order: '290',
		image: 'CG_bill.jpg',
		video: '',
		v_type: '',
		v_title: '',
		v_image: '',
		thumb: 'NONE',
		imgtxt_names : {
			title: 'Chris Gordaneer'
		}
	};

	slideshow[slideshow.length] = {
		order: '300',
		image: 'CG_zanotti_1.jpg',
		video: '',
		v_type: '',
		v_title: '',
		v_image: '',
		thumb: 'NONE',
		imgtxt_names : {
			title: 'Chris Gordaneer'
		}
	};

	slideshow[slideshow.length] = {
		order: '310',
		image: 'MP_aecorner.jpg',
		video: '',
		v_type: '',
		v_title: '',
		v_image: '',
		thumb: 'NONE',
		imgtxt_names : {
			title: 'Michelle Pedone'
		}
	};

	slideshow[slideshow.length] = {
		order: '320',
		image: 'MP_bedog.jpg',
		video: '',
		v_type: '',
		v_title: '',
		v_image: '',
		thumb: 'NONE',
		imgtxt_names : {
			title: 'Michelle Pedone'
		}
	};

	slideshow[slideshow.length] = {
		order: '330',
		image: 'MP_harbour.jpg',
		video: '',
		v_type: '',
		v_title: '',
		v_image: '',
		thumb: 'NONE',
		imgtxt_names : {
			title: 'Michelle Pedone'
		}
	};

	slideshow[slideshow.length] = {
		order: '340',
		image: 'MP_neighbors.jpg',
		video: '',
		v_type: '',
		v_title: '',
		v_image: '',
		thumb: 'NONE',
		imgtxt_names : {
			title: 'Michelle Pedone'
		}
	};

	slideshow[slideshow.length] = {
		order: '350',
		image: 'MP_velvet.jpg',
		video: '',
		v_type: '',
		v_title: '',
		v_image: '',
		thumb: 'NONE',
		imgtxt_names : {
			title: 'Michelle Pedone'
		}
	};

	slideshow[slideshow.length] = {
		order: '360',
		image: 'KT_1_001A.jpg',
		video: '',
		v_type: '',
		v_title: '',
		v_image: '',
		thumb: 'NONE',
		imgtxt_names : {
			title: 'Kate Turning'
		}
	};

	slideshow[slideshow.length] = {
		order: '370',
		image: 'KT_1_001A1.jpg',
		video: '',
		v_type: '',
		v_title: '',
		v_image: '',
		thumb: 'NONE',
		imgtxt_names : {
			title: 'Kate Turning'
		}
	};

	slideshow[slideshow.length] = {
		order: '380',
		image: 'KT_2_001A.jpg',
		video: '',
		v_type: '',
		v_title: '',
		v_image: '',
		thumb: 'NONE',
		imgtxt_names : {
			title: 'Kate Turning'
		}
	};

	slideshow[slideshow.length] = {
		order: '390',
		image: 'KT_2_001C.jpg',
		video: '',
		v_type: '',
		v_title: '',
		v_image: '',
		thumb: 'NONE',
		imgtxt_names : {
			title: 'Kate Turning'
		}
	};

	slideshow[slideshow.length] = {
		order: '400',
		image: 'KT_2_002a.jpg',
		video: '',
		v_type: '',
		v_title: '',
		v_image: '',
		thumb: 'NONE',
		imgtxt_names : {
			title: 'Kate Turning'
		}
	};

	slideshow[slideshow.length] = {
		order: '410',
		image: 'AS_GL-pinceaux_11.jpg',
		video: '',
		v_type: '',
		v_title: '',
		v_image: '',
		thumb: 'NONE',
		imgtxt_names : {
			title: 'Adam Savitch'
		}
	};

	slideshow[slideshow.length] = {
		order: '420',
		image: 'AS_SPLASH0012.jpg',
		video: '',
		v_type: '',
		v_title: '',
		v_image: '',
		thumb: 'NONE',
		imgtxt_names : {
			title: 'Adam Savitch'
		}
	};

	slideshow[slideshow.length] = {
		order: '430',
		image: 'AS_CARTIER ART_Lovemanchette.jpg',
		video: '',
		v_type: '',
		v_title: '',
		v_image: '',
		thumb: 'NONE',
		imgtxt_names : {
			title: 'Adam Savitch'
		}
	};

	slideshow[slideshow.length] = {
		order: '440',
		image: 'AS_Biotherm.jpg',
		video: '',
		v_type: '',
		v_title: '',
		v_image: '',
		thumb: 'NONE',
		imgtxt_names : {
			title: 'Adam Savitch'
		}
	};

	slideshow[slideshow.length] = {
		order: '450',
		image: 'AS_Vichydercos_14.jpg',
		video: '',
		v_type: '',
		v_title: '',
		v_image: '',
		thumb: 'NONE',
		imgtxt_names : {
			title: 'Adam Savitch'
		}
	};

	slideshow[slideshow.length] = {
		order: '460',
		image: 'FNF_04.jpg',
		video: '',
		v_type: '',
		v_title: '',
		v_image: '',
		thumb: 'NONE',
		imgtxt_names : {
			title: 'Alan Kaplan'
		}
	};

	slideshow[slideshow.length] = {
		order: '470',
		image: 'FNF_15.jpg',
		video: '',
		v_type: '',
		v_title: '',
		v_image: '',
		thumb: 'NONE',
		imgtxt_names : {
			title: 'Alan Kaplan'
		}
	};

	slideshow[slideshow.length] = {
		order: '480',
		image: 'KDS_01.jpg',
		video: '',
		v_type: '',
		v_title: '',
		v_image: '',
		thumb: 'NONE',
		imgtxt_names : {
			title: 'Alan Kaplan'
		}
	};

	slideshow[slideshow.length] = {
		order: '490',
		image: 'TNS_01.jpg',
		video: '',
		v_type: '',
		v_title: '',
		v_image: '',
		thumb: 'NONE',
		imgtxt_names : {
			title: 'Alan Kapaln'
		}
	};

	slideshow[slideshow.length] = {
		order: '500',
		image: 'TNS_22.jpg',
		video: '',
		v_type: '',
		v_title: '',
		v_image: '',
		thumb: 'NONE',
		imgtxt_names : {
			title: 'Alan Kaplan'
		}
	};

//--END_PHP_INSERT-------------------------------  END PORTFOLIO GALLERY ITEMS -------------------------------------



// ******************************************************************************
// ************* SS SETTINGS ****************************************************
// ******************************************************************************

//-----------      SETUP      -----------
var ss_layout = 'xFade'; // Options are 'xFade' for cross-fading images OR 'hScroll' for horizontal row of images
var ss_layout_mode = 'static'; // Options are 'flex' or 'static'. Note: your CSS will determine container layout. This will reposition imgs on window resize if mode is 'flex'.
var ss_fade_max = 1; // full opacity = 1. -- 99% opacity would be 0.99
var ss_fade_min = 0.5; // hidden opacity = 0. -- script will always use 0 if ss_layout is 'xFade' - to disable fading on hScroll layouts, set to 1.

//----------- MAIN CONTAINERS ----------- 
var ss_image_cntr_id = 'ss_cntr';
var ss_thumb_cntr_id = 'main_thms_cntr';
var glass_cntr = 'glass_cntr';
//var ss_info_id = 'ss_info_cntr';
var nav_nums_type = 'txt'; // [str] 'txt'|'img' - if 'txt', navnums will be text and use nav_nums_separator (ex: 1 / 25) - if 'img', images 0.gif, 1.gif, etc will be used (digits 0-9)
var ss_nav_nums_cntr_id = 'nav_nums_cntr';
var nav_nums_separator = '&nbsp;/&nbsp;';
var ss_title_cntr_id = 'title_cntr'; //leave blank for no titles

//--------- CONTAINERS OPTIONS ----------
var use_loading_gif = true;
var navNums_linkFading = true; // Set to true to have (visible) nav nums fade along with the image
var titles_linkFading = true; // Set to true to have (visible) titles fade along with the image
var captions_linkFading = true; // Set to true to have (visible) captions fade along with the image

var overlayInfo = false;// set to true to overlay image info on the image. use following settings to add title, caption, etc
var overlayInfoPos = 'image';// [str] 'image'|'full' - 'image' sets the title container to constrain to the current image's w/h and the title's position will be relative to the
// image. 'full' sets to the full width of ss_cntr and the title cntr will be relative to the full ss cntr. title appearance/positioning is set in gallery CSS.
var overlayInfoMaxW = false; // [int]|FALSE - max width in pixels of info overlay container (when overlayInfoPos is 'image'). false means overlay will be full image width;
var overlayInfoAlign = 'right';// [str] 'left'|right' - aligns the info cntr if width is shorter than image's width
var overlayShowEmpty = true; // true will show the info overlay even when there's no text to display (i.e. no titles, cpations)

var overlayInfoTrigger = '#ss_overlay_btn'; // jQuery list of container(s) which will show/hide overlay on mouseover/out

var overlayTitle = false;// set to true to overlay the title on the image. when set to true, title_cntr can be anywhere in the HTML. position via CSS. set display:none.
var overlayTitlePos = 'image';// [str] 'image'|'full' - 'image' sets the title container to constrain to the current image's w/h and the title's position will be relative to the
// image. 'full' sets to the full width of ss_cntr and the title cntr will be relative to the full ss cntr. title appearance/positioning is set in gallery CSS.
var overlayTitleVPos = 'top';// [str] top|bottom
var overlayTitleMaxW = false; // [int]|FALSE - max width in pixels of info overlay container (when overlayInfoPos is 'image'). false means overlay will be full image width;
var overlayTitleAlign = 'right';// [str] 'left'|right' - aligns the info cntr if width is shorter than image's width
var overlayTitleShowEmpty = false; // true will show the info overlay even when there's no text to display 

var overlayCaptions = false;
var overlayCaptionsPos = 'image';// [str] 'image'|'full' - 'image' sets the captions container to constrain to the current image's w/h and the Captions's position will be relative to the
// image. 'full' sets to the full width of ss_cntr and the captions cntr will be relative to the full ss cntr. captions appearance/positioning is set in gallery CSS.
var overlayCaptionsVPos = 'bottom';// [str] top|bottom
var overlayCaptionsMaxW = false; // [int]|FALSE - max width in pixels of info overlay container (when overlayInfoPos is 'image'). false means overlay will be full image width;
var overlayCaptionsAlign = 'right';// [str] 'left'|right' - aligns the info cntr if width is shorter than image's width
var overlayCaptionsShowEmpty = false; // true will show the info overlay even when there's no text to display

var overlayNav = false; // set to true to overlay the next/back navigation arrows on the image. arrow containers can be anywhere in the HTML. position via CSS. set display:none.
var overlayNavPos = 'css' // [str] auto|css - if 'auto' nav overlays will be 100% height and info_cntr will be adjusted to not overlap automatically. if 'css' gallery.css controls nav/nav bg positioning. 
//---------------------------------------
// captions are in 2 parts, particularly useful with quotes that have a person attributed
// NOTE: Of the following three options, choose either the first or both the second and third
//		* If ss_captions_cntr is used, caption part one and two will be put in this container
//		* If both caption1 and caption2_cntr_id are used, caption parts will be displayed in separate containers.
//*********** ONLY  USE  ss_captions_cntr_id !!! ***********
var ss_captions_cntr_id = 'captions_cntr'; //leave blank for no captions
var caption1Pre = "<p class=\"caption1_txt\">"; // some HTML or not. leave <p> tag
var caption1App = "</p>"; // some HTML or leave blank
var caption2Pre = "<p class=\"caption2_txt\">"; // some HTML or not. leave <p> tag
var caption2App = "</p>"; // some HTML or leave blank
var captions_linkFading = true; // Set to true to have (visible) captions fade along with the image
//---------------------------------------


//***********************************************************************************************************


//---------- BEHAVIOR SETTINGS ----------
var ss_autorun = true; // Set to true if this is an auto-run slideshow.
var ss_interval = 2000; // milliseconds between image transitions (on auto-run slideshows)
var ss_fade_duration = 750; // milliseconds that it will take for the fade to complete (larger number = slower fade)
var ss_resume_interval = 5000; //null OR milliseconds until the slideshow will start itself if left idle (paused).
var randomizeOrder = true; // Set to true to randomize the order of the images in this slideshow.
var reverseOrder = false; // Set to true to reverse the order of the images in this slideshow.
//---------------------------------------
var glass_nav = false; // Set to true if you want to click the image overlay to advance the slideshow.
var glass_act = 'nav'; // 'pause'|'nav' - determines the click action of the glass cntr
var glass_position = 'full'; // 'image'|'full' - set to 'image' to have glass clickable area match image size, 'full' to have glass cover ss cntr
var showImgsTitleAtt = false; // set to true to show navnums as the glass_cntr's attribute
//---------------------------------------
var img_v_position = 'middle'; //options are 'top' OR 'middle' OR 'bottom' for vertical position. Leave blank '' to let HTML/CSS pos the imgs.
var img_h_position = 'center'; //options are 'left' OR 'center' OR 'right' for horizontal position. Leave blank '' to let HTML/CSS pos the imgs.
//NOTE: Both imgFit and imgGrow (below) will maintain image aspect ratio and fit the images based on that. Meant to be used either/or.
var imgFit = true; //set to true to force large images to fit in the ss cntr. Note: false will allow large images to break the layout.
var imgGrow = false;//set to true to force small images to grow to the size of the ss cntr. images too large to begin with will be resized to fit, even if imgFit is false.
var imgWmax = false;// [int]|FALSE - when imageGrow is true, set this to the maximum width you want the images to grow to, even if the ss cntr is wider. (esp useful on hScroll layouts).
var imgWpad = 0;// [int] - number of px to 'pad' current img when ss layout is hScroll/flex and h position is center. (allows imgWmax to be smaller when ss cntr flexes down to imgWmax
var imgHpad = 0;// [int] - see above, but for height
//---------------------------------------
var video_autoplay = true; //set to true to have videos in the slideshow autoplay when they load.
var video_autoplay_delay = 1000; // [int] - milliseconds until video starts playing (so the visitor has time see the preview image). to start playback immediately, set to 0
var vidControlsHeight = 32; // [int] - pixels - this is to offset the info div, so it will appear over the video part of the player, but not cover the controls toolbar
//---------------------------------------

//------------- THUMBNAILS --------------
var showThmsTitleAtt = true; // set to true to show navnums as the thumbnail's title attribute
var thms_captions = false; // set to true to insert caption cntrs below each thumb - uses class: thm_caption
var thms_behavior = 'scroll_thms'; // 'overlay_thms' for a thumbs cntr that disappears OR 'scroll_thms' for scrollable thumbs in a v or h line
var autohideThmScrArws = true; // set to true to auto-hide the left/right scroll nav arrows when the beg/end is reached. NOTE: ignored when rewindThumbs or loopThumbs is true
//LOOPING OF SCROLLING THUMBS ONLY WORKS WHEN THE VISITOR IS HOLDING THE RIGHT THM ARROW DOWN. (STILL TRUE?)
var loopThumbs = false; // set to true to have the thumbs jump back to the other side, giving the appearance of looping. NOTE: ignored when rewindThumbs is true
var thm_loop_delay = 10; // [int] amount to delay before jumping to the beg/end of thumbs - NOTE: a value of 30 is equal to about 1 second delay. set to 0 for immediate looping. values below 5 may cause unexpected behavior when thms are autoscrolling...
/*
//var loopResumeDelay = 250; // milliseconds to delay before resuming scrolling after jumping to the beg/end of thumbs
//REWINDING OF SCROLLING THUMBS IS NOT AVAILABLE. WILL BE IN A FUTURE REVISION.
var rewindThumbs = true; // set to true to have the thumbs autoscroll back to the beginning when the user reaches the end of the scrollable thumbs
var rewindDelay = 500; // milliseconds delay before rewinding the thumbs (gives the user a chance to let up on the mouse to stay at first/last thumb
*/
var thms_linkFading = true; // Set to true to have (visible) thumbs fade along with the image OR false for hidden thumbs
var thms_minOpacity = 0.65; // set to the opacity value you want the thumbs to stop at when fading out. (The active thumb always fades up to 1)
//---------------------------------------
// ***NOTE*** Remember to set thumbnail container scrollbar settings (based on thms_behavior setting) below... ***NOTE***
//---------------------------------------

//***********************************************************************************************************


//---------- SCROLLBAR SETTINGS ----------
if ((ss_thumb_cntr_id) && (thms_behavior === 'scroll_thms')) {
	var global_scroll_settings = {};
	// If thms_behavior is set to 'scroll_thms', apply these settings to the scrolling container & scrollbar
	global_scroll_settings.scrollPaneThms = {
		scrollPaneId: 'scrollPaneThms',
		scrollbarHeight: 0, // the width of the created scrollbar in pixels (defaults to 10)
		scrollbarMargin: 0, // [int] - the margin to leave to the left of the scrollbar in pixels (defaults to 5)
		//wheelSpeed [int] - controls how fast the mouse wheel makes the content scroll in pixels (defaults to 18)
		showArrows: false, // controls whether to display little arrows by the scrollbar for the user to scroll with (defaults to false) -loads slow...
		//arrowSize: 10, // the width of the arrow buttons if showArrows=true (calculated from CSS if not provided)
		useExternalArrows: true, // [boolean] - to use a pair of images (#thmArwL_img, #thmArwR_img)
		animateTo: true,//(useAnimateTo)?true:false, // whether to animate when calling scrollTo and scrollBy (defaults to false)
		dragMinWidth: 140, // [int] - the minimum height to allow the drag bar to be (defaults to 0)
		dragMaxWidth: 240, // [int] - the maximum height to allow the drag bar to be (defaults to 99999!)
		animateInterval: 100, // [int] - The interval in milliseconds to update an animating scrollPane (default 100)
		animateStep: 5, // [int] The amount to divide the remaining scroll distance by when animating (default 3)
		maintainPosition: true, //[boolean] - Whether you want the contents of the scroll pane to maintain it's position when you re-initialise it -
																			   //  - so it doesn't scroll as you add more content (default true)
		resize: false, // - Whether or not to have resizing turned on or not.
		minimumWidth: 20, // - The minimum width to allow the jScrollHorizontalPane to be resized to. Only effective when resize is on.
		loadingText: '', // [str] - text to display in the scroll bar. control style in CSS. defaults to ''
		reset: true // -	When set to 'true' all the global properties will be reset.  This is useful for dynamic refreshes on the page.
	};
	function hScrollThmsInit() {
		$('#main_thms_cntr').jScrollHorizontalPane(global_scroll_settings.scrollPaneThms);
		//$("#thms_nav_cntr > .jScrollPaneContainer").attr({id:'scrollPaneThms'});
	}
}






//***********************************************************************************************************
//***********************************************************************************************************
//*******        ADD/REMOVE LINES FROM THIS FUNCTION TO RE-INITIALIZE FEATURES THAT DEPEND ON         *******
//*******        DYNAMIC CONTENT TO BE PRESENT IN ORDER TO FUNCTION CORRECTLY                         *******
//*******        (i.e. scroll container height re-drawn with changing amount of image text)           *******
//***********************************************************************************************************
//***********************************************************************************************************
//		function reinitFeaturesOnFade(fadingIn_fr) {
//			cufonStr1 = '#hdr_txt_'+fadingIn_fr+',#title_txt_'+fadingIn_fr;
//			if($('#title2_cntr').length > 0) {//states gallery layout
//				cufonStr1 = '#title2_txt_'+fadingIn_fr;
//			}
//			cufonStr2 = '#sub_hdr_txt_'+fadingIn_fr+',#img_txt_txt_'+fadingIn_fr;
//			
//			Cufon.replace(cufonStr1, {fontFamily: 'Scotch Modern'});
//			Cufon.replace(cufonStr2, {fontFamily: 'Figgins Sans'});
//			//$('.scroll-pane').jScrollPane(default_scroll_settings);
//		}
//***********************************************************************************************************
//***********************************************************************************************************
//***********************************************************************************************************




//-------- VIDEO PLAYER SETTINGS ---------
/**** 
***** NOTE: These characters must be encoded if they are to be used in the flashvars below:
***** ? -> %3F
***** = -> %3D
***** & -> %26 
****/
function createPlayer(num, v_file, v_img, v_type) {
	jwplayer('vplayer').setup({
		flashplayer: rootPath+'shw_lib/mediaplayer-5.4/player.swf',
		provider: 'video',
		//file: rootPath+'shw_lib/mediaplayer/loa/der.mp4',
		//image: rootPath+'shw_lib/mediaplayer/loa/der.gif',
		skin: rootPath+'shw_lib/mediaplayer/skin/schoon.zip',
		icons: true,
		controlbar: 'none', // bottom|over|none,
		'controlbar.idlehide': true,
		width: 768,
		height: 432,
		stretching: 'none', // uniform|none|exactfit|fill
		events: {
			onComplete: function() { checkState(nPause,current); }
		},
		autostart: false,
//		frontcolor: '#999999',
//		backcolor: '#FFFFFF',
//		lightcolor: '#000000',
		screencolor: '#000',
		smoothing: false,
		bufferlength: 1,
		wmode: 'direct',
		id: 'vplayer'
	});
}

//-------- PAYPAL FORM OPTIONS ----------
var defaultCss = { background:'none', color:'#D4D4D4'};
function paypal_fmValidate() {
	var errs = [];
	
	if ($("#quantity").val().match(/[^0-9]/) || ($("#quantity").val() == '' ) || (parseInt($("#quantity").val(), 10) < 1)) {
		errs.push("#qty_txt");
	}
	
	if ($("#os0").val() === null) {
		errs.push("#opt0_cntr > .label:eq(0)");
	}
	
	if ($("#os1").val() === null) {
		errs.push("#opt1_cntr > .label:eq(0)");
	}
	
	if (errs.length > 0) {
		for (i = 0; i < errs.length; i++) {
			$(errs[i]).animate({backgroundColor:'#FFF', color:'#000'}, 750);
		}
		return false;
	} else {
		$("#paypal_fm").submit();
	}
}
// -----------------------------------------------------------------------------------


ssn = slideshow.length;
slideshow.portfolioDir = (window.location.toString()).replace(rootPath, '');
var default_dir = slideshow.portfolioDir.match(/\w+\/(?:_hold\/){0,1}\w+(?:\-*\w+)*\/(?:_hold\/){0,1}\w+(?:\-*\w+)*\//);
if (!default_dir) { default_dir = slideshow.portfolioDir.match(/[aA-zZ0-9_-]+\//); }
if (default_dir === null) { default_dir = 'home/'; }//splash page slideshow
slideshow.portfolioDir = default_dir;
slideshow.imageDir = rootPath + slideshow.portfolioDir + 'images/';
slideshow.thumbDir = rootPath + slideshow.portfolioDir + 'thumbs/';
slideshow.videoDir = rootPath + slideshow.portfolioDir + 'videos/';
slideshow.vimgDir = rootPath + slideshow.portfolioDir + 'videos/_posters/';
slideshow.vthmDir = rootPath + slideshow.portfolioDir + 'videos/_thumbs/';

//auto-poplulate thumb filenames when left blank. image filename will be used.
for (i = 0; i < slideshow.length; i++) {
	if (slideshow[i].thumb === "") { 
		slideshow[i].thumb = slideshow[i].image;
	}
}


