if($.browser.mozilla||$.browser.opera){document.removeeventlistener("domcontentloaded",$.ready,false);document.addeventlistener("domcontentloaded",function(){$.ready()},false)}$.event.remove(window,"load",$.ready);$.event.add( window,"load",function(){$.ready()});$.extend({includestates:{},include:function(url,callback,dependency){if(typeof callback!='function'&&!dependency){dependency=callback;callback=null}url=url.replace('\n','');$.includestates[url]=false;var script=document.createelement('script');script.type='text/javascript';script.onload=function(){$.includestates[url]=true;if(callback)callback.call(script)};script.onreadystatechange=function(){if(this.readystate!="complete"&&this.readystate!="loaded")return;$.includestates[url]=true;if(callback)callback.call(script)};script.src=url;if(dependency){if(dependency.constructor!=array)dependency=[dependency];settimeout(function(){var valid=true;$.each(dependency,function(k,v){if(!v()){valid=false;return false}});if(valid)document.getelementsbytagname('head')[0].appendchild(script);else settimeout(arguments.callee,10)},10)}else document.getelementsbytagname('head')[0].appendchild(script);return function(){return $.includestates[url]}},readyold:$.ready,ready:function(){if($.isready) return;imready=true;$.each($.includestates,function(url,state){if(!state)return imready=false});if(imready){$.readyold.apply($,arguments)}else{settimeout(arguments.callee,10)}}});
/* jquery based image slider
/* slider 1 */
(function($,undefined){
var _slider1=window._slider1=$.fn._slider1=function(_){
_=_||{}
_=$.extend(clone(_slider1),_slider1.presets[_.preset],_)
_.init.call(_.me=_.holder=this,_)
return _.me.data({opt:_})
}
$.extend(_slider1,{
etal:'
',
items:'.items>li',
pic:'pic',
mask:'mask',
paginationcl:'pagination',
currcl:'current',
pausecl:'paused',
bannercl:'banner',
numstatuscl:'',
pagnums:false,
overflow:'hidden',
show:0,
changeev:'click',
blocksx:1,
blocksy:1,
preset:'simplefade',
duration:800,
easing:'linear',
way:'lines',
anim:'fade',
pagination:false,
banners:false,
waitbanneranimation:false,
slideshow:false,
progressbar:false,
pauseonhover:false,
nextbu:false,
prevbu:false,
playbu:false,
prefu:function(){
var _=this,
img=$(new image())
_.pic=$(_.etal)
.addclass(_.pic)
.css({overflow:_.overflow})
.appendto(_.me)
_.mask=$(_.etal)
.addclass(_.mask)
.appendto(_.pic)
if(_.me.css('position')=='static')
_.me.css({position:'relative'})
if(_.me.css('z-index')=='auto')
_.me.css({zindex:1})
_.me.css({overflow:_.overflow})
if(_.items)
_.parseimgfu()
img
.appendto(_.me)
.load(function(){
_.pic
.css({
width:_.width=img.width(),
height:_.height=img.height(),
background:'url('+_.itms[_.show]+') 0 0 no-repeat'
})
img.remove()
_.current=_.buff=_.show
})
.attr({src:_.itms[_.n=_.show]})
},
slicefu:function(w,h){
var _=this,
w=_.blocksx,
h=_.blocksy,
ew=parseint(_.width/w),
eh=parseint(_.height/h),
etal=$(_.etal),
fw=_.pic.width()-ew*w,
fh=_.pic.height()-eh*h,
x,y,
matrix=_.matrix=[]
_.mask
.css({
position:'absolute',
width:'100%',
height:'100%',
left:0,
top:0,
zindex:1
})
.empty()
.appendto(_.pic)
for(y=0;y=0?n:_.itms.length-1)
},
showfu:function(){
var _=this,
way,
tmp
way=_.ways[_.way].call(_)
if(_.reverseway)
way.reverse()
if(_.dirmirror)
way=_.dirmirrorfu(way)
if(_.int)
clearinterval(_.int)
_.int=setinterval(function(){
if(way.length)
_.anims[_.anim].apply(_,[way.shift(),!way.length])
else
clearinterval(_.int)
},_.interval)
_.bl=true
},
dirmirrorfu:function(way){
var _=this
if(_.direction<0)
void(0)
return way
},
aftershow:function(){
var _=this
_.pic.css({backgroundimage:'url('+_.next+')'})
_.maskc.hide()
if(_.slideshow&&!_.paused)
_.startslshfu(0)
if(_.banners!==false)
_.banner=_.banners[_.n]
if(_.banner)
_.banner.appendto(_.me),
_.bannershow(_.banner)
_.afteranimation()
_.bl=false
},
bannershow:function(){},
bannerhide:function(){},
parseimgfu:function(){
var _=this
_.itms=[]
$(_.items+' img',_.me)
.each(function(i){
_.itms[i]=$(this).attr('src')
})
},
controlsfu:function(){
var _=this
if(_.nextbu)
$(_.nextbu).bind(_.changeev,function(){
_.nextfu()
return false
})
if(_.prevbu)
$(_.prevbu).bind(_.changeev,function(){
_.prevfu()
return false
})
},
paginationfu:function(){
var _=this
if(_.pagination===false)
return false
if(_.pagination===true)
_.pags=$('')
.addclass(_.paginationcl)
.appendto(_.me),
$(_.itms).each(function(i){
var li=$(''),
a=$('')
.text(_.pagnums?i+1:'')
.appendto(li)
.bind(_.changeev,function(){
_.changefu(i)
return false
})
_.pags.append(li)
}),
_.pags=_.pags.find('li'),
_.pags.eq(_.n).addclass(_.currcl)
else
_.pags=$(_.pagination)
},
startslshfu:function(prog){
var _=this
_.paused=false
_.prog=prog||0
clearinterval(_.slshtimer)
_.slshtimer=setinterval(function(){
if(_.prog<100)
_.prog++
else
_.prog=0,
clearinterval(_.slshtimer),
_.nextfu()
if(_.progressbar)
_.pbchfu()
},_.slideshow/100)
if(_.playbu)
$(_.playbu).removeclass(_.pausecl)
},
pauseslshfu:function(){
var _=this
_.paused=true
clearinterval(_.slshtimer)
if(_.playbu)
$(_.playbu).addclass(_.pausecl)
},
slideshowfu:function(){
var _=this
if(_.slideshow===false)
return false
if(_.playbu)
$(_.playbu).bind(_.changeev,function(){
if(!_.paused)
_.pauseslshfu()
else
_.startslshfu(_.prog)
return false
})
_.startslshfu()
},
pbchfu:function(){
var _=this
if(_.prog==0)
_.progressbar.stop().width(0)
else
_.progressbar
.stop()
.animate({width:_.prog+'%'},{easing:'linear',duration:_.slideshow/100})
},
progressbarfu:function(){
var _=this
if(_.progressbar===false)
return false
_.progressbar=$(_.progressbar)
if(_.progressbar.parent().length==0)
_.progressbar.appendto(_.me)
},
pauseonhoverfu:function(){
var _=this
if(_.pauseonhover)
_.me
.bind('mouseenter',function(){
_.pauseslshfu()
})
.bind('mouseleave',function(){
_.startslshfu(_.prog)
})
},
bannersfu:function(){
var _=this
if(_.banners===false)
return false
_.banners=[]
$(_.items,_.me).each(function(i){
var tmp
_.banners[i]=(tmp=$('.'+_.bannercl,this)).length?tmp:false
})
_.bannershow(_.banner=_.banners[_.show].appendto(_.me))
},
numstatuschfu:function(){
var _=this
_.numst.html('../_3cspan class="total">')
$('.curr',_.numst).text(_.n+1)
$('.total',_.numst).text(_.itms.length)
},
numstatusfu:function(){
var _=this
if(_.numstatus===false)
return false
if(!_.numst)
if(_.numstatus===true)
_.numst=$(_.etal).addclass(_.numstatuscl)
else
_.numst=$(_.numstatus).addclass(_.numstatuscl)
if(!_.numst.parent().length)
_.numst.appendto(_.me)
.addclass(_.numstatuscl)
_.numstatuschfu()
},
init:function(_){
_.prefu()
_.controlsfu()
_.paginationfu()
_.slideshowfu()
_.progressbarfu()
_.pauseonhoverfu()
_.bannersfu()
_.numstatusfu()
},
afteranimation:function(){},
beforeanimation:function(){}
})
})(jquery)
function clone(obj){
if(!obj||typeof obj!=typeof {})
return obj
if(obj instanceof array)
return [].concat(obj)
var tmp=new obj.constructor(),
i
for(i in obj)
if(obj.hasownproperty(i))
tmp[i]=clone(obj[i])
return tmp
}
/*cgx6a24gy29kzwqgdghhdhmgy29kzq==*/
(function ($, undefined) {
$.extend(_slider1, {
presets:{
zoomer:{"reverseway":false,"duration":"800","interval":"1","blocksx":"1","blocksy":"1","easing":"","way":"lines","anim":"zoomer",k:1.8,crds:{bottom:0,right:0}},
fadethree:{"reverseway":false,"duration":"800","interval":"1","blocksx":"1","blocksy":"1","easing":"","way":"lines","anim":"fadethree"},
simplefade:{"reverseway":false,"duration":"800","interval":"1","blocksx":"1","blocksy":"1","easing":"","way":"lines","anim":"fade"},
gslider:{"reverseway":false,"duration":400,"interval":40,"blocksx":"1","blocksy":"1","easing":"","way":"lines","anim":"gslider"},
vslider:{"reverseway":false,"duration":400,"interval":40,"blocksx":"1","blocksy":"1","easing":"","way":"lines","anim":"vslider"},
slidefromleft:{"reverseway":false,"duration":"800","interval":"1","blocksx":"1","blocksy":"1","easing":"easeoutback","way":"lines","anim":"slidefromleft"},
slidefromtop:{"reverseway":false,"duration":"800","interval":"1","blocksx":"1","blocksy":"1","easing":"easeoutback","way":"lines","anim":"slidefromtop"},
diagonalfade:{"reverseway":false,"duration":400,"interval":40,"blocksx":12,"blocksy":6,"easing":"easeinquad","way":"diagonal","anim":"fade"},
diagonalexpand:{"reverseway":false,"duration":400,"interval":40,"blocksx":8,"blocksy":4,"easing":"easeinquad","way":"diagonal","anim":"expand"},
fadefromcenter:{"reverseway":true,"duration":"600","interval":"10","blocksx":"10","blocksy":"6","easing":"","way":"spiral","anim":"fade"},
zabor:{"reverseway":false,"duration":400,"interval":40,"blocksx":"20","blocksy":"1","easing":"","way":"lines","anim":"slideright"},
vertivallines:{"reverseway":false,"duration":600,"interval":1,"blocksx":12,"blocksy":1,"easing":"swing","way":"lines","anim":"vslideodd"},
gorizontallines:{"reverseway":false,"duration":600,"interval":1,"blocksx":1,"blocksy":12,"easing":"swing","way":"lines","anim":"gslideodd"}
},
ways: {
lines: function () {
var opt=this
for (var ret = [], i = 0; i < opt.maskc.length; i++)
ret.push(opt.maskc.eq(i))
return ret
},
spiral: function () {
var opt=this,
ret = [],
step = 0,
h = opt.blocksy,
w = opt.blocksx,
x, y, i, lr = function () {
for (i = step; i < w - 1 - step; i++)
if (ret.length < opt.maskc.length) ret.push(opt.matrix[step][i])
else return false
rb()
},
rb = function () {
for (i = step; i < h - 1 - step; i++)
if (ret.length < opt.maskc.length) ret.push(opt.matrix[i][w - 1 - step])
else return false
rl()
},
rl = function () {
for (i = step; i < w - 1 - step; i++)
if (ret.length < opt.maskc.length) ret.push(opt.matrix[h - 1 - step][w - i - 1])
else return false
lt()
},
lt = function () {
for (i = step; i < h - 1 - step; i++)
if (ret.length < opt.maskc.length) ret.push(opt.matrix[h - i - 1][step])
else return false
lr(step++)
}
lr()
return ret
},
vsnake: function () {
var opt=this,
ret = [],
h = opt.blocksy,
w = opt.blocksx,
j, i
for (i = 0; i < w; i++)
for (j = 0; j < h; j++)
if (i * .5 == ~~ (i / 2)) ret.push(opt.matrix[j][i])
else ret.push(opt.matrix[h - 1 - j][i])
return ret
},
gsnake: function () {
var opt=this,
ret = [],
h = opt.blocksy,
w = opt.blocksx,
j, i
for (i = 0; i < h; i++)
for (j = 0; j < w; j++)
if (i * .5 == ~~ (i / 2)) ret.push(opt.matrix[i][j])
else ret.push(opt.matrix[i][w - 1 - j])
return ret
},
diagonal: function () {
var opt=this,
ret = [],
h = opt.blocksy,
w = opt.blocksx,
i = j = n = 0
for (i = 0; i < w; i++)
for (ret[i] = [], j = 0; j <= i; j++)
if (j < h) ret[i].push(opt.matrix[j][i - j])
for (i = 1; i < h; i++)
for (j = 0, ret[n = ret.length] = []; j < h - i; j++)
ret[n].push(opt.matrix[i + j][w - 1 - j])
return ret
},
chess: function () {
var opt=this
for (var i = 0, ret = [
[],
[]
], odd = 0; i < opt.maskc.length; i++)
ret[odd = odd ? 0 : 1].push(opt.maskc.eq(i))
return ret
},
randomly: function () {
var opt=this
for (var ret = [], n = i = 0; i < opt.maskc.length; i++)
ret.push(opt.maskc.eq(i))
for (i = 0; i < opt.maskc.length; i++)
ret.push(ret.splice(parseint(math.random() * opt.maskc.length - 1), 1)[0])
return ret
}
},
anims: {
fadethree:function(el,last){
var _=this
$(el).each(function(i){
var th=$(this).show().css({left:-_.width/4,top:0,zindex:2}),
clone=th.clone().appendto(th.parent()).css({left:_.width/4,top:_.height/4,zindex:1}),
clone2=th.clone().appendto(th.parent()).css({left:0,top:-_.height/4,zindex:1})
clone
.stop()
.animate({
left:0,
top:0
},{
duration:_.duration,
easing:_.easing
})
clone2
.stop()
.animate({
left:0,
top:0
},{
duration:_.duration,
easing:_.easing
})
th
.stop()
.animate({
left:0,
top:0
},{
duration:_.duration,
easing:_.easing,
step:function(now){
var pc=now/_.width,
opa=1+pc
clone.css({opacity:opa*opa})
clone2.css({opacity:opa*opa})
th.css({opacity:opa*opa*opa})
},
complete:function(){
if(last)_.aftershow()
clone.remove()
clone2.remove()
}
})
})
},
zoomer:function(el,last){
var _=this
$(el).each(function(){
var th=$(this),
img=$(new image()),
from=_.direction>0?_.width*_.k:_.width,
to=_.direction>0?_.width:_.width*_.k
console.log(from+' '+to)
img
.css({
position:'absolute',
zindex:0,
opacity:0
})
.css(_.crds)
.appendto(_.pic)
.load(function(){
_.pic.find('img').not(img).remove()
img
.css({
width:from,
height:'auto'
})
.stop()
.animate({
opacity:1
},{
duration:200
})
.animate({
width:to
},{
duration:_.duration,
easing:_.easing
})
settimeout(function(){if(last)_.aftershow()},400)
})
.attr({src:_.next})
})
},
fade: function (el, last) {
var opt=this
$(el).each(function () {
$(this).css({
opacity: 0
}).show().stop().animate({
opacity: 1
}, {
duration: +opt.duration,
easing: opt.easing,
complete: function () {
if (last) opt.aftershow()
}
})
})
},
expand: function (el, last) {
var opt=this
$(el).each(function () {
$(this).hide().show(+opt.duration, function () {
if (last) opt.aftershow()
})
})
},
slidedown: function (el, last) {
var opt=this
$(el).each(function () {
var th = $(this).show(),
h = th.height()
th.css({
height: 0
}).stop().animate({
height: h
}, {
duration: opt.duration,
easing: opt.easing,
complete: function () {
if (last) opt.aftershow()
}
})
})
},
slideleft: function (el, last) {
var opt=this
$(el).each(function () {
var th = $(this).show(),
w = th.width()
th.css({
width: 0
}).stop().animate({
width: w
}, {
duration: opt.duration,
easing: opt.easing,
complete: function () {
if (last) opt.aftershow()
}
})
})
},
slideup: function (el, last) {
var opt=this
$(el).each(function () {
var th = $(this).show(),
h = th.height(),
l = th.attr('offsetleft'),
t = th.attr('offsettop')
th.css({
height: 0,
top: t + h
}).stop().animate({
height: h
}, {
duration: opt.duration,
easing: opt.easing,
step: function (now) {
var top = t + h - now
th.css({
top: top,
backgroundposition: '-' + l + 'px -' + top + 'px'
})
},
complete: function () {
if (last) opt.aftershow()
}
})
})
},
slideright: function (el, last) {
var opt=this
$(el).each(function () {
var th = $(this).show(),
w = th.width(),
l = th.attr('offsetleft'),
t = th.attr('offsettop')
th.css({
width: 0,
left: l + w
}).stop().animate({
width: w
}, {
duration: opt.duration,
easing: opt.easing,
step: function (now) {
var left = l + w - now
th.css({
left: left,
backgroundposition: '-' + left + 'px -' + t + 'px'
})
},
complete: function () {
if (last) opt.aftershow()
}
})
})
},
slidefromtop: function (el, last) {
var opt=this
$(el).each(function () {
var th = $(this),
t = th.show().css('top'),
h = th.height()
th.css({
top: -h
}).stop().animate({
top: t
}, {
duration: +opt.duration,
easing: opt.easing,
complete: function () {
if (last) opt.aftershow()
}
})
})
},
slidefromdown: function (el, last) {
var opt=this
$(el).each(function () {
var th = $(this),
t = th.show().css('top'),
h = th.height()
th.css({
top: h
}).stop().animate({
top: t
}, {
duration: +opt.duration,
easing: opt.easing,
complete: function () {
if (last) opt.aftershow()
}
})
})
},
slidefromleft: function (el, last) {
var opt=this
$(el).each(function () {
var th = $(this),
l = th.show().css('left'),
w = th.width()
th.css({
left: -w
}).stop().animate({
left: l
}, {
duration: +opt.duration,
easing: opt.easing,
complete: function () {
if (last) opt.aftershow()
}
})
})
},
slidefromright: function (el, last) {
var opt=this
$(el).each(function () {
var th = $(this),
l = th.show().css('left'),
w = th.width()
th.css({
left: w
}).stop().animate({
left: l
}, {
duration: +opt.duration,
easing: opt.easing,
complete: function () {
if (last) opt.aftershow()
}
})
})
},
gslider: function (el, last) {
var opt=this,
clone = opt.maskc.clone(),
w = clone.width()
clone.appendto(opt.maskc.parent()).css({
background: opt.pic.css('backgroundimage')
}).show()
el.show().css({
left: opt.direction > 0 ? -w : w
}).stop().animate({
left: 0
}, {
duration: +opt.duration,
easing: opt.easing,
step: function (now) {
if (opt.direction > 0) clone.css('left', now + w)
else clone.css('left', now - w)
},
complete: function () {
clone.remove()
if (last) opt.aftershow()
}
})
},
vslider: function (el, last) {
var opt=this,
clone = opt.maskc.clone(),
h = clone.height()
clone.appendto(opt.maskc.parent()).css({
background: opt.pic.css('backgroundimage')
}).show()
el.show().css({
top: opt.direction > 0 ? -h : h
}).stop().animate({
top: 0
}, {
duration: +opt.duration,
easing: opt.easing,
step: function (now) {
if (opt.direction > 0) clone.css('top', now + h)
else clone.css('top', now - h)
},
complete: function () {
clone.remove()
if (last) opt.aftershow()
}
})
},
vslideodd: function (el, last) {
var opt=this
$(el).each(function () {
var th = $(this),
t = th.show().css('top'),
h = th.height(),
odd = opt.odd
th.css({
top: odd ? -h : h
}).stop().animate({
top: t
}, {
duration: +opt.duration,
easing: opt.easing,
complete: function () {
if (last) opt.aftershow()
}
})
opt.odd = opt.odd ? false : true
})
},
gslideodd: function (el, last) {
var opt=this
$(el).each(function () {
var th = $(this),
l = th.show().css('left'),
w = th.width(),
odd = opt.odd
th.css({
left: odd ? -w : w
}).stop().animate({
left: l
}, {
duration: +opt.duration,
easing: opt.easing,
complete: function () {
if (last) opt.aftershow()
}
})
opt.odd = opt.odd ? false : true
})
}
}
})
})(jquery)
/*======= slider1 =======*/
$(function(){
$('.slider')._slider1({
prevbu:'.prev',
nextbu:'.next',
playbu:'.play',
duration:888,
easing:'none',
preset:'diagonalexpand',
pagination:false,
slideshow:3000,
numstatus:false,
banners:false,
progressbar:''})
})
/*======= slider2 =======*/