//chara kakunin EUC-JP//あいうえおかきくけこ
/*siteset1*/
var SITE_ID="c0930";var SITE_ID2="C0930";var doma="com";
/*comset*/
var SDO=SITE_ID+'.'+doma;var url=location.href;var d_mode="";var FM_mode="F";/* F or M */ var JE_mode="jp";/* jp or en */var EN_FLG=""; var p_type="";
if(url.match(/en\./i)||url.match(/enm/i)){JE_mode="en";}if(url.match(/members/i)||url.match(/jpm/i)||url.match(/enm/i)){FM_mode="M";}if(FM_mode=="F"){if(JE_mode=="jp"){d_mode="jpf";}else{d_mode="enf";}}else{if(JE_mode=="jp"){d_mode="jpm";}else{d_mode="enm";}}
if(url.match(/listpages/i)){p_type="list";}if(url.match(/moviepages/i)){p_type="page";}if(url.match(/webmaster/i)){d_mode="jpf";}
if(url.match('/\.'+doma+'/i')){var BASE_URL		="http://www."+SDO;var M_BASE_URL	="http://members."+SDO;if(JE_mode=="en"){BASE_URL		="http://en."+SDO;M_BASE_URL	="http://enmembers."+SDO; EN_FLG="_en";}}else{if(JE_mode=="jp"){BASE_URL="http://jpf."+SITE_ID;M_BASE_URL="http://jpm."+SITE_ID;}else{BASE_URL="http://enf."+SITE_ID;M_BASE_URL="http://enm."+SITE_ID;}if(JE_mode=="en"){EN_FLG="_en";}}
/*siteset2*/
var SfBase				="http://www."+SDO;
var SfLinkUrl			= "http://www.dtiserv.com/cgi-bin/ranklink/ranklink.cgi?id="+SITE_ID;
var SfFlvUrl			="/swf/clear_swf/";var SfFlvName="008_02.flv";
var SfSwfPlayer		= SfBase+"/swf/clear_swf/006.swf";
var SfBodyWidth		= 1000;var SfClearSwWid	= 180;var SfClearSwHei	= 200;
var SfIe6Flag			= false; var SfRandnum = Math.floor( Math.random() * 100 ) + 1;
////////////////////////////////////////////
/*callstart*/
$(function(){
	pageinfo();
	new_girl();
	tip('.txt');
	syukanSwf();
	/*cyclebnr();*/
});
////////////////////////////////////////////
/*function*/
/*-------pageinfo-----------*/
function pageinfo(){	
	$("#FLVPlayer img").attr("style","width:650px;height:auto;");/*110520*/
	$(".h0874").after('<p class="shstaff"><a href="http://ch4610.dtiblog.com/" target="_blank" title="エッチなスタッフ"><img src="'+SfBase+'/images/side_hstaff.jpg" /></a></p><div class="s10"></div>');
	$(".h0874").after('<p class="splay48te"><a href="/hiroba/play_48te/0001/index.html" title="実践48手"><img src="'+SfBase+'/images/side_play48te.jpg" /></a></p>');
	if(d_mode=="jpf")				{if(p_type=="list"){syukanSwf('#NewMovie_list');}else if(p_type=="page"){syukanSwf('#MovieDL');}side_swf();
		$(".h0874").after('<p class="s4545"><a href="/guest/4545/index.html" title="みんなでワイワイ4545動画"><img src="'+SfBase+'/images/side_4545.jpg" /></a></p>');
	}
	else if(d_mode=="jpm")	{if(p_type=="list"){syukanSwf('#NewMovie_list');}else if(p_type=="page"){syukanSwf('#MovieDL');}
		$(".h0874").after('<p class="s4545"><a href="/4545/index.html" title="みんなでワイワイ4545動画"><img src="'+SfBase+'/images/side_4545.jpg" /></a></p>');
	}else if(d_mode=="enf")	{
	}else if(d_mode=="enm")	{}
	$(".h0874").after('<p class="bt_limited1"><a href="/listpages/468_1.html" title="期間限定作品"><img src="'+SfBase+'/images/side_limited_1.jpg" /></a></p>');
	
	$(".h2050w").after('<p class="splay48te"><a href="http://click.dtiserv2.com/redir.fcgi?click=1400&amp;site=425&amp;b=1400&amp;lang=tokyo" title="0930WORLD" target="_blank" ><img src="'+SfBase+'/images/side_h0930w.jpg" /></a></p>');

	
	//if(url.match(/468_/i))	{$("#MainContents").prepend('<div><img src="http://www.c0930.com/1up/110903/info.jpg" /></div>')}
	if(url.match(/for00/i))	{$("#MovieInfo table:eq(0)").html('');$("#MovieDL h4:eq(1)").html('');}

	$("#logo img").css({width:"323px",height:"135px"});	
	$("#Gallery .icon_zoom img").css({width:"16px",height:"16px"});	
	$("#Gallery .icon_zoom").closest("div").css('backgroundColor', '#333');

	$("#NewMovie_list h4 a:eq(5)").html('');
	$('.FootSubNavi a[href*="417_1"]').html('');
	

}
/*-------swfplayer----------*/
function playSwf(purl,id,wid,hei,fvar,para,attr){var str_flash="<br />最新のフラッシュプレイヤーをダウンロードしてください";if(JE_mode=="en"){str_flash="<br />Get New Flash Player";}$('#'+id).html('<p class="pU50 center" style="width:'+wid+'px;height:'+hei+'px"><a href="http://www.adobe.com/go/getflashplayer"><img alt="Get Adobe Flash player" src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" />'+str_flash+'</a></p>');swfobject.embedSWF(purl,id, wid, hei, "9.0.0",BASE_URL+"/swf/expressInstall.swf", fvar, para, attr);swfobject.createCSS("#"+id, "background-color:#000000;", "screen, print", true);}
/*-------index--------------*/
function syukanSwf(){if(url.match(/indexmain/i)){var syukan_swf="http://www."+SDO+"/flash/syukan/auto.swf";var syukan_id="yokokucontent";var fvar={};var attr={};var para={allowScriptAccess:"always",wmode:"opaque",bgcolor:"#000000"};playSwf(syukan_swf,syukan_id,"320","200",fvar,para,attr);}}
function new_girl(){if(url.match(/indexmain/i)){var uval=[];uval.getid=0;	uval.toFnc="sc_new_girl";uval.url="/gwcache/ssi/originallist.html";if(FM_mode=="M"){uval.url="/gwcache/ssi/member/originallist.html";}uval.dataType="html";ajGet2(uval);}}
//function new_girl(){if(url.match(/indexmain/i)){var uval=[];uval.getid=0;	uval.toFnc="sc_new_girl";uval.url="/gwcache/ssi/goldlist.html";if(FM_mode=="M"){uval.url="/gwcache/ssi/member/goldlist.html";}uval.dataType="html";ajGet2(uval);}}
function sc_new_girl(res,uval){if(JE_mode=="jp"){res="<div>"+res+"</div>";uval.getid;res=$(res).find('div:eq('+uval.getid+')');var chgsrc=$(res).find('img').attr('src').replace(/images\/thumb_s/ig ,"info");if(FM_mode=="M"){chgsrc.replace("http://www."+SDO, "");}var chgimg=$(res).find('img').attr('src',chgsrc);var chghtml=$(res).find('a:first').html(chgimg);$('.newgirl').html(chghtml);}}
/*-------pages--------------*/
function cyclebnr(){var uval=[];uval.url="ZZZ.html";uval.dataType="html";uval.toFnc="sc_cyclebnr";ajGet2(uval);}
function sc_cyclebnr(res,uval){$("#Header").before(res);presentationCycle.init();}
/*-------commonfunc---------*/
function ajPost2(uval){var strdata= new Array();var a=0;var dataType="json";	var toFnc="scDef";if(uval.postdata){$.each(uval.postdata,function(i,val){strdata[a]=i+':"'+val+'"';a=a+1;});}if(uval.dataType){dataType=uval.dataType}if(uval.toFnc){toFnc=uval.toFnc}$.ajax({async:"FALSE",timeout:60000,type:'POST',url:uval.url,data:strdata,dataType:dataType,error:function (result){},success:function (result){eval(toFnc+'(result,uval)');},beforeSend: function(xhr){xhr.overrideMimeType("text/html;charset=EUC-JP");}});}
function ajGet2(uval){var strdata= new Array();var a=0;var dataType="json";	var toFnc="scDef";if(uval.postdata){$.each(uval.postdata,function(i,val){strdata[a]=i+':"'+val+'"';a=a+1;});}if(uval.dataType){dataType=uval.dataType}if(uval.toFnc){toFnc=uval.toFnc}$.ajax({async:"FALSE",timeout:60000,type:'GET',url:uval.url,data:strdata,dataType:dataType,error:function (result){},success:function (result){eval(toFnc+'(result,uval)');},beforeSend: function(xhr){xhr.overrideMimeType("text/html;charset=EUC-JP");}});}
function scDef(res,uval){if(res.ok){}else{}if(uval.loc){location.href = uval.loc;}}
function tip(target_items){$(target_items).css({cursor:"pointer"});	$(target_items).mouseover(function(){$("html").append('<div id="t_tip">TEST</div>');$("#t_tip").css({opacity:0.8, display:"none"}).fadeIn(400); $("#t_tip").html('<p>'+$(this).attr("txt")+"</p>");}).mousemove(function(kmouse){var border_top = $(window).scrollTop();var border_right = $(window).width();var left_pos;  var top_pos;var offset = 20;if(border_right - (offset *2) >= $("#t_tip").width() + kmouse.pageX){left_pos = kmouse.pageX+offset;} else{left_pos = border_right-$("#t_tip").width()-offset;}if(border_top + (offset *2)>= kmouse.pageY - $("#t_tip").height()){top_pos = border_top +offset;}else{top_pos = kmouse.pageY-$("#t_tip").height()-offset;}$("#t_tip").css({left:left_pos, top:top_pos});}).mouseout(function(){$("#t_tip").remove();});}
/*-------sideswffunc--------*/
function side_swf(){Func_clear_swf();$(window).resize(function(){Func_clear_resize();});window.onload = function() {var isIE = 0<=window.navigator.userAgent.indexOf("MSIE");if(isIE && document.compatMode=="BackCompat"){document.body.onscroll = ScrollEvent;}else{document.documentElement.onscroll = ScrollEvent;}}}
function ScrollEvent(){Func_reside();}
function Func_swf_typeA(){var height=SfClearSwHei;var width	=SfClearSwWid;var name= "under_m";/*domIdname*/	var Svolume= "20";var j_act_cut= 1;var j_play_cut= 1;var flv_file	= SfFlvUrl+SfFlvName;var ie6vars='<div id="firefox_div" style="width:150px; position:Fixed; position:absolute;"><div style="float:right; width:'+width+'px; z-index:1000;"><div id="' +name+ '" style="margin: 0px; padding: 0px"></div></div><div style="clear:both"></div></div>';ie6chk();if(SfIe6Flag){$("#Footer").after(ie6vars);Func_reside();}else{var mc =new FlvVideoPlayer(SfSwfPlayer,width, height, 50,150,name); mc.Intialize();}var flashvars ={play_flv_url:flv_file,link_url:SfLinkUrl,swf_act_cut:j_act_cut,swf_play_cut:j_play_cut,swf_volume	:Svolume};var params={allowScriptAccess	:"always", wmode:"transparent"};var attributes = {};swfobject.embedSWF(SfSwfPlayer, name, width, height, "9.0.0", "", flashvars, params, attributes);}
function ie6chk(){var myIE = document.all;if(myIE){appName=navigator.appName;temp=navigator.appVersion.split("MSIE");appVersion=parseFloat(temp[1]);if(appVersion <= 6){SfIe6Flag	 = true;}}}
function swf_action(act,d_name) {switch(act){case 'close':swf_out_action('stop',d_name);$(d_name).style.display='none';break;case 'f_close':swf_out_action('stop',d_name);$(d_name).style.display='none';break;case 'open':$(d_name).style.display='';/*swf_out_action('restart',d_name);*/break;case 'mov_end':/*$(d_name).style.display='none';*/break;}/*window.event.cancelBubble = true;*/}
function swf_out_action(act,d_name){$(d_name).setMessage(act);}
function Func_clear_resize(){sp_wid=(Math.floor(document.body.clientWidth - SfBodyWidth)/2) + SfClearSwWid;if(sp_wid < SfClearSwWid){sp_wid = SfClearSwWid;}$("#firefox_div").width(sp_wid);}	
function Func_reside(){if(SfIe6Flag){my_sc_top = $(window).scrollTop();my_sc_he	 = $(window).height();	my_ch_x	= 0;my_ch_y	= my_sc_top + my_sc_he - SfClearSwHei;$("#firefox_div").css({"left":my_ch_x,"top":my_ch_y});window.status = "my_ch_y="+my_ch_y;}}
function Func_clear_swf(){	Func_swf_typeA();}
/*-------4545-------*/
function expand5(id) {/*members*/if (id=="a") {$("#FLV_PLAYER").css({width:"500px",height:"460px"});$("#FLV_HEAD").css({display:""});$("#FLV_FOOT").css({display:""});}else{$("#FLV_PLAYER").css({width:"650px",height:"598px"});$("#FLV_HEAD").css({display:"none"});$("#FLV_FOOT").css({display:"none"});}}
function expand4545(id) {/*free*/if (id=="a") {$("#FLV_PLAYER").css({width:"500px",height:"460px"});$("#FLV_HEAD").css({display:""});$("#FLV_FOOT").css({display:""});}else{$("#FLV_PLAYER").css({width:"650px",height:"598px"});$("#FLV_HEAD").css({display:"none"});$("#FLV_FOOT").css({display:"none"});}}
////////////////////////////////////////////
/*var*/
var presentationCycle = {/** Presentation Cycle - a jQuery Cycle extension Author:Gaya Kessler URL: http://www.gayadesign.com * Date:03-11-09*/slideTimeout: 8000,containerId: "presentation_container",cycleFx: 'fade',cycleSpeed: 2000,/*http://www.malsup.com/jquery/cycle/browser.html*/barHeight: 14, barDisplacement: 20,barImgLeft: SfBase+"/1up/cycle/parts/pc_item_left.gif",barImgRight: SfBase+"/1up/cycle/parts/pc_item_right.gif",barImgCenter: SfBase+"/1up/cycle/parts/pc_item_center.gif",barImgBarEmpty: SfBase+"/1up/cycle/parts/pc_bar_empty.gif",barImgBarFull: SfBase+"/1up/cycle/parts/pc_bar_full.gif",itemCount: 0,currentItem: 0,itemBarWidth: 0,barContainer: "",barContainerActive: "", barContainerOverflow: "",disableAnimation: false,init: function(){presentationCycle.itemCount = $('#' + presentationCycle.containerId).children().length;presentationCycle.barContainer = $("<div></div>");$(presentationCycle.barContainer).addClass("pc_bar_container");var subtrackSpace = (presentationCycle.itemCount * presentationCycle.barHeight); var totalWidth = $('#' + presentationCycle.containerId).innerWidth() - presentationCycle.barDisplacement;var fillWidth = Math.floor((totalWidth - subtrackSpace) / (presentationCycle.itemCount - 1));presentationCycle.itemBarWidth = fillWidth;for (var i = 0; i < presentationCycle.itemCount; i++) {var item = $("<div>&nbsp;</div>").appendTo(presentationCycle.barContainer);var extra_bar = true;if (i == 0) {$(item).addClass("left");$(item).css({backgroundImage: "url(" + presentationCycle.barImgLeft + ")",height: presentationCycle.barHeight + "px",width: presentationCycle.barHeight + "px"});} else if (i == (presentationCycle.itemCount - 1)) {$(item).addClass("right");$(item).css({backgroundImage: "url(" + presentationCycle.barImgRight + ")",height: presentationCycle.barHeight + "px",width: presentationCycle.barHeight + "px"});extra_bar = false;} else {$(item).addClass("center");$(item).css({backgroundImage: "url(" + presentationCycle.barImgCenter + ")",height: presentationCycle.barHeight + "px",width: presentationCycle.barHeight + "px"});}$(item).attr('itemNr', (i + 1));$(item).css('cursor', 'pointer');$(item).click(function() {presentationCycle.gotoSlide($(this).attr('itemNr'));});if (extra_bar == true) {var item = $("<div>&nbsp;</div>").appendTo(presentationCycle.barContainer);$(item).addClass("bar");$(item).css({backgroundImage: "url(" + presentationCycle.barImgBarEmpty + ")",height: presentationCycle.barHeight + "px",width: fillWidth + "px"});}}var overflow = $("<div></div>");$(overflow).addClass("pc_bar_container_overflow");$(overflow).css({overflow: "hidden",width: totalWidth + "px"});var underflow = $("<div></div>");$(underflow).addClass("pc_bar_container_underflow").appendTo(overflow);presentationCycle.barContainerActive = $(presentationCycle.barContainer).clone().appendTo(underflow);$(presentationCycle.barContainerActive).removeClass("pc_bar_container");$(presentationCycle.barContainerActive).children().each(function () {$(this).css({backgroundPosition: "right"});if ($(this).css("background-image").match(presentationCycle.barImgBarEmpty)) {var newImg = $(this).css("background-image").replace(presentationCycle.barImgBarEmpty, presentationCycle.barImgBarFull);$(this).css("background-image", newImg);} });$(overflow).css({ width: presentationCycle.barHeight + "px",height: presentationCycle.barHeight + "px" });presentationCycle.barContainerOverflow = overflow;$('#' + presentationCycle.containerId).cycle({fx: presentationCycle.cycleFx, speed: presentationCycle.cycleSpeed,timeout: presentationCycle.slideTimeout,before: function(currSlideElement, nextSlideElement) { presentationCycle.beforeSlide(currSlideElement, nextSlideElement); }});presentationCycle.barContainer.appendTo($('#' + presentationCycle.containerId)); overflow.appendTo($('#' + presentationCycle.containerId));var i = 0;$(".pc_bar_container_overflow .left, .pc_bar_container_overflow .center, .pc_bar_container_overflow .right").each(function () { $(this).attr('itemNr', (i + 1));$(this).css('cursor', 'pointer');$(this).click(function() { presentationCycle.gotoSlide($(this).attr('itemNr'));});i++;});},beforeSlide: function(currSlideElement, nextSlideElement) {if (presentationCycle.currentItem == 0) {presentationCycle.currentItem = 1;} else { presentationCycle.currentItem = (presentationCycle.itemCount - ($(nextSlideElement).nextAll().length)) + 2;} presentationCycle.animateProcess();},animateProcess: function() {var startWidth = (presentationCycle.itemBarWidth * (presentationCycle.currentItem - 1)) + (presentationCycle.barHeight * presentationCycle.currentItem);if (presentationCycle.currentItem != presentationCycle.itemCount) {var newWidth = (presentationCycle.itemBarWidth * (presentationCycle.currentItem)) + (presentationCycle.barHeight * (presentationCycle.currentItem + 1));    } else { var newWidth = presentationCycle.barHeight;}$(presentationCycle.barContainerOverflow).css({width: startWidth + "px"});if (presentationCycle.disableAnimation == false) { $(presentationCycle.barContainerOverflow).stop().animate({width: newWidth + "px" }, (presentationCycle.slideTimeout - 100));}},gotoSlide: function(itemNr) {$(presentationCycle.barContainerOverflow).stop();presentationCycle.disableAnimation = true; $('#' + presentationCycle.containerId).cycle((itemNr - 1));$('#' + presentationCycle.containerId).cycle('pause');}}

