$(document).ready(function() {
	$("#main a img").hover(
		function() { $(this).stop(); $(this).animate({ opacity:0.65 }, 150); },
		function() { $(this).stop(); $(this).animate({ opacity:1 }, 250);}
	);
	$("#header a img").hover(
		function() { $(this).stop(); $(this).animate({ opacity:0.65 }, 150); },
		function() { $(this).stop(); $(this).animate({ opacity:1 }, 250);}
	);
	$("#pagetop a img").hover(
		function() { $(this).stop(); $(this).animate({ opacity:0.65 }, 150); },
		function() { $(this).stop(); $(this).animate({ opacity:1 }, 250);}
	);
	$("#rightConts a img").hover(
		function() { $(this).stop(); $(this).animate({ opacity:0.65 }, 150); },
		function() { $(this).stop(); $(this).animate({ opacity:1 }, 250);}
	);
	$("#fBan a img").hover(
		function() { $(this).stop(); $(this).animate({ opacity:0.65 }, 150); },
		function() { $(this).stop(); $(this).animate({ opacity:1 }, 250);}
	);
	$("#infoConts a img").hover(
		function() { $(this).stop(); $(this).animate({ opacity:0.65 }, 150); },
		function() { $(this).stop(); $(this).animate({ opacity:1 }, 250);}
	);



/*
	var linkboxes = $(".linkbox");
	for (var i=0; i<linkboxes.length; i++){
		var readmores = $("dt.links");
		for (var j=0; j<readmores.length; j++){
			$(".linkbox").click(function() {
				var anchorTags = this.getElementsByTagName("a");
				window.location = anchorTags[0].href;
			});
		}
	}
	$("dt.links").addClass("none");		
	$(".linkbox").hover(function(){
		$(this).addClass("box_hover");	
	},
	function(){
		$(this).removeClass("box_hover");	
	});
*/

	if($("#ticker").get(0) != undefined) {
		$.ajax({
			type:"GET",
			url:"/data.xml",
			dataType:"xml",
 			success: function(xml) { parseXml(xml); }
	  });
	};


	if($("#flash_box").get(0) != undefined) {
		$('#flash_box_link').fancyZoom();
		$('#flash_box_link2').fancyZoom();
	};


	function parseXml(xml){

		$(xml).find("item").each(function(){
			var _title = $(this).find('title').text();
			var _detail = $(this).find('detail').text();
			var _link = $(this).find('link').text();
			var _target = $(this).find('target').text();
			var item_text = '';
			item_text = '<li><a href="' + _link + '" target="' + _target + '"><strong>' + _title + '</strong>　：　' + _detail + '</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</li>';
			$("#ticker").append(item_text);
		});
		$("#ticker").jStockTicker({interval: 20}); 
	}




});
