var news_img_stack = Array(); var news_width_each = 420; var deepest_news= [0,0,0]; var news_count = 0; var news_to = Array(); var video_news_img_stack = Array(); var video_news_count = 0; function highlight_news_type(id){ $("news_type_" + id).className = "page-news-type-on"; } function dehighlight_news_type(id){ if(id != news_type){ $("news_type_" + id).className = "page-news-type"; } } function show_button(obj){ obj.className = "button-on"; } function hide_button(obj){ obj.className = "button-off"; } function show_more_news_with_video(){ if(news_page * 5 < news.length + video_news.length) { news_page ++; } else{ return; } var max_news = news_page * 5; if(max_news > news.length + video_news.length){ max_news = news.length + video_news.length; } for(var i = news_page * 5 - 5; i < max_news; i ++){ //console.log(i); if(i < news.length){ add_news_fall(news[i][0]); } else{ add_video_news_fall(video_news[i - news.length][0]); } } } var news_type = 0; function init(){ news.push(["/images/news12.jpg", "休旅", "2016-08-01", "『肯辛顿酒店塞班』携手马里亚纳观光局共同举办推介会", "已于2016年7月21日开业的“肯辛顿酒店塞班(Kensington Hotel Saipan)”是衣恋集团在海外第一次上市的肯辛顿品牌,位于塞班北部的圣洛克地区,为顾客提供惬意安静闲适度假环境。",3,12]); news.push(["/images/news2.jpg", "美食", "2016-06-15", "自然别谷进驻中国 ", "衣恋集团旗下韩式自助餐餐厅自然别谷1号店11月7号在上海浦东正大广场开业",1,2]); news.push(["/images/news4.jpg", "购物", "2016-06-15", "Luxury Gallery一号店开业 ", "衣恋集团旗下奢侈品购物天堂Luxury Gallery入驻上海百盛优客城市广场,并于1月15日开业。Dior 、Burberry 、Gucci、Coach、Michael Kors、Tory Burc",2,4]); news.push(["/images/news6.jpg", "休旅", "2016-06-15", "韩国衣恋联手中国万达布局韩国旅游产业 ", "近日,韩国衣恋集团与中国万达集团决定,联手开展出境游(外国人韩国游)相关业务,双方按持股比例50比50成立合作旅行社,目标是,每年吸引100万中国游客赴韩旅游。",3,6]); news.push(["/images/news7.jpg", "时尚", "2016-06-15", "SHOOPEN鞋范潮流来袭 中国首店九月在沪登陆 ", "SHOOPEN鞋范——作为近两年来最为热门的首家鞋类快时尚品牌,背靠韩国衣恋集团,以不同于传统鞋类品牌的销售方式,提倡时尚多样、极具性价比的SPA运营模式,在韩国迅速崛起,风靡大街小巷。",4,7]); news.push(["/images/news8.jpg", "慈善", "2016-06-15", "中国衣恋集团荣获第九届“中华慈善奖” ", "2015年12月,中国衣恋集团以其长期对社会慈善事业的支持,而获得第九届“中华慈善奖”。在此之前,致力于慈善事业的衣恋集团曾获得第六届,第七届 “中华慈善奖”,并连续两年被选为“最具爱心捐赠企业”。",5,8]); news.push(["/images/news5.jpg", "购物", "2016-06-15", "百盛优客城市广场盛大开业", "位于天山路的百盛优客城市广场于2016年1月15日正式营业,为申城人点亮了一种崭新的“优客生活”——以“优价,优品,优趣,要去”的理念打造最年轻时尚的城市奥莱。",2,5]); news.push(["/images/news3.jpg", "美食", "2016-06-15", "衣恋集团收购The Coffee Bean & Tea Leaf", "衣恋集团于2015年8月24日收购了跨国咖啡&茶品牌公司The Coffee Bean & Tea Leaf(以下简称Coffee Bean)的中国经营权",1,3]); news.push(["/images/news27.jpg", "资讯", "2017-03-07", "衣念(上海)时装建设工程竣工环保验收公示", "衣念(上海)时装贸易有限公司新建厂房坡道1、平台1建设工程竣工环保验收公示",6,27]); news.push(["/images/news25.jpg", "资讯", "2017-03-07", "衣念(上海)时装贸易有限公司新建厂房环保措施落实情况报告", "衣念(上海)时装贸易有限公司新建厂房 坡道1、平台1 环 保 措 施 落 实 情 况 报 告",6,25]); news.push(["/images/news24.jpg", "资讯", "2017-03-07", "衣念(上海)时装贸易有限公司新建厂房项目 非重大变动的环境影响分析报告", "衣念(上海)时装贸易有限公司新建厂房项目 非重大变动的环境影响分析报告",6,24]); news.push(["/images/news23.jpg", "资讯", "2017-03-07", "衣恋时装建设工程竣工环保验收公示", "衣恋时装(上海)有限公司建设工程竣工环保验收公示",6,23]); news.push(["/images/news22.jpg", "资讯", "2017-03-07", "衣恋时装(上海)有限公司新建厂房及仓储用房项目 非重大变动的环境影响分析报告", "衣恋时装(上海)有限公司新建厂房及仓储用房项目 非重大变动的环境影响分析报告",6,22]); news.push(["/images/news21.jpg", "资讯", "2017-03-07", "新建厂房及仓储用房C楼项目环保措施落实情况报告", "新建厂房及仓储用房C楼项目环保措施及落实情况报告",6,21]); tmp_count = 0; for(var i = 0; i < news.length; i ++){ if(tmp_count == news_page * 5){ break; } add_news_fall(news[i][0]); tmp_count ++; } video_news.push(["/uploads/1466062741.jpg", "中国衣恋集团宣传影像中文版", "/video.php?id=2", 2]); video_news.push(["/uploads/1466063155.jpg", "【SPAO】1230 SPAO成都春熙路店 开业盛况", "/video.php?id=3", 3]); video_news.push(["/uploads/1466063369.jpg", "【百盛优客】什么鬼?!沪上热门景点惊现大批逗比萌猴", "/video.php?id=4", 4]); video_news.push(["/uploads/1466063542.jpg", "Cocomong开业快闪_中国1号店_天山店", "/video.php?id=5", 5]); video_news.push(["/uploads/1466063807.jpg", "【SPAO/WHO.A.U/TeenieWeenie】HK Grand Opening三大品牌香港开业盛况", "/video.php?id=6", 6]); video_news.push(["/uploads/1466063998.jpg", "【SHOOPEN】2016年首尔新沙店开业视频", "/video.php?id=7", 7]); video_news.push(["/uploads/1466064220.jpg", "【MIXXO米思欧】成都春熙路店 开业盛况", "/video.php?id=8", 8]); video_news.push(["/uploads/1466064353.jpg", "【百盛优客】PARKSON NEWCORE 百盛优客中国1号店开业盛况", "/video.php?id=9", 9]); video_news.push(["/uploads/1466065434.jpg", "【COCCINELLE】 2016 SS 春夏新品 Video", "/video.php?id=12", 12]); video_news.push(["/uploads/1466065543.jpg", "【百盛优客】最新韩国跑男粉丝魔都朝圣地~Runningman 160124期CUT", "/video.php?id=13", 13]); video_news.push(["/uploads/1466068677.jpg", "【SHOOPEN】中国第一家鞋类快时尚_五角场店盛大开业", "/video.php?id=17", 17]); video_news.push(["/uploads/1466068812.jpg", "【沙画】告诉你一个叫“衣恋中国”的故事", "/video.php?id=18", 18]); video_news.push(["/uploads/1466069128.jpg", "ELAND 2016年夏季新品发布会 part1", "/video.php?id=19", 19]); for(var i = 0; i < video_news.length; i ++){ if(tmp_count == news_page * 5){ break; } add_video_news_fall(video_news[i][0]); tmp_count ++; } } function draw_news_fall(img){ news_img_stack.shift(); var width = img.width; var height = img.height; //console.log(width + "," +height); //alert(width); var url = img.src; height = height / width * news_width_each; width = news_width_each; var column; if(deepest_news[0] <= deepest_news[1] && deepest_news[0] <= deepest_news[2]){ column = 0; } else{ if(deepest_news[1] <= deepest_news[0] && deepest_news[1] <= deepest_news[2]){ column = 1; } else{ if(deepest_news[2] <= deepest_news[0] && deepest_news[2] <= deepest_news[1]){ column = 2; } } } //alert(news[news_count]); var str = ''; str += '
'; // str += ''; str += '
'; str += ''; str += '
' + news[news_count][2] + '
'; str += '
'; str += '
'; str += '
'; str += ''; str += ''; str += '
'; str += '
'; // str += '
'; $("column_" + column).innerHTML += str; var news_item = $("news_fall_" + news_count); news_item.style.height = transfer_vw(height); news_item.style.width = transfer_vw(width); news_item.style.backgroundImage="url('" + url + "')"; news_item.style.backgroundSize="contain"; deepest_news[column] += height; news_count ++; if(news_img_stack.length > 0){ add_news_fall_stack(news_img_stack[0]); } } function add_news_fall_stack(url){ var img = new Image(); img.onload = function(){ img.onload = null; draw_news_fall(img); } img.src = url; } function add_news_fall(url){ // var url = "images/" + parseInt(Math.random()*7+1) + ".jpg"; news_img_stack.push(url); if(news_img_stack.length == 1){ add_news_fall_stack(url); } } function show_news_detail(id){ news_to[id] = 1; if(!big_interval){ do_big_interval(); } } function do_show_news_detail(id){ var news_content_height = ($("news_content_" + id).style.height.substr(0, $("news_content_" + id).style.height.length - 2)); var current_category_margin = $("news_category_" + id).style.marginTop.toString().substr(0, $("news_category_" + id).style.marginTop.toString().length - 2); if(current_category_margin < 0){ $("news_category_" + id).style.marginTop = $("news_category_" + id).style.opacity * 2.76 / 1 - 2.76 + "vw"; $("news_content_" + id).style.marginTop = news_content_height - $("news_category_" + id).style.opacity * news_content_height + "vw"; $("news_category_" + id).style.opacity = $("news_category_" + id).style.opacity * 1 + 0.1; $("news_content_" + id).style.opacity = $("news_content_" + id).style.opacity * 1 + 0.09; } } function hide_news_detail(id){ news_to[id] = -1; if(!big_interval){ do_big_interval(); } } function do_hide_news_detail(id){ var news_content_height = ($("news_content_" + id).style.height.substr(0, $("news_content_" + id).style.height.length - 2)); if($("news_category_" + id).style.opacity > 0){ $("news_category_" + id).style.opacity = $("news_category_" + id).style.opacity * 1 - 0.1; $("news_category_" + id).style.marginTop = $("news_category_" + id).style.opacity * 2.76 / 1 - 2.76 + "vw"; $("news_content_" + id).style.opacity = $("news_content_" + id).style.opacity * 1 - 0.09; $("news_content_" + id).style.marginTop = news_content_height - $("news_category_" + id).style.opacity * news_content_height + "vw"; //window.setTimeout("do_hide_news_detail('" + id + "')", 20); } } function keep_news_detail(id){ show_news_detail(id); } function draw_video_news_fall(img){ video_news_img_stack.shift(); var width = img.width; var height = img.height; var url = img.src; height = height / width * news_width_each; width = news_width_each; var column; if(deepest_news[0] <= deepest_news[1] && deepest_news[0] <= deepest_news[2]){ column = 0; } else{ if(deepest_news[1] <= deepest_news[0] && deepest_news[1] <= deepest_news[2]){ column = 1; } else{ if(deepest_news[2] <= deepest_news[0] && deepest_news[2] <= deepest_news[1]){ column = 2; } } } //alert(deepest_video_news); var str = ''; str += '
'; str += '
'; str += '
' + video_news[video_news_count][1] + '
'; str += '
'; str += '
'; $("column_" + column).innerHTML += str; var video_news_item = $("video_news_fall_" + video_news_count) video_news_item.style.backgroundImage="url('" + url + "')"; video_news_item.style.backgroundSize="contain"; video_news_item.style.height = transfer_vw(height); video_news_item.style.width = transfer_vw(width); deepest_news[column] += height; video_news_count ++; if(video_news_img_stack.length > 0){ add_video_news_fall_stack(video_news_img_stack[0]); } } function add_video_news_fall_stack(url){ var img = new Image(); img.onload = function(){ img.onload = null; draw_video_news_fall(img); } img.src = url; } function add_video_news_fall(url){ video_news_img_stack.push(url); if(video_news_img_stack.length == 1){ add_video_news_fall_stack(url); } } function hide_video_news_detail(id){ video_news_to[id] = -1; if(!big_interval){ do_big_interval(); } } function do_hide_video_news_detail(id){ var video_news_content_height = ($("video_news_content_" + id).style.height.substr(0, $("video_news_content_" + id).style.height.length - 2)); if($("video_news_content_" + id).style.opacity > 0){ $("video_news_content_" + id).style.opacity = $("video_news_content_" + id).style.opacity * 1 - 0.1; $("video_news_content_" + id).style.marginTop = video_news_content_height - $("video_news_content_" + id).style.opacity * 7 + "vw"; } } function show_video_news_detail(id){ video_news_to[id] = 1; if(!big_interval){ do_big_interval(); } } function do_show_video_news_detail(id){ var video_news_content_height = ($("video_news_content_" + id).style.height.substr(0, $("video_news_content_" + id).style.height.length - 2)); if($("video_news_content_" + id).style.opacity < 1){ $("video_news_content_" + id).style.marginTop = video_news_content_height - $("video_news_content_" + id).style.opacity * 7 + "vw"; $("video_news_content_" + id).style.opacity = $("video_news_content_" + id).style.opacity * 1 + 0.1; } } function keep_video_news_detail(id){ show_video_news_detail(id); }