jQuery.noConflict();
var $j=jQuery;
$j(document).ready(function() {

    $j("#register .sidebar-content2").hide();

    $j('#register .head-img').click(function() {
        $j("#register .sidebar-content2").slideToggle();
    });

    $j("#controller").jFlow({
        slides:"#slides",
        width:"893px",
        height:"283px",
        duration:900,
        pause:6000,
        auto:true
    });
    $j('#prevNext a.prev').tooltip({
        track: true,
        delay: 0,
        showURL: false,
        fade: 250,
        top: -10,
        left: 15});
    $j('#prevNext a.next').tooltip({
        track: true,
        delay: 0,
        showURL: false,
        fade: 250,
        top: -10,
        left: -60});

    $("#uestion-form").live("click",
        function(e)
        {
            e.preventDefault();
            //var data = $(this).serialize(); // serialize form fields
            var data = "requesttype=1";
            $.post($(this).attr('action'), data,
                function(response) { // post to “action”
                    $("#question").hide()
                    .fadeOut('slow', function() {
                        $("#question").html(response)
                        .fadeIn('slow');
                    });

                });
            return false;
        }
    );


});

function windowOpener(windowHeight, windowWidth, windowName, windowUri)
{
    var centerWidth = (window.screen.width - windowWidth) / 2;
    var centerHeight = (window.screen.height - windowHeight) / 2;

    newWindow = window.open(windowUri, windowName, 'resizable=0,width=' + windowWidth +
        ',height=' + windowHeight +
        ',left=' + centerWidth +
        ',top=' + centerHeight);

    newWindow.focus();
    return newWindow.name;
}

