﻿// section hover behavior
$(document).ready(function () {

    var s = "fast";
    // fixes some occasional visual glitches when user moves mouse over/out of the section
    function resetHeight() {
        $(this).height('auto');
    }

    function slide1() {
        $(this).width('300px');
    }

    $(".section").hover(function () {
        $(this)
			    .find('h2').stop().slideUp(s, resetHeight).end()
			    .find('.contents').stop().slideDown(s, resetHeight);
    }, function () {
        $(this)
			        .find('h2').stop().slideDown(s, resetHeight).end()
			        .find('.contents').stop().slideUp(s, resetHeight);
    });

    $(".sections").show();

    $("#whichbookSlider").click(function () {
        $(this).width('300px');
    });

});
