/*! idTabs v3.0 ~ Sean Catchpole - Copyright 2010 MIT/GPL */
(function (a) { var b, d, e = function (b) { return a(b).attr("href") }, c = function (a) { return a === null && "Null" || a === d && "Undefined" || {}.toString.call(a).slice(8, -1) }; a.fn.idTabs = function () { var a = b.args.apply(this, arguments), c = a.update && "update" || a.remove && "remove" || "bind"; a.area = this; b[c](a); return this }; b = a.idTabs = function (l, m, j) { var k, h, i, g = a(), n = a.metadata ? a(l).metadata() : {}, f = { tab: b.tab, item: b.item }; f = a.extend(f, b.settings, n, m || {}); f.tabarea = a(l); f.data = j || "idTabs" + +new Date; a.each({ selected: ".", event: "!", start: "#" }, function (a, b) { if (c(f[a]) == "String" && f[a].indexOf(b) == 0) f[a] = f[a].substr(1) }); if (f.start === null) f.start = -1; i = []; f.tabs = h = a("a[href^=#]", l); h.each(function () { g = f.item(e(this)); if (g.length) i = i.concat(g.get()) }); f.items = a(i).hide(); k = "idTabs." + f.event; j = f.tabarea.data("idTabs") || {}; j[k] = f; f.tabarea.data("idTabs", j); h.trigger(k).data(f.data, f).bind(k, { s: f }, function () { return b.unbind.apply(this, arguments) }).bind(f.event, { s: f }, b.find); c(f.start) == "Number" && (f.start < 0 || (g = h.eq(f.start)).length) || c(f.start) == "String" && (g = h.filter("a[href=#" + f.start + "]")).length || (g = h.filter("." + f.selected).removeClass(f.selected)).length || f.start === d && (g = h.eq(0)).length; g.length && g.trigger(f.event); return f }; b.args = function () { var d, f = 0, b = {}, e = arguments, g = function (c, a) { if (a.indexOf(".") == 0) b.selected = a; else if (a.indexOf("!") == 0) if (/^!(true|false)$/i.test(a)) b.toggle = /^!true$/i.test(a); else b.event = a; else if (a.indexOf(":") == 0) { a = a.substr(1).toLowerCase(); if (a.indexOf("!") == 0) b[a.substr(1)] = false; else b[a] = true } else if (a) b.start = a }; while (f < e.length) { d = e[f++]; switch (c(d)) { case "Object": a.extend(b, d); break; case "Boolean": b.change = d; break; case "Number": b.start = d; break; case "Function": b.click = d; break; case "Null": b.start = d; break; case "String": a.each(d.split(/\s+/g), g) } } return b }; b.bind = function (b) { if (!b) return; var c = "idTabs" + +new Date; if (b.grouped) a.idTabs(b.area, b, c); else b.area.each(function () { a.idTabs(this, b, c) }) }; b.update = function (f) { if (!f) return; f.update = false; var g, d, e, c = f.event; c = (c + "").indexOf("!") == 0 && c.substr(1) || c; c = c ? "idTabs." + c : ""; return f.area.each(function () { g = a(this); d = g.data("idTabs"); if (!d) return; if (c) { e = a.extend({}, d[c], f); b.remove(d[c]); b(e.tabarea, e, e.data) } else for (c in d) { if (!Object.hasOwnProperty.call(d, c)) continue; e = a.extend({}, d[c], f); b.remove(d[c]); b(e.tabarea, e, e.data) } }) }; b.remove = function (c) { if (!c) return; var e, d, b = c.event; b = (b + "").indexOf("!") == 0 && b.substr(1) || b; b = "idTabs" + (b ? "." + b : ""); return c.area.each(function () { e = a(this).data("idTabs"); delete e["idTabs." + c.event]; a(this).data("idTabs", e); d = c.tabs || a("a[href^=#]", this); if (!d.length && a(this).is("a[href^=#]")) d = a(this); d.trigger(b) }) }; b.find = function (f) { var g = this, c = false, d = f.data.s; a("a[href=" + e(this) + "]:first", d.area).each(function () { var e = a(this).data(d.data); if (e) c = b.showtab.call(e.tabarea == d.tabarea ? g : this, e, f) || c }); return c }; b.showtab = function (c, f) { if (!c || !c.toggle && a(this).is("." + c.selected)) return c && c.change; var d = e(this); if (c.click && c.click.call(this, d, c, f) == false) return c.change; if (c.toggle && a(this).is("." + c.selected)) d = null; return b.show.call(this, d, c, f) }; b.show = function (b, a) { a.tabs.removeClass(a.selected); a.tab(b).addClass(a.selected); a.items.hide(); a.item(b).show(); return a.change }; b.unbind = function (c) { var b = c.data.s; a(this).removeData(b.data).unbind("idTabs." + b.event); return false }; b.extend = function () { var a = arguments; return function () { [].push.apply(a, arguments); this.idTabs.apply(this, a) } }; b.tab = function (b) { if (!b) return a([]); return a("a[href=" + b + "]", this.tabarea) }; b.item = function (b) { if (!b) return a([]); var c = a(b); return c.length ? c : a("." + b.substr(1)) }; b.settings = { start: d, change: false, click: null, selected: ".selected", event: "!click", toggle: false, grouped: false }; b.version = "3.0"; a(function () { a(".idTabs").idTabs() }) })(jQuery);
/*	ColorBox v1.3.6 - a full featured, light-weight, customizable lightbox based on jQuery 1.3 */
(function (c) { function r(b, d) { d = d === "x" ? m.width() : m.height(); return typeof b === "string" ? Math.round(b.match(/%/) ? d / 100 * parseInt(b, 10) : parseInt(b, 10)) : b } function M(b) { b = c.isFunction(b) ? b.call(i) : b; return a.photo || b.match(/\.(gif|png|jpg|jpeg|bmp)(?:\?([^#]*))?(?:#(\.*))?$/i) } function Y() { for (var b in a) if (c.isFunction(a[b]) && b.substring(0, 2) !== "on") a[b] = a[b].call(i); a.rel = a.rel || i.rel; a.href = a.href || i.href; a.title = a.title || i.title } function Z(b) { i = b; a = c(i).data(q); Y(); if (a.rel && a.rel !== "nofollow") { g = c(".cboxElement").filter(function () { return (c(this).data(q).rel || this.rel) === a.rel }); j = g.index(i); if (j < 0) { g = g.add(i); j = g.length - 1 } } else { g = c(i); j = 0 } if (!B) { C = B = n; N = i; N.blur(); c(document).bind("keydown.cbox_close", function (d) { if (d.keyCode === 27) { d.preventDefault(); e.close() } }).bind("keydown.cbox_arrows", function (d) { if (g.length > 1) if (d.keyCode === 37) { d.preventDefault(); D.click() } else if (d.keyCode === 39) { d.preventDefault(); E.click() } }); a.overlayClose && s.css({ cursor: "pointer" }).one("click", e.close); c.event.trigger(aa); a.onOpen && a.onOpen.call(i); s.css({ opacity: a.opacity }).show(); a.w = r(a.initialWidth, "x"); a.h = r(a.initialHeight, "y"); e.position(0); O && m.bind("resize.cboxie6 scroll.cboxie6", function () { s.css({ width: m.width(), height: m.height(), top: m.scrollTop(), left: m.scrollLeft() }) }).trigger("scroll.cboxie6") } P.add(D).add(E).add(t).add(Q).hide(); R.html(a.close).show(); e.slideshow(); e.load() } var q = "colorbox", F = "hover", n = true, e, x = !c.support.opacity, O = x && !window.XMLHttpRequest, aa = "cbox_open", H = "cbox_load", S = "cbox_complete", T = "resize.cbox_resize", s, k, u, p, U, V, W, X, g, m, l, I, J, K, Q, P, t, E, D, R, y, z, v, w, i, N, j, a, B, C, $ = { transition: "elastic", speed: 350, width: false, height: false, innerWidth: false, innerHeight: false, initialWidth: "400", initialHeight: "400", maxWidth: false, maxHeight: false, scalePhotos: n, scrolling: n, inline: false, html: false, iframe: false, photo: false, href: false, title: false, rel: false, opacity: 0.9, preloading: n, current: "image {current} of {total}", previous: "previous", next: "next", close: "close", open: false, overlayClose: n, slideshow: false, slideshowAuto: n, slideshowSpeed: 2500, slideshowStart: "start slideshow", slideshowStop: "stop slideshow", onOpen: false, onLoad: false, onComplete: false, onCleanup: false, onClosed: false }; e = c.fn.colorbox = function (b, d) { var h = this; if (!h.length) if (h.selector === "") { h = c("<a/>"); b.open = n } else return this; h.each(function () { var f = c.extend({}, c(this).data(q) ? c(this).data(q) : $, b); c(this).data(q, f).addClass("cboxElement"); if (d) c(this).data(q).onComplete = d }); b && b.open && Z(h); return this }; e.init = function () { function b(d) { return c('<div id="cbox' + d + '"/>') } m = c(window); k = c('<div id="colorbox"/>'); s = b("Overlay").hide(); u = b("Wrapper"); p = b("Content").append(l = b("LoadedContent").css({ width: 0, height: 0 }), J = b("LoadingOverlay"), K = b("LoadingGraphic"), Q = b("Title"), P = b("Current"), t = b("Slideshow"), E = b("Next"), D = b("Previous"), R = b("Close")); u.append(c("<div/>").append(b("TopLeft"), U = b("TopCenter"), b("TopRight")), c("<div/>").append(V = b("MiddleLeft"), p, W = b("MiddleRight")), c("<div/>").append(b("BottomLeft"), X = b("BottomCenter"), b("BottomRight"))).children().children().css({ "float": "left" }); I = c("<div style='position:absolute; top:0; left:0; width:9999px; height:0;'/>"); c("body").prepend(s, k.append(u, I)); if (x) { k.addClass("cboxIE"); O && s.css("position", "absolute") } p.children().bind("mouseover mouseout", function () { c(this).toggleClass(F) }).addClass(F); y = U.height() + X.height() + p.outerHeight(n) - p.height(); z = V.width() + W.width() + p.outerWidth(n) - p.width(); v = l.outerHeight(n); w = l.outerWidth(n); k.css({ "padding-bottom": y, "padding-right": z }).hide(); E.click(e.next); D.click(e.prev); R.click(e.close); p.children().removeClass(F); c(".cboxElement").live("click", function (d) { if (d.button !== 0 && typeof d.button !== "undefined") return n; else { Z(this); return false } }) }; e.position = function (b, d) { function h(A) { U[0].style.width = X[0].style.width = p[0].style.width = A.style.width; K[0].style.height = J[0].style.height = p[0].style.height = V[0].style.height = W[0].style.height = A.style.height } var f = m.height(); f = Math.max(f - a.h - v - y, 0) / 2 + m.scrollTop(); var o = Math.max(document.documentElement.clientWidth - a.w - w - z, 0) / 2 + m.scrollLeft(); b = k.width() === a.w + w && k.height() === a.h + v ? 0 : b; u[0].style.width = u[0].style.height = "9999px"; k.dequeue().animate({ width: a.w + w, height: a.h + v, top: f, left: o }, { duration: b, complete: function () { h(this); C = false; u[0].style.width = a.w + w + z + "px"; u[0].style.height = a.h + v + y + "px"; d && d() }, step: function () { h(this) } }) }; e.resize = function (b) { function d() { a.w = a.w || l.width(); a.w = a.mw && a.mw < a.w ? a.mw : a.w; return a.w } function h() { a.h = a.h || l.height(); a.h = a.mh && a.mh < a.h ? a.mh : a.h; return a.h } function f(G) { e.position(G, function () { if (B) { if (x) { A && l.fadeIn(100); k[0].style.removeAttribute("filter") } if (a.iframe) l.append("<iframe id='cboxIframe'" + (a.scrolling ? " " : "scrolling='no'") + " name='iframe_" + (new Date).getTime() + "' frameborder=0 src='" + a.href + "' " + (x ? "allowtransparency='true'" : "") + " />"); l.show(); Q.show().html(a.title); if (g.length > 1) { P.html(a.current.replace(/\{current\}/, j + 1).replace(/\{total\}/, g.length)).show(); E.html(a.next).show(); D.html(a.previous).show(); a.slideshow && t.show() } J.hide(); K.hide(); c.event.trigger(S); a.onComplete && a.onComplete.call(i); a.transition === "fade" && k.fadeTo(L, 1, function () { x && k[0].style.removeAttribute("filter") }); m.bind(T, function () { e.position(0) }) } }) } if (B) { var o, A, L = a.transition === "none" ? 0 : a.speed; m.unbind(T); if (b) { l.remove(); l = c('<div id="cboxLoadedContent"/>').html(b); l.hide().appendTo(I).css({ width: d(), overflow: a.scrolling ? "auto" : "hidden" }).css({ height: h() }).prependTo(p); c("#cboxPhoto").css({ cssFloat: "none" }); O && c("select:not(#colorbox select)").filter(function () { return this.style.visibility !== "hidden" }).css({ visibility: "hidden" }).one("cbox_cleanup", function () { this.style.visibility = "inherit" }); a.transition === "fade" && k.fadeTo(L, 0, function () { f(0) }) || f(L); if (a.preloading && g.length > 1) { b = j > 0 ? g[j - 1] : g[g.length - 1]; o = j < g.length - 1 ? g[j + 1] : g[0]; o = c(o).data(q).href || o.href; b = c(b).data(q).href || b.href; M(o) && c("<img />").attr("src", o); M(b) && c("<img />").attr("src", b) } } else setTimeout(function () { var G = l.wrapInner("<div style='overflow:auto'></div>").children(); a.h = G.height(); l.css({ height: a.h }); G.replaceWith(G.children()); e.position(L) }, 1) } }; e.load = function () { var b, d, h, f = e.resize; C = n; i = g[j]; a = c(i).data(q); Y(); c.event.trigger(H); a.onLoad && a.onLoad.call(i); a.h = a.height ? r(a.height, "y") - v - y : a.innerHeight ? r(a.innerHeight, "y") : false; a.w = a.width ? r(a.width, "x") - w - z : a.innerWidth ? r(a.innerWidth, "x") : false; a.mw = a.w; a.mh = a.h; if (a.maxWidth) { a.mw = r(a.maxWidth, "x") - w - z; a.mw = a.w && a.w < a.mw ? a.w : a.mw } if (a.maxHeight) { a.mh = r(a.maxHeight, "y") - v - y; a.mh = a.h && a.h < a.mh ? a.h : a.mh } b = a.href; J.show(); K.show(); if (a.inline) { c('<div id="cboxInlineTemp" />').hide().insertBefore(c(b)[0]).bind(H + " cbox_cleanup", function () { c(this).replaceWith(l.children()) }); f(c(b)) } else if (a.iframe) f(" "); else if (a.html) f(a.html); else if (M(b)) { d = new Image; d.onload = function () { var o; d.onload = null; d.id = "cboxPhoto"; c(d).css({ margin: "auto", border: "none", display: "block", cssFloat: "left" }); if (a.scalePhotos) { h = function () { d.height -= d.height * o; d.width -= d.width * o }; if (a.mw && d.width > a.mw) { o = (d.width - a.mw) / d.width; h() } if (a.mh && d.height > a.mh) { o = (d.height - a.mh) / d.height; h() } } if (a.h) d.style.marginTop = Math.max(a.h - d.height, 0) / 2 + "px"; f(d); g.length > 1 && c(d).css({ cursor: "pointer" }).click(e.next); if (x) d.style.msInterpolationMode = "bicubic" }; d.src = b } else c("<div />").appendTo(I).load(b, function (o, A) { A === "success" ? f(this) : f(c("<p>Request unsuccessful.</p>")) }) }; e.next = function () { if (!C) { j = j < g.length - 1 ? j + 1 : 0; e.load() } }; e.prev = function () { if (!C) { j = j > 0 ? j - 1 : g.length - 1; e.load() } }; e.slideshow = function () { function b() { t.text(a.slideshowStop).bind(S, function () { h = setTimeout(e.next, a.slideshowSpeed) }).bind(H, function () { clearTimeout(h) }).one("click", function () { d(); c(this).removeClass(F) }); k.removeClass(f + "off").addClass(f + "on") } var d, h, f = "cboxSlideshow_"; t.bind("cbox_closed", function () { t.unbind(); clearTimeout(h); k.removeClass(f + "off " + f + "on") }); d = function () { clearTimeout(h); t.text(a.slideshowStart).unbind(S + " " + H).one("click", function () { b(); h = setTimeout(e.next, a.slideshowSpeed); c(this).removeClass(F) }); k.removeClass(f + "on").addClass(f + "off") }; if (a.slideshow && g.length > 1) a.slideshowAuto ? b() : d() }; e.close = function () { c.event.trigger("cbox_cleanup"); a.onCleanup && a.onCleanup.call(i); B = false; c(document).unbind("keydown.cbox_close keydown.cbox_arrows"); m.unbind(T + " resize.cboxie6 scroll.cboxie6"); s.css({ cursor: "auto" }).fadeOut("fast"); k.stop(n, false).fadeOut("fast", function () { c("#colorbox iframe").attr("src", "about:blank"); l.remove(); k.css({ opacity: 1 }); try { N.focus() } catch (b) { } c.event.trigger("cbox_closed"); a.onClosed && a.onClosed.call(i) }) }; e.element = function () { return c(i) }; e.settings = $; c(e.init) })(jQuery);
/**
* jCarouselLite - jQuery plugin to navigate images/any content in a carousel style widget.
* @requires jQuery v1.2 or above
*
* http://gmarwaha.com/jquery/jcarousellite/
*
* Copyright (c) 2007 Ganeshji Marwaha (gmarwaha.com)
* Dual licensed under the MIT and GPL licenses:
* http://www.opensource.org/licenses/mit-license.php
* http://www.gnu.org/licenses/gpl.html
*
* Version: 1.0.1
* Note: Requires jquery 1.2 or above from version 1.0.1
*/
(function ($) { $.fn.jCarouselLite = function (o) { o = $.extend({ btnPrev: null, btnNext: null, btnGo: null, mouseWheel: false, auto: null, speed: 200, easing: null, vertical: false, circular: true, visible: 3, start: 0, scroll: 1, beforeStart: null, afterEnd: null }, o || {}); return this.each(function () { var b = false, animCss = o.vertical ? "top" : "left", sizeCss = o.vertical ? "height" : "width"; var c = $(this), ul = $("ul", c), tLi = $("li", ul), tl = tLi.size(), v = o.visible; if (o.circular) { ul.prepend(tLi.slice(tl - v - 1 + 1).clone()).append(tLi.slice(0, v).clone()); o.start += v } var f = $("li", ul), itemLength = f.size(), curr = o.start; c.css("visibility", "visible"); f.css({ overflow: "hidden", float: o.vertical ? "none" : "left" }); ul.css({ margin: "0", padding: "0", position: "relative", "list-style-type": "none", "z-index": "1" }); c.css({ overflow: "hidden", position: "relative", "z-index": "2", left: "0px" }); var g = o.vertical ? height(f) : width(f); var h = g * itemLength; var j = g * v; f.css({ width: f.width(), height: f.height() }); ul.css(sizeCss, h + "px").css(animCss, -(curr * g)); c.css(sizeCss, j + "px"); if (o.btnPrev) $(o.btnPrev).click(function () { return go(curr - o.scroll) }); if (o.btnNext) $(o.btnNext).click(function () { return go(curr + o.scroll) }); if (o.btnGo) $.each(o.btnGo, function (i, a) { $(a).click(function () { return go(o.circular ? o.visible + i : i) }) }); if (o.mouseWheel && c.mousewheel) c.mousewheel(function (e, d) { return d > 0 ? go(curr - o.scroll) : go(curr + o.scroll) }); if (o.auto) setInterval(function () { go(curr + o.scroll) }, o.auto + o.speed); function vis() { return f.slice(curr).slice(0, v) }; function go(a) { if (!b) { if (o.beforeStart) o.beforeStart.call(this, vis()); if (o.circular) { if (a <= o.start - v - 1) { ul.css(animCss, -((itemLength - (v * 2)) * g) + "px"); curr = a == o.start - v - 1 ? itemLength - (v * 2) - 1 : itemLength - (v * 2) - o.scroll } else if (a >= itemLength - v + 1) { ul.css(animCss, -((v) * g) + "px"); curr = a == itemLength - v + 1 ? v + 1 : v + o.scroll } else curr = a } else { if (a < 0 || a > itemLength - v) return; else curr = a } b = true; ul.animate(animCss == "left" ? { left: -(curr * g)} : { top: -(curr * g) }, o.speed, o.easing, function () { if (o.afterEnd) o.afterEnd.call(this, vis()); b = false }); if (!o.circular) { $(o.btnPrev + "," + o.btnNext).removeClass("disabled"); $((curr - o.scroll < 0 && o.btnPrev) || (curr + o.scroll > itemLength - v && o.btnNext) || []).addClass("disabled") } } return false } }) }; function css(a, b) { return parseInt($.css(a[0], b)) || 0 }; function width(a) { return a[0].offsetWidth + css(a, 'marginLeft') + css(a, 'marginRight') }; function height(a) { return a[0].offsetHeight + css(a, 'marginTop') + css(a, 'marginBottom') } })(jQuery);
//** Featured Content Slider script- (c) Dynamic Drive DHTML code library: http://www.dynamicdrive.com.
var featuredcontentslider = { ajaxloadingmsg: '<div style="margin: 20px 0 0 20px"><img src="loading.gif" /> Fetching slider Contents. Please wait...</div>', bustajaxcache: true, enablepersist: true, settingcaches: {}, jumpTo: function (b, a) { this.turnpage(this.settingcaches[b], a) }, ajaxconnect: function (b) { var a = false; if (window.ActiveXObject) try { a = new ActiveXObject("Msxml2.XMLHTTP") } catch (e) { try { a = new ActiveXObject("Microsoft.XMLHTTP") } catch (f) { } } else if (window.XMLHttpRequest) a = new XMLHttpRequest; else return false; var c = b.contentsource[1]; a.onreadystatechange = function () { featuredcontentslider.ajaxpopulate(a, b) }; document.getElementById(b.id).innerHTML = this.ajaxloadingmsg; var d = !this.bustajaxcache ? "" : c.indexOf("?") != -1 ? "&" + (new Date).getTime() : "?" + (new Date).getTime(); a.open("GET", c + d, true); a.send(null) }, ajaxpopulate: function (a, b) { if (a.readyState == 4 && (a.status == 200 || window.location.href.indexOf("http") == -1)) { document.getElementById(b.id).innerHTML = a.responseText; this.buildpaginate(b) } }, buildcontentdivs: function (c) { for (var b = document.getElementById(c.id).getElementsByTagName("div"), a = 0; a < b.length; a++) if (this.css(b[a], "contentdiv", "check")) { c.contentdivs.push(b[a]); b[a].style.display = "none" } }, buildpaginate: function (a) { this.buildcontentdivs(a); var i = document.getElementById(a.id), g = document.getElementById("paginate-" + a.id), f = "", d = a.toc, e = a.nextprev; if (typeof d == "string" && d != "markup" || typeof d == "object") { for (var b = 1; b <= a.contentdivs.length; b++) f += '<a href="#' + b + '" class="toc">' + (typeof d == "string" ? d.replace(/#increment/, b) : d[b - 1]) + "</a> "; f = (e[0] != "" ? '<a href="#prev" class="prev png">' + e[0] + "</a> " : "") + (e[1] != "" ? '<a href="#next" class="next png">' + e[1] + "</a>" : ""); g.innerHTML = f } for (var c = g.getElementsByTagName("a"), h = 0, b = 0; b < c.length; b++) if (this.css(c[b], "toc", "check")) { if (h > a.contentdivs.length - 1) { c[b].style.display = "none"; continue } c[b].setAttribute("rel", ++h); c[b][a.revealtype] = function () { featuredcontentslider.turnpage(a, this.getAttribute("rel")); return false }; a.toclinks.push(c[b]) } else if (this.css(c[b], "prev", "check") || this.css(c[b], "next", "check")) c[b].onclick = function () { featuredcontentslider.turnpage(a, this.className); return false }; this.turnpage(a, a.currentpage, true); if (a.autorotate[0]) { g[a.revealtype] = function () { featuredcontentslider.cleartimer(a, window["fcsautorun" + a.id]) }; i["onclick"] = function () { featuredcontentslider.cleartimer(a, window["fcsautorun" + a.id]) }; i["onmouseover"] = function () { featuredcontentslider.cleartimer(a, window["fcsautorun" + a.id]) }; a.autorotate[1] = a.autorotate[1] + 1 / a.enablefade[1] * 50; this.autorotate(a) } }, urlparamselect: function (b) { var a = window.location.search.match(new RegExp(b + "=(\\d+)", "i")); return a == null ? null : parseInt(RegExp.$1) }, turnpage: function (a, c, f) { var d = a.currentpage, e = a.contentdivs.length, b = /prev/i.test(c) ? d - 1 : /next/i.test(c) ? d + 1 : parseInt(c); b = b < 1 ? e : b > e ? 1 : b; if (b == a.currentpage && typeof f == "undefined") return; a.currentpage = b; a.contentdivs[b - 1].style.zIndex = ++a.topzindex; this.cleartimer(a, window["fcsfade" + a.id]); a.cacheprevpage = a.prevpage; if (a.enablefade[0] == true) { a.curopacity = 0; this.fadeup(a) } if (a.enablefade[0] == false) { a.contentdivs[a.prevpage - 1].style.display = "none"; a.onChange(a.prevpage, a.currentpage) } a.contentdivs[b - 1].style.visibility = "visible"; a.contentdivs[b - 1].style.display = "block"; a.prevpage <= a.toclinks.length && this.css(a.toclinks[a.prevpage - 1], "selected", "remove"); b <= a.toclinks.length && this.css(a.toclinks[b - 1], "selected", "add"); a.prevpage = b; this.enablepersist && this.setCookie("fcspersist" + a.id, b) }, setopacity: function (c, b) { var a = c.contentdivs[c.currentpage - 1]; if (a.filters && a.filters[0]) if (typeof a.filters[0].opacity == "number") a.filters[0].opacity = b * 100; else a.style.filter = "alpha(opacity=" + b * 100 + ")"; else if (typeof a.style.MozOpacity != "undefined") a.style.MozOpacity = b; else if (typeof a.style.opacity != "undefined") a.style.opacity = b; c.curopacity = b }, fadeup: function (a) { if (a.curopacity < 1) { this.setopacity(a, a.curopacity + a.enablefade[1]); window["fcsfade" + a.id] = setTimeout(function () { featuredcontentslider.fadeup(a) }, 50) } else { if (a.cacheprevpage != a.currentpage) a.contentdivs[a.cacheprevpage - 1].style.display = "none"; a.onChange(a.cacheprevpage, a.currentpage) } }, cleartimer: function (a, b) { if (typeof b != "undefined") { clearTimeout(b); clearInterval(b); if (a.cacheprevpage != a.currentpage) a.contentdivs[a.cacheprevpage - 1].style.display = "none" } }, css: function (a, c, b) { var d = new RegExp("(^|\\s+)" + c + "($|\\s+)", "ig"); if (b == "check") return d.test(a.className); else if (b == "remove") a.className = a.className.replace(d, ""); else if (b == "add") a.className += " " + c }, autorotate: function (a) { window["fcsautorun" + a.id] = setInterval(function () { featuredcontentslider.turnpage(a, "next") }, a.autorotate[1]) }, getCookie: function (b) { var a = new RegExp(b + "=[^;]+", "i"); if (document.cookie.match(a)) return document.cookie.match(a)[0].split("=")[1]; return null }, setCookie: function (b, a) { document.cookie = b + "=" + a }, init: function (a) { var c = this.getCookie("fcspersist" + a.id) || 1, b = this.urlparamselect(a.id); this.settingcaches[a.id] = a; a.contentdivs = []; a.toclinks = []; a.topzindex = 0; a.currentpage = b || (this.enablepersist ? c : 1); a.prevpage = a.currentpage; a.revealtype = "on" + (a.revealtype || "click"); a.curopacity = 0; a.onChange = a.onChange || function () { }; a.contentsource[0] == "inline" && this.buildpaginate(a); a.contentsource[0] == "ajax" && this.ajaxconnect(a) } };
/*	unknown */
$(function () { $("#top-models-slider").each(function () { var b = $(this), e = b.children(".container"), d = e.children(".list"), c = d.find(".item"), n = "slow", m = 140, f = "hidden", h = document.onresize ? document : window, a = { first: 0, last: 0, length: c.length }; b.addClass("slider").append('<i class="prev" unselectable="on"><i class="triangle disabled"></i></i><i class="next" unselectable="on"><i class="triangle"></i></i>'); d.find("." + f).removeClass(f); window.resizeTimer = 0; $(h).resize(function () { var g = e.width(), f = Math.floor(g / m); a.last = a.first + f - 1; i(); c.children("table").css({ width: Math.ceil(g / f) + "px" }); e.css({ height: d.height() + "px" }); d.css({ left: "-" + c.get(a.first).offsetLeft + "px" }); if (a.length <= f) b.children("i").hide(); else b.children("i").show() }); window.setTimeout(function () { $(h).trigger("resize") }, 0); function g(b) { var f = a.last - a.first; if (b < 0) b = 0; if (b >= c.length - f) b = c.length - f - 1; var e = c.eq(b); if (e.length == 1) { a.last = b + a.last - a.first; a.first = b; i(); d.stop().animate({ left: "-" + e.get(0).offsetLeft + "px" }, n, "swing", l) } } function l() { a.first == 0 && b.find(".prev > .triangle").addClass("disabled"); a.first > 0 && b.find(".prev > .triangle").removeClass("disabled"); a.last == a.length - 1 && b.find(".next > .triangle").addClass("disabled"); a.last < a.length - 1 && b.find(".next > .triangle").removeClass("disabled") } function i() { c.slice(a.first, a.last + 1).find("img.model[src*='preloader']").each(function () { this.src = this.longDesc }) } function j() { var c = a.last - a.first, b = Math.max(0, a.first - c); g(b) } b.children(".prev").click(function () { !$(this).children(".triangle").hasClass("disabled") && j() }); function k() { var c = a.last - a.first, b = Math.min(a.last, a.length - c - 1); g(b) } b.children(".next").click(function () { !$(this).children(".triangle").hasClass("disabled") && k() }); b.children(".next,.prev").mousedown(function (a) { a.preventDefault(); return false }) }) });
/*
 * jQuery Form Plugin
 * version: 2.36 (07-NOV-2009)
 * @requires jQuery v1.2.6 or later
 *
 * Examples and documentation at: http://malsup.com/jquery/form/
 * Dual licensed under the MIT and GPL licenses:
 *   http://www.opensource.org/licenses/mit-license.php
 *   http://www.gnu.org/licenses/gpl.html
 */
(function(a){a.fn.ajaxSubmit=function(c){if(!this.length){b("ajaxSubmit: skipping submit process - no element selected");return this}if(typeof c=="function")c={success:c};var f=a.trim(this.attr("action"));if(f)f=(f.match(/^([^#]+)/)||[])[1];f=f||window.location.href||"";c=a.extend({url:f,type:this.attr("method")||"GET",iframeSrc:/^https/i.test(window.location.href||"")?"javascript:false":"about:blank"},c||{});var i={};this.trigger("form-pre-serialize",[this,c,i]);if(i.veto){b("ajaxSubmit: submit vetoed via form-pre-serialize trigger");return this}if(c.beforeSerialize&&c.beforeSerialize(this,c)===false){b("ajaxSubmit: submit aborted via beforeSerialize callback");return this}var h=this.formToArray(c.semantic);if(c.data){c.extraData=c.data;for(var g in c.data)if(c.data[g]instanceof Array)for(var q in c.data[g])h.push({name:g,value:c.data[g][q]});else h.push({name:g,value:c.data[g]})}if(c.beforeSubmit&&c.beforeSubmit(h,this,c)===false){b("ajaxSubmit: submit aborted via beforeSubmit callback");return this}this.trigger("form-submit-validate",[h,this,c,i]);if(i.veto){b("ajaxSubmit: submit vetoed via form-submit-validate trigger");return this}var n=a.param(h);if(c.type.toUpperCase()=="GET"){c.url+=(c.url.indexOf("?")>=0?"&":"?")+n;c.data=null}else c.data=n;var d=this,e=[];c.resetForm&&e.push(function(){d.resetForm()});c.clearForm&&e.push(function(){d.clearForm()});if(!c.dataType&&c.target){var o=c.success||function(){};e.push(function(b){a(c.target).html(b).each(o,arguments)})}else c.success&&e.push(c.success);c.success=function(f,b){for(var a=0,g=e.length;a<g;a++)e[a].apply(c,[f,b,d])};for(var j=a("input:file",this).fieldValue(),m=false,k=0;k<j.length;k++)if(j[k])m=true;var p=false;if(j.length&&c.iframe!==false||c.iframe||m||p)if(c.closeKeepAlive)a.get(c.closeKeepAlive,l);else l();else a.ajax(c);this.trigger("form-submit-notify",[this,c]);return this;function l(){var g=d[0];if(a(":input[name=submit]",g).length){alert('Error: Form elements must not be named "submit".');return}var e=a.extend({},a.ajaxSettings,c),m=a.extend(true,{},a.extend(true,{},a.ajaxSettings),e),n="jqFormIO"+(new Date).getTime(),j=a('<iframe id="'+n+'" name="'+n+'" src="'+e.iframeSrc+'" />'),h=j[0];j.css({position:"absolute",top:"-1000px",left:"-1000px"});var f={aborted:0,responseText:null,responseXML:null,status:0,statusText:"n/a",getAllResponseHeaders:function(){},getResponseHeader:function(){},setRequestHeader:function(){},abort:function(){this.aborted=1;j.attr("src",e.iframeSrc)}},l=e.global;l&&!a.active++&&a.event.trigger("ajaxStart");l&&a.event.trigger("ajaxSend",[f,e]);if(m.beforeSend&&m.beforeSend(f,m)===false){m.global&&a.active--;return}if(f.aborted)return;var o=0,p=0,k=g.clk;if(k){var q=k.name;if(q&&!k.disabled){c.extraData=c.extraData||{};c.extraData[q]=k.value;if(k.type=="image"){c.extraData[name+".x"]=g.clk_x;c.extraData[name+".y"]=g.clk_y}}}setTimeout(function(){var k=d.attr("target"),l=d.attr("action");g.setAttribute("target",n);g.getAttribute("method")!="POST"&&g.setAttribute("method","POST");g.getAttribute("action")!=e.url&&g.setAttribute("action",e.url);!c.skipEncodingOverride&&d.attr({encoding:"multipart/form-data",enctype:"multipart/form-data"});e.timeout&&setTimeout(function(){p=true;i()},e.timeout);var b=[];try{if(c.extraData)for(var f in c.extraData)b.push(a('<input type="hidden" name="'+f+'" value="'+c.extraData[f]+'" />').appendTo(g)[0]);j.appendTo("body");h.attachEvent?h.attachEvent("onload",i):h.addEventListener("load",i,false);g.submit()}finally{g.setAttribute("action",l);k?g.setAttribute("target",k):d.removeAttr("target");a(b).remove()}},10);var r=50;function i(){if(o++)return;h.detachEvent?h.detachEvent("onload",i):h.removeEventListener("load",i,false);var d=true;try{if(p)throw"timeout";var k,c;c=h.contentWindow?h.contentWindow.document:h.contentDocument?h.contentDocument:h.document;var g=e.dataType=="xml"||c.XMLDocument||a.isXMLDoc(c);b("isXml="+g);if(!g&&(c.body==null||c.body.innerHTML=="")){if(--r){o=0;setTimeout(i,100);return}b("Could not access iframe DOM after 50 tries.");return}f.responseText=c.body?c.body.innerHTML:null;f.responseXML=c.XMLDocument?c.XMLDocument:c;f.getResponseHeader=function(b){var a={"content-type":e.dataType};return a[b]};if(e.dataType=="json"||e.dataType=="script"){var n=c.getElementsByTagName("textarea")[0];if(n)f.responseText=n.value;else{var m=c.getElementsByTagName("pre")[0];if(m)f.responseText=m.innerHTML}}else if(e.dataType=="xml"&&!f.responseXML&&f.responseText!=null)f.responseXML=s(f.responseText);k=a.httpData(f,e.dataType)}catch(q){d=false;a.handleError(e,f,"error",q)}if(d){e.success(k,"success");l&&a.event.trigger("ajaxSuccess",[f,e])}l&&a.event.trigger("ajaxComplete",[f,e]);l&&!--a.active&&a.event.trigger("ajaxStop");e.complete&&e.complete(f,d?"success":"error");setTimeout(function(){j.remove();f.responseXML=null},100)}function s(b,a){if(window.ActiveXObject){a=new ActiveXObject("Microsoft.XMLDOM");a.async="false";a.loadXML(b)}else a=(new DOMParser).parseFromString(b,"text/xml");return a&&a.documentElement&&a.documentElement.tagName!="parsererror"?a:null}}};a.fn.ajaxForm=function(b){return this.ajaxFormUnbind().bind("submit.form-plugin",function(){a(this).ajaxSubmit(b);return false}).bind("click.form-plugin",function(c){var d=c.target,e=a(d);if(!e.is(":submit,input:image")){var g=e.closest(":submit");if(g.length==0)return;d=g[0]}var b=this;b.clk=d;if(d.type=="image")if(c.offsetX!=undefined){b.clk_x=c.offsetX;b.clk_y=c.offsetY}else if(typeof a.fn.offset=="function"){var f=e.offset();b.clk_x=c.pageX-f.left;b.clk_y=c.pageY-f.top}else{b.clk_x=c.pageX-d.offsetLeft;b.clk_y=c.pageY-d.offsetTop}setTimeout(function(){b.clk=b.clk_x=b.clk_y=null},100)})};a.fn.ajaxFormUnbind=function(){return this.unbind("submit.form-plugin click.form-plugin")};a.fn.formToArray=function(g){var d=[];if(this.length==0)return d;var b=this[0],i=g?b.getElementsByTagName("*"):b.elements;if(!i)return d;for(var j=0,n=i.length;j<n;j++){var f=i[j],c=f.name;if(!c)continue;if(g&&b.clk&&f.type=="image"){if(!f.disabled&&b.clk==f){d.push({name:c,value:a(f).val()});d.push({name:c+".x",value:b.clk_x},{name:c+".y",value:b.clk_y})}continue}var e=a.fieldValue(f,true);if(e&&e.constructor==Array)for(var k=0,m=e.length;k<m;k++)d.push({name:c,value:e[k]});else e!==null&&typeof e!="undefined"&&d.push({name:c,value:e})}if(!g&&b.clk){var l=a(b.clk),h=l[0],c=h.name;if(c&&!h.disabled&&h.type=="image"){d.push({name:c,value:l.val()});d.push({name:c+".x",value:b.clk_x},{name:c+".y",value:b.clk_y})}}return d};a.fn.formSerialize=function(b){return a.param(this.formToArray(b))};a.fn.fieldSerialize=function(c){var b=[];this.each(function(){var f=this.name;if(!f)return;var d=a.fieldValue(this,c);if(d&&d.constructor==Array)for(var e=0,g=d.length;e<g;e++)b.push({name:f,value:d[e]});else d!==null&&typeof d!="undefined"&&b.push({name:this.name,value:d})});return a.param(b)};a.fn.fieldValue=function(e){for(var c=[],d=0,f=this.length;d<f;d++){var g=this[d],b=a.fieldValue(g,e);if(b===null||typeof b=="undefined"||b.constructor==Array&&!b.length)continue;b.constructor==Array?a.merge(c,b):c.push(b)}return c};a.fieldValue=function(a,e){var m=a.name,c=a.type,j=a.tagName.toLowerCase();if(typeof e=="undefined")e=true;if(e&&(!m||a.disabled||c=="reset"||c=="button"||(c=="checkbox"||c=="radio")&&!a.checked||(c=="submit"||c=="image")&&a.form&&a.form.clk!=a||j=="select"&&a.selectedIndex==-1))return null;if(j=="select"){var f=a.selectedIndex;if(f<0)return null;for(var k=[],i=a.options,g=c=="select-one",l=g?f+1:i.length,h=g?f:0;h<l;h++){var b=i[h];if(b.selected){var d=b.value;if(!d)d=b.attributes&&b.attributes["value"]&&!b.attributes["value"].specified?b.text:b.value;if(g)return d;k.push(d)}}return k}return a.value};a.fn.clearForm=function(){return this.each(function(){a("input,select,textarea",this).clearFields()})};a.fn.clearFields=a.fn.clearInputs=function(){return this.each(function(){var a=this.type,b=this.tagName.toLowerCase();if(a=="text"||a=="password"||b=="textarea")this.value="";else if(a=="checkbox"||a=="radio")this.checked=false;else if(b=="select")this.selectedIndex=-1})};a.fn.resetForm=function(){return this.each(function(){(typeof this.reset=="function"||typeof this.reset=="object"&&!this.reset.nodeType)&&this.reset()})};a.fn.enable=function(a){if(a==undefined)a=true;return this.each(function(){this.disabled=!a})};a.fn.selected=function(b){if(b==undefined)b=true;return this.each(function(){var d=this.type;if(d=="checkbox"||d=="radio")this.checked=b;else if(this.tagName.toLowerCase()=="option"){var c=a(this).parent("select");b&&c[0]&&c[0].type=="select-one"&&c.find("option").selected(false);this.selected=b}})};function b(){a.fn.ajaxSubmit.debug&&window.console&&window.console.log&&window.console.log("[jquery.form] "+Array.prototype.join.call(arguments,""))}})(jQuery);
/*-------------------------------------------------------------------- 
* jQuery plugin: customInput()
* by Maggie Wachs and Scott Jehl, http://www.filamentgroup.com
* Copyright (c) 2009 Filament Group
* Dual licensed under the MIT (filamentgroup.com/examples/mit-license.txt) and GPL (filamentgroup.com/examples/gpl-license.txt) licenses.
* Article: http://www.filamentgroup.com/lab/accessible_custom_designed_checkbox_radio_button_inputs_styled_css_jquery/  
* Usage example below (see comment "Run the script...").
--------------------------------------------------------------------*/
jQuery.fn.customInput = function () { $(this).each(function () { if ($(this).is("[type=checkbox],[type=radio]")) { var a = $(this), b = $("label[for=" + a.attr("id") + "]"), c = a.is("[type=checkbox]") ? "checkbox" : "radio"; $('<div class="custom-' + c + '"></div>').insertBefore(a).append(a, b); var d = $("input[name=" + a.attr("name") + "]"); b.hover(function () { $(this).addClass("hover"); c == "checkbox" && a.is(":checked") && $(this).addClass("checkedHover") }, function () { $(this).removeClass("hover checkedHover") }); a.bind("updateState", function () { if (a.is(":checked")) { a.is(":radio") && d.each(function () { $("label[for=" + $(this).attr("id") + "]").removeClass("checked") }); b.addClass("checked") } else b.removeClass("checked checkedHover checkedFocus") }).trigger("updateState").click(function () { $(this).trigger("updateState") }).focus(function () { b.addClass("focus"); c == "checkbox" && a.is(":checked") && b.addClass("checkedFocus") }).blur(function () { b.removeClass("focus checkedFocus") }) } }) };

function textFocus(a, b) { if (a.value == b) a.value = "" } function textBlur(a, b) { if (a.value == "") a.value = b } function setDeliveryFieldsVisibility() { if ($("#div_DeliveryTypeSelect").length < 1) return; var a = $("#divDeliveryMoscow input:radio").attr("checked"), e = $("#divDeliveryExpress input:checkbox").attr("checked"), b = $("#divDeliveryMoscowRegion input:radio").attr("checked"), c = $("#divDeliveryRussia input:radio").attr("checked"), d = $("#divDeliverySelf input:radio").attr("checked"), f = $("#divDeliveryDateShip input:radio").eq(1).attr("checked"); if (a) { $("#divDeliveryExpress").show(); $("#divDeliveryExpress input").attr("disabled", false) } else { $("#divDeliveryExpress").hide(); $("#divDeliveryExpress input").attr("checked", false).attr("disabled", true) } if (b || c) { $("#divDeliveryIndex").show(); $("#divDeliveryCity").show() } else { $("#divDeliveryIndex").hide(); $("#divDeliveryCity").hide() } if (c) $("#lblIndexRussia").show(); else $("#lblIndexRussia").hide(); if (b) $("#lblIndexMoscowRegion").show(); else $("#lblIndexMoscowRegion").hide(); if (a) $("#divDeliverySubway").show(); else $("#divDeliverySubway").hide(); if (d) { $("#divDeliveryDateSelf").show(); $("#divDeliveryAddress").hide() } else { $("#divDeliveryDateSelf").hide(); $("#divDeliveryAddress").show() } if (a && !e || b) { $("#divDeliveryDateShip").show(); $("#divDeliveryTime").show() } else { $("#divDeliveryDateShip").hide(); $("#divDeliveryTime").hide() } if (f) $("#spanDeliveryDateShipUserDate").show(); else $("#spanDeliveryDateShipUserDate").hide() } $(function () { $("a[rel~=cbox_callback]").click(function (a) { a.preventDefault(); $.fn.colorbox({ width: "600px", href: "/CallBackForm.aspx", open: true }) }); $("a[rel~=cbox_photos]").click(function (a) { a.preventDefault(); $.fn.colorbox({ width: "660px", inline: true, href: "#photo_form", open: true }) }); $("a[rel~=cbox_presents]").click(function (a) { a.preventDefault(); $.fn.colorbox({ width: "660px", inline: true, href: "#presents_form", open: true }) }); $("input:radio, input:checkbox").css("position", "absolute").css("left", "-9999px").customInput() });