return length;
},
kill: function() {
// cancel slideshow
stop();
// reset element
element.style.width = 'auto';
element.style.left = 0;
// reset slides
var pos = slides.length;
while(pos--) {
var slide = slides[pos];
slide.style.width = '100%';
slide.style.left = 0;
if (browser.transitions) translate(pos, 0, 0);
}
// removed event listeners
if (browser.addEventListener) {
// remove current event listeners
element.removeEventListener('touchstart', events, false);
element.removeEventListener('webkitTransitionEnd', events, false);
element.removeEventListener('msTransitionEnd', events, false);
element.removeEventListener('oTransitionEnd', events, false);
element.removeEventListener('otransitionend', events, false);
element.removeEventListener('transitionend', events, false);
window.removeEventListener('resize', events, false);
}
else {
window.onresize = null;
}
}
}
}
if ( window.jQuery || window.Zepto ) {
(function($) {
$.fn.Swipe = function(params) {
return this.each(function() {
$(this).data('Swipe', new Swipe($(this)[0], params));
});
}
})( window.jQuery || window.Zepto )
}
/************************* http://www.diyiapp.com/templets/tan/javascript/s3/common.js *************************/
var PCHOST = 'www.diyiapp.com';
var MHOST = 'm.diyiapp.com';
var IMAGEHOST = 'img.alicdn.diyiapp.com';
var DOWNLOADHOST = 'd.diyiapp.com';
var ADSLOT = {
'fangkuai1': { width: 300, height: 250, enable: true, sid: 1039105 },
'fangkuai2': { width: 300, height: 250, enable: true, sid: 1039106 },
'fangkuai101': { width: 300, height: 250, enable: true, sid: 1039103 },
'fangkuai102': { width: 300, height: 250, enable: true, sid: 1039104 },
'tong101': { width: 728, height: 90, enable: true, sid: 1039102 },
'tong102': { width: 728, height: 90, enable: true, sid: 1039112 },
'tong103': { width: 728, height: 90, enable: true, sid: 1039113 },
'tong104': { width: 728, height: 90, enable: true, sid: 1039114 },
'duantong1': { width: 468, height: 60, enable: true, sid: 1039111 },
'quantong1': { width: 106, height: 90, enable: false, sid: 1039108, hide: ['home'] },
'quantong2': { width: 1064, height: 90, enable: true, sid: 1039099 },
'quantong101': { width: 1064, height: 90, enable: true, sid: 1039118 },
'quantong102': { width: 1064, height: 90, enable: true, sid: 1039119 },
'quantong103': { width: 1064, height: 90, enable: true, sid: 1039120 },
'link1': { width: 320, height: 27, enable: true, sid: 1046665 },
'background101': { width: 0, height: 0, enable: true, sid: 1046194 },
'code1': { width: 0, height: 0, enable: true, sid: 1060741, hide: ['home'] },
'code2': { width: 0, height: 0, enable: true, sid: 1060742, hide: ['home'] },
'quantong1_m': { width: '100%', height: 60, enable: true, sid: 1084496, hide: ['home_m'] },
'quantong2_m': { width: '100%', height: 60, enable: true, sid: 1084497 },
'fangkuai101_m': { width: 250, height: 250, enable: true, sid: 1084498 }
};
var win = $(window);
if (!String.Format) {
String.Format = function (string) {
var args = arguments;
var pattern = new RegExp("\\$([1-" + arguments.length + "])", "g");
return String(string).replace(pattern,
function(match, index) {
return args[index]
})
}
}
if (!String.prototype.utf8UrlEncode) {
String.prototype.utf8UrlEncode= function() {
var input = this;
function EncodeChar(input) {
if (input <= 0x7F) return "%" + input.toString(16);
var leadByte = 0xFF80;
var hexString = "";
var leadByteSpace = 5;
while (input > (Math.pow(2, leadByteSpace + 1) - 1)) {
hexString = "%" + ((input & 0x3F) | 0x80).toString(16) + hexString;
leadByte = (leadByte >> 1);
leadByteSpace--;
input = input >> 6
}
return ("%" + (input | (leadByte & 0xFF)).toString(16) + hexString).toUpperCase()
}
var output = "";
var currentChar = '';
for (var counter = 0; counter < input.length; counter++) {
currentChar = input.charCodeAt(counter);
if ((48 <= currentChar) && (currentChar <= 57)) output = output + input.charAt(counter);
else if ((65 <= currentChar) && (currentChar <= 90)) output = output + input.charAt(counter);
else if ((97 <= currentChar) && (currentChar <= 122)) output = output + input.charAt(counter);
else output = output + EncodeChar(currentChar)
}
return output
}
}
if (!String.prototype.htmlEncode) {
String.prototype.htmlEncode = function() {
var temp = document.createElement ("div");
(temp.textContent != null) ? (temp.textContent = this) : (temp.innerText = this);
var output = temp.innerHTML;
temp = null;
return output;
}
}
if (!Date.prototype.format) {
Date.prototype.format = function(format) {
var o = {
"M+": this.getMonth() + 1,
"d+": this.getDate(),
"h+": this.getHours(),
"m+": this.getMinutes(),
"s+": this.getSeconds(),
"q+": Math.floor((this.getMonth() + 3) / 3),
"S": this.getMilliseconds()
}
if (/(y+)/.test(format)) format = format.replace(RegExp.$1, (this.getFullYear() + "").substr(4 - RegExp.$1.length));
for (var k in o) if (new RegExp("(" + k + ")").test(format)) format = format.replace(RegExp.$1, RegExp.$1.length == 1 ? o[k] : ("00" + o[k]).substr(("" + o[k]).length));
return format
}
}
function cookie(name, value, options) {
if (typeof value != 'undefined') {
options = options || {};
if (value === null) {
value = '';
options.expires = -1;
}
var expires = '';
if (options.expires && (typeof options.expires == 'number' || options.expires.toUTCString)) {
var date;
if (typeof options.expires == 'number') {
date = new Date();
date.setTime(date.getTime() + (options.expires * 24 * 60 * 60 * 1000));
} else {
date = options.expires;
}
expires = '; expires=' + date.toUTCString();
}
var path = options.path ? '; path=' + (options.path) : '';
var domain = options.
Back to home |
File page
Subscribe |
Register |
Login
| N