jQuery.noConflict();

jQuery(document).ready(function () {
	if (jQuery("#slider-wrapper").length > 0){
		var $panels = jQuery('#slider-wrapper .slider-scrolls .slider-item');
		var $container = jQuery('#slider-wrapper .slider-scrolls');
		var horizontal = true;
		if (horizontal) {
			$panels.css({
				'float' : 'left',
				'position' : 'relative' // IE fix to ensure overflow is hidden
			});
			$container.css('width', $panels[0].offsetWidth * $panels.length);
		}
		
		var $scroll = jQuery('#slider-wrapper .slider-container').css('overflow', 'hidden');
		$scroll
		//	.before('<a class="link-button-slider-bwd">Bakåt</a>')
		//	.after('<a class="link-button-slider-fwd">Framåt</a>')
			.before('<img class="img-button-slider-bwd" src="/include/conv/img/buttons/panel-slider-bwd-hover.png" />')
			.after('<img class="img-button-slider-fwd" src="/include/conv/img/buttons/panel-slider-fwd-hover.png" />')
		var offset = parseInt((horizontal ? 
			$container.css('paddingTop') : 
			$container.css('paddingLeft')) 
			|| 0) * -1;
		var scrollOptions = {
			target: $scroll,
			items: $panels,
	//        navigation: '.navigation a',
	//		prev: 'a.link-button-slider-bwd', 
	//		next: 'a.link-button-slider-fwd',
			prev: 'img.img-button-slider-bwd', 
			next: 'img.img-button-slider-fwd',
			axis: 'xy',
			offset: offset,
			duration: 500
		};
		
		jQuery('#slider-wrapper').serialScroll(scrollOptions);
		jQuery.localScroll(scrollOptions);
		scrollOptions.duration = 1;
		jQuery.localScroll.hash(scrollOptions);
	}
});