var $j = jQuery.noConflict();

$j(function(){

    var hiddenSidebarPosition = '0px';
    var w;

    showSidebar = function(){
    	$j('#sidebar_tween_wrapper').stop().animate({
    		left: "0px"
    	}, 100);
    };
    
    hideSidebar = function() {
        if( w.width() <= 1152 )
        {
    	   $j('#sidebar_tween_wrapper').stop().animate({
    	       	left: hiddenSidebarPosition
    	   }, 100);
        }
    }
    
    onWindowResize = function()
    {
        if( w.width() > 1152 )
        {
            showSidebar();
        }
        else
        {
            hideSidebar();
        }
    }
    
    $j("#sidebar_tween_wrapper").hover(showSidebar, hideSidebar);
    
    hiddenSidebarPosition = $j('#sidebar_tween_wrapper').css('left');
    w = $j(window);
    w.resize(onWindowResize);
    
    onWindowResize();
});
