$(document).ready(function(){
	
	 $('#Slider .image a').first().addClass('relhidden');
	 
	$('#Slider').bxSlider({
  		alignment			: 'horizontal',
  		mode				: 'fade',
		controls			: true,
		speed				: 0,
		pager				: false,
		pagerLocation		: 'top',
		pager_short			: false,
		pager_short_separator: ' / ',
		margin				: 0,
	  	nextText			: 'weiter',
	  	next_image			: '',
	  	prevText			: 'zurück',
	  	prev_image			: '',
	  	auto				: false,
	  	pause				: 20000,
	  	auto_direction		: 'next',
	  	auto_hover			: true,
	  	auto_controls		: false,
	  	ticker				: false,
	  	ticker_controls		: false,
	  	ticker_direction	: 'next',
	  	ticker_hover		: true,
	  	stop_text			: 'stop',
	  	start_text			: 'start',
	  	randomStart			: false,
	  	wrapper_class		: 'bxslider_wrap',
	  		onAfterSlide: function(currentSlide, totalSlides, slideElement){
			$('#Slider .image a').fancybox({
		'transitionIn'	:	'elastic',
		'transitionOut'	:	'elastic',
		'speedIn'		:	300, 
		'speedOut'		:	300, 
		'overlayShow'	:	true,
		'overlayColor'	:	'#000000',	
		'overlayOpacity':	0.7,
		'hideOnOverlayClick': true,
		'opacity'		: 	true,
		'type'			: 	'iframe',
		'scrolling' 	: 'no',
		'width'			: 820,
		'height'		: 700,
		'padding'		: 0
	});
  		}
 		
	 });

	
	$("#Slider .image a").attr("rel","gal");
	 
	 
						   
						   /* see if anything is previously checked and reflect that in the view*/
	$(".checklist input:checked").parent().addClass("selected");

	/* handle the user selections */
	$(".checklist .checkbox-select").click(
		function(event) {
			event.preventDefault();
			$(this).parent().addClass("selected");
			$(this).parent().find(":checkbox").attr("checked","checked");
			
		}
	);
	
	$(".checklist .checkbox-deselect").click(
		function(event) {
			event.preventDefault();
			$(this).parent().removeClass("selected");
			$(this).parent().find(":checkbox").removeAttr("checked");
			
			
		}
	);
	
	


});
