function handleJquery(){    

    handleWindowScrollbars();
    
    $("#icons-email").hover(
      function () { $("#roll-email").fadeIn('slow');  }, 
      function () { $("#roll-email").fadeOut('fast'); }
    );

    $("#icons-address").hover(
      function () { $("#roll-address").fadeIn('slow');  }, 
      function () { $("#roll-address").fadeOut('fast'); }
    );

    $("#icons-phone").hover(
      function () { $("#roll-phone").fadeIn('slow');  }, 
      function () { $("#roll-phone").fadeOut('fast'); }
    );

    $('.reveal-checkout-with-account').click(function(){
		$("#checkout-without-account").fadeTo("fast", 0);
		$("#checkout-without-account").css("display", 'none');
		$("#checkout-with-account").fadeIn();
        $("#checkout-with-account").css("display", 'block');
 	});
 	
    $('.reveal-checkout-without-account').click(function(){
		$("#checkout-with-account").fadeTo("fast", 0);
        $("#checkout-with-account").css("display", 'none');

        $("#checkout-without-account").fadeTo("fast", 1.0);
        $("#checkout-without-account").css("display", 'block');
 	});
 	
    /*********************************************************
       Slideshow 
    *********************************************************/
    var slideshowSpeed = 800;
    var slideshowTimeout = 4000;    
    
    $('.gallery').cycle({ 
        fx:      'fade', 
        speed:    slideshowSpeed, 
        timeout:  0,
        continuous: 0, // set this to 0 so timeout will work
        slideExpr: 'li.gallery-item',
        cleartype: '1',
        next: '.slideshow-next',
        prev: '.slideshow-prev',
        pager: '#pane-target',
        pagerEvent: 'mouseover',

        pagerAnchorBuilder: function(idx, slide) { 
            // return selector string for existing anchor 
            return '#pane-target li:eq(' + idx + ') a'; 
        }
    });
};

function close_item_cart_overlay(){
    $("#item-cart-overlay").slideUp('slow');
}

function handleWindowScrollbars(){
    /*********************************************************
        Window Height Resize
    *********************************************************/ 
    var WindowHeight = $(window).height();
    
    if (WindowHeight < 700){
        $("#RightPane").css("overflow-y", 'auto' );
        $("body").css("overflow-y", 'auto' );        
    } else {
        $("#RightPane").css("overflow-y", 'hidden' );        
        $("body").css("overflow-y", 'hidden' );        
    }
      
    $(window).bind("resize", resizeWindow);
    function resizeWindow( e ) {
        var newWindowHeight = $(window).height();
        
        if (newWindowHeight < 700){
            $("#RightPane").css("overflow-y", 'auto' );
            $("body").css("overflow-y", 'auto' );  
        } else {
            $("#RightPane").css("overflow-y", 'hidden' );   
            $("body").css("overflow-y", 'hidden' );         
        }
        
        var newWindowWidth = $(window).width();
        
        if (newWindowWidth < 960){
            $("body").css("overflow-x", 'auto' );  
        } else {
            $("body").css("overflow-x", 'hidden' );         
        }
    }
    
    /*********************************************************
        Window Width Resize
    *********************************************************/ 
    var WindowWidth = $(window).width();
    
    if (WindowWidth < 960){
        $("body").css("overflow-x", 'auto' );        
    } else {     
        $("body").css("overflow-x", 'hidden' );        
    }
    
    return false;
}  
