$(document).ready(function(){
 $("#wrap").addClass("wrapClose").fadeTo("fast",0.6);
 $("#aarr").click(function(){
  var wrap = $("#wrap");
  if(wrap.hasClass("wrapClose")) {
    wrap.animate({width:274},1500).removeClass("wrapClose").addClass("wrapOpen");
    $('.scroll-wrap').show();
    $('#scroll-inner,#scrollBot,#scrollTop').fadeTo("fast",1);
  }else{
    wrap.animate({width:24},1500).removeClass("wrapOpen").addClass("wrapClose");
    $('.scroll-wrap').hide();
  }

 var scrollHeight = parseInt($("#cont").innerHeight());
 
 
 $("#scrollTop a").bind("mouseover",function(e){$("#cont").stop().animate({marginTop:'0px'},{duration:5000})});
 $("#scrollTop a").bind("mouseout",function(e){ $("#cont").stop()});

 $("#scrollBot a").bind("mouseenter",function(e){
   var mTop = 410-scrollHeight; //alert(mTop);
   //$("#cont").stop().scrollTo(mTop, 800, {axis:'y',margin:true} );
   $("#cont").stop().animate({marginTop:mTop+'px'},{duration:5000});
 });
 $("#scrollBot a").bind("mouseout",function(e){ $("#cont").stop()});

 });
});

// JavaScript Document
var images=new Array();
function IMGPreload(){
	for (i=0; i<IMGPreload.arguments.length; i++){
		images[i]=new Image()
		images[i].src=IMGPreload.arguments[i]
	}
}
IMGPreload(
	"/images/pics/arr.gif"
)
function openclose(subdivid){
	var div1 = document.getElementById("sub1");	
	var div2 = document.getElementById("sub2");
	var div  = document.getElementById("sub"+subdivid);
	var a1div = document.getElementById("a1");
	var a2div = document.getElementById("a2");
	
	if(div.style.display == 'none') {div.style.display = "block";}
	else {div.style.display = "none";}
	if(subdivid==1){div2.style.display = "none"; a1div.className = "sub";a2div.className = "";}
	if(subdivid==2){div1.style.display = "none"; a2div.className = "sub";a1div.className = "";}	
}

