$(document).ready(function() {
    $('input[placeholder]').placeholder();
	$(".sliding-block .button").click(function(){
		var parent = $(this).parents(".sliding-block");
		if (parent.hasClass("expanded")) {
			parent.removeClass("expanded");
		}
		else {
			parent.addClass("expanded");
		}
		return false;
	});
	$(".content-tabs a").click(function(){
		$(".content-tabs a").removeClass("active");
		$(this).addClass("active");
		return false;
	});
	$("#itn .switching-block .button").click(function(){
        $("#itn .switching-block").removeClass("active");
        $(this).parents("#itn .switching-block").addClass("active");
		return false;
    });
    $("#itn .switching-block .close-cross").click(function(){
		$(this).parents("#itn .switching-block").removeClass("active");
		return false;
    });
	$("#tvt .switching-block .button").click(function(){
        $("#tvt .switching-block").removeClass("active");
        $(this).parents("#tvt .switching-block").addClass("active");
		return false;
    });
    $("#tvt .switching-block .close-cross").click(function(){
		$(this).parents("#tvt .switching-block").removeClass("active");
		return false;
    });
	$(".info-help").click(function(){
        var popup = $(this).next();
		if(popup.css('display') == 'none'){
			$("DIV.popup").css('display','none');
			popup.css('display', 'block');
		}else popup.css('display', 'none');
        var height = popup.children(".block").height() + 20;
        popup.children(".shadow").css('height', height);
	});
	$(".info-help1").click(function(){
        $(this).parent().find("DIV.popup").toggle();
        /*var height = popup.children(".block").height() + 20;
        popup.children(".shadow").css('height', height);*/
	});
	$(".popup .exit").click(function(){
		$(this).parent(".popup").css('display', 'none');
	});
	$('input[placeholder]').placeholder();
    $(".arowed-block").click(function(){
        $(this).toggleClass("expanded");
		if($(this).hasClass("expanded"))$(this).next().show(); else $(this).next().hide();
    });
});
