$(document).ready(function(){
					   

$(".memberLogin").colorbox({iframe:true, innerWidth:900, innerHeight:500});
$('.center2').scrollbar();




//------MANAGE SLIDESHOW-------------------
$("div.scrollableArea a").each(function(i){
										
							$(this).replaceWith($(this).html());		  
									  
									  });



$("div#mySlide").parent().addClass("center2Photo");
$(".newline").before("<div style='width:100%;clear:both;'></div>");
$("div#mySlide img").each(function(i){
								   
								   var h =$(this).attr("height");
									var w =$(this).attr("width");
									//alert(h + " " + w);
									var sizePerc = 359/$(this).attr("height");
									var newH = h * sizePerc; 
									var newW = w * sizePerc; 
									//alert(newH + " " + newW);
								   
					$(this).css("height",newH);
					$(this).css("width",newW);
							
								   });



$("div#mySlide").smoothDivScroll({ 
								autoScroll: "onstart", 
								autoScrollDirection: "backandforth",
								autoScrollStep: 1,
								autoScrollInterval: 15,
								visibleHotSpots: "always" 
								});

//Hide scroll bar on slideshows
if ($(".center2Photo").html() != null){
		$('.center2').addClass("noOverflow");
		$('.scrollbar-handle-container').remove();
		$('.scrollbar-handle-up').remove();
		$('.scrollbar-handle-down').remove();
		$('.scrollbar-pane').css("padding","0");
}





  
 });

function tubeScroll(){
	$('.center2').addClass("noOverflow");
	$('.scrollbar-handle-container').remove();
	$('.scrollbar-handle-up').remove();
	$('.scrollbar-handle-down').remove();
	$('.tubepress_thumbnail_area').scrollbar();	
	$('.scrollbar-pane').css("padding","0");
}


