// 模組 - 相簿 首頁用
$(function(){
	var items = 5;
	$('ul[name="album_middle"]').each(function(){
		items = Math.floor($(this).width()/113);
	});
	$('ul[name="album_middle"]').carouFredSel({
		speed: 200,
		items:items,
		auto: 10000
	});

	$('ul[name="album_menu"]').carouFredSel({
		auto		: 8000,
		speed		: 200,
		items		: 1,
		direction	: "up"
	});

/*	$('.jCarouselLite').each(function(i){
		var num = $(this).find('li').length;
		if(num >= 1){
			if(num > 5) num = 5;
			$(this).jCarouselLite({
				btnNext: ".prev",
				btnPrev: ".next",
				auto: 5000,
				speed: 1000,
				scroll: 1,
				start:1,
				visible: num-1
			});
		}
		//else $('#jCarouselLiteDemo,.carousel,.jCarouselLite').show();
	});
*/
	/*
	$('.album_portal').each(function(i){
		var num = $(this).find('li').length;
		if(num > 4){
			$(this).jCarouselLite({
				btnNext: ".album_next",
				btnPrev: ".album_prev",
				auto: 5000,
				speed: 1000,
				scroll: 1,
				start:1,
				visible: 4
			});
		}
	});
	*/

	/*
	$('.album_portal_menu').each(function(i){
		var num = $(this).find('li').length;
		if(num > 1){
			$(this).jCarouselLite({
				btnNext: ".album_next",
				btnPrev: ".album_prev",
				vertical: true,
				auto: 5000,
				speed: 1000,
				scroll: 1,
				start:1,
				visible: 1
			});
		}
	});
	*/
});



function GET(k){
	var href = location.href.split('?');
	if(href.length >= 2){
		var	href2 = href[1].split('&');
		var v = '';
		for(var idx in href2){
			var href3 = href2[idx].split('=');
			if(href3[0]==k) var v=href3[1];
		}
		if(v != '') return v;
		else return false;
	}
	else return false;
}
