//initializing the JQuery GalleryView but using jquery noConflict() to avoid any conflicts between the libraries
jQuery.noConflict();
jQuery(document).ready(function(){
	jQuery('#casestudygallery').galleryView({
		/*panel_width: 800,
		panel_height: 130,
		frame_width: 50,
		frame_height: 50,
		transition_speed: 200,
		transition_interval: 0,
		background_color: 'white',
		overlay_text_color: 'white',
		caption_text_color: 'black',
		border: '1px solid black',
		nav_theme: 'dark',
		show_captions: true,
		fade_panels: false*/
		panel_width: 770,
		panel_height: 180,
		frame_width: 10,
		frame_height: 10,
		overlay_height: 70,
		overlay_font_size: '1em',
		transition_speed: 600,
		transition_interval: 10000,
		overlay_opacity: 0.6,
		overlay_color: 'black',
		background_color: '#ffffff',
		overlay_text_color: 'white',
		caption_text_color: 'white',
		border: 'none',
		pointer_border: '2px solid #30526b',
		nav_theme: 'custom',
		easing: 'swing',
		filmstrip_position: 'top',
		overlay_position: 'top',
		show_captions: false,
		fade_panels: true,
		pause_on_hover: false
	});
});


//mootools code
window.addEvent('domready', function(){
																		 
	//Vertical Sliding SubMenu navigation using Mootools
	//Author: Systems Venture Inc. (www.systemsventure.com)
	//Created: August 29th 2007
	
	//create arrays of class elements
	var mainMenuBoxes = $$('.mainMenuLinkContainer');
	var mainMenuLinks = $$('.mainMenuLink');
	var subMenuOuterBoxes = $$('.subMenuOuterContainer');
	var subMenuInnerBoxes = $$('.subMenuInnerContainer');
	
	//loop through all mainMenuContainer array elements
	mainMenuBoxes.each(function(mainMenuBox, i){
		//initialize transition effects to subMenu Containers
		var subMenuOuterBoxFx = new Fx.Styles(subMenuOuterBoxes[i], {wait:false, duration: 500, transition: Fx.Transitions.Expo.easeOut});
		var subMenuInnerBoxFx = new Fx.Styles(subMenuInnerBoxes[i], {wait:false, duration: 500, transition: Fx.Transitions.Expo.easeOut});
		
		//IBrowser Specific SubMenuInnerContainer Width Extraction
		if(window.gecko){
			var subMenuInnerBoxWidthInt = subMenuInnerBoxes[i].getStyle('width').toInt()-3;
		} else {
			var subMenuInnerBoxWidthInt = subMenuInnerBoxes[i].getStyle('width').toInt();
		}
		var subMenuInnerBoxHeightInt = subMenuInnerBoxes[i].getStyle('height').toInt();
		
		//setting Styles for Containers needed for Vertical slide animation 
		subMenuOuterBoxes[i].setStyle('width', subMenuInnerBoxWidthInt);
		subMenuInnerBoxes[i].setStyle('top', -subMenuInnerBoxHeightInt);
		
		//apply all effect for vertical slide down animation of SubMenu onmouseover mainMenu Element
		mainMenuBox.addEvent('mouseover', function(){
			//alert(subMenuInnerBoxHeightInt);
			mainMenuLinks[i].setStyles({
				'background-position':'0px -36px'
			});
			subMenuOuterBoxFx.start({
				'opacity':.9,
				'height': subMenuInnerBoxHeightInt
			});
			subMenuInnerBoxFx.start({
				'top':0
			});
		});
	 	
		//apply all effect for vertical slide up animation of SubMenu onmouseout mainMenu Element
		mainMenuBox.addEvent('mouseout', function(){
			mainMenuLinks[i].setStyles({
				'background-position': '0px 0px'
			});
			subMenuOuterBoxFx.start({
				'opacity':0,
				'height': 0
			});
			subMenuInnerBoxFx.start({
				'top':-subMenuInnerBoxHeightInt
			});
		});	
	});
}); 

