$(function() { $("div.social > div a.over").off("mouseover").off("mouseout"); $(document).on("mouseover", "#footer div.social > div a.over", function(){ $(this).parent().css({ "background-image" : "url(https://archive.gencompany.net/elements/btn_social.png)" }); $(this).stop().animate({ "opacity" : 0 }, 10); }); $(document).on("mouseout", "#footer div.social > div a.over", function(){ $(this).stop().animate({ "opacity" : 1 }, 500, function(){ $(this).parent().css({"background-image" : "none"}); }); }); $(document).on("mouseover", "#entry div.social > div a.over", function(){ $(this).parent().css({ "background-image" : "url(https://archive.gencompany.net/elements/btn_social_large.png)" }); $(this).stop().animate({ "opacity" : 0 }, 10); }); $(document).on("mouseout", "#entry div.social > div a.over", function(){ $(this).stop().animate({ "opacity" : 1 }, 500, function(){ $(this).parent().css({"background-image" : "none"}); }); }); function SLIDE_initialize(){ SLIDE_start_flag = "false"; SLIDE_repeat_flag = "true"; SLIDE_repeat_limit = 0; SLIDE_repeat_limit_max = 1000; SLIDE_set_pagewrap_width = 0; SLIDE_create_img_i = 0; SLIDE_preload_i = 0; SLIDE_past_i = -1; SLIDE_timer_id_B = "false"; SLIDE_imgHEIGHT = 0; SLIDE_imgWIDTH = 0; SLIDE_create_img(); $(window).bind("resize", SLIDE_resizeContainer); SLIDE_resizeContainer(); } function SLIDE_create_img(){ if( SLIDE_past_i != SLIDE_create_img_i ){ var imgURL = SLIDE_media_array[ SLIDE_create_img_i ][0]; var past_set_img_div = "img_div_" + SLIDE_past_i; var past_target = $("div#" + past_set_img_div); SLIDE_past_i = SLIDE_create_img_i; SLIDE_set_img_div = "img_div_" + SLIDE_create_img_i; $("#SLIDE_fullscreen #main").append("
"); SLIDE_resizeContainer(); var target = $("div#" + SLIDE_set_img_div); target.find("img").load(function () { past_target.animate({"opacity": 0}, 2000, "swing", function() { $(this).remove(); } ); SLIDE_imgHEIGHT = eval(SLIDE_media_array[ SLIDE_create_img_i ][4]); SLIDE_imgWIDTH = eval(SLIDE_media_array[ SLIDE_create_img_i ][5]); SLIDE_resizeContainer(); target.animate({"opacity": 1}, 2000, "swing"); SLIDE_preload_image(); SLIDE_scrCtr(); }); target.find("img").attr("src", imgURL); } } function SLIDE_preload_image(){ if( SLIDE_preload_i ){ $("#SLIDE_fullscreen img#pre_" + SLIDE_preload_i).remove(); } SLIDE_preload_i = eval(SLIDE_create_img_i)+1; if( SLIDE_preload_i < SLIDE_media_max_num ){ var next_imgURL = SLIDE_media_array[ SLIDE_preload_i ][0]; $("#SLIDE_fullscreen #main").append(""); var next_target = $("#SLIDE_fullscreen img#pre_" + SLIDE_preload_i ); next_target.attr("src", next_imgURL); } } function SLIDE_resizeContainer(e) { var window_height = $(window).height(); var window_width = $(window).width(); $("div#SLIDE_fullscreen #main").css("height", window_height); $("div#SLIDE_fullscreen #main").css("width", window_width); $("div#SLIDE_fullscreen .image_wrapper").css("height", window_height); $("div#SLIDE_fullscreen .image_wrapper").css("width", window_width); if( SLIDE_imgWIDTH != 0 ){ if( Math.round(SLIDE_imgWIDTH / window_width * 100) >= Math.round(SLIDE_imgHEIGHT / window_height * 100) ){ var set_height = window_height; var set_width = SLIDE_imgWIDTH*Math.round(window_height/SLIDE_imgHEIGHT*100)/100; var set_margin_top = 0; var set_margin_left = (window_width - set_width)/2; }else{ var set_width = window_width; var set_height = SLIDE_imgHEIGHT*Math.round(window_width/SLIDE_imgWIDTH*100)/100; var set_margin_top = (window_height - set_height)/2; var set_margin_left = 0; } $("div#SLIDE_fullscreen div#" + SLIDE_set_img_div + " img" ).css("margin-top", set_margin_top); $("div#SLIDE_fullscreen div#" + SLIDE_set_img_div + " img" ).css("margin-left", set_margin_left); $("div#SLIDE_fullscreen div#" + SLIDE_set_img_div + " img" ).css("height", set_height); $("div#SLIDE_fullscreen div#" + SLIDE_set_img_div + " img" ).css("width", set_width); } } function SLIDE_scrCtr(){ if( SLIDE_start_flag == "false" ){ SLIDE_start_flag = "true"; }else{ clearTimeout( SLIDE_Repeater ); } if( SLIDE_repeat_flag == "true" ){ $("#SLIDE_fullscreen div.play_box").css("display", "none"); $("#SLIDE_fullscreen div.stop_box").css("display", "block"); SLIDE_Repeater = setTimeout( function(){ SLIDE_slidePlay(); } , 5000); }else{ $("#SLIDE_fullscreen div.play_box").css("display", "block"); $("#SLIDE_fullscreen div.stop_box").css("display", "none"); } } function SLIDE_slidePlay(){ SLIDE_create_img_i ++; if( SLIDE_create_img_i == SLIDE_media_max_num){ SLIDE_create_img_i = 0; SLIDE_repeat_limit ++; if( SLIDE_repeat_limit > SLIDE_repeat_limit_max ){ SLIDE_repeat_limit = 0; SLIDE_repeat_flag = "false"; } } SLIDE_create_img(); } SLIDE_media_array = [['https://s3.media-nisor.site/image/gen_entry_2013_0918_220004_4276.jpg', 'https://s3.media-nisor.site/image_thumbs/gen_entry_2013_0918_220004_4276.jpg', '', '', 1000, 1000, '' ]]; SLIDE_media_max_num = 1; SLIDE_initialize(); function news_loadmore_loadmore_index( id, index_count_i, index_count_limit, href ){ $("article#news > div > div > section > ul > li.load_more > a > div").fadeOut(300).remove(); $.ajax({ url: "https://archive.gencompany.net/content_news_ajax_load.php", data: "id=" + id + "&index_count_i=" + index_count_i + "&index_count_limit=" + index_count_limit + "", success: function(data, dataType){ var scrolltop = $("article#news > div > div > section > ul .load_more").offset().top - 150; $("article#news > div > div > section > ul > li.load_more").remove(); _gaq.push(['_trackPageview', '/' + href ]); $("article#news > div > div > section > ul").append( data ); $('html,body').animate({ scrollTop: scrolltop }, '1000', 'swing'); }, complete: function(XMLHttpRequest, textStatus){ }, error: function(XMLHttpRequest, textStatus, errorThrown){ } }); } $(document).on("click", "article#news > div > div > section > ul > li.load_more > a", function(){ var id = $(this).attr("data-id"); var index_count_i = $(this).attr("data-index_count_i"); var index_count_limit = $(this).attr("data-index_count_limit"); var href = $(this).attr("href").replace( "https://archive.gencompany.net/", "" ); news_loadmore_loadmore_index( id, index_count_i, index_count_limit, href ); return false; }); function hashchange() { var hash = location.hash; if( hash.indexOf( "#!/" ) != -1 ){ }else{ var hash = hash.replace( /^#/, '' ); $("#project ul.menu li").removeClass('active'); // $("#project ul.menu li").stop().animate({ // "padding-right" : 20 // }, 600, "easeOutQuint"); // $("#project ul.menu li").find("a").stop().animate({ // "opacity" : 1, // "padding-right" : 5 // }, 600, "easeOutQuint"); $("#project ul.thumbs li").removeClass('active'); // $("#project ul.thumbs li div.img_border").stop().animate({ // "margin" : 55, // "opacity" : 0.5, // "width" : 30, // "height" : 30 // }, 600, "easeOutQuint"); if( hash == "all" || hash == "" ){ $("#project ul.menu li.class_all").addClass('active'); // $("#project ul.menu li.class_all").stop().animate({ // "padding-right" : 8 // }, 600, "easeOutQuint"); // $("#project ul.menu li.class_all").find("a").stop().animate({ // "opacity" : 1, // "padding-right" : 17 // }, 600, "easeOutQuint"); $("#project ul.thumbs li").addClass('active'); // $("#project ul.thumbs li div.img_border").stop().animate({ // "margin" : 5, // "opacity" : 1, // "width" : 130, // "height" : 130 // }, 600, "easeOutBack"); }else{ $("#project ul.menu li.class_"+hash).addClass('active'); // $("#project ul.menu li.class_"+hash).stop().animate({ // "padding-right" : 8 // }, 600, "easeOutQuint"); // $("#project ul.menu li.class_"+hash).find("a").stop().animate({ // "opacity" : 1, // "padding-right" : 17 // }, 600, "easeOutQuint"); $("#project ul.thumbs li.class_"+hash).addClass('active'); // $("#project ul.thumbs li.class_"+hash+" div.img_border").stop().animate({ // "margin" : 5, // "opacity" : 1, // "width" : 130, // "height" : 130 // }, 600, "easeOutBack"); } } } function project_loadmore_loadmore_index( id, index_count_i, index_count_limit, href ){ $("article#project > div > div > section > ul > li.load_more > a > div").fadeOut(300).remove(); $.ajax({ url: "https://archive.gencompany.net/content_project_ajax_load.php", data: "id=" + id + "&index_count_i=" + index_count_i + "&index_count_limit=" + index_count_limit + "", success: function(data, dataType){ var scrolltop = $("article#project > div > div > section > ul .load_more").offset().top - 150; $("article#project > div > div > section > ul > li.load_more").remove(); ga('send', { 'hitType': 'pageview', 'page': href }); $("article#project > div > div > section > ul").append( data ); hashchange(); $('html,body').animate({ scrollTop: scrolltop }, '1000', 'swing'); }, complete: function(XMLHttpRequest, textStatus){ }, error: function(XMLHttpRequest, textStatus, errorThrown){ } }); } $(document).on("click", "article#project > div > div > section > ul > li.load_more > a", function(){ var id = $(this).attr("data-id"); var index_count_i = $(this).attr("data-index_count_i"); var index_count_limit = $(this).attr("data-index_count_limit"); var href = $(this).attr("href").replace( "https://archive.gencompany.net/", "" ); project_loadmore_loadmore_index( id, index_count_i, index_count_limit, href ); return false; }); function workshop_loadmore_loadmore_index( id, index_count_i, index_count_limit, href ){ $("article#workshop > div > div > section > ul > li.load_more > a > div").fadeOut(300).remove(); $.ajax({ url: "https://archive.gencompany.net/content_workshop_ajax_load.php", data: "id=" + id + "&index_count_i=" + index_count_i + "&index_count_limit=" + index_count_limit + "", success: function(data, dataType){ var scrolltop = $("article#workshop > div > div > section > ul .load_more").offset().top - 150; $("article#workshop > div > div > section > ul > li.load_more").remove(); _gaq.push(['_trackPageview', '/' + href ]); $("article#workshop > div > div > section > ul").append( data ); $('html,body').animate({ scrollTop: scrolltop }, '1000', 'swing'); }, complete: function(XMLHttpRequest, textStatus){ }, error: function(XMLHttpRequest, textStatus, errorThrown){ } }); } $(document).on("click", "article#workshop > div > div > section > ul > li.load_more > a", function(){ var id = $(this).attr("data-id"); var index_count_i = $(this).attr("data-index_count_i"); var index_count_limit = $(this).attr("data-index_count_limit"); var href = $(this).attr("href").replace( "https://archive.gencompany.net/", "" ); workshop_loadmore_loadmore_index( id, index_count_i, index_count_limit, href ); return false; }); function htmlEncode(value){ return $('
').text(value).html(); } function htmlDecode(value){ return $('
').html(value).text(); } });