$effect=null;
$(document).ready(function () {
/*
	var run=false;
	$effect=function(i){
		if(!run){
			run=true;
			$(".effect-container:display").hide();
			$(".effect-container:eq("+i+")").fadeIn(1500,function(){
				run=false;
				$("ul.menu-hide a").removeClass("selected2");
				$("ul.menu-hide a").each(function(){
					if(parseInt($(this).parent().attr("id").split("-")[1])==(i+1))
						$(this).addClass("selected2");
				});
				$(this).show();
			});
		}
	};
	var url=window.location.href;
	if(url.indexOf("#")!=-1){
		var i=parseInt(url.split("#")[1]);
		$effect(i);
	}else{
		if($(".effect-container-default").length==0)
			$effect(0);
	}
	$("#menu-footer a").each(function(i){
		$(this).attr("href","javascript:$effect("+i+");");
	});
	
	$("div.scrollable-container").each(function(){
		var cls=$(this).attr("class");
		var w=676;
		var pageSize=1;
		if(cls.toLowerCase().indexOf("scrollable-pagesize-")!=-1)
			pageSize=parseInt(cls.replace(/^(.*)(scrollable-pagesize-)([0-9]+)(.*)$/gi,"$3"));
		var sc=$('<a class="prevPage"></a><div class="scrollable"><div class="items"></div></div><a class="nextPage"></a>');
		$(this).children().each(function(){
			$("div.items",sc).append($("<div style='width:"+(w/pageSize)+"px;overflow:hidden;'></div>").append($(this)));
		});
		$(this).append(sc);
		$("div.scrollable",$(this)).scrollable({size:pageSize});
	});
	$(".effect-container").each(function(){
		var sc=$("div.scrollable",$(this));
		if(sc.length>0) sc.scrollable(0).move(0);
	});
*/
	$('.scroll-pane').each(function(){
		$(this).show();
		var w=0;
		$(".scroll-pane-container>*",$(this)).each(function(){
			w+=$(this).width();
		});
		$(".scroll-pane-container",$(this)).width(w);
		if($.browser.msie)
			$(this).css("overflow","hidden");
		$(this).width(650).height(300).jScrollHorizontalPane({showArrows:true,dragMaxWidth:32});
		//$(this).parent().parent().hide();
		$(this).parent().css("left",$.browser.msie?"-70px":"30px");

	});

});