$(function() {
	$('#rotate > ul').tabs({ fx: { opacity: 'toggle' } }).tabs('rotate', 0);
});			
$(document).ready(function() {
	$('.size-nor').click(function(){
		$(".entry").addClass("normal-size");
		$(".entry").removeClass("big-size");
	});
	$('.size-big').click(function(){
		$(".entry").addClass("big-size");
		$(".entry").removeClass("normal-size");
	});

	$('.qs-title-home a').click(function(){
		$("#cat-nav li").removeClass("active");
		$("li.qs-title-home").hide();
		$("li.cat-0").show().addClass("active");
		$('#qsblock').hide();
		$('#tab-content-post').fadeIn(800);
		$(".applyalt li").removeClass("alternative");
		$(".applyalt li:odd").addClass("alternative");
		return false;
	});
	$('.cat-1 a').click(function(){
		$.ajax({
		url : "wp-content/themes/D-Z-Theme-Pro_CP_Online/wp-research.php",
		type: 'POST',
		beforeSend: function() {
		$("#cat-nav li").removeClass("active");
		$("li.cat-0").hide();
		$("li.qs-title-home").show();
		$("li.cat-1").addClass("active");
		$('#tab-content-post').hide();
		$('#qs-area').empty();
		$('#qsblock').show();
		$('#qs-info').fadeIn(500);
		},
		success : function (data) {
		$('#qs-info').hide();
		$("#qs-area").html(data).slideDown(1000);
		}
		});
		return false;
	});
	$('.cat-2 a').click(function(){
		$.ajax({
		url : "wp-content/themes/D-Z-Theme-Pro_CP_Online/wp-template.php",
		type: 'POST',
		beforeSend: function() {
		$("#cat-nav li").removeClass("active");
		$("li.cat-0").hide();
		$("li.qs-title-home").show();
		$("li.cat-2").addClass("active");
		$('#tab-content-post').hide();
		$('#qs-area').empty();
		$('#qsblock').show();
		$('#qs-info').fadeIn(500);
		},
		success : function (data) {
		$('#qs-info').hide();
		$("#qs-area").html(data).slideDown(1000);
		}
		});
		return false;
	});
	$('.cat-3 a').click(function(){
		$.ajax({
		url : "wp-content/themes/D-Z-Theme-Pro_CP_Online/wp-plugins.php",
		type: 'POST',
		beforeSend: function() {
		$("#cat-nav li").removeClass("active");
		$("li.cat-0").hide();
		$("li.qs-title-home").show();
		$("li.cat-3").addClass("active");
		$('#tab-content-post').hide();
		$('#qs-area').empty();
		$('#qsblock').show();
		$('#qs-info').fadeIn(500);
		},
		success : function (data) {
		$('#qs-info').hide();
		$("#qs-area").html(data).slideDown(1000);
		}
		});
		return false;
	});
	$('.cat-4 a').click(function(){
		$.ajax({
		url : "wp-content/themes/D-Z-Theme-Pro_CP_Online/my-life.php",
		type: 'POST',
		beforeSend: function() {
		$("#cat-nav li").removeClass("active");
		$("li.cat-0").hide();
		$("li.qs-title-home").show();
		$("li.cat-4").addClass("active");
		$('#tab-content-post').hide();
		$('#qs-area').empty();
		$('#qsblock').show();
		$('#qs-info').fadeIn(500);
		},
		success : function (data) {
		$('#qs-info').hide();
		$("#qs-area").html(data).slideDown(1000);
		}
		});
		return false;
	});
});		
$(document).ready(function(){
  $('a[href*=#]').click(function() {
	if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'')
	&& location.hostname == this.hostname) {
	  var $target = $(this.hash);
	  $target = $target.length && $target 
	  || $('[name=' + this.hash.slice(1) +']');
	  if ($target.length) {
		var targetOffset = $target.offset().top;
		$('html,body')
		.animate({scrollTop: targetOffset}, 1000);
	   return false;
	  }
	}
  });

});