$(document).ready(	
	function() {
		$container = $(".container");
		$container.wtGallery({
			num_display:4,
			screen_width:506,
			screen_height:310,
			padding:0,
			thumb_width:108,
			thumb_height:70,
			thumb_margin:8,
			text_align:"bottom",
			caption_align:"bottom",
			auto_rotate:true,
			delay:5000,					
			cont_imgnav:true,
			cont_thumbnav:true,
			display_imgnav:true,
			display_imgnum:true,
			display_thumbnav:true,
			display_thumbnum:false,					
			display_arrow:true,
			display_tooltip:false,
			display_timer:true,
			display_indexes:false,					
			mouseover_text:false,
			mouseover_info:true,
			mouseover_caption:true,
			mouseover_buttons:true,
			transition:"random",
			transition_speed:800,
			scroll_speed:600,
			vert_size:45,
			horz_size:45,					
			vstripe_delay:90,
			hstripe_delay:90,
			move_one:false,
			shuffle:false
		});
		
		var $effectList = $("#effects");
		var $imgnavCB = $("#imgnav-cb");
		var $thumbnavCB = $("#thumbnav-cb");
		var $timerCB = $("#timer-cb");
		var $imgNumCB = $("#imgnum-cb");
		var $mouseoverInfo = $("#mouseover-info");
		var $mouseoverDBtns = $("#mouseover-dbtns");
		var $thumbnumCB = $("#thumbnum-cb");
		var $pageCB = $("#page-cb");
		
		$effectList.val("random").change(
			function() {
				$container.updateTransition($(this).val());
			}
		);

		$("input#inside-cap").attr("checked", true);
		$("input[name='cap-type']").change(
			function() {		
				var val = $("input[name='cap-type']:checked").val();
				$container.updateCapType(val);
				$("#mouseover-caption").attr("disabled", (val == "tooltip"));
			}
		);
			
		$imgnavCB.attr("checked", "checked").change(
			function() {
				var val = $(this).attr("checked");
				$container.displayDButtons(val);						
				$mouseoverDBtns.attr("disabled", !val); 	
			}
		);
		
		$imgNumCB.attr("checked", "checked").change(
			function() {
				var val = $(this).attr("checked");
				$container.displayImgNumber(val);
				$mouseoverInfo.attr("disabled", (!val && !$timerCB.attr("checked")));	
			}				
		);

		$timerCB.attr("checked", "checked").change(
			function() {	
				var val = $(this).attr("checked");
				$container.displayTimerBar(val);
				$mouseoverInfo.attr("disabled", (!val && !$imgNumCB.attr("checked"))); 							
			}				
		);
		
		$thumbnavCB.attr("checked", "checked").change(
			function() {
				$container.displayThumbButtons($(this).attr("checked"));	
			}				
		);
		
		$thumbnumCB.attr("checked", "checked").change(
			function() {
				$container.displayThumbNumber($(this).attr("checked"));	
			}				
		);
		
		$pageCB.attr("checked", "checked").change(
			function() {
				$container.displayPageButtons($(this).attr("checked"));	
			}				
		);	
									
		$("#arrow-cb").attr("checked", "checked").change(
			function() {
				$container.displaySelectArrow($(this).attr("checked"));	
			}				
		);	
										
		$("#mouseover-text").attr("checked", "").change(
			function() {
				$container.updateMouseoverDesc($(this).attr("checked"));
			}				
		);

		$("#mouseover-caption").attr("checked", "").change(
			function() {
				$container.updateMouseoverCaption($(this).attr("checked"));
			}				
		);
		
		$mouseoverInfo.attr("checked", "").change(
			function() {
				$container.updateMouseoverInfo($(this).attr("checked"));
			}				
		);
						
		$mouseoverDBtns.attr("checked", "checked").change(
			function() {
				$container.updateMouseoverButtons($(this).attr("checked"));
			}				
		);				
	}
);
