// JavaScript Document
$('.thumb_backer').fadeTo('fast', 0); 
$('.thumb_backer').removeClass('hide');

/*$('.contentHolder').fadeIn(1500, function () {
          $('#makeMeScrollable').fadeIn(1000, function () {
          });
          return false;
        }); 
*/
$(function() {
		   
	var ct = $('.scrollableArea').find('ul').children().size(); 
	var s_len = (ct) * 130 ;
	$('.scrollableArea').find('ul').css("width", s_len);
});

/*$(function() {
		   
		   $("div#makeMeScrollable").smoothDivScroll({scrollingSpeed: 1, mouseDownSpeedBooster: 3, autoScroll: "", visibleHotSpots: "always", hotSpotsVisibleTime: 10000 });
			
		});*/
/*
			$("div#makeMeScrollable").smoothDivScroll({scrollingSpeed: 1, scrollStep:1, scrollInterval:10, mouseDownSpeedBooster: 1, autoScroll: "onstart", autoScrollDirection: "backandforth", autoScrollSpeed: 1, visibleHotSpots: "always", hotSpotsVisibleTime: 2000});
			
});*/
		
$('.detailPics').find('a').hover(
	  function () {
	    var thisThumb = $(this).attr('id').substr(1);
		$('#detailPics-popup').find('div').hide();
		$('#detailPics-popup').find('#pop'+thisThumb).show();
	  },
	  function () {
	    $('#detailPics-popup').find('div').hide();
	  }
	);
					   


	$('#extra_pics').css({marginRight: '-160px'});					   
$(function(){
	$('#extra_pics').hover(function(){
			$('#detailPics-popup').fadeIn('slow');
			$(this).animate({marginRight: "10px"}, {queue:false, duration:450});
      },function() {
		    $(this).animate({marginRight: "-160px"}, {queue:false, duration:450});
		    $('#detailPics-popup').hide();
    });
});



$('.thumb_box').hover(
  function () {
	 $(this).find('.thumb_backer').fadeTo('slow', 0.6); 
  }, 
  function () {
	 $(this).find('.thumb_backer').fadeTo('fast', 0); 

	}
);


$('.question').hover(
  function () {
	Ppos = $(this).position();
	$(this).css({'background-color' : '#51002F' });
	$popup = $(this).find('.q_popup');
	
	ht = ('-'+($popup.height() + 40) +'px') ;
//	$popup.css({'margin-top' : ht , 'left' : Ppos.left });
    $popup.show();
  }, 
  function () {
    $popup.hide();
	$(this).css({'background-color' : '#666' });

  }
);


$('#list_left').accordion({
	active: true, 
	autoheight: false,
	navigation: true,
	collapsible: true
	
});

$('#list_right').accordion({
	active: true, 
	autoheight: false,
	navigation: true,
	collapsible: true
});

$(".basic").find('a').click(function(event){
		  window.location.hash=this.hash;
});
//$('.menuHolder').find('li a:last').css('border-right' , 'none');



$("em.deselected").click(function(event){
		dest = '/page/'+ $(this).attr('id');
		window.location = dest;
});
