jQuery(document).ready(function() {



	jQuery('.fpscrollable .items div').eq(0).find('.img-a').css({opacity: 1});

	

	/* Position Home Carousel */

	headerPos = jQuery('.header').position();
	jQuery('.fpscrollable .items').css({marginLeft: headerPos.left + 'px'});
	jQuery(window).resize(function() {
		headerPos = jQuery('.header').position();
		jQuery('.fpscrollable .items').css({marginLeft: headerPos.left + 'px'});

	});

	

	

	var fpscrollable = jQuery('.fpscrollable').scrollable({

		next: '.next',

		prev: '.prev',

		circular: true,

		onBeforeSeek: function() {

			this.getItems().eq(this.getIndex()).find(".img-a").fadeIn(function() {

				jQuery(this).css({opacity: 0.3});

				jQuery(this).next().css({opacity: 0.3});

				jQuery(this).show();

			});

			jQuery('.browse').hide();

		},

		onSeek: function() {

			var sThis = this;

			sThis.getItems().eq(this.getIndex()).find(".img-a").fadeIn(function() {

				jQuery(this).css({opacity: 1});

				jQuery(this).prev().css({opacity: 0.3});

				jQuery(this).show();

			});

			jQuery('.cloned').find('.img-a').css({opacity: 0.3});		

			jQuery(".browse:not('.disabled')").fadeIn();

		}

	});

		



});
