//closure wrap ensures no conflict with any other potential libraries
(function($){
	$(document).ready(function(){

		$(".linkIntBar a:first").addClass("active");
		$(".ConainerConets").children("div").removeClass("activePanel");

		$(".ConainerConets").children("div:first").addClass("activePanel").fadeIn("slow");

		$(".linkIntBar li").each(function(i) { $(this).attr("data-tabid", i); });
		$(".ConainerConets").children("div").each(function(i) { $(this).attr("data-panelid", i); });

		$(".linkIntBar a").click(function() {
			if(!$(this).hasClass("active")) {
				var id = $(this).closest("li").attr("data-tabid");

				$(".linkIntBar a.active").removeClass("active");
				$(this).addClass("active");

				
				$(".ConainerConets div.activePanel").removeClass("activePanel");
				$(".ConainerConets div[data-panelid='" + id + "']").addClass("activePanel").fadeIn("slow");
			}
			return false;
		});

	});
})(jQuery)
