
(function($) {

		if((navigator.userAgent.match(/iPhone/i)) || (navigator.userAgent.match(/iPod/i)) || (navigator.userAgent.match(/iPad/i)) || (navigator.userAgent.match(/Android/i))) {var istouch = 1; }else{ var istouch = 0; };
		
	$(function() {
		
		if(istouch){ 
			$(" .slideone").css({"width":640,"height":264});
			$(" .slideYT iframe").width(640).height(264).css({"width":640,"height":264});
		};
		
		$('#slides').slides({
			preload: true,
			preloadImage: 'http://gnuoyp.jp/img/slide/loading.gif',
			play: false,
			start: 4,
			slideEasing: "easeOutQuad",
			pause: 7500,
			generatePagination: false,
			hoverPause: true
		});
		$('#slides').hover(function(){ 
		}, function(){ 
		});
		
		$(".slideYT").click(function(){ 
			var iframeQ =$(this).find("iframe");
			iframeQ.hide();
			var iframeQu = iframeQ.attr("src") + "&autoplay=1";
		//	iframeQ.attr("src", iframeQu).show();
			iframeQ.show();
			$(this).find("img").delay(500).fadeOut(1500);
			return false;
		});
		
	});

})(jQuery);


