$(document).ready(function(){

	$("#top-nav li:has(ul)").addClass("root").find("a:first").addClass("sub");
	$(".current-menu-parent#menu-item-70").removeClass("root");
	
	$("#top-nav li.root").hover(function () {
		$(this).children('ul:hidden').slideDown(500); 
	
		},function(){
			$(this).children('ul:visible').slideUp(500);
    	}
    )

$(".slidetabs").tabs(".slider > div", {
	effect: 'fade',
	rotate: true,
	clickable: false,
	fadeInSpeed: 'slow',
	fadeOutSpeed: 'slow'
}).slideshow({interval: 5000, autoplay: true, clickable: false});

$('#home-content .txt').columnize({ columns: 3 });


$("div.scrollable").scrollable({size: 7});
$(".items img").click(function() { 
 
    var url = $(this).attr("alt");
    var wrap = $("#image-wrapper").fadeTo("medium", 0.5); 
    var img = new Image(); 
    img.onload = function() { 
        wrap.fadeTo("medium", 1); 
        wrap.find("img").attr("src", url); 
 
    }; 
    img.src = url; 
	
}).filter(":first").click();


});
