(jQuery)(document).ready(function(){
  (jQuery)("#content-slider33").slider({
	    animate: false,
    	change: handleSliderChange,
	    slide: handleSliderSlide
  	});
	
// setup graphic EQ
		(jQuery)("#eq > .recent_post #content-slider").each(function() {
			(jQuery)( this ).slider({
				animate: false,
    			change: handleSliderSlide,
		    	slide: handleSliderSlide
			});
		});	
	
});

function handleSliderChange(e, ui)
{
  var maxScroll = (jQuery)(this).parent().find("#content-scroll").attr("scrollWidth") - (jQuery)(this).parent().find("#content-scroll").width();
  (jQuery)(this).parent().find('#content-scroll').animate({scrollLeft: ui.value * ((maxScroll-20) / 100) }, 1000);
}

function handleSliderSlide(e, ui)
{
  var maxScroll = (jQuery)(this).parent().find("#content-scroll").attr("scrollWidth") - (jQuery)(this).parent().find("#content-scroll").width();
  (jQuery)(this).parent().find("#content-scroll").attr({scrollLeft: ui.value * ((maxScroll-20) / 100) });
}


(jQuery)(document).ready(function(){
	
	(jQuery)(".toggler").click(function(){
		(jQuery)("#eq").toggleClass("closed");
	});
	
	(jQuery)(".social_tabs > .tab").each(function() {
		(jQuery)( this ).click(function(){

			(jQuery)("#eq .active").each(function() { (jQuery)( this ).toggleClass("active"); });
			
			(jQuery)( this ).toggleClass("active");
			(jQuery)(".recent_post."+(jQuery)( this ).attr("id")).toggleClass("active");
			
			(jQuery)("#eq").removeClass("closed");
		});
	});	
	
});
