 //JavaScript Document
document.write('<script type="text/javascript" src="/js/slides.min.jquery.js"><\/script>');
document.write('<script type="text/javascript" src="/js/jquery.marquee.js"><\/script>');


$(document).ready(function(){


if (!$.browser.safari )
{

$("#top_slides").delay(500).slides({
generatePagination: false,
generateNextPrev: false,
fadeSpeed: 1200,
play: 12000,
pause: 2500,
hoverPause: true,
effect: 'fade',
bigTarget: false,
crossfade: true
});
} else 
{
$("img","#top_slides").hide();
}


$("#marquee").load("/news/index.html #m_col  > .news_atcl > a:lt(2)",rep); //表示させる数

function rep(){
var a=$(this).html();

a = a.replace(/<a/gi,"<li><a");
a = a.replace(/a>/g,"a></li>");
a = a.replace(/<h3>/g,"");
a = a.replace(/<\/h3>/g,"");

$(this).html(a)
marquee();
}



function marquee(){
$("#marquee").marquee(
{ 
yScroll: "bottom"  // the position of the marquee initially scroll (can be  
// either "top" or "bottom") 
, showSpeed: 1200 // the speed of to animate the initial dropdown of the messages 
, scrollSpeed: 12 // the speed of the scrolling (keep number low) 
, pauseSpeed: 9000 // the time to wait before showing the next message or  
// scrolling current message 
, pauseOnHover: true  // determine if we should pause on mouse hover 
, loop: -1   // determine how many times to loop through the marquees  
// (#'s < 0 = infinite) 
, fxEasingShow: "swing" // the animition easing to use when showing a new marquee 
, fxEasingScroll: "linear" // the animition easing to use when showing a new marquee 

// define the class statements 
, cssShowing: "marquee-showing" 

// event handlers 
, init: null  // callback that occurs when a marquee is initialized 
, beforeshow: null  // callback that occurs before message starts scrolling on screen 
, show: null  // callback that occurs when a new marquee message is displayed 
, aftershow: null // callback that occurs after the message has scrolled 
});
}


});//end ready

if ($.browser.safari )

$(window).load(function(){
$("img","#top_slides").show()

$("#top_slides").slides({
generatePagination: false,
generateNextPrev: false,
fadeSpeed: 1200,
play: 12000,
pause: 2500,
hoverPause: true,
effect: 'fade',
bigTarget: false,
crossfade: true
});
});
