$(function()
{
	
	
	// NEW ARTISTS
	if ($('#scrollContent_artists')) {
		$('#scrollContent_artists').jScrollPane({scrollbarWidth:4, scrollbarMargin:10});
            
        $(window).resize(function(){
			$('#scrollContent_artists').jScrollPaneRemove();
		   	$('#scrollContent_artists').jScrollPane({scrollbarWidth:4,scrollbarMargin:10});
		});	
		
		$('#sidebar-artists td img').tooltip({ 
			track: true, 
			delay: 0, 
			showURL: false, 
			showBody: " # ",
			extraClass: "image-scroller-tooltip", 
			fade: 250,
			bodyHandler: function() {
				return $($(this).attr("id")).html();
			}
		});
	}
	
	// BLOGS
    if ($('#scrollContent_blogs')) {
		$('#scrollContent_blogs').jScrollPane({scrollbarWidth:4, scrollbarMargin:10});
            
        $(window).resize(function(){
			$('#scrollContent_blogs').jScrollPaneRemove();
		   	$('#scrollContent_blogs').jScrollPane({scrollbarWidth:4,scrollbarMargin:10});
		});	
		
		$('#sidebar-blogs td img').tooltip({ 
			track: true, 
			delay: 0, 
			showURL: false, 
			showBody: " # ",
			extraClass: "image-scroller-tooltip", 
			fade: 250,
			bodyHandler: function() {
				return $($(this).attr("id")).html();
			}
		});
		
    }
    
    // PORTFOLIOS
    if ($('#scrollContent_portfolios')) {
		$('#scrollContent_portfolios').jScrollPane({scrollbarWidth:4, scrollbarMargin:10});
        
        $(window).resize(function() {
			$('#scrollContent_portfolios').jScrollPaneRemove();
		   	$('#scrollContent_portfolios').jScrollPane({scrollbarWidth:4,scrollbarMargin:10});
		});
    
        $('#sidebar-portfolios a').tooltip({ 
			track: true, 
			delay: 0, 
			showURL: false, 
			showBody: " # ",
			extraClass: "image-scroller-tooltip", 
			fade: 250,
			bodyHandler: function() {
				return $($(this).attr("id")).html();
			}
		});	
    }
    
    // NEW ARTICLES
	if ($('#scrollContent_article')) {
		$('#scrollContent_article').jScrollPane({scrollbarWidth:4,scrollbarMargin:10});
            
        $(window).resize(function() {
			$('#scrollContent_article').jScrollPaneRemove();
		   	$('#scrollContent_article').jScrollPane({scrollbarWidth:4,scrollbarMargin:10});
		});
		
		$('#scrollContent_artists').jScrollPaneRemove();
		$('#scrollContent_artists').jScrollPane({scrollbarWidth:4,scrollbarMargin:10});
	}
    
});
