var numb = [];
var s=1;
var old;

while (s<=6) 
{numb[s] = 0;
s++;
}


function open_div(id, num) {
var i=1;
var d=0;

  while (i<=6) {
  
    if (i!=num) {$('#div'+i).slideUp(300);
	numb[i] == 0;}
	i++;
	}
  
  $('#div'+num).slideToggle(300);   
}

function all_hide() {
var i=1;

	while (i<=6) {
	$('#div'+i).slideUp(0);
//	document.getElementById('div'+i).style.display = 'block';
	i++;
	}

}



var wW = null;
$(document).ready( function() {

	wW = $('#allworks').width() - 510;
	$('#btn-wleft').click( function() { wMove(1) });
	$('#btn-wright').click( function() { wMove(-1) });
	$('.hmenu li').mouseover( function() { $(this).children('.hs').show(); } ).mouseout( function() { $(this).children('.hs').hide(); } );

});

function wMove( dir)
{
	var pos = $('#allworks').position()
	pos = pos.left + dir*510;
	if( pos < -wW || pos > 0 ) return;
	$('#allworks').animate( {left:pos}, 500 );
}

