PageSourceSearch

https://www.sony.com.cn/etc/designs/sonyportal/clientlib-basic.js

js sony.com.cn collected 2026-10-02 07:28:23 UTC 27,336 bytes, 971 lines download raw bytes

1domEl = {};
2domEl.window = $(window);
3domEl.body = $("body");
4
5/*************** 按浏览器的屏幕分辨率为BODY元素添加样式 *********************/
6
7domEl.addBodyStyle = function () {
8	var w = $(window).width();
9	if (w >= 1200) {
10		domEl.body.addClass("w1200");
11	} else {
12		domEl.body.removeClass("w1200");
13	}
14	if (w < 960) {
15		$("html").addClass("w960");
16	} else {
17		$("html").removeClass("w960");
18	}
19};
20
21/******************* 添加各种mouseover的展示效果 *************************/
22
23domEl.addEffect = function () {
24
25	$(".storiesListBlock, .hoverMotionBlock,.productStoreListBlock,.ProductsListBlock,.storiesList li a,.productStoreList li a").each(function (index, el) {
26		$(el).on("mouseenter", function () {
27			if ($(el).hasClass("enter")) return false;
28			$(el).addClass("enter");
29			setTimeout(function () {
30				if ($(el).hasClass("enter")) {
31					$(el).find("div").slideDown(300);
32				}
33			}, 200)
34		})
35		$(el).on("mouseleave", function () {
36			$(el).removeClass("enter");
37			$(el).find("div").stop(true, true).slideUp(200);
38		})
39	})
40
41	$("#headerNav .hasSubMenu").each(function (index, el) {
42		$(el).on("mouseenter", function () {
43			//$(el).addClass("hover");
44			$($(".subMenuBlock")[index]).show();
45			$($(".NavMenuBlock")[index - 1]).show();
46		})
47		$(el).on("mouseleave", function () {
48			//$(el).removeClass("hover");
49			$($(".subMenuBlock")[index]).hide();
50			$($(".NavMenuBlock")[index - 1]).hide();
51		})
52	})
53
54}
55
56domEl.reSizeText = function (elem, n) {
57	$(elem).each(function (index, el) {
58		var html = $.trim($(el).html());
59		var t = html.length;
60		if (t >= n) {
61			var text = html.substring(0, n - 1) + "…";
62		}
63		$(el).html(text);
64	})
65}
66
67/*************** 获取随机数 *********************/
68
69domEl.getRandomNumber = function (num) {
70	var n = Math.floor(Math.random() * num);
71	return n;
72}
73
74
75/*************** 随机出现KV *********************/
76
77/*domEl.randomKv = function(){
78	if($("#kv .kvList").length > 0){
79		var kvList = $("#kv .kvList");
80		var showNum = domEl.getRandomNumber(kvList.length);
81		$(kvList[showNum]).siblings().remove();
82		var kvImg = $(kvList[showNum]).find("img");
83		
84		var imgSrc = $(kvImg[0]).attr("img-data");
85		var img = new Image();
86		img.onload = function(){
87			$("#kv .link").show();
88			$('#kv img.Kvimg2').show();
89		}
90		img.src = imgSrc;
91		
92		kvImg.each(function(index,el){
93			var url = $(el).attr("img-data");
94			$(el).attr("src",url);
95			if($(el).hasClass("linkImg")){
96				$(el).on("mouseenter",function(){
97					var hoverUrl = $(el).attr("hover-data");
98					$(el).attr("src",hoverUrl);
99				})
100				$(el).on("mouseleave",function(){
101					var url = $(el).attr("img-data");
102					$(el).attr("src",url);
103				})
104			}
105		})
106	}
107}*/
108
109/********************* 全屏滚动的javascript效果 ***********************/
110
111domEl.bannerSlideAction = function (el, pageList) {
112	var self = this;
113
114	self.area = $(el);
115	self.pageArea = $(pageList);
116	self.block = $(el).find("ul").eq(0);
117
118	self.def = function () {
119		self.list = $(el).find("li");
120		self.listNum = self.list.length;
121		self.defW = 240;
122		self.now = 0;
123
124		self.page = Math.ceil(self.listNum / 4);
125		self.move = self.defW * 4;
126
127		$(self.block).css("width", self.defW * self.listNum + "px");
128		$(self.pageArea).html("");
129
130		for (var i = 0; i < self.page; i++) {
131			var link = $('<span class="innerBlock"></span>').appendTo(self.pageArea);
132			$(link).on("mouseenter", function () {
133				$(this).addClass("hover");
134			}),
135				$(link).on("mouseleave", function () {
136					$(this).removeClass("hover");
137				})
138			link.index = i;
139			if (i == 0) { link.addClass("active"); }
140		}
141	}
142
143	self.def();
144
145	self.leftButton = $(el).find(".prevButton");
146	self.rightButton = $(el).find(".nextButton");
147	self.leftMark = $(el).find(".leftMark");
148	self.rightMark = $(el).find(".rightMark");
149
150	self.motion = function () {
151		$(self.block).animate({
152			left: self.left * -1
153		}, 600, function () {
154			self.key = 0;
155			if (self.now == 0) {
156				self.leftButton.hide();
157				//self.rightButton.show();
158			} else if (self.now == self.page - 1) {
159				//self.leftButton.show();
160				self.rightButton.hide();
161			} else {
162				//self.leftButton.show();
163				//self.rightButton.show();
164			}
165		})
166	}
167
168	self.resetGallery = function () {
169		self.def();
170	}
171
172	self.reSizeMarkWidth = function () {
173		var markWidth = ($("body").width() - 960) / 2;
174		$(".motionMark").css("width", markWidth);
175		$(el).find(".leftMark").css('left', markWidth * -1);
176		$(el).find(".rightMark").css('right', markWidth * -1);
177	}
178
179	self.pageArea.on("click", "span", function (e) {
180		self.key = 1;
181		self.pageArea.find("span").removeClass("active");
182		$(e.currentTarget).addClass("active");
183		self.now = (self.now != $(e.currentTarget).index()) ? $(e.currentTarget).index() : self.now;
184
185		self.left = Math.min(self.now * 4 * self.defW, self.defW * (self.listNum - 4));
186		self.left = Math.max(self.left, 0);
187
188		self.motion();
189		return false;
190	})
191
192	$(self.leftButton).on("click", function (event) {
193		if (self.now == 0 || self.key == 1) return false;
194		self.key = 1;
195		self.now--;
196		self.pageArea.find("span").eq(self.now).on("click");
197		return false;
198	})
199
200	$(self.rightButton).on("click", function (event) {
201		if (self.now == self.page - 1 || self.key == 1) return false;
202		self.key = 1;
203		self.now++;
204		self.pageArea.find("span").eq(self.now).on("click");
205		return false;
206	})
207
208	$(self.leftMark).on("click", function (event) {
209		if (self.now == 0 || self.key == 1) return false;
210		self.key = 1;
211		self.now--;
212		self.pageArea.find("span").eq(self.now).on("click");
213		return false;
214	})
215
216	$(self.rightMark).on("click", function (event) {
217		if (self.now == self.page - 1 || self.key == 1) return false;
218		self.key = 1;
219		self.now++;
220		self.pageArea.find("span").eq(self.now).on("click");
221		return false;
222	})
223
224	$(".leftMark, .prevButton").on("mouseenter", function () {
225		if (self.leftButton.css("display") == "none") {
226			if (self.now != 0) self.leftButton.show();
227		}
228	})
229
230	$(".leftMark, .prevButton").on("mouseleave", function () {
231		self.leftButton.hide();
232	})
233
234	$(".rightMark, .nextButton").on("mouseenter", function () {
235		if (self.leftButton.css("display") == "none") {
236			if (self.now != self.page - 1) self.rightButton.show();
237		}
238	})
239
240	$(".rightMark, .nextButton").on("mouseleave", function () {
241		self.rightButton.hide();
242	})
243
244	self.reSizeMarkWidth();
245
246	$(window).on('resize', function () {
247		self.reSizeMarkWidth();
248	});
249
250}
251
252
253/********************* gallery javascript效果 ***********************/
254
255domEl.gallerySlideAction = function (el, pageList) {
256	var self = this;
257
258	self.area = $(el);
259	self.pageArea = $(pageList);
260	self.block = $(el).find("ul").eq(0);
261
262	self.def = function () {
263		self.list = $(el).find("li");
264		self.listNum = self.list.length;
265		self.defW = 240;
266		self.now = 0;
267
268		self.page = Math.ceil(self.listNum / 4);
269		self.move = self.defW * 4;
270
271		$(self.leftButton).hide();
272		if (self.page > 1) {
273			$(self.rightButton).show();
274		}
275
276		$(self.block).css("width", self.defW * self.listNum + "px");
277		$(self.pageArea).html("");
278
279		for (var i = 0; i < self.page; i++) {
280			var link = $('<span class="innerBlock"></span>').appendTo(self.pageArea);
281			$(link).on("mouseenter", function () {
282				$(this).addClass("hover");
283			}),
284				$(link).on("mouseleave", function () {
285					$(this).removeClass("hover");
286				})
287			link.index = i;
288			if (i == 0) { link.addClass("active") }
289		}
290		//console.log(self.listNum);
291		if (self.listNum <= 4) {
292			$(self.rightMark).hide();
293			$(self.leftMark).hide();
294			$(self.rightButton).hide();
295			$(self.leftButton).hide();
296		}
297		domEl.reSizeText($("#galleryData p"), 91);
298	}
299
300	self.def();
301
302	self.leftButton = $(el).find(".prevButton");
303	self.rightButton = $(el).find(".nextButton");
304	self.leftMark = $(el).find(".leftMark");
305	self.rightMark = $(el).find(".rightMark");
306
307	self.motion = function () {
308		$(self.block).animate({
309			left: self.left * -1
310		}, 600, function () {
311			self.key = 0;
312			if (self.now == 0) {
313				self.leftButton.hide();
314				self.rightButton.show();
315			} else if (self.now == self.page - 1) {
316				self.leftButton.show();
317				self.rightButton.hide();
318			} else {
319				self.leftButton.show();
320				self.rightButton.show();
321			}
322		})
323	}
324
325	self.resetGallery = function () {
326		self.def();
327	}
328
329	self.reSizeMarkWidth = function () {
330		var markWidth = ($("body").width() - 960) / 2;
331		$(".motionMark").css("width", markWidth);
332		$(el).find(".leftMark").css('left', markWidth * -1);
333		$(el).find(".rightMark").css('right', markWidth * -1);
334	}
335
336	self.pageArea.on("click", "span", function (e) {
337		self.key = 1;
338		self.pageArea.find("span").removeClass("active");
339		$(e.currentTarget).addClass("active");
340		self.now = (self.now != $(e.currentTarget).index()) ? $(e.currentTarget).index() : self.now;
341
342		self.left = self.now * 4 * self.defW;
343		self.left = Math.max(self.left, 0);
344
345		self.motion();
346		return false;
347	})
348
349	$(self.leftButton).on("click", function (event) {
350		if (self.now == 0 || self.key == 1) return false;
351		self.key = 1;
352		self.now--;
353		self.pageArea.find("span").eq(self.now).on("click");
354		return false;
355	})
356
357	$(self.rightButton).on("click", function (event) {
358		if (self.now == self.page - 1 || self.key == 1) return false;
359		self.key = 1;
360		self.now++;
361		self.pageArea.find("span").eq(self.now).on("click");
362		return false;
363	})
364
365	$(self.leftMark).on("click", function (event) {
366		if (self.now == 0 || self.key == 1) return false;
367		self.key = 1;
368		self.now--;
369		self.pageArea.find("span").eq(self.now).on("click");
370		return false;
371	})
372
373	$(self.rightMark).on("click", function (event) {
374		if (self.now == self.page - 1 || self.key == 1) return false;
375		self.key = 1;
376		self.now++;
377		self.pageArea.find("span").eq(self.now).on("click");
378		return false;
379	})
380
381	//console.log(self.listNum);
382
383
384	self.reSizeMarkWidth();
385
386	$(window).on('resize', function () {
387		self.reSizeMarkWidth();
388	});
389
390}
391
392/*************** 图库浮层效果 *********************/
393
394domEl.createGallery = function () {
395
396	var self = this;
397	self.galleryList = $("#galleryData a");
398	self.galleryNumber = self.galleryList.length;
399	self.key = 1;
400	self.typeArr = {};
401	self.now = 0;
402
403	var wh = $(window).height() - 201;
404	$("#markBoxGallery").css("height", wh);
405	$("body").addClass("overflowHidden");
406	$("#mainAll").hide();
407
408	//$(window).css("overflow","hidden");
409
410	self.resizeImg = function () {
411		var w = $("#middlePicture").width();
412		var h = $("#middlePicture").height();
413
414		if ($(window).height() < 650) {
415			var area_h = 650 - 321;
416		} else {
417			var area_h = $(window).height() - 321;
418		}
419
420		if (h != area_h) {
421			var per = area_h / h;
422			h = area_h;
423			w = Math.ceil(w * per);
424		}
425
426		var maxw = (self.nowImg_width > 798) ? 798 : self.nowImg_width;
427
428		if (w > maxw) {
429			var per = maxw / w;
430			w = maxw;
431			h = Math.ceil(h * per);
432		}
433		//$("#galleryArea").css("height",h-100);
434		var mtb = (area_h - h) / 2 + "px";
435		$("#middlePicture").css({ "width": w, "height": h, "visibility": "visible", "margin-top": mtb, "margin-bottom": mtb });
436		$("#middlePicture").css("display", "block");
437		$("#galleryArea").css({ "height": h + (area_h - h) });
438
439		var keyLeft = (960 - 80) / 2;
440		$("#galleryKey").css("left", keyLeft + "px");
441
442		self.rest();
443	}
444
445	$("#galleryData p").each(function (index, el) {
446		//console.log($(el).outerHeight())
447		if ($(el).outerHeight() < 86) {
448			$(el).css("height", "62px");
449		}
450	})
451
452	self.showImage = function () {
453		var img = new Image();
454		img.onload = function () {
455			$("#galleryArea").html("");
456			var middleImg = $("<img>").attr("id", "middlePicture").appendTo($("#galleryArea"));
457			$("#middlePicture").attr("src", self.middlePicture);
458			setTimeout(function () {
459				self.nowImg_width = $("#middlePicture").width();
460				self.nowImg_height = $("#middlePicture").height();
461				var w = $("#middlePicture").width();
462				var h = $("#middlePicture").height();
463				if (w > 798) {
464					var per = 798 / w;
465					w = 798;
466					h = Math.ceil(h * per);
467				}
468
469				var area_h = $(window).height() - 321;
470				if (h > area_h) {
471					var per = area_h / h;
472					h = area_h;
473					w = Math.ceil(w * per);
474				}
475				var mtb = (area_h - h) / 2 + "px";
476				$("#middlePicture").css({ "width": w, "height": h, "margin-top": mtb, "margin-bottom": mtb, "visibility": "visible" });
477				$("#middlePicture").css("display", "block");
478				$("#markBoxGallery").css("height", "auto");
479				self.resizeImg();
480				self.rest();
481			}, 100)
482		}
483
484		img.src = self.middlePicture;
485	}
486
487	$("#galleryData").on("click", "a", function (e) {
488		$("#middlePicture").css("visibility", "hidden");
489		self.middlePicture = $(e.currentTarget).attr("href");
490		self.now = $(e.currentTarget).attr("index");
491		self.showImage();
492		$(".galleryPhotoButton").show();
493		//$("#galleryListArea").hide();
494		return false;
495	})
496
497	$("#galleryData a").each(function (index, el) {
498		var typeName = $(el).attr("type");
499		if (self.typeArr[typeName] == undefined) {
500			self.typeArr[typeName] = [];
501		}
502		self.typeArr[typeName].push(index);
503	})
504
505	self.listDiv = $("<div>").css("display", "none").appendTo($("#galleryListArea"));
506	$("#galleryData li").appendTo(self.listDiv);
507	$(self.listDiv).find('a').each(function (index, el) {
508		$(el).attr("index", index);
509	})
510
511	$("#galleryTypeList").on("click", "a", function (e) {
512		var n = $(e.currentTarget).attr('id');
513		$("#galleryData").html("");
514		$("#galleryData").css("left", 0);
515		if (self.typeArr[n] == undefined) {
516			self.listDiv.find("li").each(function (index, el) {
517				$(el).clone().appendTo($("#galleryData"));
518			})
519		} else {
520			var l = self.listDiv.find("li");
521			for (var i = 0; i < self.typeArr[n].length; i++) {
522				var m = self.typeArr[n][i];
523				$(l[m]).clone().appendTo($("#galleryData"));
524			}
525		}
526		/*if(self.gallerySlide != undefined){
527			self.gallerySlide.delete;
528		}*/
529		self.gallerySlide.resetGallery();
530
531		$("#galleryTypeList a").removeClass("active");
532		$(e.currentTarget).addClass("active");
533		$(".galleryPhotoButton").hide();
534		return false;
535	})
536
537	$("#galleryData").on("mouseenter", "a", function (e) {
538		var pp = $(e.currentTarget).find("p").eq(0);
539		$(pp).slideDown(300);
540		return false;
541	})
542
543	$("#galleryData").on("mouseleave", "a", function (e) {
544		var pp = $(e.currentTarget).find("p").eq(0);
545		$(pp).slideUp(200);
546		return false;
547	})
548
549	var typeLink = '<li><a id="allPhotoLink" href="#"></a></li>';
550	for (var i in self.typeArr) {
551		var t = '<li><a href="#" id="' + i + '"></a></li>';
552		typeLink += t;
553	}
554	$("#galleryTypeList").html(typeLink);
555	if ($("#galleryTypeList li").length == 2) {
556		$("#galleryTypeList li").eq(1).remove();
557	}
558
559	$("#sonyBoxGalleryFooter").on("mouseenter", function () {
560		if (self.key == 1) return false;
561		self.key = 1;
562		$("#galleryListArea").fadeIn("normal", function () {
563			self.key = 0;
564		});
565	})
566
567	$("#sonyBoxGalleryFooter").on("mouseleave", function () {
568		if (self.key == 1) return false;
569		self.key = 1;
570		$("#galleryListArea").fadeOut("fast", function () {
571			self.key = 0;
572		});
573	})
574
575	self.gallerySlide = new domEl.gallerySlideAction("#galleryListBlock", "#galleryPage");
576	$("#galleryTypeList a").eq(0).on("click");
577	$("#galleryData a").eq(0).on("click");
578	setTimeout(function () {
579		$("#galleryListArea").fadeOut("fast", function () {
580			self.key = 0;
581		});
582	}, 600);
583
584	self.rest = function () {
585		var fullWidth = $("#markBoxGallery").width();
586		var fullHeight = $("#markBoxGallery").height();
587		var markWidth = (fullWidth - 600) / 2;
588		$(".galleryPhotoButton").css({ "width": markWidth, "height": fullHeight });
589
590		var left = (fullWidth - 960) / 2 - 70;
591		var right = (960 - 798) / 2 + 120;
592		$("#galleryPhotoDown").css("background-position", left + "px center");
593		$("#galleryPhotoUp").css("background-position", right + "px center");
594	}
595
596	$(".galleryPhotoButton").each(function (index, el) {
597		$(el).on("mouseenter", function () {
598			$(el).removeClass("alpha0");
599		})
600		$(el).on("mouseleave", function () {
601			$(el).addClass("alpha0");
602		})
603	})
604
605	$("#galleryPhotoUp").on("click", function () {
606		var li = $(self.listDiv).find('a');
607		self.now++;
608		if (self.now >= li.length) {
609			self.now = 0;
610		}
611		self.middlePicture = $(li[self.now]).attr("href");
612		self.showImage();
613	})
614
615	$("#galleryPhotoDown").on("click", function () {
616		var li = $(self.listDiv).find('a');
617		self.now--;
618		if (self.now < 0) {
619			self.now = li.length - 1;
620		}
621		self.middlePicture = $(li[self.now]).attr("href");
622		self.showImage();
623	})
624
625	//domEl.reSizeText($("#galleryData p"),91);
626
627	if (self.galleryNumber == 1) {
628		//console.log(self.galleryNumber);
629		$("#galleryPhotoUp,#galleryPhotoDown").remove();
630	}
631
632	$("#galleryKey").on("click", function () {
633		if ($("#galleryListArea").css("display") == "none") {
634			if (self.key == 1) return false;
635			self.key = 1;
636			$("#galleryListArea").fadeIn("normal", function () {
637				self.key = 0;
638			});
639		}
640		return false;
641	})
642
643	var keyLeft = (960 - 80) / 2;
644	$("#galleryKey").css("left", keyLeft + "px");
645
646	$(window).on('resize', function () {
647		self.resizeImg();
648	});
649
650}
651
652
653/*************** 将地址字符串后的参数转换为数组返回 *********************/
654
655domEl.tb_parseQuery = function (query) {
656	var Params = {};
657	if (!query) { return Params; }
658	var Pairs = query.split(/[;&]/);
659	for (var i = 0; i < Pairs.length; i++) {
660		var KeyVal = Pairs[i].split('=');
661		if (!KeyVal || KeyVal.length != 2) { continue; }
662		var key = unescape(KeyVal[0]);
663		var val = unescape(KeyVal[1]);
664		val = val.replace(/\+/g, ' ');
665		Params[key] = val;
666	}
667	return Params;
668}
669
670domEl.QueryString = function (url) {
671	var queryString = url.replace(/^[^\?]+\??/, '');
672	var params = domEl.tb_parseQuery(queryString);
673	return params;
674}
675
676/*************** 新闻浮层效果 *********************/
677// 取得当前页面滚动高度并纪录下来
678// 展开浮层显示新闻内容,并根据新闻内容自适应高度
679// 关闭浮层后将底层页面滚动到展开浮层前的位置
680
681domEl.sonyBox = function () {
682	var self = this;
683
684	//关闭浮层
685
686	self.Recenspace = function (Html) {
687		rs = new ActiveXObject("ADODB.RecordSet");
688		rs.fields.append("a", 201, 1);
689		rs.open();
690		rs.addNew();
691		rs(0).appendChunk(Html);
692		rs.update();
693		return rs(0).value;
694		rs.close();
695	}
696
697	if (window.ActiveXObject) {
698		isie = true;
699	} else {
700		isie = false;
701	}
702
703	self.closeSonyBox = function () {
704		$("#sonyBoxBg, #sonyBox").hide();
705		domEl.window.scrollTop(self.windowScroll);
706	}
707
708	self.createBox = function () {
709
710		//创建浮层的html结构
711
712		self.h = $(window).height() + 100;
713		if ($("#sonyBoxBg").length < 1) {
714			self.boxBg = $("<div>").attr("id", "sonyBoxBg").css("height", self.h).appendTo(domEl.body).addClass("fixed-top");
715		}
716
717		//if(self.boxObj.type == "html" || self.boxObj.type == "gallery" || self.boxObj.type == "yuanliu"){
718
719		var detail = self.url;
720		$.ajax({
721			url: "/services/sonyportal/presskit/search",
722			type: "GET",
723			async: false,
724			data: {
725				"path": detail
726			},
727			success: function (data) {
728				//console.log(data.presskits);
729
730				for (var i = 0; i < data.presskits.length; i++) {
731					var current = data.presskits[i];
732					if (current["path"] == detail) {
733						$("#sonyBox .date").text(current["date"]);
734						$("#mediaNewsLink2").attr("href", current["url"]);
735						$("#mediaNewsLink2").attr("href", $("#mediaNewsLink2").attr("href").replace(".htm.html", ".htm"));
736						$("#sonyBoxTitle h1").text(current["title"]);
737						if (current["zip"]) {
738							$("#galleryDownload").attr("href", current["zip"]);
739						}
740						else {
741							$("#galleryDownload").hide();
742						}
743						$(".sonypresskit").attr("img-data", current["image"]);
744						$("#galleryData").empty();
745						var shurl = window.location.href;
746						var shTextdescription = $("#sonyBoxTitle h1").html();
747						var shImg = 'http://www.sony.com.cn' + $(".sonypresskit").attr("img-data");
748						shkv_description(shurl, shImg, shTextdescription);
749						function shkv_description(shurl, shImg, shTextdescription) {
750							$(".sh_sina").attr('href', 'http://service.weibo.com/share/share.php?url=' + shurl + '&title=' + shTextdescription + '&pic=' + shImg + '&searchPic=false');
751							$(".sh_qq").attr('href', 'http://v.t.qq.com/share/share.php?url=' + shurl + '&title=' + shTextdescription + '&pic=' + shImg);
752							$(".sh_sohu").attr('href', 'http://t.sohu.com/third/post.jsp?url=' + shurl + '&title=' + encodeURIComponent(shTextdescription) + '&pic=' + shImg + '&
752content=utf-8');
753							$(".sh_renren").attr('href', 'http://widget.renren.com/dialog/share?resourceUrl=' + shurl + '&description=' + encodeURIComponent(shTextdescription) + '&pic=' + shImg + '&description=' + shurl);
754							$(".sh_qzone").attr('href', 'http://sns.qzone.qq.com/cgi-bin/qzshare/cgi_qzshare_onekey?url=' + shurl + '&desc=' + shTextdescription + '&pics=' + shImg);
755						}
756						for (var j = 0; j < current["gallery"].length; j++) {
757							var gallery = current["gallery"][j];
758							if (j == 0) {
759								$("#galleryArea").append('<img id="middlePicture" src="' + gallery["largeImage"] + '">');
760							}
761							//console.log(gallery);		
762							var imageType = gallery["type"];
763							if (!imageType) {
764								imageType = "ActionPhotoLink";
765							}
766							$("#galleryData").append('<li><a href="' + gallery["largeImage"] + '" type="' + imageType + '"><img src="' + gallery["smallImage"] + '"><p>' + gallery["description"] + '</p></a></li>');
767						}
768					}
769				}
770				//self.resizeImg();
771				domEl.window.scrollTop(0);
772				//$(data).appendTo(domEl.body);
773				$("#sonyBoxBg").show();
774				//$("#sonyBox").fadeIn("nomal");
775				//if(self.boxObj.type == "gallery"){
776				domEl.createGallery();
777				//}
778				//if(self.boxObj.type == "yuanliu"){
779				//self.yuanliuSlide = new domEl.bannerSlideAction("#slideListBlock","#slidePage");
780				//}
781			},
782			error: function (edata) {
783				console.log("error");
784			}
785
786
787
788
789		})
790		//}
791	}
792
793	self.openSonyBox = function () {
794		//self.boxObj = domEl.QueryString(self.url);
795		//$("#sonyBox").remove();
796		self.createBox();
797		$("#mainAll").hide();
798		$("#sonyBox").show();
799	}
800
801	self.init = function () {
802		self.link = $(".sonyBox");
803		self.link.each(function (index, el) {
804			$(el).on("click", function (e) {
805				e.preventDefault();
806				self.windowScroll = domEl.window.scrollTop();
807				self.url = $(el).attr("href");
808				self.openSonyBox();
809				return false;
810			})
811		})
812
813		$("#sonyBoxHeader").on("mouseenter", function () {
814			$("#prevPage, #nextPage").fadeIn();
815		})
816
817		$("#sonyBoxHeader").on("mouseleave", function () {
818			$("#prevPage, #nextPage").fadeOut();
819		})
820
821		$("#sonyBoxClose").on("click", function () {
822			$("#mainAll").show();
823			self.closeSonyBox();
824			$("body").removeClass("overflowHidden");
825			return false;
826		})
827
828		$(".sonyBox").on("click", function (e) {
829			self.url = $(this).attr("href");
830			self.openSonyBox();
831			return false;
832		})
833
834		$("#sonyBoxFooter").on("mouseenter", function () {
835			$(this).addClass("hover");
836		})
837
838		$("#sonyBoxFooter").on("mouseleave", function () {
839			$(this).removeClass("hover");
840		})
841	}
842
843	self.init();
844}
845
846/*************** 页面ready和页面resize *********************/
847
848$(document).ready(function () {
849	domEl.addBodyStyle();
850	//domEl.randomKv();
851	domEl.addEffect();
852
853	/*************** KV轮播 *************************/
854	/*var kvSlider = $('#kv').bxSlider({
855			auto: true, 
856			speed: 500,
857			startSlide : 0,
858			infiniteLoop: true,
859			pager: true,
860			controls: true,
861			auto: true,
862			pause: 4000,
863			autoHover: true,
864			onSliderLoad: function(){
865				$(".bx-pager-item a").on("click",function(){
866					var index = $(".bx-pager-item a").index(this);
867
868					kvSlider.goToSlide(index);
869				})
870			}
871
872		});*/
873	if ($(".swiper-container").length > 0) {
874		var tabsSwiper = new Swiper(
875			'.swiper-container', {
876			loop: true,
877			autoplay: 5000,
878			speed: 800,
879			onSlideChangeStart: function () {
880				$(".pagination .active")
881					.removeClass('active');
882				$(".pagination a").eq(
883					tabsSwiper.activeLoopIndex)
884					.addClass('active');
885			}
886		})
887	}
888
889
890	$(".pagination a").eq(0).addClass("active");
891	$(".pagination a").on('touchstart mousedown', function (e) {
892		e.preventDefault()
893		$(".pagination .active").removeClass('active')
894		$(this).addClass('active');
895		tabsSwiper.swipeTo($(this).index())
896	})
897	$(".pagination a").on("click", function (e) {
898		e.preventDefault();
899	})
900	$('.swiper-container').on("mouseenter", function () {
901		tabsSwiper.stopAutoplay();
902	}), $('.swiper-container').on("mouseleave", function () {
903		tabsSwiper.startAutoplay();
904	})
905	$('.swiper-container .prev').on('click', function (e) {
906		e.preventDefault()
907		tabsSwiper.swipePrev()
908	})
909	$('.swiper-container .next').on('click', function (e) {
910		e.preventDefault()
911		tabsSwiper.swipeNext()
912	})
913	if ($("#sonyBox").length > 0) {
914		domEl.box = new domEl.sonyBox();
915	}
916
917	$("#headerNav ul li>a").each(function () {
918		if (window.location.href.indexOf($(this).attr("href")) > -1) {
919			$(this).addClass("active");
920		}
921		$("#headerNav ul li>a").eq(0).removeClass("active");
922	})
923	if ($("#NewRecommendBannerArea").length > 0) {
924		domEl.bannerSlide = new domEl.bannerSlideAction("#NewRecommendBannerArea", "#NewRecommendPage");
925	}
926
927	if ($.browser.msie && ($.browser.version == "6.0") && !$.support.style) {
928		DD_belatedPNG.fix('.pngfix');
929	}
930
931})
932
933$(window).on('resize', function () {
934	domEl.addBodyStyle();
935});
936
937jQuery.browser = {};
938(function () {
939	jQuery.browser.msie = false;
940	jQuery.browser.version = 0;
941	if (navigator.userAgent.match(/MSIE ([0-9]+)\./)) {
942		jQuery.browser.msie = true;
943		jQuery.browser.version = RegExp.$1;
944	}
945})();
946
947/*************** 首页自适应 *********************/
948$(function () {
949	var sUserAgent = navigator.userAgent.toLowerCase();
950	var bIsIpad = sUserAgent.match(/ipad/i) == "ipad";
951	var bIsIphoneOs = sUserAgent.match(/iphone os/i) == "iphone os";
952	var bIsMidp = sUserAgent.match(/midp/i) == "midp";
953	var bIsUc7 = sUserAgent.match(/rv:1.2.3.4/i) == "rv:1.2.3.4";
954	var bIsUc = sUserAgent.match(/ucweb/i) == "ucweb";
955	var bIsAndroid = sUserAgent.match(/android/i) == "android";
956	var bIsCE = sUserAgent.match(/windows ce/i) == "windows ce";
957	var bIsWM = sUserAgent.match(/windows mobile/i) == "windows mobile";
958	//mobile
959	if (bIsIphoneOs || bIsMidp || bIsUc7 || bIsUc || bIsAndroid || bIsCE || bIsWM) {
960		//mobilestyle
961		$('body,html').addClass('mobile');
962		metas = window.parent.document.getElementsByTagName("meta");
963		for (var i = 0; i < metas.length; i++) {
964			var attrName = metas[i].getAttribute("name")
965			console.log('viewport name:', attrName)
966			if (attrName == 'viewport') {
967				metas[i].setAttribute("content", "width=750, user-scalable=no, target-densitydpi=device-dpi")
968			}
969		}
970	}
971})

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.