;
var customInit = function() {
	/**
	 * Splashes
	 */
	var SplashTimer, SplashTimeout = 250;

	function ChangeSplash(E, d) {
		E.preventDefault();
		clearTimeout(SplashTimer);
		var
			context = $('#splash-slider-inner'),
			active = $('.panel.active', context),
			next,
			id
		;
		if (!active.length) {
			active = $('.panel:first', context);
		}
		if (d) {
			next = active[d]();
			if (!next.length) {
				next = $('.panel:' + ('next' == d ? 'first' : 'last'), context);
			}
		} else {
			id = $(E.target).closest('a').attr('id').replace('category-', '');
			next = $('#splash-slider-panel-' + id, context);
		}
		SplashTimer = setTimeout(function(){
			active.toggleClass('active');
			next.toggleClass('active');
		}, SplashTimeout);
	}

	/*
	 * Event bindings follow
	 */

	$('#CategorySplashesNext').click(function(E){
		ChangeSplash(E, 'next');
	});
	$('#CategorySplashesPrev').click(function(E){
		ChangeSplash(E, 'prev');
	});
	$('#CategoriesTree .level-1').mouseover(function(E){
		ChangeSplash(E);
	});

	$('#coda-slider-1').codaSlider({
		dynamicArrows : false,
		dynamicTabs : false,
		autoSlide : false,
		autoSlideStopWhenClicked : true
	});
};

