jQuery(document).ready(function($) {
	$("#pj-skin a").click(function () {
		var icon = $(this).attr("rel");
		var element_index = $('#pj-skin a').index(this);
		$("#pj-skin a").removeClass("selected");
		$("#pj-skin a").eq(element_index).addClass("selected");
		$("#pj_skin").val(icon);
	});
	$("#htop-custom-tab-icon a").click(function () {
		var icon = $(this).attr("rel");
		var element_index = $('#htop-custom-tab-icon a').index(this);
		$("#htop-custom-tab-icon a").removeClass("selected-icon");
		$("#htop-custom-tab-icon a").eq(element_index).addClass("selected-icon");
		$("#htop_custom_tab_icon").val(icon);
	});
	$("#htop-info1-icon a").click(function () {
		var icon = $(this).attr("rel");
		var element_index = $('#htop-info1-icon a').index(this);
		$("#htop-info1-icon a").removeClass("selected-icon");
		$("#htop-info1-icon a").eq(element_index).addClass("selected-icon");
		$("#htop_info1_icon").val(icon);
	});
	$("#htop-info2-icon a").click(function () {
		var icon = $(this).attr("rel");
		var element_index = $('#htop-info2-icon a').index(this);
		$("#htop-info2-icon a").removeClass("selected-icon");
		$("#htop-info2-icon a").eq(element_index).addClass("selected-icon");
		$("#htop_info2_icon").val(icon);
	});
	$("#htop-custom-tab-link-icon a").click(function () {
		var icon = $(this).attr("rel");
		var element_index = $('#htop-custom-tab-link-icon a').index(this);
		$("#htop-custom-tab-link-icon a").removeClass("selected-icon");
		$("#htop-custom-tab-link-icon a").eq(element_index).addClass("selected-icon");
		$("#htop_custom_tab_link_icon").val(icon);
	});
	$("#menu-cat-icon-style-first a").click(function () {
		var icon = $(this).attr("rel");
		var element_index = $('#menu-cat-icon-style-first a').index(this);
		$("#menu-cat-icon-style-first a").removeClass("selected-icon");
		$("#menu-cat-icon-style-first a").eq(element_index).addClass("selected-icon");
		$("#menu_cat_icon_style_first").val(icon);
	});
	$("#menu-cat-icon-style-second a").click(function () {
		var icon = $(this).attr("rel");
		var element_index = $('#menu-cat-icon-style-second a').index(this);
		$("#menu-cat-icon-style-second a").removeClass("selected-icon");
		$("#menu-cat-icon-style-second a").eq(element_index).addClass("selected-icon");
		$("#menu_cat_icon_style_second").val(icon);
	});
	$("#pj-pctab-icon a").click(function () {
		var icon = $(this).attr("rel");
		var element_index = $('#pj-pctab-icon a').index(this);
		$("#pj-pctab-icon a").removeClass("selected-icon");
		$("#pj-pctab-icon a").eq(element_index).addClass("selected-icon");
		$("#pj_pctab_icon").val(icon);
	});
	$("#pj-nav-left a").click(function () {
		var icon = $(this).attr("rel");
		var element_index = $('#pj-nav-left a').index(this);
		$("#pj-nav-left a").removeClass("selected-icon");
		$("#pj-nav-left a").eq(element_index).addClass("selected-icon");
		$("#pj_nav_left").val(icon);
	});
	$("#pj-nav-right a").click(function () {
		var icon = $(this).attr("rel");
		var element_index = $('#pj-nav-right a').index(this);
		$("#pj-nav-right a").removeClass("selected-icon");
		$("#pj-nav-right a").eq(element_index).addClass("selected-icon");
		$("#pj_nav_right").val(icon);
	});
	$("#pj-social-icon1 a").click(function () {
		var icon = $(this).attr("rel");
		var element_index = $('#pj-social-icon1 a').index(this);
		$("#pj-social-icon1 a").removeClass("selected-icon");
		$("#pj-social-icon1 a").eq(element_index).addClass("selected-icon");
		$("#pj_social_icon1").val(icon);
	});
	$("#pj-social-icon2 a").click(function () {
		var icon = $(this).attr("rel");
		var element_index = $('#pj-social-icon2 a').index(this);
		$("#pj-social-icon2 a").removeClass("selected-icon");
		$("#pj-social-icon2 a").eq(element_index).addClass("selected-icon");
		$("#pj_social_icon2").val(icon);
	});
	$("#pj-social-icon3 a").click(function () {
		var icon = $(this).attr("rel");
		var element_index = $('#pj-social-icon3 a').index(this);
		$("#pj-social-icon3 a").removeClass("selected-icon");
		$("#pj-social-icon3 a").eq(element_index).addClass("selected-icon");
		$("#pj_social_icon3").val(icon);
	});
	$("#pj-social-icon4 a").click(function () {
		var icon = $(this).attr("rel");
		var element_index = $('#pj-social-icon4 a').index(this);
		$("#pj-social-icon4 a").removeClass("selected-icon");
		$("#pj-social-icon4 a").eq(element_index).addClass("selected-icon");
		$("#pj_social_icon4").val(icon);
	});
	$("#pj-social-icon5 a").click(function () {
		var icon = $(this).attr("rel");
		var element_index = $('#pj-social-icon5 a').index(this);
		$("#pj-social-icon5 a").removeClass("selected-icon");
		$("#pj-social-icon5 a").eq(element_index).addClass("selected-icon");
		$("#pj_social_icon5").val(icon);
	});
	$("#pj-social-icon6 a").click(function () {
		var icon = $(this).attr("rel");
		var element_index = $('#pj-social-icon6 a').index(this);
		$("#pj-social-icon6 a").removeClass("selected-icon");
		$("#pj-social-icon6 a").eq(element_index).addClass("selected-icon");
		$("#pj_social_icon6").val(icon);
	});
	$("#pj-social-icon7 a").click(function () {
		var icon = $(this).attr("rel");
		var element_index = $('#pj-social-icon7 a').index(this);
		$("#pj-social-icon7 a").removeClass("selected-icon");
		$("#pj-social-icon7 a").eq(element_index).addClass("selected-icon");
		$("#pj_social_icon7").val(icon);
	});
	$("#pj-social-icon8 a").click(function () {
		var icon = $(this).attr("rel");
		var element_index = $('#pj-social-icon8 a').index(this);
		$("#pj-social-icon8 a").removeClass("selected-icon");
		$("#pj-social-icon8 a").eq(element_index).addClass("selected-icon");
		$("#pj_social_icon8").val(icon);
	});
});