(function($){
	var initLayout = function() {
		$('.colorSelector').ColorPicker({
			color: '#000000',
			onShow: function (colpkr) {
				$(colpkr).fadeIn(500);
				return false;
			},
			onHide: function (colpkr) {
				$(colpkr).fadeOut(500);
				return false;
			},
			onChange: function (hsb, hex, rgb) {
				$('.colorSelector div, .logo-menu, .navigation-menu, .sf-vertical li, .sf-vertical li a, .jspDrag, .sf-menu .current a, .sf-menu a:hover, .sf-menu .current .sliding-element a:hover').css('backgroundColor', '#' + hex);
			}
		});
		$('.colorSelector2').ColorPicker({
			color: '#b8174d',
			onShow: function (colpkr) {
				$(colpkr).fadeIn(500);
				return false;
			},
			onHide: function (colpkr) {
				$(colpkr).fadeOut(500);
				return false;
			},
			onChange: function (hsb, hex, rgb) {
				$('h1, h2, h3, h4, h5, h6, ul.sub-navigation li a:hover, ul.sub-navigation li.current a, a.prev span, a.next span, a.prev:hover, a.next:hover, .light-fonts .content-heading h5, .light-fonts .content-heading h6, .custom-color').css('color', '#' + hex);
				$('.colorSelector2 div').css('backgroundColor', '#' + hex);
			}
		});
	};
	
	var showTab = function(e) {
		var tabIndex = $('ul.navigationTabs a')
							.removeClass('active')
							.index(this);
		$(this)
			.addClass('active')
			.blur();
		$('div.tab')
			.hide()
				.eq(tabIndex)
				.show();
	};
	
	EYE.register(initLayout, 'init');
})(jQuery)