
$(document).ready(function(){

	$(".popup_link a").click( function() {
        $(this).parent('p').hide();
        $(".popup_link_on").show();
        $("#popup_question").slideToggle();
		return false;
	} );

	$(".popup_link_on a").click( function() {
        $(this).parent('p').hide();
        $(".popup_link").show();
        $("#popup_question").slideToggle();
		return false;
	} );

	$(".popup_link a, .popup_link_on a").focus( function() {
		$(this).blur();
	} );

	if ($(".popup_link").length) {
    var text = $("#popup_question span.msg").html();
    if (text) {
    	$("#popup_question span.msg").hide();
    	$("#catalog_right #form span.msg").hide();
    	$("#popup_empty").after(text);
    }
    }

    if ($("a.fancy").length) {
    $("a.fancy").fancybox({
        hideOnContentClick: false,
    	overlayShow: true,
    	overlayOpacity: 0.5,
    	zoomSpeedIn: 1500,
    	zoomSpeedOut:600
    });
    }

});


