jQuery(function ($) {

	"use strict";

	// Menu options

	var menuTypeCss = $('.sflickr_userid, .sflickr_api, .sflickr_icount, .sflickr_isize'),
		menuTypeCss_2 = $('#BackgroundSlider .1, #BackgroundSlider .3, #BackgroundSlider .4'),
		menuTypeCss_3 = $('#BackgroundSlider .2'),
		menuType = $('#portfolio-type-Video'),
		selectors = $('#toppic_theme_fullscreen_stream'),
		selectors_menu = $('#toppic_theme_menu_style'),
		contentStyle = $('.content_style'),
		menuOpacity = $('.menu_opacity'),
		menuColor = $('.menu_color, .menu_links_color');

	menuTypeCss.css('display', 'none');
	menuTypeCss_2.css('display', 'none');
	menuTypeCss_3.css('display', 'none');

	selectors.change(function () {

		if ($(this).val() == 'ken_b') {
			menuTypeCss_3.slideDown();
			menuTypeCss_2.slideUp();
			menuTypeCss.slideUp();
		} else {
			menuTypeCss_3.slideUp();
			menuTypeCss_2.slideDown();
			menuTypeCss.slideUp();
		}

	});

	if (selectors.val() == 'kk_royal') {
		menuTypeCss_2.css('display', 'block');
		menuTypeCss_3.css('display', 'none');
	}

	if (selectors.val() == 'ken_b') {
		menuTypeCss.css('display', 'none');
		menuTypeCss_2.css('display', 'none');
		menuTypeCss_3.css('display', 'block');
	}

	selectors_menu.change(function () {
		if ($(this).val() == 'kk-menu-left-boxed') {
			contentStyle.slideUp();
			menuColor.slideDown();
			menuOpacity.slideDown();
			$('.is_border').slideUp();
			//$('.is_border #toppic_theme_is_border').attr('checked', false);
			$(".content_style option[value='kk-boxed']").attr('selected', 'selected');
		} else if ($(this).val() == 'kk-menu-slide-right') {
			menuColor.slideDown();
			contentStyle.slideUp();
			menuOpacity.slideUp();
			$('.is_border').slideDown();
			$(".content_style option[value='kk-full']").attr('selected', 'selected');
		} else if ($(this).val() == 'kk-menu-fullscreen') {
			contentStyle.slideDown();
			menuOpacity.slideDown();
			$('.is_border').slideUp();
			menuColor.slideDown();
		} else if ($(this).val() == 'kk-menu-classic') {
			menuColor.slideUp();
			menuOpacity.slideUp();
		} else {
			contentStyle.slideDown();
			menuOpacity.slideUp();
			menuColor.slideDown();
			$('.is_border').slideUp();
		}
	});

	if (selectors_menu.val() == 'kk-menu-slide-right') {
		contentStyle.css('display', 'none');
		menuOpacity.css('display', 'none');
		menuColor.css('display', 'block');
		$('.is_border').css('display', 'block');
	} else if (selectors_menu.val() == 'kk-menu-left-boxed') {
		contentStyle.css('display', 'none');
		menuColor.css('display', 'block');
		$('.is_border').css('display', 'none');
	} else if (selectors_menu.val() == 'kk-menu-classic') {
		menuColor.css('display', 'none');
		menuOpacity.css('display', 'none');
	} else if (selectors_menu.val() == 'kk-menu-fullscreen') {
		contentStyle.css('display', 'block');
		$('.is_border').css('display', 'none');
		menuColor.css('display', 'block');		
	} else {
		contentStyle.css('display', 'block');
		menuOpacity.css('display', 'none');
		menuColor.css('display', 'block');
		$('.is_border').css('display', 'none');
	}

});