function bodywidth(){
wsize = $(window).width();
hsize = $(window).height();
}
function mypreload() {
mid=$('.cmovie').data("movie");
purl="img"
dl = new Array();
dl[0] = "dl";
n = Math.floor(Math.random()*dl.length);
url ='https://'+dl[n]+'.illusion.rip/preview_contents/aisyoujyo/bg/';
mids=mid;
if(mids == "download3" || mids == "download2" || mids =="download_c"){
mids = "download";
//alert("2orC");
}else{
//alert("not DL");
}
if( wsize <= 1100 ){mids=mids+"_sp"}
$('.cmovie').html('') ;
$('')
if(wsize >=1100){
$('
');
$('
');
$('
');
$('
');
}
drawLine();
}
$(function(){
/*--------------------------------------------------------------------------------------*/
var ua = navigator.userAgent.toLowerCase();
var ver = navigator.appVersion.toLowerCase();
var isMSIE = (ua.indexOf('msie') > -1) && (ua.indexOf('opera') == -1);
var isIE11 = (ua.indexOf('trident/7') > -1);
var isIE = isMSIE || isIE11;
var isEdge = (ua.indexOf('edge') > -1);
if(isIE) {
location.href = 'https://old.illusion.rip/ie.html';
}
bodywidth();
$(window).resize(function(){
bodywidth();
drawLine();
});
/*
expos = $('#ex').position();
exwidth = $('#ex').width();
if(wsize >= 1600){
$('#ex2').css({left:exwidth+"px" ,top:expos.top+"px"});
}
*/
$("#loading").fadeIn(0);
mypreload();
//
$(document).on("click","#hsw", function(){
$("#history").toggleClass('ahis');
})
$(document).on("click","#menuChanger", function(){
$("body").toggleClass("spMenu");
})
$.pjax({
area : '#mainFrame', // 遷移するエリアを指定
link : '.pLink', // イベント発火のターゲットを指定できる
ajax: { timeout: 3000 }, // 読み込みにこれ以上かかる場合は通常遷移
wait : 250
});
$(document).on('pjax:fetch',function(){ // 消える時の処理
$('body').addClass('fadeOut');
//console.log("fetch"+pageAddress);
});
$(document).on('pjax:render',function(){ // 現れる時の処理
pageAddress =$("#contents").data('id');
if(pageAddress == "index"){
pageClass = "index"
}else{
pageClass = "cont"
}
dl = new Array();
dl[0] = "dl";
n = Math.floor(Math.random()*dl.length);
url ='https://'+dl[n]+'.illusion.rip/preview_contents/aisyoujyo/bg/';
mids=pageAddress;
if(mids == "download3" ||mids == "download2" || mids =="download_c"){
mids = "download";
//alert("2orC");
}else{
//alert("not DL");
}
if( wsize <= 1100 ){
mids = pageAddress+"_sp"}
$('.cmovie').html('') ;
$("body").attr({
id: pageAddress,
class: pageClass
});
//console.log("render");
drawLine();
});
$(document).on('pjax:end', function() {
});
$(document).on("click","#GoTop", function(){
$('body,html').animate({scrollTop: 0}, 500);
return false;
});
$(window).scroll(function () {
if($(window).scrollTop() >= 110) {
$('#Snavi').stop().animate({bottom:'10px'},600);
} else {
if(wsize >= 1100){
$('#Snavi').stop().animate({bottom:'-80px'},600);
}
}
});
/*-----------------------------------------------------------------------------------------------------*/
});
$(window).load(function () { //全ての読み込みが完了したら実行
$("body").attr({
id: pageAddress,
class: pageClass
});
onload = drawLine;
drawLine();
$("html").fadeTo("slow",1);
});
window.onpageshow = function(event) {
if (event.persisted) {
window.location.reload();
}
};