(function(){
	/**
	 * 足跡設定
	 */
	function initFootprints(imgtag, facilities){
		var total = facilities.length;


		while(total){
			var d = facilities[total-1];
			if(d) {
				var e = d.append(imgtag);
				startloop(e.find('.location_footprint'));

			}
			--total;
		}
	}
	
	/**
	 * 足跡アニメーションループ
	 */
	function startloop(e){
		e.animate({opacity: 1.0}, {duration: 400})
        .animate({opacity: 0}, {duration: 400})
        .animate({opacity: 0}, {duration: 400})
        .animate({opacity: 1.0}, {duration: 400, complete: function(){startloop(e);}})
	}
	
		
	// ready
	$(function(){	   
		var src ="http://www.wanpara.jp/event/search/images/happy12_xmas_footprint.gif";
		
		var imgtag = "<img src='" + src + "' class='location_footprint' />";
		
		
		// 表示させる施設
		var facilities = [
			$("#foot"),
		];  
			   
		initFootprints(imgtag, facilities);
	});
})();


