﻿$(function() {
	$('.slider_fav').serialScroll({
		items: 'li', // Use list item elements
		prev: '.slidercontainer a.prev_fav', // Prev button
		next: '.slidercontainer a.next_fav', // Next button
		onBefore: function(e, elem, $pane, $items, pos) {
			// Remove active class from items
			$('.slider_fav ul li').removeClass('active');
			// Make current item active
			$(elem).addClass('active');
			// Hide old description
			//$('.sliderdesc > div').css('display', 'none');
			// Fade in new description
			//$('#sliderdesc' + (pos + 1)).fadeIn('slow');
		},
		offset: -62, // When scrolling to photo, stop 296 pixels from left (-296 = center)
		start: 0, // First item is index 0, so 4 is the fifth item
		duration: 1000, // 1 second slide duration
		interval: 5000, // 5 seconds between auto slide
		constant: false, // slide back to the first item quickly
		force: true, // Force start
		lock: true, // Prevent queuing of actions on multiple clicks
		easing: 'swing', //use this easing equation for a funny effect
		jump: false // Click on the images to scroll to them
	});
	
	$('.slider_bs').serialScroll({
		items: 'li', // Use list item elements
		prev: '.slidercontainer a.prev_bs', // Prev button
		next: '.slidercontainer a.next_bs', // Next button
		onBefore: function(e, elem, $pane, $items, pos) {
			// Remove active class from items
			$('.slider_bs ul li').removeClass('active');
			// Make current item active
			$(elem).addClass('active');
			// Hide old description
			//$('.sliderdesc > div').css('display', 'none');
			// Fade in new description
			//$('#sliderdesc' + (pos + 1)).fadeIn('slow');
		},
		offset: -62, // When scrolling to photo, stop 296 pixels from left (-296 = center)
		start: 0, // First item is index 0, so 4 is the fifth item
		duration: 1000, // 1 second slide duration
		interval: 5000, // 5 seconds between auto slide
		constant: false, // slide back to the first item quickly
		force: true, // Force start
		lock: true, // Prevent queuing of actions on multiple clicks
		easing: 'swing', //use this easing equation for a funny effect
		jump: false // Click on the images to scroll to them
	});	
});