$().ready(function() {
    $("ul.report-list li:even").addClass("alt");
    $("input[type='radio']").addClass("radio");
    $("div.questionbox").mouseover(function() { $(this).addClass("over"); }).mouseout(function() { $(this).removeClass("over"); });
    $("div.QuestionHide").mouseover(function() { $(this).addClass("over"); }).mouseout(function() { $(this).removeClass("over"); });
    $(document).ready(function() {
        $('.report-tools ul').prepend('<li class="print"><a href="#print" <span class="artprint">Print Report</span></a></li>');
        $('.report-tools ul li.print').click(function() {
            window.print();
            return false;
        });
    });

});


this.imagePreview = function() {
    /* CONFIG */

    xOffset = 10;
    yOffset = 30;

    // these 2 variable determine popup's distance from the cursor
    // you might want to adjust to get the right result

    /* END CONFIG */
    $("a.preview").hover(function(e) {
        this.t = this.title;
        this.title = "";
        var c = (this.t != "") ? "<br/>" + this.t : "";
        $("body").append("<p id='preview'><img src='" + this.href + "' alt='Image preview' />" + c + "</p>");
        $("#preview")
			.css("top", (e.pageY - xOffset) + "px")
			.css("left", (e.pageX + yOffset) + "px")
			.fadeIn("fast");
    },
	function() {
	    this.title = this.t;
	    $("#preview").remove();
	});
    $("a.preview").mousemove(function(e) {
        $("#preview")
			.css("top", (e.pageY - xOffset) + "px")
			.css("left", (e.pageX + yOffset) + "px");
    });
};


// starting the script on page load
$(document).ready(function() {
    imagePreview();
});






var nextPage = "SaveTimeStamp.aspx?ReturnURL=selfAssessment_Test.aspx";
$(function() {
    $('#slideshow1').cycle();
    function onBefore() {
        $('#title').html(this.alt);
    }
});

$().ready(function() {
$('A[rel="external"]').click(function() {
window.open($(this).attr('href'));
return false
})
});

function ShowDiv(id) {
    setCookie(id, 'visible');
    $('#' + id).show();
}
function HideDiv(id) {
    setCookie(id, 'hidden');
    $('#' + id).hide();
}
function setCookie(id, value) {
    $.cookie(id, value);
}

function Toggle(id) {
    if ($.cookie(id) == 'visible') {
        ShowDiv(id);
    }
    else {
        HideDiv(id);
    }
}



