/*! http://responsiveslides.com v1.54 by @viljamis */
(function(c, i, b) {
c.fn.responsiveslides = function(l) {
var a = c.extend({
auto: !0,
speed: 1000,
timeout: 8e3,
pager: !1,
nav: !1,
random: !1,
pause: !1,
pausecontrols: !0,
prevtext: "previous",
nexttext: "next",
maxwidth: "",
navcontainer: "",
manualcontrols: "",
namespace: "rslides",
before: c.noop,
after: c.noop
}, l);
return this.each(function() {
b++;
var f = c(this),
s, r, t, m, p, q, n = 0,
e = f.children(),
c = e.size(),
h = parsefloat(a.speed),
d = parsefloat(a.timeout),
u = parsefloat(a.maxwidth),
g = a.namespace,
d = g + b,
e = g + "_nav " + d + "_nav",
v = g + "_here",
j = d + "_on",
w = d + "_s",
k = c("
"),
x = {
"float": "left",
position: "relative",
opacity: 1,
zindex: 2
},
y = {
"float": "none",
position: "absolute",
opacity: 0,
zindex: 1
},
f = function() {
var b = (document.body || document.documentelement).style,
a = "transition";
if("string" === typeof b[a]) return !0;
s = ["moz", "webkit", "khtml", "o", "ms"];
var a = a.charat(0).touppercase() + a.substr(1),
c;
for(c = 0; c < s.length; c++)
if("string" === typeof b[s[c] + a]) return !0;
return !1
}(),
z = function(b) {
a.before(b);
f ? (e.removeclass(j).css(y).eq(b).addclass(j).css(x),
n = b, settimeout(function() {
a.after(b)
}, h)) : e.stop().fadeout(h, function() {
c(this).removeclass(j).css(y).css("opacity", 1)
}).eq(b).fadein(h, function() {
c(this).addclass(j).css(x);
a.after(b);
n = b
})
};
a.random && (e.sort(function() {
return math.round(math.random()) - 0.5
}), f.empty().append(e));
e.each(function(a) {
this.id = w + a
});
f.addclass(g + " " + d);
l && l.maxwidth && f.css("max-width", u);
e.hide().css(y).eq(0).addclass(j).css(x).show();
f && e.show().css({
"-webkit-transition": "opacity " + h + "ms ease-in-out",
"-moz-transition": "opacity " +
h + "ms ease-in-out",
"-o-transition": "opacity " + h + "ms ease-in-out",
transition: "opacity " + h + "ms ease-in-out"
});
if(1 < e.size()) {
if(d < h + 100) return;
if(a.pager && !a.manualcontrols) {
var a = [];
e.each(function(a) {
a += 1;
a += "" + a + ""
});
k.append(a);
l.navcontainer ? c(a.navcontainer).append(k) : f.after(k)
}
a.manualcontrols && (k = c(a.manualcontrols), k.addclass(g + "_tabs " + d + "_tabs"));
(a.pager || a.manualcontrols) && k.find("li").each(function(a) {
c(this).addclass(w + (a + 1))
});
if(a.pager || a.manualcontrols) q =
k.find("a"), r = function(a) {
q.closest("li").removeclass(v).eq(a).addclass(v)
};
a.auto && (t = function() {
p = setinterval(function() {
e.stop(!0, !0);
var b = n + 1 < c ? n + 1 : 0;
(a.pager || a.manualcontrols) && r(b);
z(b)
}, d)
}, t());
m = function() {
a.auto && (clearinterval(p), t())
};
a.pause && f.hover(function() {
clearinterval(p)
}, function() {
m()
});
if(a.pager || a.manualcontrols) q.bind("click", function(b) {
b.preventdefault();
a.pausecontrols || m();
b = q.index(this);
n === b || c("." + j).queue("fx").length || (r(b), z(b))
}).eq(0).closest("li").addclass(v),
a.pausecontrols && q.hover(function() {
clearinterval(p)
}, function() {
m()
});
if(a.nav) {
g = "" + a.prevtext + "" + a.nexttext + "";
l.navcontainer ? c(a.navcontainer).append(g) : f.after(g);
var d = c("." + d + "_nav"),
g = d.filter(".prev");
d.bind("click", function(b) {
b.preventdefault();
b = c("." + j);
if(!b.queue("fx").length) {
var d = e.index(b);
b = d - 1;
d = d + 1 < c ? n + 1 : 0;
z(c(this)[0] === g[0] ? b : d);
if(a.pager || a.manualcontrols) r(c(this)[0] === g[0] ? b : d);
a.pausecontrols || m()
}
});
a.pausecontrols && d.hover(function() {
clearinterval(p)
}, function() {
m()
})
}
}
if("undefined" === typeof document.body.style.maxwidth && l.maxwidth) {
var h = function() {
f.css("width", "100%");
f.width() > u && f.css("width", u)
};
h();
c(i).bind("resize", function() {
h()
})
}
})
}
})(jquery, this, 0);