function initScrollGalleries() {
	// top gallery init
	$('.column-wide div.slide-box').galleryScroll({
		holderList: 'div.gallery',
		scrollElParent: 'ul',
		scrollEl: 'li',
		circleSlide: true,
		duration : 1250, // animation speed
		autoSlide: 5000 // false - to disable autoslide
	});

	// product gallery init
	$('#gallery').galleryScroll({
		btPrev: 'a.btn-prev',
		btNext: 'a.btn-next',
		holderList: 'div.gallery',
		scrollElParent: 'ul',
		scrollEl: 'li',
		duration: 650,
		step: 4,
		circleSlide: true,
		disableClass: 'disable',
		autoSlide:false
	});
}

function initTabs() {
	$('ul.tabset').each(function(){
		var _list = $(this);
		var _links = _list.find('a.tab');
		_links.each(function() {
			var _link = $(this);
			var _href = _link.attr('href');
			var _tab = $(_href);
			if(_link.hasClass('active')) _tab.show();
			else _tab.hide();
			_link.click(function(){
				_links.filter('.active').each(function(){
					$($(this).removeClass('active').attr('href')).hide();
				});
				_link.addClass('active');
				_tab.show();
				return false;
			});
		});
	});
}

$(function() {

	initScrollGalleries();

	initTabs();

});