//dualslider setting
$(document).ready(function(){
	$(".carousel").dualSlider({
		auto:true, //自動スライド
		autoDelay: 24000, //間隔
		easingCarousel: "swing", //easingプラグインのエフェクト
		easingDetails: "easeOutBack",//easingプラグインのエフェクト詳細部分
		durationCarousel: 1000, //長さ
		durationDetails: 600 //詳細部分の長さ
	});
});

$(document).ready(function(){
	//li要素の最後にクラスを付与
	$("li:last-child").addClass("lastChild");
	//dl要素の最後にクラスを付与
	$("dl:last-child").addClass("lastChild");
	$("dt:last-child").addClass("lastChild");
	$("dd:last-child").addClass("lastChild");
	//worksページ最終項目にクラスを付与
	$(".worksArea:last-child").addClass("lastChild");
	//servicesページ最終項目にクラス付与
	$(".explanArea:last-child").addClass("lastChild");
	//encloAreaの最後のpにクラス付与
	$(".encloArea p:last-child").addClass("lastChild");
});

//top vimeo useragent
$(document).ready(function(){

	if($.os.name == 'iphone') {
		$('#iphoneOS').html('<iframe src="http://player.vimeo.com/video/19652494" width="605" height="340" frameborder="0"></iframe>');
	} else if($.os.name == 'ipod') {
		$('#iphoneOS').html('<iframe src="http://player.vimeo.com/video/19652494" width="605" height="340" frameborder="0"></iframe>');
	} else if($.os.name == 'ipad') {
		$('#iphoneOS').html('<iframe src="http://player.vimeo.com/video/19652494" width="605" height="340" frameborder="0"></iframe>');
	} else {
		$('#otherOS').html('<object width="605" height="340"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="wmode" value="trancparent" /><param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=19652494&amp;server=vimeo.com&amp;show_title=0&amp;show_byline=0&amp;show_portrait=0&amp;color=ff9933&amp;fullscreen=1&amp;autoplay=0&amp;loop=0" /><embed src="http://vimeo.com/moogaloop.swf?clip_id=19652494&amp;server=vimeo.com&amp;show_title=0&amp;show_byline=0&amp;show_portrait=0&amp;color=ff9933&amp;fullscreen=1&amp;autoplay=0&amp;loop=0" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="605" height="340"></embed></object>');
	}

});

//top vimeo useragent
$(document).ready(function(){

	if($.os.name == 'iphone') {
		$('#iphoneOS02').html('<iframe src="http://player.vimeo.com/video/21011082?title=0&amp;byline=0&amp;portrait=0&amp;color=ff9933" width="605" height="340" frameborder="0"></iframe>');
	} else if($.os.name == 'ipod') {
		$('#iphoneOS02').html('<iframe src="http://player.vimeo.com/video/21011082?title=0&amp;byline=0&amp;portrait=0&amp;color=ff9933" width="605" height="340" frameborder="0"></iframe>');
	} else if($.os.name == 'ipad') {
		$('#iphoneOS02').html('<iframe src="http://player.vimeo.com/video/21011082?title=0&amp;byline=0&amp;portrait=0&amp;color=ff9933" width="605" height="340" frameborder="0"></iframe>');
	} else {
		$('#otherOS02').html('<object width="605" height="340"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="wmode" value="trancparent" /><param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=21011082&amp;server=vimeo.com&amp;show_title=0&amp;show_byline=0&amp;show_portrait=0&amp;color=ff9933&amp;fullscreen=1&amp;autoplay=0&amp;loop=0" /><embed src="http://vimeo.com/moogaloop.swf?clip_id=21011082&amp;server=vimeo.com&amp;show_title=0&amp;show_byline=0&amp;show_portrait=0&amp;color=ff9933&amp;fullscreen=1&amp;autoplay=0&amp;loop=0" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="605" height="340"></embed></object>');
	}

});



//正月用ムービー
$(document).ready(function(){

	if($.os.name == 'iphone') {
		$('#iphoneOSnewyear').html('<iframe src="http://player.vimeo.com/video/34316225?title=0&amp;byline=0&amp;portrait=0&amp;color=ff9933&amp;autoplay=1" width="605" height="340" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>');
	} else if($.os.name == 'ipod') {
		$('#iphoneOSnewyear').html('<iframe src="http://player.vimeo.com/video/34316225?title=0&amp;byline=0&amp;portrait=0&amp;color=ff9933&amp;autoplay=1" width="605" height="340" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>');
	} else if($.os.name == 'ipad') {
		$('#iphoneOSnewyear').html('<iframe src="http://player.vimeo.com/video/34316225?title=0&amp;byline=0&amp;portrait=0&amp;color=ff9933&amp;autoplay=1" width="605" height="340" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>');
	} else {
		$('#otherOSnewyear').html('<object width="605" height="340"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=34316225&amp;server=vimeo.com&amp;show_title=0&amp;show_byline=0&amp;show_portrait=0&amp;color=ff9933&amp;fullscreen=1&amp;autoplay=1&amp;loop=0" /><embed src="http://vimeo.com/moogaloop.swf?clip_id=34316225&amp;server=vimeo.com&amp;show_title=0&amp;show_byline=0&amp;show_portrait=0&amp;color=ff9933&amp;fullscreen=1&amp;autoplay=1&amp;loop=0" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="605" height="340"></embed></object>');
	}

});
$(document).ready(function(){

	if($.os.name == 'iphone') {
		$('#iphoneOS02newyear').html('<iframe src="http://player.vimeo.com/video/34316225?title=0&amp;byline=0&amp;portrait=0&amp;color=ff9933&amp;autoplay=1" width="605" height="340" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>');
	} else if($.os.name == 'ipod') {
		$('#iphoneOS02newyear').html('<iframe src="http://player.vimeo.com/video/34316225?title=0&amp;byline=0&amp;portrait=0&amp;color=ff9933&amp;autoplay=1" width="605" height="340" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>');
	} else if($.os.name == 'ipad') {
		$('#iphoneOS02newyear').html('<iframe src="http://player.vimeo.com/video/34316225?title=0&amp;byline=0&amp;portrait=0&amp;color=ff9933&amp;autoplay=1" width="605" height="340" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>');
	} else {
		$('#otherOS02newyear').html('<object width="605" height="340"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=34316225&amp;server=vimeo.com&amp;show_title=0&amp;show_byline=0&amp;show_portrait=0&amp;color=ff9933&amp;fullscreen=1&amp;autoplay=1&amp;loop=0" /><embed src="http://vimeo.com/moogaloop.swf?clip_id=34316225&amp;server=vimeo.com&amp;show_title=0&amp;show_byline=0&amp;show_portrait=0&amp;color=ff9933&amp;fullscreen=1&amp;autoplay=1&amp;loop=0" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="605" height="340"></embed></object>');
	}

});
