jQuery.easing.easeOutQuart = function(x, t, b, c, d) { return -c * ((t = t / d - 1) * t * t * t - 1) + b; }; /* Copyright (c) 2007-2012 Ariel Flesler - aflesler(at)gmail(dot)com | http://flesler.blogspot.com * Dual licensed under MIT and GPL. * @author Ariel Flesler * @version 1.4.3.1 */ ; (function($) { var h = $.scrollTo = function(a, b, c) { $(window).scrollTo(a, b, c) }; h.defaults = { axis: 'xy', duration: parseFloat($.fn.jquery) >= 1.3 ? 0 : 1, limit: true }; h.window = function(a) { return $(window)._scrollable() }; $.fn._scrollable = function() { return this.map(function() { var a = this, isWin = !a.nodeName || $.inArray(a.nodeName.toLowerCase(), ['iframe', '#document', 'html', 'body']) != -1; if (!isWin) return a; var b = (a.contentWindow || a).document || a.ownerDocument || a; return /webkit/i.test(navigator.userAgent) || b.compatMode == 'BackCompat' ? b.body : b.documentElement; }); }; $.fn.scrollTo = function(e, f, g) { if (typeof f == 'object') { g = f; f = 0; } if (typeof g == 'function') g = { onAfter: g }; if (e == 'max') e = 9e9; g = $.extend({}, h.defaults, g); f = f || g.duration; g.queue = g.queue && g.axis.length > 1; if (g.queue) f /= 2; g.offset = both(g.offset); g.over = both(g.over); return this._scrollable().each(function() { if (e == null) return; var d = this, $elem = $(d), targ = e, toff, attr = {}, win = $elem.is('html, body'); switch (typeof targ) { case 'number': case 'string': if (/^([+-]=)?\d+(\.\d+)?(px|%)?$/.test(targ)) { targ = both(targ); break; } targ = $(targ, this); if (!targ.length) return; case 'object': if (targ.is || targ.style) toff = (targ = $(targ)).offset(); } $.each(g.axis.split(''), function(i, a) { var b = a == 'x' ? 'Left' : 'Top', pos = b.toLowerCase(), key = 'scroll' + b, old = d[key], max = h.max(d, a); if (toff) { attr[key] = toff[pos] + (win ? 0 : old - $elem.offset()[pos]); if (g.margin) { attr[key] -= parseInt(targ.css('margin' + b)) || 0; attr[key] -= parseInt(targ.css('border' + b + 'Width')) || 0; } attr[key] += g.offset[pos] || 0; if (g.over[pos]) attr[key] += targ[a == 'x' ? 'width' : 'height']() * g.over[pos]; } else { var c = targ[pos]; attr[key] = c.slice && c.slice(-1) == '%' ? parseFloat(c) / 100 * max : c; } if (g.limit && /^\d+$/.test(attr[key])) attr[key] = attr[key] <= 0 ? 0 : Math.min(attr[key], max); if (!i && g.queue) { if (old != attr[key]) animate(g.onAfterFirst); delete attr[key]; } }); animate(g.onAfter); function animate(a) { $elem.animate(attr, f, g.easing, a && function() { a.call(this, e, g) }) } }).end(); }; h.max = function(a, b) { var c = b == 'x' ? 'Width' : 'Height', scroll = 'scroll' + c; if (!$(a).is('html, body')) return a[scroll] - $(a)[c.toLowerCase()](); var d = 'client' + c, html = a.ownerDocument.documentElement, body = a.ownerDocument.body; return Math.max(html[scroll], body[scroll]) - Math.min(html[d], body[d]); }; function both(a) { return typeof a == 'object' ? a : { top: a, left: a } } })(jQuery); /* jQuery.SerialScroll * Copyright (c) 2007-2010 Ariel Flesler - aflesler(at)gmail(dot)com | http://flesler.blogspot.com * Dual licensed under MIT and GPL. * Date: 05/31/2010 */ ; (function($) { var NAMESPACE = '.serialScroll'; var $serialScroll = $.serialScroll = function(settings) { return $(window).serialScroll(settings); }; $serialScroll.defaults = { duration: 1000, axis: 'x', event: 'click', start: 0, step: 1, lock: true, cycle: true, constant: true }; $.fn.serialScroll = function(options) { return this.each(function() { var settings = $.extend({}, $serialScroll.defaults, options), event = settings.event, step = settings.step, lazy = settings.lazy, context = settings.target ? this : document, $pane = $(settings.target || this, context), pane = $pane[0], items = settings.items, active = settings.start, auto = settings.interval, nav = settings.navigation, timer; if (!pane) return; if (!lazy) { items = getItems(); } if (settings.force || auto) { jump({}, active); } $(settings.prev || [], context).bind(event, -step, move); $(settings.next || [], context).bind(event, step, move); if (!pane.ssbound) { $pane.bind('prev' + NAMESPACE, -step, move).bind('next' + NAMESPACE, step, move).bind('goto' + NAMESPACE, jump); } if (auto) { $pane.bind('start' + NAMESPACE, function(e) { if (!auto) { clear(); auto = true; next(); } }).bind('stop' + NAMESPACE, function() { clear(); auto = false; }); } $pane.bind('notify' + NAMESPACE, function(e, elem) { var i = index(elem); if (i > -1) { active = i; } }); pane.ssbound = true; if (settings.jump) { (lazy ? $pane : getItems()).bind(event, function(e) { jump(e, index(e.target)); }); } if (nav) { nav = $(nav, context).bind(event, function(e) { e.data = Math.round(getItems().length / nav.length) * nav.index(this); jump(e, this); }); } function move(e) { e.data += active; jump(e, this); }; function jump(e, pos) { if (isNaN(pos)) pos = e.data; var n, real = e.type, $items = settings.exclude ? getItems().slice(0, -settings.exclude) : getItems(), limit = $items.length - 1, elem = $items[pos], duration = settings.duration; if (real) e.preventDefault(); if (auto) { clear(); timer = setTimeout(next, settings.interval); } if (!elem) { n = pos < 0 ? 0 : limit; if (active !== n) { pos = n; } else if (!settings.cycle) { return; } else { pos = limit - n; } elem = $items[pos]; } if (!elem || settings.lock && $pane._scrollable().is(':animated') || real && settings.onBefore && settings.onBefore(e, elem, $pane, getItems(), pos) === false) return; if (settings.stop) $pane._scrollable().stop(true); if (settings.constant) duration = Math.abs(duration / step * (active - pos)); $pane.scrollTo(elem, duration, settings); trigger('notify', pos); }; function next() { trigger('next'); }; function clear() { clearTimeout(timer); }; function getItems() { return $(items, pane); }; function trigger(event) { $pane.trigger(event + NAMESPACE, [].slice.call(arguments, 1)); } function index(elem) { if (!isNaN(elem)) return elem; var $items = getItems(), i; while ((i = $items.index(elem)) === -1 && elem !== pane) elem = elem.parentNode; return i; }; }); }; })(jQuery); /* Copyright (c) 2006-2007 Mathias Bank (http://www.mathias-bank.de) * Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) * and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses. * Version 2.1 * Thanks to Hinnerk Ruemenapf - http://hinnerk.ruemenapf.de/ for bug reporting and fixing. Tom Leonard for some improvements */ jQuery.fn.extend({ getUrlParam: function(strParamName) { strParamName = escape(unescape(strParamName)); var returnVal = new Array(); var qString = null; if ($(this).html() != null && typeof $(this).attr("src") != "undefined") { var strHref = $(this).attr("src"); if (strHref.indexOf("?") > -1) { var strQueryString = strHref.substr(strHref.indexOf("?") + 1); qString = strQueryString.split("&"); } } else if ($(this).html() != null && typeof $(this).attr("href") != "undefined") { var strHref = $(this).attr("href"); if (strHref.indexOf("?") > -1) { var strQueryString = strHref.substr(strHref.indexOf("?") + 1); qString = strQueryString.split("&"); } } else { if (window.location.search.search(strParamName) > -1) { qString = window.location.search.substr(1, window.location.search.length).split("&"); } else { qString = null; } } if (qString == null) return null; for (var i = 0; i < qString.length; i++) { if (escape(unescape(qString[i].split("=")[0])) == strParamName) { returnVal.push(qString[i].split("=")[1]); } } if (returnVal.length == 0) { return null; } else if (returnVal.length == 1) { return returnVal[0]; } else { return returnVal; } } }); /* jquery.create */ (function($) { $.extend({ create: function(element, attributes, children) { var elem = $(document.createElement(element)); if (typeof (attributes) == 'object') { for (key in attributes) { elem.attr(key, attributes[key]); } } if (typeof (children) == 'string') { elem.text(children); } else if (typeof (children) == 'object') { for (i = 0; i < children.length; i++) { elem.append(children[i]); } } return elem; } }); })(jQuery); /* jquery.selectBox */ eval(function(p, a, c, k, e, r) { e = function(c) { return (c < a ? '' : e(parseInt(c / a))) + ((c = c % a) > 35 ? String.fromCharCode(c + 29) : c.toString(36)) }; if (!''.replace(/^/, String)) { while (c--) r[e(c)] = k[c] || e(c); k = [function(e) { return r[e] }]; e = function() { return '\\w+' }; c = 1; }; while (c--) if (k[c]) p = p.replace(new RegExp('\\b' + e(c) + '\\b', 'g'), k[c]); return p; }('z.1U.1T({F:3(a){5 9.1e(3(){z.1h(9,a)})}});z.1h=3(e,f){2 g=f||{};g.G=g.G||"F";g.J=g.J||"F-1L";g.L=g.L||"1F";g.P=g.P||"1E";g.r=g.r||"1D";g.u=g.1C||"1c";2 h=e.7;2 i=($("#"+h+"N").Y==0);2 j=-1;2 k=x;2 l=x;2 m=$(e);2 n=X(g);2 o=Z(g);2 p=11(g);2 q=15(g);m.O().17(q).17(n);18();o.B(3(){4(!k){k=!k;n.1g()}});p.B(3(){4(!k){k=!k;n.1g()}});o.1z(3(){k=E;n.1y()});o.1x(3(a){1w(a.1v){C 1s:a.H();I(-1);A;C 1m:a.H();I(1);A;C 13:a.H();$(\'y.\'+g.r).1l(\'B\');A;C 1k:D();A}});o.1j(3(){4(k&&!l)D()});n.19(3(a){l=x});n.1a(3(a){l=E});3 D(){k=x;l=x;n.O()}3 18(){n.O();n.1b();n.Q(1d(o.6(\'7\')));n.1f(o.1H(\'1f\'));q.1b();q.Q(o);q.Q(p)}3 X(a){2 b;4(i){2 c=s.t("M");b=$(c);b.6(\'7\',h+"12");b.8(a.J)}w{b=$("#"+h+"12")}5 b}3 Z(a){2 b;4(i){2 c=s.t("1n");b=$(c);b.6("7",h+"N");b.6("1o","1p");b.8(a.G);b.6("1q","1r");b.6("W","W");b.6("1t",m.6("1u"))}w{b=$("#"+h+"N")}5 b}3 11(a){2 b;4(i){2 c=s.t("M");b=$(c);b.6("7",h+"V");b.8(a.L)}w{b=$("#"+h+"V")}5 b}3 15(a){2 b;4(i){2 c=s.t("M");b=$(c);b.6("7",h+"U");b.8(a.P)}w{b=$("#"+h+"U")}5 b}3 I(a){2 b=$("y",n);4(!b)5;j+=a;4(j<0){j=0}w 4(j>=b.T()){j=b.T()-1}b.R(g.r);$(b[j]).8(g.r)}3 16(){2 a=$("y."+g.u,n).1A(0);2 b=(\'\'+a.7).1B(\'10\');2 c=b[b.Y-1];m.v(c);2 d=$(a).K();o.v(d.1G("&1i;","&"));5 E}3 1I(){5 m.v()}3 1J(){5 o.v()}3 1d(c){2 d=s.t(\'1K\');d.S(\'7\',c+\'1M\');m.1N(\'1O\').1e(3(){2 b=s.t(\'y\');b.S(\'7\',c+\'10\'+$(9).v());b.1P=$(9).K();4($(9).1Q(\':1c\')){o.v($(9).K());$(b).8(g.u)}d.1R(b);$(b).B(3(a){$(\'y.\'+g.u).R(g.u);$(9).8(g.u);16();D();m.1S()});$(b).1a(3(a){z(a.14,n).8(g.r)});$(b).19(3(a){z(a.14,n).R(g.r)})});5 d}};', 62, 119, '||var|function|if|return|attr|id|addClass|this||||||||||||||||||hoverClass|document|createElement|currentClass|val|else|false|li|jQuery|break|click|case|hideMe|true|selectbox|inputClass|preventDefault|moveSelect|containerClass|html|buttonClass|div|_input|hide|buttonWrapperClass|append|removeClass|setAttribute|size|_buttonWrapper|_button|readonly|setupContainer|length|setupInput|_|setupSelectButton|_container||target|setupSelectButtonWrapper|setCurrent|before|init|mouseout|mouseover|empty|selected|getSelectOptions|each|width|toggle|SelectBox|amp|blur|27|trigger|40|input|type|text|autocomplete|off|38|tabIndex|tabindex|keyCode|switch|keydown|show|focus|get|split|selectedClass|current|selectButtonWrapper|selectButton|replace|css|getCurrentSelected|getCurrentValue|ul|wrapper|_ul|children|option|innerHTML|is|appendChild|change|extend|fn'.split('|'), 0, {})); /*jQuery.Cookies - Copyright (c) 2005 - 2008, James Auldridge; All rights reserved. Licensed under the BSD, MIT, and GPL (your choice!) Licenses: http://code.google.com/p/cookies/wiki/License Version 2.0 */ var jaaulde = window.jaaulde || {}; jaaulde.utils = jaaulde.utils || {}; jaaulde.utils.cookies = (function() { var resolveOptions, assembleOptionsString, parseCookies, constructor, defaultOptions = { expiresAt: null, path: '/', domain: null, secure: false }; resolveOptions = function(options) { var returnValue, expireDate; if (typeof options !== 'object' || options === null) { returnValue = defaultOptions; } else { returnValue = { expiresAt: defaultOptions.expiresAt, path: defaultOptions.path, domain: defaultOptions.domain, secure: defaultOptions.secure }; if (typeof options.expiresAt === 'object' && options.expiresAt instanceof Date) { returnValue.expiresAt = options.expiresAt; } else if (typeof options.hoursToLive === 'number' && options.hoursToLive !== 0) { expireDate = new Date(); expireDate.setTime(expireDate.getTime() + (options.hoursToLive * 60 * 60 * 1000)); returnValue.expiresAt = expireDate; } if (typeof options.path === 'string' && options.path !== '') { returnValue.path = options.path; } if (typeof options.domain === 'string' && options.domain !== '') { returnValue.domain = options.domain; } if (options.secure === true) { returnValue.secure = options.secure; } } return returnValue; }; assembleOptionsString = function(options) { options = resolveOptions(options); return ((typeof options.expiresAt === 'object' && options.expiresAt instanceof Date ? '; expires=' + options.expiresAt.toGMTString() : '') + '; path=' + options.path + (typeof options.domain === 'string' ? '; domain=' + options.domain : '') + (options.secure === true ? '; secure' : '')); }; parseCookies = function() { var cookies = {}, i, pair, name, value, separated = document.cookie.split(';'), unparsedValue, newpair; for (i = 0; i < separated.length; i = i + 1) { pair = new Array(); newpair = separated[i].split('='); pair.push(newpair[0]); newpair.splice(0, 1); pair.push(newpair.join('=')); name = pair[0].replace(/^\s*/, '').replace(/\s*$/, ''); try { value = decodeURIComponent(pair[1]); } catch (e1) { value = pair[1]; } if (typeof JSON === 'object' && JSON !== null && typeof JSON.parse === 'function') { try { unparsedValue = value; value = JSON.parse(value); } catch (e2) { value = unparsedValue; } } cookies[name] = value; } return cookies; }; constructor = function() {}; constructor.prototype.get = function(cookieName) { var returnValue, item, cookies = parseCookies(); if (typeof cookieName === 'string') { returnValue = (typeof cookies[cookieName] !== 'undefined') ? cookies[cookieName] : null; } else if (typeof cookieName === 'object' && cookieName !== null) { returnValue = {}; for (item in cookieName) { if (typeof cookies[cookieName[item]] !== 'undefined') { returnValue[cookieName[item]] = cookies[cookieName[item]]; } else { returnValue[cookieName[item]] = null; } } } else { returnValue = cookies; } return returnValue; }; constructor.prototype.filter = function(cookieNameRegExp) { var cookieName, returnValue = {}, cookies = parseCookies(); if (typeof cookieNameRegExp === 'string') { cookieNameRegExp = new RegExp(cookieNameRegExp); } for (cookieName in cookies) { if (cookieName.match(cookieNameRegExp)) { returnValue[cookieName] = cookies[cookieName]; } } return returnValue; }; constructor.prototype.set = function(cookieName, value, options) { if (typeof options !== 'object' || options === null) { options = {}; } if (typeof value === 'undefined' || value === null) { value = ''; options.hoursToLive = -8760; } else if (typeof value !== 'string') { if (typeof JSON === 'object' && JSON !== null && typeof JSON.stringify === 'function') { value = JSON.stringify(value); } else { throw new Error('cookies.set() received non-string value and could not serialize.'); } } var optionsString = assembleOptionsString(options); document.cookie = cookieName + '=' + escape(value) + optionsString; }; constructor.prototype.del = function(cookieName, options) { var allCookies = {}, name; if (typeof options !== 'object' || options === null) { options = {}; } if (typeof cookieName === 'boolean' && cookieName === true) { allCookies = this.get(); } else if (typeof cookieName === 'string') { allCookies[cookieName] = true; } for (name in allCookies) { if (typeof name === 'string' && name !== '') { this.set(name, null, options); } } }; constructor.prototype.test = function() { var returnValue = false, testName = 'cT', testValue = 'data'; this.set(testName, testValue); if (this.get(testName) === testValue) { this.del(testName); returnValue = true; } return returnValue; }; constructor.prototype.setOptions = function(options) { if (typeof options !== 'object') { options = null; } defaultOptions = resolveOptions(options); }; return new constructor(); })(); (function() { if (window.jQuery) { (function($) { $.cookies = jaaulde.utils.cookies; var extensions = { cookify: function(options) { return this.each(function() { var i, nameAttrs = ['name', 'id'], name, $this = $(this), value; for (i in nameAttrs) { if (!isNaN(i)) { name = $this.attr(nameAttrs[i]); if (typeof name === 'string' && name !== '') { if ($this.is(':checkbox, :radio')) { if ($this.attr('checked')) { value = $this.val(); } } else if ($this.is(':input')) { value = $this.val(); } else { value = $this.html(); } if (typeof value !== 'string' || value === '') { value = null; } $.cookies.set(name, value, options); break; } } } }); }, cookieFill: function() { return this.each(function() { var n, getN, nameAttrs = ['name', 'id'], name, $this = $(this), value; getN = function() { n = nameAttrs.pop(); return !!n; }; while (getN()) { name = $this.attr(n); if (typeof name === 'string' && name !== '') { value = $.cookies.get(name); if (value !== null) { if ($this.is(':checkbox, :radio')) { if ($this.val() === value) { $this.attr('checked', 'checked'); } else { $this.removeAttr('checked'); } } else if ($this.is(':input')) { $this.val(value); } else { $this.html(value); } } break; } } }); }, cookieBind: function(options) { return this.each(function() { var $this = $(this); $this.cookieFill().change(function() { $this.cookify(options); }); }); } }; $.each(extensions, function(i) { $.fn[i] = this; }); })(window.jQuery); } })(); /* Toggle If Plugin */ (function($) { $.fn.toggleIf = function(cond) { return this.each(function() { $(this)[cond ? 'show' : 'hide'](); }); }; })(jQuery); //Auto expand plugin // (function ($) { $.fn._ie_select = function () { return $(this).each(function () { var a = $(this), p = a.parent(); p.css('position', 'relative'); var o = a.position(), h = a.outerHeight(), l = o.left, t = o.top; $("#" + this.id + "-clone").remove(); var c = a.clone(true); $.data(c, 'element', a); $.data(c, 'ddWidth', a.width() + 2); a.width("auto"); $.data(c, 'ddAutoWidth', a.width()); a.width($.data(c, 'ddWidth')); c.css({ zIndex: 100, height: h, top: t, left: l, position: 'absolute', opacity: 0, width: $.data(c, 'ddWidth') }).attr({ id: this.id + '-clone', name: this.name + '-clone' }).change(function () { c.width($.data(c, 'ddWidth')); if ($.data(c, 'element').val() != $(this).val()) { $.data(c, 'element').val($(this).val()).trigger('change'); } }).mousedown(function () { if ($.data(c, 'ddAutoWidth') > $.data(c, 'ddWidth')) { c.width($.data(c, 'ddAutoWidth')); } }).blur(function () { c.width($.data(c, 'ddWidth')); }); a.before(c).click(function () { c.trigger('click'); }); a.change(function () { if (c.val() != $(this).val()) { c.val($(this).val()).trigger('change'); } c.width($.data(c, 'ddWidth')); }); }); }; if ($.browser.msie) { $('select')._ie_select(); } })(jQuery); (function($) { $.fn.jTruncate = function(h) { var i = { length: 300, minTrail: 20, moreText: "more", lessText: "less", ellipsisText: "...", moreAni: "", lessAni: "" }; var h = $.extend(i, h); return this.each(function() { obj = $(this); var a = obj.html(); if (a.length > h.length + h.minTrail) { var b = a.indexOf(' ', h.length); if (b != -1) { var b = a.indexOf(' ', h.length); var c = a.substring(0, b); var d = a.substring(b, a.length - 1); obj.html(c + '' + h.ellipsisText + '' + '' + d + ''); obj.find('.truncate_more').css("display", "none"); obj.append('