$(document).ready(function(){
	$(window).resize(function(){
		$('#scrollpane').jScrollHorizontalPane({scrollbarHeight:35, scrollbarMargin:0, showArrows:false, resize:true});
		$('#innerscroll').jScrollHorizontalPane({scrollbarHeight:35, scrollbarMargin:0, showArrows:false, resize:true});
	});
	
	$('#scrollpane').jScrollHorizontalPane({scrollbarHeight:35, scrollbarMargin:0, showArrows:false, resize:true});
	$('#innerscroll').jScrollHorizontalPane({scrollbarHeight:35, scrollbarMargin:0, showArrows:false, resize:true});
	
	$("a.fancy").fancybox({ 
	    overlayShow: true,
	    overlayOpacity: 0.8, 
	    zoomOpacity: true, 
	    zoomSpeedIn: 300,
	    frameWidth: 500,
	    frameHeight: 420,
	    padding: 2,
	    hideOnContentClick: true
    });
    
    
    $("a.fancyVideo").fancybox({
        overlayShow: true,
        overlayOpacity: 0.8,
        zoomOpacity: true,
        zoomSpeedIn: 300,
        frameWidth: 360,
        frameHeight: 288,
        padding: 2,
        hideOnContentClick: false
    });
    
    
    $('#scrollpane dl').hover(function() {
        $(this).find('.clickToEnlarge').html("click to enlarge");
        $(this).find('.clickToEnlarge').fadeIn(200);
    }, function() {
        $(this).find('.clickToEnlarge').fadeOut(200);
        $(this).find('.clickToEnlarge').queue(function(){
            $(this).find('.clickToEnlarge').html("");
            $(this).dequeue();
        });
    });


});