$(document).ready(function() {
////////////////////////////BEGIN SUPERSIZED////////////////////////////
	$.supersized({
					//Functionality
					slideshow               :   1,		//Slideshow on/off
					autoplay				:	1,		//Slideshow starts playing automatically(0 is no play)
					start_slide             :   1,		//Start slide (0 is random)
					random					: 	0,		//Randomize slide order (Ignores start slide)
					slide_interval          :   8000,	//Length between transitions (ระยะเวลาระหว่างสไลด์)
					transition              :   6, 		//0-None, 1-Fade, 2-Slide Top, 3-Slide Right, 4-Slide Bottom, 5-Slide Left, 6-Carousel Right, 7-Carousel Left
					transition_speed		:	1000,	//Speed of transition
					new_window				:	1,		//Image links open in new window/tab
					pause_hover             :   0,		//Pause slideshow on hover
					keyboard_nav            :   1,		//Keyboard navigation on/off
					performance				:	2,		//0-Normal, 1-Hybrid speed/quality, 2-Optimizes image quality, 3-Optimizes transition speed // (Only works for Firefox/IE, not Webkit)
					image_protect			:	1,		//Disables image dragging and right click with Javascript
					image_path				:	'images/', //Default image path

					//Size & Position
					min_width		        :   1024,		//Min width allowed (in pixels)
					min_height		        :   768,		//Min height allowed (in pixels)
					vertical_center         :   1,		//Vertically center background
					horizontal_center       :   1,		//Horizontally center background
					fit_portrait         	:   1,		//Portrait images will not exceed browser height
					fit_landscape			:   0,		//Landscape images will not exceed browser width
					
					//Components
					navigation              :   1,		//Slideshow controls on/off
					thumbnail_navigation    :   1,		//Thumbnail navigation
					slide_counter           :   1,		//Display slide numbers
					slide_captions          :   1,		//Slide caption (Pull from "title" in slides array)
					slides 					:  	[		//Slideshow Images
														{image : 'images/gallery/img1.jpg', title : '', url : ''},
														{image : 'images/gallery/img2.jpg', title : '', url : ''},
														{image : 'images/gallery/img3.jpg', title : '', url : ''},
														{image : 'images/gallery/img4.jpg', title : '', url : ''},
														{image : 'images/gallery/img5.jpg', title : '', url : ''},
														{image : 'images/gallery/img6.jpg', title : '', url : ''},
														{image : 'images/gallery/img7.jpg', title : '', url : ''},
														{image : 'images/gallery/img8.jpg', title : '', url : ''},
														{image : 'images/gallery/img9.jpg', title : '', url : ''},
														{image : 'images/gallery/img10.jpg', title : '', url : ''}
														/*{image : 'images/gallery/img11.jpg', title : '', url : ''},
														{image : 'images/gallery/img12.jpg', title : '', url : ''},
														{image : 'images/gallery/img13.jpg', title : '', url : ''},
														{image : 'images/gallery/img14.jpg', title : '', url : ''},
														{image : 'images/gallery/img15.jpg', title : '', url : ''},
														{image : 'images/gallery/img16.jpg', title : '', url : ''},
														{image : 'images/gallery/img17.jpg', title : '', url : ''},
														{image : 'images/gallery/img18.jpg', title : '', url : ''},
														{image : 'images/gallery/img19.jpg', title : '', url : ''},
														{image : 'images/gallery/img20.jpg', title : '', url : ''},
														{image : 'images/gallery/img21.jpg', title : '', url : ''},
														{image : 'images/gallery/img22.jpg', title : '', url : ''},
														{image : 'images/gallery/img23.jpg', title : '', url : ''},
														{image : 'images/gallery/img24.jpg', title : '', url : ''},
														{image : 'images/gallery/img25.jpg', title : '', url : ''},
														{image : 'images/gallery/img26.jpg', title : '', url : ''},
														{image : 'images/gallery/img27.jpg', title : '', url : ''},
														{image : 'images/gallery/img28.jpg', title : '', url : ''},
														{image : 'images/gallery/img29.jpg', title : '', url : ''},
														{image : 'images/gallery/img30.jpg', title : '', url : ''},
														{image : 'images/gallery/img31.jpg', title : '', url : ''},
														{image : 'images/gallery/img32.jpg', title : '', url : ''},
														{image : 'images/gallery/img33.jpg', title : '', url : ''},
														{image : 'images/gallery/img34.jpg', title : '', url : ''},
														{image : 'images/gallery/img35.jpg', title : '', url : ''},
														{image : 'images/gallery/img36.jpg', title : '', url : ''},
														{image : 'images/gallery/img37.jpg', title : '', url : ''},
														{image : 'images/gallery/img38.jpg', title : '', url : ''},
														{image : 'images/gallery/img39.jpg', title : '', url : ''},
														{image : 'images/gallery/img40.jpg', title : '', url : ''},
														{image : 'images/gallery/img41.jpg', title : '', url : ''}*/
												]
	}); 
////////////////////////////END SUPERSIZED////////////////////////////
var infoActive = true;

	$('#logo').click(function() {
	if (!infoActive)
		{
			$("#info").animate({left: '0px'}, 150, 'easeOutQuad');
			$("#logo").animate({left: '105px'}, 150, 'easeOutQuad');
			infoActive = true;
		} else {
			$("#info").animate({left: '-500px'}, 150, 'easeOutQuad');
			$("#logo").animate({left: '25px'}, 150, 'easeOutQuad');
			infoActive = false;
		}
	});
	
	$('#closeBtn').click(function() {
			$("#info").animate({left: '-500px'}, 150, 'easeOutQuad');
			$("#logo").animate({left: '25px'}, 150, 'easeOutQuad');
			infoActive = false;
	});
	
});
////////////////////////////BEGIN GA////////////////////////////
var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-22502657-1']);
  _gaq.push(['_trackPageview']);

  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();
////////////////////////////END GA////////////////////////////
