Skip to content

Instantly share code, notes, and snippets.

@mitchellrj
Last active December 28, 2015 18:29
Show Gist options
  • Save mitchellrj/7543025 to your computer and use it in GitHub Desktop.
Save mitchellrj/7543025 to your computer and use it in GitHub Desktop.
Beautified CarTrawler Accelerate API wrapper, revision 56251
/*
* Cartrawler AJAX Booking Engine
* http://www.cartrawler.com
*
* Copyright (c) 2006-2013 Cartrawler.com
* Version: 56251
* Date: 13-11-2013 - 12:54
*/
(function ($) {
namespace("CT.ABE.Utils.RentalCondition");
CT.ABE.Utils.RentalCondition = function (a) {
this.options = {
debug: true,
l18n: {
ForNumberOfDays: "for",
For3Days: "for 3 days",
perday: "per day",
day: "day",
days: "days",
total: "Total",
included: "Included",
includedInPrice: "Included in price",
includedInTotalPrice: "Included in total price",
notIncludedInTotalPrice: "Not included in total price"
}
};
$.extend(true, this.options, a);
this.FeeSort = {
"40": {
rank: 0,
description: "Rundum-Sorglos Paket"
},
"613.VCP.X": {
rank: 1,
description: "Car with Driver"
},
"6": {
rank: 2,
description: "Collision damage insurance"
},
"40": {
rank: 2,
description: "Super Collision damage insurance"
},
"601.VCT.X": {
rank: 3,
description: "Collision damage waiver (CDW) No Excess"
},
"50": {
rank: 4,
description: "Third party insurance"
},
"47": {
rank: 5,
description: "Theft insurance"
},
"5": {
rank: 6,
description: "Complete Cover "
},
"7": {
rank: 7,
description: "Tax"
},
"30": {
rank: 8,
description: "Airport surcharge"
},
"20": {
rank: 9,
description: "Fuel"
},
"12": {
rank: 10,
description: "Additional driver"
},
"601.VCP.X": {
rank: 11,
description: "Oneway Fee"
},
"EQP.13": {
rank: 12,
description: "GPS - Satellite Navigational System"
},
"13": {
rank: 13,
description: "Young driver"
},
"702.VCP.X": {
rank: 14,
description: "Placement Fee"
},
"605.VCP.X": {
rank: 15,
description: "Road Tax Fee"
},
"609.VCP.X": {
rank: 16,
description: "Mileage Fee"
},
"EQP.30": {
rank: 17,
description: "Winter package"
},
"1.RAW.X": {
rank: 18,
description: "Raw fee"
},
"602.VCP.X": {
rank: 100,
description: "Breakdown Assistance Fee"
},
"701.VCP.X": {
rank: 101,
description: "Other Fees"
},
"703.VCP.X": {
rank: 102,
description: "Other Fees"
},
"704.VCP.X": {
rank: 103,
description: "Other Fees"
}
};
this.tpl = {
HTML_Header: ['<div id="ct_rental_conditions_header"><table width="100%" height="1%" cellspacing="0" cellpadding="0" class="ct-rental-conditions-header">', " <tbody>"],
HTML_Footer: [" </tbody>", "</table></div>"],
HTML_No_Fee_tickImg: ["<tr>", ' <td class="ct-rental-conditions-header ct-rental-conditions-left">', ' <div class="ct-rental-conditions-left">', " <span><%=data.desc.description%></span>", " </div>", " </td>", ' <td class="ct-rental-conditions-header ct-rental-conditions-right">', ' <div class="ct-rental-conditions-right">', ' <span><%=txt%></span><div class="ct_cardetails_icons_s"><p alt="included" class="ct_icon ico_included"></p></div>', " </div>", " </td>", "</tr>"],
HTML_No_Fee_tickImg_left: ["<tr>", ' <td class="ct-rental-conditions-header ct-rental-conditions-left-side">', ' <div class="ct-rental-conditions-left-side ct_cardetails_icons_s">', ' <p title="Included" class="ct_icon ico_included"></p>', " </div>", " </td>", ' <td class="ct-rental-conditions-header ct-rental-conditions-right-side">', ' <div class="ct-rental-conditions-right-side">', " <span><%=data.desc.description%></span>", " </div>", " </td>", "</tr>"],
HTML_No_Fee_crossImg_right: ["<tr>", ' <td class="ct-rental-conditions-header ct-rental-conditions-left">', ' <div class="ct-rental-conditions-left">', " <span><%=data.desc.description%></span>", " </div>", " </td>", ' <td class="ct-rental-conditions-header ct-rental-conditions-right">', ' <div class="ct-rental-conditions-right">', ' <span><%=txt%></span><div class="ct_cardetails_icons_s"><p alt="included" class="ct_icon ico_excluded"></p></div>', " </div>", " </td>", "</tr>"],
HTML_No_Fee_crossImg_left: ["<tr>", ' <td class="ct-rental-conditions-header ct-rental-conditions-left-side">', ' <div class="ct-rental-conditions-left-side ct_cardetails_icons_s">', ' <p title="Not Included" class="ct_icon ico_excluded"></p>', " </div>", " </td>", ' <td class="ct-rental-conditions-header ct-rental-conditions-right-side">', ' <div class="ct-rental-conditions-right-side">', " <span><%=data.desc.description%></span>", " </div>", " </td>", "</tr>"],
HTML_No_Fee_included: ["<tr>", ' <td class="ct-rental-conditions-header ct-rental-conditions-left">', ' <div class="ct-rental-conditions-left">', " <span><%=data.desc.description%></span>", " </div>", " </td>", ' <td class="ct-rental-conditions-header ct-rental-conditions-right">', ' <div class="ct-rental-conditions-right">', " <span><%=txt%></span>", " </div>", " </td>", "</tr>"],
HTML_With_Fee_Amount: ["<tr>", ' <td class="ct-rental-conditions-header ct-rental-conditions-left">', ' <div class="ct-rental-conditions-left">', " <span><%=data.desc.description%></span>", " </div>", " </td>", ' <td class="ct-rental-conditions-header ct-rental-conditions-right">', ' <div class="ct-rental-conditions-right">', " <span><%=abeSC.currencyObj.formatCurrency(data.amount, {region: abeSC.region, currency: data.currency, displayLabel: true})%></span>", " </div>", " </td>", "</tr>"],
HTML_With_Fee_NoAmount: ["<tr>", ' <td class="ct-rental-conditions-header ct-rental-conditions-left">', ' <div class="ct-rental-conditions-left">', " <span><%=data.desc.description%></span>", " </div>", " </td>", ' <td class="ct-rental-conditions-header ct-rental-conditions-right">', ' <div class="ct-rental-conditions-right">', " <span><%=t.options.l18n.includedInPrice%></span>", " </div>", " </td>", "</tr>"],
HTML_Error: ['<div class="ct_rc_content">', ' <div class="ct_rc_details">', " <div>", ' <span class="ct_rc_details_duration">Error</span>', " </div>", " </div>", ' <div class="ct_rc_list_legend"></div>', ' <div class="ct_rc_list_entries">', ' <ul class="ct_rc_list">', " <li>", ' <div class="ct_rc_list_entry_unique_off">', ' <div class="ct_rc_list_entry_label">', " <span>Rates not available</span>", " </div>", " </div>", " </li>", " </ul>", " </div>", "</div>"],
HTML_UniqueCommon: ['<div class="ct_rc_content">', ' <div class="ct_rc_details">', " <div>", ' <span class="ct_rc_details_price"><%=abeSC.currencyObj.formatCurrency(priceToDisplay, {region: abeSC.region, currency: abeSC.options.currency, displayLabel: false})%></span>', ' <span class="ct_rc_details_duration"> <%=t.durationFormat(duration, i18n, dailyPrice)%></span>', " </div>", " </div>", ' <div class="ct_rc_list_legend"></div>', ' <div class="ct_rc_list_entries">', ' <ul class="ct_rc_list">', " <% var foundunique = false; %>", " <% for ( var i = 0; i < rc.feetodisplay.uniqueFee.length; i++ ) { %>", " <% foundunique = true; %>", " <% if ( rc.feetodisplay.uniqueFee[i].display ) { %>", " <li>", ' <div class="ct_rc_list_entry_unique_on">', ' <div class="ct_rc_list_entry_label">', " <span><%=rc.feetodisplay.uniqueFee[i].detail.getDescription().toLowerCase()%></span>", " </div>", " </div>", ' <div class="ct_rc_tick_unique_on"></div>', " </li>", " <% } else { %>", " <li>", ' <div class="ct_rc_list_entry_unique_off">', ' <div class="ct_rc_list_entry_label">', " <span><%=rc.feetodisplay.uniqueFee[i].description.toLowerCase()%></span>", " </div>", " </div>", ' <div class="ct_rc_tick_unique_off"></div>', " </li>", " <% } %>", " <% } %>", ' <% if ( foundunique ) { %><li class="last"><div class="ct_rc_list_nolabel">&nbsp;</div></li><% } %>', " <% for ( var j = 0; j < rc.feetodisplay.commonFee.length; j++ ) { %>", " <% if ( rc.feetodisplay.commonFee[j].display ) { %>", " <% if (rc.feetodisplay.commonFee[j].detail.includedInRate) { %>", " <li>", ' <div class="ct_rc_list_entry">', ' <div class="ct_rc_list_entry_label">', " <span><%=rc.feetodisplay.commonFee[j].detail.getDescription().toLowerCase()%></span>", " </div>", " </div>", ' <div class="ct_rc_tick"></div>', " </li>", " <% } else { %>", " <li>", ' <div class="ct_rc_list_entry_unique_off">', ' <div class="ct_rc_list_entry_label">', " <span><%=rc.feetodisplay.commonFee[j].detail.getDescription().toLowerCase()%></span>", " </div>", " </div>", ' <div class="ct_rc_tick_unique_off"></div>', " </li>", " <% } %>", " <% } %>", " <% } %>", " <% if (!rc.feetodisplay.uniqueFee.length && !rc.feetodisplay.commonFee.length) { %>", " <li>", ' <div class="ct_rc_list_no_entry">', ' <div class="ct_rc_list_entry_label">', " <span><%=i18n.NoFeesDetails%></span>", " </div>", " </div>", " </li>", " <% } %>", " </ul>", " </div>", " <% if (carDriver) { %>", ' <div class="ct_rc_car_driver_txt" style="color:#fff;margin:5px 15px;border-top:1px solid #004d6b;padding:10px 0px;">', " <%=i18n.TipCarDriverExtend%>", " </div>", " <% } %>", "</div>"]
};
return this
};
CT.ABE.Utils.RentalCondition.prototype = {
getRC: function (g) {
var j = function (a, b) {
var f = new CT.ABE.Utils.RentalCondition();
var c = 99;
var d = 99;
if (f.FeeSort[a.purpose] !== undefined) {
c = f.FeeSort[a.purpose].rank
}
if (f.FeeSort[b.purpose] !== undefined) {
d = f.FeeSort[b.purpose].rank
}
if (a.type == "NotInRate") {
c = 1000
}
if (b.type == "NotInRate") {
d = 1000
}
if (c == d) {
return 0
}
if (c < d) {
return -1
}
return 1
};
var s = false;
var q = new Array();
var e = g.availability.data.fees;
var v = e.getCartrawlerFee().currencyCode;
var h = CT.LIB.Object.isDefined(e.getPayNow().amount);
var m = false;
var r = [];
CT.LIB.Object.each(g.availability.data.rates.charges, function (b, c) {
var a = new abeFeeBreakdown();
if (c.purpose == "40") {
CT.superCDW = true
}
a.init(c.type, "", c.purpose, c.description, "", "", "false", c.include, false, false);
r.push(a)
});
CT.LIB.Object.each(g.availability.data.extra.list, function (b, c) {
if (c.includedInRate) {
var a = new abeFeeBreakdown();
a.init("pe", c.equipType, "EQP." + c.equipType, c.description, c.currencyCode, c.amount, c.taxInclusive, c.includedInRate, "false", false);
r.push(a)
}
});
r.sort(j);
if ((e.haveBasePrice() == 1) && abeSC.feeBreakdownRate) {
for (var p = 0; p < r.length; p++) {
var n = r[p];
var w = "";
var u;
if (n.getIncludedInRate().valueOf() === true) {
if ((n.getPayOnArrival().valueOf() === true) && (fee.isPrepaid().valueOf() === true)) {
w = "OnArrival";
u = n.getAmount()
} else {
if (n.getHasFee().valueOf() === true) {
w = "WithFee";
u = n.getAmount();
m = true
} else {
w = "NoFee";
u = ""
}
}
q.push({
hasfees: n.getHasFee().valueOf(),
amount: u,
currency: v,
type: w,
purpose: n.getPurpose(),
desc: {
description: n.getDescription(),
type: n.getType(),
coverageType: n.getCoverageType()
}
})
} else {
w = "NotInRate";
u = "";
q.push({
hasfees: n.getHasFee().valueOf(),
amount: u,
currency: v,
type: w,
purpose: n.getPurpose(),
desc: {
description: n.getDescription(),
type: n.getType(),
coverageType: n.getCoverageType()
}
})
}
}
for (var i = 0; i < g.availability.data.extra.list.length; i++) {
if (g.availability.data.extra.list[i].required) {
w = "NotInRate";
u = "";
var t = g.availability.data.extra.list[i].includedInRate;
q.push({
hasfees: t,
amount: u,
currency: v,
type: w,
purpose: g.availability.data.extra.list[i].equipType,
desc: {
description: g.availability.data.extra.list[i].description,
type: g.availability.data.extra.list[i].equipType,
coverageType: ""
}
})
}
}
}
for (var i = 0; i < q.length; i++) {
var o = q[i].purpose.match(/.Raw./gi);
if (o) {
var l = q[i].desc.description.match(/tax/gi);
if (l) {
q[i].purpose = "7"
}
var k = q[i].desc.description.match(/drop/gi);
if (k) {
q[i].purpose = "601.VCP.X"
}
}
}
return {
hasDeposit: h,
withFees: m,
fees: q.sort(j),
feetodisplay: this.generateDisplayList(g)
}
},
getRC_html: function (b, a) {
var e = "";
if (b.fees.length) {
var f = false;
var g = [];
var c = b.fees;
e = CT.LIB.templateV2.tmpl(this.tpl.HTML_Header.join(""), {}, this);
if (CT.LIB.Object.isDefined(a)) {
if (a) {
e += '<tr><td class="ct-rental-conditions-header ct-rental-conditions-left-side"><div class="ct-rental-conditions-left-side ct_cardetails_icons_s"><p title="Included" class="ct_icon ico_included"></p></div></td><td class="ct-rental-conditions-header ct-rental-conditions-right-side"><div class="ct-rental-conditions-right-side"><span>Rundum-Sorglos Paket</span></div></td></tr>'
}
}
for (var i = 0; i < c.length; i++) {
if (g[c[i].desc.description] === undefined) {
g[c[i].desc.description] = 1
} else {
g[c[i].desc.description]++
} if (g[c[i].desc.description] > 1) {
continue
}
var d = {
isCur: f,
txt: "",
data: c[i]
};
switch (c[i].type) {
case "NotInRate":
if (c[i].hasfees !== true) {
if (f) {
d.txt = this.options.l18n.notIncludedInTotalPrice;
e += CT.LIB.templateV2.tmpl(this.tpl.HTML_No_Fee_tickImg.join(""), d, this);
f = true
} else {
if (this.options.side) {
d.txt = this.options.l18n.notIncludedInTotalPrice;
e += CT.LIB.templateV2.tmpl(this.tpl.HTML_No_Fee_crossImg_left.join(""), d, this);
f = false
} else {
d.txt = this.options.l18n.notIncludedInTotalPrice;
e += CT.LIB.templateV2.tmpl(this.tpl.HTML_No_Fee_crossImg_right.join(""), d, this);
f = false
}
}
} else {
d.txt = this.options.l18n.notIncludedInTotalPrice;
e += CT.LIB.templateV2.tmpl(this.tpl.HTML_No_Fee_tickImg.join(""), d, this)
}
break;
case "OnArrival":
if (b.hasDeposit === true) {
if (c[i].hasfees === true) {
if (b.withFees === true) {
if (c[i].amount === "") {
e += CT.LIB.templateV2.tmpl(this.tpl.HTML_No_Fee_included.join(""), d, this)
} else {
e += CT.LIB.templateV2.tmpl(this.tpl.HTML_With_Fee_Amount.join(""), d, this)
}
} else {
d.txt = this.options.l18n.includedInTotalPrice;
e += CT.LIB.templateV2.tmpl(this.tpl.HTML_No_Fee_tickImg.join(""), d, this)
}
} else {
if (this.options.side) {
d.txt = this.options.l18n.includedInPrice;
e += CT.LIB.templateV2.tmpl(this.tpl.HTML_No_Fee_tickImg_left.join(""), d, this)
} else {
d.txt = this.options.l18n.includedInPrice;
e += CT.LIB.templateV2.tmpl(this.tpl.HTML_No_Fee_tickImg.join(""), d, this)
}
}
}
break;
case "WithFee":
if (c[i].hasfees === true) {
if (c[i].amount === "") {
e += CT.LIB.templateV2.tmpl(this.tpl.HTML_With_Fee_NoAmount.join(""), d, this)
} else {
e += CT.LIB.templateV2.tmpl(this.tpl.HTML_With_Fee_Amount.join(""), d, this);
f = true
}
}
break;
case "NoFee":
if (c[i].hasfees !== true) {
if (f) {
d.txt = this.options.l18n.includedInPrice;
e += CT.LIB.templateV2.tmpl(this.tpl.HTML_No_Fee_included.join(""), d, this);
f = true
} else {
if (this.options.side) {
d.txt = this.options.l18n.includedInPrice;
e += CT.LIB.templateV2.tmpl(this.tpl.HTML_No_Fee_tickImg_left.join(""), d, this);
f = false
} else {
d.txt = this.options.l18n.includedInPrice;
e += CT.LIB.templateV2.tmpl(this.tpl.HTML_No_Fee_tickImg.join(""), d, this);
f = false
}
}
}
break;
default:
break
}
}
e += CT.LIB.templateV2.tmpl(this.tpl.HTML_Footer.join(""), {}, this)
} else {
e = ""
}
return e
},
getHtml: function (b) {
var d = "";
var c = {
ForNumberOfDays: $.i18n.locale.ForNumberOfDays,
For3Days: $.i18n.locale.For3Days,
perday: $.i18n.locale.DurationPerDay,
days: $.i18n.locale.DurationDays,
day: $.i18n.locale.DurationDay,
TipCarDriverExtend: $.i18n.locale.TipCarDriverExtend
};
b.carDriver = false;
b.i18n = c;
if (b.dailyPrice) {
var a = b.priceObj.getDailyPriceFee();
b.priceToDisplay = a.getAmount()
} else {
b.priceToDisplay = b.priceObj.getPrice()
} if (b.priceObj.getRateType() === "IN_VEHICLE_WITH_DRIVER") {
b.carDriver = true
}
try {
d = CT.LIB.templateV2.tmpl(this.tpl.HTML_UniqueCommon.join(""), b, this)
} catch (e) {
try {
d = CT.LIB.templateV2.tmpl(this.tpl.HTML_Error.join(""), b, this)
} catch (e2) {}
}
return d
},
durationFormat: function (b, c, a) {
var d;
if (!a) {
if (b === 1) {
d = c.ForNumberOfDays + " " + b + " " + c.day
} else {
d = c.ForNumberOfDays + " " + b + " " + c.days
}
} else {
d = c.perday
}
return d
},
generateDisplayList: function (n) {
var r = [];
var g = n.length;
var e = false;
var p = false;
var i = 0;
var j = 0;
var k = 0;
var l = 0;
var m = {
commonFee: [],
uniqueFee: []
};
var h = n.commonList;
var q = n.availability;
for (i = 0; i < h.length; i++) {
p = true;
if (p) {
m.commonFee.push({
purpose: h[i].fee,
display: true,
description: h[i].description,
detail: {}
})
} else {
m.uniqueFee.push({
purpose: h[i].fee,
display: true,
description: h[i].description,
detail: {}
})
}
}
e = false;
for (k = 0; k < m.commonFee.length; k++) {
e = false;
CT.LIB.Array.each(q.data.rates.charges, function (a, c, b) {
if (a.purpose === m.commonFee[k].purpose) {
e = true;
m.commonFee[k].detail = a.description
}
});
if (!e) {
CT.LIB.Array.each(q.data.extra.list, function (a, c, b) {
if (("EQUIP_" + a.equipType) === m.commonFee[k].purpose) {
e = true;
m.commonFee[k].detail = a.description
}
})
}
}
if (!m.uniqueFee.length) {
var o = function (a, b) {
var c = 1000;
var d = 1000;
var f = new CT.ABE.Utils.RentalCondition();
if (a.detail instanceof abeFeeBreakdown) {
if (a.detail.getIncludedInRate()) {
if (f.FeeSort[a.purpose] !== undefined) {
c = f.FeeSort[a.purpose].rank
}
}
}
if (b.detail instanceof abeFeeBreakdown) {
if (b.detail.getIncludedInRate()) {
if (f.FeeSort[b.purpose] !== undefined) {
d = f.FeeSort[b.purpose].rank
}
}
}
if (a.detail instanceof AbeEquipmentObject) {
if (a.detail.getInRate()) {
if (f.FeeSort[a.purpose] !== undefined) {
c = f.FeeSort[a.purpose].rank
}
}
}
if (b.detail instanceof AbeEquipmentObject) {
if (b.detail.getInRate()) {
if (f.FeeSort[b.purpose] !== undefined) {
c = f.FeeSort[b.purpose].rank
}
}
}
if (c == d) {
return 0
}
if (c < d) {
return -1
}
return 1
};
m.commonFee.sort(o)
}
return m
},
_sortByFee: function (a, b) {
var c = a.fee;
var d = b.fee;
if (c == d) {
return 0
}
if (c < d) {
return -1
}
return 1
},
_getUnique: function (a, b) {
a.sort(this._sortByFee);
for (var i = 1; i < a.length;) {
if (a[i - 1][b] === a[i][b]) {
a.splice(i, 1)
} else {
i++
}
}
return a
}
}
})(jQCT);
(function ($) {
namespace("CT.ABE.Utils.Print");
CT.ABE.Utils.Print = function (a) {
this.options = {
debug: false,
importCSS: true,
printContainer: true,
operaSupport: true
};
$.extend(this.options, a)
};
CT.ABE.Utils.Print.prototype = {
print: function (f) {
var d;
var b;
var c = "iframe_" + this.options.id;
if (this.options.operaSupport && $.browser.opera) {
d = window.open("", "ct_print-preview");
d.document.open();
b = d.document
} else {
if (!$("#" + c).length) {
var e = $('<iframe name="' + c + '" id="' + c + '" />');
if (!this.options.debug) {
e.css({
position: "absolute",
width: "0px",
height: "0px",
left: "-600px",
top: "-600px"
})
}
e.appendTo("body")
}
if ($.browser.chrome) {
b = window.frames[c].document
} else {
b = $("#" + c)[0].contentWindow.document ? $("#" + c)[0].contentWindow.document : $("#" + c)[0].contentWindow ? $("#" + c)[0].contentWindow : $("#" + c)
}
} if (this.options.importCSS) {
if ($("link[media=print]").length > 0) {
$("link[media=print]").each(function () {
b.write("<link type='text/css' rel='stylesheet' href='" + $(this).attr("href") + "' media='print' />")
})
} else {
$("link").each(function () {
b.write("<link type='text/css' rel='stylesheet' href='" + $(this).attr("href") + "' />")
})
}
}
if (this.options.css) {
b.write("<link type='text/css' rel='stylesheet' href='" + this.options.css + "' />")
}
if (this.options.printContainer) {
b.write("<div>" + $(f).html() + "</div>")
} else {
$element.each(function () {
b.write($(f).html())
})
}
b.close();
if (this.options.operaSupport && $.browser.opera) {
d.focus()
} else {
if ($.browser.chrome) {
b.focus()
} else {
($("#" + c)[0].contentWindow ? $("#" + c)[0].contentWindow : $("#" + c)).focus()
}
}
var p = this;
setTimeout(function () {
if (p.options.operaSupport && $.browser.opera) {
d.print()
} else {
if ($.browser.chrome) {
var a = b.contentWindow || b;
$(a).print()
} else {
($("#" + c)[0].contentWindow ? $("#" + c)[0].contentWindow : $("#" + c)).print()
}
} if (d) {
d.close()
}
}, 1000)
}
}
})(jQCT);
function AbeEquipmentObject() {
this.type = this.price = this.currency = this.description = new String();
this.inRate;
this.required = new Boolean(false);
this.init = init;
this.getType = getType;
this.getPrice = getPrice;
this.getCurrency = getCurrency;
this.getDescription = getDescription;
this.getInRate = getInRate;
this.isRequired = isRequired;
function init(e, c, f, d, b, a) {
this.type = e;
this.price = c;
this.currency = new String(f);
this.description = d;
this.inRate = b;
this.required = (a === "true") ? true : false
}
function getType() {
return this.type
}
function getPrice() {
return this.price
}
function getCurrency() {
return this.currency
}
function getDescription() {
return this.description
}
function getInRate() {
return this.inRate
}
function isRequired() {
return this.required
}
}
function abeFeeBreakdown() {
this.type = this.coverageType = this.purpose = this.description = this.currencyCode = this.amount = new String();
this.taxInclusive = this.includedInRate = this.hasFee = this.payOnArrival = false;
this.init = init;
this.getCoverageType = getCoverageType;
this.getType = getType;
this.getPurpose = getPurpose;
this.getDescription = getDescription;
this.getCurrencyCode = getCurrencyCode;
this.getAmount = getAmount;
this.getTaxInclusive = getTaxInclusive;
this.getIncludedInRate = getIncludedInRate;
this.getHasFee = getHasFee;
this.getPayOnArrival = getPayOnArrival;
this.toString = toString;
function init(b, a, d, i, j, f, e, c, h, g) {
this.type = b;
this.coverageType = a;
this.purpose = d;
this.description = i;
this.currencyCode = (j === null ? "" : j);
this.amount = (f === null ? "" : f);
this.taxInclusive = this.includedInRate = false;
this.taxInclusive = (e === "true");
this.includedInRate = CT.LIB.Object.isBoolean(c) ? c : false;
if ((this.currencyCode.length > 0) && (this.amount.length > 0)) {
this.hasFee = true
} else {
this.hasFee = false
}
this.payOnArrival = g
}
function getPurpose() {
return this.purpose
}
function getType() {
return this.type
}
function getCoverageType() {
return this.coverageType
}
function getDescription() {
return this.description
}
function getCurrencyCode() {
return this.currencyCode
}
function getAmount() {
return this.amount
}
function getTaxInclusive() {
return this.taxInclusive
}
function getIncludedInRate() {
return this.includedInRate
}
function getHasFee() {
if ((this.hasFee === true) && (this.amount == "0.00")) {
return false
}
return this.hasFee
}
function getPayOnArrival() {
return this.payOnArrival
}
function toString() {
return "getDescription=" + this.getDescription() + ",getCurrencyCode=" + this.getCurrencyCode() + ",getAmount=" + this.getAmount() + ",hasFee=" + this.hasFee + ",payOnArrival=" + this.payOnArrival
}
}(function ($) {
namespace("CT.ABE.Popup.VehicleDetails");
CT.ABE.Popup.VehicleDetails = function (b) {
this.tpl = {
HTML_Loading: ['<div id="<%=t.idAs%>" title="<%=t.oP.title%>">', ' <div id="<%=t.idAs%>_loading" class="moduleContentMainLoading">', ' <img src="https://cdn.cartrawler.com/templates/popup/images/big-ajax-loader.gif" width="66" height="66" alt="Loading">', ' <div class="moduleContentMainLoadingMsg"><%=t.oP.l18n.LoadingVehicleDetails%></div>', " </div>", "</div>"],
HTML_Error: ['<div id="<%=t.idAs%>_error" class="moduleContentMainLoading">', ' <img src="https://cdn.cartrawler.com/templates/popup/images/error.png" width="48" height="48" alt="Loading">', ' <div class="moduleContentMainLoadingMsg">The requested content cannot be loaded.<br />Please try again later.</div>', "</div>"],
HTML_NoContent: ['<div id="<%=t.idAs%>_error" class="moduleContentMainLoading">', ' <img src="https://cdn.cartrawler.com/templates/popup/images/warning.png" width="48" height="48" alt="Loading">', ' <div class="moduleContentMainLoadingMsg">Sorry, no details for that car.<br />Please try again later.</div>', "</div>"],
HTML_Content: ['<div class="ct_pop_cardetail_maincontent">', ' <div class="moduleContentMainTitle"><div class="moduleContentTitle"><%=carInfo.carName%></div></div>', ' <div class="moduleContentMain">', ' <div class="moduleContentMainLeft">', ' <div><div class="moduleContentImage"><img width="160" height="100" src="<%=carInfo.carImage%>" alt="<%=carInfo.carName%>"></div></div>', ' <div><div class="moduleContentPrice"><span class="moduleContentBigBold"><%=carInfo.Currency%> <%=CT.LIB.StringV2.sprintf("%.2f", carInfo.price)%></span><span class="moduleContentSpan">&nbsp;<%=t.oP.l18n.For3Days.replace(/3/g, carInfo.duration)%></span></div></div>', " </div>", ' <div class="moduleContentMainRight">', ' <div class="moduleCarIconsAttributes">', " <% if (Fleet.FleetGroup.Vehicle['@PassengerQuantity']) { %>", ' <div class="ct_cardetails_icons"><p class="ct_icon ico_passenger" title="<%=t.oP.l18n.passengerLabel%>"></p><p class="ct_icon_label">x <%=Fleet.FleetGroup.Vehicle[\'@PassengerQuantity\']%></p></div>', " <% } %>", " <% if (Fleet.FleetGroup.Vehicle['@BaggageQuantity']) { %>", ' <div class="ct_cardetails_icons"><p class="ct_icon ico_baggage" title="<%=t.oP.l18n.baggageLabel%>"></p><p class="ct_icon_label">x <%=Fleet.FleetGroup.Vehicle[\'@BaggageQuantity\']%></p></div>', " <% } %>", " <% if (Fleet.FleetGroup.Vehicle.VehType['@DoorCount']) { %>", ' <div class="ct_cardetails_icons"><p class="ct_icon ico_door" title="<%=t.oP.l18n.doorsLabel%>"></p><p class="ct_icon_label">x <%=Fleet.FleetGroup.Vehicle.VehType[\'@DoorCount\']%></p></div>', " <% } %>", " <% if (Fleet.FleetGroup.Vehicle['@TransmissionType']) { %>", " <% if (Fleet.FleetGroup.Vehicle['@TransmissionType'] === \"Automatic\") { %>", ' <div class="ct_cardetails_icons"><p class="ct_icon ico_auto" title="<%=t.oP.l18n.trans_auto%>"></p></div>', ' <% attribut_txt += (", " + t.oP.l18n.trans_auto); %>', " <% } %>", " <% if (Fleet.FleetGroup.Vehicle['@TransmissionType'] === \"Manual\") { %>", ' <div class="ct_cardetails_icons"><p class="ct_icon ico_manual" title="<%=t.oP.l18n.trans_manual%>"></p></div>', ' <% attribut_txt += (", " + t.oP.l18n.trans_manual); %>', " <% } %>", " <% } %>", ' <% var attribut_txt = ""; %>', " <% if (Fleet.FleetGroup.Vehicle['@AirConditionInd']) { %>", " <% if (Fleet.FleetGroup.Vehicle['@AirConditionInd'] === \"true\") { %>", ' <div class="ct_cardetails_icons"><p class="ct_icon ico_ac" title="<%=t.oP.l18n.air_condition%>"></p></div>', ' <% attribut_txt += (", " + t.oP.l18n.air_condition); %>', " <% } %>", " <% } %>", " <% if (Fleet.FleetGroup.Vehicle['@FuelType']) { %>", " <% if (Fleet.FleetGroup.Vehicle['@FuelType'] === \"Diesel\") { %>", ' <div class="ct_cardetails_icons"><p class="ct_icon ico_diesel" title="<%=t.oP.l18n.fuel_diesel%>"></p></div>', ' <% attribut_txt += (", " + t.oP.l18n.fuel_diesel); %>', " <% } %>", " <% } %>", " <% if (/with sat nav/.test(Fleet.FleetGroup.Vehicle.VehMakeModel['@Name'].toLowerCase())) { %>", ' <div class="ct_cardetails_icons"><p class="ct_icon ico_gps" title="<%=t.oP.l18n.satelite%>"></p></div>', ' <% attribut_txt += (", " + t.oP.l18n.satelite); %>', " <% } %>", " </div>", ' <div class="moduleClear"></div>', ' <div class="moduleCarIconsDescription">', " <p>", " <% if (Fleet.FleetGroup.Vehicle['@PassengerQuantity']) { %><%=Fleet.FleetGroup.Vehicle['@PassengerQuantity']%> <%=t.oP.l18n.passenger%>, <% } %>", " <% if (Fleet.FleetGroup.Vehicle['@BaggageQuantity']) { %><%=Fleet.FleetGroup.Vehicle['@BaggageQuantity']%> <%=t.oP.l18n.baggage%>, <% } %>", " <% if (Fleet.FleetGroup.Vehicle.VehType['@DoorCount']) { %><%=Fleet.FleetGroup.Vehicle.VehType['@DoorCount']%> <%=t.oP.l18n.doors%><% } %><%=attribut_txt%>", " </p>", " </div>", " </div>", ' <div class="moduleContentDetails">', ' <div class="moduleContentDetailsLeft" id="left_<%=t.idAs%>">', ' <div class="moduleContentDescription">', ' <h2 class="moduleContentBold"><%=t.oP.l18n.car_description%></h2>', ' <p class="moduleContentDescriptionDivP">', " <% if (Fleet.Description) { %>", " <%=Fleet.Description%>", " <% } else { %>", " <%=t.oP.l18n.nodata%>", " <%}%>", " </p>", " </div>", ' <div class="moduleContentDescription">', ' <h2 class="moduleContentBold"><%=t.oP.l18n.fuel_consumption%></h2>', ' <p class="moduleContentDescriptionDivP">', " <% if (Fleet.EngineDetail) { %>", " <% if (Fleet.EngineDetail['@FuelConsumption'] && (Fleet.EngineDetail['@FuelConsumption'] != \"0.0\") && Fleet.EngineDetail['@FuelConsumptionUnit'] != \"\") { %>", " <%=Fleet.EngineDetail['@FuelConsumption']%> <%=Fleet.EngineDetail['@FuelConsumptionUnit']%>", " <% } else { %>", " <%=t.oP.l18n.nodata%>", " <% } %>", " <% } else { %>", " <%=t.oP.l18n.nodata%>", " <% } %>", " </p>", " </div>", ' <div class="moduleContentDescription">', ' <h2 class="moduleContentBold"><%=t.oP.l18n.co2_emission%></h2>', ' <p class="moduleContentDescriptionDivP">', " <% if (Fleet.EngineDetail) { %>", " <% if (Fleet.EngineDetail['@CO2Emission'] && (Fleet.EngineDetail['@CO2Emission'] != \"0.0\") && Fleet.EngineDetail['@CO2EmissionUnit'] != \"\") { %>", " <%=Fleet.EngineDetail['@CO2Emission']%> <%=Fleet.EngineDetail['@CO2EmissionUnit']%>", " <% } else { %>", " <%=t.oP.l18n.nodata%>", " <% } %>", " <% } else { %>", " <%=t.oP.l18n.nodata%>", " <%}%>", " </p>", " </div>", " </div>", " </div>", ' <div class="moduleDisclaimer">', ' <div class="moduleDisclaimerContainer">', " <%=t.oP.l18n.disclaimer%>", " </div>", " </div>", "</div>"]
};
var k;
var a = {
debug: true,
title: "Vehicle Details",
width: 400,
l18n: {
LoadingVehicleDetails: "Loading vehicle details",
disclaimer: "The car displayed and models listed are the most common car used by our car rental partners. We cannot guarantee the make or model of the rental car. The purpose of the image and list is to provide a sample only. Please note the luggage capacity varies from make and model and may be reduced once the vehicle is at its full seating capacity.",
days: " for 3 days",
car_description: "Car Description",
fuel_consumption: "Fuel consumption",
co2_emission: "CO2 emission",
passengerLabel: "Passenger Quantity",
baggageLabel: "Baggage Quantity",
doorsLabel: "Doors Quantity",
passenger: "Passenger",
baggage: "baggage",
doors: "Doors",
air_condition: "Air conditioning",
satelite: "Satelite Navigation",
trans_manual: "Manual Transmission",
trans_auto: "Automatic Transmission",
fuel_diesel: "Diesel",
similar_cars: "Similar cars:",
no_similar_cars: "No similar cars available",
nodata: "-"
}
};
this.oP = a;
$.extend(true, this.oP, b);
this.request = new CT.ABE.Popup.VehicleDetails.Request()
};
CT.ABE.Popup.VehicleDetails.prototype = {
display: function (j, r, m, e, p, s, n) {
this.idAs = j;
this.oP.Currency = s;
this.oP.CountryCode = p;
var l = this;
if ($("#" + this.idAs).length == 0) {
if (this.oP.CountryCode == undefined) {
this.oP.CountryCode = abeSC.options.countryID
}
var q = {
countryCode: p,
fleetGroupCode: m.data.vehicle.code,
price: m.data.rates.estimatedTotal,
duration: m.data.extensions.duration,
carImage: m.data.vehicle.picture,
carName: m.data.vehicle.name,
reference: m.data.reference
};
var f = CT.LIB.templateV2.tmpl(this.tpl.HTML_Loading.join(""), m, this);
$("body").append(f);
$.extend($.ui.draggable.defaults, {
iframeFix: true
});
var h = false;
var c = "center";
var i = $(r).parent().parent();
var o = $(i).offset().left;
var t = $(i).offset().top - $(window.self).scrollTop();
if (window.top !== window.self) {
h = true;
var d = $(window.self).width();
var g = o + this.oP.width;
if (g > d) {
o = parseInt($(i).offset().left - this.oP.width, 10)
}
}
$("#" + this.idAs).dialog({
closeOnEscape: true,
draggable: true,
resizable: false,
position: h ? [o, t] : "center",
width: l.oP.width,
dialogClass: "ct-ui-base",
close: function (a) {
$(this).remove()
}
});
l.request.get({
carInfo: q
}, {
success: function (a) {
if (CT.LIB.Object.isDefined(a.Success)) {
a.carInfo = q;
a.languageID = n;
var b = CT.LIB.templateV2.tmpl(l.tpl.HTML_Content.join(""), a, l);
if ($.browser.msie && $.browser.version < 7) {
$("#" + l.idAs + "_loading").parent().height("auto")
}
$("#" + l.idAs + "_loading").replaceWith(b);
var k = Math.round($("#left_" + l.idAs).height() - $(".moduleContentBold").height()) - 10;
$("#right_" + l.idAs).css("height", k + "px")
} else {
var b = CT.LIB.templateV2.tmpl(l.tpl.HTML_Error.join(""), a, l);
if ($.browser.msie && $.browser.version < 7) {
$("#" + l.idAs + "_loading").parent().height("auto")
}
$("#" + l.idAs + "_loading").replaceWith(b)
}
},
error: function (a) {
var b = CT.LIB.templateV2.tmpl(l.tpl.HTML_Error.join(""), data, l);
if ($.browser.msie && $.browser.version < 7) {
$("#" + l.idAs + "_loading").parent().height("auto")
}
$("#" + l.idAs + "_loading").replaceWith(b)
}
});
abeSC.abeEvents.carDetails(q)
}
},
get: function (c, e, f, d, h, b) {
var i = this;
if (this.oP.CountryCode == undefined) {
this.oP.CountryCode = abeSC.options.countryID
}
var g = {
currency: f,
countryCode: e,
fleetGroupCode: c.data.vehicle.code,
reference: c.data.reference
};
i.request.get({
carInfo: g
}, {
success: function (a) {
if (CT.LIB.Object.isDefined(a.Success)) {
b(a)
}
},
error: function (a) {}
})
}
}
})(jQCT);
(function ($) {
namespace("CT.ABE.Popup.VehicleDetails.Request");
CT.ABE.Popup.VehicleDetails.Request = function () {
var a = {
debug: true
};
this.options = $.extend(true, a, {});
this._VehicleDetails_JSON = {
"@xmlns": "http://www.cartrawler.com/",
"@Version": "1.000",
"@Target": "",
"@PrimaryLangID": "",
POS: {
Source: []
},
Country: {},
Reference: {},
FleetGroup: {}
};
return this
};
CT.ABE.Popup.VehicleDetails.Request.prototype = {
get: function (b, c) {
var d = this;
CT.LIB.Ajax.sendJson({
url: abeSC.getConfig().proxyURL,
xhr: CT.LIB.Ajax.getXHR(),
data: {
type: "CT_FleetRQ",
msg: JSON.stringify($.extend(true, {}, d._VehicleDetails_JSON, {
"@Target": abeSC.getConfig().target,
"@PrimaryLangID": abeSC.getConfig().language,
POS: {
Source: CT.LIB.Ajax.getPOS(abeSC.getConfig("OTA"))
},
Country: d.setCountry(b),
Reference: d.setReference(b),
FleetGroup: d.setFleetGroup(b)
}))
},
success: function (a) {
d.onSuccessRequest(a, c)
},
error: function (a) {
d.onErrorRequest(a, c)
}
})
},
onSuccessRequest: function (a, b) {
var c = this;
try {
if (a.Success instanceof Array) {
if (typeof b.success === "function") {
b.success(a)
}
} else {
if (typeof a.Errors !== "undefined") {
if (typeof a.Errors.Error !== "undefined") {
if (a.Errors.Error["@Type"] === "1") {
if ($.isFunction(b.success)) {
b.success(a)
}
}
}
} else {
if ($.isFunction(b.error)) {
b.error(a)
}
}
}
} catch (e) {
try {
abeSC.errorReport("Javascript Exception: CT.ABE.Popup.VehicleDetails.Request: onSuccessRequest()", "0", "Error name: " + e.name + ". Error message: " + e.message)
} catch (e2) {}
}
},
onErrorRequest: function (a, b) {
var c = this;
if ($.isFunction(b.error)) {
b.error(a)
}
},
setCountry: function (a) {
return {
"@CodeContext": "CARTRAWLER",
"@Code": a.carInfo.countryCode
}
},
setReference: function (a) {
return {
Reference: {
"@Type": a.carInfo.reference.type,
"@ID": a.carInfo.reference.id,
"@ID_Context": a.carInfo.reference.idContext,
"@DateTime": a.carInfo.reference.datetime,
"@URL": a.carInfo.reference.url
}
}
},
setFleetGroup: function (a) {
return {
"@CodeContext": "CARTRAWLER",
"@Code": a.carInfo.fleetGroupCode
}
}
}
})(jQCT);
(function ($) {
namespace("CT.ABE.Popup.Email");
CT.ABE.Popup.Email = function (a) {
this.tpl = {
HTML_Error: ['<div id="<%=t.idAs%>_error" class="ct_emailquote">', ' <div class="ct_emailquote_error"><%=msg%></div>', "</div>"],
HTML_Success: ['<div id="<%=t.idAs%>_success" class="ct_emailquote">', ' <div class="ct_emailquote_success"><%=$.i18n.locale.sentEmailQuote%></div>', "</div>"],
HTML_Loading: ['<div id="<%=t.idAs%>_loading" class="ct_emailquote">', ' <div class="ct_loadingimg"></div>', "</div>"],
HTML_Email: ['<div id="<%=t.idAs%>" title="<%=$.i18n.locale.TipEmailQuote%>">', ' <div id="ct_eq_content" class="ui-dialog-content ui-widget-content">', ' <div class="ct_eq_fieldset">', ' <form class="ct_eq_form" id="ct_eq_form" method="get" action="">', ' <h2 id="ct_eq_msg"><%=$.i18n.locale.LabelContactDetails%></h2>', " <fieldset>", " <ol>", " <li>", ' <label for="ct_eq_firstname"><span class=""><%=$.i18n.locale.info_firstNameLabel%>:<em>*</em></span></label>', ' <input id="ct_eq_firstname" class="ct_bg text-input" type="text" name="ct_eq_firstname" data-cta-field="eQ_firstname"/>', " </li>", " <li>", ' <label for="ct_eq_lastname"><span class=""><%=$.i18n.locale.info_surnameLabel%>:<em>*</em></span></label>', ' <input id="ct_eq_lastname" class="ct_bg text-input" type="text" name="ct_eq_lastname" data-cta-field="eQ_lastname"/>', " </li>", " <li>", ' <label for="ct_eq_email"><span class=""><%=$.i18n.locale.emailLabel%><em>*</em></span></label>', ' <input id="ct_eq_email" class="ct_bg text-input" type="text" name="ct_eq_email" size="50" data-cta-field="eQ_email"/>', " </li>", " <li>", ' <label for="ct_eq_phonenumber"><span class=""><%=$.i18n.locale.phoneLabel%><em>*</em></span></label>', ' <select id="ct_eq_phonenumber_ind" name="ct_eq_phonenumber_ind" class="ct_bg select-input large" data-cta-field="eQ_phone_code">', " <% for (prop in countrylist) {%>", " <% if(prop === countryID) { %>", ' <option value="<%=countrylist[prop].diallingcode%>" selected="selected"><%=countrylist[prop].fullname%>&nbsp;(+<%=countrylist[prop].diallingcode%>)</option>', " <% } else { %>", ' <option value="<%=countrylist[prop].diallingcode%>"><%=countrylist[prop].fullname%>&nbsp;(+<%=countrylist[prop].diallingcode%>)</option>', " <% } %>", " <% } %>", " </select>", ' <input id="ct_eq_phonenumber" name="ct_eq_phonenumber" size="12" class="ct_bg text-input small" data-cta-field="eQ_phone_no"/>', " </li>", " </ol>", " </fieldset.", " <h4><em>*</em> <%=$.i18n.locale.LabelMandatory%></h4>", ' <div class="ct_eq_btn">', ' <p class="ct_eq_button butn_style"><a class="ct_bg blue" href="javascript:;" data-cta="emailQ" data-cta-value="eQ_send" id="ct_eq_send"><span class="ct_bg tl"></span><span class="ct_bg tr"><%=$.i18n.locale.submitButton%></span></a></p>', " </div>", " </form>", " </div>", " </div>", "</div>"]
};
this.options = {
debug: true,
baseClass: "ct-ui-base",
errorClass: "ct_eq_form_error",
cssclass: "ct_eq",
width: 325,
modal: false,
callback: false,
data: {}
};
$.extend(true, this.options, a);
this.request = new CT.ABE.Popup.Email.Request(this.options)
};
CT.ABE.Popup.Email.prototype = {
display: function (l, k) {
var b = this;
var j = {};
if (!$(l).length) {
return
}
this.idAs = "emailQuotePop";
this.elt = l;
$.extend(true, this.options, {
type: "EMAIL_QUOTE"
}, k);
j.country = abeSC.countryObj.main_Country_array[abeSC.options.residenceID].fullname;
j.countrylist = abeSC.countryObj.main_Country_array;
j.countryID = abeSC.options.residenceID;
j.dialingcode = abeSC.countryObj.main_Country_array[abeSC.options.residenceID].fullname + "(+" + abeSC.countryObj.main_Country_array[abeSC.options.residenceID].diallingcode + ")";
if (!$("#" + this.idAs).length) {
var f = CT.LIB.templateV2.tmpl(this.tpl.HTML_Email.join(""), j, this);
$("body").append(f);
if (true) {
$("#" + this.idAs).find("#ct_eq_msg").html($.i18n.locale.LabelEmailDetails);
$("#" + this.idAs).find("ol li:nth-child(1)").hide();
$("#" + this.idAs).find("ol li:nth-child(2)").hide();
$("#" + this.idAs).find("ol li:nth-child(4)").hide()
}
if (CT.LIB.Object.isDefined(this.options.type) && this.options.type.indexOf("CUSTOMER_ABANDONMENT_STEP") !== -1) {
$("#" + this.idAs).attr("ignore-history", true)
} else {
$("#" + this.idAs).removeAttr("ignore-history")
}
var m = false;
var i = "center";
var e = $(l).parent().parent();
var g = $(e).offset().left;
var d = $(e).offset().top - $(window.self).scrollTop();
if (window.top !== window.self) {
m = true;
var c = $(window.self).width();
var n = g + this.options.width;
if (n > c) {
g = parseInt($(e).offset().left - this.options.width, 10)
}
}
$("#" + this.idAs).dialog({
closeOnEscape: true,
draggable: true,
resizable: false,
position: m ? [g, d] : "center",
width: b.options.width,
title: b.options.title,
modal: b.options.modal || false,
dialogClass: b.options.baseClass,
close: function (a) {
$(this).remove()
}
})
}
if (!$("#" + this.idAs).dialog("isOpen")) {
var f = CT.LIB.templateV2.tmpl(this.tpl.HTML_Email.join(""), {}, this);
$("#idE").empty().html(f);
$("#" + this.idAs).dialog("open")
}
abeSC.abeEvents.emailQuote("open", k);
var h = abeSC.options.extensions.enableCallbackOption && this.options.callback;
if (CT.LIB.Object.isDefined(k.type) && k.type.indexOf("CUSTOMER_ABANDONMENT_STEP") !== -1) {
h = false
}
b.validateCustomerDetails(h);
b.eventSubmit()
},
retain: function (a) {
$.extend(true, this.options, a);
if (this.options.email) {
this.send(true, false)
}
},
eventSubmit: function () {
var a = this;
$("#ct_eq_send").bind("click", function () {
$("#ct_eq_form").submit()
})
},
validateCustomerDetails: function (d) {
var f = this;
var e = $("#ct_eq_form").validate({
debug: false,
submitHandler: function (a) {
f.send(false, d)
},
ignoreTitle: true,
rules: {
ct_eq_firstname: {
required: false,
minlength: 2
},
ct_eq_lastname: {
required: false,
minlength: 2
},
ct_eq_phonenumber: {
required: false
},
ct_eq_email: {
required: true,
email: true
}
},
messages: {
ct_eq_firstname: {
required: $.i18n.locale.EnterFirstNameMsg,
minlength: $.i18n.locale.ValidMsgFirstName2Char
},
ct_eq_lastname: {
required: $.i18n.locale.EnterSurnameMsg,
minlength: $.i18n.locale.ValidMsgSurname2Char
},
ct_eq_phonenumber: {
required: $.i18n.locale.EnterPhoneMsg
},
ct_eq_email: {
required: $.i18n.locale.EnterValidEmailMsg,
email: $.i18n.locale.EnterValidEmailMsg
}
},
errorClass: "ct_eq_form_error",
focusInvalid: true,
onkeyup: false,
invalidHandler: function (a, b) {
$(b.findLastActive() || b.errorList.length && b.errorList[0].element || []).filter(":visible").animate({
scrollTop: 0
}, "fast");
var c = $(b.findLastActive() || b.errorList.length && b.errorList[0].element || []).filter(":visible");
c.focus()
},
showErrors: function (b, a) {
this.defaultShowErrors()
},
errorPlacement: function (b, a) {
b.insertAfter(a)
},
success: function (a) {
a.parent().removeClass("ct_s3_driver_details_form_error");
a.remove()
},
onfocusout: function (a) {
if (!this.checkable(a) && a.value.length > 0) {
this.element(a)
}
}
})
},
close: function (b) {
var a = this;
if (b) {
setTimeout(function () {
$("#" + a.idAs).dialog("close")
}, b)
} else {
$("#" + a.idAs).dialog("close")
}
},
send: function (k, h) {
var c = this;
var f = "CARTRAWLER";
var e = "CARTRAWLER";
var j = abeSC.getPickupID();
var l = CT.LIB.Object.isDefined(abeSC.getReturnID()) ? abeSC.getReturnID() : abeSC.getPickupID();
if (abeSC.isMapSearch() && CT.LIB.Object.isDefined(this.options.vendor)) {
j = this.options.vendor.data.locations[0].code;
var d = this.options.vendor.data.locations.length - 1;
l = this.options.vendor.data.locations[d].code
}
if (abeSC.request.pickup.isIATA() && abeSC.request.dropoff.isIATA()) {
f = "IATA";
e = "IATA";
j = abeSC.request.pickup.getIATA();
l = abeSC.request.dropoff.getIATA()
}
var i = {
Currency: abeSC.options.currency,
pickupDateTime: c.options.requestData.getOTAPickupDateTime(),
returnDateTime: c.options.requestData.getOTADropoffDateTime(),
pickupLocationCode: j,
PickUpLocation_CodeContext: f,
returnLocationCode: l,
ReturnLocation_CodeContext: e,
driverAge: abeSC.request.age,
code: c.options.refid,
emailtype: this.options.type || "EMAIL_QUOTE",
email: this.options.email || $("#ct_eq_email").val() || "",
title: this.options.title || null,
firstname: this.options.firstname || $("#ct_eq_firstname").val() || "",
lastname: this.options.surname || $("#ct_eq_lastname").val() || "",
phonenumber: this.options.phone || $("#ct_eq_phonenumber").val() || null,
phonenumber_dialling: this.options.phoneDialling || $("#ct_eq_phonenumber_ind").val() || null,
citizenCountryCode: abeSC.options.residenceID
};
c.request.get({
quoteInfo: i
}, {
success: function (a) {
if (CT.LIB.Object.isDefined(a.Success)) {
a.email = i.email;
a.error = false;
abeSC.abeEvents.emailQuote("sent", a);
try {
if (h && abeSC.customerCallbackPopup && CT.LIB.Object.isDefined(a.TPA_Extensions)) {
if (CT.LIB.Object.isDefined(a.TPA_Extensions.Type)) {
abeSC.customerCallbackPopup.activate(a.TPA_Extensions.Type["@EmailQuoteID"])
}
}
} catch (err) {
c.close()
}
}
},
error: function (a) {
var b = {};
b.email = i.email;
b.error = true;
b.errorReport = {
xmlRequest: xmlRequest,
textStatus: textStatus,
errorThrown: errorThrown
};
if (!k) {
abeSC.abeEvents.emailQuote("sent", b)
}
}
});
if (!k) {
var g;
if (h) {
c.close();
if (!CT.LIB.Object.isDefined(abeSC.customerCallbackPopup)) {
abeSC.customerCallbackPopup = new CT.ABE.Popup.CustomerCallback({
debug: c.options.debug,
width: 360,
OTA: {
"clientID ": abeSC.options.clientID,
Target: abeSC.options.target,
LangID: abeSC.options.language,
ReqID: abeSC.options.clientID,
ReqPriceID: abeSC.options.priceID ? abeSC.options.priceID : abeSC.options.clientID
}
})
}
if (abeSC.customerCallbackPopup) {
abeSC.customerCallbackPopup.display(c.elt, true, i.email)
}
} else {
g = CT.LIB.templateV2.tmpl(c.tpl.HTML_Success.join(""), {}, this);
$("#ct_eq_content").empty().html(g)
}
}
if (!k && !h) {
c.close(2000)
}
}
}
})(jQCT);
(function ($) {
namespace("CT.ABE.Popup.Email.Request");
CT.ABE.Popup.Email.Request = function (b) {
var a = {
debug: true
};
this.options = $.extend(true, a, b);
this._EmailQuote_JSON = {
"@xmlns": "http://www.cartrawler.com/",
"@Version": "1.000",
"@Target": "",
"@PrimaryLangID": "",
POS: {
Source: []
},
VehAvailRQCore: {},
VehPrefs: {},
VehAvailRQInfo: {}
};
return this
};
CT.ABE.Popup.Email.Request.prototype = {
get: function (b, c) {
var d = this;
CT.LIB.Ajax.sendJsonp({
url: abeSC.getConfig().jsonURL,
data: {
type: "CT_QuoteEmailRQ",
msg: JSON.stringify($.extend(true, {}, d._EmailQuote_JSON, {
"@Target": abeSC.getConfig().target,
"@PrimaryLangID": abeSC.getConfig().language,
POS: {
Source: CT.LIB.Ajax.getPOS(abeSC.getConfig("OTA"))
},
VehAvailRQCore: d.setVehAvailRQCore(b),
VehPrefs: d.setPrefs(b),
VehAvailRQInfo: d.setVehAvailRQInfo(b)
}))
},
success: function (a) {
d.onSuccessRequest(a, c)
},
error: function (a) {
d.onErrorRequest(a, c)
}
})
},
onSuccessRequest: function (a, b) {
var c = this;
try {
if (a instanceof Array) {
a = a[0]
}
if (a.Success instanceof Array) {
if (typeof b.success === "function") {
b.success(a)
}
} else {
if (typeof a.Errors !== "undefined") {
if (typeof a.Errors.Error !== "undefined") {
if (a.Errors.Error["@Type"] === "1") {
if ($.isFunction(b.success)) {
b.success(a)
}
}
}
} else {
if ($.isFunction(b.error)) {
b.error(a)
}
}
}
} catch (e) {
try {
abeSC.errorReport("Javascript Exception: CT.ABE.Popup.Email.Request: onSuccessRequest()", "0", "Error name: " + e.name + ". Error message: " + e.message)
} catch (e2) {}
}
},
onErrorRequest: function (a, b) {
var c = this;
if ($.isFunction(b.error)) {
b.error(a)
}
},
setRequestCore: function (a) {
var b = this,
requestCore = {};
return requestCore
},
setVehAvailRQCore: function (a) {
var b = {
"@Status": "ALL",
VehRentalCore: {
"@PickUpDateTime": a.quoteInfo.pickupDateTime,
"@ReturnDateTime": a.quoteInfo.returnDateTime,
PickUpLocation: {
"@CodeContext": a.quoteInfo.PickUpLocation_CodeContext,
"@LocationCode": a.quoteInfo.pickupLocationCode
},
ReturnLocation: {
"@CodeContext": a.quoteInfo.ReturnLocation_CodeContext,
"@LocationCode": a.quoteInfo.returnLocationCode
}
},
DriverType: {
"@Age": a.quoteInfo.driverAge
}
};
return b
},
setPrefs: function (a) {
var b = {};
if (CT.LIB.Object.isDefined(a.quoteInfo.code)) {
b = {
VehPref: {
"@Code": a.quoteInfo.code,
"@CodeContext": "CARTRAWLER"
}
}
}
return b
},
setVehAvailRQInfo: function (a) {
var b = this;
var c = {
Customer: {
Primary: {
PersonName: {
NamePrefix: (a.quoteInfo.title ? a.quoteInfo.title : "Mr"),
GivenName: a.quoteInfo.firstname,
Surname: a.quoteInfo.lastname
},
Email: a.quoteInfo.email,
CitizenCountryName: {
"@Code": a.quoteInfo.citizenCountryCode
}
}
},
TPA_Extensions: {
Type: a.quoteInfo.emailType
}
};
if (a.quoteInfo.phonenumber_dialling && a.quoteInfo.phonenumber) {
c.Customer.Primary.Telephone = {
"@PhoneTechType": "1",
"@CountryAccessCode": a.quoteInfo.phonenumber_dialling,
"@PhoneNumber": a.quoteInfo.phonenumber
}
}
if (abeSC.options.clientIP) {
c.TPA_Extensions.ConsumerIP = abeSC.options.clientIP
}
if (this.options.email) {
c.TPA_Extensions.EmailRetention = {}
}
return c
}
}
})(jQCT);
(function ($) {
namespace("CT.ABE.Popup.CustomerCallback");
CT.ABE.Popup.CustomerCallback = function (a) {
this.tpl = {
HTML_Error: ['<div id="<%=t.idAs%>_error" class="ct_emailquote">', ' <div class="ct_emailquote_error"><%=msg%></div>', "</div>"],
HTML_Success: ['<div id="<%=t.idAs%>_success" class="ct_emailquote">', ' <div class="ct_emailquote_success"><%=$.i18n.locale.TipCallbackServiceMsg%></div>', "</div>"],
HTML_Loading: ['<div id="<%=t.idAs%>_loading" class="ct_emailquote">', ' <div class="ct_loadingimg"></div>', "</div>"],
HTML_CustomerCallback: ['<div id="<%=t.idAs%>" title="<%=$.i18n.locale.TipCallbackService%>">', ' <div id="ct_eq_content" class="ui-dialog-content ui-widget-content">', ' <div class="ct_eq_fieldset">', ' <form class="ct_eq_form" id="ct_eq_form" method="get" action="">', ' <div id="ct_eq_message" class="ct_eq_message"><div class="ct_icon ico_included"><b><%=$.i18n.locale.sentEmailQuote%></b></div></div>', ' <h2 id="ct_eq_msg"><b><%=$.i18n.locale.TipCallbackService%></b></h2>', ' <h3 id="ct_eq_msg"><%=$.i18n.locale.LabelCallbackService%></h3>', " <fieldset>", " <ol>", " <li>", ' <label for="ct_eq_firstname"><span class=""><%=$.i18n.locale.info_firstNameLabel%>:<em>*</em></span></label>', ' <input id="ct_eq_firstname" class="ct_bg text-input extralarge" type="text" name="ct_eq_firstname"/>', " </li>", " <li>", ' <label for="ct_eq_lastname"><span class=""><%=$.i18n.locale.info_surnameLabel%>:<em>*</em></span></label>', ' <input id="ct_eq_lastname" class="ct_bg text-input extralarge" type="text" name="ct_eq_lastname"/>', " </li>", " <li>", ' <label for="ct_eq_email"><span class=""><%=$.i18n.locale.emailLabel%><em>*</em></span></label>', ' <input id="ct_eq_email" class="ct_bg text-input extralarge" type="text" name="ct_eq_email" size="50"/>', " </li>", " <li>", ' <label for="ct_eq_phonenumber"><span class=""><%=$.i18n.locale.phoneLabel%><em>*</em></span></label>', ' <select id="ct_eq_phonenumber_ind" name="ct_eq_phonenumber_ind" class="ct_bg select-input large">', " <% for (prop in countrylist) {%>", " <% if(prop === countryID) { %>", ' <option value="<%=countrylist[prop].diallingcode%>" selected="selected"><%=countrylist[prop].fullname%>&nbsp;(+<%=countrylist[prop].diallingcode%>)</option>', " <% } else { %>", ' <option value="<%=countrylist[prop].diallingcode%>"><%=countrylist[prop].fullname%>&nbsp;(+<%=countrylist[prop].diallingcode%>)</option>', " <% } %>", " <% } %>", " </select>", ' <input id="ct_eq_phonenumber" name="ct_eq_phonenumber" size="12" class="ct_bg text-input medium"/>', " </li>", " </ol>", " </fieldset>", " <h4><em>*</em> <%=$.i18n.locale.LabelMandatory%></h4>", " <div>", ' <div class="ct_eq_btn">', ' <p class="ct_eq_button butn_style"><a class="ct_bg blue" href="javascript:;" data-cta="custCallB" data-cta-value="send" id="ct_eq_send"><span class="ct_bg tl"></span><span class="ct_bg tr"><span class="waiting"></span></span></a></p>', " </div>", ' <div class="ct_eq_btn">', ' <p class="ct_eq_button butn_style"><a class="ct_bg blue" href="javascript:;" data-cta="custCallB" data-cta-value="noThanks" id="ct_eq_cancel"><span class="ct_bg tl"></span><span class="ct_bg tr"><%=$.i18n.locale.noThanksButton%></span></a></p>', " </div>", " </div>", " </form>", " </div>", " </div>", "</div>"]
};
this.options = {
debug: true,
baseClass: "ct-ui-base",
errorClass: "ct_eq_form_error",
cssclass: "ct_eq",
width: 325,
data: {}
};
$.extend(true, this.options, a);
this.request = new CT.ABE.Popup.CustomerCallback.Request(this.options)
};
CT.ABE.Popup.CustomerCallback.prototype = {
display: function (k, m, f) {
var b = this;
var l = false;
var i = "center";
var j = {};
if (!$(k).length) {
return
}
this.idAs = "callbackQuotePop";
j.country = abeSC.countryObj.main_Country_array[abeSC.options.residenceID].fullname;
j.countrylist = abeSC.countryObj.main_Country_array;
j.countryID = abeSC.options.residenceID;
j.dialingcode = abeSC.countryObj.main_Country_array[abeSC.options.residenceID].fullname + "(+" + abeSC.countryObj.main_Country_array[abeSC.options.residenceID].diallingcode + ")";
if (!$("#" + this.idAs).length) {
var g = CT.LIB.templateV2.tmpl(this.tpl.HTML_CustomerCallback.join(""), j, this);
$("body").append(g);
var e = $(k).parent().parent();
var h = $(e).offset().left;
var d = $(e).offset().top - $(window.self).scrollTop();
if (window.top !== window.self) {
l = true;
var c = $(window.self).width();
var n = h + this.options.width;
if (n > c) {
h = parseInt($(e).offset().left - this.options.width, 10)
}
}
$("#" + this.idAs).dialog({
closeOnEscape: true,
draggable: true,
resizable: false,
position: l ? [h, d] : "center",
width: b.options.width,
dialogClass: b.options.baseClass,
close: function (a) {
$(this).remove()
}
})
}
if (!m) {
b.eventSubmit()
} else {
b.oTimerActivate = setTimeout(function () {
b.activate()
}, (10 * 1000))
} if (typeof f !== "undefined") {
$("#ct_eq_email").val(f).parent().hide()
}
if (!$("#" + this.idAs).dialog("isOpen")) {
var g = CT.LIB.templateV2.tmpl(this.tpl.HTML_CustomerCallback.join(""), {}, this);
$("#idE").empty().html(g);
$("#" + this.idAs).dialog("open")
}
b.validateCustomerDetails();
$("#ct_eq_cancel").unbind("click").bind("click", function () {
$("#" + b.idAs).dialog("close")
})
},
activate: function (b) {
var a = this;
this.emailQuoteRef = b;
a.eventSubmit();
if (a.oTimerActivate) {
clearTimeout(a.oTimerActivate);
delete a.oTimerActivate
}
},
eventSubmit: function () {
$("#ct_eq_send").find("span:eq(1)").empty().html($.i18n.locale.callMeButton);
$("#ct_eq_send").unbind("click").bind("click", function () {
$("#ct_eq_form").submit()
})
},
validateCustomerDetails: function () {
var e = this;
var d = $("#ct_eq_form").validate({
debug: false,
submitHandler: function (a) {
e.send()
},
ignoreTitle: true,
rules: {
ct_eq_firstname: {
required: true,
minlength: 2
},
ct_eq_lastname: {
required: true,
minlength: 2
},
ct_eq_email: {
required: true,
email: true
},
ct_eq_phonenumber: {
required: true
}
},
messages: {
ct_eq_firstname: {
required: $.i18n.locale.EnterFirstNameMsg,
minlength: $.i18n.locale.ValidMsgFirstName2Char
},
ct_eq_lastname: {
required: $.i18n.locale.EnterSurnameMsg,
minlength: $.i18n.locale.ValidMsgSurname2Char
},
ct_eq_email: {
required: $.i18n.locale.EnterValidEmailMsg,
email: $.i18n.locale.EnterValidEmailMsg
},
ct_eq_phonenumber: {
required: $.i18n.locale.EnterPhoneMsg
}
},
errorClass: "ct_eq_form_error",
focusInvalid: true,
onkeyup: false,
onclick: function (a) {
if (this.checkable(a)) {
this.element(a)
}
},
invalidHandler: function (a, b) {
$(b.findLastActive() || b.errorList.length && b.errorList[0].element || []).filter(":visible").animate({
scrollTop: 0
}, "fast");
var c = $(b.findLastActive() || b.errorList.length && b.errorList[0].element || []).filter(":visible");
c.focus()
},
showErrors: function (b, a) {
this.defaultShowErrors()
},
errorPlacement: function (b, a) {
if (a.attr("type") === "checkbox") {
$("#ct_eq_custom_error").append(b)
} else {
b.insertAfter(a)
}
},
success: function (a) {
a.parent().removeClass("ct_s3_driver_details_form_error");
a.remove()
},
onfocusout: function (a) {
if (!this.checkable(a) && a.value.length > 0) {
this.element(a)
}
}
})
},
close: function (b) {
var a = this;
if (b) {
setTimeout(function () {
$("#" + a.idAs).dialog("close")
}, b)
} else {
$("#" + a.idAs).dialog("close")
}
},
send: function () {
var f = this,
d = new Date();
days = d.getUTCDay();
var e = {
Currency: abeSC.options.currency,
emailQuoteRef: this.emailQuoteRef || null,
firstname: $("#ct_eq_firstname").val() || "",
lastname: $("#ct_eq_lastname").val() || "",
email: $("#ct_eq_email").val() || "",
phonenumber: $("#ct_eq_phonenumber").val() || "",
phonenumber_dialling: $("#ct_eq_phonenumber_ind").val() || "",
days: days,
time: "08:00-19:00"
};
f.request.get({
requestInfo: e
}, {
success: function (a) {
if (CT.LIB.Object.isDefined(a.Success)) {
a.error = false
}
},
error: function (a) {
var b = CT.LIB.templateV2.tmpl(f.tpl.HTML_Error.join(""), {}, this);
$("#ct_eq_content").empty().html(b)
}
});
var c = CT.LIB.templateV2.tmpl(f.tpl.HTML_Success.join(""), {}, this);
$("#ct_eq_content").empty().html(c);
f.close(3000)
}
}
})(jQCT);
(function ($) {
namespace("CT.ABE.Popup.CustomerCallback.Request");
CT.ABE.Popup.CustomerCallback.Request = function (b) {
var a = {
debug: true
};
this.options = $.extend(true, a, b);
this._CustomerCallback_JSON = {
"@xmlns": "http://www.cartrawler.com/",
"@Version": "1.000",
"@Target": "",
"@PrimaryLangID": "",
POS: {
Source: []
},
Action: {}
};
return this
};
CT.ABE.Popup.CustomerCallback.Request.prototype = {
get: function (b, c) {
var d = this;
CT.LIB.Ajax.sendJsonp({
url: abeSC.getConfig().jsonURL,
data: {
type: "CT_CustomerCallbackRQ",
msg: JSON.stringify($.extend(true, {}, d._CustomerCallback_JSON, {
"@Target": abeSC.getConfig().target,
"@PrimaryLangID": abeSC.getConfig().language,
POS: {
Source: CT.LIB.Ajax.getPOS(abeSC.getConfig("OTA"))
},
Action: d.setAction(b)
}))
},
success: function (a) {
d.onSuccessRequest(a, c)
},
error: function (a) {
d.onErrorRequest(a, c)
}
})
},
onSuccessRequest: function (a, b) {
var c = this;
try {
if (a instanceof Array) {
a = a[0]
}
if (a.Success instanceof Array) {
if (typeof b.success === "function") {
b.success(a)
}
} else {
if (typeof a.Errors !== "undefined") {
if (typeof a.Errors.Error !== "undefined") {
if (a.Errors.Error["@Type"] === "1") {
if ($.isFunction(b.success)) {
b.success(a)
}
}
}
} else {
if ($.isFunction(b.error)) {
b.error(a)
}
}
}
} catch (e) {
try {
abeSC.errorReport("Javascript Exception: CT.ABE.Popup.Callback.Request: onSuccessRequest()", "0", "Error name: " + e.name + ". Error message: " + e.message)
} catch (e2) {}
}
},
onErrorRequest: function (a, b) {
var c = this;
if ($.isFunction(b.error)) {
b.error(a)
}
},
setAction: function (a) {
var b = {
"@Type": "CALLBACK_AJ",
PersonName: {
GivenName: a.requestInfo.firstname,
Surname: a.requestInfo.lastname,
Email: a.requestInfo.email
},
Telephone: {
"@PhoneTechType": "1",
"@CountryAccessCode": a.requestInfo.phonenumber_dialling,
"@PhoneNumber": a.requestInfo.phonenumber
},
Callback: {
"@days": a.requestInfo.days,
"@time": a.requestInfo.time
}
};
if (a.requestInfo.emailQuoteRef) {
b.EmailQuoteReference = {
"@ID": a.requestInfo.emailQuoteRef
}
}
return b
}
}
})(jQCT);
(function ($) {
namespace("CT.ABE.Popup.CustomerReviews");
CT.ABE.Popup.CustomerReviews = function (b) {
var a = {
debug: false,
opaque: false,
title: $.i18n.locale.ReviewsCaption,
width: 770,
height: 700,
baseClass: "ct-ui-base",
modal: false,
tpl: {
overallExperience: 0,
totalReviews: 0,
rating: {
5: {
name: "excellent",
label: "ReviewsRatingExcellent"
},
4: {
name: "vgood",
label: "ReviewsRatingVeryGood"
},
3: {
name: "good",
label: "ReviewsRatingGood"
},
2: {
name: "average",
label: "ReviewsRatingAverage"
},
1: {
name: "poor",
label: "ReviewsRatingPoor"
}
},
rateOption: {
car: {
rating: 0,
name: "ReviewsRateOptionCar"
},
location: {
rating: 0,
name: "ReviewsRateOptionLocation"
},
pickup: {
rating: 0,
name: "ReviewsRateOptionPickup"
},
dropoff: {
rating: 0,
name: "ReviewsRateOptionDropoff"
},
staff: {
rating: 0,
name: "ReviewsRateOptionStaff"
}
},
survey: {
price: {
percent: 0,
name: ""
},
vendor: {
percent: 0,
name: "******"
}
},
travelRating: {
excellent: {
rating: 5,
percent: 0,
name: "ReviewsRatingExcellent",
total: 0,
checked: true
},
vgood: {
rating: 4,
percent: 0,
name: "ReviewsRatingVeryGood",
total: 0,
checked: true
},
good: {
rating: 3,
percent: 0,
name: "ReviewsRatingGood",
total: 0,
checked: true
},
average: {
rating: 2,
percent: 0,
name: "ReviewsRatingAverage",
total: 0,
checked: true
},
poor: {
rating: 1,
percent: 0,
name: "ReviewsRatingPoor",
total: 0,
checked: true
}
},
tripType: {
all: {
percent: 0,
name: "ReviewsTripTypeAll",
total: 0,
checked: true
},
business: {
percent: 0,
name: "ReviewsTripTypeBusiness",
total: 0,
checked: false
},
family: {
percent: 0,
name: "ReviewsTripTypeFamily",
total: 0,
checked: false
},
friends: {
percent: 0,
name: "ReviewsTripTypeFriends",
total: 0,
checked: false
},
couples: {
percent: 0,
name: "ReviewsTripTypeCouples",
total: 0,
checked: false
}
},
reviews: []
}
};
this._JSON_MESSAGE = {
"@xmlns": "http://www.cartrawler.com/",
"@Version": "1.000",
"@Target": "",
"@PrimaryLangID": "",
POS: {
Source: []
},
Review: {}
};
this._DEFAULT_FILTER = {
travelRating: [],
tripType: []
};
this.options = $.extend(true, a, b);
this.currentFilter = $.extend(true, {}, self._DEFAULT_FILTER);
this.initEvents();
return this
};
CT.ABE.Popup.CustomerReviews.prototype = {
initEvents: function () {
var a = this;
try {
if (!a.options.opaque) {
$("a#ct_reviews_filter_reset").die().live("click", function () {
a.resetFilter()
});
$("a#ct_reviews_retry").die().live("click", function () {
$("div.ct-ui-reviews-message").remove();
a.get(a.options.searchData)
})
}
} catch (e) {
try {
abeSC.errorReport("Javascript Exception: CT.ABE.Popup.CustomerReviews: initEvents()", "0", "Error name: " + e.name + ". Error message: " + e.message)
} catch (e2) {}
}
},
display: function (j, i) {
var c = this;
var k = false;
var h = "center";
if (!$(j).length) {
return
}
this.elId = "ct_customer_reviews_popup";
this.elt = j;
$.extend(true, c.options, {
searchData: i
}, {
opaque: (i.vendor.length === 0 ? true : false)
});
if (!$("div#" + this.elId).length) {
$("body").append(CT.LIB.templateV2.tmpl(CT.ABE.Template.Auxiliary.HTML_CUSTOMER_REVIEWS_WRAPPER(), c.options.tpl, this));
var f = $(j).parent().parent();
var g = $(f).offset().left;
var e = $(f).offset().top - $(window.self).scrollTop();
if (window.top !== window.self) {
k = true;
var d = $(window.self).width();
var l = g + c.options.width;
if (l > d) {
g = parseInt($(f).offset().left - c.options.width, 10)
}
}
$("div#" + c.elId).dialog({
closeOnEscape: true,
draggable: true,
resizable: false,
position: k ? [g, e] : "center",
width: c.options.width,
height: (!c.options.opaque ? c.options.height : 270),
title: c.options.title,
dialogClass: c.options.baseClass,
modal: c.options.modal || false,
create: function (a, b) {
$("div#" + c.elId).html(CT.LIB.templateV2.tmpl(CT.ABE.Template.Auxiliary.HTML_CUSTOMER_REVIEWS(), $.extend(true, {}, c.options.tpl, {
opaque: c.options.opaque
}), c));
$("table.ct-ui-reviews-filter-list").find('input[type="checkbox"], input[type="radio"]').customInput()
},
close: function (a) {
$(this).remove()
}
})
}
if (!c.options.opaque) {
c.setFilter()
}
c.get(c.options.searchData)
},
get: function (d) {
var c = this;
try {
abeSC.tmplLayout.getExternalPane(("div#" + c.elId)).block("", function () {
CT.LIB.Ajax.sendJsonp({
url: abeSC.getConfig().jsonURL,
data: {
type: "CT_ReviewRQ",
msg: JSON.stringify($.extend(true, {}, c._JSON_MESSAGE, {
"@Target": abeSC.getConfig().target,
"@PrimaryLangID": abeSC.getConfig().language,
POS: {
Source: CT.LIB.Ajax.getPOS(abeSC.getConfig("OTA"))
},
Review: {
"@agent": d.agent,
"@location": d.location,
"@vendor": d.vendor
}
}))
},
success: function (a) {
if (a instanceof Array) {
a = a[0]
}
if (a.Success) {
var b = c.parse(a);
$("div#" + c.elId).html(CT.LIB.templateV2.tmpl(CT.ABE.Template.Auxiliary.HTML_CUSTOMER_REVIEWS(), $.extend(true, {}, c.options.tpl, {
opaque: c.options.opaque
}, b), c));
if (!c.options.opaque) {
c.filterEvents()
}
} else {
if (CT.LIB.Object.isDefined(a.Errors) || CT.LIB.Object.isDefined(a["@ErrorCode"])) {
$("div.ct-ui-reviews-comments").prepend(CT.LIB.templateV2.tmpl(CT.ABE.Template.Auxiliary.HTML_CUSTOMER_REVIEWS_ERROR_MESSAGE(), {}, c))
}
}
abeSC.tmplLayout.getExternalPane(("div#" + c.elId)).unblock()
},
error: function (a) {
throw new Error("Error retrieving Customer Reviews")
}
}, false)
}, $.noop(), true, 2000, {
top: "420px"
})
} catch (e) {
$("div.ct-ui-reviews-comments").prepend(CT.LIB.templateV2.tmpl(CT.ABE.Template.Auxiliary.HTML_CUSTOMER_REVIEWS_ERROR_MESSAGE(), {}, c));
abeSC.tmplLayout.getExternalPane(("div#" + c.elId)).unblock();
try {
abeSC.errorReport("Javascript Exception: CT.ABE.Popup.CustomerReviews: get()", "0", "Error name: " + e.name + ". Error message: " + e.message)
} catch (e2) {}
}
},
parse: function (i) {
var j = this,
data = $.extend(true, {}, j.options.tpl);
try {
if (CT.LIB.Object.isDefined(i.Reviews)) {
var k = {
langageUsed: abeSC.options.language.toLowerCase(),
myFormat: abeSC.options.extensions.dateFormat,
myDateFormat: abeSC.getDateFormat(),
myDateFormatLocalise: $.i18n.locale.DateFormat,
myDateFormatOption: abeSC.options.extensions.dateFormatOption,
myDateShort: true
};
var l = function (g) {
var h = {};
CT.LIB.Object.each(g, function (f, d) {
switch (CT.LIB.Object.typeOf(d)) {
case "string":
switch (f) {
case "@overall":
h.rating = Math.floor(parseFloat(d) * 2);
break;
case "@date":
var e = d.replace(/[zZ]$/, "").replace(/[tT]/g, " ").split(/[- :]/);
var c = {
day: Number(e[2]),
month: Number(e[1] - 1),
year: Number(e[0]),
hour: Number(e[3]),
min: Number(e[4]),
jsDate: new Date(e[0], e[1] - 1, e[2], e[3], e[4])
};
h.date = $.datepicker.generateSmallTranslatedDate(c.jsDate, k);
break;
case "@trip":
h.tripType = d.toLowerCase();
break;
case "@country":
h.location = d.toLowerCase();
break;
default:
break
}
break;
case "array":
switch (f) {
case "Author":
CT.LIB.Object.each(d, function (a, b) {
switch (a) {
case "0":
h.author = b;
break;
case "1":
h.comment = b;
break;
default:
break
}
});
break;
default:
break
}
break
}
});
return h
};
CT.LIB.Object.each(i.Reviews, function (c, d) {
switch (CT.LIB.Object.typeOf(d)) {
case "string":
switch (c) {
case "@overall":
data.overallExperience = Math.round(parseFloat(d) * 2);
break;
case "@total":
data.totalReviews = parseInt(d, 10);
break;
case "@car":
data.rateOption.car.rating = Math.round(parseFloat(d) * 2);
break;
case "@location":
data.rateOption.location.rating = Math.round(parseFloat(d) * 2);
break;
case "@pickup":
data.rateOption.pickup.rating = Math.round(parseFloat(d) * 2);
break;
case "@dropoff":
data.rateOption.dropoff.rating = Math.round(parseFloat(d) * 2);
break;
case "@staff":
data.rateOption.staff.rating = Math.round(parseFloat(d) * 2);
break;
case "@pricehappy":
data.survey.price.percent = Math.round(parseFloat(d));
break;
case "@bookagain":
data.survey.vendor.percent = Math.round(parseFloat(d));
break;
case "@name":
data.survey.vendor.name = d;
break;
case "@excellent":
if (CT.LIB.Object.isDefined(data.totalReviews)) {
data.travelRating.excellent.percent = (parseFloat(d) * 100 / data.totalReviews)
}
data.travelRating.excellent.total = parseInt(d, 10);
break;
case "@vgood":
if (CT.LIB.Object.isDefined(data.totalReviews)) {
data.travelRating.vgood.percent = (parseFloat(d) * 100 / data.totalReviews)
}
data.travelRating.vgood.total = parseInt(d, 10);
break;
case "@good":
if (CT.LIB.Object.isDefined(data.totalReviews)) {
data.travelRating.good.percent = (parseFloat(d) * 100 / data.totalReviews)
}
data.travelRating.good.total = parseInt(d, 10);
break;
case "@average":
if (CT.LIB.Object.isDefined(data.totalReviews)) {
data.travelRating.average.percent = (parseFloat(d) * 100 / data.totalReviews)
}
data.travelRating.average.total = parseInt(d, 10);
break;
case "@poor":
if (CT.LIB.Object.isDefined(data.totalReviews)) {
data.travelRating.poor.percent = (parseFloat(d) * 100 / data.totalReviews)
}
data.travelRating.poor.total = parseInt(d, 10);
break;
case "@business":
data.tripType.business.total = parseInt(d, 10);
break;
case "@family":
data.tripType.family.total = parseInt(d, 10);
break;
case "@friends":
data.tripType.friends.total = parseInt(d, 10);
break;
case "@couples":
data.tripType.couples.total = parseInt(d, 10);
break;
case "@all":
data.tripType.all.total = parseInt(d, 10);
break;
default:
break
}
break;
case "object":
switch (c) {
case "Review":
data.reviews.push(l(d));
break
}
break;
case "array":
switch (c) {
case "Review":
CT.LIB.Object.each(d, function (a, b) {
switch (CT.LIB.Object.typeOf(b)) {
case "object":
data.reviews.push(l(b));
default:
break
}
});
break
}
default:
break
}
})
}
} catch (e) {
try {
abeSC.errorReport("Javascript Exception: CT.ABE.Popup.CustomerReviews: parse()", "0", "Error name: " + e.name + ". Error message: " + e.message)
} catch (e2) {}
}
return data
},
setFilter: function () {
var f = this;
try {
f.currentFilter = $.extend(true, {}, f._DEFAULT_FILTER);
CT.LIB.Object.each(f.options.tpl, function (c, d) {
if (typeof d === "object" && (c === "travelRating" || c === "tripType")) {
CT.LIB.Object.each(d, function (b, a) {
f.currentFilter[c].push({
name: c,
value: b,
label: $.i18n.locale[a.name],
checked: a.checked
});
$("input#ct-ui-reviews-" + c + "-" + b).prop("checked", a.checked)
})
}
})
} catch (e) {
try {
abeSC.errorReport("Javascript Exception: CT.ABE.Popup.CustomerReviews: setFilter()", "0", "Error name: " + e.name + ". Error message: " + e.message)
} catch (e2) {}
}
},
filterEvents: function () {
var i = this;
try {
$("table.ct-ui-reviews-filter-list").find('input[type="checkbox"], input[type="radio"]').customInput();
CT.LIB.Object.each(i._DEFAULT_FILTER, function (g, h) {
$("table.ct-ui-reviews-filter-list").find('[filterby="' + g + '"]').each(function (f) {
$(this).change(function (e) {
if (g === "tripType") {
var d = $(this);
CT.LIB.Object.each(i.currentFilter[g], function (c, a, b) {
b[c].checked = (d.attr("value") === a.value) ? true : false
})
}
i.applyFilter({
name: $(this).attr("filterby"),
value: $(this).attr("value"),
checked: $(this).prop("checked")
})
})
})
})
} catch (e) {
try {
abeSC.errorReport("Javascript Exception: CT.ABE.Popup.CustomerReviews: initEvents()", "0", "Error name: " + e.name + ". Error message: " + e.message)
} catch (e2) {}
}
},
applyFilter: function (l) {
var k = this;
var j = "";
var i = false;
try {
if (CT.LIB.Object.isDefined(l)) {
var h = [];
if (!CT.LIB.Object.isArray(l)) {
h.push(l)
} else {
h = l
}
CT.LIB.Array.each(h, function (d, e) {
if (CT.LIB.Object.isDefined(d) && !CT.LIB.Object.isEmptyObject(d)) {
if (CT.LIB.Object.isDefined(k.currentFilter[d.name]) && typeof k.currentFilter[d.name] === "object") {
CT.LIB.Array.each(k.currentFilter[d.name], function (a, c, b) {
if (a.value === d.value) {
b[c].checked = d.checked;
checked = d.checked;
return false
}
})
}
}
})
}
$("div.ct-ui-reviews-comments").find("li").each(function (g) {
var f = $(this),
i = false;
CT.LIB.Object.each(k.currentFilter, function (d, e) {
if (typeof e === "object") {
CT.LIB.Array.each(e, function (a, c, b) {
if (!i) {
if (a.name === "travelRating") {
if ($(f).data("travelRating") === a.value && !a.checked) {
$(f).css("display", "none");
i = true
}
}
if (a.name === "tripType") {
if (b[0].checked === false && $(f).data("tripType") === a.value && !a.checked) {
$(f).css("display", "none");
i = true
}
}
}
});
if (!i) {
$(f).css("display", "")
}
}
})
});
$("div.ct-ui-reviews-message").remove();
if ($("div.ct-ui-reviews-comments").find("li:visible").length === 0) {
$("div.ct-ui-reviews-comments").prepend(CT.LIB.templateV2.tmpl(CT.ABE.Template.Auxiliary.HTML_CUSTOMER_REVIEWS_FILTER_MESSAGE(), {
totalComments: $("div.ct-ui-reviews-comments").find("li").length
}, k))
}
} catch (e) {
try {
abeSC.errorReport("Javascript Exception: CT.ABE.Popup.CustomerReviews: applyFilter()", "0", "Error name: " + e.name + ". Error message: " + e.message)
} catch (e2) {}
}
},
resetFilter: function (a) {
var b = this;
try {
b.setFilter();
b.applyFilter()
} catch (e) {
try {
abeSC.errorReport("Javascript Exception: CT.ABE.Popup.CustomerReviews: resetFilter()", "0", "Error name: " + e.name + ". Error message: " + e.message)
} catch (e2) {}
}
}
}
})(jQCT);
(function ($) {
namespace("CT.ABE.Popup.availabilityTimedOut");
CT.ABE.Popup.availabilityTimedOut = function () {};
CT.ABE.Popup.availabilityTimedOut.prototype = {
display: function () {
var a = CT.ABE.Template.Auxiliary.HTML_AVAILABILITY_TIMEOUT_MESSAGE();
var b = 920,
left;
if ($(window).width() > b) {
left = (($(window).width() - b) / 2) + "px";
b = b + "px"
} else {
b = "90%";
left = "5%"
}
$.blockUI({
message: a,
blockMsgClass: "ct-ui-base",
allowBodyStretch: true,
css: {
width: b,
height: "auto",
left: left,
top: "40px",
border: "none",
overflow: "visible",
cursor: "auto",
position: "absolute"
},
overlayCSS: {
cursor: "pointer"
},
fadeIn: 0,
fadeOut: 0,
onBlock: function () {
$(document).scrollTop(0);
$("#ct_availabilityTimedOut .ct-ui-button").click(function () {
$.publish("/bookingSummary/availability/start", [abeSC.options.requestData]);
$.unblockUI()
})
},
onUnblock: function () {
$(document).scrollTop(self.originalBodyScrollPosition);
$("#ct_availabilityTimedOut").remove()
}
})
}
}
})(jQCT);
(function ($) {
namespace("CT.ABE.Popup.RentalCondition");
CT.ABE.Popup.RentalCondition = function (a) {
this.tpl = {
HTML_Loading: ['<div id="<%=t.idAs%>" title="<%=t.oP.title%>">', ' <div id="<%=t.idAs%>_loading" class="moduleContentMainLoading">', ' <img src="https://cdn.cartrawler.com/templates/popup/images/big-ajax-loader.gif" width="66" height="66" alt="Loading">', ' <div class="moduleContentMainLoadingMsg"><%=t.oP.l18n.LoadingRateDetails%></div>', " </div>", "</div>"],
HTML_Error: ['<div id="<%=t.idAs%>_error" class="moduleContentMainLoading">', ' <img src="https://cdn.cartrawler.com/templates/popup/images/error.png" width="48" height="48" alt="Loading">', ' <div class="moduleContentMainLoadingMsg">The requested content cannot be loaded.<br />Please try again later.</div>', "</div>"],
HTML_NoContent: ['<div id="<%=t.idAs%>_error" class="moduleContentMainLoading">', ' <img src="https://cdn.cartrawler.com/templates/popup/images/warning.png" width="48" height="48" alt="Loading">', ' <div class="moduleContentMainLoadingMsg">Sorry, no rental conditions details about that car.<br />Please try again later.</div>', "</div>"],
HTML_ExpiredQuote: ['<div id="<%=t.idAs%>_error" class="moduleContentMainLoading">', ' <img src="https://cdn.cartrawler.com/templates/popup/images/warning.png" width="48" height="48" alt="Loading">', ' <div class="moduleContentMainLoadingMsg"><%=t.oP.l18n.ReservationQuoteExpiredMsg%></div>', "</div>"],
HTML_Conditions: ['<div class="rental" id="ct-rental-<%=id%>">', ' <div class="ct-rental-frame" id="ct-rental-<%=id%>-frame">', ' <div class="ct-rental" id="ct-rental-<%=id%>-pane">', ' <h2 class="printme"><%=t.oP.title%></h2>', ' <div class="ct-rental-top" id="ct-rental-<%=id%>-top"><%=top%></div>', ' <div class="ct-rental-header" id="ct-rental-<%=id%>-header"><%=header%></div>', ' <div class="ct-rental-conditions" id="ct-rental-<%=id%>-cond" style="height: 200px">', " <% for (var i = 0; i < RentalConditions.length; i++) { %>", " <% if ( i == 0 ) { %>", ' <dl style="padding:0px;margin:0px;">', " <% } else { %>", " <dl>", " <% } %>", " <% if ( i == 0 ) { %>", ' <dt style="padding:0px 10px 0px 0px;">', " <% } else { %>", " <dt>", " <% } %>", ' <%=RentalConditions[i]["@Title"]%>', " </dt>", " <dd>", " <% if (RentalConditions[i].Paragraph) { %>", " <% if (CT.LIB.Object.isArray(RentalConditions[i].Paragraph)) { %>", " <% for (var j = 0; j < RentalConditions[i].Paragraph.length; j++) { %>", " <% var paragraphe = RentalConditions[i].Paragraph[j]; %>", ' <% paragraphe = CT.LIB.StringV2.replaceSubstring(paragraphe, "&", "&amp;", false); %>', ' <% paragraphe = CT.LIB.StringV2.replaceSubstring(paragraphe, "|u|", "<u>", false); %>', ' <% paragraphe = CT.LIB.StringV2.replaceSubstring(paragraphe, "|/u|", "</u>", false); %>', ' <% paragraphe = CT.LIB.StringV2.replaceSubstring(paragraphe, "|b|", "<b>", false); %>', ' <% paragraphe = CT.LIB.StringV2.replaceSubstring(paragraphe, "|/b|", "</b>", false); %>', ' <% paragraphe = CT.LIB.StringV2.replaceSubstring(paragraphe, "|br|", "<br/>", false); %>', " <p><%=paragraphe%></p>", " <% } %>", " <% } else { %>", " <% var paragraphe = RentalConditions[i].Paragraph; %>", ' <% paragraphe = CT.LIB.StringV2.replaceSubstring(paragraphe, "&", "&amp;", false); %>', ' <% paragraphe = CT.LIB.StringV2.replaceSubstring(paragraphe, "|u|", "<u>", false); %>', ' <% paragraphe = CT.LIB.StringV2.replaceSubstring(paragraphe, "|/u|", "</u>", false); %>', ' <% paragraphe = CT.LIB.StringV2.replaceSubstring(paragraphe, "|b|", "<b>", false); %>', ' <% paragraphe = CT.LIB.StringV2.replaceSubstring(paragraphe, "|/b|", "</b>", false); %>', ' <% paragraphe = CT.LIB.StringV2.replaceSubstring(paragraphe, "|br|", "<br/>", false); %>', " <p><%=paragraphe%></p>", " <% } %>", " <% } %>", " </dl>", " <% } %>", " </div>", " </div>", ' <% if (languageID == "EN") { %>', ' <div class="ct-glossary" id="ct-glossary-<%=id%>-pane">', ' <iframe class="ct-glossary_iframe" src="https://www.cartrawler.com/common/abe/glossary_content.html"></iframe>', " </div>", " <% } %>", " </div>", ' <% if (languageID == "EN") { %>', ' <div class="ModuleRentalConditionsGlossary">', ' <div class="ModuleRentalConditionsGlossaryP">', ' <a id="ct-glossary-on-<%=id%>" class="ModuleRentalConditionsGlossaryA" style="cursor: pointer;">', ' <span id="ct-glossary-link-<%=id%>" data-cta-value="Glossary"><%=t.oP.l18n.glossaryLink%></span>', " </a>", " </div>", " </div>", " <% } %>", "</div>"],
HTML_Top: ['<table width="100%" cellspacing="0" cellpadding="0" class="ct-rental-conditions-top">', " <tbody>", " <tr>", ' <td class="">', ' <div class="ct-rental-top-carname">', " <span><%=car_name%></span>", " </div>", ' <div class="ct-rental-top-print">', ' <a id="ct-print-on-<%=id%>">', " <span><%=t.oP.l18n.printLabel%></span>", " </a>", " </div>", " </td>", " </tr>", " <tr>", ' <td class="">', " <div>", ' <span class="ct-rental-top-carprice"><%=car_price%></span> <span class="ct-rental-top-duration"><%=duration%></span>', " </div>", " </td>", " </tr>", " </tbody>", "</table>"]
};
var k;
var c = {};
var b = {
debug: true,
width: 400,
l18n: {
LoadingRateDetails: "Loading rate details",
ExpiredReservationQuote: "Expired Reservation Quote",
ForNumberOfDays: "for",
For3Days: "for 3 days",
perday: "per day",
day: "day",
days: "days",
total: "Total",
included: "Included",
includedInPrice: "Included in price",
includedInTotalPrice: "Included in total price",
notIncludedInTotalPrice: "Not included in total price",
glossaryLink: "Glossary Of Terms",
glossaryBack: "Back to Rate details",
printLabel: "Print"
}
};
this.oP = b;
this.requestData = {};
for (k in a) {
if (this.oP[k] != a[k]) {
if (k == "l18n") {
for (l in a[k]) {
if (this.oP[k][l] != a[k][l] && a[k][l]) {
this.oP[k][l] = a[k][l]
}
}
} else {
this.oP[k] = a[k]
}
}
}
this.request = new CT.ABE.Popup.RentalCondition.Request(this.options)
};
CT.ABE.Popup.RentalCondition.prototype = {
display: function (B, v, G, F, w, L, t, I, D, z) {
var J = this;
J.idAs = B;
J.requestData = z;
if ($("#" + this.idAs).length == 0) {
var H = CT.LIB.templateV2.tmpl(this.tpl.HTML_Loading.join(""), G, this);
$("body").append(H);
var r = false;
var y = "center";
var u = $(v).parent().parent().parent();
var K = $(u).offset().left;
var A = $(u).offset().top - $(window.self).scrollTop();
if (window.top !== window.self) {
r = true;
var E = $(window.self).width();
var C = K + this.oP.width;
if (C > E) {
K = parseInt($(u).offset().left - this.oP.width, 10)
}
}
$("#" + this.idAs).dialog({
closeOnEscape: true,
draggable: true,
resizable: false,
position: r ? [K, A] : "center",
width: J.oP.width,
dialogClass: "ct-ui-base",
close: function (a) {
$(this).remove()
}
});
var M = F.data.locations[0].code;
var x = F.data.locations[0].code;
if (F.data.locations.length === 2) {
x = F.data.locations[1].code
}
var s = {
id: B,
availability: G,
name: G.data.vehicle.name,
vendor: F,
commonList: L,
currency: J.requestData.data.currency,
All: "All",
pickupDateTime: J.requestData.getOTAPickupDateTime(),
returnDateTime: J.requestData.getOTADropoffDateTime(),
pickupLocationCode: M,
returnLocationCode: x,
duration: G.data.extensions.duration,
displayTotalPerDay: I,
emailType: "2",
addressType: "2",
countryName: t,
reference: G.data.reference,
title: "",
givenName: "",
surName: ""
};
J.request.get({
rentalConditions: s
}, {
success: function (n) {
if (CT.LIB.Object.isDefined(n.Success)) {
n.error = false;
n.rateConditionsType = "DB";
if (CT.LIB.Object.isDefined(n.Type)) {
n.rateConditionsType = n.Type
}
var l = new CT.ABE.Utils.RentalCondition({
debug: J.oP.debug,
l18n: {
ForNumberOfDays: J.oP.l18n.ForNumberOfDays,
For3Days: J.oP.l18n.For3Days,
perday: J.oP.l18n.perday,
days: J.oP.l18n.days,
day: J.oP.l18n.day,
total: J.oP.l18n.total,
included: J.oP.l18n.included,
includedInPrice: J.oP.l18n.includedInPrice,
includedInTotalPrice: J.oP.l18n.includedInTotalPrice,
notIncludedInTotalPrice: J.oP.l18n.notIncludedInTotalPrice
}
});
var m = l.getRC(s);
var g = l.getRC_html(m);
var k;
var p;
if (s.displayTotalPerDay == true) {
var b = s.availability.data.fees.getPayDaily();
if (typeof (b) === undefined) {
var q = new Number(s.availability.data.rates.extimatedTotal) / s.duration;
k = abeSC.currencyObj.formatCurrency(q, {
region: abeSC.region,
currency: s.currency,
displayLabel: false
})
} else {
k = abeSC.currencyObj.formatCurrency(b.amount, {
region: abeSC.region,
currency: s.currency,
displayLabel: false
})
}
p = J.oP.l18n.perday
} else {
k = abeSC.currencyObj.formatCurrency(s.availability.data.rates.estimatedTotal, {
region: abeSC.region,
currency: s.currency,
displayLabel: false
});
p = s.duration == 1 ? " " + J.oP.l18n.ForNumberOfDays + " " + s.duration + " " + J.oP.l18n.day : J.oP.l18n.For3Days.replace(/3/g, s.duration)
}
var f = {
car_name: s.name,
car_price: k,
currency: abeSC.options.currency,
duration: p,
id: s.id
};
n.top = CT.LIB.templateV2.tmpl(J.tpl.HTML_Top.join(""), f, J);
n.languageID = D;
n.header = g;
n.id = s.id;
if (CT.LIB.Object.isDefined(n.RentalConditions.SubSection)) {
if (CT.LIB.Object.isDefined(n.RentalConditions.SubSection.Paragraph)) {
var c = undefined;
if (CT.LIB.Object.isDefined(n.RentalConditions.SubSection["@Title"])) {
c = n.RentalConditions.SubSection["@Title"]
}
var d = n.RentalConditions.SubSection.Paragraph;
n.RentalConditions = [];
n.RentalConditions.push({
Paragraph: d
});
if (CT.LIB.Object.isDefined(c)) {
n.RentalConditions[0]["@Title"] = c
}
}
}
var j = CT.LIB.templateV2.tmpl(J.tpl.HTML_Conditions.join(""), n, J);
if ($.browser.msie && $.browser.version < 7) {
$("#" + J.idAs + "_loading").parent().height("auto")
}
$("#" + J.idAs + "_loading").replaceWith(j);
var o = $("#ct-rental-" + J.idAs + "-header").innerHeight();
if (abeSC.getCustomEngine() == "DTAG") {
$(".ct-rental-header").css({
display: "none"
});
o = 0
}
var e = $(".ModuleRentalConditionsGlossary").innerHeight();
if (n.rateConditionsType != "DB") {
$(".ModuleRentalConditionsGlossaryP").css({
display: "none"
})
}
var h = $("#ct-rental-" + J.idAs + "-frame").outerHeight(true) - $("#ct-rental-" + J.idAs + "-top").outerHeight(true) - $("#ct-rental-" + J.idAs + "-header").outerHeight(true) - $(".ModuleRentalConditionsGlossary").outerHeight(true);
$("#ct-rental-" + J.idAs + "-cond").height(h);
if (D == "EN") {
$("#ct-glossary-on-" + J.idAs).click(function () {
var a = $(this)[0].id.split("-");
$("#ct-rental-" + a[3] + "-pane").slideToggle("slow", function () {
$("#ct-glossary-" + a[3] + "-pane").slideToggle("fast", function () {
if ($("#ct-rental-" + a[3] + "-pane").is(":visible")) {
$("#ct-glossary-link-" + a[3]).html(J.oP.l18n.glossaryLink)
} else {
$("#ct-glossary-link-" + a[3]).html(J.oP.l18n.glossaryBack)
}
})
})
})
} else {
var h = $("#ct-rental-" + J.idAs).height();
$("#ct-rental-" + J.idAs + "-frame").height(h)
}
$("#ct-print-on-" + J.idAs).click(function () {
var a = new CT.ABE.Utils.Print({
id: J.idAs,
debug: false,
operaSupport: true,
importCSS: false,
printContainer: true,
title: "Car Rental - Rate Details"
});
a.print("#ct-rental-" + J.idAs + "-pane")
})
} else {
var i = n.Errors.Error["@Type"];
var j = "";
if (i == "97") {
j = CT.LIB.templateV2.tmpl(J.tpl.HTML_ExpiredQuote.join(""), n, J)
} else {
j = CT.LIB.templateV2.tmpl(J.tpl.HTML_NoContent.join(""), n, J)
} if ($.browser.msie && $.browser.version < 7) {
$("#" + J.idAs + "_loading").parent().height("auto")
}
$("#" + J.idAs + "_loading").replaceWith(j)
}
},
error: function (a) {
var b = CT.LIB.templateV2.tmpl(J.tpl.HTML_Error.join(""), data, J);
if ($.browser.msie && $.browser.version < 7) {
$("#" + J.idAs + "_loading").parent().height("auto")
}
$("#" + J.idAs + "_loading").replaceWith(b)
}
});
abeSC.abeEvents.rateDetails(s)
}
}
}
})(jQCT);
(function ($) {
namespace("CT.ABE.Popup.RentalCondition.Request");
CT.ABE.Popup.RentalCondition.Request = function (b) {
var a = {
debug: true
};
this.options = $.extend(true, a, b);
this._RentalCondition_JSON = {
"@xmlns": "http://www.opentravel.org/OTA/2003/05",
"@Version": "1.000",
"@Target": "",
"@PrimaryLangID": "",
POS: {
Source: []
},
VehResRQCore: {},
VehResRQInfo: {}
};
return this
};
CT.ABE.Popup.RentalCondition.Request.prototype = {
get: function (b, c) {
var d = this;
$.extend(true, d.options.OTA, {
clientID: abeSC.options.clientID,
currencyID: abeSC.options.currency,
proxy: abeSC.options.proxyURL,
target: abeSC.options.target,
langID: abeSC.options.language,
reqID: abeSC.options.clientID,
clientType: abeSC.options.clientType,
engineLoadID: abeSC.options.engineLoadID,
uniqueID: abeSC.options.uniqueID,
xmlns: "http://www.opentravel.org/OTA/2003/05"
});
CT.LIB.Ajax.sendJson({
url: abeSC.getConfig().proxyURL,
xhr: CT.LIB.Ajax.getXHR(),
data: {
type: "CT_RentalConditionsRQ",
msg: JSON.stringify($.extend(true, {}, d._RentalCondition_JSON, {
"@Target": abeSC.getConfig().target,
"@PrimaryLangID": abeSC.getConfig().language,
POS: {
Source: CT.LIB.Ajax.getPOS(abeSC.getConfig("OTA"))
},
VehResRQCore: d.setVehResRQCore(b),
VehResRQInfo: d.setVehResRQInfo(b)
}))
},
success: function (a) {
d.onSuccessRequest(a, c)
},
error: function (a) {
d.onErrorRequest(a, c)
}
})
},
onSuccessRequest: function (a, b) {
var c = this;
try {
if (a.Success instanceof Array) {
if (typeof b.success === "function") {
b.success(a)
}
} else {
if (typeof a.Errors !== "undefined") {
if (typeof a.Errors.Error !== "undefined") {
if ($.isFunction(b.success)) {
b.success(a)
}
}
} else {
if ($.isFunction(b.error)) {
b.error(a)
}
}
}
} catch (e) {
try {
abeSC.errorReport("Javascript Exception: CT.ABE.Popup.RentalCondition.Request: onSuccessRequest()", "0", "Error name: " + e.name + ". Error message: " + e.message)
} catch (e2) {}
}
},
onErrorRequest: function (a, b) {
var c = this;
if ($.isFunction(b.error)) {
b.error(a)
}
},
setVehResRQCore: function (a) {
var b = {
"@Status": "ALL",
VehRentalCore: {
"@PickUpDateTime": a.rentalConditions.pickupDateTime,
"@ReturnDateTime": a.rentalConditions.returnDateTime,
PickUpLocation: {
"@CodeContext": "CARTRAWLER",
"@LocationCode": a.rentalConditions.pickupLocationCode
},
ReturnLocation: {
"@CodeContext": "CARTRAWLER",
"@LocationCode": a.rentalConditions.returnLocationCode
}
},
Customer: {
Primary: {
PersonName: {
NamePrefix: a.rentalConditions.title,
GivenName: a.rentalConditions.givenName,
Surname: a.rentalConditions.surName
},
Email: {
"@EmailType": a.rentalConditions.emailType
},
Address: {
"@Type": a.rentalConditions.addressType,
AddressLine: {},
CountryName: {
"@Code": a.rentalConditions.countryName
}
},
CitizenCountryName: {
"@Code": a.rentalConditions.countryName
}
}
}
};
return b
},
setVehResRQInfo: function (a) {
var c = this;
var b = {
Reference: {
"@Type": a.rentalConditions.reference.type,
"@ID": a.rentalConditions.reference.id,
"@ID_Context": a.rentalConditions.reference.idContext,
"@DateTime": a.rentalConditions.reference.datetime,
"@URL": a.rentalConditions.reference.url
}
};
return b
}
}
})(jQCT);
(function ($) {
namespace("CT.ABE.Popup.RentalConditionv3_2");
CT.ABE.Popup.RentalConditionv3_2 = function (a) {
this.tpl = {
HTML_Loading: ['<div id="<%=t.idAs%>">', ' <div id="<%=t.idAs%>_loading" class="moduleContentMainLoading">', ' <img src="https://cdn.cartrawler.com/templates/popup/images/big-ajax-loader.gif" width="66" height="66" alt="Loading">', ' <div class="moduleContentMainLoadingMsg"><%=t.oP.l18n.LoadingRateDetails%></div>', " </div>", "</div>"],
HTML_Error: ['<div id="<%=t.idAs%>_error" class="moduleContentMainLoading">', ' <img src="https://cdn.cartrawler.com/templates/popup/images/error.png" width="48" height="48" alt="Loading">', ' <div class="moduleContentMainLoadingMsg">The requested content cannot be loaded.<br />Please try again later.</div>', "</div>"],
HTML_NoContent: ['<div id="<%=t.idAs%>_error" class="moduleContentMainLoading">', ' <img src="https://cdn.cartrawler.com/templates/popup/images/warning.png" width="48" height="48" alt="Loading">', ' <div class="moduleContentMainLoadingMsg">Sorry, no rental conditions details about that car.<br />Please try again later.</div>', "</div>"],
HTML_ExpiredQuote: ['<div id="<%=t.idAs%>_error" class="moduleContentMainLoading">', ' <img src="https://cdn.cartrawler.com/templates/popup/images/warning.png" width="48" height="48" alt="Loading">', ' <div class="moduleContentMainLoadingMsg"><%=t.oP.l18n.ExpiredReservationQuote%></div>', "</div>"],
HTML_Conditions: ['<div class="ct-rental-top" id="ct-rental-<%=id%>-top"><%=top%></div>', '<div class="ct-rental-header" id="ct-rental-<%=id%>-header"></div>', '<ul class="ct-ui-conditions-blocks">', "<% for (var i = 0; i < RentalConditions.length; i++) { %>", "<li>", '<h2><%=RentalConditions[i]["@Title"]%></h2>', "<% if (RentalConditions[i].Paragraph) { %>", "<% if (CT.LIB.Object.isArray(RentalConditions[i].Paragraph)) { %>", "<% for (var j = 0; j < RentalConditions[i].Paragraph.length; j++) { %>", "<% var paragraphe = RentalConditions[i].Paragraph[j]; %>", '<% paragraphe = CT.LIB.StringV2.replaceSubstring(paragraphe, "&", "&amp;", false); %>', '<% paragraphe = CT.LIB.StringV2.replaceSubstring(paragraphe, "|u|", "<u>", false); %>', '<% paragraphe = CT.LIB.StringV2.replaceSubstring(paragraphe, "|/u|", "</u>", false); %>', '<% paragraphe = CT.LIB.StringV2.replaceSubstring(paragraphe, "|b|", "<b>", false); %>', '<% paragraphe = CT.LIB.StringV2.replaceSubstring(paragraphe, "|/b|", "</b>", false); %>', '<% paragraphe = CT.LIB.StringV2.replaceSubstring(paragraphe, "|br|", "<br/>", false); %>', "<p><%=paragraphe%></p>", "<% } %>", "<% } else { %>", "<% var paragraphe = RentalConditions[i].Paragraph; %>", '<% paragraphe = CT.LIB.StringV2.replaceSubstring(paragraphe, "&", "&amp;", false); %>', '<% paragraphe = CT.LIB.StringV2.replaceSubstring(paragraphe, "|u|", "<u>", false); %>', '<% paragraphe = CT.LIB.StringV2.replaceSubstring(paragraphe, "|/u|", "</u>", false); %>', '<% paragraphe = CT.LIB.StringV2.replaceSubstring(paragraphe, "|b|", "<b>", false); %>', '<% paragraphe = CT.LIB.StringV2.replaceSubstring(paragraphe, "|/b|", "</b>", false); %>', '<% paragraphe = CT.LIB.StringV2.replaceSubstring(paragraphe, "|br|", "<br/>", false); %>', "<p><%=paragraphe%></p>", "<% } %>", "<% } %>", "</li>", "<% } %>", "</ul>", '<a class="ct-popup-close-top ct-ui-s-background-color"><span class="icon-ct-cancel"></span></a>'],
HTML_Top: ["<h1><%=$.i18n.locale.RentalConditionsLabel%></h1>", '<div class="ct-grid">', ' <div class="ct-grid-unit-1-2">', ' <h1 class="ct-ui-price"><%=totalCharge%><small><%=durationString%></small></h1>', " <%=includedInRate%>", " </div>", ' <div class="ct-grid-unit-1-2">', ' <h1 class="ct-ui-car-model">', " <%=car_model%>", ' <% if ( modelGuaranteed == "false" ) { %>', " <small><%=orSimilar%></small>", " <% } %>", " </h1>", ' <img src="<%=car_image%>">', ' <div class="ct-grid">', ' <div class="ct-grid-unit-1-4">', ' <div class="ct-extras-icons">', "<% if (vehicle.equipment.passengerNum) { %>", '<div class="ct-ui-extra-small ct-ui-p-border-color">', '<span class="icon-ct-passenger-quantity"></span>', "</div>", "<h3><%=vehicle.equipment.passengerNum%></h3>", "<% } %>", "<% if (vehicle.equipment.baggageNum) { %>", '<div class="ct-ui-extra-small ct-ui-p-border-color">', '<span class="icon-ct-baggage-quantity "></span>', "</div>", "<h3><%=vehicle.equipment.baggageNum%></h3>", "<% } %>", "<% if (vehicle.equipment.doorsNum) { %>", '<div class="ct-ui-extra-small ct-ui-p-border-color">', '<span class="icon-ct-doors-quantity"></span>', "</div>", "<h3><%=vehicle.equipment.doorsNum%></h3>", "<% } %>", "<% if (vehicle.equipment.aircon) { %>", '<div class="ct-ui-extra-small ct-ui-p-border-color">', '<span class="icon-ct-air-conditioning"></span>', "</div>", "<h3>AC</h3>", "<% } %>", " </div>", " </div>", ' <div class="ct-grid-unit-3-4">', ' <div class="ct-extras-icons">', "<% if (vehicle.equipment.transmission) { %>", '<div class="ct-ui-extras-container">', '<% if (vehicle.equipment.transmission==="manual") { %>', '<div class="ct-ui-extra-small ct-ui-p-border-color">', '<span class="icon-ct-transmission"></span>', "</div>", "<h3><%=$.i18n.locale.manualLabel%></h3>", "<% } %>", '<% if (vehicle.equipment.transmission==="auto") { %>', '<div class="ct-ui-extra-small ct-ui-p-border-color">', '<span class="icon-ct-transmission"></span>', "</div>", "<h3><%=$.i18n.locale.automaticLabel%></h3>", "<% } %>", "</div>", "<% } %>", '<% if (extensions.getFuelPolicy().type.toLowerCase()!="unknown") { %>', '<div class="ct-ui-extras-container">', '<div class="ct-ui-extra-small ct-ui-p-border-color">', '<span class="icon-ct-fuel-policy"></span>', "</div>", "<h3><%=$.i18n.locale.S3_V2_0_Lbl_Fuel%><%=$.i18n.lookup($.i18n.lookupType('fuel_S3V2', extensions.getFuelPolicy().type.toLowerCase()))%></h3>", "</div>", "<% } %>", '<% if (vendor.getLocationType().type==="terminal") { %>', '<div class="ct-ui-extras-container">', '<div class="ct-ui-extra-small ct-ui-p-border-color">', '<span class="icon-ct-airport"></span>', "</div>", "<h3><%=$.i18n.locale.S3_V2_0_Lbl_Airport_Pickup%></h3>", "</div>", "<% } %>", "<% if (vehicle.equipment.fuelType===2) { %>", '<div class="ct-ui-extras-container">', '<div class="ct-ui-extra-small ct-ui-p-border-color">', '<span class="icon-ct-fuel-type"></span>', "</div>", "<h3><%=$.i18n.locale.S3_V2_0_Lbl_Diesel%></h3>", "</div>", "<% } %>", " </div>", " </div>", " </div>", " </div>", "</div>"],
HTML_IncludedInRate: ["<h3><%=$.i18n.locale.S3_V2_0_H2_Included_In_Price%></h3>", '<ul class="ct-ui-list-ticks">', "<%=content%>", "</ul>", ]
};
var k;
var c = {};
var b = {
debug: true,
width: 400,
l18n: {
LoadingRateDetails: "Loading rate details",
ExpiredReservationQuote: "Expired Reservation Quote",
ForNumberOfDays: "for",
For3Days: "for 3 days",
perday: "per day",
day: "day",
days: "days",
total: "Total",
included: "Included",
includedInPrice: "Included in price",
includedInTotalPrice: "Included in total price",
notIncludedInTotalPrice: "Not included in total price",
glossaryLink: "Glossary Of Terms",
glossaryBack: "Back to Rate details",
printLabel: "Print"
}
};
this.oP = b;
this.requestData = {};
for (k in a) {
if (this.oP[k] != a[k]) {
if (k == "l18n") {
for (l in a[k]) {
if (this.oP[k][l] != a[k][l] && a[k][l]) {
this.oP[k][l] = a[k][l]
}
}
} else {
this.oP[k] = a[k]
}
}
}
this.request = new CT.ABE.Popup.RentalCondition.Request(this.options)
};
CT.ABE.Popup.RentalConditionv3_2.prototype = {
display: function (z, H, B, u, v, F, J, D, C, w, I) {
var A = this;
A.idAs = z;
A.requestData = w;
A.originalBodyScrollPosition = I;
if ($("#" + this.idAs).length == 0) {
var x = CT.LIB.templateV2.tmpl(this.tpl.HTML_Loading.join(""), B, this);
$("body").append(x);
var y = 920,
left;
if ($(window).width() > y) {
left = (($(window).width() - y) / 2) + "px";
y = y + "px"
} else {
y = "90%";
left = "5%"
}
$.blockUI({
message: $("#" + this.idAs),
blockMsgClass: "ct-ui-base",
allowBodyStretch: true,
css: {
width: y,
height: "auto",
left: left,
top: "40px",
border: "none",
overflow: "visible",
cursor: "auto",
position: "absolute"
},
overlayCSS: {
cursor: "pointer"
},
fadeIn: 0,
fadeOut: 0,
onBlock: function () {
$(document).scrollTop(0);
$(".blockUI.ct-ui-base").append('<a class="ct-popup-close-bottom ct-ui-s-background-color"><span class="icon-ct-cancel"></span></a><a class="ct-popup-top ct-ui-s-background-color"><span class="icon-ct-angle-up"></span></a>');
$(".ct-popup-close-bottom, .blockUI.blockOverlay").click(function (e) {
$.unblockUI()
});
$(".ct-popup-top").click(function (e) {
$(document).scrollTop(0)
});
$(".icon-ct-print").click(function () {
var a = new CT.ABE.Utils.Print({
id: A.idAs,
debug: false,
operaSupport: true,
importCSS: false,
printContainer: true,
title: "Car Rental - Rate Details"
});
a.print("#ct-rental-" + A.idAs + "-pane")
})
},
onUnblock: function () {
$(document).scrollTop(A.originalBodyScrollPosition);
$("#" + A.idAs).remove()
}
});
var E = u.data.locations[0].code;
var t = u.data.locations[0].code;
if (u.data.locations.length === 2) {
t = u.data.locations[1].code
}
var G = {
id: z,
availability: B,
name: B.data.vehicle.name,
vendor: u,
commonList: F,
currency: A.requestData.data.currency,
All: "All",
pickupDateTime: A.requestData.getOTAPickupDateTime(),
returnDateTime: A.requestData.getOTADropoffDateTime(),
pickupLocationCode: E,
returnLocationCode: t,
duration: B.data.extensions.duration,
displayTotalPerDay: A.totalPerDay,
emailType: "2",
addressType: "2",
countryName: J,
reference: B.data.reference,
title: "",
givenName: "",
surName: ""
};
A.request.get({
rentalConditions: G
}, {
success: function (b) {
if (CT.LIB.Object.isDefined(b.Success)) {
b.error = false;
b.rateConditionsType = "DB";
if (CT.LIB.Object.isDefined(b.Type)) {
b.rateConditionsType = b.Type
}
var k = new CT.ABE.Utils.RentalCondition({
debug: A.oP.debug,
l18n: {
ForNumberOfDays: A.oP.l18n.ForNumberOfDays,
For3Days: A.oP.l18n.For3Days,
perday: A.oP.l18n.perday,
days: A.oP.l18n.days,
day: A.oP.l18n.day,
total: A.oP.l18n.total,
included: A.oP.l18n.included,
includedInPrice: A.oP.l18n.includedInPrice,
includedInTotalPrice: A.oP.l18n.includedInTotalPrice,
notIncludedInTotalPrice: A.oP.l18n.notIncludedInTotalPrice
}
});
var d = k.getRC(G);
var l = k.getRC_html(d);
var h;
var s;
if (G.displayTotalPerDay == true) {
var n = G.availability.data.fees.getPayDaily();
if (typeof (n) === undefined) {
var c = new Number(G.availability.data.rates.extimatedTotal) / G.duration;
h = abeSC.currencyObj.formatCurrency(c, {
region: abeSC.region,
currency: G.currency,
displayLabel: false
})
} else {
h = abeSC.currencyObj.formatCurrency(n.amount, {
region: abeSC.region,
currency: G.currency,
displayLabel: false
})
}
s = A.oP.l18n.perday
} else {
h = abeSC.currencyObj.formatCurrency(G.availability.data.rates.estimatedTotal, {
region: abeSC.region,
currency: G.currency,
displayLabel: false
});
s = G.duration == 1 ? " " + A.oP.l18n.ForNumberOfDays + " " + G.duration + " " + A.oP.l18n.day : A.oP.l18n.For3Days.replace(/3/g, G.duration)
}
var r = function () {
var a = "";
if (CT.LIB.Object.isDefined(b.RentalConditionsSummary)) {
if (CT.LIB.Object.isDefined(b.RentalConditionsSummary.SubSection)) {
if (CT.LIB.Object.isDefined(b.RentalConditionsSummary.SubSection.Paragraph)) {
if (CT.LIB.Object.isString(b.RentalConditionsSummary.SubSection.Paragraph)) {
a = a + "<li>" + b.RentalConditionsSummary.SubSection.Paragraph + "</li>"
} else {
for (var i = b.RentalConditionsSummary.SubSection.Paragraph.length - 1; i >= 0; i--) {
a = a + "<li>" + b.RentalConditionsSummary.SubSection.Paragraph[i] + "</li>"
}
}
}
}
}
return a
};
var f = {
content: r()
};
if (CT.LIB.Object.isDefined(b.RentalConditionsSummary)) {
b.includedInRate = CT.LIB.templateV2.tmpl(A.tpl.HTML_IncludedInRate.join(""), f, A)
}
var o = CT.LIB.StringV2.replaceSubstring($.i18n.locale.S3_V2_0_H2_Rental_Conditions, "${x}", B.data.extensions.duration, false);
o = CT.LIB.StringV2.replaceSubstring(o, "${y}", B.getPayDaily().displayAmountRC, false);
var m = {
car_name: G.name,
car_model: B.data.extensions.getCarMakeModel(),
car_price: h,
currency: abeSC.currencyObj.getCurrencySymbol(abeSC.options.currency),
duration: s,
id: G.id,
includedInRate: b.includedInRate,
car_image: G.availability.data.vehicle.picture,
displayTotalCost: B.data.rates.rateTotal,
durationString: s,
duration: B.data.extensions.duration,
displayTotalPerDay: B.data.fees.payDaily.amount,
currencySymbol: "&#" + B.data.rates.currencySymbol[0] + ";",
totalCharge: B.getTotalCharge().displayAmount,
rentalCost: B.getRentalCost().amount,
isExcessadded: B.isExcessAdded(),
priceMinusFee: B.getFees().priceMinusFee.amount,
modelGuaranteed: B.data.extensions.isGuaranteed(),
orSimilar: B.data.extensions.getOrSimilar(),
rentalCostDurationDaily: o,
excessPrice: B.getExcessPrice().displayAmountRC
};
b.top = CT.LIB.templateV2.tmpl(A.tpl.HTML_Top.join(""), m, A);
b.languageID = C;
b.header = l;
b.id = G.id;
var j = CT.LIB.templateV2.tmpl(A.tpl.HTML_Conditions.join(""), b, A);
if ($.browser.msie && $.browser.version < 7) {
$("#" + A.idAs + "_loading").parent().height("auto")
}
$("#" + A.idAs + "_loading").replaceWith(j);
var g = $("#ct-rental-" + A.idAs + "-header").innerHeight();
if (abeSC.getCustomEngine() == "DTAG") {
$(".ct-rental-header").css({
display: "none"
})
}
var q = $(".ModuleRentalConditionsGlossary").innerHeight();
if (b.rateConditionsType != "DB") {
$(".ModuleRentalConditionsGlossaryP").css({
display: "none"
})
}
if (C == "EN") {
$("#ct-glossary-on-" + A.idAs).click(function () {
var a = $(this)[0].id.split("-");
$("#ct-rental-" + a[3] + "-pane").slideToggle("slow", function () {
$("#ct-glossary-" + a[3] + "-pane").slideToggle("fast", function () {
if ($("#ct-rental-" + a[3] + "-pane").is(":visible")) {
$("#ct-glossary-link-" + a[3]).html(A.oP.l18n.glossaryLink)
} else {
$("#ct-glossary-link-" + a[3]).html(A.oP.l18n.glossaryBack)
}
})
})
})
}
$(".ct-popup-close-top").click(function (e) {
$.unblockUI()
})
} else {
var p = b.Errors.Error["@Type"];
var j = "";
if (p == "97") {
j = CT.LIB.templateV2.tmpl(A.tpl.HTML_ExpiredQuote.join(""), b, A)
} else {
j = CT.LIB.templateV2.tmpl(A.tpl.HTML_NoContent.join(""), b, A)
} if ($.browser.msie && $.browser.version < 7) {
$("#" + A.idAs + "_loading").parent().height("auto")
}
$("#" + A.idAs + "_loading").replaceWith(j)
}
},
error: function (a) {
var b = CT.LIB.templateV2.tmpl(A.tpl.HTML_Error.join(""), data, A);
if ($.browser.msie && $.browser.version < 7) {
$("#" + A.idAs + "_loading").parent().height("auto")
}
$("#" + A.idAs + "_loading").replaceWith(b)
}
});
abeSC.abeEvents.rateDetails(G)
}
}
}
})(jQCT);
(function ($) {
namespace("CT.ABE.Popup.termsAndConditions");
CT.ABE.Popup.termsAndConditions = function () {};
CT.ABE.Popup.termsAndConditions.prototype = {
content: function () {
return this.fetchContent()
},
fetchContent: function () {
var d = abeSC.languageID;
var f = "";
$.ajax({
url: "//www.cartrawler.com/booking-conditions/indexv3_2.php?lang=" + d,
contentType: "application/x-www-form-urlencoded; charset=UTF-8",
dataType: "jsonp",
beforeSend: function (a) {},
success: function (b) {
$("body").append(b[0]);
self.originalBodyScrollPosition = $(document).scrollTop();
var c = 920,
left;
if ($(window).width() > c) {
left = (($(window).width() - c) / 2) + "px";
c = c + "px"
} else {
c = "90%";
left = "5%"
}
$.blockUI({
message: $("#ct-terms-and-conditions-popup"),
blockMsgClass: "ct-ui-base",
allowBodyStretch: true,
css: {
width: c,
height: "auto",
left: left,
top: "40px",
border: "none",
overflow: "visible",
cursor: "auto",
position: "absolute"
},
overlayCSS: {
cursor: "pointer"
},
fadeIn: 0,
fadeOut: 0,
onBlock: function () {
$(document).scrollTop(0);
$(".blockUI.ct-ui-base").append('<a class="ct-popup-close-bottom ct-ui-s-background-color"><span class="icon-ct-cancel"></span></a><a class="ct-popup-top ct-ui-s-background-color"><span class="icon-ct-angle-up"></span></a>');
$(".ct-popup-close-bottom, .blockUI.blockOverlay").click(function (e) {
$.unblockUI()
});
$(".ct-popup-top").click(function (e) {
$(document).scrollTop(0)
});
$(".icon-ct-print").click(function () {
var a = new CT.ABE.Utils.Print({
id: self.idAs,
debug: false,
operaSupport: true,
importCSS: false,
printContainer: true,
title: "Car Rental - Rate Details"
});
a.print("#ct-rental-" + self.idAs + "-pane")
})
},
onUnblock: function () {
$(document).scrollTop(self.originalBodyScrollPosition);
$("#ct-terms-and-conditions-popup").remove()
}
});
$(".ct-popup-close-top").click(function (e) {
$.unblockUI()
})
},
error: function () {}
})
}
}
})(jQCT);
(function ($) {
namespace("CT.ABE.Template.Auxiliary");
var a = CT.ABE.Template.Auxiliary = {
HTML_CUSTOMER_REVIEWS_WRAPPER: function () {
return ['<div id="<%=t.elId%>" class="ct-ui-reviews"></div>', ].join("")
},
HTML_CUSTOMER_REVIEWS: function () {
return ['<div class="ct-ui-reviews-stats">', '<div class="ct-ui-reviews-stats-l">', "<h3><%=$.i18n.locale.ReviewsOverallExperience%></h3>", '<p class="ct-ui-reviews-ratings">', "<% for (var r = 0; r < 5; r++) { %>", '<span class="ct-ui-icon-star<%=((overallExperience/2) > r ? (overallExperience % 2 != 0 && ((r*2)+1) === overallExperience ? "-half" : "") : "-off")%> ct-ui-icon-gold"></span>', "<% } %>", "</p>", "<h4><%if(CT.LIB.Object.isDefined(rating[overallExperience])){%><%=$.i18n.locale[rating[overallExperience].label]%><%}%></h4>", '<h6><%=CT.LIB.StringV2.replaceSubstring($.i18n.locale.ReviewsBasedOn, "${x}", totalReviews)%></h6>', '<div class="ct-ui-reviews-stats-individual">', "<% CT.LIB.Object.each(rateOption, function(key, option) { %>", '<p class="ct-ui-reviews-ratings">', "<% for (var r = 0; r < 5; r++) { %>", '<span class="ct-ui-icon-star<%=((option.rating/2) > r ? (option.rating % 2 != 0 && ((r*2)+1) === option.rating ? "-half" : "") : "-off")%> ct-ui-icon-gold"></span>', "<% } %>", "<label><%=$.i18n.locale[option.name]%></label>", "</p>", "<% }); %>", "</div>", "</div>", '<div class="ct-ui-reviews-stats-r">', '<div class="ct-ui-reviews-survey">', "<p>", '<span class="ct-ui-icons ico-thumb"></span>', '<label><%=CT.LIB.StringV2.replaceSubstring($.i18n.locale.ReviewsSurveyPrice, "${x}", survey.price.percent)%></label>', "</p>", "<%if (!opaque) { %>", "<p>", '<span class="ct-ui-icons ico-thumb"></span>', '<label><%=CT.LIB.StringV2.replaceSubstring(CT.LIB.StringV2.replaceSubstring($.i18n.locale.ReviewsSurveyVendor, "${x}", survey.vendor.percent), "${y}", survey.vendor.name)%></label>', "</p>", "<% } %>", "</div>", '<div class="ct-ui-reviews-types">', '<div class="ct-ui-reviews-traveller-rating">', "<h4><%=$.i18n.locale.ReviewsTravelRating%></h4>", '<table class="ct-ui-reviews-filter-list">', "<% CT.LIB.Object.each(travelRating, function(key, rating) { %>", "<tr>", '<td align="left" valign="middle">', "<% if (!opaque) { %>", '<input id="ct-ui-reviews-travelRating-<%=key%>" name="ct-ui-reviews-travelRating" type="checkbox" checked="checked" filterby="travelRating" value="<%=key%>" data-icon-color="gold" data-cta="crFiltTR" data-cta-value="<%=key%>"/>', "<% } %>", '<label for="ct-ui-reviews-travelRating-<%=key%>"><%=$.i18n.locale[rating.name]%></label>', "</td>", '<td valign="middle"><div class="ct-ui-reviews-progressbar"><span class="ct-ui-icon-progressbar"><span style="width: <%=rating.percent%>%;" class="ct-ui-icon-progressbar-on"></span></span></div></td>', '<td width="30" align="right" valign="middle"><label>(<%=rating.total%>)</label></td>', "</tr>", "<% }); %>", "</table>", "</div>", '<div class="ct-ui-reviews-trip-types">', "<h4><%=$.i18n.locale.ReviewsTripType%></h4>", '<table class="ct-ui-reviews-filter-list">', "<% CT.LIB.Object.each(tripType, function(key, type) { %>", "<tr>", '<td align="left" valign="middle" width="100%">', "<% if (!opaque) { %>", '<input id="ct-ui-reviews-tripType-<%=key%>" name="ct-ui-reviews-tripType" type="radio" <%if(key==="all"){%>checked="checked"<%}%> filterby="tripType" value="<%=key%>" data-icon-color="gold" data-cta="crFiltTT" data-cta-value="<%=key%>"/>', "<% }%>", '<label for="ct-ui-reviews-tripType-<%=key%>"><%=$.i18n.locale[type.name]%></label>', "</td>", '<td width="20" align="right" valign="middle"><label>(<%=type.total%>)</label></td>', "</tr>", "<% }); %>", "</table>", "</div>", "</div>", "</div>", "</div>", '<div class="ct-ui-reviews-comments" <%if(opaque){%>style="display:none;"<%}%>>', "<ul>", "<% CT.LIB.Array.each(reviews, function(review, cIndex) { %>", '<li data-trip-type="<%=review.tripType%>" data-travel-rating="<%=rating[review.rating % 2 === 0 ? (review.rating/2) : ((review.rating+1)/2)].name%>">', '<div class="ct-ui-reviews-comments-l">', "<table>", "<tr>", '<td colspan="2" class="ct-ui-reviews-ratings">', "<% for (var r = 0; r < 5; r++) { %>", '<span class="ct-ui-icon-star<%=((review.rating/2) > r ? (review.rating % 2 != 0 && ((r*2)+1) === review.rating ? "-half" : "") : "-off")%> ct-ui-icon-gold"></span>', "<% } %>", "</td>", "</tr>", "<tr>", '<td colspan="2">', "<h4><%=$.i18n.locale[rating[review.rating % 2 === 0 ? (review.rating/2) : ((review.rating+1)/2)].label]%></h4>", "</td>", "</tr>", "<tr>", '<td colspan="2">', "<label><%=review.author%></label>", "</td>", "</tr>", "<tr>", '<td colspan="2">', "<label><%=$.i18n.locale[tripType[review.tripType].name]%> <%=$.i18n.locale.ReviewsTrip%></label>", "</td>", "</tr>", "<tr>", '<td width="30">', '<span class="ct-ui-icons-flag24 ct-ui-icon-flag-<%=review.location%>"></span>', "</td>", "<td>", "<label><%=abeSC.countryObj.main_Country_array[review.location.toUpperCase()].fullname%></label>", "</td>", "</tr>", "<tr>", '<td colspan="2">', "<label><label><em><%=review.date%></em></label>", "</td>", "</tr>", "</table>", "</div>", '<div class="ct-ui-reviews-comments-r">', "<% if (CT.LIB.Object.isDefined(review.comment) && review.comment.length > 0) { %>", "<p><%=review.comment%></p>", "<% } else { %>", "<p><em><%=$.i18n.locale.ReviewsNoComments%></em></p>", "<% } %>", "</div>", '<p style="clear:both"></p>', "</li>", "<% }); %>", "</ul>", "</div>", ].join("")
},
HTML_CUSTOMER_REVIEWS_FILTER_MESSAGE: function () {
return ['<div class="ct-ui-reviews-message">', "<h3><%=$.i18n.locale.FilterNoCommentsCriteria%></h3>", '<h5><%=$.i18n.locale.FilterChangeSettings%>&nbsp;<a class="ct-ui-link" id="ct_reviews_filter_reset"><%=CT.LIB.StringV2.replaceSubstring($.i18n.locale.FilterShowAllResults, "${total}", totalComments)%></a></h5>', "</div>"].join("")
},
HTML_CUSTOMER_REVIEWS_ERROR_MESSAGE: function () {
return ['<div class="ct-ui-reviews-message">', "<h3><%=$.i18n.locale.ReviewsErrorMessage%></h3>", '<h5><a class="ct-ui-link" id="ct_reviews_retry"><%=$.i18n.locale.ClickTryAgain%></a></h5>', "</div>"].join("")
},
HTML_AVAILABILITY_TIMEOUT_MESSAGE: function () {
return ['<div id="ct_availabilityTimedOut">', "<p>Sorry, the quote you received has expired, you need to search again for the most recent rates.</p>", "<a class='ct-ui-button ct-ui-s-background-color' href='javascript: void(0)' onclick'console.log(\"doavailability\")'>" + $.i18n.locale.searchAgainButton + "</a>", "</div>"].join("")
}
}
})(jQCT);
This file has been truncated, but you can view the full file.
/*
* Cartrawler AJAX Booking Engine
* http://www.cartrawler.com
*
* Copyright (c) 2006-2013 Cartrawler.com
* Version: 56251
* Date: 13-11-2013 - 12:54
*/
(function (x, H) {
var L = x.document,
navigator = x.navigator,
location = x.location;
var D = (function () {
var m = function (a, b) {
return new m.fn.init(a, b, rootjQuery)
}, _jQuery = x.jQuery,
_$ = x.$,
rootjQuery, quickExpr = /^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,
rnotwhite = /\S/,
trimLeft = /^\s+/,
trimRight = /\s+$/,
rsingleTag = /^<(\w+)\s*\/?>(?:<\/\1>)?$/,
rvalidchars = /^[\],:{}\s]*$/,
rvalidescape = /\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,
rvalidtokens = /"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,
rvalidbraces = /(?:^|:|,)(?:\s*\[)+/g,
rwebkit = /(webkit)[ \/]([\w.]+)/,
ropera = /(opera)(?:.*version)?[ \/]([\w.]+)/,
rmsie = /(msie) ([\w.]+)/,
rmozilla = /(mozilla)(?:.*? rv:([\w.]+))?/,
rdashAlpha = /-([a-z]|[0-9])/ig,
rmsPrefix = /^-ms-/,
fcamelCase = function (a, b) {
return (b + "").toUpperCase()
}, userAgent = navigator.userAgent,
browserMatch, readyList, DOMContentLoaded, toString = Object.prototype.toString,
hasOwn = Object.prototype.hasOwnProperty,
push = Array.prototype.push,
slice = Array.prototype.slice,
trim = String.prototype.trim,
indexOf = Array.prototype.indexOf,
class2type = {};
m.fn = m.prototype = {
constructor: m,
init: function (d, a, b) {
var c, elem, ret, doc;
if (!d) {
return this
}
if (d.nodeType) {
this.context = this[0] = d;
this.length = 1;
return this
}
if (d === "body" && !a && L.body) {
this.context = L;
this[0] = L.body;
this.selector = d;
this.length = 1;
return this
}
if (typeof d === "string") {
if (d.charAt(0) === "<" && d.charAt(d.length - 1) === ">" && d.length >= 3) {
c = [null, d, null]
} else {
c = quickExpr.exec(d)
} if (c && (c[1] || !a)) {
if (c[1]) {
a = a instanceof m ? a[0] : a;
doc = (a ? a.ownerDocument || a : L);
ret = rsingleTag.exec(d);
if (ret) {
if (m.isPlainObject(a)) {
d = [L.createElement(ret[1])];
m.fn.attr.call(d, a, true)
} else {
d = [doc.createElement(ret[1])]
}
} else {
ret = m.buildFragment([c[1]], [doc]);
d = (ret.cacheable ? m.clone(ret.fragment) : ret.fragment).childNodes
}
return m.merge(this, d)
} else {
elem = L.getElementById(c[2]);
if (elem && elem.parentNode) {
if (elem.id !== c[2]) {
return b.find(d)
}
this.length = 1;
this[0] = elem
}
this.context = L;
this.selector = d;
return this
}
} else {
if (!a || a.jquery) {
return (a || b).find(d)
} else {
return this.constructor(a).find(d)
}
}
} else {
if (m.isFunction(d)) {
return b.ready(d)
}
} if (d.selector !== H) {
this.selector = d.selector;
this.context = d.context
}
return m.makeArray(d, this)
},
selector: "",
jquery: "1.7.2",
length: 0,
size: function () {
return this.length
},
toArray: function () {
return slice.call(this, 0)
},
get: function (a) {
return a == null ? this.toArray() : (a < 0 ? this[this.length + a] : this[a])
},
pushStack: function (c, a, d) {
var b = this.constructor();
if (m.isArray(c)) {
push.apply(b, c)
} else {
m.merge(b, c)
}
b.prevObject = this;
b.context = this.context;
if (a === "find") {
b.selector = this.selector + (this.selector ? " " : "") + d
} else {
if (a) {
b.selector = this.selector + "." + a + "(" + d + ")"
}
}
return b
},
each: function (a, b) {
return m.each(this, a, b)
},
ready: function (a) {
m.bindReady();
readyList.add(a);
return this
},
eq: function (i) {
i = +i;
return i === -1 ? this.slice(i) : this.slice(i, i + 1)
},
first: function () {
return this.eq(0)
},
last: function () {
return this.eq(-1)
},
slice: function () {
return this.pushStack(slice.apply(this, arguments), "slice", slice.call(arguments).join(","))
},
map: function (b) {
return this.pushStack(m.map(this, function (a, i) {
return b.call(a, i, a)
}))
},
end: function () {
return this.prevObject || this.constructor(null)
},
push: push,
sort: [].sort,
splice: [].splice
};
m.fn.init.prototype = m.fn;
m.extend = m.fn.extend = function () {
var a, name, src, copy, copyIsArray, clone, target = arguments[0] || {}, i = 1,
length = arguments.length,
deep = false;
if (typeof target === "boolean") {
deep = target;
target = arguments[1] || {};
i = 2
}
if (typeof target !== "object" && !m.isFunction(target)) {
target = {}
}
if (length === i) {
target = this;
--i
}
for (; i < length; i++) {
if ((a = arguments[i]) != null) {
for (name in a) {
src = target[name];
copy = a[name];
if (target === copy) {
continue
}
if (deep && copy && (m.isPlainObject(copy) || (copyIsArray = m.isArray(copy)))) {
if (copyIsArray) {
copyIsArray = false;
clone = src && m.isArray(src) ? src : []
} else {
clone = src && m.isPlainObject(src) ? src : {}
}
target[name] = m.extend(deep, clone, copy)
} else {
if (copy !== H) {
target[name] = copy
}
}
}
}
}
return target
};
m.extend({
noConflict: function (a) {
if (x.$ === m) {
x.$ = _$
}
if (a && x.jQuery === m) {
x.jQuery = _jQuery
}
return m
},
isReady: false,
readyWait: 1,
holdReady: function (a) {
if (a) {
m.readyWait++
} else {
m.ready(true)
}
},
ready: function (a) {
if ((a === true && !--m.readyWait) || (a !== true && !m.isReady)) {
if (!L.body) {
return setTimeout(m.ready, 1)
}
m.isReady = true;
if (a !== true && --m.readyWait > 0) {
return
}
readyList.fireWith(L, [m]);
if (m.fn.trigger) {
m(L).trigger("ready").off("ready")
}
}
},
bindReady: function () {
if (readyList) {
return
}
readyList = m.Callbacks("once memory");
if (L.readyState === "complete") {
return setTimeout(m.ready, 1)
}
if (L.addEventListener) {
L.addEventListener("DOMContentLoaded", DOMContentLoaded, false);
x.addEventListener("load", m.ready, false)
} else {
if (L.attachEvent) {
L.attachEvent("onreadystatechange", DOMContentLoaded);
x.attachEvent("onload", m.ready);
var a = false;
try {
a = x.frameElement == null
} catch (e) {}
if (L.documentElement.doScroll && a) {
doScrollCheck()
}
}
}
},
isFunction: function (a) {
return m.type(a) === "function"
},
isArray: Array.isArray || function (a) {
return m.type(a) === "array"
},
isWindow: function (a) {
return a != null && a == a.window
},
isNumeric: function (a) {
return !isNaN(parseFloat(a)) && isFinite(a)
},
type: function (a) {
return a == null ? String(a) : class2type[toString.call(a)] || "object"
},
isPlainObject: function (a) {
if (!a || m.type(a) !== "object" || a.nodeType || m.isWindow(a)) {
return false
}
try {
if (a.constructor && !hasOwn.call(a, "constructor") && !hasOwn.call(a.constructor.prototype, "isPrototypeOf")) {
return false
}
} catch (e) {
return false
}
var b;
for (b in a) {}
return b === H || hasOwn.call(a, b)
},
isEmptyObject: function (a) {
for (var b in a) {
return false
}
return true
},
error: function (a) {
throw new Error(a)
},
parseJSON: function (a) {
if (typeof a !== "string" || !a) {
return null
}
a = m.trim(a);
if (x.JSON && x.JSON.parse) {
return x.JSON.parse(a)
}
if (rvalidchars.test(a.replace(rvalidescape, "@").replace(rvalidtokens, "]").replace(rvalidbraces, ""))) {
return (new Function("return " + a))()
}
m.error("Invalid JSON: " + a)
},
parseXML: function (a) {
if (typeof a !== "string" || !a) {
return null
}
var b, tmp;
try {
if (x.DOMParser) {
tmp = new DOMParser();
b = tmp.parseFromString(a, "text/xml")
} else {
b = new ActiveXObject("Microsoft.XMLDOM");
b.async = "false";
b.loadXML(a)
}
} catch (e) {
b = H
}
if (!b || !b.documentElement || b.getElementsByTagName("parsererror").length) {
m.error("Invalid XML: " + a)
}
return b
},
noop: function () {},
globalEval: function (b) {
if (b && rnotwhite.test(b)) {
(x.execScript || function (a) {
x["eval"].call(x, a)
})(b)
}
},
camelCase: function (a) {
return a.replace(rmsPrefix, "ms-").replace(rdashAlpha, fcamelCase)
},
nodeName: function (b, a) {
return b.nodeName && b.nodeName.toUpperCase() === a.toUpperCase()
},
each: function (c, a, b) {
var d, i = 0,
length = c.length,
isObj = length === H || m.isFunction(c);
if (b) {
if (isObj) {
for (d in c) {
if (a.apply(c[d], b) === false) {
break
}
}
} else {
for (; i < length;) {
if (a.apply(c[i++], b) === false) {
break
}
}
}
} else {
if (isObj) {
for (d in c) {
if (a.call(c[d], d, c[d]) === false) {
break
}
}
} else {
for (; i < length;) {
if (a.call(c[i], i, c[i++]) === false) {
break
}
}
}
}
return c
},
trim: trim ? function (a) {
return a == null ? "" : trim.call(a)
} : function (a) {
return a == null ? "" : a.toString().replace(trimLeft, "").replace(trimRight, "")
},
makeArray: function (a, c) {
var d = c || [];
if (a != null) {
var b = m.type(a);
if (a.length == null || b === "string" || b === "function" || b === "regexp" || m.isWindow(a)) {
push.call(d, a)
} else {
m.merge(d, a)
}
}
return d
},
inArray: function (b, a, i) {
var c;
if (a) {
if (indexOf) {
return indexOf.call(a, b, i)
}
c = a.length;
i = i ? i < 0 ? Math.max(0, c + i) : i : 0;
for (; i < c; i++) {
if (i in a && a[i] === b) {
return i
}
}
}
return -1
},
merge: function (a, b) {
var i = a.length,
j = 0;
if (typeof b.length === "number") {
for (var l = b.length; j < l; j++) {
a[i++] = b[j]
}
} else {
while (b[j] !== H) {
a[i++] = b[j++]
}
}
a.length = i;
return a
},
grep: function (c, a, d) {
var b = [],
retVal;
d = !! d;
for (var i = 0, length = c.length; i < length; i++) {
retVal = !! a(c[i], i);
if (d !== retVal) {
b.push(c[i])
}
}
return b
},
map: function (c, a, d) {
var b, key, ret = [],
i = 0,
length = c.length,
isArray = c instanceof m || length !== H && typeof length === "number" && ((length > 0 && c[0] && c[length - 1]) || length === 0 || m.isArray(c));
if (isArray) {
for (; i < length; i++) {
b = a(c[i], i, d);
if (b != null) {
ret[ret.length] = b
}
}
} else {
for (key in c) {
b = a(c[key], key, d);
if (b != null) {
ret[ret.length] = b
}
}
}
return ret.concat.apply([], ret)
},
guid: 1,
proxy: function (a, b) {
if (typeof b === "string") {
var c = a[b];
b = a;
a = c
}
if (!m.isFunction(a)) {
return H
}
var d = slice.call(arguments, 2),
proxy = function () {
return a.apply(b, d.concat(slice.call(arguments)))
};
proxy.guid = a.guid = a.guid || proxy.guid || m.guid++;
return proxy
},
access: function (j, g, h, e, k, d, f) {
var l, bulk = h == null,
i = 0,
length = j.length;
if (h && typeof h === "object") {
for (i in h) {
m.access(j, g, i, h[i], 1, d, e)
}
k = 1
} else {
if (e !== H) {
l = f === H && m.isFunction(e);
if (bulk) {
if (l) {
l = g;
g = function (b, c, a) {
return l.call(m(b), a)
}
} else {
g.call(j, e);
g = null
}
}
if (g) {
for (; i < length; i++) {
g(j[i], h, l ? e.call(j[i], i, g(j[i], h)) : e, f)
}
}
k = 1
}
}
return k ? j : bulk ? g.call(j) : length ? g(j[0], h) : d
},
now: function () {
return (new Date()).getTime()
},
uaMatch: function (b) {
b = b.toLowerCase();
var a = rwebkit.exec(b) || ropera.exec(b) || rmsie.exec(b) || b.indexOf("compatible") < 0 && rmozilla.exec(b) || [];
return {
browser: a[1] || "",
version: a[2] || "0"
}
},
sub: function () {
function jQuerySub(a, b) {
return new jQuerySub.fn.init(a, b)
}
m.extend(true, jQuerySub, this);
jQuerySub.superclass = this;
jQuerySub.fn = jQuerySub.prototype = this();
jQuerySub.fn.constructor = jQuerySub;
jQuerySub.sub = this.sub;
jQuerySub.fn.init = function init(a, b) {
if (b && b instanceof m && !(b instanceof jQuerySub)) {
b = jQuerySub(b)
}
return m.fn.init.call(this, a, b, c)
};
jQuerySub.fn.init.prototype = jQuerySub.fn;
var c = jQuerySub(L);
return jQuerySub
},
browser: {}
});
m.each("Boolean Number String Function Array Date RegExp Object".split(" "), function (i, a) {
class2type["[object " + a + "]"] = a.toLowerCase()
});
browserMatch = m.uaMatch(userAgent);
if (browserMatch.browser) {
m.browser[browserMatch.browser] = true;
m.browser.version = browserMatch.version
}
if (m.browser.webkit) {
m.browser.safari = true
}
if (rnotwhite.test("\xA0")) {
trimLeft = /^[\s\xA0]+/;
trimRight = /[\s\xA0]+$/
}
rootjQuery = m(L);
if (L.addEventListener) {
DOMContentLoaded = function () {
L.removeEventListener("DOMContentLoaded", DOMContentLoaded, false);
m.ready()
}
} else {
if (L.attachEvent) {
DOMContentLoaded = function () {
if (L.readyState === "complete") {
L.detachEvent("onreadystatechange", DOMContentLoaded);
m.ready()
}
}
}
}
function doScrollCheck() {
if (m.isReady) {
return
}
try {
L.documentElement.doScroll("left")
} catch (e) {
setTimeout(doScrollCheck, 1);
return
}
m.ready()
}
return m
})();
var C = {};
function createFlags(a) {
var b = C[a] = {}, i, length;
a = a.split(/\s+/);
for (i = 0, length = a.length; i < length; i++) {
b[a[i]] = true
}
return b
}
D.Callbacks = function (d) {
d = d ? (C[d] || createFlags(d)) : {};
var c = [],
stack = [],
memory, fired, firing, firingStart, firingLength, firingIndex, add = function (a) {
var i, length, elem, type, actual;
for (i = 0, length = a.length; i < length; i++) {
elem = a[i];
type = D.type(elem);
if (type === "array") {
add(elem)
} else {
if (type === "function") {
if (!d.unique || !self.has(elem)) {
c.push(elem)
}
}
}
}
}, fire = function (a, b) {
b = b || [];
memory = !d.memory || [a, b];
fired = true;
firing = true;
firingIndex = firingStart || 0;
firingStart = 0;
firingLength = c.length;
for (; c && firingIndex < firingLength; firingIndex++) {
if (c[firingIndex].apply(a, b) === false && d.stopOnFalse) {
memory = true;
break
}
}
firing = false;
if (c) {
if (!d.once) {
if (stack && stack.length) {
memory = stack.shift();
self.fireWith(memory[0], memory[1])
}
} else {
if (memory === true) {
self.disable()
} else {
c = []
}
}
}
}, self = {
add: function () {
if (c) {
var a = c.length;
add(arguments);
if (firing) {
firingLength = c.length
} else {
if (memory && memory !== true) {
firingStart = a;
fire(memory[0], memory[1])
}
}
}
return this
},
remove: function () {
if (c) {
var a = arguments,
argIndex = 0,
argLength = a.length;
for (; argIndex < argLength; argIndex++) {
for (var i = 0; i < c.length; i++) {
if (a[argIndex] === c[i]) {
if (firing) {
if (i <= firingLength) {
firingLength--;
if (i <= firingIndex) {
firingIndex--
}
}
}
c.splice(i--, 1);
if (d.unique) {
break
}
}
}
}
}
return this
},
has: function (a) {
if (c) {
var i = 0,
length = c.length;
for (; i < length; i++) {
if (a === c[i]) {
return true
}
}
}
return false
},
empty: function () {
c = [];
return this
},
disable: function () {
c = stack = memory = H;
return this
},
disabled: function () {
return !c
},
lock: function () {
stack = H;
if (!memory || memory === true) {
self.disable()
}
return this
},
locked: function () {
return !stack
},
fireWith: function (a, b) {
if (stack) {
if (firing) {
if (!d.once) {
stack.push([a, b])
}
} else {
if (!(d.once && memory)) {
fire(a, b)
}
}
}
return this
},
fire: function () {
self.fireWith(this, arguments);
return this
},
fired: function () {
return !!fired
}
};
return self
};
var B = [].slice;
D.extend({
Deferred: function (i) {
var h = D.Callbacks("once memory"),
failList = D.Callbacks("once memory"),
progressList = D.Callbacks("memory"),
state = "pending",
lists = {
resolve: h,
reject: failList,
notify: progressList
}, promise = {
done: h.add,
fail: failList.add,
progress: progressList.add,
state: function () {
return state
},
isResolved: h.fired,
isRejected: failList.fired,
then: function (b, c, a) {
deferred.done(b).fail(c).progress(a);
return this
},
always: function () {
deferred.done.apply(deferred, arguments).fail.apply(deferred, arguments);
return this
},
pipe: function (e, f, g) {
return D.Deferred(function (d) {
D.each({
done: [e, "resolve"],
fail: [f, "reject"],
progress: [g, "notify"]
}, function (b, a) {
var c = a[0],
action = a[1],
returned;
if (D.isFunction(c)) {
deferred[b](function () {
returned = c.apply(this, arguments);
if (returned && D.isFunction(returned.promise)) {
returned.promise().then(d.resolve, d.reject, d.notify)
} else {
d[action + "With"](this === deferred ? d : this, [returned])
}
})
} else {
deferred[b](d[action])
}
})
}).promise()
},
promise: function (a) {
if (a == null) {
a = promise
} else {
for (var b in promise) {
a[b] = promise[b]
}
}
return a
}
}, deferred = promise.promise({}),
key;
for (key in lists) {
deferred[key] = lists[key].fire;
deferred[key + "With"] = lists[key].fireWith
}
deferred.done(function () {
state = "resolved"
}, failList.disable, progressList.lock).fail(function () {
state = "rejected"
}, h.disable, progressList.lock);
if (i) {
i.call(deferred, deferred)
}
return deferred
},
when: function (b) {
var c = B.call(arguments, 0),
i = 0,
length = c.length,
pValues = new Array(length),
count = length,
pCount = length,
deferred = length <= 1 && b && D.isFunction(b.promise) ? b : D.Deferred(),
promise = deferred.promise();
function resolveFunc(i) {
return function (a) {
c[i] = arguments.length > 1 ? B.call(arguments, 0) : a;
if (!(--count)) {
deferred.resolveWith(deferred, c)
}
}
}
function progressFunc(i) {
return function (a) {
pValues[i] = arguments.length > 1 ? B.call(arguments, 0) : a;
deferred.notifyWith(promise, pValues)
}
}
if (length > 1) {
for (; i < length; i++) {
if (c[i] && c[i].promise && D.isFunction(c[i].promise)) {
c[i].promise().then(resolveFunc(i), deferred.reject, progressFunc(i))
} else {
--count
}
}
if (!count) {
deferred.resolveWith(deferred, c)
}
} else {
if (deferred !== b) {
deferred.resolveWith(deferred, length ? [b] : [])
}
}
return promise
}
});
D.support = (function () {
var b, all, a, select, opt, input, fragment, tds, events, eventName, i, isSupported, div = L.createElement("div"),
documentElement = L.documentElement;
div.setAttribute("className", "t");
div.innerHTML = " <link/><table></table><a href='/a' style='top:1px;float:left;opacity:.55;'>a</a><input type='checkbox'/>";
all = div.getElementsByTagName("*");
a = div.getElementsByTagName("a")[0];
if (!all || !all.length || !a) {
return {}
}
select = L.createElement("select");
opt = select.appendChild(L.createElement("option"));
input = div.getElementsByTagName("input")[0];
b = {
leadingWhitespace: (div.firstChild.nodeType === 3),
tbody: !div.getElementsByTagName("tbody").length,
htmlSerialize: !! div.getElementsByTagName("link").length,
style: /top/.test(a.getAttribute("style")),
hrefNormalized: (a.getAttribute("href") === "/a"),
opacity: /^0.55/.test(a.style.opacity),
cssFloat: !! a.style.cssFloat,
checkOn: (input.value === "on"),
optSelected: opt.selected,
getSetAttribute: div.className !== "t",
enctype: !! L.createElement("form").enctype,
html5Clone: L.createElement("nav").cloneNode(true).outerHTML !== "<:nav></:nav>",
submitBubbles: true,
changeBubbles: true,
focusinBubbles: false,
deleteExpando: true,
noCloneEvent: true,
inlineBlockNeedsLayout: false,
shrinkWrapBlocks: false,
reliableMarginRight: true,
pixelMargin: true
};
D.boxModel = b.boxModel = (L.compatMode === "CSS1Compat");
input.checked = true;
b.noCloneChecked = input.cloneNode(true).checked;
select.disabled = true;
b.optDisabled = !opt.disabled;
try {
delete div.test
} catch (e) {
b.deleteExpando = false
}
if (!div.addEventListener && div.attachEvent && div.fireEvent) {
div.attachEvent("onclick", function () {
b.noCloneEvent = false
});
div.cloneNode(true).fireEvent("onclick")
}
input = L.createElement("input");
input.value = "t";
input.setAttribute("type", "radio");
b.radioValue = input.value === "t";
input.setAttribute("checked", "checked");
input.setAttribute("name", "t");
div.appendChild(input);
fragment = L.createDocumentFragment();
fragment.appendChild(div.lastChild);
b.checkClone = fragment.cloneNode(true).cloneNode(true).lastChild.checked;
b.appendChecked = input.checked;
fragment.removeChild(input);
fragment.appendChild(div);
if (div.attachEvent) {
for (i in {
submit: 1,
change: 1,
focusin: 1
}) {
eventName = "on" + i;
isSupported = (eventName in div);
if (!isSupported) {
div.setAttribute(eventName, "return;");
isSupported = (typeof div[eventName] === "function")
}
b[i + "Bubbles"] = isSupported
}
}
fragment.removeChild(div);
fragment = select = opt = div = input = null;
D(function () {
var a, outer, inner, table, td, offsetSupport, marginDiv, conMarginTop, style, html, positionTopLeftWidthHeight, paddingMarginBorderVisibility, paddingMarginBorder, body = L.getElementsByTagName("body")[0];
if (!body) {
return
}
conMarginTop = 1;
paddingMarginBorder = "padding:0;margin:0;border:";
positionTopLeftWidthHeight = "position:absolute;top:0;left:0;width:1px;height:1px;";
paddingMarginBorderVisibility = paddingMarginBorder + "0;visibility:hidden;";
style = "style='" + positionTopLeftWidthHeight + paddingMarginBorder + "5px solid #000;";
html = "<div " + style + "display:block;'><div style='" + paddingMarginBorder + "0;display:block;overflow:hidden;'></div></div><table " + style + "' cellpadding='0' cellspacing='0'><tr><td></td></tr></table>";
a = L.createElement("div");
a.style.cssText = paddingMarginBorderVisibility + "width:0;height:0;position:static;top:0;margin-top:" + conMarginTop + "px";
body.insertBefore(a, body.firstChild);
div = L.createElement("div");
a.appendChild(div);
div.innerHTML = "<table><tr><td style='" + paddingMarginBorder + "0;display:none'></td><td>t</td></tr></table>";
tds = div.getElementsByTagName("td");
isSupported = (tds[0].offsetHeight === 0);
tds[0].style.display = "";
tds[1].style.display = "none";
b.reliableHiddenOffsets = isSupported && (tds[0].offsetHeight === 0);
if (x.getComputedStyle) {
div.innerHTML = "";
marginDiv = L.createElement("div");
marginDiv.style.width = "0";
marginDiv.style.marginRight = "0";
div.style.width = "2px";
div.appendChild(marginDiv);
b.reliableMarginRight = (parseInt((x.getComputedStyle(marginDiv, null) || {
marginRight: 0
}).marginRight, 10) || 0) === 0
}
if (typeof div.style.zoom !== "undefined") {
div.innerHTML = "";
div.style.width = div.style.padding = "1px";
div.style.border = 0;
div.style.overflow = "hidden";
div.style.display = "inline";
div.style.zoom = 1;
b.inlineBlockNeedsLayout = (div.offsetWidth === 3);
div.style.display = "block";
div.style.overflow = "visible";
div.innerHTML = "<div style='width:5px;'></div>";
b.shrinkWrapBlocks = (div.offsetWidth !== 3)
}
div.style.cssText = positionTopLeftWidthHeight + paddingMarginBorderVisibility;
div.innerHTML = html;
outer = div.firstChild;
inner = outer.firstChild;
td = outer.nextSibling.firstChild.firstChild;
offsetSupport = {
doesNotAddBorder: (inner.offsetTop !== 5),
doesAddBorderForTableAndCells: (td.offsetTop === 5)
};
inner.style.position = "fixed";
inner.style.top = "20px";
offsetSupport.fixedPosition = (inner.offsetTop === 20 || inner.offsetTop === 15);
inner.style.position = inner.style.top = "";
outer.style.overflow = "hidden";
outer.style.position = "relative";
offsetSupport.subtractsBorderForOverflowNotVisible = (inner.offsetTop === -5);
offsetSupport.doesNotIncludeMarginInBodyOffset = (body.offsetTop !== conMarginTop);
if (x.getComputedStyle) {
div.style.marginTop = "1%";
b.pixelMargin = (x.getComputedStyle(div, null) || {
marginTop: 0
}).marginTop !== "1%"
}
if (typeof a.style.zoom !== "undefined") {
a.style.zoom = 1
}
body.removeChild(a);
marginDiv = div = a = null;
D.extend(b, offsetSupport)
});
return b
})();
var I = /^(?:\{.*\}|\[.*\])$/,
rmultiDash = /([A-Z])/g;
D.extend({
cache: {},
uuid: 0,
expando: "jQuery" + (D.fn.jquery + Math.random()).replace(/\D/g, ""),
noData: {
embed: true,
object: "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",
applet: true
},
hasData: function (a) {
a = a.nodeType ? D.cache[a[D.expando]] : a[D.expando];
return !!a && !isEmptyDataObject(a)
},
data: function (b, c, a, d) {
if (!D.acceptData(b)) {
return
}
var e, thisCache, ret, internalKey = D.expando,
getByName = typeof c === "string",
isNode = b.nodeType,
cache = isNode ? D.cache : b,
id = isNode ? b[internalKey] : b[internalKey] && internalKey,
isEvents = c === "events";
if ((!id || !cache[id] || (!isEvents && !d && !cache[id].data)) && getByName && a === H) {
return
}
if (!id) {
if (isNode) {
b[internalKey] = id = ++D.uuid
} else {
id = internalKey
}
}
if (!cache[id]) {
cache[id] = {};
if (!isNode) {
cache[id].toJSON = D.noop
}
}
if (typeof c === "object" || typeof c === "function") {
if (d) {
cache[id] = D.extend(cache[id], c)
} else {
cache[id].data = D.extend(cache[id].data, c)
}
}
e = thisCache = cache[id];
if (!d) {
if (!thisCache.data) {
thisCache.data = {}
}
thisCache = thisCache.data
}
if (a !== H) {
thisCache[D.camelCase(c)] = a
}
if (isEvents && !thisCache[c]) {
return e.events
}
if (getByName) {
ret = thisCache[c];
if (ret == null) {
ret = thisCache[D.camelCase(c)]
}
} else {
ret = thisCache
}
return ret
},
removeData: function (b, c, d) {
if (!D.acceptData(b)) {
return
}
var a, i, l, internalKey = D.expando,
isNode = b.nodeType,
cache = isNode ? D.cache : b,
id = isNode ? b[internalKey] : internalKey;
if (!cache[id]) {
return
}
if (c) {
a = d ? cache[id] : cache[id].data;
if (a) {
if (!D.isArray(c)) {
if (c in a) {
c = [c]
} else {
c = D.camelCase(c);
if (c in a) {
c = [c]
} else {
c = c.split(" ")
}
}
}
for (i = 0, l = c.length; i < l; i++) {
delete a[c[i]]
}
if (!(d ? isEmptyDataObject : D.isEmptyObject)(a)) {
return
}
}
}
if (!d) {
delete cache[id].data;
if (!isEmptyDataObject(cache[id])) {
return
}
}
if (D.support.deleteExpando || !cache.setInterval) {
delete cache[id]
} else {
cache[id] = null
} if (isNode) {
if (D.support.deleteExpando) {
delete b[internalKey]
} else {
if (b.removeAttribute) {
b.removeAttribute(internalKey)
} else {
b[internalKey] = null
}
}
}
},
_data: function (b, c, a) {
return D.data(b, c, a, true)
},
acceptData: function (b) {
if (b.nodeName) {
var a = D.noData[b.nodeName.toLowerCase()];
if (a) {
return !(a === true || b.getAttribute("classid") !== a)
}
}
return true
}
});
D.fn.extend({
data: function (e, d) {
var c, part, attr, name, l, elem = this[0],
i = 0,
data = null;
if (e === H) {
if (this.length) {
data = D.data(elem);
if (elem.nodeType === 1 && !D._data(elem, "parsedAttrs")) {
attr = elem.attributes;
for (l = attr.length; i < l; i++) {
name = attr[i].name;
if (name.indexOf("data-") === 0) {
name = D.camelCase(name.substring(5));
dataAttr(elem, name, data[name])
}
}
D._data(elem, "parsedAttrs", true)
}
}
return data
}
if (typeof e === "object") {
return this.each(function () {
D.data(this, e)
})
}
c = e.split(".", 2);
c[1] = c[1] ? "." + c[1] : "";
part = c[1] + "!";
return D.access(this, function (b) {
if (b === H) {
data = this.triggerHandler("getData" + part, [c[0]]);
if (data === H && elem) {
data = D.data(elem, e);
data = dataAttr(elem, e, data)
}
return data === H && c[1] ? this.data(c[0]) : data
}
c[1] = b;
this.each(function () {
var a = D(this);
a.triggerHandler("setData" + part, c);
D.data(this, e, b);
a.triggerHandler("changeData" + part, c)
})
}, null, d, arguments.length > 1, null, false)
},
removeData: function (a) {
return this.each(function () {
D.removeData(this, a)
})
}
});
function dataAttr(b, c, a) {
if (a === H && b.nodeType === 1) {
var d = "data-" + c.replace(rmultiDash, "-$1").toLowerCase();
a = b.getAttribute(d);
if (typeof a === "string") {
try {
a = a === "true" ? true : a === "false" ? false : a === "null" ? null : D.isNumeric(a) ? +a : I.test(a) ? D.parseJSON(a) : a
} catch (e) {}
D.data(b, c, a)
} else {
a = H
}
}
return a
}
function isEmptyDataObject(a) {
for (var b in a) {
if (b === "data" && D.isEmptyObject(a[b])) {
continue
}
if (b !== "toJSON") {
return false
}
}
return true
}
function handleQueueMarkDefer(b, c, a) {
var d = c + "defer",
queueDataKey = c + "queue",
markDataKey = c + "mark",
defer = D._data(b, d);
if (defer && (a === "queue" || !D._data(b, queueDataKey)) && (a === "mark" || !D._data(b, markDataKey))) {
setTimeout(function () {
if (!D._data(b, queueDataKey) && !D._data(b, markDataKey)) {
D.removeData(b, d, true);
defer.fire()
}
}, 0)
}
}
D.extend({
_mark: function (b, a) {
if (b) {
a = (a || "fx") + "mark";
D._data(b, a, (D._data(b, a) || 0) + 1)
}
},
_unmark: function (a, b, c) {
if (a !== true) {
c = b;
b = a;
a = false
}
if (b) {
c = c || "fx";
var d = c + "mark",
count = a ? 0 : ((D._data(b, d) || 1) - 1);
if (count) {
D._data(b, d, count)
} else {
D.removeData(b, d, true);
handleQueueMarkDefer(b, c, "mark")
}
}
},
queue: function (b, c, a) {
var q;
if (b) {
c = (c || "fx") + "queue";
q = D._data(b, c);
if (a) {
if (!q || D.isArray(a)) {
q = D._data(b, c, D.makeArray(a))
} else {
q.push(a)
}
}
return q || []
}
},
dequeue: function (b, a) {
a = a || "fx";
var c = D.queue(b, a),
fn = c.shift(),
hooks = {};
if (fn === "inprogress") {
fn = c.shift()
}
if (fn) {
if (a === "fx") {
c.unshift("inprogress")
}
D._data(b, a + ".run", hooks);
fn.call(b, function () {
D.dequeue(b, a)
}, hooks)
}
if (!c.length) {
D.removeData(b, a + "queue " + a + ".run", true);
handleQueueMarkDefer(b, a, "queue")
}
}
});
D.fn.extend({
queue: function (d, c) {
var b = 2;
if (typeof d !== "string") {
c = d;
d = "fx";
b--
}
if (arguments.length < b) {
return D.queue(this[0], d)
}
return c === H ? this : this.each(function () {
var a = D.queue(this, d, c);
if (d === "fx" && a[0] !== "inprogress") {
D.dequeue(this, d)
}
})
},
dequeue: function (a) {
return this.each(function () {
D.dequeue(this, a)
})
},
delay: function (e, d) {
e = D.fx ? D.fx.speeds[e] || e : e;
d = d || "fx";
return this.queue(d, function (a, b) {
var c = setTimeout(a, e);
b.stop = function () {
clearTimeout(c)
}
})
},
clearQueue: function (a) {
return this.queue(a || "fx", [])
},
promise: function (a, b) {
if (typeof a !== "string") {
b = a;
a = H
}
a = a || "fx";
var c = D.Deferred(),
elements = this,
i = elements.length,
count = 1,
deferDataKey = a + "defer",
queueDataKey = a + "queue",
markDataKey = a + "mark",
tmp;
function resolve() {
if (!(--count)) {
c.resolveWith(elements, [elements])
}
}
while (i--) {
if ((tmp = D.data(elements[i], deferDataKey, H, true) || (D.data(elements[i], queueDataKey, H, true) || D.data(elements[i], markDataKey, H, true)) && D.data(elements[i], deferDataKey, D.Callbacks("once memory"), true))) {
count++;
tmp.add(resolve)
}
}
resolve();
return c.promise(b)
}
});
var M = /[\n\t\r]/g,
rspace = /\s+/,
rreturn = /\r/g,
rtype = /^(?:button|input)$/i,
rfocusable = /^(?:button|input|object|select|textarea)$/i,
rclickable = /^a(?:rea)?$/i,
rboolean = /^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,
getSetAttribute = D.support.getSetAttribute,
nodeHook, boolHook, fixSpecified;
D.fn.extend({
attr: function (b, a) {
return D.access(this, D.attr, b, a, arguments.length > 1)
},
removeAttr: function (a) {
return this.each(function () {
D.removeAttr(this, a)
})
},
prop: function (b, a) {
return D.access(this, D.prop, b, a, arguments.length > 1)
},
removeProp: function (a) {
a = D.propFix[a] || a;
return this.each(function () {
try {
this[a] = H;
delete this[a]
} catch (e) {}
})
},
addClass: function (b) {
var a, i, l, elem, setClass, c, cl;
if (D.isFunction(b)) {
return this.each(function (j) {
D(this).addClass(b.call(this, j, this.className))
})
}
if (b && typeof b === "string") {
a = b.split(rspace);
for (i = 0, l = this.length; i < l; i++) {
elem = this[i];
if (elem.nodeType === 1) {
if (!elem.className && a.length === 1) {
elem.className = b
} else {
setClass = " " + elem.className + " ";
for (c = 0, cl = a.length; c < cl; c++) {
if (!~setClass.indexOf(" " + a[c] + " ")) {
setClass += a[c] + " "
}
}
elem.className = D.trim(setClass)
}
}
}
}
return this
},
removeClass: function (b) {
var a, i, l, elem, className, c, cl;
if (D.isFunction(b)) {
return this.each(function (j) {
D(this).removeClass(b.call(this, j, this.className))
})
}
if ((b && typeof b === "string") || b === H) {
a = (b || "").split(rspace);
for (i = 0, l = this.length; i < l; i++) {
elem = this[i];
if (elem.nodeType === 1 && elem.className) {
if (b) {
className = (" " + elem.className + " ").replace(M, " ");
for (c = 0, cl = a.length; c < cl; c++) {
className = className.replace(" " + a[c] + " ", " ")
}
elem.className = D.trim(className)
} else {
elem.className = ""
}
}
}
}
return this
},
toggleClass: function (b, d) {
var c = typeof b,
isBool = typeof d === "boolean";
if (D.isFunction(b)) {
return this.each(function (i) {
D(this).toggleClass(b.call(this, i, this.className, d), d)
})
}
return this.each(function () {
if (c === "string") {
var a, i = 0,
self = D(this),
state = d,
classNames = b.split(rspace);
while ((a = classNames[i++])) {
state = isBool ? state : !self.hasClass(a);
self[state ? "addClass" : "removeClass"](a)
}
} else {
if (c === "undefined" || c === "boolean") {
if (this.className) {
D._data(this, "__className__", this.className)
}
this.className = this.className || b === false ? "" : D._data(this, "__className__") || ""
}
}
})
},
hasClass: function (b) {
var a = " " + b + " ",
i = 0,
l = this.length;
for (; i < l; i++) {
if (this[i].nodeType === 1 && (" " + this[i].className + " ").replace(M, " ").indexOf(a) > -1) {
return true
}
}
return false
},
val: function (c) {
var d, ret, isFunction, elem = this[0];
if (!arguments.length) {
if (elem) {
d = D.valHooks[elem.type] || D.valHooks[elem.nodeName.toLowerCase()];
if (d && "get" in d && (ret = d.get(elem, "value")) !== H) {
return ret
}
ret = elem.value;
return typeof ret === "string" ? ret.replace(rreturn, "") : ret == null ? "" : ret
}
return
}
isFunction = D.isFunction(c);
return this.each(function (i) {
var b = D(this),
val;
if (this.nodeType !== 1) {
return
}
if (isFunction) {
val = c.call(this, i, b.val())
} else {
val = c
} if (val == null) {
val = ""
} else {
if (typeof val === "number") {
val += ""
} else {
if (D.isArray(val)) {
val = D.map(val, function (a) {
return a == null ? "" : a + ""
})
}
}
}
d = D.valHooks[this.type] || D.valHooks[this.nodeName.toLowerCase()];
if (!d || !("set" in d) || d.set(this, val, "value") === H) {
this.value = val
}
})
}
});
D.extend({
valHooks: {
option: {
get: function (b) {
var a = b.attributes.value;
return !a || a.specified ? b.value : b.text
}
},
select: {
get: function (b) {
var a, i, max, option, index = b.selectedIndex,
values = [],
options = b.options,
one = b.type === "select-one";
if (index < 0) {
return null
}
i = one ? index : 0;
max = one ? index + 1 : options.length;
for (; i < max; i++) {
option = options[i];
if (option.selected && (D.support.optDisabled ? !option.disabled : option.getAttribute("disabled") === null) && (!option.parentNode.disabled || !D.nodeName(option.parentNode, "optgroup"))) {
a = D(option).val();
if (one) {
return a
}
values.push(a)
}
}
if (one && !values.length && options.length) {
return D(options[index]).val()
}
return values
},
set: function (c, a) {
var b = D.makeArray(a);
D(c).find("option").each(function () {
this.selected = D.inArray(D(this).val(), b) >= 0
});
if (!b.length) {
c.selectedIndex = -1
}
return b
}
}
},
attrFn: {
val: true,
css: true,
html: true,
text: true,
data: true,
width: true,
height: true,
offset: true
},
attr: function (b, d, a, c) {
var e, hooks, notxml, nType = b.nodeType;
if (!b || nType === 3 || nType === 8 || nType === 2) {
return
}
if (c && d in D.attrFn) {
return D(b)[d](a)
}
if (typeof b.getAttribute === "undefined") {
return D.prop(b, d, a)
}
notxml = nType !== 1 || !D.isXMLDoc(b);
if (notxml) {
d = d.toLowerCase();
hooks = D.attrHooks[d] || (rboolean.test(d) ? boolHook : nodeHook)
}
if (a !== H) {
if (a === null) {
D.removeAttr(b, d);
return
} else {
if (hooks && "set" in hooks && notxml && (e = hooks.set(b, a, d)) !== H) {
return e
} else {
b.setAttribute(d, "" + a);
return a
}
}
} else {
if (hooks && "get" in hooks && notxml && (e = hooks.get(b, d)) !== null) {
return e
} else {
e = b.getAttribute(d);
return e === null ? H : e
}
}
},
removeAttr: function (c, b) {
var a, attrNames, name, l, isBool, i = 0;
if (b && c.nodeType === 1) {
attrNames = b.toLowerCase().split(rspace);
l = attrNames.length;
for (; i < l; i++) {
name = attrNames[i];
if (name) {
a = D.propFix[name] || name;
isBool = rboolean.test(name);
if (!isBool) {
D.attr(c, name, "")
}
c.removeAttribute(getSetAttribute ? name : a);
if (isBool && a in c) {
c[a] = false
}
}
}
}
},
attrHooks: {
type: {
set: function (c, a) {
if (rtype.test(c.nodeName) && c.parentNode) {
D.error("type property can't be changed")
} else {
if (!D.support.radioValue && a === "radio" && D.nodeName(c, "input")) {
var b = c.value;
c.setAttribute("type", a);
if (b) {
c.value = b
}
return a
}
}
}
},
value: {
get: function (b, a) {
if (nodeHook && D.nodeName(b, "button")) {
return nodeHook.get(b, a)
}
return a in b ? b.value : null
},
set: function (b, a, c) {
if (nodeHook && D.nodeName(b, "button")) {
return nodeHook.set(b, a, c)
}
b.value = a
}
}
},
propFix: {
tabindex: "tabIndex",
readonly: "readOnly",
"for": "htmlFor",
"class": "className",
maxlength: "maxLength",
cellspacing: "cellSpacing",
cellpadding: "cellPadding",
rowspan: "rowSpan",
colspan: "colSpan",
usemap: "useMap",
frameborder: "frameBorder",
contenteditable: "contentEditable"
},
prop: function (b, c, a) {
var d, hooks, notxml, nType = b.nodeType;
if (!b || nType === 3 || nType === 8 || nType === 2) {
return
}
notxml = nType !== 1 || !D.isXMLDoc(b);
if (notxml) {
c = D.propFix[c] || c;
hooks = D.propHooks[c]
}
if (a !== H) {
if (hooks && "set" in hooks && (d = hooks.set(b, a, c)) !== H) {
return d
} else {
return (b[c] = a)
}
} else {
if (hooks && "get" in hooks && (d = hooks.get(b, c)) !== null) {
return d
} else {
return b[c]
}
}
},
propHooks: {
tabIndex: {
get: function (a) {
var b = a.getAttributeNode("tabindex");
return b && b.specified ? parseInt(b.value, 10) : rfocusable.test(a.nodeName) || rclickable.test(a.nodeName) && a.href ? 0 : H
}
}
}
});
D.attrHooks.tabindex = D.propHooks.tabIndex;
boolHook = {
get: function (c, a) {
var b, property = D.prop(c, a);
return property === true || typeof property !== "boolean" && (b = c.getAttributeNode(a)) && b.nodeValue !== false ? a.toLowerCase() : H
},
set: function (c, a, d) {
var b;
if (a === false) {
D.removeAttr(c, d)
} else {
b = D.propFix[d] || d;
if (b in c) {
c[b] = true
}
c.setAttribute(d, d.toLowerCase())
}
return d
}
};
if (!getSetAttribute) {
fixSpecified = {
name: true,
id: true,
coords: true
};
nodeHook = D.valHooks.button = {
get: function (c, b) {
var a;
a = c.getAttributeNode(b);
return a && (fixSpecified[b] ? a.nodeValue !== "" : a.specified) ? a.nodeValue : H
},
set: function (b, a, c) {
var d = b.getAttributeNode(c);
if (!d) {
d = L.createAttribute(c);
b.setAttributeNode(d)
}
return (d.nodeValue = a + "")
}
};
D.attrHooks.tabindex.set = nodeHook.set;
D.each(["width", "height"], function (i, c) {
D.attrHooks[c] = D.extend(D.attrHooks[c], {
set: function (b, a) {
if (a === "") {
b.setAttribute(c, "auto");
return a
}
}
})
});
D.attrHooks.contenteditable = {
get: nodeHook.get,
set: function (b, a, c) {
if (a === "") {
a = "false"
}
nodeHook.set(b, a, c)
}
}
}
if (!D.support.hrefNormalized) {
D.each(["href", "src", "width", "height"], function (i, c) {
D.attrHooks[c] = D.extend(D.attrHooks[c], {
get: function (b) {
var a = b.getAttribute(c, 2);
return a === null ? H : a
}
})
})
}
if (!D.support.style) {
D.attrHooks.style = {
get: function (a) {
return a.style.cssText.toLowerCase() || H
},
set: function (b, a) {
return (b.style.cssText = "" + a)
}
}
}
if (!D.support.optSelected) {
D.propHooks.selected = D.extend(D.propHooks.selected, {
get: function (b) {
var a = b.parentNode;
if (a) {
a.selectedIndex;
if (a.parentNode) {
a.parentNode.selectedIndex
}
}
return null
}
})
}
if (!D.support.enctype) {
D.propFix.enctype = "encoding"
}
if (!D.support.checkOn) {
D.each(["radio", "checkbox"], function () {
D.valHooks[this] = {
get: function (a) {
return a.getAttribute("value") === null ? "on" : a.value
}
}
})
}
D.each(["radio", "checkbox"], function () {
D.valHooks[this] = D.extend(D.valHooks[this], {
set: function (b, a) {
if (D.isArray(a)) {
return (b.checked = D.inArray(D(b).val(), a) >= 0)
}
}
})
});
var F = /^(?:textarea|input|select)$/i,
rtypenamespace = /^([^\.]*)?(?:\.(.+))?$/,
rhoverHack = /(?:^|\s)hover(\.\S+)?\b/,
rkeyEvent = /^key/,
rmouseEvent = /^(?:mouse|contextmenu)|click/,
rfocusMorph = /^(?:focusinfocus|focusoutblur)$/,
rquickIs = /^(\w*)(?:#([\w\-]+))?(?:\.([\w\-]+))?$/,
quickParse = function (b) {
var a = rquickIs.exec(b);
if (a) {
a[1] = (a[1] || "").toLowerCase();
a[3] = a[3] && new RegExp("(?:^|\\s)" + a[3] + "(?:\\s|$)")
}
return a
}, quickIs = function (b, m) {
var a = b.attributes || {};
return ((!m[1] || b.nodeName.toLowerCase() === m[1]) && (!m[2] || (a.id || {}).value === m[2]) && (!m[3] || m[3].test((a["class"] || {}).value)))
}, hoverHack = function (a) {
return D.event.special.hover ? a : a.replace(rhoverHack, "mouseenter$1 mouseleave$1")
};
D.event = {
add: function (b, d, c, a, f) {
var g, eventHandle, events, t, tns, type, namespaces, handleObj, handleObjIn, quick, handlers, special;
if (b.nodeType === 3 || b.nodeType === 8 || !d || !c || !(g = D._data(b))) {
return
}
if (c.handler) {
handleObjIn = c;
c = handleObjIn.handler;
f = handleObjIn.selector
}
if (!c.guid) {
c.guid = D.guid++
}
events = g.events;
if (!events) {
g.events = events = {}
}
eventHandle = g.handle;
if (!eventHandle) {
g.handle = eventHandle = function (e) {
return typeof D !== "undefined" && (!e || D.event.triggered !== e.type) ? D.event.dispatch.apply(eventHandle.elem, arguments) : H
};
eventHandle.elem = b
}
d = D.trim(hoverHack(d)).split(" ");
for (t = 0; t < d.length; t++) {
tns = rtypenamespace.exec(d[t]) || [];
type = tns[1];
namespaces = (tns[2] || "").split(".").sort();
special = D.event.special[type] || {};
type = (f ? special.delegateType : special.bindType) || type;
special = D.event.special[type] || {};
handleObj = D.extend({
type: type,
origType: tns[1],
data: a,
handler: c,
guid: c.guid,
selector: f,
quick: f && quickParse(f),
namespace: namespaces.join(".")
}, handleObjIn);
handlers = events[type];
if (!handlers) {
handlers = events[type] = [];
handlers.delegateCount = 0;
if (!special.setup || special.setup.call(b, a, namespaces, eventHandle) === false) {
if (b.addEventListener) {
b.addEventListener(type, eventHandle, false)
} else {
if (b.attachEvent) {
b.attachEvent("on" + type, eventHandle)
}
}
}
}
if (special.add) {
special.add.call(b, handleObj);
if (!handleObj.handler.guid) {
handleObj.handler.guid = c.guid
}
}
if (f) {
handlers.splice(handlers.delegateCount++, 0, handleObj)
} else {
handlers.push(handleObj)
}
D.event.global[type] = true
}
b = null
},
global: {},
remove: function (a, c, b, e, d) {
var f = D.hasData(a) && D._data(a),
t, tns, type, origType, namespaces, origCount, j, events, special, handle, eventType, handleObj;
if (!f || !(events = f.events)) {
return
}
c = D.trim(hoverHack(c || "")).split(" ");
for (t = 0; t < c.length; t++) {
tns = rtypenamespace.exec(c[t]) || [];
type = origType = tns[1];
namespaces = tns[2];
if (!type) {
for (type in events) {
D.event.remove(a, type + c[t], b, e, true)
}
continue
}
special = D.event.special[type] || {};
type = (e ? special.delegateType : special.bindType) || type;
eventType = events[type] || [];
origCount = eventType.length;
namespaces = namespaces ? new RegExp("(^|\\.)" + namespaces.split(".").sort().join("\\.(?:.*\\.)?") + "(\\.|$)") : null;
for (j = 0; j < eventType.length; j++) {
handleObj = eventType[j];
if ((d || origType === handleObj.origType) && (!b || b.guid === handleObj.guid) && (!namespaces || namespaces.test(handleObj.namespace)) && (!e || e === handleObj.selector || e === "**" && handleObj.selector)) {
eventType.splice(j--, 1);
if (handleObj.selector) {
eventType.delegateCount--
}
if (special.remove) {
special.remove.call(a, handleObj)
}
}
}
if (eventType.length === 0 && origCount !== eventType.length) {
if (!special.teardown || special.teardown.call(a, namespaces) === false) {
D.removeEvent(a, type, f.handle)
}
delete events[type]
}
}
if (D.isEmptyObject(events)) {
handle = f.handle;
if (handle) {
handle.elem = null
}
D.removeData(a, ["events", "handle"], true)
}
},
customEvent: {
getData: true,
setData: true,
changeData: true
},
trigger: function (c, a, b, d) {
if (b && (b.nodeType === 3 || b.nodeType === 8)) {
return
}
var e = c.type || c,
namespaces = [],
cache, exclusive, i, cur, old, ontype, special, handle, eventPath, bubbleType;
if (rfocusMorph.test(e + D.event.triggered)) {
return
}
if (e.indexOf("!") >= 0) {
e = e.slice(0, -1);
exclusive = true
}
if (e.indexOf(".") >= 0) {
namespaces = e.split(".");
e = namespaces.shift();
namespaces.sort()
}
if ((!b || D.event.customEvent[e]) && !D.event.global[e]) {
return
}
c = typeof c === "object" ? c[D.expando] ? c : new D.Event(e, c) : new D.Event(e);
c.type = e;
c.isTrigger = true;
c.exclusive = exclusive;
c.namespace = namespaces.join(".");
c.namespace_re = c.namespace ? new RegExp("(^|\\.)" + namespaces.join("\\.(?:.*\\.)?") + "(\\.|$)") : null;
ontype = e.indexOf(":") < 0 ? "on" + e : "";
if (!b) {
cache = D.cache;
for (i in cache) {
if (cache[i].events && cache[i].events[e]) {
D.event.trigger(c, a, cache[i].handle.elem, true)
}
}
return
}
c.result = H;
if (!c.target) {
c.target = b
}
a = a != null ? D.makeArray(a) : [];
a.unshift(c);
special = D.event.special[e] || {};
if (special.trigger && special.trigger.apply(b, a) === false) {
return
}
eventPath = [
[b, special.bindType || e]
];
if (!d && !special.noBubble && !D.isWindow(b)) {
bubbleType = special.delegateType || e;
cur = rfocusMorph.test(bubbleType + e) ? b : b.parentNode;
old = null;
for (; cur; cur = cur.parentNode) {
eventPath.push([cur, bubbleType]);
old = cur
}
if (old && old === b.ownerDocument) {
eventPath.push([old.defaultView || old.parentWindow || x, bubbleType])
}
}
for (i = 0; i < eventPath.length && !c.isPropagationStopped(); i++) {
cur = eventPath[i][0];
c.type = eventPath[i][1];
handle = (D._data(cur, "events") || {})[c.type] && D._data(cur, "handle");
if (handle) {
handle.apply(cur, a)
}
handle = ontype && cur[ontype];
if (handle && D.acceptData(cur) && handle.apply(cur, a) === false) {
c.preventDefault()
}
}
c.type = e;
if (!d && !c.isDefaultPrevented()) {
if ((!special._default || special._default.apply(b.ownerDocument, a) === false) && !(e === "click" && D.nodeName(b, "a")) && D.acceptData(b)) {
if (ontype && b[e] && ((e !== "focus" && e !== "blur") || c.target.offsetWidth !== 0) && !D.isWindow(b)) {
old = b[ontype];
if (old) {
b[ontype] = null
}
D.event.triggered = e;
b[e]();
D.event.triggered = H;
if (old) {
b[ontype] = old
}
}
}
}
return c.result
},
dispatch: function (a) {
a = D.event.fix(a || x.event);
var b = ((D._data(this, "events") || {})[a.type] || []),
delegateCount = b.delegateCount,
args = [].slice.call(arguments, 0),
run_all = !a.exclusive && !a.namespace,
special = D.event.special[a.type] || {}, handlerQueue = [],
i, j, cur, jqcur, ret, selMatch, matched, matches, handleObj, sel, related;
args[0] = a;
a.delegateTarget = this;
if (special.preDispatch && special.preDispatch.call(this, a) === false) {
return
}
if (delegateCount && !(a.button && a.type === "click")) {
jqcur = D(this);
jqcur.context = this.ownerDocument || this;
for (cur = a.target; cur != this; cur = cur.parentNode || this) {
if (cur.disabled !== true) {
selMatch = {};
matches = [];
jqcur[0] = cur;
for (i = 0; i < delegateCount; i++) {
handleObj = b[i];
sel = handleObj.selector;
if (selMatch[sel] === H) {
selMatch[sel] = (handleObj.quick ? quickIs(cur, handleObj.quick) : jqcur.is(sel))
}
if (selMatch[sel]) {
matches.push(handleObj)
}
}
if (matches.length) {
handlerQueue.push({
elem: cur,
matches: matches
})
}
}
}
}
if (b.length > delegateCount) {
handlerQueue.push({
elem: this,
matches: b.slice(delegateCount)
})
}
for (i = 0; i < handlerQueue.length && !a.isPropagationStopped(); i++) {
matched = handlerQueue[i];
a.currentTarget = matched.elem;
for (j = 0; j < matched.matches.length && !a.isImmediatePropagationStopped(); j++) {
handleObj = matched.matches[j];
if (run_all || (!a.namespace && !handleObj.namespace) || a.namespace_re && a.namespace_re.test(handleObj.namespace)) {
a.data = handleObj.data;
a.handleObj = handleObj;
ret = ((D.event.special[handleObj.origType] || {}).handle || handleObj.handler).apply(matched.elem, args);
if (ret !== H) {
a.result = ret;
if (ret === false) {
a.preventDefault();
a.stopPropagation()
}
}
}
}
}
if (special.postDispatch) {
special.postDispatch.call(this, a)
}
return a.result
},
props: "attrChange attrName relatedNode srcElement altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),
fixHooks: {},
keyHooks: {
props: "char charCode key keyCode".split(" "),
filter: function (a, b) {
if (a.which == null) {
a.which = b.charCode != null ? b.charCode : b.keyCode
}
return a
}
},
mouseHooks: {
props: "button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),
filter: function (a, c) {
var b, doc, body, button = c.button,
fromElement = c.fromElement;
if (a.pageX == null && c.clientX != null) {
b = a.target.ownerDocument || L;
doc = b.documentElement;
body = b.body;
a.pageX = c.clientX + (doc && doc.scrollLeft || body && body.scrollLeft || 0) - (doc && doc.clientLeft || body && body.clientLeft || 0);
a.pageY = c.clientY + (doc && doc.scrollTop || body && body.scrollTop || 0) - (doc && doc.clientTop || body && body.clientTop || 0)
}
if (!a.relatedTarget && fromElement) {
a.relatedTarget = fromElement === a.target ? c.toElement : fromElement
}
if (!a.which && button !== H) {
a.which = (button & 1 ? 1 : (button & 2 ? 3 : (button & 4 ? 2 : 0)))
}
return a
}
},
fix: function (a) {
if (a[D.expando]) {
return a
}
var i, prop, originalEvent = a,
fixHook = D.event.fixHooks[a.type] || {}, copy = fixHook.props ? this.props.concat(fixHook.props) : this.props;
a = D.Event(originalEvent);
for (i = copy.length; i;) {
prop = copy[--i];
a[prop] = originalEvent[prop]
}
if (!a.target) {
a.target = originalEvent.srcElement || L
}
if (a.target.nodeType === 3) {
a.target = a.target.parentNode
}
if (a.metaKey === H) {
a.metaKey = a.ctrlKey
}
return fixHook.filter ? fixHook.filter(a, originalEvent) : a
},
special: {
ready: {
setup: D.bindReady
},
load: {
noBubble: true
},
focus: {
delegateType: "focusin"
},
blur: {
delegateType: "focusout"
},
beforeunload: {
setup: function (b, a, c) {
if (D.isWindow(this)) {
this.onbeforeunload = c
}
},
teardown: function (b, a) {
if (this.onbeforeunload === a) {
this.onbeforeunload = null
}
}
}
},
simulate: function (c, a, b, d) {
var e = D.extend(new D.Event(), b, {
type: c,
isSimulated: true,
originalEvent: {}
});
if (d) {
D.event.trigger(e, null, a)
} else {
D.event.dispatch.call(a, e)
} if (e.isDefaultPrevented()) {
b.preventDefault()
}
}
};
D.event.handle = D.event.dispatch;
D.removeEvent = L.removeEventListener ? function (b, c, a) {
if (b.removeEventListener) {
b.removeEventListener(c, a, false)
}
} : function (b, c, a) {
if (b.detachEvent) {
b.detachEvent("on" + c, a)
}
};
D.Event = function (a, b) {
if (!(this instanceof D.Event)) {
return new D.Event(a, b)
}
if (a && a.type) {
this.originalEvent = a;
this.type = a.type;
this.isDefaultPrevented = (a.defaultPrevented || a.returnValue === false || a.getPreventDefault && a.getPreventDefault()) ? returnTrue : returnFalse
} else {
this.type = a
} if (b) {
D.extend(this, b)
}
this.timeStamp = a && a.timeStamp || D.now();
this[D.expando] = true
};
function returnFalse() {
return false
}
function returnTrue() {
return true
}
D.Event.prototype = {
preventDefault: function () {
this.isDefaultPrevented = returnTrue;
var e = this.originalEvent;
if (!e) {
return
}
if (e.preventDefault) {
e.preventDefault()
} else {
e.returnValue = false
}
},
stopPropagation: function () {
this.isPropagationStopped = returnTrue;
var e = this.originalEvent;
if (!e) {
return
}
if (e.stopPropagation) {
e.stopPropagation()
}
e.cancelBubble = true
},
stopImmediatePropagation: function () {
this.isImmediatePropagationStopped = returnTrue;
this.stopPropagation()
},
isDefaultPrevented: returnFalse,
isPropagationStopped: returnFalse,
isImmediatePropagationStopped: returnFalse
};
D.each({
mouseenter: "mouseover",
mouseleave: "mouseout"
}, function (d, c) {
D.event.special[d] = {
delegateType: c,
bindType: c,
handle: function (a) {
var b = this,
related = a.relatedTarget,
handleObj = a.handleObj,
selector = handleObj.selector,
ret;
if (!related || (related !== b && !D.contains(b, related))) {
a.type = handleObj.origType;
ret = handleObj.handler.apply(this, arguments);
a.type = c
}
return ret
}
}
});
if (!D.support.submitBubbles) {
D.event.special.submit = {
setup: function () {
if (D.nodeName(this, "form")) {
return false
}
D.event.add(this, "click._submit keypress._submit", function (e) {
var b = e.target,
form = D.nodeName(b, "input") || D.nodeName(b, "button") ? b.form : H;
if (form && !form._submit_attached) {
D.event.add(form, "submit._submit", function (a) {
a._submit_bubble = true
});
form._submit_attached = true
}
})
},
postDispatch: function (a) {
if (a._submit_bubble) {
delete a._submit_bubble;
if (this.parentNode && !a.isTrigger) {
D.event.simulate("submit", this.parentNode, a, true)
}
}
},
teardown: function () {
if (D.nodeName(this, "form")) {
return false
}
D.event.remove(this, "._submit")
}
}
}
if (!D.support.changeBubbles) {
D.event.special.change = {
setup: function () {
if (F.test(this.nodeName)) {
if (this.type === "checkbox" || this.type === "radio") {
D.event.add(this, "propertychange._change", function (a) {
if (a.originalEvent.propertyName === "checked") {
this._just_changed = true
}
});
D.event.add(this, "click._change", function (a) {
if (this._just_changed && !a.isTrigger) {
this._just_changed = false;
D.event.simulate("change", this, a, true)
}
})
}
return false
}
D.event.add(this, "beforeactivate._change", function (e) {
var b = e.target;
if (F.test(b.nodeName) && !b._change_attached) {
D.event.add(b, "change._change", function (a) {
if (this.parentNode && !a.isSimulated && !a.isTrigger) {
D.event.simulate("change", this.parentNode, a, true)
}
});
b._change_attached = true
}
})
},
handle: function (a) {
var b = a.target;
if (this !== b || a.isSimulated || a.isTrigger || (b.type !== "radio" && b.type !== "checkbox")) {
return a.handleObj.handler.apply(this, arguments)
}
},
teardown: function () {
D.event.remove(this, "._change");
return F.test(this.nodeName)
}
}
}
if (!D.support.focusinBubbles) {
D.each({
focus: "focusin",
blur: "focusout"
}, function (c, b) {
var d = 0,
handler = function (a) {
D.event.simulate(b, a.target, D.event.fix(a), true)
};
D.event.special[b] = {
setup: function () {
if (d++ === 0) {
L.addEventListener(c, handler, true)
}
},
teardown: function () {
if (--d === 0) {
L.removeEventListener(c, handler, true)
}
}
}
})
}
D.fn.extend({
on: function (e, g, c, d, f) {
var b, type;
if (typeof e === "object") {
if (typeof g !== "string") {
c = c || g;
g = H
}
for (type in e) {
this.on(type, g, c, e[type], f)
}
return this
}
if (c == null && d == null) {
d = g;
c = g = H
} else {
if (d == null) {
if (typeof g === "string") {
d = c;
c = H
} else {
d = c;
c = g;
g = H
}
}
} if (d === false) {
d = returnFalse
} else {
if (!d) {
return this
}
} if (f === 1) {
b = d;
d = function (a) {
D().off(a);
return b.apply(this, arguments)
};
d.guid = b.guid || (b.guid = D.guid++)
}
return this.each(function () {
D.event.add(this, e, d, c, g)
})
},
one: function (c, d, a, b) {
return this.on(c, d, a, b, 1)
},
off: function (c, e, a) {
if (c && c.preventDefault && c.handleObj) {
var d = c.handleObj;
D(c.delegateTarget).off(d.namespace ? d.origType + "." + d.namespace : d.origType, d.selector, d.handler);
return this
}
if (typeof c === "object") {
for (var b in c) {
this.off(b, e, c[b])
}
return this
}
if (e === false || typeof e === "function") {
a = e;
e = H
}
if (a === false) {
a = returnFalse
}
return this.each(function () {
D.event.remove(this, c, a, e)
})
},
bind: function (c, a, b) {
return this.on(c, null, a, b)
},
unbind: function (a, b) {
return this.off(a, null, b)
},
live: function (c, a, b) {
D(this.context).on(c, this.selector, a, b);
return this
},
die: function (a, b) {
D(this.context).off(a, this.selector || "**", b);
return this
},
delegate: function (d, c, a, b) {
return this.on(c, d, a, b)
},
undelegate: function (c, b, a) {
return arguments.length == 1 ? this.off(c, "**") : this.off(b, c, a)
},
trigger: function (a, b) {
return this.each(function () {
D.event.trigger(a, b, this)
})
},
triggerHandler: function (a, b) {
if (this[0]) {
return D.event.trigger(a, b, this[0], true)
}
},
toggle: function (c) {
var d = arguments,
guid = c.guid || D.guid++,
i = 0,
toggler = function (b) {
var a = (D._data(this, "lastToggle" + c.guid) || 0) % i;
D._data(this, "lastToggle" + c.guid, a + 1);
b.preventDefault();
return d[a].apply(this, arguments) || false
};
toggler.guid = guid;
while (i < d.length) {
d[i++].guid = guid
}
return this.click(toggler)
},
hover: function (a, b) {
return this.mouseenter(a).mouseleave(b || a)
}
});
D.each(("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu").split(" "), function (i, c) {
D.fn[c] = function (a, b) {
if (b == null) {
b = a;
a = null
}
return arguments.length > 0 ? this.on(c, null, a, b) : this.trigger(c)
};
if (D.attrFn) {
D.attrFn[c] = true
}
if (rkeyEvent.test(c)) {
D.event.fixHooks[c] = D.event.keyHooks
}
if (rmouseEvent.test(c)) {
D.event.fixHooks[c] = D.event.mouseHooks
}
});
(function () {
var o = /((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,
expando = "sizcache" + (Math.random() + "").replace(".", ""),
done = 0,
toString = Object.prototype.toString,
hasDuplicate = false,
baseHasDuplicate = true,
rBackslash = /\\/g,
rReturn = /\r\n/g,
rNonWord = /\W/;
[0, 0].sort(function () {
baseHasDuplicate = false;
return 0
});
var t = function (e, a, b, d) {
b = b || [];
a = a || L;
var c = a;
if (a.nodeType !== 1 && a.nodeType !== 9) {
return []
}
if (!e || typeof e !== "string") {
return b
}
var m, set, checkSet, extra, ret, cur, pop, i, prune = true,
contextXML = t.isXML(a),
parts = [],
soFar = e;
do {
o.exec("");
m = o.exec(soFar);
if (m) {
soFar = m[3];
parts.push(m[1]);
if (m[2]) {
extra = m[3];
break
}
}
} while (m);
if (parts.length > 1 && r.exec(e)) {
if (parts.length === 2 && q.relative[parts[0]]) {
set = k(parts[0] + parts[1], a, d)
} else {
set = q.relative[parts[0]] ? [a] : t(parts.shift(), a);
while (parts.length) {
e = parts.shift();
if (q.relative[e]) {
e += parts.shift()
}
set = k(e, set, d)
}
}
} else {
if (!d && parts.length > 1 && a.nodeType === 9 && !contextXML && q.match.ID.test(parts[0]) && !q.match.ID.test(parts[parts.length - 1])) {
ret = t.find(parts.shift(), a, contextXML);
a = ret.expr ? t.filter(ret.expr, ret.set)[0] : ret.set[0]
}
if (a) {
ret = d ? {
expr: parts.pop(),
set: p(d)
} : t.find(parts.pop(), parts.length === 1 && (parts[0] === "~" || parts[0] === "+") && a.parentNode ? a.parentNode : a, contextXML);
set = ret.expr ? t.filter(ret.expr, ret.set) : ret.set;
if (parts.length > 0) {
checkSet = p(set)
} else {
prune = false
}
while (parts.length) {
cur = parts.pop();
pop = cur;
if (!q.relative[cur]) {
cur = ""
} else {
pop = parts.pop()
} if (pop == null) {
pop = a
}
q.relative[cur](checkSet, pop, contextXML)
}
} else {
checkSet = parts = []
}
} if (!checkSet) {
checkSet = set
}
if (!checkSet) {
t.error(cur || e)
}
if (toString.call(checkSet) === "[object Array]") {
if (!prune) {
b.push.apply(b, checkSet)
} else {
if (a && a.nodeType === 1) {
for (i = 0; checkSet[i] != null; i++) {
if (checkSet[i] && (checkSet[i] === true || checkSet[i].nodeType === 1 && t.contains(a, checkSet[i]))) {
b.push(set[i])
}
}
} else {
for (i = 0; checkSet[i] != null; i++) {
if (checkSet[i] && checkSet[i].nodeType === 1) {
b.push(set[i])
}
}
}
}
} else {
p(checkSet, b)
} if (extra) {
t(extra, c, b, d);
t.uniqueSort(b)
}
return b
};
t.uniqueSort = function (a) {
if (n) {
hasDuplicate = baseHasDuplicate;
a.sort(n);
if (hasDuplicate) {
for (var i = 1; i < a.length; i++) {
if (a[i] === a[i - 1]) {
a.splice(i--, 1)
}
}
}
}
return a
};
t.matches = function (a, b) {
return t(a, null, null, b)
};
t.matchesSelector = function (a, b) {
return t(b, null, null, [a]).length > 0
};
t.find = function (c, d, a) {
var b, i, len, match, s, left;
if (!c) {
return []
}
for (i = 0, len = q.order.length; i < len; i++) {
s = q.order[i];
if ((match = q.leftMatch[s].exec(c))) {
left = match[1];
match.splice(1, 1);
if (left.substr(left.length - 1) !== "\\") {
match[1] = (match[1] || "").replace(rBackslash, "");
b = q.find[s](match, d, a);
if (b != null) {
c = c.replace(q.match[s], "");
break
}
}
}
}
if (!b) {
b = typeof d.getElementsByTagName !== "undefined" ? d.getElementsByTagName("*") : []
}
return {
set: b,
expr: c
}
};
t.filter = function (b, a, e, c) {
var d, anyFound, s, found, item, filter, left, i, pass, old = b,
result = [],
curLoop = a,
isXMLFilter = a && a[0] && t.isXML(a[0]);
while (b && a.length) {
for (s in q.filter) {
if ((d = q.leftMatch[s].exec(b)) != null && d[2]) {
filter = q.filter[s];
left = d[1];
anyFound = false;
d.splice(1, 1);
if (left.substr(left.length - 1) === "\\") {
continue
}
if (curLoop === result) {
result = []
}
if (q.preFilter[s]) {
d = q.preFilter[s](d, curLoop, e, result, c, isXMLFilter);
if (!d) {
anyFound = found = true
} else {
if (d === true) {
continue
}
}
}
if (d) {
for (i = 0;
(item = curLoop[i]) != null; i++) {
if (item) {
found = filter(item, d, i, curLoop);
pass = c ^ found;
if (e && found != null) {
if (pass) {
anyFound = true
} else {
curLoop[i] = false
}
} else {
if (pass) {
result.push(item);
anyFound = true
}
}
}
}
}
if (found !== H) {
if (!e) {
curLoop = result
}
b = b.replace(q.match[s], "");
if (!anyFound) {
return []
}
break
}
}
}
if (b === old) {
if (anyFound == null) {
t.error(b)
} else {
break
}
}
old = b
}
return curLoop
};
t.error = function (a) {
throw new Error("Syntax error, unrecognized expression: " + a)
};
var u = t.getText = function (a) {
var i, node, nodeType = a.nodeType,
ret = "";
if (nodeType) {
if (nodeType === 1 || nodeType === 9 || nodeType === 11) {
if (typeof a.textContent === "string") {
return a.textContent
} else {
if (typeof a.innerText === "string") {
return a.innerText.replace(rReturn, "")
} else {
for (a = a.firstChild; a; a = a.nextSibling) {
ret += u(a)
}
}
}
} else {
if (nodeType === 3 || nodeType === 4) {
return a.nodeValue
}
}
} else {
for (i = 0;
(node = a[i]); i++) {
if (node.nodeType !== 8) {
ret += u(node)
}
}
}
return ret
};
var q = t.selectors = {
order: ["ID", "NAME", "TAG"],
match: {
ID: /#((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,
CLASS: /\.((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,
NAME: /\[name=['"]*((?:[\w\u00c0-\uFFFF\-]|\\.)+)['"]*\]/,
ATTR: /\[\s*((?:[\w\u00c0-\uFFFF\-]|\\.)+)\s*(?:(\S?=)\s*(?:(['"])(.*?)\3|(#?(?:[\w\u00c0-\uFFFF\-]|\\.)*)|)|)\s*\]/,
TAG: /^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/,
CHILD: /:(only|nth|last|first)-child(?:\(\s*(even|odd|(?:[+\-]?\d+|(?:[+\-]?\d*)?n\s*(?:[+\-]\s*\d+)?))\s*\))?/,
POS: /:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/,
PSEUDO: /:((?:[\w\u00c0-\uFFFF\-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/
},
leftMatch: {},
attrMap: {
"class": "className",
"for": "htmlFor"
},
attrHandle: {
href: function (a) {
return a.getAttribute("href")
},
type: function (a) {
return a.getAttribute("type")
}
},
relative: {
"+": function (a, c) {
var b = typeof c === "string",
isTag = b && !rNonWord.test(c),
isPartStrNotTag = b && !isTag;
if (isTag) {
c = c.toLowerCase()
}
for (var i = 0, l = a.length, elem; i < l; i++) {
if ((elem = a[i])) {
while ((elem = elem.previousSibling) && elem.nodeType !== 1) {}
a[i] = isPartStrNotTag || elem && elem.nodeName.toLowerCase() === c ? elem || false : elem === c
}
}
if (isPartStrNotTag) {
t.filter(c, a, true)
}
},
">": function (a, d) {
var b, isPartStr = typeof d === "string",
i = 0,
l = a.length;
if (isPartStr && !rNonWord.test(d)) {
d = d.toLowerCase();
for (; i < l; i++) {
b = a[i];
if (b) {
var c = b.parentNode;
a[i] = c.nodeName.toLowerCase() === d ? c : false
}
}
} else {
for (; i < l; i++) {
b = a[i];
if (b) {
a[i] = isPartStr ? b.parentNode : b.parentNode === d
}
}
if (isPartStr) {
t.filter(d, a, true)
}
}
},
"": function (c, d, a) {
var b, doneName = done++,
checkFn = dirCheck;
if (typeof d === "string" && !rNonWord.test(d)) {
d = d.toLowerCase();
b = d;
checkFn = dirNodeCheck
}
checkFn("parentNode", d, doneName, c, b, a)
},
"~": function (c, d, a) {
var b, doneName = done++,
checkFn = dirCheck;
if (typeof d === "string" && !rNonWord.test(d)) {
d = d.toLowerCase();
b = d;
checkFn = dirNodeCheck
}
checkFn("previousSibling", d, doneName, c, b, a)
}
},
find: {
ID: function (c, b, a) {
if (typeof b.getElementById !== "undefined" && !a) {
var m = b.getElementById(c[1]);
return m && m.parentNode ? [m] : []
}
},
NAME: function (c, a) {
if (typeof a.getElementsByName !== "undefined") {
var b = [],
results = a.getElementsByName(c[1]);
for (var i = 0, l = results.length; i < l; i++) {
if (results[i].getAttribute("name") === c[1]) {
b.push(results[i])
}
}
return b.length === 0 ? null : b
}
},
TAG: function (a, b) {
if (typeof b.getElementsByTagName !== "undefined") {
return b.getElementsByTagName(a[1])
}
}
},
preFilter: {
CLASS: function (c, e, d, f, b, a) {
c = " " + c[1].replace(rBackslash, "") + " ";
if (a) {
return c
}
for (var i = 0, elem;
(elem = e[i]) != null; i++) {
if (elem) {
if (b ^ (elem.className && (" " + elem.className + " ").replace(/[\t\n\r]/g, " ").indexOf(c) >= 0)) {
if (!d) {
f.push(elem)
}
} else {
if (d) {
e[i] = false
}
}
}
}
return false
},
ID: function (a) {
return a[1].replace(rBackslash, "")
},
TAG: function (a, b) {
return a[1].replace(rBackslash, "").toLowerCase()
},
CHILD: function (a) {
if (a[1] === "nth") {
if (!a[2]) {
t.error(a[0])
}
a[2] = a[2].replace(/^\+|\s*/g, "");
var b = /(-?)(\d*)(?:n([+\-]?\d*))?/.exec(a[2] === "even" && "2n" || a[2] === "odd" && "2n+1" || !/\D/.test(a[2]) && "0n+" + a[2] || a[2]);
a[2] = (b[1] + (b[2] || 1)) - 0;
a[3] = b[3] - 0
} else {
if (a[2]) {
t.error(a[0])
}
}
a[0] = done++;
return a
},
ATTR: function (c, f, e, g, b, a) {
var d = c[1] = c[1].replace(rBackslash, "");
if (!a && q.attrMap[d]) {
c[1] = q.attrMap[d]
}
c[4] = (c[4] || c[5] || "").replace(rBackslash, "");
if (c[2] === "~=") {
c[4] = " " + c[4] + " "
}
return c
},
PSEUDO: function (b, e, d, f, a) {
if (b[1] === "not") {
if ((o.exec(b[3]) || "").length > 1 || /^\w/.test(b[3])) {
b[3] = t(b[3], null, null, e)
} else {
var c = t.filter(b[3], e, d, true ^ a);
if (!d) {
f.push.apply(f, c)
}
return false
}
} else {
if (q.match.POS.test(b[0]) || q.match.CHILD.test(b[0])) {
return true
}
}
return b
},
POS: function (a) {
a.unshift(true);
return a
}
},
filters: {
enabled: function (a) {
return a.disabled === false && a.type !== "hidden"
},
disabled: function (a) {
return a.disabled === true
},
checked: function (a) {
return a.checked === true
},
selected: function (a) {
if (a.parentNode) {
a.parentNode.selectedIndex
}
return a.selected === true
},
parent: function (a) {
return !!a.firstChild
},
empty: function (a) {
return !a.firstChild
},
has: function (a, i, b) {
return !!t(b[3], a).length
},
header: function (a) {
return (/h\d/i).test(a.nodeName)
},
text: function (b) {
var a = b.getAttribute("type"),
s = b.type;
return b.nodeName.toLowerCase() === "input" && "text" === s && (a === s || a === null)
},
radio: function (a) {
return a.nodeName.toLowerCase() === "input" && "radio" === a.type
},
checkbox: function (a) {
return a.nodeName.toLowerCase() === "input" && "checkbox" === a.type
},
file: function (a) {
return a.nodeName.toLowerCase() === "input" && "file" === a.type
},
password: function (a) {
return a.nodeName.toLowerCase() === "input" && "password" === a.type
},
submit: function (b) {
var a = b.nodeName.toLowerCase();
return (a === "input" || a === "button") && "submit" === b.type
},
image: function (a) {
return a.nodeName.toLowerCase() === "input" && "image" === a.type
},
reset: function (b) {
var a = b.nodeName.toLowerCase();
return (a === "input" || a === "button") && "reset" === b.type
},
button: function (b) {
var a = b.nodeName.toLowerCase();
return a === "input" && "button" === b.type || a === "button"
},
input: function (a) {
return (/input|select|textarea|button/i).test(a.nodeName)
},
focus: function (a) {
return a === a.ownerDocument.activeElement
}
},
setFilters: {
first: function (a, i) {
return i === 0
},
last: function (b, i, c, a) {
return i === a.length - 1
},
even: function (a, i) {
return i % 2 === 0
},
odd: function (a, i) {
return i % 2 === 1
},
lt: function (a, i, b) {
return i < b[3] - 0
},
gt: function (a, i, b) {
return i > b[3] - 0
},
nth: function (a, i, b) {
return b[3] - 0 === i
},
eq: function (a, i, b) {
return b[3] - 0 === i
}
},
filter: {
PSEUDO: function (b, d, i, a) {
var e = d[1],
filter = q.filters[e];
if (filter) {
return filter(b, i, d, a)
} else {
if (e === "contains") {
return (b.textContent || b.innerText || u([b]) || "").indexOf(d[3]) >= 0
} else {
if (e === "not") {
var c = d[3];
for (var j = 0, l = c.length; j < l; j++) {
if (c[j] === b) {
return false
}
}
return true
} else {
t.error(e)
}
}
}
},
CHILD: function (c, a) {
var b, last, doneName, parent, cache, count, diff, s = a[1],
node = c;
switch (s) {
case "only":
case "first":
while ((node = node.previousSibling)) {
if (node.nodeType === 1) {
return false
}
}
if (s === "first") {
return true
}
node = c;
case "last":
while ((node = node.nextSibling)) {
if (node.nodeType === 1) {
return false
}
}
return true;
case "nth":
b = a[2];
last = a[3];
if (b === 1 && last === 0) {
return true
}
doneName = a[0];
parent = c.parentNode;
if (parent && (parent[expando] !== doneName || !c.nodeIndex)) {
count = 0;
for (node = parent.firstChild; node; node = node.nextSibling) {
if (node.nodeType === 1) {
node.nodeIndex = ++count
}
}
parent[expando] = doneName
}
diff = c.nodeIndex - last;
if (b === 0) {
return diff === 0
} else {
return (diff % b === 0 && diff / b >= 0)
}
}
},
ID: function (b, a) {
return b.nodeType === 1 && b.getAttribute("id") === a
},
TAG: function (b, a) {
return (a === "*" && b.nodeType === 1) || !! b.nodeName && b.nodeName.toLowerCase() === a
},
CLASS: function (b, a) {
return (" " + (b.className || b.getAttribute("class")) + " ").indexOf(a) > -1
},
ATTR: function (c, a) {
var b = a[1],
result = t.attr ? t.attr(c, b) : q.attrHandle[b] ? q.attrHandle[b](c) : c[b] != null ? c[b] : c.getAttribute(b),
value = result + "",
s = a[2],
check = a[4];
return result == null ? s === "!=" : !s && t.attr ? result != null : s === "=" ? value === check : s === "*=" ? value.indexOf(check) >= 0 : s === "~=" ? (" " + value + " ").indexOf(check) >= 0 : !check ? value && result !== false : s === "!=" ? value !== check : s === "^=" ? value.indexOf(check) === 0 : s === "$=" ? value.substr(value.length - check.length) === check : s === "|=" ? value === check || value.substr(0, check.length + 1) === check + "-" : false
},
POS: function (b, c, i, a) {
var d = c[2],
filter = q.setFilters[d];
if (filter) {
return filter(b, i, c, a)
}
}
}
};
var r = q.match.POS,
fescape = function (b, a) {
return "\\" + (a - 0 + 1)
};
for (var s in q.match) {
q.match[s] = new RegExp(q.match[s].source + (/(?![^\[]*\])(?![^\(]*\))/.source));
q.leftMatch[s] = new RegExp(/(^(?:.|\r|\n)*?)/.source + q.match[s].source.replace(/\\(\d+)/g, fescape))
}
q.match.globalPOS = r;
var p = function (b, a) {
b = Array.prototype.slice.call(b, 0);
if (a) {
a.push.apply(a, b);
return a
}
return b
};
try {
Array.prototype.slice.call(L.documentElement.childNodes, 0)[0].nodeType
} catch (e) {
p = function (a, b) {
var i = 0,
ret = b || [];
if (toString.call(a) === "[object Array]") {
Array.prototype.push.apply(ret, a)
} else {
if (typeof a.length === "number") {
for (var l = a.length; i < l; i++) {
ret.push(a[i])
}
} else {
for (; a[i]; i++) {
ret.push(a[i])
}
}
}
return ret
}
}
var n, siblingCheck;
if (L.documentElement.compareDocumentPosition) {
n = function (a, b) {
if (a === b) {
hasDuplicate = true;
return 0
}
if (!a.compareDocumentPosition || !b.compareDocumentPosition) {
return a.compareDocumentPosition ? -1 : 1
}
return a.compareDocumentPosition(b) & 4 ? -1 : 1
}
} else {
n = function (a, b) {
if (a === b) {
hasDuplicate = true;
return 0
} else {
if (a.sourceIndex && b.sourceIndex) {
return a.sourceIndex - b.sourceIndex
}
}
var c, bl, ap = [],
bp = [],
aup = a.parentNode,
bup = b.parentNode,
cur = aup;
if (aup === bup) {
return siblingCheck(a, b)
} else {
if (!aup) {
return -1
} else {
if (!bup) {
return 1
}
}
}
while (cur) {
ap.unshift(cur);
cur = cur.parentNode
}
cur = bup;
while (cur) {
bp.unshift(cur);
cur = cur.parentNode
}
c = ap.length;
bl = bp.length;
for (var i = 0; i < c && i < bl; i++) {
if (ap[i] !== bp[i]) {
return siblingCheck(ap[i], bp[i])
}
}
return i === c ? siblingCheck(a, bp[i], -1) : siblingCheck(ap[i], b, 1)
};
siblingCheck = function (a, b, d) {
if (a === b) {
return d
}
var c = a.nextSibling;
while (c) {
if (c === b) {
return -1
}
c = c.nextSibling
}
return 1
}
}(function () {
var d = L.createElement("div"),
id = "script" + (new Date()).getTime(),
root = L.documentElement;
d.innerHTML = "<a name='" + id + "'/>";
root.insertBefore(d, root.firstChild);
if (L.getElementById(id)) {
q.find.ID = function (c, b, a) {
if (typeof b.getElementById !== "undefined" && !a) {
var m = b.getElementById(c[1]);
return m ? m.id === c[1] || typeof m.getAttributeNode !== "undefined" && m.getAttributeNode("id").nodeValue === c[1] ? [m] : H : []
}
};
q.filter.ID = function (c, a) {
var b = typeof c.getAttributeNode !== "undefined" && c.getAttributeNode("id");
return c.nodeType === 1 && b && b.nodeValue === a
}
}
root.removeChild(d);
root = d = null
})();
(function () {
var e = L.createElement("div");
e.appendChild(L.createComment(""));
if (e.getElementsByTagName("*").length > 0) {
q.find.TAG = function (d, a) {
var b = a.getElementsByTagName(d[1]);
if (d[1] === "*") {
var c = [];
for (var i = 0; b[i]; i++) {
if (b[i].nodeType === 1) {
c.push(b[i])
}
}
b = c
}
return b
}
}
e.innerHTML = "<a href='#'></a>";
if (e.firstChild && typeof e.firstChild.getAttribute !== "undefined" && e.firstChild.getAttribute("href") !== "#") {
q.attrHandle.href = function (a) {
return a.getAttribute("href", 2)
}
}
e = null
})(); if (L.querySelectorAll) {
(function () {
var i = t,
div = L.createElement("div"),
id = "__sizzle__";
div.innerHTML = "<p class='TEST'></p>";
if (div.querySelectorAll && div.querySelectorAll(".TEST").length === 0) {
return
}
t = function (a, c, g, f) {
c = c || L;
if (!f && !t.isXML(c)) {
var d = /^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(a);
if (d && (c.nodeType === 1 || c.nodeType === 9)) {
if (d[1]) {
return p(c.getElementsByTagName(a), g)
} else {
if (d[2] && q.find.CLASS && c.getElementsByClassName) {
return p(c.getElementsByClassName(d[2]), g)
}
}
}
if (c.nodeType === 9) {
if (a === "body" && c.body) {
return p([c.body], g)
} else {
if (d && d[3]) {
var b = c.getElementById(d[3]);
if (b && b.parentNode) {
if (b.id === d[3]) {
return p([b], g)
}
} else {
return p([], g)
}
}
}
try {
return p(c.querySelectorAll(a), g)
} catch (qsaError) {}
} else {
if (c.nodeType === 1 && c.nodeName.toLowerCase() !== "object") {
var e = c,
old = c.getAttribute("id"),
nid = old || id,
hasParent = c.parentNode,
relativeHierarchySelector = /^\s*[+~]/.test(a);
if (!old) {
c.setAttribute("id", nid)
} else {
nid = nid.replace(/'/g, "\\$&")
} if (relativeHierarchySelector && hasParent) {
c = c.parentNode
}
try {
if (!relativeHierarchySelector || hasParent) {
return p(c.querySelectorAll("[id='" + nid + "'] " + a), g)
}
} catch (pseudoError) {} finally {
if (!old) {
e.removeAttribute("id")
}
}
}
}
}
return i(a, c, g, f)
};
for (var h in i) {
t[h] = i[h]
}
div = null
})()
}(function () {
var f = L.documentElement,
matches = f.matchesSelector || f.mozMatchesSelector || f.webkitMatchesSelector || f.msMatchesSelector;
if (matches) {
var d = !matches.call(L.createElement("div"), "div"),
pseudoWorks = false;
try {
matches.call(L.documentElement, "[test!='']:sizzle")
} catch (pseudoError) {
pseudoWorks = true
}
t.matchesSelector = function (b, c) {
c = c.replace(/\=\s*([^'"\]]*)\s*\]/g, "='$1']");
if (!t.isXML(b)) {
try {
if (pseudoWorks || !q.match.PSEUDO.test(c) && !/!=/.test(c)) {
var a = matches.call(b, c);
if (a || !d || b.document && b.document.nodeType !== 11) {
return a
}
}
} catch (e) {}
}
return t(c, null, null, [b]).length > 0
}
}
})();
(function () {
var d = L.createElement("div");
d.innerHTML = "<div class='test e'></div><div class='test'></div>";
if (!d.getElementsByClassName || d.getElementsByClassName("e").length === 0) {
return
}
d.lastChild.className = "e";
if (d.getElementsByClassName("e").length === 1) {
return
}
q.order.splice(1, 0, "CLASS");
q.find.CLASS = function (c, b, a) {
if (typeof b.getElementsByClassName !== "undefined" && !a) {
return b.getElementsByClassName(c[1])
}
};
d = null
})();
function dirNodeCheck(g, d, e, a, c, b) {
for (var i = 0, l = a.length; i < l; i++) {
var h = a[i];
if (h) {
var f = false;
h = h[g];
while (h) {
if (h[expando] === e) {
f = a[h.sizset];
break
}
if (h.nodeType === 1 && !b) {
h[expando] = e;
h.sizset = i
}
if (h.nodeName.toLowerCase() === d) {
f = h;
break
}
h = h[g]
}
a[i] = f
}
}
}
function dirCheck(g, d, e, a, c, b) {
for (var i = 0, l = a.length; i < l; i++) {
var h = a[i];
if (h) {
var f = false;
h = h[g];
while (h) {
if (h[expando] === e) {
f = a[h.sizset];
break
}
if (h.nodeType === 1) {
if (!b) {
h[expando] = e;
h.sizset = i
}
if (typeof d !== "string") {
if (h === d) {
f = true;
break
}
} else {
if (t.filter(d, [h]).length > 0) {
f = h;
break
}
}
}
h = h[g]
}
a[i] = f
}
}
}
if (L.documentElement.contains) {
t.contains = function (a, b) {
return a !== b && (a.contains ? a.contains(b) : true)
}
} else {
if (L.documentElement.compareDocumentPosition) {
t.contains = function (a, b) {
return !!(a.compareDocumentPosition(b) & 16)
}
} else {
t.contains = function () {
return false
}
}
}
t.isXML = function (a) {
var b = (a ? a.ownerDocument || a : 0).documentElement;
return b ? b.nodeName !== "HTML" : false
};
var k = function (d, a, c) {
var b, tmpSet = [],
later = "",
root = a.nodeType ? [a] : a;
while ((b = q.match.PSEUDO.exec(d))) {
later += b[0];
d = d.replace(q.match.PSEUDO, "")
}
d = q.relative[d] ? d + "*" : d;
for (var i = 0, l = root.length; i < l; i++) {
t(d, root[i], tmpSet, c)
}
return t.filter(later, tmpSet)
};
t.attr = D.attr;
t.selectors.attrMap = {};
D.find = t;
D.expr = t.selectors;
D.expr[":"] = D.expr.filters;
D.unique = t.uniqueSort;
D.text = t.getText;
D.isXMLDoc = t.isXML;
D.contains = t.contains
})();
var K = /Until$/,
rparentsprev = /^(?:parents|prevUntil|prevAll)/,
rmultiselector = /,/,
isSimple = /^.[^:#\[\.,]*$/,
slice = Array.prototype.slice,
POS = D.expr.match.globalPOS,
guaranteedUnique = {
children: true,
contents: true,
next: true,
prev: true
};
D.fn.extend({
find: function (c) {
var a = this,
i, l;
if (typeof c !== "string") {
return D(c).filter(function () {
for (i = 0, l = a.length; i < l; i++) {
if (D.contains(a[i], this)) {
return true
}
}
})
}
var b = this.pushStack("", "find", c),
length, n, r;
for (i = 0, l = this.length; i < l; i++) {
length = b.length;
D.find(c, this[i], b);
if (i > 0) {
for (n = length; n < b.length; n++) {
for (r = 0; r < length; r++) {
if (b[r] === b[n]) {
b.splice(n--, 1);
break
}
}
}
}
}
return b
},
has: function (b) {
var a = D(b);
return this.filter(function () {
for (var i = 0, l = a.length; i < l; i++) {
if (D.contains(this, a[i])) {
return true
}
}
})
},
not: function (a) {
return this.pushStack(winnow(this, a, false), "not", a)
},
filter: function (a) {
return this.pushStack(winnow(this, a, true), "filter", a)
},
is: function (a) {
return !!a && (typeof a === "string" ? POS.test(a) ? D(a, this.context).index(this[0]) >= 0 : D.filter(a, this).length > 0 : this.filter(a).length > 0)
},
closest: function (d, c) {
var e = [],
i, l, cur = this[0];
if (D.isArray(d)) {
var a = 1;
while (cur && cur.ownerDocument && cur !== c) {
for (i = 0; i < d.length; i++) {
if (D(cur).is(d[i])) {
e.push({
selector: d[i],
elem: cur,
level: a
})
}
}
cur = cur.parentNode;
a++
}
return e
}
var b = POS.test(d) || typeof d !== "string" ? D(d, c || this.context) : 0;
for (i = 0, l = this.length; i < l; i++) {
cur = this[i];
while (cur) {
if (b ? b.index(cur) > -1 : D.find.matchesSelector(cur, d)) {
e.push(cur);
break
} else {
cur = cur.parentNode;
if (!cur || !cur.ownerDocument || cur === c || cur.nodeType === 11) {
break
}
}
}
}
e = e.length > 1 ? D.unique(e) : e;
return this.pushStack(e, "closest", d)
},
index: function (a) {
if (!a) {
return (this[0] && this[0].parentNode) ? this.prevAll().length : -1
}
if (typeof a === "string") {
return D.inArray(this[0], D(a))
}
return D.inArray(a.jquery ? a[0] : a, this)
},
add: function (a, b) {
var c = typeof a === "string" ? D(a, b) : D.makeArray(a && a.nodeType ? [a] : a),
all = D.merge(this.get(), c);
return this.pushStack(isDisconnected(c[0]) || isDisconnected(all[0]) ? all : D.unique(all))
},
andSelf: function () {
return this.add(this.prevObject)
}
});
function isDisconnected(a) {
return !a || !a.parentNode || a.parentNode.nodeType === 11
}
D.each({
parent: function (b) {
var a = b.parentNode;
return a && a.nodeType !== 11 ? a : null
},
parents: function (a) {
return D.dir(a, "parentNode")
},
parentsUntil: function (b, i, a) {
return D.dir(b, "parentNode", a)
},
next: function (a) {
return D.nth(a, 2, "nextSibling")
},
prev: function (a) {
return D.nth(a, 2, "previousSibling")
},
nextAll: function (a) {
return D.dir(a, "nextSibling")
},
prevAll: function (a) {
return D.dir(a, "previousSibling")
},
nextUntil: function (b, i, a) {
return D.dir(b, "nextSibling", a)
},
prevUntil: function (b, i, a) {
return D.dir(b, "previousSibling", a)
},
siblings: function (a) {
return D.sibling((a.parentNode || {}).firstChild, a)
},
children: function (a) {
return D.sibling(a.firstChild)
},
contents: function (a) {
return D.nodeName(a, "iframe") ? a.contentDocument || a.contentWindow.document : D.makeArray(a.childNodes)
}
}, function (d, e) {
D.fn[d] = function (a, c) {
var b = D.map(this, e, a);
if (!K.test(d)) {
c = a
}
if (c && typeof c === "string") {
b = D.filter(c, b)
}
b = this.length > 1 && !guaranteedUnique[d] ? D.unique(b) : b;
if ((this.length > 1 || rmultiselector.test(c)) && rparentsprev.test(d)) {
b = b.reverse()
}
return this.pushStack(b, d, slice.call(arguments).join(","))
}
});
D.extend({
filter: function (a, c, b) {
if (b) {
a = ":not(" + a + ")"
}
return c.length === 1 ? D.find.matchesSelector(c[0], a) ? [c[0]] : [] : D.find.matches(a, c)
},
dir: function (b, c, a) {
var d = [],
cur = b[c];
while (cur && cur.nodeType !== 9 && (a === H || cur.nodeType !== 1 || !D(cur).is(a))) {
if (cur.nodeType === 1) {
d.push(cur)
}
cur = cur[c]
}
return d
},
nth: function (a, e, c, b) {
e = e || 1;
var d = 0;
for (; a; a = a[c]) {
if (a.nodeType === 1 && ++d === e) {
break
}
}
return a
},
sibling: function (n, a) {
var r = [];
for (; n; n = n.nextSibling) {
if (n.nodeType === 1 && n !== a) {
r.push(n)
}
}
return r
}
});
function winnow(c, d, f) {
d = d || 0;
if (D.isFunction(d)) {
return D.grep(c, function (a, i) {
var b = !! d.call(a, i, a);
return b === f
})
} else {
if (d.nodeType) {
return D.grep(c, function (a, i) {
return (a === d) === f
})
} else {
if (typeof d === "string") {
var e = D.grep(c, function (a) {
return a.nodeType === 1
});
if (isSimple.test(d)) {
return D.filter(d, e, !f)
} else {
d = D.filter(d, e)
}
}
}
}
return D.grep(c, function (a, i) {
return (D.inArray(a, d) >= 0) === f
})
}
function createSafeFragment(a) {
var b = z.split("|"),
safeFrag = a.createDocumentFragment();
if (safeFrag.createElement) {
while (b.length) {
safeFrag.createElement(b.pop())
}
}
return safeFrag
}
var z = "abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",
rinlinejQuery = / jQuery\d+="(?:\d+|null)"/g,
rleadingWhitespace = /^\s+/,
rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,
rtagName = /<([\w:]+)/,
rtbody = /<tbody/i,
rhtml = /<|&#?\w+;/,
rnoInnerhtml = /<(?:script|style)/i,
rnocache = /<(?:script|object|embed|option|style)/i,
rnoshimcache = new RegExp("<(?:" + z + ")[\\s/>]", "i"),
rchecked = /checked\s*(?:[^=]|=\s*.checked.)/i,
rscriptType = /\/(java|ecma)script/i,
rcleanScript = /^\s*<!(?:\[CDATA\[|\-\-)/,
wrapMap = {
option: [1, "<select multiple='multiple'>", "</select>"],
legend: [1, "<fieldset>", "</fieldset>"],
thead: [1, "<table>", "</table>"],
tr: [2, "<table><tbody>", "</tbody></table>"],
td: [3, "<table><tbody><tr>", "</tr></tbody></table>"],
col: [2, "<table><tbody></tbody><colgroup>", "</colgroup></table>"],
area: [1, "<map>", "</map>"],
_default: [0, "", ""]
}, safeFragment = createSafeFragment(L);
wrapMap.optgroup = wrapMap.option;
wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead;
wrapMap.th = wrapMap.td;
if (!D.support.htmlSerialize) {
wrapMap._default = [1, "div<div>", "</div>"]
}
D.fn.extend({
text: function (b) {
return D.access(this, function (a) {
return a === H ? D.text(this) : this.empty().append((this[0] && this[0].ownerDocument || L).createTextNode(a))
}, null, b, arguments.length)
},
wrapAll: function (b) {
if (D.isFunction(b)) {
return this.each(function (i) {
D(this).wrapAll(b.call(this, i))
})
}
if (this[0]) {
var c = D(b, this[0].ownerDocument).eq(0).clone(true);
if (this[0].parentNode) {
c.insertBefore(this[0])
}
c.map(function () {
var a = this;
while (a.firstChild && a.firstChild.nodeType === 1) {
a = a.firstChild
}
return a
}).append(this)
}
return this
},
wrapInner: function (b) {
if (D.isFunction(b)) {
return this.each(function (i) {
D(this).wrapInner(b.call(this, i))
})
}
return this.each(function () {
var a = D(this),
contents = a.contents();
if (contents.length) {
contents.wrapAll(b)
} else {
a.append(b)
}
})
},
wrap: function (a) {
var b = D.isFunction(a);
return this.each(function (i) {
D(this).wrapAll(b ? a.call(this, i) : a)
})
},
unwrap: function () {
return this.parent().each(function () {
if (!D.nodeName(this, "body")) {
D(this).replaceWith(this.childNodes)
}
}).end()
},
append: function () {
return this.domManip(arguments, true, function (a) {
if (this.nodeType === 1) {
this.appendChild(a)
}
})
},
prepend: function () {
return this.domManip(arguments, true, function (a) {
if (this.nodeType === 1) {
this.insertBefore(a, this.firstChild)
}
})
},
before: function () {
if (this[0] && this[0].parentNode) {
return this.domManip(arguments, false, function (a) {
this.parentNode.insertBefore(a, this)
})
} else {
if (arguments.length) {
var b = D.clean(arguments);
b.push.apply(b, this.toArray());
return this.pushStack(b, "before", arguments)
}
}
},
after: function () {
if (this[0] && this[0].parentNode) {
return this.domManip(arguments, false, function (a) {
this.parentNode.insertBefore(a, this.nextSibling)
})
} else {
if (arguments.length) {
var b = this.pushStack(this, "after", arguments);
b.push.apply(b, D.clean(arguments));
return b
}
}
},
remove: function (b, a) {
for (var i = 0, elem;
(elem = this[i]) != null; i++) {
if (!b || D.filter(b, [elem]).length) {
if (!a && elem.nodeType === 1) {
D.cleanData(elem.getElementsByTagName("*"));
D.cleanData([elem])
}
if (elem.parentNode) {
elem.parentNode.removeChild(elem)
}
}
}
return this
},
empty: function () {
for (var i = 0, elem;
(elem = this[i]) != null; i++) {
if (elem.nodeType === 1) {
D.cleanData(elem.getElementsByTagName("*"))
}
while (elem.firstChild) {
elem.removeChild(elem.firstChild)
}
}
return this
},
clone: function (b, a) {
b = b == null ? false : b;
a = a == null ? b : a;
return this.map(function () {
return D.clone(this, b, a)
})
},
html: function (c) {
return D.access(this, function (a) {
var b = this[0] || {}, i = 0,
l = this.length;
if (a === H) {
return b.nodeType === 1 ? b.innerHTML.replace(rinlinejQuery, "") : null
}
if (typeof a === "string" && !rnoInnerhtml.test(a) && (D.support.leadingWhitespace || !rleadingWhitespace.test(a)) && !wrapMap[(rtagName.exec(a) || ["", ""])[1].toLowerCase()]) {
a = a.replace(rxhtmlTag, "<$1></$2>");
try {
for (; i < l; i++) {
b = this[i] || {};
if (b.nodeType === 1) {
D.cleanData(b.getElementsByTagName("*"));
b.innerHTML = a
}
}
b = 0
} catch (e) {}
}
if (b) {
this.empty().append(a)
}
}, null, c, arguments.length)
},
replaceWith: function (b) {
if (this[0] && this[0].parentNode) {
if (D.isFunction(b)) {
return this.each(function (i) {
var a = D(this),
old = a.html();
a.replaceWith(b.call(this, i, old))
})
}
if (typeof b !== "string") {
b = D(b).detach()
}
return this.each(function () {
var a = this.nextSibling,
parent = this.parentNode;
D(this).remove();
if (a) {
D(a).before(b)
} else {
D(parent).append(b)
}
})
} else {
return this.length ? this.pushStack(D(D.isFunction(b) ? b() : b), "replaceWith", b) : this
}
},
detach: function (a) {
return this.remove(a, true)
},
domManip: function (e, c, b) {
var d, first, fragment, parent, value = e[0],
scripts = [];
if (!D.support.checkClone && arguments.length === 3 && typeof value === "string" && rchecked.test(value)) {
return this.each(function () {
D(this).domManip(e, c, b, true)
})
}
if (D.isFunction(value)) {
return this.each(function (i) {
var a = D(this);
e[0] = value.call(this, i, c ? a.html() : H);
a.domManip(e, c, b)
})
}
if (this[0]) {
parent = value && value.parentNode;
if (D.support.parentNode && parent && parent.nodeType === 11 && parent.childNodes.length === this.length) {
d = {
fragment: parent
}
} else {
d = D.buildFragment(e, this, scripts)
}
fragment = d.fragment;
if (fragment.childNodes.length === 1) {
first = fragment = fragment.firstChild
} else {
first = fragment.firstChild
} if (first) {
c = c && D.nodeName(first, "tr");
for (var i = 0, l = this.length, lastIndex = l - 1; i < l; i++) {
b.call(c ? root(this[i], first) : this[i], d.cacheable || (l > 1 && i < lastIndex) ? D.clone(fragment, true, true) : fragment)
}
}
if (scripts.length) {
D.each(scripts, function (i, a) {
if (a.src) {
D.ajax({
type: "GET",
global: false,
url: a.src,
async: false,
dataType: "script"
})
} else {
D.globalEval((a.text || a.textContent || a.innerHTML || "").replace(rcleanScript, "/*$0*/"))
} if (a.parentNode) {
a.parentNode.removeChild(a)
}
})
}
}
return this
}
});
function root(b, a) {
return D.nodeName(b, "table") ? (b.getElementsByTagName("tbody")[0] || b.appendChild(b.ownerDocument.createElement("tbody"))) : b
}
function cloneCopyEvent(c, b) {
if (b.nodeType !== 1 || !D.hasData(c)) {
return
}
var a, i, l, oldData = D._data(c),
curData = D._data(b, oldData),
events = oldData.events;
if (events) {
delete curData.handle;
curData.events = {};
for (a in events) {
for (i = 0, l = events[a].length; i < l; i++) {
D.event.add(b, a, events[a][i])
}
}
}
if (curData.data) {
curData.data = D.extend({}, curData.data)
}
}
function cloneFixAttributes(b, a) {
var c;
if (a.nodeType !== 1) {
return
}
if (a.clearAttributes) {
a.clearAttributes()
}
if (a.mergeAttributes) {
a.mergeAttributes(b)
}
c = a.nodeName.toLowerCase();
if (c === "object") {
a.outerHTML = b.outerHTML
} else {
if (c === "input" && (b.type === "checkbox" || b.type === "radio")) {
if (b.checked) {
a.defaultChecked = a.checked = b.checked
}
if (a.value !== b.value) {
a.value = b.value
}
} else {
if (c === "option") {
a.selected = b.defaultSelected
} else {
if (c === "input" || c === "textarea") {
a.defaultValue = b.defaultValue
} else {
if (c === "script" && a.text !== b.text) {
a.text = b.text
}
}
}
}
}
a.removeAttribute(D.expando);
a.removeAttribute("_submit_attached");
a.removeAttribute("_change_attached")
}
D.buildFragment = function (a, c, d) {
var b, cacheable, cacheresults, doc, first = a[0];
if (c && c[0]) {
doc = c[0].ownerDocument || c[0]
}
if (!doc.createDocumentFragment) {
doc = L
}
if (a.length === 1 && typeof first === "string" && first.length < 512 && doc === L && first.charAt(0) === "<" && !rnocache.test(first) && (D.support.checkClone || !rchecked.test(first)) && (D.support.html5Clone || !rnoshimcache.test(first))) {
cacheable = true;
cacheresults = D.fragments[first];
if (cacheresults && cacheresults !== 1) {
b = cacheresults
}
}
if (!b) {
b = doc.createDocumentFragment();
D.clean(a, doc, b, d)
}
if (cacheable) {
D.fragments[first] = cacheresults ? b : 1
}
return {
fragment: b,
cacheable: cacheable
}
};
D.fragments = {};
D.each({
appendTo: "append",
prependTo: "prepend",
insertBefore: "before",
insertAfter: "after",
replaceAll: "replaceWith"
}, function (e, d) {
D.fn[e] = function (c) {
var a = [],
insert = D(c),
parent = this.length === 1 && this[0].parentNode;
if (parent && parent.nodeType === 11 && parent.childNodes.length === 1 && insert.length === 1) {
insert[d](this[0]);
return this
} else {
for (var i = 0, l = insert.length; i < l; i++) {
var b = (i > 0 ? this.clone(true) : this).get();
D(insert[i])[d](b);
a = a.concat(b)
}
return this.pushStack(a, e, insert.selector)
}
}
});
function getAll(a) {
if (typeof a.getElementsByTagName !== "undefined") {
return a.getElementsByTagName("*")
} else {
if (typeof a.querySelectorAll !== "undefined") {
return a.querySelectorAll("*")
} else {
return []
}
}
}
function fixDefaultChecked(a) {
if (a.type === "checkbox" || a.type === "radio") {
a.defaultChecked = a.checked
}
}
function findInputs(a) {
var b = (a.nodeName || "").toLowerCase();
if (b === "input") {
fixDefaultChecked(a)
} else {
if (b !== "script" && typeof a.getElementsByTagName !== "undefined") {
D.grep(a.getElementsByTagName("input"), fixDefaultChecked)
}
}
}
function shimCloneNode(b) {
var a = L.createElement("div");
safeFragment.appendChild(a);
a.innerHTML = b.outerHTML;
return a.firstChild
}
D.extend({
clone: function (b, a, c) {
var d, destElements, i, clone = D.support.html5Clone || D.isXMLDoc(b) || !rnoshimcache.test("<" + b.nodeName + ">") ? b.cloneNode(true) : shimCloneNode(b);
if ((!D.support.noCloneEvent || !D.support.noCloneChecked) && (b.nodeType === 1 || b.nodeType === 11) && !D.isXMLDoc(b)) {
cloneFixAttributes(b, clone);
d = getAll(b);
destElements = getAll(clone);
for (i = 0; d[i]; ++i) {
if (destElements[i]) {
cloneFixAttributes(d[i], destElements[i])
}
}
}
if (a) {
cloneCopyEvent(b, clone);
if (c) {
d = getAll(b);
destElements = getAll(clone);
for (i = 0; d[i]; ++i) {
cloneCopyEvent(d[i], destElements[i])
}
}
}
d = destElements = null;
return clone
},
clean: function (k, h, d, g) {
var f, script, j, ret = [];
h = h || L;
if (typeof h.createElement === "undefined") {
h = h.ownerDocument || h[0] && h[0].ownerDocument || L
}
for (var i = 0, elem;
(elem = k[i]) != null; i++) {
if (typeof elem === "number") {
elem += ""
}
if (!elem) {
continue
}
if (typeof elem === "string") {
if (!rhtml.test(elem)) {
elem = h.createTextNode(elem)
} else {
elem = elem.replace(rxhtmlTag, "<$1></$2>");
var b = (rtagName.exec(elem) || ["", ""])[1].toLowerCase(),
wrap = wrapMap[b] || wrapMap._default,
depth = wrap[0],
div = h.createElement("div"),
safeChildNodes = safeFragment.childNodes,
remove;
if (h === L) {
safeFragment.appendChild(div)
} else {
createSafeFragment(h).appendChild(div)
}
div.innerHTML = wrap[1] + elem + wrap[2];
while (depth--) {
div = div.lastChild
}
if (!D.support.tbody) {
var l = rtbody.test(elem),
tbody = b === "table" && !l ? div.firstChild && div.firstChild.childNodes : wrap[1] === "<table>" && !l ? div.childNodes : [];
for (j = tbody.length - 1; j >= 0; --j) {
if (D.nodeName(tbody[j], "tbody") && !tbody[j].childNodes.length) {
tbody[j].parentNode.removeChild(tbody[j])
}
}
}
if (!D.support.leadingWhitespace && rleadingWhitespace.test(elem)) {
div.insertBefore(h.createTextNode(rleadingWhitespace.exec(elem)[0]), div.firstChild)
}
elem = div.childNodes;
if (div) {
div.parentNode.removeChild(div);
if (safeChildNodes.length > 0) {
remove = safeChildNodes[safeChildNodes.length - 1];
if (remove && remove.parentNode) {
remove.parentNode.removeChild(remove)
}
}
}
}
}
var e;
if (!D.support.appendChecked) {
if (elem[0] && typeof (e = elem.length) === "number") {
for (j = 0; j < e; j++) {
findInputs(elem[j])
}
} else {
findInputs(elem)
}
}
if (elem.nodeType) {
ret.push(elem)
} else {
ret = D.merge(ret, elem)
}
}
if (d) {
f = function (a) {
return !a.type || rscriptType.test(a.type)
};
for (i = 0; ret[i]; i++) {
script = ret[i];
if (g && D.nodeName(script, "script") && (!script.type || rscriptType.test(script.type))) {
g.push(script.parentNode ? script.parentNode.removeChild(script) : script)
} else {
if (script.nodeType === 1) {
var c = D.grep(script.getElementsByTagName("script"), f);
ret.splice.apply(ret, [i + 1, 0].concat(c))
}
d.appendChild(script)
}
}
}
return ret
},
cleanData: function (c) {
var a, id, cache = D.cache,
special = D.event.special,
deleteExpando = D.support.deleteExpando;
for (var i = 0, elem;
(elem = c[i]) != null; i++) {
if (elem.nodeName && D.noData[elem.nodeName.toLowerCase()]) {
continue
}
id = elem[D.expando];
if (id) {
a = cache[id];
if (a && a.events) {
for (var b in a.events) {
if (special[b]) {
D.event.remove(elem, b)
} else {
D.removeEvent(elem, b, a.handle)
}
}
if (a.handle) {
a.handle.elem = null
}
}
if (deleteExpando) {
delete elem[D.expando]
} else {
if (elem.removeAttribute) {
elem.removeAttribute(D.expando)
}
}
delete cache[id]
}
}
}
});
var y = /alpha\([^)]*\)/i,
ropacity = /opacity=([^)]*)/,
rupper = /([A-Z]|^ms)/g,
rnum = /^[\-+]?(?:\d*\.)?\d+$/i,
rnumnonpx = /^-?(?:\d*\.)?\d+(?!px)[^\d\s]+$/i,
rrelNum = /^([\-+])=([\-+.\de]+)/,
rmargin = /^margin/,
cssShow = {
position: "absolute",
visibility: "hidden",
display: "block"
}, cssExpand = ["Top", "Right", "Bottom", "Left"],
curCSS, getComputedStyle, currentStyle;
D.fn.css = function (e, d) {
return D.access(this, function (b, c, a) {
return a !== H ? D.style(b, c, a) : D.css(b, c)
}, e, d, arguments.length > 1)
};
D.extend({
cssHooks: {
opacity: {
get: function (c, a) {
if (a) {
var b = curCSS(c, "opacity");
return b === "" ? "1" : b
} else {
return c.style.opacity
}
}
}
},
cssNumber: {
fillOpacity: true,
fontWeight: true,
lineHeight: true,
opacity: true,
orphans: true,
widows: true,
zIndex: true,
zoom: true
},
cssProps: {
"float": D.support.cssFloat ? "cssFloat" : "styleFloat"
},
style: function (b, c, a, f) {
if (!b || b.nodeType === 3 || b.nodeType === 8 || !b.style) {
return
}
var d, type, origName = D.camelCase(c),
style = b.style,
hooks = D.cssHooks[origName];
c = D.cssProps[origName] || origName;
if (a !== H) {
type = typeof a;
if (type === "string" && (d = rrelNum.exec(a))) {
a = (+(d[1] + 1) * +d[2]) + parseFloat(D.css(b, c));
type = "number"
}
if (a == null || type === "number" && isNaN(a)) {
return
}
if (type === "number" && !D.cssNumber[origName]) {
a += "px"
}
if (!hooks || !("set" in hooks) || (a = hooks.set(b, a)) !== H) {
try {
style[c] = a
} catch (e) {}
}
} else {
if (hooks && "get" in hooks && (d = hooks.get(b, false, f)) !== H) {
return d
}
return style[c]
}
},
css: function (a, b, d) {
var c, hooks;
b = D.camelCase(b);
hooks = D.cssHooks[b];
b = D.cssProps[b] || b;
if (b === "cssFloat") {
b = "float"
}
if (hooks && "get" in hooks && (c = hooks.get(a, true, d)) !== H) {
return c
} else {
if (curCSS) {
return curCSS(a, b)
}
}
},
swap: function (b, c, a) {
var d = {}, ret, name;
for (name in c) {
d[name] = b.style[name];
b.style[name] = c[name]
}
ret = a.call(b);
for (name in c) {
b.style[name] = d[name]
}
return ret
}
});
D.curCSS = D.css;
if (L.defaultView && L.defaultView.getComputedStyle) {
getComputedStyle = function (c, b) {
var a, defaultView, computedStyle, width, style = c.style;
b = b.replace(rupper, "-$1").toLowerCase();
if ((defaultView = c.ownerDocument.defaultView) && (computedStyle = defaultView.getComputedStyle(c, null))) {
a = computedStyle.getPropertyValue(b);
if (a === "" && !D.contains(c.ownerDocument.documentElement, c)) {
a = D.style(c, b)
}
}
if (!D.support.pixelMargin && computedStyle && rmargin.test(b) && rnumnonpx.test(a)) {
width = style.width;
style.width = a;
a = computedStyle.width;
style.width = width
}
return a
}
}
if (L.documentElement.currentStyle) {
currentStyle = function (c, a) {
var b, rsLeft, uncomputed, ret = c.currentStyle && c.currentStyle[a],
style = c.style;
if (ret == null && style && (uncomputed = style[a])) {
ret = uncomputed
}
if (rnumnonpx.test(ret)) {
b = style.left;
rsLeft = c.runtimeStyle && c.runtimeStyle.left;
if (rsLeft) {
c.runtimeStyle.left = c.currentStyle.left
}
style.left = a === "fontSize" ? "1em" : ret;
ret = style.pixelLeft + "px";
style.left = b;
if (rsLeft) {
c.runtimeStyle.left = rsLeft
}
}
return ret === "" ? "auto" : ret
}
}
curCSS = getComputedStyle || currentStyle;
function getWidthOrHeight(b, c, d) {
var a = c === "width" ? b.offsetWidth : b.offsetHeight,
i = c === "width" ? 1 : 0,
len = 4;
if (a > 0) {
if (d !== "border") {
for (; i < len; i += 2) {
if (!d) {
a -= parseFloat(D.css(b, "padding" + cssExpand[i])) || 0
}
if (d === "margin") {
a += parseFloat(D.css(b, d + cssExpand[i])) || 0
} else {
a -= parseFloat(D.css(b, "border" + cssExpand[i] + "Width")) || 0
}
}
}
return a + "px"
}
a = curCSS(b, c);
if (a < 0 || a == null) {
a = b.style[c]
}
if (rnumnonpx.test(a)) {
return a
}
a = parseFloat(a) || 0;
if (d) {
for (; i < len; i += 2) {
a += parseFloat(D.css(b, "padding" + cssExpand[i])) || 0;
if (d !== "padding") {
a += parseFloat(D.css(b, "border" + cssExpand[i] + "Width")) || 0
}
if (d === "margin") {
a += parseFloat(D.css(b, d + cssExpand[i])) || 0
}
}
}
return a + "px"
}
D.each(["height", "width"], function (i, d) {
D.cssHooks[d] = {
get: function (a, b, c) {
if (b) {
if (a.offsetWidth !== 0) {
return getWidthOrHeight(a, d, c)
} else {
return D.swap(a, cssShow, function () {
return getWidthOrHeight(a, d, c)
})
}
}
},
set: function (b, a) {
return rnum.test(a) ? a + "px" : a
}
}
});
if (!D.support.opacity) {
D.cssHooks.opacity = {
get: function (b, a) {
return ropacity.test((a && b.currentStyle ? b.currentStyle.filter : b.style.filter) || "") ? (parseFloat(RegExp.$1) / 100) + "" : a ? "1" : ""
},
set: function (c, a) {
var b = c.style,
currentStyle = c.currentStyle,
opacity = D.isNumeric(a) ? "alpha(opacity=" + a * 100 + ")" : "",
filter = currentStyle && currentStyle.filter || b.filter || "";
b.zoom = 1;
if (a >= 1 && D.trim(filter.replace(y, "")) === "") {
b.removeAttribute("filter");
if (currentStyle && !currentStyle.filter) {
return
}
}
b.filter = y.test(filter) ? filter.replace(y, opacity) : filter + " " + opacity
}
}
}
D(function () {
if (!D.support.reliableMarginRight) {
D.cssHooks.marginRight = {
get: function (b, a) {
return D.swap(b, {
display: "inline-block"
}, function () {
if (a) {
return curCSS(b, "margin-right")
} else {
return b.style.marginRight
}
})
}
}
}
});
if (D.expr && D.expr.filters) {
D.expr.filters.hidden = function (a) {
var b = a.offsetWidth,
height = a.offsetHeight;
return (b === 0 && height === 0) || (!D.support.reliableHiddenOffsets && ((a.style && a.style.display) || D.css(a, "display")) === "none")
};
D.expr.filters.visible = function (a) {
return !D.expr.filters.hidden(a)
}
}
D.each({
margin: "",
padding: "",
border: "Width"
}, function (b, c) {
D.cssHooks[b + c] = {
expand: function (a) {
var i, parts = typeof a === "string" ? a.split(" ") : [a],
expanded = {};
for (i = 0; i < 4; i++) {
expanded[b + cssExpand[i] + c] = parts[i] || parts[i - 2] || parts[0]
}
return expanded
}
}
});
var w = /%20/g,
rbracket = /\[\]$/,
rCRLF = /\r?\n/g,
rhash = /#.*$/,
rheaders = /^(.*?):[ \t]*([^\r\n]*)\r?$/mg,
rinput = /^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,
rlocalProtocol = /^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,
rnoContent = /^(?:GET|HEAD)$/,
rprotocol = /^\/\//,
rquery = /\?/,
rscript = /<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,
rselectTextarea = /^(?:select|textarea)/i,
rspacesAjax = /\s+/,
rts = /([?&])_=[^&]*/,
rurl = /^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,
_load = D.fn.load,
prefilters = {}, transports = {}, ajaxLocation, ajaxLocParts, allTypes = ["*/"] + ["*"];
try {
ajaxLocation = location.href
} catch (e) {
ajaxLocation = L.createElement("a");
ajaxLocation.href = "";
ajaxLocation = ajaxLocation.href
}
ajaxLocParts = rurl.exec(ajaxLocation.toLowerCase()) || [];
function addToPrefiltersOrTransports(d) {
return function (c, b) {
if (typeof c !== "string") {
b = c;
c = "*"
}
if (D.isFunction(b)) {
var a = c.toLowerCase().split(rspacesAjax),
i = 0,
length = a.length,
dataType, list, placeBefore;
for (; i < length; i++) {
dataType = a[i];
placeBefore = /^\+/.test(dataType);
if (placeBefore) {
dataType = dataType.substr(1) || "*"
}
list = d[dataType] = d[dataType] || [];
list[placeBefore ? "unshift" : "push"](b)
}
}
}
}
function inspectPrefiltersOrTransports(g, d, a, c, f, e) {
f = f || d.dataTypes[0];
e = e || {};
e[f] = true;
var b = g[f],
i = 0,
length = b ? b.length : 0,
executeOnly = (g === prefilters),
selection;
for (; i < length && (executeOnly || !selection); i++) {
selection = b[i](d, a, c);
if (typeof selection === "string") {
if (!executeOnly || e[selection]) {
selection = H
} else {
d.dataTypes.unshift(selection);
selection = inspectPrefiltersOrTransports(g, d, a, c, selection, e)
}
}
}
if ((executeOnly || !selection) && !e["*"]) {
selection = inspectPrefiltersOrTransports(g, d, a, c, "*", e)
}
return selection
}
function ajaxExtend(b, a) {
var c, deep, flatOptions = D.ajaxSettings.flatOptions || {};
for (c in a) {
if (a[c] !== H) {
(flatOptions[c] ? b : (deep || (deep = {})))[c] = a[c]
}
}
if (deep) {
D.extend(true, b, deep)
}
}
D.fn.extend({
load: function (h, e, d) {
if (typeof h !== "string" && _load) {
return _load.apply(this, arguments)
} else {
if (!this.length) {
return this
}
}
var f = h.indexOf(" ");
if (f >= 0) {
var j = h.slice(f, h.length);
h = h.slice(0, f)
}
var g = "GET";
if (e) {
if (D.isFunction(e)) {
d = e;
e = H
} else {
if (typeof e === "object") {
e = D.param(e, D.ajaxSettings.traditional);
g = "POST"
}
}
}
var i = this;
D.ajax({
url: h,
type: g,
dataType: "html",
data: e,
complete: function (b, c, a) {
a = b.responseText;
if (b.isResolved()) {
b.done(function (r) {
a = r
});
i.html(j ? D("<div>").append(a.replace(rscript, "")).find(j) : a)
}
if (d) {
i.each(d, [a, c, b])
}
}
});
return this
},
serialize: function () {
return D.param(this.serializeArray())
},
serializeArray: function () {
return this.map(function () {
return this.elements ? D.makeArray(this.elements) : this
}).filter(function () {
return this.name && !this.disabled && (this.checked || rselectTextarea.test(this.nodeName) || rinput.test(this.type))
}).map(function (i, c) {
var b = D(this).val();
return b == null ? null : D.isArray(b) ? D.map(b, function (a, i) {
return {
name: c.name,
value: a.replace(rCRLF, "\r\n")
}
}) : {
name: c.name,
value: b.replace(rCRLF, "\r\n")
}
}).get()
}
});
D.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "), function (i, o) {
D.fn[o] = function (f) {
return this.on(o, f)
}
});
D.each(["get", "post"], function (i, e) {
D[e] = function (d, b, a, c) {
if (D.isFunction(b)) {
c = c || a;
a = b;
b = H
}
return D.ajax({
type: e,
url: d,
data: b,
success: a,
dataType: c
})
}
});
D.extend({
getScript: function (b, a) {
return D.get(b, H, a, "script")
},
getJSON: function (c, b, a) {
return D.get(c, b, a, "json")
},
ajaxSetup: function (b, a) {
if (a) {
ajaxExtend(b, D.ajaxSettings)
} else {
a = b;
b = D.ajaxSettings
}
ajaxExtend(b, a);
return b
},
ajaxSettings: {
url: ajaxLocation,
isLocal: rlocalProtocol.test(ajaxLocParts[1]),
global: true,
type: "GET",
contentType: "application/x-www-form-urlencoded; charset=UTF-8",
processData: true,
async: true,
accepts: {
xml: "application/xml, text/xml",
html: "text/html",
text: "text/plain",
json: "application/json, text/javascript",
"*": allTypes
},
contents: {
xml: /xml/,
html: /html/,
json: /json/
},
responseFields: {
xml: "responseXML",
text: "responseText"
},
converters: {
"* text": x.String,
"text html": true,
"text json": D.parseJSON,
"text xml": D.parseXML
},
flatOptions: {
context: true,
url: true
}
},
ajaxPrefilter: addToPrefiltersOrTransports(prefilters),
ajaxTransport: addToPrefiltersOrTransports(transports),
ajax: function (h, j) {
if (typeof h === "object") {
j = h;
h = H
}
j = j || {};
var s = D.ajaxSetup({}, j),
callbackContext = s.context || s,
globalEventContext = callbackContext !== s && (callbackContext.nodeType || callbackContext instanceof D) ? D(callbackContext) : D.event,
deferred = D.Deferred(),
completeDeferred = D.Callbacks("once memory"),
statusCode = s.statusCode || {}, ifModifiedKey, requestHeaders = {}, requestHeadersNames = {}, responseHeadersString, responseHeaders, transport, timeoutTimer, parts, state = 0,
fireGlobals, i, jqXHR = {
readyState: 0,
setRequestHeader: function (c, b) {
if (!state) {
var a = c.toLowerCase();
c = requestHeadersNames[a] = requestHeadersNames[a] || c;
requestHeaders[c] = b
}
return this
},
getAllResponseHeaders: function () {
return state === 2 ? responseHeadersString : null
},
getResponseHeader: function (b) {
var a;
if (state === 2) {
if (!responseHeaders) {
responseHeaders = {};
while ((a = rheaders.exec(responseHeadersString))) {
responseHeaders[a[1].toLowerCase()] = a[2]
}
}
a = responseHeaders[b.toLowerCase()]
}
return a === H ? null : a
},
overrideMimeType: function (a) {
if (!state) {
s.mimeType = a
}
return this
},
abort: function (a) {
a = a || "abort";
if (transport) {
transport.abort(a)
}
done(0, a);
return this
}
};
function done(d, b, c, a) {
if (state === 2) {
return
}
state = 2;
if (timeoutTimer) {
clearTimeout(timeoutTimer)
}
transport = H;
responseHeadersString = a || "";
jqXHR.readyState = d > 0 ? 4 : 0;
var f, success, error, statusText = b,
response = c ? ajaxHandleResponses(s, jqXHR, c) : H,
lastModified, etag;
if (d >= 200 && d < 300 || d === 304) {
if (s.ifModified) {
if ((lastModified = jqXHR.getResponseHeader("Last-Modified"))) {
D.lastModified[ifModifiedKey] = lastModified
}
if ((etag = jqXHR.getResponseHeader("Etag"))) {
D.etag[ifModifiedKey] = etag
}
}
if (d === 304) {
statusText = "notmodified";
f = true
} else {
try {
success = ajaxConvert(s, response);
statusText = "success";
f = true
} catch (e) {
statusText = "parsererror";
error = e
}
}
} else {
error = statusText;
if (!statusText || d) {
statusText = "error";
if (d < 0) {
d = 0
}
}
}
jqXHR.status = d;
jqXHR.statusText = "" + (b || statusText);
if (f) {
deferred.resolveWith(callbackContext, [success, statusText, jqXHR])
} else {
deferred.rejectWith(callbackContext, [jqXHR, statusText, error])
}
jqXHR.statusCode(statusCode);
statusCode = H;
if (fireGlobals) {
globalEventContext.trigger("ajax" + (f ? "Success" : "Error"), [jqXHR, s, f ? success : error])
}
completeDeferred.fireWith(callbackContext, [jqXHR, statusText]);
if (fireGlobals) {
globalEventContext.trigger("ajaxComplete", [jqXHR, s]);
if (!(--D.active)) {
D.event.trigger("ajaxStop")
}
}
}
deferred.promise(jqXHR);
jqXHR.success = jqXHR.done;
jqXHR.error = jqXHR.fail;
jqXHR.complete = completeDeferred.add;
jqXHR.statusCode = function (b) {
if (b) {
var a;
if (state < 2) {
for (a in b) {
statusCode[a] = [statusCode[a], b[a]]
}
} else {
a = b[jqXHR.status];
jqXHR.then(a, a)
}
}
return this
};
s.url = ((h || s.url) + "").replace(rhash, "").replace(rprotocol, ajaxLocParts[1] + "//");
s.dataTypes = D.trim(s.dataType || "*").toLowerCase().split(rspacesAjax);
if (s.crossDomain == null) {
parts = rurl.exec(s.url.toLowerCase());
s.crossDomain = !! (parts && (parts[1] != ajaxLocParts[1] || parts[2] != ajaxLocParts[2] || (parts[3] || (parts[1] === "http:" ? 80 : 443)) != (ajaxLocParts[3] || (ajaxLocParts[1] === "http:" ? 80 : 443))))
}
if (s.data && s.processData && typeof s.data !== "string") {
s.data = D.param(s.data, s.traditional)
}
inspectPrefiltersOrTransports(prefilters, s, j, jqXHR);
if (state === 2) {
return false
}
fireGlobals = s.global;
s.type = s.type.toUpperCase();
s.hasContent = !rnoContent.test(s.type);
if (fireGlobals && D.active++ === 0) {
D.event.trigger("ajaxStart")
}
if (!s.hasContent) {
if (s.data) {
s.url += (rquery.test(s.url) ? "&" : "?") + s.data;
delete s.data
}
ifModifiedKey = s.url;
if (s.cache === false) {
var g = D.now(),
ret = s.url.replace(rts, "$1_=" + g);
s.url = ret + ((ret === s.url) ? (rquery.test(s.url) ? "&" : "?") + "_=" + g : "")
}
}
if (s.data && s.hasContent && s.contentType !== false || j.contentType) {
jqXHR.setRequestHeader("Content-Type", s.contentType)
}
if (s.ifModified) {
ifModifiedKey = ifModifiedKey || s.url;
if (D.lastModified[ifModifiedKey]) {
jqXHR.setRequestHeader("If-Modified-Since", D.lastModified[ifModifiedKey])
}
if (D.etag[ifModifiedKey]) {
jqXHR.setRequestHeader("If-None-Match", D.etag[ifModifiedKey])
}
}
jqXHR.setRequestHeader("Accept", s.dataTypes[0] && s.accepts[s.dataTypes[0]] ? s.accepts[s.dataTypes[0]] + (s.dataTypes[0] !== "*" ? ", " + allTypes + "; q=0.01" : "") : s.accepts["*"]);
for (i in s.headers) {
jqXHR.setRequestHeader(i, s.headers[i])
}
if (s.beforeSend && (s.beforeSend.call(callbackContext, jqXHR, s) === false || state === 2)) {
jqXHR.abort();
return false
}
for (i in {
success: 1,
error: 1,
complete: 1
}) {
jqXHR[i](s[i])
}
transport = inspectPrefiltersOrTransports(transports, s, j, jqXHR);
if (!transport) {
done(-1, "No Transport")
} else {
jqXHR.readyState = 1;
if (fireGlobals) {
globalEventContext.trigger("ajaxSend", [jqXHR, s])
}
if (s.async && s.timeout > 0) {
timeoutTimer = setTimeout(function () {
jqXHR.abort("timeout")
}, s.timeout)
}
try {
state = 1;
transport.send(requestHeaders, done)
} catch (e) {
if (state < 2) {
done(-1, e)
} else {
throw e
}
}
}
return jqXHR
},
param: function (a, d) {
var s = [],
add = function (b, a) {
a = D.isFunction(a) ? a() : a;
s[s.length] = encodeURIComponent(b) + "=" + encodeURIComponent(a)
};
if (d === H) {
d = D.ajaxSettings.traditional
}
if (D.isArray(a) || (a.jquery && !D.isPlainObject(a))) {
D.each(a, function () {
add(this.name, this.value)
})
} else {
for (var c in a) {
buildParams(c, a[c], d, add)
}
}
return s.join("&").replace(w, "+")
}
});
function buildParams(c, a, d, b) {
if (D.isArray(a)) {
D.each(a, function (i, v) {
if (d || rbracket.test(c)) {
b(c, v)
} else {
buildParams(c + "[" + (typeof v === "object" ? i : "") + "]", v, d, b)
}
})
} else {
if (!d && D.type(a) === "object") {
for (var e in a) {
buildParams(c + "[" + e + "]", a[e], d, b)
}
} else {
b(c, a)
}
}
}
D.extend({
active: 0,
lastModified: {},
etag: {}
});
function ajaxHandleResponses(s, b, a) {
var c = s.contents,
dataTypes = s.dataTypes,
responseFields = s.responseFields,
ct, type, finalDataType, firstDataType;
for (type in responseFields) {
if (type in a) {
b[responseFields[type]] = a[type]
}
}
while (dataTypes[0] === "*") {
dataTypes.shift();
if (ct === H) {
ct = s.mimeType || b.getResponseHeader("content-type")
}
}
if (ct) {
for (type in c) {
if (c[type] && c[type].test(ct)) {
dataTypes.unshift(type);
break
}
}
}
if (dataTypes[0] in a) {
finalDataType = dataTypes[0]
} else {
for (type in a) {
if (!dataTypes[0] || s.converters[type + " " + dataTypes[0]]) {
finalDataType = type;
break
}
if (!firstDataType) {
firstDataType = type
}
}
finalDataType = finalDataType || firstDataType
} if (finalDataType) {
if (finalDataType !== dataTypes[0]) {
dataTypes.unshift(finalDataType)
}
return a[finalDataType]
}
}
function ajaxConvert(s, a) {
if (s.dataFilter) {
a = s.dataFilter(a, s.dataType)
}
var b = s.dataTypes,
converters = {}, i, key, length = b.length,
tmp, current = b[0],
prev, conversion, conv, conv1, conv2;
for (i = 1; i < length; i++) {
if (i === 1) {
for (key in s.converters) {
if (typeof key === "string") {
converters[key.toLowerCase()] = s.converters[key]
}
}
}
prev = current;
current = b[i];
if (current === "*") {
current = prev
} else {
if (prev !== "*" && prev !== current) {
conversion = prev + " " + current;
conv = converters[conversion] || converters["* " + current];
if (!conv) {
conv2 = H;
for (conv1 in converters) {
tmp = conv1.split(" ");
if (tmp[0] === prev || tmp[0] === "*") {
conv2 = converters[tmp[1] + " " + current];
if (conv2) {
conv1 = converters[conv1];
if (conv1 === true) {
conv = conv2
} else {
if (conv2 === true) {
conv = conv1
}
}
break
}
}
}
}
if (!(conv || conv2)) {
D.error("No conversion from " + conversion.replace(" ", " to "))
}
if (conv !== true) {
a = conv ? conv(a) : conv2(conv1(a))
}
}
}
}
return a
}
var J = D.now(),
jsre = /(\=)\?(&|$)|\?\?/i;
D.ajaxSetup({
jsonp: "callback",
jsonpCallback: function () {
return D.expando + "_" + (J++)
}
});
D.ajaxPrefilter("json jsonp", function (s, e, c) {
var b = (typeof s.data === "string") && /^application\/x\-www\-form\-urlencoded/.test(s.contentType);
if (s.dataTypes[0] === "jsonp" || s.jsonp !== false && (jsre.test(s.url) || b && jsre.test(s.data))) {
var d, jsonpCallback = s.jsonpCallback = D.isFunction(s.jsonpCallback) ? s.jsonpCallback() : s.jsonpCallback,
previous = x[jsonpCallback],
url = s.url,
data = s.data,
replace = "$1" + jsonpCallback + "$2";
if (s.jsonp !== false) {
url = url.replace(jsre, replace);
if (s.url === url) {
if (b) {
data = data.replace(jsre, replace)
}
if (s.data === data) {
url += (/\?/.test(url) ? "&" : "?") + s.jsonp + "=" + jsonpCallback
}
}
}
s.url = url;
s.data = data;
x[jsonpCallback] = function (a) {
d = [a]
};
c.always(function () {
x[jsonpCallback] = previous;
if (d && D.isFunction(previous)) {
x[jsonpCallback](d[0])
}
});
s.converters["script json"] = function () {
if (!d) {
D.error(jsonpCallback + " was not called")
}
return d[0]
};
s.dataTypes[0] = "json";
return "script"
}
});
D.ajaxSetup({
accepts: {
script: "text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"
},
contents: {
script: /javascript|ecmascript/
},
converters: {
"text script": function (a) {
D.globalEval(a);
return a
}
}
});
D.ajaxPrefilter("script", function (s) {
if (s.cache === H) {
s.cache = false
}
if (s.crossDomain) {
s.type = "GET";
s.global = false
}
});
D.ajaxTransport("script", function (s) {
if (s.crossDomain) {
var c, head = L.head || L.getElementsByTagName("head")[0] || L.documentElement;
return {
send: function (_, b) {
c = L.createElement("script");
c.async = "async";
if (s.scriptCharset) {
c.charset = s.scriptCharset
}
c.src = s.url;
c.onload = c.onreadystatechange = function (_, a) {
if (a || !c.readyState || /loaded|complete/.test(c.readyState)) {
c.onload = c.onreadystatechange = null;
if (head && c.parentNode) {
head.removeChild(c)
}
c = H;
if (!a) {
b(200, "success")
}
}
};
head.insertBefore(c, head.firstChild)
},
abort: function () {
if (c) {
c.onload(0, 1)
}
}
}
}
});
var E = x.ActiveXObject ? function () {
for (var a in xhrCallbacks) {
xhrCallbacks[a](0, 1)
}
} : false,
xhrId = 0,
xhrCallbacks;
function createStandardXHR() {
try {
return new x.XMLHttpRequest()
} catch (e) {}
}
function createActiveXHR() {
try {
return new x.ActiveXObject("Microsoft.XMLHTTP")
} catch (e) {}
}
D.ajaxSettings.xhr = x.ActiveXObject ? function () {
return !this.isLocal && createStandardXHR() || createActiveXHR()
} : createStandardXHR;
(function (a) {
D.extend(D.support, {
ajax: !! a,
cors: !! a && ("withCredentials" in a)
})
})(D.ajaxSettings.xhr());
if (D.support.ajax) {
D.ajaxTransport(function (s) {
if (!s.crossDomain || D.support.cors) {
var g;
return {
send: function (d, f) {
var c = s.xhr(),
handle, i;
if (s.username) {
c.open(s.type, s.url, s.async, s.username, s.password)
} else {
c.open(s.type, s.url, s.async)
} if (s.xhrFields) {
for (i in s.xhrFields) {
c[i] = s.xhrFields[i]
}
}
if (s.mimeType && c.overrideMimeType) {
c.overrideMimeType(s.mimeType)
}
if (!s.crossDomain && !d["X-Requested-With"]) {
d["X-Requested-With"] = "XMLHttpRequest"
}
try {
for (i in d) {
c.setRequestHeader(i, d[i])
}
} catch (_) {}
c.send((s.hasContent && s.data) || null);
g = function (_, a) {
var b, statusText, responseHeaders, responses, xml;
try {
if (g && (a || c.readyState === 4)) {
g = H;
if (handle) {
c.onreadystatechange = D.noop;
if (E) {
delete xhrCallbacks[handle]
}
}
if (a) {
if (c.readyState !== 4) {
c.abort()
}
} else {
b = c.status;
responseHeaders = c.getAllResponseHeaders();
responses = {};
xml = c.responseXML;
if (xml && xml.documentElement) {
responses.xml = xml
}
try {
responses.text = c.responseText
} catch (_) {}
try {
statusText = c.statusText
} catch (e) {
statusText = ""
}
if (!b && s.isLocal && !s.crossDomain) {
b = responses.text ? 200 : 404
} else {
if (b === 1223) {
b = 204
}
}
}
}
} catch (firefoxAccessException) {
if (!a) {
f(-1, firefoxAccessException)
}
}
if (responses) {
f(b, statusText, responses, responseHeaders)
}
};
if (!s.async || c.readyState === 4) {
g()
} else {
handle = ++xhrId;
if (E) {
if (!xhrCallbacks) {
xhrCallbacks = {};
D(x).unload(E)
}
xhrCallbacks[handle] = g
}
c.onreadystatechange = g
}
},
abort: function () {
if (g) {
g(0, 1)
}
}
}
}
})
}
var A = {}, iframe, iframeDoc, rfxtypes = /^(?:toggle|show|hide)$/,
rfxnum = /^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,
timerId, fxAttrs = [
["height", "marginTop", "marginBottom", "paddingTop", "paddingBottom"],
["width", "marginLeft", "marginRight", "paddingLeft", "paddingRight"],
["opacity"]
],
fxNow;
D.fn.extend({
show: function (c, a, b) {
var d, display;
if (c || c === 0) {
return this.animate(genFx("show", 3), c, a, b)
} else {
for (var i = 0, j = this.length; i < j; i++) {
d = this[i];
if (d.style) {
display = d.style.display;
if (!D._data(d, "olddisplay") && display === "none") {
display = d.style.display = ""
}
if ((display === "" && D.css(d, "display") === "none") || !D.contains(d.ownerDocument.documentElement, d)) {
D._data(d, "olddisplay", defaultDisplay(d.nodeName))
}
}
}
for (i = 0; i < j; i++) {
d = this[i];
if (d.style) {
display = d.style.display;
if (display === "" || display === "none") {
d.style.display = D._data(d, "olddisplay") || ""
}
}
}
return this
}
},
hide: function (c, a, b) {
if (c || c === 0) {
return this.animate(genFx("hide", 3), c, a, b)
} else {
var d, display, i = 0,
j = this.length;
for (; i < j; i++) {
d = this[i];
if (d.style) {
display = D.css(d, "display");
if (display !== "none" && !D._data(d, "olddisplay")) {
D._data(d, "olddisplay", display)
}
}
}
for (i = 0; i < j; i++) {
if (this[i].style) {
this[i].style.display = "none"
}
}
return this
}
},
_toggle: D.fn.toggle,
toggle: function (c, d, b) {
var e = typeof c === "boolean";
if (D.isFunction(c) && D.isFunction(d)) {
this._toggle.apply(this, arguments)
} else {
if (c == null || e) {
this.each(function () {
var a = e ? c : D(this).is(":hidden");
D(this)[a ? "show" : "hide"]()
})
} else {
this.animate(genFx("toggle", 3), c, d, b)
}
}
return this
},
fadeTo: function (d, b, a, c) {
return this.filter(":hidden").css("opacity", 0).show().end().animate({
opacity: b
}, d, a, c)
},
animate: function (b, f, c, d) {
var g = D.speed(f, c, d);
if (D.isEmptyObject(b)) {
return this.each(g.complete, [false])
}
b = D.extend({}, b);
function doAnimation() {
if (g.queue === false) {
D._mark(this)
}
var a = D.extend({}, g),
isElement = this.nodeType === 1,
hidden = isElement && D(this).is(":hidden"),
name, val, p, e, hooks, replace, parts, start, end, unit, method;
a.animatedProperties = {};
for (p in b) {
name = D.camelCase(p);
if (p !== name) {
b[name] = b[p];
delete b[p]
}
if ((hooks = D.cssHooks[name]) && "expand" in hooks) {
replace = hooks.expand(b[name]);
delete b[name];
for (p in replace) {
if (!(p in b)) {
b[p] = replace[p]
}
}
}
}
for (name in b) {
val = b[name];
if (D.isArray(val)) {
a.animatedProperties[name] = val[1];
val = b[name] = val[0]
} else {
a.animatedProperties[name] = a.specialEasing && a.specialEasing[name] || a.easing || "swing"
} if (val === "hide" && hidden || val === "show" && !hidden) {
return a.complete.call(this)
}
if (isElement && (name === "height" || name === "width")) {
a.overflow = [this.style.overflow, this.style.overflowX, this.style.overflowY];
if (D.css(this, "display") === "inline" && D.css(this, "float") === "none") {
if (!D.support.inlineBlockNeedsLayout || defaultDisplay(this.nodeName) === "inline") {
this.style.display = "inline-block"
} else {
this.style.zoom = 1
}
}
}
}
if (a.overflow != null) {
this.style.overflow = "hidden"
}
for (p in b) {
e = new D.fx(this, a, p);
val = b[p];
if (rfxtypes.test(val)) {
method = D._data(this, "toggle" + p) || (val === "toggle" ? hidden ? "show" : "hide" : 0);
if (method) {
D._data(this, "toggle" + p, method === "show" ? "hide" : "show");
e[method]()
} else {
e[val]()
}
} else {
parts = rfxnum.exec(val);
start = e.cur();
if (parts) {
end = parseFloat(parts[2]);
unit = parts[3] || (D.cssNumber[p] ? "" : "px");
if (unit !== "px") {
D.style(this, p, (end || 1) + unit);
start = ((end || 1) / e.cur()) * start;
D.style(this, p, start + unit)
}
if (parts[1]) {
end = ((parts[1] === "-=" ? -1 : 1) * end) + start
}
e.custom(start, end, unit)
} else {
e.custom(start, val, "")
}
}
}
return true
}
return g.queue === false ? this.each(doAnimation) : this.queue(g.queue, doAnimation)
},
stop: function (f, g, h) {
if (typeof f !== "string") {
h = g;
g = f;
f = H
}
if (g && f !== false) {
this.queue(f || "fx", [])
}
return this.each(function () {
var e, hadTimers = false,
timers = D.timers,
data = D._data(this);
if (!h) {
D._unmark(true, this)
}
function stopQueue(b, a, c) {
var d = a[c];
D.removeData(b, c, true);
d.stop(h)
}
if (f == null) {
for (e in data) {
if (data[e] && data[e].stop && e.indexOf(".run") === e.length - 4) {
stopQueue(this, data, e)
}
}
} else {
if (data[e = f + ".run"] && data[e].stop) {
stopQueue(this, data, e)
}
}
for (e = timers.length; e--;) {
if (timers[e].elem === this && (f == null || timers[e].queue === f)) {
if (h) {
timers[e](true)
} else {
timers[e].saveState()
}
hadTimers = true;
timers.splice(e, 1)
}
}
if (!(h && hadTimers)) {
D.dequeue(this, f)
}
})
}
});
function createFxNow() {
setTimeout(clearFxNow, 0);
return (fxNow = D.now())
}
function clearFxNow() {
fxNow = H
}
function genFx(a, c) {
var b = {};
D.each(fxAttrs.concat.apply([], fxAttrs.slice(0, c)), function () {
b[this] = a
});
return b
}
D.each({
slideDown: genFx("show", 1),
slideUp: genFx("hide", 1),
slideToggle: genFx("toggle", 1),
fadeIn: {
opacity: "show"
},
fadeOut: {
opacity: "hide"
},
fadeToggle: {
opacity: "toggle"
}
}, function (d, e) {
D.fn[d] = function (c, a, b) {
return this.animate(e, c, a, b)
}
});
D.extend({
speed: function (c, b, d) {
var e = c && typeof c === "object" ? D.extend({}, c) : {
complete: d || !d && b || D.isFunction(c) && c,
duration: c,
easing: d && b || b && !D.isFunction(b) && b
};
e.duration = D.fx.off ? 0 : typeof e.duration === "number" ? e.duration : e.duration in D.fx.speeds ? D.fx.speeds[e.duration] : D.fx.speeds._default;
if (e.queue == null || e.queue === true) {
e.queue = "fx"
}
e.old = e.complete;
e.complete = function (a) {
if (D.isFunction(e.old)) {
e.old.call(this)
}
if (e.queue) {
D.dequeue(this, e.queue)
} else {
if (a !== false) {
D._unmark(this)
}
}
};
return e
},
easing: {
linear: function (p) {
return p
},
swing: function (p) {
return (-Math.cos(p * Math.PI) / 2) + 0.5
}
},
timers: [],
fx: function (b, c, a) {
this.options = c;
this.elem = b;
this.prop = a;
c.orig = c.orig || {}
}
});
D.fx.prototype = {
update: function () {
if (this.options.step) {
this.options.step.call(this.elem, this.now, this)
}(D.fx.step[this.prop] || D.fx.step._default)(this)
},
cur: function () {
if (this.elem[this.prop] != null && (!this.elem.style || this.elem.style[this.prop] == null)) {
return this.elem[this.prop]
}
var a, r = D.css(this.elem, this.prop);
return isNaN(a = parseFloat(r)) ? !r || r === "auto" ? 0 : r : a
},
custom: function (c, b, d) {
var e = this,
fx = D.fx;
this.startTime = fxNow || createFxNow();
this.end = b;
this.now = this.start = c;
this.pos = this.state = 0;
this.unit = d || this.unit || (D.cssNumber[this.prop] ? "" : "px");
function t(a) {
return e.step(a)
}
t.queue = this.options.queue;
t.elem = this.elem;
t.saveState = function () {
if (D._data(e.elem, "fxshow" + e.prop) === H) {
if (e.options.hide) {
D._data(e.elem, "fxshow" + e.prop, e.start)
} else {
if (e.options.show) {
D._data(e.elem, "fxshow" + e.prop, e.end)
}
}
}
};
if (t() && D.timers.push(t) && !timerId) {
timerId = setInterval(fx.tick, fx.interval)
}
},
show: function () {
var a = D._data(this.elem, "fxshow" + this.prop);
this.options.orig[this.prop] = a || D.style(this.elem, this.prop);
this.options.show = true;
if (a !== H) {
this.custom(this.cur(), a)
} else {
this.custom(this.prop === "width" || this.prop === "height" ? 1 : 0, this.cur())
}
D(this.elem).show()
},
hide: function () {
this.options.orig[this.prop] = D._data(this.elem, "fxshow" + this.prop) || D.style(this.elem, this.prop);
this.options.hide = true;
this.custom(this.cur(), 0)
},
step: function (c) {
var p, n, complete, t = fxNow || createFxNow(),
done = true,
elem = this.elem,
options = this.options;
if (c || t >= options.duration + this.startTime) {
this.now = this.end;
this.pos = this.state = 1;
this.update();
options.animatedProperties[this.prop] = true;
for (p in options.animatedProperties) {
if (options.animatedProperties[p] !== true) {
done = false
}
}
if (done) {
if (options.overflow != null && !D.support.shrinkWrapBlocks) {
D.each(["", "X", "Y"], function (a, b) {
elem.style["overflow" + b] = options.overflow[a]
})
}
if (options.hide) {
D(elem).hide()
}
if (options.hide || options.show) {
for (p in options.animatedProperties) {
D.style(elem, p, options.orig[p]);
D.removeData(elem, "fxshow" + p, true);
D.removeData(elem, "toggle" + p, true)
}
}
complete = options.complete;
if (complete) {
options.complete = false;
complete.call(elem)
}
}
return false
} else {
if (options.duration == Infinity) {
this.now = t
} else {
n = t - this.startTime;
this.state = n / options.duration;
this.pos = D.easing[options.animatedProperties[this.prop]](this.state, n, 0, 1, options.duration);
this.now = this.start + ((this.end - this.start) * this.pos)
}
this.update()
}
return true
}
};
D.extend(D.fx, {
tick: function () {
var a, timers = D.timers,
i = 0;
for (; i < timers.length; i++) {
a = timers[i];
if (!a() && timers[i] === a) {
timers.splice(i--, 1)
}
}
if (!timers.length) {
D.fx.stop()
}
},
interval: 13,
stop: function () {
clearInterval(timerId);
timerId = null
},
speeds: {
slow: 600,
fast: 200,
_default: 400
},
step: {
opacity: function (a) {
D.style(a.elem, "opacity", a.now)
},
_default: function (a) {
if (a.elem.style && a.elem.style[a.prop] != null) {
a.elem.style[a.prop] = a.now + a.unit
} else {
a.elem[a.prop] = a.now
}
}
}
});
D.each(fxAttrs.concat.apply([], fxAttrs), function (i, b) {
if (b.indexOf("margin")) {
D.fx.step[b] = function (a) {
D.style(a.elem, b, Math.max(0, a.now) + a.unit)
}
}
});
if (D.expr && D.expr.filters) {
D.expr.filters.animated = function (b) {
return D.grep(D.timers, function (a) {
return b === a.elem
}).length
}
}
function defaultDisplay(b) {
if (!A[b]) {
var a = L.body,
elem = D("<" + b + ">").appendTo(a),
display = elem.css("display");
elem.remove();
if (display === "none" || display === "") {
if (!iframe) {
iframe = L.createElement("iframe");
iframe.frameBorder = iframe.width = iframe.height = 0
}
a.appendChild(iframe);
if (!iframeDoc || !iframe.createElement) {
iframeDoc = (iframe.contentWindow || iframe.contentDocument).document;
iframeDoc.write((D.support.boxModel ? "<!doctype html>" : "") + "<html><body>");
iframeDoc.close()
}
elem = iframeDoc.createElement(b);
iframeDoc.body.appendChild(elem);
display = D.css(elem, "display");
a.removeChild(iframe)
}
A[b] = display
}
return A[b]
}
var G, rtable = /^t(?:able|d|h)$/i,
rroot = /^(?:body|html)$/i;
if ("getBoundingClientRect" in L.documentElement) {
G = function (b, a, d, c) {
try {
c = b.getBoundingClientRect()
} catch (e) {}
if (!c || !D.contains(d, b)) {
return c ? {
top: c.top,
left: c.left
} : {
top: 0,
left: 0
}
}
var f = a.body,
win = getWindow(a),
clientTop = d.clientTop || f.clientTop || 0,
clientLeft = d.clientLeft || f.clientLeft || 0,
scrollTop = win.pageYOffset || D.support.boxModel && d.scrollTop || f.scrollTop,
scrollLeft = win.pageXOffset || D.support.boxModel && d.scrollLeft || f.scrollLeft,
top = c.top + scrollTop - clientTop,
left = c.left + scrollLeft - clientLeft;
return {
top: top,
left: left
}
}
} else {
G = function (b, a, d) {
var c, offsetParent = b.offsetParent,
prevOffsetParent = b,
body = a.body,
defaultView = a.defaultView,
prevComputedStyle = defaultView ? defaultView.getComputedStyle(b, null) : b.currentStyle,
top = b.offsetTop,
left = b.offsetLeft;
while ((b = b.parentNode) && b !== body && b !== d) {
if (D.support.fixedPosition && prevComputedStyle.position === "fixed") {
break
}
c = defaultView ? defaultView.getComputedStyle(b, null) : b.currentStyle;
top -= b.scrollTop;
left -= b.scrollLeft;
if (b === offsetParent) {
top += b.offsetTop;
left += b.offsetLeft;
if (D.support.doesNotAddBorder && !(D.support.doesAddBorderForTableAndCells && rtable.test(b.nodeName))) {
top += parseFloat(c.borderTopWidth) || 0;
left += parseFloat(c.borderLeftWidth) || 0
}
prevOffsetParent = offsetParent;
offsetParent = b.offsetParent
}
if (D.support.subtractsBorderForOverflowNotVisible && c.overflow !== "visible") {
top += parseFloat(c.borderTopWidth) || 0;
left += parseFloat(c.borderLeftWidth) || 0
}
prevComputedStyle = c
}
if (prevComputedStyle.position === "relative" || prevComputedStyle.position === "static") {
top += body.offsetTop;
left += body.offsetLeft
}
if (D.support.fixedPosition && prevComputedStyle.position === "fixed") {
top += Math.max(d.scrollTop, body.scrollTop);
left += Math.max(d.scrollLeft, body.scrollLeft)
}
return {
top: top,
left: left
}
}
}
D.fn.offset = function (a) {
if (arguments.length) {
return a === H ? this : this.each(function (i) {
D.offset.setOffset(this, a, i)
})
}
var b = this[0],
doc = b && b.ownerDocument;
if (!doc) {
return null
}
if (b === doc.body) {
return D.offset.bodyOffset(b)
}
return G(b, doc, doc.documentElement)
};
D.offset = {
bodyOffset: function (a) {
var b = a.offsetTop,
left = a.offsetLeft;
if (D.support.doesNotIncludeMarginInBodyOffset) {
b += parseFloat(D.css(a, "marginTop")) || 0;
left += parseFloat(D.css(a, "marginLeft")) || 0
}
return {
top: b,
left: left
}
},
setOffset: function (a, c, i) {
var d = D.css(a, "position");
if (d === "static") {
a.style.position = "relative"
}
var b = D(a),
curOffset = b.offset(),
curCSSTop = D.css(a, "top"),
curCSSLeft = D.css(a, "left"),
calculatePosition = (d === "absolute" || d === "fixed") && D.inArray("auto", [curCSSTop, curCSSLeft]) > -1,
props = {}, curPosition = {}, curTop, curLeft;
if (calculatePosition) {
curPosition = b.position();
curTop = curPosition.top;
curLeft = curPosition.left
} else {
curTop = parseFloat(curCSSTop) || 0;
curLeft = parseFloat(curCSSLeft) || 0
} if (D.isFunction(c)) {
c = c.call(a, i, curOffset)
}
if (c.top != null) {
props.top = (c.top - curOffset.top) + curTop
}
if (c.left != null) {
props.left = (c.left - curOffset.left) + curLeft
}
if ("using" in c) {
c.using.call(a, props)
} else {
b.css(props)
}
}
};
D.fn.extend({
position: function () {
if (!this[0]) {
return null
}
var a = this[0],
offsetParent = this.offsetParent(),
offset = this.offset(),
parentOffset = rroot.test(offsetParent[0].nodeName) ? {
top: 0,
left: 0
} : offsetParent.offset();
offset.top -= parseFloat(D.css(a, "marginTop")) || 0;
offset.left -= parseFloat(D.css(a, "marginLeft")) || 0;
parentOffset.top += parseFloat(D.css(offsetParent[0], "borderTopWidth")) || 0;
parentOffset.left += parseFloat(D.css(offsetParent[0], "borderLeftWidth")) || 0;
return {
top: offset.top - parentOffset.top,
left: offset.left - parentOffset.left
}
},
offsetParent: function () {
return this.map(function () {
var a = this.offsetParent || L.body;
while (a && (!rroot.test(a.nodeName) && D.css(a, "position") === "static")) {
a = a.offsetParent
}
return a
})
}
});
D.each({
scrollLeft: "pageXOffset",
scrollTop: "pageYOffset"
}, function (g, f) {
var h = /Y/.test(f);
D.fn[g] = function (e) {
return D.access(this, function (d, a, b) {
var c = getWindow(d);
if (b === H) {
return c ? (f in c) ? c[f] : D.support.boxModel && c.document.documentElement[a] || c.document.body[a] : d[a]
}
if (c) {
c.scrollTo(!h ? b : D(c).scrollLeft(), h ? b : D(c).scrollTop())
} else {
d[a] = b
}
}, g, e, arguments.length, null)
}
});
function getWindow(a) {
return D.isWindow(a) ? a : a.nodeType === 9 ? a.defaultView || a.parentWindow : false
}
D.each({
Height: "height",
Width: "width"
}, function (g, f) {
var h = "client" + g,
scrollProp = "scroll" + g,
offsetProp = "offset" + g;
D.fn["inner" + g] = function () {
var a = this[0];
return a ? a.style ? parseFloat(D.css(a, f, "padding")) : this[f]() : null
};
D.fn["outer" + g] = function (a) {
var b = this[0];
return b ? b.style ? parseFloat(D.css(b, f, a ? "margin" : "border")) : this[f]() : null
};
D.fn[f] = function (e) {
return D.access(this, function (c, d, b) {
var a, docElemProp, orig, ret;
if (D.isWindow(c)) {
a = c.document;
docElemProp = a.documentElement[h];
return D.support.boxModel && docElemProp || a.body && a.body[h] || docElemProp
}
if (c.nodeType === 9) {
a = c.documentElement;
if (a[h] >= a[scrollProp]) {
return a[h]
}
return Math.max(c.body[scrollProp], a[scrollProp], c.body[offsetProp], a[offsetProp])
}
if (b === H) {
orig = D.css(c, d);
ret = parseFloat(orig);
return D.isNumeric(ret) ? ret : orig
}
D(c).css(d, b)
}, f, e, arguments.length, null)
}
});
x.jQCT = D;
if (!x.$) {
x.$ = D
}
if (!x.jQuery) {
x.jQuery = D
}
if (typeof define === "function" && define.amd && define.amd.jQuery) {
define("jquery", [], function () {
return D
})
}
})(window);
(function ($, g) {
$.ui = $.ui || {};
if ($.ui.version) {
return
}
$.extend($.ui, {
version: "1.8.11",
keyCode: {
ALT: 18,
BACKSPACE: 8,
CAPS_LOCK: 20,
COMMA: 188,
COMMAND: 91,
COMMAND_LEFT: 91,
COMMAND_RIGHT: 93,
CONTROL: 17,
DELETE: 46,
DOWN: 40,
END: 35,
ENTER: 13,
ESCAPE: 27,
HOME: 36,
INSERT: 45,
LEFT: 37,
MENU: 93,
NUMPAD_ADD: 107,
NUMPAD_DECIMAL: 110,
NUMPAD_DIVIDE: 111,
NUMPAD_ENTER: 108,
NUMPAD_MULTIPLY: 106,
NUMPAD_SUBTRACT: 109,
PAGE_DOWN: 34,
PAGE_UP: 33,
PERIOD: 190,
RIGHT: 39,
SHIFT: 16,
SPACE: 32,
TAB: 9,
UP: 38,
WINDOWS: 91
}
});
$.fn.extend({
_focus: $.fn.focus,
focus: function (b, c) {
return typeof b === "number" ? this.each(function () {
var a = this;
setTimeout(function () {
$(a).focus();
if (c) {
c.call(a)
}
}, b)
}) : this._focus.apply(this, arguments)
},
scrollParent: function () {
var a;
if (($.browser.msie && (/(static|relative)/).test(this.css("position"))) || (/absolute/).test(this.css("position"))) {
a = this.parents().filter(function () {
return (/(relative|absolute|fixed)/).test($.curCSS(this, "position", 1)) && (/(auto|scroll)/).test($.curCSS(this, "overflow", 1) + $.curCSS(this, "overflow-y", 1) + $.curCSS(this, "overflow-x", 1))
}).eq(0)
} else {
a = this.parents().filter(function () {
return (/(auto|scroll)/).test($.curCSS(this, "overflow", 1) + $.curCSS(this, "overflow-y", 1) + $.curCSS(this, "overflow-x", 1))
}).eq(0)
}
return (/fixed/).test(this.css("position")) || !a.length ? $(document) : a
},
zIndex: function (a) {
if (a !== g) {
return this.css("zIndex", a)
}
if (this.length) {
var b = $(this[0]),
position, value;
while (b.length && b[0] !== document) {
position = b.css("position");
if (position === "absolute" || position === "relative" || position === "fixed") {
value = parseInt(b.css("zIndex"), 10);
if (!isNaN(value) && value !== 0) {
return value
}
}
b = b.parent()
}
}
return 0
},
disableSelection: function () {
return this.bind(($.support.selectstart ? "selectstart" : "mousedown") + ".ui-disableSelection", function (a) {
a.preventDefault()
})
},
enableSelection: function () {
return this.unbind(".ui-disableSelection")
}
});
$.each(["Width", "Height"], function (i, f) {
var e = f === "Width" ? ["Left", "Right"] : ["Top", "Bottom"],
type = f.toLowerCase(),
orig = {
innerWidth: $.fn.innerWidth,
innerHeight: $.fn.innerHeight,
outerWidth: $.fn.outerWidth,
outerHeight: $.fn.outerHeight
};
function reduce(b, c, d, a) {
$.each(e, function () {
c -= parseFloat($.curCSS(b, "padding" + this, true)) || 0;
if (d) {
c -= parseFloat($.curCSS(b, "border" + this + "Width", true)) || 0
}
if (a) {
c -= parseFloat($.curCSS(b, "margin" + this, true)) || 0
}
});
return c
}
$.fn["inner" + f] = function (a) {
if (a === g) {
return orig["inner" + f].call(this)
}
return this.each(function () {
$(this).css(type, reduce(this, a) + "px")
})
};
$.fn["outer" + f] = function (b, a) {
if (typeof b !== "number") {
return orig["outer" + f].call(this, b)
}
return this.each(function () {
$(this).css(type, reduce(this, b, true, a) + "px")
})
}
});
function visible(a) {
return !$(a).parents().andSelf().filter(function () {
return $.curCSS(this, "visibility") === "hidden" || $.expr.filters.hidden(this)
}).length
}
$.extend($.expr[":"], {
data: function (a, i, b) {
return !!$.data(a, b[3])
},
focusable: function (a) {
var c = a.nodeName.toLowerCase(),
tabIndex = $.attr(a, "tabindex");
if ("area" === c) {
var b = a.parentNode,
mapName = b.name,
img;
if (!a.href || !mapName || b.nodeName.toLowerCase() !== "map") {
return false
}
img = $("img[usemap=#" + mapName + "]")[0];
return !!img && visible(img)
}
return (/input|select|textarea|button|object/.test(c) ? !a.disabled : "a" == c ? a.href || !isNaN(tabIndex) : !isNaN(tabIndex)) && visible(a)
},
tabbable: function (a) {
var b = $.attr(a, "tabindex");
return (isNaN(b) || b >= 0) && $(a).is(":focusable")
}
});
$(function () {
var a = document.body,
div = a.appendChild(div = document.createElement("div"));
$.extend(div.style, {
minHeight: "100px",
height: "auto",
padding: 0,
borderWidth: 0
});
$.support.minHeight = div.offsetHeight === 100;
$.support.selectstart = "onselectstart" in div;
a.removeChild(div).style.display = "none"
});
$.extend($.ui, {
plugin: {
add: function (d, c, a) {
var b = $.ui[d].prototype;
for (var i in a) {
b.plugins[i] = b.plugins[i] || [];
b.plugins[i].push([c, a[i]])
}
},
call: function (d, c, b) {
var a = d.plugins[c];
if (!a || !d.element[0].parentNode) {
return
}
for (var i = 0; i < a.length; i++) {
if (d.options[a[i][0]]) {
a[i][1].apply(d.element, b)
}
}
}
},
contains: function (a, b) {
return document.compareDocumentPosition ? a.compareDocumentPosition(b) & 16 : a !== b && a.contains(b)
},
hasScroll: function (c, a) {
if ($(c).css("overflow") === "hidden") {
return false
}
var b = (a && a === "left") ? "scrollLeft" : "scrollTop",
has = false;
if (c[b] > 0) {
return true
}
c[b] = 1;
has = (c[b] > 0);
c[b] = 0;
return has
},
isOverAxis: function (x, b, a) {
return (x > b) && (x < (b + a))
},
isOver: function (y, x, a, b, d, c) {
return $.ui.isOverAxis(y, a, d) && $.ui.isOverAxis(x, b, c)
}
})
})(jQCT);
(function ($, h) {
if ($.cleanData) {
var j = $.cleanData;
$.cleanData = function (a) {
for (var i = 0, elem;
(elem = a[i]) != null; i++) {
$(elem).triggerHandler("remove")
}
j(a)
}
} else {
var k = $.fn.remove;
$.fn.remove = function (b, a) {
return this.each(function () {
if (!a) {
if (!b || $.filter(b, [this]).length) {
$("*", this).add([this]).each(function () {
$(this).triggerHandler("remove")
})
}
}
return k.call($(this), b, a)
})
}
}
$.widget = function (f, d, g) {
var e = f.split(".")[0],
fullName;
f = f.split(".")[1];
fullName = e + "-" + f;
if (!g) {
g = d;
d = $.Widget
}
$.expr[":"][fullName] = function (a) {
return !!$.data(a, f)
};
$[e] = $[e] || {};
$[e][f] = function (b, a) {
if (arguments.length) {
this._createWidget(b, a)
}
};
var c = new d();
c.options = $.extend(true, {}, c.options);
$[e][f].prototype = $.extend(true, c, {
namespace: e,
widgetName: f,
widgetEventPrefix: $[e][f].prototype.widgetEventPrefix || f,
widgetBaseClass: fullName
}, g);
$.widget.bridge(f, $[e][f])
};
$.widget.bridge = function (e, d) {
$.fn[e] = function (b) {
var c = typeof b === "string",
args = Array.prototype.slice.call(arguments, 1),
returnValue = this;
b = !c && args.length ? $.extend.apply(null, [true, b].concat(args)) : b;
if (c && b.charAt(0) === "_") {
return returnValue
}
if (c) {
this.each(function () {
var a = $.data(this, e),
methodValue = a && $.isFunction(a[b]) ? a[b].apply(a, args) : a;
if (methodValue !== a && methodValue !== h) {
returnValue = methodValue;
return false
}
})
} else {
this.each(function () {
var a = $.data(this, e);
if (a) {
a.option(b || {})._init()
} else {
$.data(this, e, new d(b, this))
}
})
}
return returnValue
}
};
$.Widget = function (b, a) {
if (arguments.length) {
this._createWidget(b, a)
}
};
$.Widget.prototype = {
widgetName: "widget",
widgetEventPrefix: "",
options: {
disabled: false
},
_createWidget: function (c, b) {
$.data(b, this.widgetName, this);
this.element = $(b);
this.options = $.extend(true, {}, this.options, this._getCreateOptions(), c);
var a = this;
this.element.bind("remove." + this.widgetName, function () {
a.destroy()
});
this._create();
this._trigger("create");
this._init()
},
_getCreateOptions: function () {
return $.metadata && $.metadata.get(this.element[0])[this.widgetName]
},
_create: function () {},
_init: function () {},
destroy: function () {
this.element.unbind("." + this.widgetName).removeData(this.widgetName);
this.widget().unbind("." + this.widgetName).removeAttr("aria-disabled").removeClass(this.widgetBaseClass + "-disabled ui-state-disabled")
},
widget: function () {
return this.element
},
option: function (b, a) {
var c = b;
if (arguments.length === 0) {
return $.extend({}, this.options)
}
if (typeof b === "string") {
if (a === h) {
return this.options[b]
}
c = {};
c[b] = a
}
this._setOptions(c);
return this
},
_setOptions: function (d) {
var c = this;
$.each(d, function (b, a) {
c._setOption(b, a)
});
return this
},
_setOption: function (b, a) {
this.options[b] = a;
if (b === "disabled") {
this.widget()[a ? "addClass" : "removeClass"](this.widgetBaseClass + "-disabled ui-state-disabled").attr("aria-disabled", a)
}
return this
},
enable: function () {
return this._setOption("disabled", false)
},
disable: function () {
return this._setOption("disabled", true)
},
_trigger: function (d, c, b) {
var a = this.options[d];
c = $.Event(c);
c.type = (d === this.widgetEventPrefix ? d : this.widgetEventPrefix + d).toLowerCase();
b = b || {};
if (c.originalEvent) {
for (var i = $.event.props.length, prop; i;) {
prop = $.event.props[--i];
c[prop] = c.originalEvent[prop]
}
}
this.element.trigger(c, b);
return !($.isFunction(a) && a.call(this.element[0], c, b) === false || c.isDefaultPrevented())
}
}
})(jQCT);
(function ($, d) {
$.widget("ui.mouse", {
options: {
cancel: ":input,option",
distance: 1,
delay: 0
},
_mouseInit: function () {
var b = this;
this.element.bind("mousedown." + this.widgetName, function (a) {
return b._mouseDown(a)
}).bind("click." + this.widgetName, function (a) {
if (true === $.data(a.target, b.widgetName + ".preventClickEvent")) {
$.removeData(a.target, b.widgetName + ".preventClickEvent");
a.stopImmediatePropagation();
return false
}
});
this.started = false
},
_mouseDestroy: function () {
this.element.unbind("." + this.widgetName)
},
_mouseDown: function (b) {
b.originalEvent = b.originalEvent || {};
if (b.originalEvent.mouseHandled) {
return
}(this._mouseStarted && this._mouseUp(b));
this._mouseDownEvent = b;
var c = this,
btnIsLeft = (b.which == 1),
elIsCancel = (typeof this.options.cancel == "string" ? $(b.target).parents().add(b.target).filter(this.options.cancel).length : false);
if (!btnIsLeft || elIsCancel || !this._mouseCapture(b)) {
return true
}
this.mouseDelayMet = !this.options.delay;
if (!this.mouseDelayMet) {
this._mouseDelayTimer = setTimeout(function () {
c.mouseDelayMet = true
}, this.options.delay)
}
if (this._mouseDistanceMet(b) && this._mouseDelayMet(b)) {
this._mouseStarted = (this._mouseStart(b) !== false);
if (!this._mouseStarted) {
b.preventDefault();
return true
}
}
if (true === $.data(b.target, this.widgetName + ".preventClickEvent")) {
$.removeData(b.target, this.widgetName + ".preventClickEvent")
}
this._mouseMoveDelegate = function (a) {
return c._mouseMove(a)
};
this._mouseUpDelegate = function (a) {
return c._mouseUp(a)
};
$(document).bind("mousemove." + this.widgetName, this._mouseMoveDelegate).bind("mouseup." + this.widgetName, this._mouseUpDelegate);
b.preventDefault();
b.originalEvent.mouseHandled = true;
return true
},
_mouseMove: function (a) {
if ($.browser.msie && !(document.documentMode >= 9) && !a.button) {
return this._mouseUp(a)
}
if (this._mouseStarted) {
this._mouseDrag(a);
return a.preventDefault()
}
if (this._mouseDistanceMet(a) && this._mouseDelayMet(a)) {
this._mouseStarted = (this._mouseStart(this._mouseDownEvent, a) !== false);
(this._mouseStarted ? this._mouseDrag(a) : this._mouseUp(a))
}
return !this._mouseStarted
},
_mouseUp: function (a) {
$(document).unbind("mousemove." + this.widgetName, this._mouseMoveDelegate).unbind("mouseup." + this.widgetName, this._mouseUpDelegate);
if (this._mouseStarted) {
this._mouseStarted = false;
if (a.target == this._mouseDownEvent.target) {
$.data(a.target, this.widgetName + ".preventClickEvent", true)
}
this._mouseStop(a)
}
return false
},
_mouseDistanceMet: function (a) {
return (Math.max(Math.abs(this._mouseDownEvent.pageX - a.pageX), Math.abs(this._mouseDownEvent.pageY - a.pageY)) >= this.options.distance)
},
_mouseDelayMet: function (a) {
return this.mouseDelayMet
},
_mouseStart: function (a) {},
_mouseDrag: function (a) {},
_mouseStop: function (a) {},
_mouseCapture: function (a) {
return true
}
})
})(jQCT);
(function ($, e) {
$.ui = $.ui || {};
var f = /left|center|right/,
verticalPositions = /top|center|bottom/,
center = "center",
_position = $.fn.position,
_offset = $.fn.offset;
$.fn.position = function (d) {
if (!d || !d.of) {
return _position.apply(this, arguments)
}
d = $.extend({}, d);
var c = $(d.of),
targetElem = c[0],
collision = (d.collision || "flip").split(" "),
offset = d.offset ? d.offset.split(" ") : [0, 0],
targetWidth, targetHeight, basePosition;
if (targetElem.nodeType === 9) {
targetWidth = c.width();
targetHeight = c.height();
basePosition = {
top: 0,
left: 0
}
} else {
if (targetElem.setTimeout) {
targetWidth = c.width();
targetHeight = c.height();
basePosition = {
top: c.scrollTop(),
left: c.scrollLeft()
}
} else {
if (targetElem.preventDefault) {
d.at = "left top";
targetWidth = targetHeight = 0;
basePosition = {
top: d.of.pageY,
left: d.of.pageX
}
} else {
targetWidth = c.outerWidth();
targetHeight = c.outerHeight();
basePosition = c.offset()
}
}
}
$.each(["my", "at"], function () {
var a = (d[this] || "").split(" ");
if (a.length === 1) {
a = f.test(a[0]) ? a.concat([center]) : verticalPositions.test(a[0]) ? [center].concat(a) : [center, center]
}
a[0] = f.test(a[0]) ? a[0] : center;
a[1] = verticalPositions.test(a[1]) ? a[1] : center;
d[this] = a
});
if (collision.length === 1) {
collision[1] = collision[0]
}
offset[0] = parseInt(offset[0], 10) || 0;
if (offset.length === 1) {
offset[1] = offset[0]
}
offset[1] = parseInt(offset[1], 10) || 0;
if (d.at[0] === "right") {
basePosition.left += targetWidth
} else {
if (d.at[0] === center) {
basePosition.left += targetWidth / 2
}
} if (d.at[1] === "bottom") {
basePosition.top += targetHeight
} else {
if (d.at[1] === center) {
basePosition.top += targetHeight / 2
}
}
basePosition.left += offset[0];
basePosition.top += offset[1];
return this.each(function () {
var b = $(this),
elemWidth = b.outerWidth(),
elemHeight = b.outerHeight(),
marginLeft = parseInt($.curCSS(this, "marginLeft", true)) || 0,
marginTop = parseInt($.curCSS(this, "marginTop", true)) || 0,
collisionWidth = elemWidth + marginLeft + (parseInt($.curCSS(this, "marginRight", true)) || 0),
collisionHeight = elemHeight + marginTop + (parseInt($.curCSS(this, "marginBottom", true)) || 0),
position = $.extend({}, basePosition),
collisionPosition;
if (d.my[0] === "right") {
position.left -= elemWidth
} else {
if (d.my[0] === center) {
position.left -= elemWidth / 2
}
} if (d.my[1] === "bottom") {
position.top -= elemHeight
} else {
if (d.my[1] === center) {
position.top -= elemHeight / 2
}
}
position.left = Math.round(position.left);
position.top = Math.round(position.top);
collisionPosition = {
left: position.left - marginLeft,
top: position.top - marginTop
};
$.each(["left", "top"], function (i, a) {
if ($.ui.position[collision[i]]) {
$.ui.position[collision[i]][a](position, {
targetWidth: targetWidth,
targetHeight: targetHeight,
elemWidth: elemWidth,
elemHeight: elemHeight,
collisionPosition: collisionPosition,
collisionWidth: collisionWidth,
collisionHeight: collisionHeight,
offset: offset,
my: d.my,
at: d.at
})
}
});
if ($.fn.bgiframe) {
b.bgiframe()
}
b.css(position)
})
};
$.ui.position = {
fit: {
left: function (b, a) {
var c = $(window),
over = a.collisionPosition.left + a.collisionWidth - c.width() - c.scrollLeft();
b.left = over > 0 ? b.left - over : Math.max(b.left - a.collisionPosition.left, b.left)
},
top: function (b, a) {
var c = $(window),
over = a.collisionPosition.top + a.collisionHeight - c.height() - c.scrollTop();
b.top = over > 0 ? b.top - over : Math.max(b.top - a.collisionPosition.top, b.top)
}
},
flip: {
left: function (b, a) {
if (a.at[0] === center) {
return
}
var c = $(window),
over = a.collisionPosition.left + a.collisionWidth - c.width() - c.scrollLeft(),
myOffset = a.my[0] === "left" ? -a.elemWidth : a.my[0] === "right" ? a.elemWidth : 0,
atOffset = a.at[0] === "left" ? a.targetWidth : -a.targetWidth,
offset = -2 * a.offset[0];
b.left += a.collisionPosition.left < 0 ? myOffset + atOffset + offset : over > 0 ? myOffset + atOffset + offset : 0
},
top: function (b, a) {
if (a.at[1] === center) {
return
}
var c = $(window),
over = a.collisionPosition.top + a.collisionHeight - c.height() - c.scrollTop(),
myOffset = a.my[1] === "top" ? -a.elemHeight : a.my[1] === "bottom" ? a.elemHeight : 0,
atOffset = a.at[1] === "top" ? a.targetHeight : -a.targetHeight,
offset = -2 * a.offset[1];
b.top += a.collisionPosition.top < 0 ? myOffset + atOffset + offset : over > 0 ? myOffset + atOffset + offset : 0
}
}
};
if (!$.offset.setOffset) {
$.offset.setOffset = function (b, c) {
if (/static/.test($.curCSS(b, "position"))) {
b.style.position = "relative"
}
var a = $(b),
curOffset = a.offset(),
curTop = parseInt($.curCSS(b, "top", true), 10) || 0,
curLeft = parseInt($.curCSS(b, "left", true), 10) || 0,
props = {
top: (c.top - curOffset.top) + curTop,
left: (c.left - curOffset.left) + curLeft
};
if ("using" in c) {
c.using.call(b, props)
} else {
a.css(props)
}
};
$.fn.offset = function (a) {
var b = this[0];
if (!b || !b.ownerDocument) {
return null
}
if (a) {
return this.each(function () {
$.offset.setOffset(this, a)
})
}
return _offset.call(this)
}
}
}(jQCT));
(function ($, j) {
$.effects = {};
$.each(["backgroundColor", "borderBottomColor", "borderLeftColor", "borderRightColor", "borderTopColor", "borderColor", "color", "outlineColor"], function (i, b) {
$.fx.step[b] = function (a) {
if (!a.colorInit) {
a.start = getColor(a.elem, b);
a.end = getRGB(a.end);
a.colorInit = true
}
a.elem.style[b] = "rgb(" + Math.max(Math.min(parseInt((a.pos * (a.end[0] - a.start[0])) + a.start[0], 10), 255), 0) + "," + Math.max(Math.min(parseInt((a.pos * (a.end[1] - a.start[1])) + a.start[1], 10), 255), 0) + "," + Math.max(Math.min(parseInt((a.pos * (a.end[2] - a.start[2])) + a.start[2], 10), 255), 0) + ")"
}
});
function getRGB(a) {
var b;
if (a && a.constructor == Array && a.length == 3) {
return a
}
if (b = /rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(a)) {
return [parseInt(b[1], 10), parseInt(b[2], 10), parseInt(b[3], 10)]
}
if (b = /rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(a)) {
return [parseFloat(b[1]) * 2.55, parseFloat(b[2]) * 2.55, parseFloat(b[3]) * 2.55]
}
if (b = /#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(a)) {
return [parseInt(b[1], 16), parseInt(b[2], 16), parseInt(b[3], 16)]
}
if (b = /#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(a)) {
return [parseInt(b[1] + b[1], 16), parseInt(b[2] + b[2], 16), parseInt(b[3] + b[3], 16)]
}
if (b = /rgba\(0, 0, 0, 0\)/.exec(a)) {
return k.transparent
}
return k[$.trim(a).toLowerCase()]
}
function getColor(c, a) {
var b;
do {
b = $.curCSS(c, a);
if (b != "" && b != "transparent" || $.nodeName(c, "body")) {
break
}
a = "backgroundColor"
} while (c = c.parentNode);
return getRGB(b)
}
var k = {
aqua: [0, 255, 255],
azure: [240, 255, 255],
beige: [245, 245, 220],
black: [0, 0, 0],
blue: [0, 0, 255],
brown: [165, 42, 42],
cyan: [0, 255, 255],
darkblue: [0, 0, 139],
darkcyan: [0, 139, 139],
darkgrey: [169, 169, 169],
darkgreen: [0, 100, 0],
darkkhaki: [189, 183, 107],
darkmagenta: [139, 0, 139],
darkolivegreen: [85, 107, 47],
darkorange: [255, 140, 0],
darkorchid: [153, 50, 204],
darkred: [139, 0, 0],
darksalmon: [233, 150, 122],
darkviolet: [148, 0, 211],
fuchsia: [255, 0, 255],
gold: [255, 215, 0],
green: [0, 128, 0],
indigo: [75, 0, 130],
khaki: [240, 230, 140],
lightblue: [173, 216, 230],
lightcyan: [224, 255, 255],
lightgreen: [144, 238, 144],
lightgrey: [211, 211, 211],
lightpink: [255, 182, 193],
lightyellow: [255, 255, 224],
lime: [0, 255, 0],
magenta: [255, 0, 255],
maroon: [128, 0, 0],
navy: [0, 0, 128],
olive: [128, 128, 0],
orange: [255, 165, 0],
pink: [255, 192, 203],
purple: [128, 0, 128],
violet: [128, 0, 128],
red: [255, 0, 0],
silver: [192, 192, 192],
white: [255, 255, 255],
yellow: [255, 255, 0],
transparent: [255, 255, 255]
};
var h = ["add", "remove", "toggle"],
shorthandStyles = {
border: 1,
borderBottom: 1,
borderColor: 1,
borderLeft: 1,
borderRight: 1,
borderTop: 1,
borderWidth: 1,
margin: 1,
padding: 1
};
function getElementStyles() {
var c = document.defaultView ? document.defaultView.getComputedStyle(this, null) : this.currentStyle,
newStyle = {}, key, camelCase;
if (c && c.length && c[0] && c[c[0]]) {
var d = c.length;
while (d--) {
key = c[d];
if (typeof c[key] == "string") {
camelCase = key.replace(/\-(\w)/g, function (a, b) {
return b.toUpperCase()
});
newStyle[camelCase] = c[key]
}
}
} else {
for (key in c) {
if (typeof c[key] === "string") {
newStyle[key] = c[key]
}
}
}
return newStyle
}
function filterStyles(b) {
var a, value;
for (a in b) {
value = b[a];
if (value == null || $.isFunction(value) || a in shorthandStyles || (/scrollbar/).test(a) || (!(/color/i).test(a) && isNaN(parseFloat(value)))) {
delete b[a]
}
}
return b
}
function styleDifference(b, a) {
var c = {
_: 0
}, name;
for (name in a) {
if (b[name] != a[name]) {
c[name] = a[name]
}
}
return c
}
$.effects.animateClass = function (g, f, d, e) {
if ($.isFunction(d)) {
e = d;
d = null
}
return this.queue("fx", function () {
var b = $(this),
originalStyleAttr = b.attr("style") || " ",
originalStyle = filterStyles(getElementStyles.call(this)),
newStyle, className = b.attr("className");
$.each(h, function (i, a) {
if (g[a]) {
b[a + "Class"](g[a])
}
});
newStyle = filterStyles(getElementStyles.call(this));
b.attr("className", className);
b.animate(styleDifference(originalStyle, newStyle), f, d, function () {
$.each(h, function (i, a) {
if (g[a]) {
b[a + "Class"](g[a])
}
});
if (typeof b.attr("style") == "object") {
b.attr("style").cssText = "";
b.attr("style").cssText = originalStyleAttr
} else {
b.attr("style", originalStyleAttr)
} if (e) {
e.apply(this, arguments)
}
});
var c = $.queue(this),
anim = c.splice(c.length - 1, 1)[0];
c.splice(1, 0, anim);
$.dequeue(this)
})
};
$.fn.extend({
_addClass: $.fn.addClass,
addClass: function (c, d, a, b) {
return d ? $.effects.animateClass.apply(this, [{
add: c
},
d, a, b
]) : this._addClass(c)
},
_removeClass: $.fn.removeClass,
removeClass: function (c, d, a, b) {
return d ? $.effects.animateClass.apply(this, [{
remove: c
},
d, a, b
]) : this._removeClass(c)
},
_toggleClass: $.fn.toggleClass,
toggleClass: function (c, e, d, a, b) {
if (typeof e == "boolean" || e === j) {
if (!d) {
return this._toggleClass(c, e)
} else {
return $.effects.animateClass.apply(this, [(e ? {
add: c
} : {
remove: c
}), d, a, b])
}
} else {
return $.effects.animateClass.apply(this, [{
toggle: c
},
e, d, a
])
}
},
switchClass: function (e, c, d, a, b) {
return $.effects.animateClass.apply(this, [{
add: c,
remove: e
},
d, a, b
])
}
});
$.extend($.effects, {
version: "1.8.11",
save: function (a, b) {
for (var i = 0; i < b.length; i++) {
if (b[i] !== null) {
a.data("ec.storage." + b[i], a[0].style[b[i]])
}
}
},
restore: function (a, b) {
for (var i = 0; i < b.length; i++) {
if (b[i] !== null) {
a.css(b[i], a.data("ec.storage." + b[i]))
}
}
},
setMode: function (b, a) {
if (a == "toggle") {
a = b.is(":hidden") ? "show" : "hide"
}
return a
},
getBaseline: function (a, b) {
var y, x;
switch (a[0]) {
case "top":
y = 0;
break;
case "middle":
y = 0.5;
break;
case "bottom":
y = 1;
break;
default:
y = a[0] / b.height
}
switch (a[1]) {
case "left":
x = 0;
break;
case "center":
x = 0.5;
break;
case "right":
x = 1;
break;
default:
x = a[1] / b.width
}
return {
x: x,
y: y
}
},
createWrapper: function (b) {
if (b.parent().is(".ui-effects-wrapper")) {
return b.parent()
}
var c = {
width: b.outerWidth(true),
height: b.outerHeight(true),
"float": b.css("float")
}, wrapper = $("<div></div>").addClass("ui-effects-wrapper").css({
fontSize: "100%",
background: "transparent",
border: "none",
margin: 0,
padding: 0
});
b.wrap(wrapper);
wrapper = b.parent();
if (b.css("position") == "static") {
wrapper.css({
position: "relative"
});
b.css({
position: "relative"
})
} else {
$.extend(c, {
position: b.css("position"),
zIndex: b.css("z-index")
});
$.each(["top", "left", "bottom", "right"], function (i, a) {
c[a] = b.css(a);
if (isNaN(parseInt(c[a], 10))) {
c[a] = "auto"
}
});
b.css({
position: "relative",
top: 0,
left: 0,
right: "auto",
bottom: "auto"
})
}
return wrapper.css(c).show()
},
removeWrapper: function (a) {
if (a.parent().is(".ui-effects-wrapper")) {
return a.parent().replaceWith(a)
}
return a
},
setTransition: function (c, a, d, b) {
b = b || {};
$.each(a, function (i, x) {
unit = c.cssUnit(x);
if (unit[0] > 0) {
b[x] = unit[0] * d + unit[1]
}
});
return b
}
});
function _normalizeArguments(c, d, b, a) {
if (typeof c == "object") {
a = d;
b = null;
d = c;
c = d.effect
}
if ($.isFunction(d)) {
a = d;
b = null;
d = {}
}
if (typeof d == "number" || $.fx.speeds[d]) {
a = b;
b = d;
d = {}
}
if ($.isFunction(b)) {
a = b;
b = null
}
d = d || {};
b = b || d.duration;
b = $.fx.off ? 0 : typeof b == "number" ? b : b in $.fx.speeds ? $.fx.speeds[b] : $.fx.speeds._default;
a = a || d.complete;
return [c, d, b, a]
}
function standardSpeed(a) {
if (!a || typeof a === "number" || $.fx.speeds[a]) {
return true
}
if (typeof a === "string" && !$.effects[a]) {
return true
}
return false
}
$.fn.extend({
effect: function (c, d, b, a) {
var e = _normalizeArguments.apply(this, arguments),
args2 = {
options: e[1],
duration: e[2],
callback: e[3]
}, mode = args2.options.mode,
effectMethod = $.effects[c];
if ($.fx.off || !effectMethod) {
if (mode) {
return this[mode](args2.duration, args2.callback)
} else {
return this.each(function () {
if (args2.callback) {
args2.callback.call(this)
}
})
}
}
return effectMethod.call(this, args2)
},
_show: $.fn.show,
show: function (a) {
if (standardSpeed(a)) {
return this._show.apply(this, arguments)
} else {
var b = _normalizeArguments.apply(this, arguments);
b[1].mode = "show";
return this.effect.apply(this, b)
}
},
_hide: $.fn.hide,
hide: function (a) {
if (standardSpeed(a)) {
return this._hide.apply(this, arguments)
} else {
var b = _normalizeArguments.apply(this, arguments);
b[1].mode = "hide";
return this.effect.apply(this, b)
}
},
__toggle: $.fn.toggle,
toggle: function (a) {
if (standardSpeed(a) || typeof a === "boolean" || $.isFunction(a)) {
return this.__toggle.apply(this, arguments)
} else {
var b = _normalizeArguments.apply(this, arguments);
b[1].mode = "toggle";
return this.effect.apply(this, b)
}
},
cssUnit: function (c) {
var b = this.css(c),
val = [];
$.each(["em", "px", "%", "pt"], function (i, a) {
if (b.indexOf(a) > 0) {
val = [parseFloat(b), a]
}
});
return val
}
});
$.easing.jswing = $.easing.swing;
$.extend($.easing, {
def: "easeOutQuad",
swing: function (x, t, b, c, d) {
return $.easing[$.easing.def](x, t, b, c, d)
},
easeInQuad: function (x, t, b, c, d) {
return c * (t /= d) * t + b
},
easeOutQuad: function (x, t, b, c, d) {
return -c * (t /= d) * (t - 2) + b
},
easeInOutQuad: function (x, t, b, c, d) {
if ((t /= d / 2) < 1) {
return c / 2 * t * t + b
}
return -c / 2 * ((--t) * (t - 2) - 1) + b
},
easeInCubic: function (x, t, b, c, d) {
return c * (t /= d) * t * t + b
},
easeOutCubic: function (x, t, b, c, d) {
return c * ((t = t / d - 1) * t * t + 1) + b
},
easeInOutCubic: function (x, t, b, c, d) {
if ((t /= d / 2) < 1) {
return c / 2 * t * t * t + b
}
return c / 2 * ((t -= 2) * t * t + 2) + b
},
easeInQuart: function (x, t, b, c, d) {
return c * (t /= d) * t * t * t + b
},
easeOutQuart: function (x, t, b, c, d) {
return -c * ((t = t / d - 1) * t * t * t - 1) + b
},
easeInOutQuart: function (x, t, b, c, d) {
if ((t /= d / 2) < 1) {
return c / 2 * t * t * t * t + b
}
return -c / 2 * ((t -= 2) * t * t * t - 2) + b
},
easeInQuint: function (x, t, b, c, d) {
return c * (t /= d) * t * t * t * t + b
},
easeOutQuint: function (x, t, b, c, d) {
return c * ((t = t / d - 1) * t * t * t * t + 1) + b
},
easeInOutQuint: function (x, t, b, c, d) {
if ((t /= d / 2) < 1) {
return c / 2 * t * t * t * t * t + b
}
return c / 2 * ((t -= 2) * t * t * t * t + 2) + b
},
easeInSine: function (x, t, b, c, d) {
return -c * Math.cos(t / d * (Math.PI / 2)) + c + b
},
easeOutSine: function (x, t, b, c, d) {
return c * Math.sin(t / d * (Math.PI / 2)) + b
},
easeInOutSine: function (x, t, b, c, d) {
return -c / 2 * (Math.cos(Math.PI * t / d) - 1) + b
},
easeInExpo: function (x, t, b, c, d) {
return (t == 0) ? b : c * Math.pow(2, 10 * (t / d - 1)) + b
},
easeOutExpo: function (x, t, b, c, d) {
return (t == d) ? b + c : c * (-Math.pow(2, -10 * t / d) + 1) + b
},
easeInOutExpo: function (x, t, b, c, d) {
if (t == 0) {
return b
}
if (t == d) {
return b + c
}
if ((t /= d / 2) < 1) {
return c / 2 * Math.pow(2, 10 * (t - 1)) + b
}
return c / 2 * (-Math.pow(2, -10 * --t) + 2) + b
},
easeInCirc: function (x, t, b, c, d) {
return -c * (Math.sqrt(1 - (t /= d) * t) - 1) + b
},
easeOutCirc: function (x, t, b, c, d) {
return c * Math.sqrt(1 - (t = t / d - 1) * t) + b
},
easeInOutCirc: function (x, t, b, c, d) {
if ((t /= d / 2) < 1) {
return -c / 2 * (Math.sqrt(1 - t * t) - 1) + b
}
return c / 2 * (Math.sqrt(1 - (t -= 2) * t) + 1) + b
},
easeInElastic: function (x, t, b, c, d) {
var s = 1.70158;
var p = 0;
var a = c;
if (t == 0) {
return b
}
if ((t /= d) == 1) {
return b + c
}
if (!p) {
p = d * 0.3
}
if (a < Math.abs(c)) {
a = c;
var s = p / 4
} else {
var s = p / (2 * Math.PI) * Math.asin(c / a)
}
return -(a * Math.pow(2, 10 * (t -= 1)) * Math.sin((t * d - s) * (2 * Math.PI) / p)) + b
},
easeOutElastic: function (x, t, b, c, d) {
var s = 1.70158;
var p = 0;
var a = c;
if (t == 0) {
return b
}
if ((t /= d) == 1) {
return b + c
}
if (!p) {
p = d * 0.3
}
if (a < Math.abs(c)) {
a = c;
var s = p / 4
} else {
var s = p / (2 * Math.PI) * Math.asin(c / a)
}
return a * Math.pow(2, -10 * t) * Math.sin((t * d - s) * (2 * Math.PI) / p) + c + b
},
easeInOutElastic: function (x, t, b, c, d) {
var s = 1.70158;
var p = 0;
var a = c;
if (t == 0) {
return b
}
if ((t /= d / 2) == 2) {
return b + c
}
if (!p) {
p = d * (0.3 * 1.5)
}
if (a < Math.abs(c)) {
a = c;
var s = p / 4
} else {
var s = p / (2 * Math.PI) * Math.asin(c / a)
} if (t < 1) {
return -0.5 * (a * Math.pow(2, 10 * (t -= 1)) * Math.sin((t * d - s) * (2 * Math.PI) / p)) + b
}
return a * Math.pow(2, -10 * (t -= 1)) * Math.sin((t * d - s) * (2 * Math.PI) / p) * 0.5 + c + b
},
easeInBack: function (x, t, b, c, d, s) {
if (s == j) {
s = 1.70158
}
return c * (t /= d) * t * ((s + 1) * t - s) + b
},
easeOutBack: function (x, t, b, c, d, s) {
if (s == j) {
s = 1.70158
}
return c * ((t = t / d - 1) * t * ((s + 1) * t + s) + 1) + b
},
easeInOutBack: function (x, t, b, c, d, s) {
if (s == j) {
s = 1.70158
}
if ((t /= d / 2) < 1) {
return c / 2 * (t * t * (((s *= (1.525)) + 1) * t - s)) + b
}
return c / 2 * ((t -= 2) * t * (((s *= (1.525)) + 1) * t + s) + 2) + b
},
easeInBounce: function (x, t, b, c, d) {
return c - $.easing.easeOutBounce(x, d - t, 0, c, d) + b
},
easeOutBounce: function (x, t, b, c, d) {
if ((t /= d) < (1 / 2.75)) {
return c * (7.5625 * t * t) + b
} else {
if (t < (2 / 2.75)) {
return c * (7.5625 * (t -= (1.5 / 2.75)) * t + 0.75) + b
} else {
if (t < (2.5 / 2.75)) {
return c * (7.5625 * (t -= (2.25 / 2.75)) * t + 0.9375) + b
} else {
return c * (7.5625 * (t -= (2.625 / 2.75)) * t + 0.984375) + b
}
}
}
},
easeInOutBounce: function (x, t, b, c, d) {
if (t < d / 2) {
return $.easing.easeInBounce(x, t * 2, 0, c, d) * 0.5 + b
}
return $.easing.easeOutBounce(x, t * 2 - d, 0, c, d) * 0.5 + c * 0.5 + b
}
})
})(jQCT);
(function ($, l) {
$.effects.fold = function (o) {
return this.queue(function () {
var i = $(this),
props = ["position", "top", "bottom", "left", "right"];
var e = $.effects.setMode(i, o.options.mode || "hide");
var a = o.options.size || 15;
var b = !(!o.options.horizFirst);
var g = o.duration ? o.duration / 2 : $.fx.speeds._default / 2;
$.effects.save(i, props);
i.show();
var j = $.effects.createWrapper(i).css({
overflow: "hidden"
});
var f = ((e == "show") != b);
var h = f ? ["width", "height"] : ["height", "width"];
var k = f ? [j.width(), j.height()] : [j.height(), j.width()];
var d = /([0-9]+)%/.exec(a);
if (d) {
a = parseInt(d[1], 10) / 100 * k[e == "hide" ? 0 : 1]
}
if (e == "show") {
j.css(b ? {
height: 0,
width: a
} : {
height: a,
width: 0
})
}
var c = {}, animation2 = {};
c[h[0]] = e == "show" ? k[0] : a;
animation2[h[1]] = e == "show" ? k[1] : 0;
j.animate(c, g, o.options.easing).animate(animation2, g, o.options.easing, function () {
if (e == "hide") {
i.hide()
}
$.effects.restore(i, props);
$.effects.removeWrapper(i);
if (o.callback) {
o.callback.apply(i[0], arguments)
}
i.dequeue()
})
})
}
})(jQCT);
(function ($, h) {
var f = 0;
$.widget("ui.autocomplete", {
options: {
appendTo: "body",
baseClass: h,
autoFocus: false,
delay: 300,
minLength: 1,
position: {
my: "left top",
at: "left bottom",
collision: "none"
},
source: null
},
pending: 0,
_create: function () {
var d = this,
doc = this.element[0].ownerDocument,
suppressKeyPress;
this.element.addClass("ui-autocomplete-input").attr("autocomplete", "off").attr({
role: "textbox",
"aria-autocomplete": "list",
"aria-haspopup": "true"
}).bind("keydown.autocomplete", function (a) {
if (d.options.disabled || d.element.attr("readonly")) {
return
}
suppressKeyPress = false;
var b = $.ui.keyCode;
switch (a.keyCode) {
case b.PAGE_UP:
d._move("previousPage", a);
break;
case b.PAGE_DOWN:
d._move("nextPage", a);
break;
case b.UP:
d._move("previous", a);
a.preventDefault();
break;
case b.DOWN:
d._move("next", a);
a.preventDefault();
break;
case b.ENTER:
case b.NUMPAD_ENTER:
if (d.menu.active) {
suppressKeyPress = true;
a.preventDefault()
}
case b.TAB:
if (!d.menu.active) {
return
}
d.menu.select(a);
break;
case b.ESCAPE:
d.element.val(d.term);
d.close(a);
break;
default:
clearTimeout(d.searching);
d.searching = setTimeout(function () {
if (d.term != d.element.val()) {
d.selectedItem = null;
d.search(null, a)
}
}, d.options.delay);
break
}
}).bind("keypress.autocomplete", function (a) {
if (suppressKeyPress) {
suppressKeyPress = false;
a.preventDefault()
}
}).bind("focus.autocomplete", function () {
if (d.options.disabled) {
return
}
d.selectedItem = null;
d.previous = d.element.val()
}).bind("blur.autocomplete", function (a) {
if (d.options.disabled) {
return
}
clearTimeout(d.searching);
d.closing = setTimeout(function () {
d.close(a);
d._change(a)
}, 150)
});
this._initSource();
this.response = function () {
return d._response.apply(d, arguments)
};
this.menu = $("<ul></ul>").addClass("ui-autocomplete").addClass(function (a) {
if (d.options.baseClass) {
return d.options.baseClass
}
return ""
}).appendTo($(this.options.appendTo || "body", doc)[0]).mousedown(function (c) {
var b = d.menu.element[0];
if (!$(c.target).closest(".ui-menu-item").length) {
setTimeout(function () {
$(document).one("mousedown", function (a) {
if (a.target !== d.element[0] && a.target !== b && !$.ui.contains(b, a.target)) {
d.close()
}
})
}, 1)
}
setTimeout(function () {
clearTimeout(d.closing)
}, 13)
}).menu({
focus: function (a, c) {
var b = c.item.data("item.autocomplete");
if (false !== d._trigger("focus", a, {
item: b
})) {
if (/^key/.test(a.originalEvent.type)) {
d.element.val(b.value)
}
}
},
selected: function (a, c) {
var b = c.item.data("item.autocomplete"),
previous = d.previous;
if (d.element[0] !== doc.activeElement) {
d.element.focus();
d.previous = previous;
setTimeout(function () {
d.previous = previous;
d.selectedItem = b
}, 1)
}
if (false !== d._trigger("select", a, {
item: b
})) {
d.element.val(b.value)
}
d.term = d.element.val();
d.close(a);
d.selectedItem = b
},
blur: function (a, b) {
if (d.menu.element.is(":visible") && (d.element.val() !== d.term)) {
d.element.val(d.term)
}
}
}).zIndex(this.element.zIndex() + 1).css({
top: 0,
left: 0
}).hide().data("menu");
if ($.fn.bgiframe) {
this.menu.element.bgiframe()
}
},
destroy: function () {
this.element.removeClass("ui-autocomplete-input").removeAttr("autocomplete").removeAttr("role").removeAttr("aria-autocomplete").removeAttr("aria-haspopup");
this.menu.element.remove();
$.Widget.prototype.destroy.call(this)
},
_setOption: function (b, a) {
$.Widget.prototype._setOption.apply(this, arguments);
if (b === "source") {
this._initSource()
}
if (b === "appendTo") {
this.menu.element.appendTo($(a || "body", this.element[0].ownerDocument)[0])
}
if (b === "disabled" && a && this.xhr) {
this.xhr.abort()
}
},
_initSource: function () {
var e = this,
array, url;
if ($.isArray(this.options.source)) {
array = this.options.source;
this.source = function (b, a) {
a($.ui.autocomplete.filter(array, b.term))
}
} else {
if (typeof this.options.source === "string") {
url = this.options.source;
this.source = function (d, c) {
if (e.xhr) {
e.xhr.abort()
}
e.xhr = $.ajax({
url: url,
data: d,
dataType: "json",
autocompleteRequest: ++f,
success: function (a, b) {
if (this.autocompleteRequest === f) {
c(a)
}
},
error: function () {
if (this.autocompleteRequest === f) {
c([])
}
}
})
}
} else {
this.source = this.options.source
}
}
},
search: function (a, b) {
a = a != null ? a : this.element.val();
this.term = this.element.val();
if (a.length < this.options.minLength) {
return this.close(b)
}
clearTimeout(this.closing);
if (this._trigger("search", b) === false) {
return
}
return this._search(a)
},
_search: function (a) {
this.pending++;
this.element.addClass("ui-autocomplete-loading");
this.source({
term: a
}, this.response)
},
response: function (a) {
return this._response(a)
},
_response: function (a) {
this._trigger("response", null, {
content: a
});
if (!this.options.disabled && a && a.length) {
a = this._normalize(a);
this._suggest(a);
this._trigger("open")
} else {
this.close()
}
this.pending--;
if (!this.pending) {
this.element.removeClass("ui-autocomplete-loading")
}
},
close: function (a) {
delete this.term;
clearTimeout(this.closing);
if (this.menu.element.is(":visible")) {
this.menu.element.hide();
this.menu.deactivate();
this._trigger("close", a)
}
},
change: function (a) {
return this._change(a)
},
_change: function (a) {
if (this.previous !== this.element.val()) {
this._trigger("change", a, {
item: this.selectedItem
})
}
},
_normalize: function (b) {
if (b.length && b[0].label && b[0].value) {
return b
}
return $.map(b, function (a) {
if (typeof a === "string") {
return {
label: a,
value: a
}
}
return $.extend({
label: a.label || a.value,
value: a.value || a.label
}, a)
})
},
suggest: function (a) {
return this._suggest(a)
},
_suggest: function (b) {
var a = this.menu.element.empty().zIndex(this.element.zIndex() + 1);
this._renderMenu(a, b);
this.menu.deactivate();
this.menu.refresh();
a.show();
this._resizeMenu();
a.position($.extend({
of: this.element
}, this.options.position));
if (this.options.autoFocus) {
this.menu.next(new $.Event("mouseover"))
}
},
_resizeMenu: function () {
var a = this.menu.element;
a.outerWidth(Math.max(a.width("").outerWidth() + 1, this.element.outerWidth()))
},
_renderMenu: function (c, d) {
var e = this;
$.each(d, function (a, b) {
e._renderItem(c, b)
})
},
_renderItem: function (a, b) {
return $("<li></li>").data("item.autocomplete", b).append($("<a></a>").text(b.label)).appendTo(a)
},
_move: function (b, a) {
if (!this.menu.element.is(":visible")) {
this.search(null, a);
return
}
if (this.menu.first() && /^previous/.test(b) || this.menu.last() && /^next/.test(b)) {
this.element.val(this.term);
this.menu.deactivate();
return
}
this.menu[b](a)
},
widget: function () {
return this.menu.element
}
});
$.extend($.ui.autocomplete, {
escapeRegex: function (a) {
return a.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&")
},
filter: function (d, b) {
var c = new RegExp($.ui.autocomplete.escapeRegex(b), "i");
return $.grep(d, function (a) {
return c.test(a.label || a.value || a)
})
}
});
$.widget("custom.combocomplete", $.ui.autocomplete, {
_renderMenu: function (c, d) {
var e = this;
c.addClass("ct-ui-combo");
$.each(d, function (a, b) {
e._renderItem(c, b)
})
}
});
var g = $.ui.autocomplete.prototype,
initSource = g._initSource;
$.extend(g, {
_renderMenu: function (c, d) {
var e = this,
currentCategory = "";
$.each(d, function (a, b) {
if (typeof b.category !== "undefined" && b.category.name != currentCategory.name) {
c.append("<li class='ui-autocomplete-category ct-ui-header-primary'><div><span class='ct-ui-icons-white ct-ui-icon-" + b.category.name + "'></span><label>" + $.i18n.lookup(b.category.label) + "</label></div></li>");
currentCategory = b.category
}
e._renderItem(c, b)
})
},
_renderItem: function (d, a) {
var e = [];
if (typeof a.pages !== "undefined" && a.pages > 1) {
var c = a.page;
e.push("<div data-term='" + a.value + "'>");
if (c > 1) {
e.push("<span class='ui-autocomplete-page ct-ui-icons-white ct-ui-icon-prevall' data-page='1'></span>");
if (c - 1 > 1) {
e.push("<span class='ui-autocomplete-page ct-ui-icons-white ct-ui-icon-prev' data-page='" + (c - 1) + "'></span>")
}
}
var b = CT.LIB.StringV2.replaceSubstring($.i18n.locale.MagicLocation_page_x_of_n, "${x}", a.page);
b = CT.LIB.StringV2.replaceSubstring(b, "${y}", a.pages);
e.push("<label>" + b + "</label>");
if (c < a.pages) {
if (c + 1 < a.pages) {
e.push("<span class='ui-autocomplete-page ct-ui-icons-white ct-ui-icon-next' data-page='" + (c + 1) + "'></span>")
}
e.push("<span class='ui-autocomplete-page ct-ui-icons-white ct-ui-icon-nextall' data-page='" + a.pages + "'></span>")
}
e.push("</div>");
return $("<li class='ui-autocomplete-paging ct-ui-header-secondary'>").data("item.autocomplete", a).append(e.join("")).appendTo(d)
}
e.push("<a>");
e.push("<label>");
e.push(a.value);
if (typeof a.airport_code !== "undefined" && a.airport_code.length > 0) {
e.push("&nbsp;<b>[");
e.push(a.airport_code);
e.push("]</b>")
}
if (typeof a.state_code !== "undefined" && a.state_code.length > 0) {
e.push("&nbsp;[");
e.push(a.state_code);
e.push("]")
}
if (typeof a.info !== "undefined" && a.info.length > 0) {
e.push("&nbsp;[");
e.push(a.info);
e.push("]")
}
e.push("</label>");
if (typeof a.icon !== "undefined") {
e.push("<span class='ct-ui-icons-flag24 ct-ui-icon-flag-");
e.push(a.icon);
e.push("'></span>")
} else {
if (typeof a.iconClass !== "undefined") {
e.push("<span class='");
e.push(a.iconClass);
e.push("'></span>")
}
}
e.push("</a>");
return $("<li>").data("item.autocomplete", a).append(e.join("")).appendTo(d)
}
})
}(jQCT));
(function ($) {
$.widget("ui.menu", {
_create: function () {
var b = this;
this.element.addClass("ui-menu ui-widget ui-widget-content ui-corner-all").attr({
role: "listbox",
"aria-activedescendant": "ui-active-menuitem"
}).click(function (a) {
if (!$(a.target).closest(".ui-menu-item a").length) {
return
}
a.preventDefault();
b.select(a)
});
this.refresh()
},
refresh: function () {
var b = this;
var c = this.element.children("li:not(.ui-menu-item):has(a)").addClass("ui-menu-item").attr("role", "menuitem");
c.children("a").addClass("ui-corner-all").attr("tabindex", -1).mouseenter(function (a) {
b.activate(a, $(this).parent())
}).mouseleave(function () {
b.deactivate()
})
},
activate: function (a, b) {
this.deactivate();
if (this.hasScroll()) {
var c = b.offset().top - this.element.offset().top,
scroll = this.element.attr("scrollTop"),
elementHeight = this.element.height();
if (c < 0) {
this.element.attr("scrollTop", scroll + c)
} else {
if (c >= elementHeight) {
this.element.attr("scrollTop", scroll + c - elementHeight + b.height())
}
}
}
this.active = b.eq(0).children("a").addClass("ui-state-hover").addClass("ct-ui-state-hover").attr("id", "ui-active-menuitem").end();
this._trigger("focus", a, {
item: b
})
},
deactivate: function () {
if (!this.active) {
return
}
this.active.children("a").removeClass("ui-state-hover").removeClass("ct-ui-state-hover").removeAttr("id");
this._trigger("blur");
this.active = null
},
next: function (a) {
this.move("next", ".ui-menu-item:first", a)
},
previous: function (a) {
this.move("prev", ".ui-menu-item:last", a)
},
first: function () {
return this.active && !this.active.prevAll(".ui-menu-item").length
},
last: function () {
return this.active && !this.active.nextAll(".ui-menu-item").length
},
move: function (a, c, b) {
if (!this.active) {
this.activate(b, this.element.children(c));
return
}
var d = this.active[a + "All"](".ui-menu-item").eq(0);
if (d.length) {
this.activate(b, d)
} else {
this.activate(b, this.element.children(c))
}
},
nextPage: function (b) {
if (this.hasScroll()) {
if (!this.active || this.last()) {
this.activate(b, this.element.children(".ui-menu-item:first"));
return
}
var c = this.active.offset().top,
height = this.element.height(),
result = this.element.children(".ui-menu-item").filter(function () {
var a = $(this).offset().top - c - height + $(this).height();
return a < 10 && a > -10
});
if (!result.length) {
result = this.element.children(".ui-menu-item:last")
}
this.activate(b, result)
} else {
this.activate(b, this.element.children(".ui-menu-item").filter(!this.active || this.last() ? ":first" : ":last"))
}
},
previousPage: function (b) {
if (this.hasScroll()) {
if (!this.active || this.first()) {
this.activate(b, this.element.children(".ui-menu-item:last"));
return
}
var c = this.active.offset().top,
height = this.element.height();
result = this.element.children(".ui-menu-item").filter(function () {
var a = $(this).offset().top - c + height - $(this).height();
return a < 10 && a > -10
});
if (!result.length) {
result = this.element.children(".ui-menu-item:first")
}
this.activate(b, result)
} else {
this.activate(b, this.element.children(".ui-menu-item").filter(!this.active || this.first() ? ":last" : ":first"))
}
},
hasScroll: function () {
return this.element.height() < this.element.attr("scrollHeight")
},
select: function (a) {
this._trigger("selected", a, {
item: this.active
})
}
})
}(jQCT));
(function ($, bj) {
$.extend($.ui, {
datepicker: {
version: "1.8.11"
}
});
var bi = "datepicker";
var bk = new Date().getTime();
function Datepicker() {
this.debug = false;
this._curInst = null;
this._keyEvent = false;
this._disabledInputs = [];
this._datepickerShowing = false;
this._inDialog = false;
this._mainDivId = "ui-datepicker-div";
this._inlineClass = "ui-datepicker-inline";
this._appendClass = "ui-datepicker-append";
this._triggerClass = "ui-datepicker-trigger";
this._dialogClass = "ui-datepicker-dialog";
this._disableClass = "ui-datepicker-disabled";
this._unselectableClass = "ui-datepicker-unselectable";
this._currentClass = "ui-datepicker-current-day";
this._dayOverClass = "ui-datepicker-days-cell-over";
this.regional = [];
this.regional[""] = {
closeText: "Done",
prevText: "Prev",
nextText: "Next",
currentText: "Today",
monthNames: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"],
monthNamesShort: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"],
dayNames: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"],
dayNamesShort: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
dayNamesMin: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"],
weekHeader: "Wk",
dateFormat: "mm/dd/yy",
firstDay: 0,
isRTL: false,
showMonthAfterYear: false,
yearSuffix: ""
};
this._defaults = {
showOn: "focus",
showAnim: "",
showOptions: {},
defaultDate: null,
appendText: "",
buttonText: "...",
buttonImage: "",
buttonImageOnly: false,
hideIfNoPrevNext: false,
navigationAsDateFormat: true,
gotoCurrent: false,
changeMonth: false,
changeYear: false,
yearRange: "c-10:c+10",
showOtherMonths: false,
selectOtherMonths: false,
showWeek: false,
calculateWeek: this.iso8601Week,
shortYearCutoff: "+10",
minDate: null,
maxDate: null,
duration: "fast",
beforeShowDay: null,
beforeShow: null,
onSelect: null,
onChangeMonthYear: null,
onClose: null,
numberOfMonths: 1,
showCurrentAtPos: 0,
stepMonths: 1,
stepBigMonths: 12,
altField: "",
altFormat: "",
constrainInput: true,
showButtonPanel: false,
autoSize: false,
baseClass: bj
};
$.extend(this._defaults, this.regional[""]);
this.dpDiv = $('<div id="' + this._mainDivId + '" class="ui-datepicker ui-widget ui-helper-clearfix ui-corner-bottom"></div>')
}
$.extend(Datepicker.prototype, {
markerClassName: "hasDatepicker",
log: function () {
if (this.debug) {
console.log.apply("", arguments)
}
},
_widgetDatepicker: function () {
return this.dpDiv
},
setDefaults: function (a) {
extendRemove(this._defaults, a || {});
return this
},
_attachDatepicker: function (b, f) {
var g = null;
for (var h in this._defaults) {
var c = b.getAttribute("date:" + h);
if (c) {
g = g || {};
try {
g[h] = eval(c)
} catch (err) {
g[h] = c
}
}
}
var a = b.nodeName.toLowerCase();
var d = (a == "div" || a == "span");
if (!b.id) {
this.uuid += 1;
b.id = "dp" + this.uuid
}
var e = this._newInst($(b), d);
e.settings = $.extend({}, f || {}, g || {});
if (a == "input") {
this._connectDatepicker(b, e)
} else {
if (d) {
this._inlineDatepicker(b, e)
}
}
},
_newInst: function (c, b) {
var a = c[0].id.replace(/([^A-Za-z0-9_-])/g, "\\\\$1");
return {
id: a,
input: c,
selectedDay: 0,
selectedMonth: 0,
selectedYear: 0,
drawMonth: 0,
drawYear: 0,
inline: b,
dpDiv: (!b ? this.dpDiv : $('<div class="' + this._inlineClass + ' ui-datepicker ui-widget ui-helper-clearfix ui-corner-bottom"></div>'))
}
},
_connectDatepicker: function (f, e) {
var d = $(f);
e.append = $([]);
e.trigger = $([]);
if (d.hasClass(this.markerClassName)) {
return
}
this._attachments(d, e);
d.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).keyup(this._doKeyUp).bind("setData.datepicker", function (b, c, a) {
e.settings[c] = a
}).bind("getData.datepicker", function (a, b) {
return this._get(e, b)
});
this._autoSize(e);
$.data(f, bi, e)
},
_attachments: function (e, b) {
var a = this._get(b, "appendText");
var d = this._get(b, "isRTL");
if (b.append) {
b.append.remove()
}
if (a) {
b.append = $('<span class="' + this._appendClass + '">' + a + "</span>");
e[d ? "before" : "after"](b.append)
}
e.unbind("focus", this._showDatepicker);
if (b.trigger) {
b.trigger.remove()
}
var f = this._get(b, "showOn");
if (f == "focus" || f == "both") {
e.focus(this._showDatepicker)
}
if (f == "button" || f == "both") {
var c = this._get(b, "buttonText");
var g = this._get(b, "buttonImage");
b.trigger = $(this._get(b, "buttonImageOnly") ? $("<img/>").addClass(this._triggerClass).attr({
src: g,
alt: c,
title: c
}) : $('<button type="button"></button>').addClass(this._triggerClass).html(g == "" ? c : $("<img/>").attr({
src: g,
alt: c,
title: c
})));
e[d ? "before" : "after"](b.trigger);
b.trigger.click(function () {
if ($.datepicker._datepickerShowing && $.datepicker._lastInput == e[0]) {
$.datepicker._hideDatepicker()
} else {
$.datepicker._showDatepicker(e[0])
}
return false
})
}
},
_autoSize: function (d) {
if (this._get(d, "autoSize") && !d.inline) {
var e = new Date(2009, 12 - 1, 20);
var g = this._get(d, "dateFormat");
if (g.match(/[DM]/)) {
var f = function (a) {
var c = 0;
var b = 0;
for (var i = 0; i < a.length; i++) {
if (a[i].length > c) {
c = a[i].length;
b = i
}
}
return b
};
e.setMonth(f(this._get(d, (g.match(/MM/) ? "monthNames" : "monthNamesShort"))));
e.setDate(f(this._get(d, (g.match(/DD/) ? "dayNames" : "dayNamesShort"))) + 20 - e.getDay())
}
d.input.attr("size", this._formatDate(d, e).length)
}
},
_inlineDatepicker: function (e, d) {
var f = $(e);
if (f.hasClass(this.markerClassName)) {
return
}
f.addClass(this.markerClassName).append(d.dpDiv).bind("setData.datepicker", function (b, c, a) {
d.settings[c] = a
}).bind("getData.datepicker", function (a, b) {
return this._get(d, b)
});
$.data(e, bi, d);
this._setDate(d, this._getDefaultDate(d), true);
this._updateDatepicker(d);
this._updateAlternate(d);
d.dpDiv.show()
},
_dialogDatepicker: function (d, j, f, i, e) {
var h = this._dialogInst;
if (!h) {
this.uuid += 1;
var k = "dp" + this.uuid;
this._dialogInput = $('<input type="text" id="' + k + '" style="position: absolute; top: -100px; width: 0px; z-index: -10;"/>');
this._dialogInput.keydown(this._doKeyDown);
$("body").append(this._dialogInput);
h = this._dialogInst = this._newInst(this._dialogInput, false);
h.settings = {};
$.data(this._dialogInput[0], bi, h)
}
extendRemove(h.settings, i || {});
j = (j && j.constructor == Date ? this._formatDate(h, j) : j);
this._dialogInput.val(j);
this._pos = (e ? (e.length ? e : [e.pageX, e.pageY]) : null);
if (!this._pos) {
var a = document.documentElement.clientWidth;
var g = document.documentElement.clientHeight;
var b = document.documentElement.scrollLeft || document.body.scrollLeft;
var c = document.documentElement.scrollTop || document.body.scrollTop;
this._pos = [(a / 2) - 100 + b, (g / 2) - 150 + c]
}
this._dialogInput.css("left", (this._pos[0] + 20) + "px").css("top", this._pos[1] + "px");
h.settings.onSelect = f;
this._inDialog = true;
this.dpDiv.addClass(this._dialogClass);
this._showDatepicker(this._dialogInput[0]);
if ($.blockUI) {
$.blockUI(this.dpDiv)
}
$.data(this._dialogInput[0], bi, h);
return this
},
_destroyDatepicker: function (b) {
var d = $(b);
var c = $.data(b, bi);
if (!d.hasClass(this.markerClassName)) {
return
}
var a = b.nodeName.toLowerCase();
$.removeData(b, bi);
if (a == "input") {
c.append.remove();
c.trigger.remove();
d.removeClass(this.markerClassName).unbind("focus", this._showDatepicker).unbind("keydown", this._doKeyDown).unbind("keypress", this._doKeyPress).unbind("keyup", this._doKeyUp)
} else {
if (a == "div" || a == "span") {
d.removeClass(this.markerClassName).empty()
}
}
},
_enableDatepicker: function (c) {
var f = $(c);
var e = $.data(c, bi);
if (!f.hasClass(this.markerClassName)) {
return
}
var b = c.nodeName.toLowerCase();
if (b == "input") {
c.disabled = false;
e.trigger.filter("button").each(function () {
this.disabled = false
}).end().filter("img").css({
opacity: "1.0",
cursor: ""
})
} else {
if (b == "div" || b == "span") {
var d = f.children("." + this._inlineClass);
d.children().removeClass("ui-state-disabled")
}
}
this._disabledInputs = $.map(this._disabledInputs, function (a) {
return (a == c ? null : a)
})
},
_disableDatepicker: function (c) {
var f = $(c);
var e = $.data(c, bi);
if (!f.hasClass(this.markerClassName)) {
return
}
var b = c.nodeName.toLowerCase();
if (b == "input") {
c.disabled = true;
e.trigger.filter("button").each(function () {
this.disabled = true
}).end().filter("img").css({
opacity: "0.5",
cursor: "default"
})
} else {
if (b == "div" || b == "span") {
var d = f.children("." + this._inlineClass);
d.children().addClass("ui-state-disabled")
}
}
this._disabledInputs = $.map(this._disabledInputs, function (a) {
return (a == c ? null : a)
});
this._disabledInputs[this._disabledInputs.length] = c
},
_isDisabledDatepicker: function (a) {
if (!a) {
return false
}
for (var i = 0; i < this._disabledInputs.length; i++) {
if (this._disabledInputs[i] == a) {
return true
}
}
return false
},
_getInst: function (a) {
try {
return $.data(a, bi)
} catch (err) {
throw "Missing instance data for this datepicker"
}
},
_optionDatepicker: function (b, g, c) {
var d = this._getInst(b);
if (arguments.length == 2 && typeof g == "string") {
return (g == "defaults" ? $.extend({}, $.datepicker._defaults) : (d ? (g == "all" ? $.extend({}, d.settings) : this._get(d, g)) : null))
}
var f = g || {};
if (typeof g == "string") {
f = {};
f[g] = c
}
if (d) {
if (this._curInst == d) {
this._hideDatepicker()
}
var h = this._getDateDatepicker(b, true);
var e = this._getMinMaxDate(d, "min");
var a = this._getMinMaxDate(d, "max");
extendRemove(d.settings, f);
if (e !== null && f.dateFormat !== bj && f.minDate === bj) {
d.settings.minDate = this._formatDate(d, e)
}
if (a !== null && f.dateFormat !== bj && f.maxDate === bj) {
d.settings.maxDate = this._formatDate(d, a)
}
this._attachments($(b), d);
this._autoSize(d);
this._setDateDatepicker(b, h);
this._updateDatepicker(d)
}
},
_changeDatepicker: function (a, c, b) {
this._optionDatepicker(a, c, b)
},
_refreshDatepicker: function (b) {
var a = this._getInst(b);
if (a) {
this._updateDatepicker(a)
}
},
_setDateDatepicker: function (b, c) {
var a = this._getInst(b);
if (a) {
this._setDate(a, c);
this._updateDatepicker(a);
this._updateAlternate(a)
}
},
_getDateDatepicker: function (c, a) {
var b = this._getInst(c);
if (b && !b.inline) {
this._setDateFromField(b, a)
}
return (b ? this._getDate(b) : null)
},
_doKeyDown: function (d) {
var b = $.datepicker._getInst(d.target);
var a = true;
var e = b.dpDiv.is(".ui-datepicker-rtl");
b._keyEvent = true;
if ($.datepicker._datepickerShowing) {
switch (d.keyCode) {
case 9:
$.datepicker._hideDatepicker();
a = false;
break;
case 13:
var c = $("td." + $.datepicker._dayOverClass + ":not(." + $.datepicker._currentClass + ")", b.dpDiv);
if (c[0]) {
$.datepicker._selectDay(d.target, b.selectedMonth, b.selectedYear, c[0])
} else {
$.datepicker._hideDatepicker()
}
return false;
break;
case 27:
$.datepicker._hideDatepicker();
break;
case 33:
$.datepicker._adjustDate(d.target, (d.ctrlKey ? -$.datepicker._get(b, "stepBigMonths") : -$.datepicker._get(b, "stepMonths")), "M");
break;
case 34:
$.datepicker._adjustDate(d.target, (d.ctrlKey ? +$.datepicker._get(b, "stepBigMonths") : +$.datepicker._get(b, "stepMonths")), "M");
break;
case 35:
if (d.ctrlKey || d.metaKey) {
$.datepicker._clearDate(d.target)
}
a = d.ctrlKey || d.metaKey;
break;
case 36:
if (d.ctrlKey || d.metaKey) {
$.datepicker._gotoToday(d.target)
}
a = d.ctrlKey || d.metaKey;
break;
case 37:
if (d.ctrlKey || d.metaKey) {
$.datepicker._adjustDate(d.target, (e ? +1 : -1), "D")
}
a = d.ctrlKey || d.metaKey;
if (d.originalEvent.altKey) {
$.datepicker._adjustDate(d.target, (d.ctrlKey ? -$.datepicker._get(b, "stepBigMonths") : -$.datepicker._get(b, "stepMonths")), "M")
}
break;
case 38:
if (d.ctrlKey || d.metaKey) {
$.datepicker._adjustDate(d.target, -7, "D")
}
a = d.ctrlKey || d.metaKey;
break;
case 39:
if (d.ctrlKey || d.metaKey) {
$.datepicker._adjustDate(d.target, (e ? -1 : +1), "D")
}
a = d.ctrlKey || d.metaKey;
if (d.originalEvent.altKey) {
$.datepicker._adjustDate(d.target, (d.ctrlKey ? +$.datepicker._get(b, "stepBigMonths") : +$.datepicker._get(b, "stepMonths")), "M")
}
break;
case 40:
if (d.ctrlKey || d.metaKey) {
$.datepicker._adjustDate(d.target, +7, "D")
}
a = d.ctrlKey || d.metaKey;
break;
default:
a = false
}
} else {
if (d.keyCode == 36 && d.ctrlKey) {
$.datepicker._showDatepicker(this)
} else {
a = false
}
} if (a) {
d.preventDefault();
d.stopPropagation()
}
},
_doKeyPress: function (c) {
var a = $.datepicker._getInst(c.target);
if ($.datepicker._get(a, "constrainInput")) {
var b = $.datepicker._possibleChars($.datepicker._get(a, "dateFormat"));
var d = String.fromCharCode(c.charCode == bj ? c.keyCode : c.charCode);
return c.ctrlKey || c.metaKey || (d < " " || !b || b.indexOf(d) > -1)
}
},
_doKeyUp: function (a) {
var b = $.datepicker._getInst(a.target);
if (b.input.val() != b.lastVal) {
try {
var c = $.datepicker.parseDate($.datepicker._get(b, "dateFormat"), (b.input ? b.input.val() : null), $.datepicker._getFormatConfig(b));
if (c) {
$.datepicker._setDateFromField(b);
$.datepicker._updateAlternate(b);
$.datepicker._updateDatepicker(b)
}
} catch (a) {
$.datepicker.log(a)
}
}
return true
},
_showDatepicker: function (c) {
c = c.target || c;
if (c.nodeName.toLowerCase() != "input") {
c = $("input", c.parentNode)[0]
}
if ($.datepicker._isDisabledDatepicker(c) || $.datepicker._lastInput == c) {
return
}
var e = $.datepicker._getInst(c);
if ($.datepicker._curInst && $.datepicker._curInst != e) {
$.datepicker._curInst.dpDiv.stop(true, true)
}
var h = $.datepicker._get(e, "beforeShow");
extendRemove(e.settings, (h ? h.apply(c, [c, e]) : {}));
e.lastVal = null;
$.datepicker._lastInput = c;
$.datepicker._setDateFromField(e);
if ($.datepicker._inDialog) {
c.value = ""
}
if (!$.datepicker._pos) {
$.datepicker._pos = $.datepicker._findPos(c);
$.datepicker._pos[1] += c.offsetHeight
}
var i = false;
$(c).parents().each(function () {
i |= $(this).css("position") == "fixed";
return !i
});
if (i && $.browser.opera) {
$.datepicker._pos[0] -= document.documentElement.scrollLeft;
$.datepicker._pos[1] -= document.documentElement.scrollTop
}
var f = {
left: $.datepicker._pos[0],
top: $.datepicker._pos[1]
};
$.datepicker._pos = null;
e.dpDiv.empty();
e.dpDiv.css({
position: "absolute",
display: "block",
top: "-1000px"
});
var d = $.datepicker._get(e, "onShow");
if (d) {
d.apply(c, [c, e])
}
$.datepicker._updateDatepicker(e);
f = $.datepicker._checkOffset(e, f, i);
e.dpDiv.css({
position: ($.datepicker._inDialog && $.blockUI ? "static" : (i ? "fixed" : "absolute")),
display: "none",
left: f.left + "px",
top: f.top + "px"
});
if (!e.inline) {
var k = $.datepicker._get(e, "showAnim");
var g = $.datepicker._get(e, "duration");
var j = function () {
$.datepicker._datepickerShowing = true;
var b = e.dpDiv.find("iframe.ui-datepicker-cover");
if ( !! b.length) {
var a = $.datepicker._getBorders(e.dpDiv);
b.css({
left: -a[0],
top: -a[1],
width: e.dpDiv.outerWidth(),
height: e.dpDiv.outerHeight()
})
}
};
e.dpDiv.zIndex(1002);
if ($.effects && $.effects[k]) {
e.dpDiv.show(k, $.datepicker._get(e, "showOptions"), g, j)
} else {
e.dpDiv[k || "show"]((k ? g : null), j)
} if (!k || !g) {
j()
}
if (e.input.is(":visible") && !e.input.is(":disabled")) {
e.input.focus()
}
$.datepicker._curInst = e
}
},
_updateDatepicker: function (e) {
var g = this;
var b = $.datepicker._getBorders(e.dpDiv);
e.dpDiv.empty().append(this._generateHTML(e));
var c = e.dpDiv.find("iframe.ui-datepicker-cover");
if ( !! c.length) {
c.css({
left: -b[0],
top: -b[1],
width: e.dpDiv.outerWidth(),
height: e.dpDiv.outerHeight()
})
}
e.dpDiv.find("button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a").bind("mouseout", function () {
$(this).removeClass("ui-state-hover");
if (!$(this).hasClass("ui-datepicker-prev") && !$(this).hasClass("ui-datepicker-next")) {
$(this).removeClass("ct-ui-state-hover")
}
if (this.className.indexOf("ui-datepicker-prev") != -1) {
$(this).removeClass("ui-datepicker-prev-hover")
}
if (this.className.indexOf("ui-datepicker-next") != -1) {
$(this).removeClass("ui-datepicker-next-hover")
}
}).bind("mouseover", function () {
if (!g._isDisabledDatepicker(e.inline ? e.dpDiv.parent()[0] : e.input[0])) {
$(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover");
$(this).addClass("ui-state-hover");
if (!$(this).hasClass("ui-datepicker-prev") && !$(this).hasClass("ui-datepicker-next")) {
$(this).addClass("ct-ui-state-hover")
}
if (this.className.indexOf("ui-datepicker-prev") != -1) {
$(this).addClass("ui-datepicker-prev-hover")
}
if (this.className.indexOf("ui-datepicker-next") != -1) {
$(this).addClass("ui-datepicker-next-hover")
}
}
}).end().find("." + this._dayOverClass + " a").trigger("mouseover").end();
e.dpDiv.find(".ui-datepicker-close").bind("click", function () {
window["DP_jQuery_" + bk].datepicker._hideDatepicker()
});
var h = this._getNumberOfMonths(e);
var d = h[1];
var f = 19;
if (d > 1) {
e.dpDiv.addClass("ui-datepicker-multi-" + d).css("width", (f * d) + "em")
} else {
e.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width("")
}
e.dpDiv[(h[0] != 1 || h[1] != 1 ? "add" : "remove") + "Class"]("ui-datepicker-multi");
e.dpDiv[(this._get(e, "isRTL") ? "add" : "remove") + "Class"]("ui-datepicker-rtl");
if (e == $.datepicker._curInst && $.datepicker._datepickerShowing && e.input && e.input.is(":visible") && !e.input.is(":disabled") && e.input[0] != document.activeElement) {
e.input.focus()
}
if (e.yearshtml) {
var a = e.yearshtml;
setTimeout(function () {
if (a === e.yearshtml) {
e.dpDiv.find("select.ui-datepicker-year:first").replaceWith(e.yearshtml)
}
a = e.yearshtml = null
}, 0)
}
},
_getBorders: function (c) {
var b = function (a) {
return {
thin: 1,
medium: 2,
thick: 3
}[a] || a
};
return [parseFloat(b(c.css("border-left-width"))), parseFloat(b(c.css("border-top-width")))]
},
_checkOffset: function (d, f, g) {
var e = d.dpDiv.outerWidth();
var a = d.dpDiv.outerHeight();
var b = d.input ? d.input.outerWidth() : 0;
var i = d.input ? d.input.outerHeight() : 0;
var c = document.documentElement.clientWidth + $(document).scrollLeft();
var h = document.documentElement.clientHeight + $(document).scrollTop();
f.left -= (this._get(d, "isRTL") ? (e - b) : 0);
f.left -= (g && f.left == d.input.offset().left) ? $(document).scrollLeft() : 0;
f.top -= (g && f.top == (d.input.offset().top + i)) ? $(document).scrollTop() : 0;
f.left -= Math.min(f.left, (f.left + e > c && c > e) ? Math.abs(f.left + e - c) : 0);
f.top -= Math.min(f.top, (f.top + a > h && h > a) ? Math.abs(a + i) : 0);
return f
},
_findPos: function (a) {
var b = this._getInst(a);
var c = this._get(b, "isRTL");
while (a && (a.type == "hidden" || a.nodeType != 1 || $.expr.filters.hidden(a))) {
a = a[c ? "previousSibling" : "nextSibling"]
}
var d = $(a).offset();
return [d.left, d.top]
},
_hideDatepicker: function (d) {
var b = this._curInst;
if (!b || (d && b != $.data(d, bi))) {
return
}
if (this._datepickerShowing) {
var e = this._get(b, "showAnim");
var a = this._get(b, "duration");
var c = function () {
$.datepicker._tidyDialog(b);
this._curInst = null
};
if ($.effects && $.effects[e]) {
b.dpDiv.hide(e, $.datepicker._get(b, "showOptions"), a, c)
} else {
b.dpDiv[(e == "slideDown" ? "slideUp" : (e == "fadeIn" ? "fadeOut" : "hide"))]((e ? a : null), c)
} if (!e) {
c()
}
var f = this._get(b, "onClose");
if (f) {
f.apply((b.input ? b.input[0] : null), [(b.input ? b.input.val() : ""), b])
}
this._datepickerShowing = false;
this._lastInput = null;
if (this._inDialog) {
this._dialogInput.css({
position: "absolute",
left: "0",
top: "-100px"
});
if ($.blockUI) {
$.unblockUI();
$("body").append(this.dpDiv)
}
}
this._inDialog = false
}
},
_tidyDialog: function (a) {
a.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker-calendar")
},
_checkExternalClick: function (b) {
if (!$.datepicker._curInst) {
return
}
var a = $(b.target);
if (a[0].id != $.datepicker._mainDivId && a.parents("#" + $.datepicker._mainDivId).length == 0 && !a.hasClass($.datepicker.markerClassName) && !a.hasClass($.datepicker._triggerClass) && $.datepicker._datepickerShowing && !($.datepicker._inDialog && $.blockUI)) {
$.datepicker._hideDatepicker()
}
},
_adjustDate: function (a, b, c) {
var d = $(a);
var e = this._getInst(d[0]);
if (this._isDisabledDatepicker(d[0])) {
return
}
this._adjustInstDate(e, b + (c == "M" ? this._get(e, "showCurrentAtPos") : 0), c);
this._updateDatepicker(e)
},
_gotoToday: function (a) {
var b = $(a);
var c = this._getInst(b[0]);
if (this._get(c, "gotoCurrent") && c.currentDay) {
c.selectedDay = c.currentDay;
c.drawMonth = c.selectedMonth = c.currentMonth;
c.drawYear = c.selectedYear = c.currentYear
} else {
var d = new Date();
c.selectedDay = d.getDate();
c.drawMonth = c.selectedMonth = d.getMonth();
c.drawYear = c.selectedYear = d.getFullYear()
}
this._notifyChange(c);
this._adjustDate(b)
},
_selectMonthYear: function (a, e, b) {
var c = $(a);
var d = this._getInst(c[0]);
d._selectingMonthYear = false;
d["selected" + (b == "M" ? "Month" : "Year")] = d["draw" + (b == "M" ? "Month" : "Year")] = parseInt(e.options[e.selectedIndex].value, 10);
this._notifyChange(d);
this._adjustDate(c)
},
_clickMonthYear: function (a) {
var c = $(a);
var b = this._getInst(c[0]);
if (b.input && b._selectingMonthYear) {
setTimeout(function () {
b.input.focus()
}, 0)
}
b._selectingMonthYear = !b._selectingMonthYear
},
_selectDay: function (a, c, f, b) {
var d = $(a);
if ($(b).hasClass(this._unselectableClass) || this._isDisabledDatepicker(d[0])) {
return
}
var e = this._getInst(d[0]);
e.selectedDay = e.currentDay = $("a", b).html();
e.selectedMonth = e.currentMonth = c;
e.selectedYear = e.currentYear = f;
this._selectDate(a, this._formatDate(e, e.currentDay, e.currentMonth, e.currentYear))
},
_clearDate: function (a) {
var c = $(a);
var b = this._getInst(c[0]);
this._selectDate(c, "")
},
_selectDate: function (a, e) {
var b = $(a);
var c = this._getInst(b[0]);
e = (e != null ? e : this._formatDate(c));
if (c.input) {
c.input.val(e)
}
this._updateAlternate(c);
var d = this._get(c, "onSelect");
if (d) {
d.apply((c.input ? c.input[0] : null), [e, c])
} else {
if (c.input) {
c.input.trigger("change")
}
} if (c.inline) {
this._updateDatepicker(c)
} else {
this._hideDatepicker();
this._lastInput = c.input[0];
if (typeof (c.input[0]) != "object") {
c.input.focus()
}
this._lastInput = null
}
},
_updateAlternate: function (a) {
var c = this._get(a, "altField");
if (c) {
var b = this._get(a, "altFormat") || this._get(a, "dateFormat");
var d = this._getDate(a);
var e = this.formatDate(b, d, this._getFormatConfig(a));
$(c).each(function () {
$(this).val(e)
})
}
},
noWeekends: function (b) {
var a = b.getDay();
return [(a > 0 && a < 6), ""]
},
iso8601Week: function (c) {
var a = new Date(c.getTime());
a.setDate(a.getDate() + 4 - (a.getDay() || 7));
var b = a.getTime();
a.setMonth(0);
a.setDate(1);
return Math.floor(Math.round((b - a) / 86400000) / 7) + 1
},
parseDate: function (l, r, k) {
if (l == null || r == null) {
throw "Invalid arguments"
}
r = (typeof r == "object" ? r.toString() : r + "");
if (r == "") {
return null
}
var z = (k ? k.shortYearCutoff : null) || this._defaults.shortYearCutoff;
z = (typeof z != "string" ? z : new Date().getFullYear() % 100 + parseInt(z, 10));
var t = (k ? k.dayNamesShort : null) || this._defaults.dayNamesShort;
var h = (k ? k.dayNames : null) || this._defaults.dayNames;
var A = (k ? k.monthNamesShort : null) || this._defaults.monthNamesShort;
var x = (k ? k.monthNames : null) || this._defaults.monthNames;
var w = -1;
var g = -1;
var n = -1;
var u = -1;
var o = false;
var s = function (a) {
var b = (y + 1 < l.length && l.charAt(y + 1) == a);
if (b) {
y++
}
return b
};
var f = function (c) {
var e = s(c);
var b = (c == "@" ? 14 : (c == "!" ? 20 : (c == "y" && e ? 4 : (c == "o" ? 3 : 2))));
var a = new RegExp("^\\d{1," + b + "}");
var d = r.substring(m).match(a);
if (!d) {
throw "Missing number at position " + m
}
m += d[0].length;
return parseInt(d[0], 10)
};
var v = function (d, c, a) {
var b = (s(d) ? a : c);
for (var i = 0; i < b.length; i++) {
if (r.substr(m, b[i].length).toLowerCase() == b[i].toLowerCase()) {
m += b[i].length;
return i + 1
}
}
throw "Unknown name at position " + m
};
var p = function () {
if (r.charAt(m) != l.charAt(y)) {
throw "Unexpected literal at position " + m
}
m++
};
var m = 0;
for (var y = 0; y < l.length; y++) {
if (o) {
if (l.charAt(y) == "'" && !s("'")) {
o = false
} else {
p()
}
} else {
switch (l.charAt(y)) {
case "d":
n = f("d");
break;
case "D":
v("D", t, h);
break;
case "o":
u = f("o");
break;
case "m":
g = f("m");
break;
case "M":
g = v("M", A, x);
break;
case "y":
w = f("y");
break;
case "@":
var j = new Date(f("@"));
w = j.getFullYear();
g = j.getMonth() + 1;
n = j.getDate();
break;
case "!":
var j = new Date((f("!") - this._ticksTo1970) / 10000);
w = j.getFullYear();
g = j.getMonth() + 1;
n = j.getDate();
break;
case "'":
if (s("'")) {
p()
} else {
o = true
}
break;
default:
p()
}
}
}
if (w == -1) {
w = new Date().getFullYear()
} else {
if (w < 100) {
w += new Date().getFullYear() - new Date().getFullYear() % 100 + (w <= z ? 0 : -100)
}
} if (u > -1) {
g = 1;
n = u;
do {
var q = this._getDaysInMonth(w, g - 1);
if (n <= q) {
break
}
g++;
n -= q
} while (true)
}
var j = this._daylightSavingAdjust(new Date(w, g - 1, n));
if (j.getFullYear() != w || j.getMonth() + 1 != g || j.getDate() != n) {
throw "Invalid date"
}
return j
},
ATOM: "yy-mm-dd",
COOKIE: "D, dd M yy",
ISO_8601: "yy-mm-dd",
RFC_822: "D, d M y",
RFC_850: "DD, dd-M-y",
RFC_1036: "D, d M y",
RFC_1123: "D, d M yy",
RFC_2822: "D, d M yy",
RSS: "D, d M y",
TICKS: "!",
TIMESTAMP: "@",
W3C: "yy-mm-dd",
_ticksTo1970: (((1970 - 1) * 365 + Math.floor(1970 / 4) - Math.floor(1970 / 100) + Math.floor(1970 / 400)) * 24 * 60 * 60 * 10000000),
formatDate: function (h, n, m) {
if (!n) {
return ""
}
var e = (m ? m.dayNamesShort : null) || this._defaults.dayNamesShort;
var p = (m ? m.dayNames : null) || this._defaults.dayNames;
var j = (m ? m.monthNamesShort : null) || this._defaults.monthNamesShort;
var l = (m ? m.monthNames : null) || this._defaults.monthNames;
var g = function (a) {
var b = (f + 1 < h.length && h.charAt(f + 1) == a);
if (b) {
f++
}
return b
};
var q = function (b, a, d) {
var c = "" + a;
if (g(b)) {
while (c.length < d) {
c = "0" + c
}
}
return c
};
var k = function (d, b, c, a) {
return (g(d) ? a[b] : c[b])
};
var o = "";
var i = false;
if (n) {
for (var f = 0; f < h.length; f++) {
if (i) {
if (h.charAt(f) == "'" && !g("'")) {
i = false
} else {
o += h.charAt(f)
}
} else {
switch (h.charAt(f)) {
case "d":
o += q("d", n.getDate(), 2);
break;
case "D":
o += k("D", n.getDay(), e, p);
break;
case "o":
o += q("o", (n.getTime() - new Date(n.getFullYear(), 0, 0).getTime()) / 86400000, 3);
break;
case "m":
o += q("m", n.getMonth() + 1, 2);
break;
case "M":
o += k("M", n.getMonth(), j, l);
break;
case "y":
o += (g("y") ? n.getFullYear() : (n.getYear() % 100 < 10 ? "0" : "") + n.getYear() % 100);
break;
case "@":
o += n.getTime();
break;
case "!":
o += n.getTime() * 10000 + this._ticksTo1970;
break;
case "'":
if (g("'")) {
o += "'"
} else {
i = true
}
break;
default:
o += h.charAt(f)
}
}
}
}
return o
},
generateFullyTranslatedDate: function (d, b) {
if (b.langageUsed == "en") {
if (b.myDateFormat == "mm/dd/yyyy") {
myDateFormatLocalise = b.myDateFormat
}
}
var a = "";
var c = b.myFormat.split("/");
for (var i = 0; i < c.length; i++) {
if (c[i] == "yyyy") {
c[i] = "yy"
}
a += c[i];
if ((i + 1) < c.length) {
a += "/"
}
}
var e;
if (isNaN(d)) {
e = myDateFormatLocalise
} else {
e = this.formatDate("DD d MM yy", this.parseDate(a, this.formatDate(a, d, b.myDateFormatOption), b.myDateFormatOption), b.myDateFormatOption)
}
return e
},
generateSmallTranslatedDate: function (d, b) {
if (b.langageUsed == "en") {
if (b.myDateFormat == "mm/dd/yyyy") {
myDateFormatLocalise = b.myDateFormat
}
}
var a = "";
var c = b.myFormat.split("/");
for (var i = 0; i < c.length; i++) {
if (c[i] == "yyyy") {
c[i] = "yy"
}
a += c[i];
if ((i + 1) < c.length) {
a += "/"
}
}
var e;
if (isNaN(d)) {
e = myDateFormatLocalise
} else {
e = this.formatDate("D d M yy", this.parseDate(a, this.formatDate(a, d, b.myDateFormatOption), b.myDateFormatOption), b.myDateFormatOption)
}
return e
},
_possibleChars: function (c) {
var d = "";
var f = false;
var g = function (a) {
var b = (e + 1 < c.length && c.charAt(e + 1) == a);
if (b) {
e++
}
return b
};
for (var e = 0; e < c.length; e++) {
if (f) {
if (c.charAt(e) == "'" && !g("'")) {
f = false
} else {
d += c.charAt(e)
}
} else {
switch (c.charAt(e)) {
case "d":
case "m":
case "y":
case "@":
d += "0123456789";
break;
case "D":
case "M":
return null;
case "'":
if (g("'")) {
d += "'"
} else {
f = true
}
break;
default:
d += c.charAt(e)
}
}
}
return d
},
_get: function (a, b) {
return a.settings[b] !== bj ? a.settings[b] : this._defaults[b]
},
_setDateFromField: function (b, d) {
if (b.input.val() == b.lastVal) {
return
}
var f = this._get(b, "dateFormat");
var a = b.lastVal = b.input ? b.input.val() : null;
var e, defaultDate;
e = defaultDate = this._getDefaultDate(b);
var c = this._getFormatConfig(b);
try {
e = this.parseDate(f, a, c) || defaultDate
} catch (event) {
this.log(event);
a = (d ? "" : a)
}
b.selectedDay = e.getDate();
b.drawMonth = b.selectedMonth = e.getMonth();
b.drawYear = b.selectedYear = e.getFullYear();
b.currentDay = (a ? e.getDate() : 0);
b.currentMonth = (a ? e.getMonth() : 0);
b.currentYear = (a ? e.getFullYear() : 0);
this._adjustInstDate(b)
},
_getDefaultDate: function (a) {
return this._restrictMinMax(a, this._determineDate(a, this._get(a, "defaultDate"), new Date()))
},
_createdate: function (d, a) {
var c = a.split("/");
var b = [];
for (var i = 0; i < d.length; i++) {
switch (d[i]) {
case "dd":
b.day = c[i];
break;
case "mm":
b.month = c[i];
break;
case "yy":
b.year = c[i];
break;
default:
break
}
}
return {
day: b.day,
month: b.month,
year: b.year
}
},
_determineDate: function (k, m, n) {
var l = function (a) {
var b = new Date();
b.setDate(b.getDate() + a);
return b
};
var j = function (a) {
try {
return $.datepicker.parseDate($.datepicker._get(k, "dateFormat"), a, $.datepicker._getFormatConfig(k))
} catch (e) {}
var g = (a.toLowerCase().match(/^c/) ? $.datepicker._getDate(k) : null) || new Date();
var f = g.getFullYear();
var b = g.getMonth();
var h = g.getDate();
var c = /([+-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g;
var d = c.exec(a);
while (d) {
switch (d[2] || "d") {
case "d":
case "D":
h += parseInt(d[1], 10);
break;
case "w":
case "W":
h += parseInt(d[1], 10) * 7;
break;
case "m":
case "M":
b += parseInt(d[1], 10);
h = Math.min(h, $.datepicker._getDaysInMonth(f, b));
break;
case "y":
case "Y":
f += parseInt(d[1], 10);
h = Math.min(h, $.datepicker._getDaysInMonth(f, b));
break
}
d = c.exec(a)
}
return new Date(f, b, h)
};
var i = (m == null || m === "" ? n : (typeof m == "string" ? j(m) : (typeof m == "number" ? (isNaN(m) ? n : l(m)) : new Date(m.getTime()))));
i = (i && i.toString() == "Invalid Date" ? n : i);
if (i) {
i.setHours(0);
i.setMinutes(0);
i.setSeconds(0);
i.setMilliseconds(0)
}
return this._daylightSavingAdjust(i)
},
_daylightSavingAdjust: function (a) {
if (!a) {
return null
}
a.setHours(a.getHours() > 12 ? a.getHours() + 2 : 0);
return a
},
_setDate: function (a, d, b) {
var g = !d;
var e = a.selectedMonth;
var c = a.selectedYear;
var f = this._restrictMinMax(a, this._determineDate(a, d, new Date()));
a.selectedDay = a.currentDay = f.getDate();
a.drawMonth = a.selectedMonth = a.currentMonth = f.getMonth();
a.drawYear = a.selectedYear = a.currentYear = f.getFullYear();
if ((e != a.selectedMonth || c != a.selectedYear) && !b) {
this._notifyChange(a)
}
this._adjustInstDate(a);
if (a.input) {
a.input.val(g ? "" : this._formatDate(a))
}
},
_getDate: function (a) {
var b = (!a.currentYear || (a.input && a.input.val() == "") ? null : this._daylightSavingAdjust(new Date(a.currentYear, a.currentMonth, a.currentDay)));
return b
},
_generateHTML: function (n) {
var J = new Date();
J = this._daylightSavingAdjust(new Date(J.getFullYear(), J.getMonth(), J.getDate()));
var e = this._get(n, "baseClass");
n.dpDiv.addClass(function (a) {
if (e) {
return e
}
return ""
});
var g = this._get(n, "isRTL");
var d = this._get(n, "showButtonPanel");
var r = this._get(n, "hideIfNoPrevNext");
var E = this._get(n, "navigationAsDateFormat");
var N = this._getNumberOfMonths(n);
var V = this._get(n, "showCurrentAtPos");
var B = this._get(n, "stepMonths");
var G = (N[0] != 1 || N[1] != 1);
var be = this._daylightSavingAdjust((!n.currentDay ? new Date(9999, 9, 9) : new Date(n.currentYear, n.currentMonth, n.currentDay)));
var U = this._getMinMaxDate(n, "min");
var M = this._getMinMaxDate(n, "max");
var bh = n.drawMonth - V;
var q = n.drawYear;
if (bh < 0) {
bh += 12;
q--
}
if (M) {
var K = this._daylightSavingAdjust(new Date(M.getFullYear(), M.getMonth() - (N[0] * N[1]) + 1, M.getDate()));
K = (U && K < U ? U : K);
while (this._daylightSavingAdjust(new Date(q, bh, 1)) > K) {
bh--;
if (bh < 0) {
bh = 11;
q--
}
}
}
n.drawMonth = bh;
n.drawYear = q;
var L = this._get(n, "prevText");
L = (!E ? L : this.formatDate(L, this._daylightSavingAdjust(new Date(q, bh - B, 1)), this._getFormatConfig(n)));
var s = (this._canAdjustMonth(n, -1, q, bh) ? '<a class="ui-datepicker-prev ui-corner-all" onclick="DP_jQuery_' + bk + ".datepicker._adjustDate('#" + n.id + "', -" + B + ", 'M');\" title=\"" + L + '"><span class="ui-icon ui-icon-circle-triangle-' + (g ? "e" : "w") + '">' + L + "</span></a>" : (r ? "" : '<a class="ui-datepicker-prev ui-corner-all ui-state-disabled" title="' + L + '"><span class="ui-icon ui-icon-circle-triangle-' + (g ? "e" : "w") + '">' + L + "</span></a>"));
var A = this._get(n, "nextText");
A = (!E ? A : this.formatDate(A, this._daylightSavingAdjust(new Date(q, bh + B, 1)), this._getFormatConfig(n)));
var Y = (this._canAdjustMonth(n, +1, q, bh) ? '<a class="ui-datepicker-next ui-corner-all" onclick="DP_jQuery_' + bk + ".datepicker._adjustDate('#" + n.id + "', +" + B + ", 'M');\" title=\"" + A + '"><span class="ui-icon ui-icon-circle-triangle-' + (g ? "w" : "e") + '">' + A + "</span></a>" : (r ? "" : '<a class="ui-datepicker-next ui-corner-all ui-state-disabled" title="' + A + '"><span class="ui-icon ui-icon-circle-triangle-' + (g ? "w" : "e") + '">' + A + "</span></a>"));
var k = this._get(n, "currentText");
var o = (this._get(n, "gotoCurrent") && n.currentDay ? be : J);
k = (!E ? k : this.formatDate(k, o, this._getFormatConfig(n)));
var h = (!n.inline ? '<button type="button" class="ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all ct-ui-button" onclick="DP_jQuery_' + bk + '.datepicker._hideDatepicker();"><span>' + $.i18n.locale.closeButton + "</span></button>" : "");
var C = parseInt(this._get(n, "firstDay"), 10);
C = (isNaN(C) ? 0 : C);
var c = this._get(n, "showWeek");
var R = this._get(n, "dayNames");
var v = this._get(n, "dayNamesShort");
var P = this._get(n, "dayNamesMin");
var Q = this._get(n, "monthNames");
var bg = this._get(n, "monthNamesShort");
var l = this._get(n, "beforeShowDay");
var T = this._get(n, "showOtherMonths");
var H = this._get(n, "selectOtherMonths");
var bf = this._get(n, "calculateWeek") || this.iso8601Week;
var i = this._getDefaultDate(n);
var u = "";
for (var I = 0; I < N[0]; I++) {
var D = "";
for (var S = 0; S < N[1]; S++) {
var X = this._daylightSavingAdjust(new Date(q, bh, n.selectedDay));
var t = " ui-corner-all";
var x = "";
if (G) {
x += '<div class="ui-datepicker-group';
if (N[1] > 1) {
switch (S) {
case 0:
x += " ui-datepicker-group-first";
t = " ui-corner-" + (g ? "tr" : "tl");
break;
case N[1] - 1:
x += " ui-datepicker-group-last";
t = " ui-corner-" + (g ? "tl" : "tr");
break;
default:
x += " ui-datepicker-group-middle";
t = "";
break
}
}
x += '">'
}
x += '<div class="ui-datepicker-header ui-widget-header ct-ui-header-primary ui-helper-clearfix' + t + '">' + (/all|tl/.test(t) && I == 0 ? (g ? Y : s) : "") + (/all|tr/.test(t) && I == 0 ? (g ? s : Y) : "") + this._generateMonthYearHeader(n, bh, q, U, M, I > 0 || S > 0, Q, bg) + '</div><table cellspacing="1" class="ui-datepicker-calendar"><thead><tr>';
var w = (c ? '<th class="ui-datepicker-week-col">' + this._get(n, "weekHeader") + "</th>" : "");
for (var b = 0; b < 7; b++) {
var y = (b + C) % 7;
w += '<th class="' + ((b + C + 6) % 7 >= 5 ? " ui-datepicker-week-end" : "") + '"><span title="' + R[y] + '">' + P[y] + "</span></th>"
}
x += w + "</tr></thead><tbody>";
var W = this._getDaysInMonth(q, bh);
if (q == n.selectedYear && bh == n.selectedMonth) {
n.selectedDay = Math.min(n.selectedDay, W)
}
var F = (this._getFirstDayOfMonth(q, bh) - C + 7) % 7;
var p = (G ? 6 : Math.ceil((F + W) / 7));
var m = this._daylightSavingAdjust(new Date(q, bh, 1 - F));
for (var Z = 0; Z < p; Z++) {
x += "<tr>";
var j = (!c ? "" : '<td class="ui-datepicker-week-col">' + this._get(n, "calculateWeek")(m) + "</td>");
for (var b = 0; b < 7; b++) {
var f = (l ? l.apply((n.input ? n.input[0] : null), [m]) : [true, ""]);
var z = (m.getMonth() != bh);
var O = (z && !H) || !f[0] || (U && m < U) || (M && m > M);
j += '<td class="' + ((b + C + 6) % 7 >= 5 ? " ui-datepicker-week-end" : "") + (z ? " ui-datepicker-other-month" : "") + ((m.getTime() == X.getTime() && bh == n.selectedMonth && n._keyEvent) || (i.getTime() == m.getTime() && i.getTime() == X.getTime()) ? " " + this._dayOverClass : "") + (O ? " " + this._unselectableClass + " ui-state-disabled" : "") + (z && !T ? " ui-datepicker-empty" : " " + f[1] + (m.getTime() == be.getTime() ? " " + this._currentClass : "") + (m.getTime() == J.getTime() ? " ui-datepicker-today" : "")) + '"' + ((!z || T) && f[2] ? ' title="' + f[2] + '"' : "") + (O ? "" : ' onclick="DP_jQuery_' + bk + ".datepicker._selectDay('#" + n.id + "'," + m.getMonth() + "," + m.getFullYear() + ', this);return false;"') + ">" + (z && !T ? "&#xa0;" : (O ? '<span class="ui-state-default">' + m.getDate() + "</span>" : '<a class="ui-state-default' + (m.getTime() == J.getTime() ? " ui-state-highlight ct-ui-state-highlight" : "") + (m.getTime() == be.getTime() ? " ui-state-active ct-ui-state-active" : "") + (z ? " ui-priority-secondary" : "") + '" href="#">' + m.getDate() + "</a>")) + "</td>";
m.setDate(m.getDate() + 1);
m = this._daylightSavingAdjust(m)
}
x += j + "</tr>"
}
bh++;
if (bh > 11) {
bh = 0;
q++
}
x += "</tbody></table>" + (G ? "</div>" + ((N[0] > 0 && S == N[1] - 1) ? '<div class="ui-datepicker-row-break ui-corner-bottom"></div>' : "") : "");
D += x
}
u += D
}
u += h + ($.browser.msie && parseInt($.browser.version, 10) < 7 && !n.inline ? '<iframe src="javascript:false;" class="ui-datepicker-cover" frameborder="0"></iframe>' : "");
n._keyEvent = false;
return u
},
_generateMonthYearHeader: function (s, u, k, q, m, j, o, w) {
var t = this._get(s, "changeMonth");
var d = this._get(s, "changeYear");
var c = this._get(s, "showMonthAfterYear");
var n = '<div class="ui-datepicker-title">';
var g = "";
if (j || !t) {
g += '<span class="ui-datepicker-month">' + o[u] + "</span>"
} else {
var f = (q && q.getFullYear() == k);
var v = (m && m.getFullYear() == k);
g += '<select class="ui-datepicker-month" onchange="DP_jQuery_' + bk + ".datepicker._selectMonthYear('#" + s.id + "', this, 'M');\" onclick=\"DP_jQuery_" + bk + ".datepicker._clickMonthYear('#" + s.id + "');\">";
for (var e = 0; e < 12; e++) {
if ((!f || e >= q.getMonth()) && (!v || e <= m.getMonth())) {
g += '<option value="' + e + '"' + (e == u ? ' selected="selected"' : "") + ">" + w[e] + "</option>"
}
}
g += "</select>"
} if (!c) {
n += g + (j || !(t && d) ? "&#xa0;" : "")
}
s.yearshtml = "";
if (j || !d) {
n += '<span class="ui-datepicker-year">' + k + "</span>"
} else {
var h = this._get(s, "yearRange").split(":");
var r = new Date().getFullYear();
var i = function (a) {
var b = (a.match(/c[+-].*/) ? k + parseInt(a.substring(1), 10) : (a.match(/[+-].*/) ? r + parseInt(a, 10) : parseInt(a, 10)));
return (isNaN(b) ? r : b)
};
var l = i(h[0]);
var p = Math.max(l, i(h[1] || ""));
l = (q ? Math.max(l, q.getFullYear()) : l);
p = (m ? Math.min(p, m.getFullYear()) : p);
s.yearshtml += '<select class="ui-datepicker-year" onchange="DP_jQuery_' + bk + ".datepicker._selectMonthYear('#" + s.id + "', this, 'Y');\" onclick=\"DP_jQuery_" + bk + ".datepicker._clickMonthYear('#" + s.id + "');\">";
for (; l <= p; l++) {
s.yearshtml += '<option value="' + l + '"' + (l == k ? ' selected="selected"' : "") + ">" + l + "</option>"
}
s.yearshtml += "</select>";
if (!$.browser.mozilla) {
n += s.yearshtml;
s.yearshtml = null
} else {
n += '<select class="ui-datepicker-year"><option value="' + k + '" selected="selected">' + k + "</option></select>"
}
}
n += this._get(s, "yearSuffix");
if (c) {
n += (j || !(t && d) ? "&#xa0;" : "") + g
}
n += "</div>";
return n
},
_adjustInstDate: function (d, a, b) {
var e = d.drawYear + (b == "Y" ? a : 0);
var c = d.drawMonth + (b == "M" ? a : 0);
var g = Math.min(d.selectedDay, this._getDaysInMonth(e, c)) + (b == "D" ? a : 0);
var f = this._restrictMinMax(d, this._daylightSavingAdjust(new Date(e, c, g)));
d.selectedDay = f.getDate();
d.drawMonth = d.selectedMonth = f.getMonth();
d.drawYear = d.selectedYear = f.getFullYear();
if (b == "M" || b == "Y") {
this._notifyChange(d)
}
},
_restrictMinMax: function (c, d) {
var b = this._getMinMaxDate(c, "min");
var a = this._getMinMaxDate(c, "max");
var e = (b && d < b ? b : d);
e = (a && e > a ? a : e);
return e
},
_notifyChange: function (a) {
var b = this._get(a, "onChangeMonthYear");
if (b) {
b.apply((a.input ? a.input[0] : null), [a.selectedYear, a.selectedMonth + 1, a])
}
},
_getNumberOfMonths: function (a) {
var b = this._get(a, "numberOfMonths");
return (b == null ? [1, 1] : (typeof b == "number" ? [1, b] : b))
},
_getMinMaxDate: function (b, a) {
return this._determineDate(b, this._get(b, a + "Date"), null)
},
_getDaysInMonth: function (b, a) {
return 32 - this._daylightSavingAdjust(new Date(b, a, 32)).getDate()
},
_getFirstDayOfMonth: function (b, a) {
return new Date(b, a, 1).getDay()
},
_canAdjustMonth: function (c, a, d, b) {
var f = this._getNumberOfMonths(c);
var e = this._daylightSavingAdjust(new Date(d, b + (a < 0 ? a : f[0] * f[1]), 1));
if (a < 0) {
e.setDate(this._getDaysInMonth(e.getFullYear(), e.getMonth()))
}
return this._isInRange(c, e)
},
_isInRange: function (c, d) {
var b = this._getMinMaxDate(c, "min");
var a = this._getMinMaxDate(c, "max");
return ((!b || d.getTime() >= b.getTime()) && (!a || d.getTime() <= a.getTime()))
},
_getFormatConfig: function (a) {
var b = this._get(a, "shortYearCutoff");
b = (typeof b != "string" ? b : new Date().getFullYear() % 100 + parseInt(b, 10));
return {
shortYearCutoff: b,
dayNamesShort: this._get(a, "dayNamesShort"),
dayNames: this._get(a, "dayNames"),
monthNamesShort: this._get(a, "monthNamesShort"),
monthNames: this._get(a, "monthNames")
}
},
_formatDate: function (b, e, a, c) {
if (!e) {
b.currentDay = b.selectedDay;
b.currentMonth = b.selectedMonth;
b.currentYear = b.selectedYear
}
var d = (e ? (typeof e == "object" ? e : this._daylightSavingAdjust(new Date(c, a, e))) : this._daylightSavingAdjust(new Date(b.currentYear, b.currentMonth, b.currentDay)));
return this.formatDate(this._get(b, "dateFormat"), d, this._getFormatConfig(b))
}
});
function extendRemove(b, c) {
$.extend(b, c);
for (var a in c) {
if (c[a] == null || c[a] == bj) {
b[a] = c[a]
}
}
return b
}
function isArray(a) {
return (a && (($.browser.safari && typeof a == "object" && a.length) || (a.constructor && a.constructor.toString().match(/\Array\(\)/))))
}
$.fn.datepicker = function (b) {
if (!this.length) {
return this
}
if (!$.datepicker.initialized) {
$(document).mousedown($.datepicker._checkExternalClick).find("body").append($.datepicker.dpDiv);
$.datepicker.initialized = true
}
var a = Array.prototype.slice.call(arguments, 1);
if (typeof b == "string" && (b == "isDisabled" || b == "getDate" || b == "widget")) {
return $.datepicker["_" + b + "Datepicker"].apply($.datepicker, [this[0]].concat(a))
}
if (b == "option" && arguments.length == 2 && typeof arguments[1] == "string") {
return $.datepicker["_" + b + "Datepicker"].apply($.datepicker, [this[0]].concat(a))
}
return this.each(function () {
typeof b == "string" ? $.datepicker["_" + b + "Datepicker"].apply($.datepicker, [this].concat(a)) : $.datepicker._attachDatepicker(this, b)
})
};
$.datepicker = new Datepicker();
$.datepicker.initialized = false;
$.datepicker.uuid = new Date().getTime();
$.datepicker.version = "1.8.11";
window["DP_jQuery_" + bk] = $
})(jQCT);
(function ($, n) {
$.widget("ui.draggable", $.ui.mouse, {
widgetEventPrefix: "drag",
options: {
addClasses: true,
appendTo: "parent",
axis: false,
connectToSortable: false,
containment: false,
cursor: "auto",
cursorAt: false,
grid: false,
handle: false,
helper: "original",
iframeFix: false,
opacity: false,
refreshPositions: false,
revert: false,
revertDuration: 500,
scope: "default",
scroll: true,
scrollSensitivity: 20,
scrollSpeed: 20,
snap: false,
snapMode: "both",
snapTolerance: 20,
stack: false,
zIndex: false
},
_create: function () {
if (this.options.helper == "original" && !(/^(?:r|a|f)/).test(this.element.css("position"))) {
this.element[0].style.position = "relative"
}(this.options.addClasses && this.element.addClass("ui-draggable"));
(this.options.disabled && this.element.addClass("ui-draggable-disabled"));
this._mouseInit()
},
destroy: function () {
if (!this.element.data("draggable")) {
return
}
this.element.removeData("draggable").unbind(".draggable").removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled");
this._mouseDestroy();
return this
},
_mouseCapture: function (a) {
var o = this.options;
if (this.helper || o.disabled || $(a.target).is(".ui-resizable-handle")) {
return false
}
this.handle = this._getHandle(a);
if (!this.handle) {
return false
}
return true
},
_mouseStart: function (a) {
var o = this.options;
this.helper = this._createHelper(a);
this._cacheHelperProportions();
if ($.ui.ddmanager) {
$.ui.ddmanager.current = this
}
this._cacheMargins();
this.cssPosition = this.helper.css("position");
this.scrollParent = this.helper.scrollParent();
this.offset = this.positionAbs = this.element.offset();
this.offset = {
top: this.offset.top - this.margins.top,
left: this.offset.left - this.margins.left
};
$.extend(this.offset, {
click: {
left: a.pageX - this.offset.left,
top: a.pageY - this.offset.top
},
parent: this._getParentOffset(),
relative: this._getRelativeOffset()
});
this.originalPosition = this.position = this._generatePosition(a);
this.originalPageX = a.pageX;
this.originalPageY = a.pageY;
(o.cursorAt && this._adjustOffsetFromHelper(o.cursorAt));
if (o.containment) {
this._setContainment()
}
if (this._trigger("start", a) === false) {
this._clear();
return false
}
this._cacheHelperProportions();
if ($.ui.ddmanager && !o.dropBehaviour) {
$.ui.ddmanager.prepareOffsets(this, a)
}
this.helper.addClass("ui-draggable-dragging");
this._mouseDrag(a, true);
return true
},
_mouseDrag: function (a, b) {
this.position = this._generatePosition(a);
this.positionAbs = this._convertPositionTo("absolute");
if (!b) {
var c = this._uiHash();
if (this._trigger("drag", a, c) === false) {
this._mouseUp({});
return false
}
this.position = c.position
}
if (!this.options.axis || this.options.axis != "y") {
this.helper[0].style.left = this.position.left + "px"
}
if (!this.options.axis || this.options.axis != "x") {
this.helper[0].style.top = this.position.top + "px"
}
if ($.ui.ddmanager) {
$.ui.ddmanager.drag(this, a)
}
return false
},
_mouseStop: function (a) {
var c = false;
if ($.ui.ddmanager && !this.options.dropBehaviour) {
c = $.ui.ddmanager.drop(this, a)
}
if (this.dropped) {
c = this.dropped;
this.dropped = false
}
if ((!this.element[0] || !this.element[0].parentNode) && this.options.helper == "original") {
return false
}
if ((this.options.revert == "invalid" && !c) || (this.options.revert == "valid" && c) || this.options.revert === true || ($.isFunction(this.options.revert) && this.options.revert.call(this.element, c))) {
var b = this;
$(this.helper).animate(this.originalPosition, parseInt(this.options.revertDuration, 10), function () {
if (b._trigger("stop", a) !== false) {
b._clear()
}
})
} else {
if (this._trigger("stop", a) !== false) {
this._clear()
}
}
return false
},
cancel: function () {
if (this.helper.is(".ui-draggable-dragging")) {
this._mouseUp({})
} else {
this._clear()
}
return this
},
_getHandle: function (a) {
var b = !this.options.handle || !$(this.options.handle, this.element).length ? true : false;
$(this.options.handle, this.element).find("*").andSelf().each(function () {
if (this == a.target) {
b = true
}
});
return b
},
_createHelper: function (a) {
var o = this.options;
var b = $.isFunction(o.helper) ? $(o.helper.apply(this.element[0], [a])) : (o.helper == "clone" ? this.element.clone() : this.element);
if (!b.parents("body").length) {
b.appendTo((o.appendTo == "parent" ? this.element[0].parentNode : o.appendTo))
}
if (b[0] != this.element[0] && !(/(fixed|absolute)/).test(b.css("position"))) {
b.css("position", "absolute")
}
return b
},
_adjustOffsetFromHelper: function (a) {
if (typeof a == "string") {
a = a.split(" ")
}
if ($.isArray(a)) {
a = {
left: +a[0],
top: +a[1] || 0
}
}
if ("left" in a) {
this.offset.click.left = a.left + this.margins.left
}
if ("right" in a) {
this.offset.click.left = this.helperProportions.width - a.right + this.margins.left
}
if ("top" in a) {
this.offset.click.top = a.top + this.margins.top
}
if ("bottom" in a) {
this.offset.click.top = this.helperProportions.height - a.bottom + this.margins.top
}
},
_getParentOffset: function () {
this.offsetParent = this.helper.offsetParent();
var a = this.offsetParent.offset();
if (this.cssPosition == "absolute" && this.scrollParent[0] != document && $.ui.contains(this.scrollParent[0], this.offsetParent[0])) {
a.left += this.scrollParent.scrollLeft();
a.top += this.scrollParent.scrollTop()
}
if ((this.offsetParent[0] == document.body) || (this.offsetParent[0].tagName && this.offsetParent[0].tagName.toLowerCase() == "html" && $.browser.msie)) {
a = {
top: 0,
left: 0
}
}
return {
top: a.top + (parseInt(this.offsetParent.css("borderTopWidth"), 10) || 0),
left: a.left + (parseInt(this.offsetParent.css("borderLeftWidth"), 10) || 0)
}
},
_getRelativeOffset: function () {
if (this.cssPosition == "relative") {
var p = this.element.position();
return {
top: p.top - (parseInt(this.helper.css("top"), 10) || 0) + this.scrollParent.scrollTop(),
left: p.left - (parseInt(this.helper.css("left"), 10) || 0) + this.scrollParent.scrollLeft()
}
} else {
return {
top: 0,
left: 0
}
}
},
_cacheMargins: function () {
this.margins = {
left: (parseInt(this.element.css("marginLeft"), 10) || 0),
top: (parseInt(this.element.css("marginTop"), 10) || 0),
right: (parseInt(this.element.css("marginRight"), 10) || 0),
bottom: (parseInt(this.element.css("marginBottom"), 10) || 0)
}
},
_cacheHelperProportions: function () {
this.helperProportions = {
width: this.helper.outerWidth(),
height: this.helper.outerHeight()
}
},
_setContainment: function () {
var o = this.options;
if (o.containment == "parent") {
o.containment = this.helper[0].parentNode
}
if (o.containment == "document" || o.containment == "window") {
this.containment = [(o.containment == "document" ? 0 : $(window).scrollLeft()) - this.offset.relative.left - this.offset.parent.left, (o.containment == "document" ? 0 : $(window).scrollTop()) - this.offset.relative.top - this.offset.parent.top, (o.containment == "document" ? 0 : $(window).scrollLeft()) + $(o.containment == "document" ? document : window).width() - this.helperProportions.width - this.margins.left, (o.containment == "document" ? 0 : $(window).scrollTop()) + ($(o.containment == "document" ? document : window).height() || document.body.parentNode.scrollHeight) - this.helperProportions.height - this.margins.top]
}
if (!(/^(document|window|parent)$/).test(o.containment) && o.containment.constructor != Array) {
var b = $(o.containment)[0];
if (!b) {
return
}
var a = $(o.containment).offset();
var c = ($(b).css("overflow") != "hidden");
this.containment = [a.left + (parseInt($(b).css("borderLeftWidth"), 10) || 0) + (parseInt($(b).css("paddingLeft"), 10) || 0), a.top + (parseInt($(b).css("borderTopWidth"), 10) || 0) + (parseInt($(b).css("paddingTop"), 10) || 0), a.left + (c ? Math.max(b.scrollWidth, b.offsetWidth) : b.offsetWidth) - (parseInt($(b).css("borderLeftWidth"), 10) || 0) - (parseInt($(b).css("paddingRight"), 10) || 0) - this.helperProportions.width - this.margins.left - this.margins.right, a.top + (c ? Math.max(b.scrollHeight, b.offsetHeight) : b.offsetHeight) - (parseInt($(b).css("borderTopWidth"), 10) || 0) - (parseInt($(b).css("paddingBottom"), 10) || 0) - this.helperProportions.height - this.margins.top - this.margins.bottom]
} else {
if (o.containment.constructor == Array) {
this.containment = o.containment
}
}
},
_convertPositionTo: function (d, a) {
if (!a) {
a = this.position
}
var b = d == "absolute" ? 1 : -1;
var o = this.options,
scroll = this.cssPosition == "absolute" && !(this.scrollParent[0] != document && $.ui.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent : this.scrollParent,
scrollIsRootNode = (/(html|body)/i).test(scroll[0].tagName);
return {
top: (a.top + this.offset.relative.top * b + this.offset.parent.top * b - ($.browser.safari && $.browser.version < 526 && this.cssPosition == "fixed" ? 0 : (this.cssPosition == "fixed" ? -this.scrollParent.scrollTop() : (scrollIsRootNode ? 0 : scroll.scrollTop())) * b)),
left: (a.left + this.offset.relative.left * b + this.offset.parent.left * b - ($.browser.safari && $.browser.version < 526 && this.cssPosition == "fixed" ? 0 : (this.cssPosition == "fixed" ? -this.scrollParent.scrollLeft() : scrollIsRootNode ? 0 : scroll.scrollLeft()) * b))
}
},
_generatePosition: function (c) {
var o = this.options,
scroll = this.cssPosition == "absolute" && !(this.scrollParent[0] != document && $.ui.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent : this.scrollParent,
scrollIsRootNode = (/(html|body)/i).test(scroll[0].tagName);
var d = c.pageX;
var e = c.pageY;
if (this.originalPosition) {
if (this.containment) {
if (c.pageX - this.offset.click.left < this.containment[0]) {
d = this.containment[0] + this.offset.click.left
}
if (c.pageY - this.offset.click.top < this.containment[1]) {
e = this.containment[1] + this.offset.click.top
}
if (c.pageX - this.offset.click.left > this.containment[2]) {
d = this.containment[2] + this.offset.click.left
}
if (c.pageY - this.offset.click.top > this.containment[3]) {
e = this.containment[3] + this.offset.click.top
}
}
if (o.grid) {
var a = this.originalPageY + Math.round((e - this.originalPageY) / o.grid[1]) * o.grid[1];
e = this.containment ? (!(a - this.offset.click.top < this.containment[1] || a - this.offset.click.top > this.containment[3]) ? a : (!(a - this.offset.click.top < this.containment[1]) ? a - o.grid[1] : a + o.grid[1])) : a;
var b = this.originalPageX + Math.round((d - this.originalPageX) / o.grid[0]) * o.grid[0];
d = this.containment ? (!(b - this.offset.click.left < this.containment[0] || b - this.offset.click.left > this.containment[2]) ? b : (!(b - this.offset.click.left < this.containment[0]) ? b - o.grid[0] : b + o.grid[0])) : b
}
}
return {
top: (e - this.offset.click.top - this.offset.relative.top - this.offset.parent.top + ($.browser.safari && $.browser.version < 526 && this.cssPosition == "fixed" ? 0 : (this.cssPosition == "fixed" ? -this.scrollParent.scrollTop() : (scrollIsRootNode ? 0 : scroll.scrollTop())))),
left: (d - this.offset.click.left - this.offset.relative.left - this.offset.parent.left + ($.browser.safari && $.browser.version < 526 && this.cssPosition == "fixed" ? 0 : (this.cssPosition == "fixed" ? -this.scrollParent.scrollLeft() : scrollIsRootNode ? 0 : scroll.scrollLeft())))
}
},
_clear: function () {
this.helper.removeClass("ui-draggable-dragging");
if (this.helper[0] != this.element[0] && !this.cancelHelperRemoval) {
this.helper.remove()
}
this.helper = null;
this.cancelHelperRemoval = false
},
_trigger: function (c, b, a) {
a = a || this._uiHash();
$.ui.plugin.call(this, c, [b, a]);
if (c == "drag") {
this.positionAbs = this._convertPositionTo("absolute")
}
return $.Widget.prototype._trigger.call(this, c, b, a)
},
plugins: {},
_uiHash: function (a) {
return {
helper: this.helper,
position: this.position,
originalPosition: this.originalPosition,
offset: this.positionAbs
}
}
});
$.extend($.ui.draggable, {
version: "1.8.11"
});
$.ui.plugin.add("draggable", "connectToSortable", {
start: function (d, b) {
var c = $(this).data("draggable"),
o = c.options,
uiSortable = $.extend({}, b, {
item: c.element
});
c.sortables = [];
$(o.connectToSortable).each(function () {
var a = $.data(this, "sortable");
if (a && !a.options.disabled) {
c.sortables.push({
instance: a,
shouldRevert: a.options.revert
});
a.refreshPositions();
a._trigger("activate", d, uiSortable)
}
})
},
stop: function (a, c) {
var b = $(this).data("draggable"),
uiSortable = $.extend({}, c, {
item: b.element
});
$.each(b.sortables, function () {
if (this.instance.isOver) {
this.instance.isOver = 0;
b.cancelHelperRemoval = true;
this.instance.cancelHelperRemoval = false;
if (this.shouldRevert) {
this.instance.options.revert = true
}
this.instance._mouseStop(a);
this.instance.options.helper = this.instance.options._helper;
if (b.options.helper == "original") {
this.instance.currentItem.css({
top: "auto",
left: "auto"
})
}
} else {
this.instance.cancelHelperRemoval = false;
this.instance._trigger("deactivate", a, uiSortable)
}
})
},
drag: function (h, e) {
var f = $(this).data("draggable"),
self = this;
var g = function (o) {
var a = this.offset.click.top,
dxClick = this.offset.click.left;
var d = this.positionAbs.top,
helperLeft = this.positionAbs.left;
var b = o.height,
itemWidth = o.width;
var c = o.top,
itemLeft = o.left;
return $.ui.isOver(d + a, helperLeft + dxClick, c, itemLeft, b, itemWidth)
};
$.each(f.sortables, function (i) {
this.instance.positionAbs = f.positionAbs;
this.instance.helperProportions = f.helperProportions;
this.instance.offset.click = f.offset.click;
if (this.instance._intersectsWith(this.instance.containerCache)) {
if (!this.instance.isOver) {
this.instance.isOver = 1;
this.instance.currentItem = $(self).clone().appendTo(this.instance.element).data("sortable-item", true);
this.instance.options._helper = this.instance.options.helper;
this.instance.options.helper = function () {
return e.helper[0]
};
h.target = this.instance.currentItem[0];
this.instance._mouseCapture(h, true);
this.instance._mouseStart(h, true, true);
this.instance.offset.click.top = f.offset.click.top;
this.instance.offset.click.left = f.offset.click.left;
this.instance.offset.parent.left -= f.offset.parent.left - this.instance.offset.parent.left;
this.instance.offset.parent.top -= f.offset.parent.top - this.instance.offset.parent.top;
f._trigger("toSortable", h);
f.dropped = this.instance.element;
f.currentItem = f.element;
this.instance.fromOutside = f
}
if (this.instance.currentItem) {
this.instance._mouseDrag(h)
}
} else {
if (this.instance.isOver) {
this.instance.isOver = 0;
this.instance.cancelHelperRemoval = true;
this.instance.options.revert = false;
this.instance._trigger("out", h, this.instance._uiHash(this.instance));
this.instance._mouseStop(h, true);
this.instance.options.helper = this.instance.options._helper;
this.instance.currentItem.remove();
if (this.instance.placeholder) {
this.instance.placeholder.remove()
}
f._trigger("fromSortable", h);
f.dropped = false
}
}
})
}
});
$.ui.plugin.add("draggable", "cursor", {
start: function (a, b) {
var t = $("body"),
o = $(this).data("draggable").options;
if (t.css("cursor")) {
o._cursor = t.css("cursor")
}
t.css("cursor", o.cursor)
},
stop: function (a, b) {
var o = $(this).data("draggable").options;
if (o._cursor) {
$("body").css("cursor", o._cursor)
}
}
});
$.ui.plugin.add("draggable", "iframeFix", {
start: function (a, b) {
var o = $(this).data("draggable").options;
$(o.iframeFix === true ? "iframe" : o.iframeFix).each(function () {
$('<div class="ui-draggable-iframeFix" style="background: #fff;"></div>').css({
width: this.offsetWidth + "px",
height: this.offsetHeight + "px",
position: "absolute",
opacity: "0.001",
zIndex: 1000
}).css($(this).offset()).appendTo("body")
})
},
stop: function (a, b) {
$("div.ui-draggable-iframeFix").each(function () {
this.parentNode.removeChild(this)
})
}
});
$.ui.plugin.add("draggable", "opacity", {
start: function (a, b) {
var t = $(b.helper),
o = $(this).data("draggable").options;
if (t.css("opacity")) {
o._opacity = t.css("opacity")
}
t.css("opacity", o.opacity)
},
stop: function (a, b) {
var o = $(this).data("draggable").options;
if (o._opacity) {
$(b.helper).css("opacity", o._opacity)
}
}
});
$.ui.plugin.add("draggable", "scroll", {
start: function (a, b) {
var i = $(this).data("draggable");
if (i.scrollParent[0] != document && i.scrollParent[0].tagName != "HTML") {
i.overflowOffset = i.scrollParent.offset()
}
},
drag: function (a, b) {
var i = $(this).data("draggable"),
o = i.options,
scrolled = false;
if (i.scrollParent[0] != document && i.scrollParent[0].tagName != "HTML") {
if (!o.axis || o.axis != "x") {
if ((i.overflowOffset.top + i.scrollParent[0].offsetHeight) - a.pageY < o.scrollSensitivity) {
i.scrollParent[0].scrollTop = scrolled = i.scrollParent[0].scrollTop + o.scrollSpeed
} else {
if (a.pageY - i.overflowOffset.top < o.scrollSensitivity) {
i.scrollParent[0].scrollTop = scrolled = i.scrollParent[0].scrollTop - o.scrollSpeed
}
}
}
if (!o.axis || o.axis != "y") {
if ((i.overflowOffset.left + i.scrollParent[0].offsetWidth) - a.pageX < o.scrollSensitivity) {
i.scrollParent[0].scrollLeft = scrolled = i.scrollParent[0].scrollLeft + o.scrollSpeed
} else {
if (a.pageX - i.overflowOffset.left < o.scrollSensitivity) {
i.scrollParent[0].scrollLeft = scrolled = i.scrollParent[0].scrollLeft - o.scrollSpeed
}
}
}
} else {
if (!o.axis || o.axis != "x") {
if (a.pageY - $(document).scrollTop() < o.scrollSensitivity) {
scrolled = $(document).scrollTop($(document).scrollTop() - o.scrollSpeed)
} else {
if ($(window).height() - (a.pageY - $(document).scrollTop()) < o.scrollSensitivity) {
scrolled = $(document).scrollTop($(document).scrollTop() + o.scrollSpeed)
}
}
}
if (!o.axis || o.axis != "y") {
if (a.pageX - $(document).scrollLeft() < o.scrollSensitivity) {
scrolled = $(document).scrollLeft($(document).scrollLeft() - o.scrollSpeed)
} else {
if ($(window).width() - (a.pageX - $(document).scrollLeft()) < o.scrollSensitivity) {
scrolled = $(document).scrollLeft($(document).scrollLeft() + o.scrollSpeed)
}
}
}
} if (scrolled !== false && $.ui.ddmanager && !o.dropBehaviour) {
$.ui.ddmanager.prepareOffsets(i, a)
}
}
});
$.ui.plugin.add("draggable", "snap", {
start: function (d, c) {
var i = $(this).data("draggable"),
o = i.options;
i.snapElements = [];
$(o.snap.constructor != String ? (o.snap.items || ":data(draggable)") : o.snap).each(function () {
var a = $(this);
var b = a.offset();
if (this != i.element[0]) {
i.snapElements.push({
item: this,
width: a.outerWidth(),
height: a.outerHeight(),
top: b.top,
left: b.left
})
}
})
},
drag: function (m, c) {
var f = $(this).data("draggable"),
o = f.options;
var d = o.snapTolerance;
var k = c.offset.left,
x2 = k + f.helperProportions.width,
y1 = c.offset.top,
y2 = y1 + f.helperProportions.height;
for (var i = f.snapElements.length - 1; i >= 0; i--) {
var l = f.snapElements[i].left,
r = l + f.snapElements[i].width,
t = f.snapElements[i].top,
b = t + f.snapElements[i].height;
if (!((l - d < k && k < r + d && t - d < y1 && y1 < b + d) || (l - d < k && k < r + d && t - d < y2 && y2 < b + d) || (l - d < x2 && x2 < r + d && t - d < y1 && y1 < b + d) || (l - d < x2 && x2 < r + d && t - d < y2 && y2 < b + d))) {
if (f.snapElements[i].snapping) {
(f.options.snap.release && f.options.snap.release.call(f.element, m, $.extend(f._uiHash(), {
snapItem: f.snapElements[i].item
})))
}
f.snapElements[i].snapping = false;
continue
}
if (o.snapMode != "inner") {
var e = Math.abs(t - y2) <= d;
var a = Math.abs(b - y1) <= d;
var h = Math.abs(l - x2) <= d;
var j = Math.abs(r - k) <= d;
if (e) {
c.position.top = f._convertPositionTo("relative", {
top: t - f.helperProportions.height,
left: 0
}).top - f.margins.top
}
if (a) {
c.position.top = f._convertPositionTo("relative", {
top: b,
left: 0
}).top - f.margins.top
}
if (h) {
c.position.left = f._convertPositionTo("relative", {
top: 0,
left: l - f.helperProportions.width
}).left - f.margins.left
}
if (j) {
c.position.left = f._convertPositionTo("relative", {
top: 0,
left: r
}).left - f.margins.left
}
}
var g = (e || a || h || j);
if (o.snapMode != "outer") {
var e = Math.abs(t - y1) <= d;
var a = Math.abs(b - y2) <= d;
var h = Math.abs(l - k) <= d;
var j = Math.abs(r - x2) <= d;
if (e) {
c.position.top = f._convertPositionTo("relative", {
top: t,
left: 0
}).top - f.margins.top
}
if (a) {
c.position.top = f._convertPositionTo("relative", {
top: b - f.helperProportions.height,
left: 0
}).top - f.margins.top
}
if (h) {
c.position.left = f._convertPositionTo("relative", {
top: 0,
left: l
}).left - f.margins.left
}
if (j) {
c.position.left = f._convertPositionTo("relative", {
top: 0,
left: r - f.helperProportions.width
}).left - f.margins.left
}
}
if (!f.snapElements[i].snapping && (e || a || h || j || g)) {
(f.options.snap.snap && f.options.snap.snap.call(f.element, m, $.extend(f._uiHash(), {
snapItem: f.snapElements[i].item
})))
}
f.snapElements[i].snapping = (e || a || h || j || g)
}
}
});
$.ui.plugin.add("draggable", "stack", {
start: function (e, d) {
var o = $(this).data("draggable").options;
var c = $.makeArray($(o.stack)).sort(function (a, b) {
return (parseInt($(a).css("zIndex"), 10) || 0) - (parseInt($(b).css("zIndex"), 10) || 0)
});
if (!c.length) {
return
}
var f = parseInt(c[0].style.zIndex) || 0;
$(c).each(function (i) {
this.style.zIndex = f + i
});
this[0].style.zIndex = f + c.length
}
});
$.ui.plugin.add("draggable", "zIndex", {
start: function (a, b) {
var t = $(b.helper),
o = $(this).data("draggable").options;
if (t.css("zIndex")) {
o._zIndex = t.css("zIndex")
}
t.css("zIndex", o.zIndex)
},
stop: function (a, b) {
var o = $(this).data("draggable").options;
if (o._zIndex) {
$(b.helper).css("zIndex", o._zIndex)
}
}
})
})(jQCT);
(function ($, m) {
$.widget("ui.resizable", $.ui.mouse, {
widgetEventPrefix: "resize",
options: {
alsoResize: false,
animate: false,
animateDuration: "slow",
animateEasing: "swing",
aspectRatio: false,
autoHide: false,
containment: false,
ghost: false,
grid: false,
handles: "e,s,se",
helper: false,
maxHeight: null,
maxWidth: null,
minHeight: 10,
minWidth: 10,
zIndex: 1000
},
_create: function () {
var d = this,
o = this.options;
this.element.addClass("ui-resizable");
$.extend(this, {
_aspectRatio: !! (o.aspectRatio),
aspectRatio: o.aspectRatio,
originalElement: this.element,
_proportionallyResizeElements: [],
_helper: o.helper || o.ghost || o.animate ? o.helper || "ui-resizable-helper" : null
});
if (this.element[0].nodeName.match(/canvas|textarea|input|select|button|img/i)) {
if (/relative/.test(this.element.css("position")) && $.browser.opera) {
this.element.css({
position: "relative",
top: "auto",
left: "auto"
})
}
this.element.wrap($('<div class="ui-wrapper" style="overflow: hidden;"></div>').css({
position: this.element.css("position"),
width: this.element.outerWidth(),
height: this.element.outerHeight(),
top: this.element.css("top"),
left: this.element.css("left")
}));
this.element = this.element.parent().data("resizable", this.element.data("resizable"));
this.elementIsWrapper = true;
this.element.css({
marginLeft: this.originalElement.css("marginLeft"),
marginTop: this.originalElement.css("marginTop"),
marginRight: this.originalElement.css("marginRight"),
marginBottom: this.originalElement.css("marginBottom")
});
this.originalElement.css({
marginLeft: 0,
marginTop: 0,
marginRight: 0,
marginBottom: 0
});
this.originalResizeStyle = this.originalElement.css("resize");
this.originalElement.css("resize", "none");
this._proportionallyResizeElements.push(this.originalElement.css({
position: "static",
zoom: 1,
display: "block"
}));
this.originalElement.css({
margin: this.originalElement.css("margin")
});
this._proportionallyResize()
}
this.handles = o.handles || (!$(".ui-resizable-handle", this.element).length ? "e,s,se" : {
n: ".ui-resizable-n",
e: ".ui-resizable-e",
s: ".ui-resizable-s",
w: ".ui-resizable-w",
se: ".ui-resizable-se",
sw: ".ui-resizable-sw",
ne: ".ui-resizable-ne",
nw: ".ui-resizable-nw"
});
if (this.handles.constructor == String) {
if (this.handles == "all") {
this.handles = "n,e,s,w,se,sw,ne,nw"
}
var n = this.handles.split(",");
this.handles = {};
for (var i = 0; i < n.length; i++) {
var e = $.trim(n[i]),
hname = "ui-resizable-" + e;
var f = $('<div class="ui-resizable-handle ' + hname + '"></div>');
if (/sw|se|ne|nw/.test(e)) {
f.css({
zIndex: ++o.zIndex
})
}
if ("se" == e) {
f.addClass("ui-icon ui-icon-gripsmall-diagonal-se")
}
this.handles[e] = ".ui-resizable-" + e;
this.element.append(f)
}
}
this._renderAxis = function (a) {
a = a || this.element;
for (var i in this.handles) {
if (this.handles[i].constructor == String) {
this.handles[i] = $(this.handles[i], this.element).show()
}
if (this.elementIsWrapper && this.originalElement[0].nodeName.match(/textarea|input|select|button/i)) {
var b = $(this.handles[i], this.element),
padWrapper = 0;
padWrapper = /sw|ne|nw|se|n|s/.test(i) ? b.outerHeight() : b.outerWidth();
var c = ["padding", /ne|nw|n/.test(i) ? "Top" : /se|sw|s/.test(i) ? "Bottom" : /^e$/.test(i) ? "Right" : "Left"].join("");
a.css(c, padWrapper);
this._proportionallyResize()
}
if (!$(this.handles[i]).length) {
continue
}
}
};
this._renderAxis(this.element);
this._handles = $(".ui-resizable-handle", this.element).disableSelection();
this._handles.mouseover(function () {
if (!d.resizing) {
if (this.className) {
var a = this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)
}
d.axis = a && a[1] ? a[1] : "se"
}
});
if (o.autoHide) {
this._handles.hide();
$(this.element).addClass("ui-resizable-autohide").hover(function () {
$(this).removeClass("ui-resizable-autohide");
d._handles.show()
}, function () {
if (!d.resizing) {
$(this).addClass("ui-resizable-autohide");
d._handles.hide()
}
})
}
this._mouseInit()
},
destroy: function () {
this._mouseDestroy();
var b = function (a) {
$(a).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").unbind(".resizable").find(".ui-resizable-handle").remove()
};
if (this.elementIsWrapper) {
b(this.element);
var c = this.element;
c.after(this.originalElement.css({
position: c.css("position"),
width: c.outerWidth(),
height: c.outerHeight(),
top: c.css("top"),
left: c.css("left")
})).remove()
}
this.originalElement.css("resize", this.originalResizeStyle);
b(this.originalElement);
return this
},
_mouseCapture: function (a) {
var b = false;
for (var i in this.handles) {
if ($(this.handles[i])[0] == a.target) {
b = true
}
}
return !this.options.disabled && b
},
_mouseStart: function (c) {
var o = this.options,
iniPos = this.element.position(),
el = this.element;
this.resizing = true;
this.documentScroll = {
top: $(document).scrollTop(),
left: $(document).scrollLeft()
};
if (el.is(".ui-draggable") || (/absolute/).test(el.css("position"))) {
el.css({
position: "absolute",
top: iniPos.top,
left: iniPos.left
})
}
if ($.browser.opera && (/relative/).test(el.css("position"))) {
el.css({
position: "relative",
top: "auto",
left: "auto"
})
}
this._renderProxy();
var a = l(this.helper.css("left")),
curtop = l(this.helper.css("top"));
if (o.containment) {
a += $(o.containment).scrollLeft() || 0;
curtop += $(o.containment).scrollTop() || 0
}
this.offset = this.helper.offset();
this.position = {
left: a,
top: curtop
};
this.size = this._helper ? {
width: el.outerWidth(),
height: el.outerHeight()
} : {
width: el.width(),
height: el.height()
};
this.originalSize = this._helper ? {
width: el.outerWidth(),
height: el.outerHeight()
} : {
width: el.width(),
height: el.height()
};
this.originalPosition = {
left: a,
top: curtop
};
this.sizeDiff = {
width: el.outerWidth() - el.width(),
height: el.outerHeight() - el.height()
};
this.originalMousePosition = {
left: c.pageX,
top: c.pageY
};
this.aspectRatio = (typeof o.aspectRatio == "number") ? o.aspectRatio : ((this.originalSize.width / this.originalSize.height) || 1);
var b = $(".ui-resizable-" + this.axis).css("cursor");
$("body").css("cursor", b == "auto" ? this.axis + "-resize" : b);
el.addClass("ui-resizable-resizing");
this._propagate("start", c);
return true
},
_mouseDrag: function (c) {
var d = this.helper,
o = this.options,
props = {}, self = this,
smp = this.originalMousePosition,
a = this.axis;
var f = (c.pageX - smp.left) || 0,
dy = (c.pageY - smp.top) || 0;
var e = this._change[a];
if (!e) {
return false
}
var b = e.apply(this, [c, f, dy]),
ie6 = $.browser.msie && $.browser.version < 7,
csdif = this.sizeDiff;
if (this._aspectRatio || c.shiftKey) {
b = this._updateRatio(b, c)
}
b = this._respectSize(b, c);
this._propagate("resize", c);
d.css({
top: this.position.top + "px",
left: this.position.left + "px",
width: this.size.width + "px",
height: this.size.height + "px"
});
if (!this._helper && this._proportionallyResizeElements.length) {
this._proportionallyResize()
}
this._updateCache(b);
this._trigger("resize", c, this.ui());
return false
},
_mouseStop: function (b) {
this.resizing = false;
var o = this.options,
self = this;
if (this._helper) {
var a = this._proportionallyResizeElements,
ista = a.length && (/textarea/i).test(a[0].nodeName),
soffseth = ista && $.ui.hasScroll(a[0], "left") ? 0 : self.sizeDiff.height,
soffsetw = ista ? 0 : self.sizeDiff.width;
var s = {
width: (self.helper.width() - soffsetw),
height: (self.helper.height() - soffseth)
}, left = (parseInt(self.element.css("left"), 10) + (self.position.left - self.originalPosition.left)) || null,
top = (parseInt(self.element.css("top"), 10) + (self.position.top - self.originalPosition.top)) || null;
if (!o.animate) {
this.element.css($.extend(s, {
top: top,
left: left
}))
}
self.helper.height(self.size.height);
self.helper.width(self.size.width);
if (this._helper && !o.animate) {
this._proportionallyResize()
}
}
$("body").css("cursor", "auto");
this.element.removeClass("ui-resizable-resizing");
this._propagate("stop", b);
if (this._helper) {
this.helper.remove()
}
return false
},
_updateCache: function (a) {
var o = this.options;
this.offset = this.helper.offset();
if (k(a.left)) {
this.position.left = a.left
}
if (k(a.top)) {
this.position.top = a.top
}
if (k(a.height)) {
this.size.height = a.height
}
if (k(a.width)) {
this.size.width = a.width
}
},
_updateRatio: function (b, c) {
var o = this.options,
cpos = this.position,
csize = this.size,
a = this.axis;
if (b.height) {
b.width = (csize.height * this.aspectRatio)
} else {
if (b.width) {
b.height = (csize.width / this.aspectRatio)
}
} if (a == "sw") {
b.left = cpos.left + (csize.width - b.width);
b.top = null
}
if (a == "nw") {
b.top = cpos.top + (csize.height - b.height);
b.left = cpos.left + (csize.width - b.width)
}
return b
},
_respectSize: function (c, d) {
var e = this.helper,
o = this.options,
pRatio = this._aspectRatio || d.shiftKey,
a = this.axis,
ismaxw = k(c.width) && o.maxWidth && (o.maxWidth < c.width),
ismaxh = k(c.height) && o.maxHeight && (o.maxHeight < c.height),
isminw = k(c.width) && o.minWidth && (o.minWidth > c.width),
isminh = k(c.height) && o.minHeight && (o.minHeight > c.height);
if (isminw) {
c.width = o.minWidth
}
if (isminh) {
c.height = o.minHeight
}
if (ismaxw) {
c.width = o.maxWidth
}
if (ismaxh) {
c.height = o.maxHeight
}
var f = this.originalPosition.left + this.originalSize.width,
dh = this.position.top + this.size.height;
var g = /sw|nw|w/.test(a),
ch = /nw|ne|n/.test(a);
if (isminw && g) {
c.left = f - o.minWidth
}
if (ismaxw && g) {
c.left = f - o.maxWidth
}
if (isminh && ch) {
c.top = dh - o.minHeight
}
if (ismaxh && ch) {
c.top = dh - o.maxHeight
}
var b = !c.width && !c.height;
if (b && !c.left && c.top) {
c.top = null
} else {
if (b && !c.top && c.left) {
c.left = null
}
}
return c
},
_proportionallyResize: function () {
var o = this.options;
if (!this._proportionallyResizeElements.length) {
return
}
var d = this.helper || this.element;
for (var i = 0; i < this._proportionallyResizeElements.length; i++) {
var c = this._proportionallyResizeElements[i];
if (!this.borderDif) {
var b = [c.css("borderTopWidth"), c.css("borderRightWidth"), c.css("borderBottomWidth"), c.css("borderLeftWidth")],
p = [c.css("paddingTop"), c.css("paddingRight"), c.css("paddingBottom"), c.css("paddingLeft")];
this.borderDif = $.map(b, function (v, i) {
var a = parseInt(v, 10) || 0,
padding = parseInt(p[i], 10) || 0;
return a + padding
})
}
if ($.browser.msie && !(!($(d).is(":hidden") || $(d).parents(":hidden").length))) {
continue
}
c.css({
height: (d.height() - this.borderDif[0] - this.borderDif[2]) || 0,
width: (d.width() - this.borderDif[1] - this.borderDif[3]) || 0
})
}
},
_renderProxy: function () {
var b = this.element,
o = this.options;
this.elementOffset = b.offset();
if (this._helper) {
this.helper = this.helper || $('<div style="overflow:hidden;"></div>');
var a = $.browser.msie && $.browser.version < 7,
ie6offset = (a ? 1 : 0),
pxyoffset = (a ? 2 : -1);
this.helper.addClass(this._helper).css({
width: this.element.outerWidth() + pxyoffset,
height: this.element.outerHeight() + pxyoffset,
position: "absolute",
left: this.elementOffset.left - ie6offset + "px",
top: this.elementOffset.top - ie6offset + "px",
zIndex: ++o.zIndex
});
this.helper.appendTo("body").disableSelection()
} else {
this.helper = this.element
}
},
_change: {
e: function (a, b, c) {
return {
width: this.originalSize.width + b
}
},
w: function (a, b, c) {
var o = this.options,
cs = this.originalSize,
sp = this.originalPosition;
return {
left: sp.left + b,
width: cs.width - b
}
},
n: function (a, b, c) {
var o = this.options,
cs = this.originalSize,
sp = this.originalPosition;
return {
top: sp.top + c,
height: cs.height - c
}
},
s: function (a, b, c) {
return {
height: this.originalSize.height + c
}
},
se: function (a, b, c) {
return $.extend(this._change.s.apply(this, arguments), this._change.e.apply(this, [a, b, c]))
},
sw: function (a, b, c) {
return $.extend(this._change.s.apply(this, arguments), this._change.w.apply(this, [a, b, c]))
},
ne: function (a, b, c) {
return $.extend(this._change.n.apply(this, arguments), this._change.e.apply(this, [a, b, c]))
},
nw: function (a, b, c) {
return $.extend(this._change.n.apply(this, arguments), this._change.w.apply(this, [a, b, c]))
}
},
_propagate: function (n, a) {
$.ui.plugin.call(this, n, [a, this.ui()]);
(n != "resize" && this._trigger(n, a, this.ui()))
},
plugins: {},
ui: function () {
return {
originalElement: this.originalElement,
element: this.element,
helper: this.helper,
position: this.position,
size: this.size,
originalSize: this.originalSize,
originalPosition: this.originalPosition
}
}
});
$.extend($.ui.resizable, {
version: "1.8.11"
});
$.ui.plugin.add("resizable", "alsoResize", {
start: function (e, d) {
var f = $(this).data("resizable"),
o = f.options;
var c = function (b) {
$(b).each(function () {
var a = $(this);
a.data("resizable-alsoresize", {
width: parseInt(a.width(), 10),
height: parseInt(a.height(), 10),
left: parseInt(a.css("left"), 10),
top: parseInt(a.css("top"), 10),
position: a.css("position")
})
})
};
if (typeof (o.alsoResize) == "object" && !o.alsoResize.parentNode) {
if (o.alsoResize.length) {
o.alsoResize = o.alsoResize[0];
c(o.alsoResize)
} else {
$.each(o.alsoResize, function (a) {
c(a)
})
}
} else {
c(o.alsoResize)
}
},
resize: function (h, g) {
var j = $(this).data("resizable"),
o = j.options,
os = j.originalSize,
op = j.originalPosition;
var f = {
height: (j.size.height - os.height) || 0,
width: (j.size.width - os.width) || 0,
top: (j.position.top - op.top) || 0,
left: (j.position.left - op.left) || 0
}, _alsoResize = function (e, c) {
$(e).each(function () {
var d = $(this),
start = $(this).data("resizable-alsoresize"),
style = {}, css = c && c.length ? c : d.parents(g.originalElement[0]).length ? ["width", "height"] : ["width", "height", "top", "left"];
$.each(css, function (i, b) {
var a = (start[b] || 0) + (f[b] || 0);
if (a && a >= 0) {
style[b] = a || null
}
});
if ($.browser.opera && /relative/.test(d.css("position"))) {
j._revertToRelativePosition = true;
d.css({
position: "absolute",
top: "auto",
left: "auto"
})
}
d.css(style)
})
};
if (typeof (o.alsoResize) == "object" && !o.alsoResize.nodeType) {
$.each(o.alsoResize, function (a, c) {
_alsoResize(a, c)
})
} else {
_alsoResize(o.alsoResize)
}
},
stop: function (d, c) {
var e = $(this).data("resizable"),
o = e.options;
var f = function (b) {
$(b).each(function () {
var a = $(this);
a.css({
position: a.data("resizable-alsoresize").position
})
})
};
if (e._revertToRelativePosition) {
e._revertToRelativePosition = false;
if (typeof (o.alsoResize) == "object" && !o.alsoResize.nodeType) {
$.each(o.alsoResize, function (a) {
f(a)
})
} else {
f(o.alsoResize)
}
}
$(this).removeData("resizable-alsoresize")
}
});
$.ui.plugin.add("resizable", "animate", {
stop: function (d, c) {
var f = $(this).data("resizable"),
o = f.options;
var b = f._proportionallyResizeElements,
ista = b.length && (/textarea/i).test(b[0].nodeName),
soffseth = ista && $.ui.hasScroll(b[0], "left") ? 0 : f.sizeDiff.height,
soffsetw = ista ? 0 : f.sizeDiff.width;
var e = {
width: (f.size.width - soffsetw),
height: (f.size.height - soffseth)
}, left = (parseInt(f.element.css("left"), 10) + (f.position.left - f.originalPosition.left)) || null,
top = (parseInt(f.element.css("top"), 10) + (f.position.top - f.originalPosition.top)) || null;
f.element.animate($.extend(e, top && left ? {
top: top,
left: left
} : {}), {
duration: o.animateDuration,
easing: o.animateEasing,
step: function () {
var a = {
width: parseInt(f.element.css("width"), 10),
height: parseInt(f.element.css("height"), 10),
top: parseInt(f.element.css("top"), 10),
left: parseInt(f.element.css("left"), 10)
};
if (b && b.length) {
$(b[0]).css({
width: a.width,
height: a.height
})
}
f._updateCache(a);
f._propagate("resize", d)
}
})
}
});
$.ui.plugin.add("resizable", "containment", {
start: function (d, c) {
var f = $(this).data("resizable"),
o = f.options,
el = f.element;
var g = o.containment,
ce = (g instanceof $) ? g.get(0) : (/parent/.test(g)) ? el.parent().get(0) : g;
if (!ce) {
return
}
f.containerElement = $(ce);
if (/document/.test(g) || g == document) {
f.containerOffset = {
left: 0,
top: 0
};
f.containerPosition = {
left: 0,
top: 0
};
f.parentData = {
element: $(document),
left: 0,
top: 0,
width: $(document).width(),
height: $(document).height() || document.body.parentNode.scrollHeight
}
} else {
var e = $(ce),
p = [];
$(["Top", "Right", "Left", "Bottom"]).each(function (i, a) {
p[i] = l(e.css("padding" + a))
});
f.containerOffset = e.offset();
f.containerPosition = e.position();
f.containerSize = {
height: (e.innerHeight() - p[3]),
width: (e.innerWidth() - p[1])
};
var b = f.containerOffset,
ch = f.containerSize.height,
cw = f.containerSize.width,
width = ($.ui.hasScroll(ce, "left") ? ce.scrollWidth : cw),
height = ($.ui.hasScroll(ce) ? ce.scrollHeight : ch);
f.parentData = {
element: ce,
left: b.left,
top: b.top,
width: width,
height: height
}
}
},
resize: function (b, a) {
var d = $(this).data("resizable"),
o = d.options,
ps = d.containerSize,
co = d.containerOffset,
cs = d.size,
cp = d.position,
pRatio = d._aspectRatio || b.shiftKey,
cop = {
top: 0,
left: 0
}, ce = d.containerElement;
if (ce[0] != document && (/static/).test(ce.css("position"))) {
cop = co
}
if (cp.left < (d._helper ? co.left : 0)) {
d.size.width = d.size.width + (d._helper ? (d.position.left - co.left) : (d.position.left - cop.left));
if (pRatio) {
d.size.height = d.size.width / o.aspectRatio
}
d.position.left = o.helper ? co.left : 0
}
if (cp.top < (d._helper ? co.top : 0)) {
d.size.height = d.size.height + (d._helper ? (d.position.top - co.top) : d.position.top);
if (pRatio) {
d.size.width = d.size.height * o.aspectRatio
}
d.position.top = d._helper ? co.top : 0
}
d.offset.left = d.parentData.left + d.position.left;
d.offset.top = d.parentData.top + d.position.top;
var c = Math.abs((d._helper ? d.offset.left - cop.left : (d.offset.left - cop.left)) + d.sizeDiff.width),
hoset = Math.abs((d._helper ? d.offset.top - cop.top : (d.offset.top - co.top)) + d.sizeDiff.height);
var e = d.containerElement.get(0) == d.element.parent().get(0),
isOffsetRelative = /relative|absolute/.test(d.containerElement.css("position"));
if (e && isOffsetRelative) {
c -= d.parentData.left
}
if (c + d.size.width >= d.parentData.width) {
d.size.width = d.parentData.width - c;
if (pRatio) {
d.size.height = d.size.width / d.aspectRatio
}
}
if (hoset + d.size.height >= d.parentData.height) {
d.size.height = d.parentData.height - hoset;
if (pRatio) {
d.size.width = d.size.height * d.aspectRatio
}
}
},
stop: function (b, a) {
var d = $(this).data("resizable"),
o = d.options,
cp = d.position,
co = d.containerOffset,
cop = d.containerPosition,
ce = d.containerElement;
var c = $(d.helper),
ho = c.offset(),
w = c.outerWidth() - d.sizeDiff.width,
h = c.outerHeight() - d.sizeDiff.height;
if (d._helper && !o.animate && (/relative/).test(ce.css("position"))) {
$(this).css({
left: ho.left - cop.left - co.left,
width: w,
height: h
})
}
if (d._helper && !o.animate && (/static/).test(ce.css("position"))) {
$(this).css({
left: ho.left - cop.left - co.left,
width: w,
height: h
})
}
}
});
$.ui.plugin.add("resizable", "ghost", {
start: function (a, c) {
var b = $(this).data("resizable"),
o = b.options,
cs = b.size;
b.ghost = b.originalElement.clone();
b.ghost.css({
opacity: 0.25,
display: "block",
position: "relative",
height: cs.height,
width: cs.width,
margin: 0,
left: 0,
top: 0
}).addClass("ui-resizable-ghost").addClass(typeof o.ghost == "string" ? o.ghost : "");
b.ghost.appendTo(b.helper)
},
resize: function (a, c) {
var b = $(this).data("resizable"),
o = b.options;
if (b.ghost) {
b.ghost.css({
position: "relative",
height: b.size.height,
width: b.size.width
})
}
},
stop: function (a, c) {
var b = $(this).data("resizable"),
o = b.options;
if (b.ghost && b.helper) {
b.helper.get(0).removeChild(b.ghost.get(0))
}
}
});
$.ui.plugin.add("resizable", "grid", {
resize: function (c, b) {
var d = $(this).data("resizable"),
o = d.options,
cs = d.size,
os = d.originalSize,
op = d.originalPosition,
a = d.axis,
ratio = o._aspectRatio || c.shiftKey;
o.grid = typeof o.grid == "number" ? [o.grid, o.grid] : o.grid;
var e = Math.round((cs.width - os.width) / (o.grid[0] || 1)) * (o.grid[0] || 1),
oy = Math.round((cs.height - os.height) / (o.grid[1] || 1)) * (o.grid[1] || 1);
if (/^(se|s|e)$/.test(a)) {
d.size.width = os.width + e;
d.size.height = os.height + oy
} else {
if (/^(ne)$/.test(a)) {
d.size.width = os.width + e;
d.size.height = os.height + oy;
d.position.top = op.top - oy
} else {
if (/^(sw)$/.test(a)) {
d.size.width = os.width + e;
d.size.height = os.height + oy;
d.position.left = op.left - e
} else {
d.size.width = os.width + e;
d.size.height = os.height + oy;
d.position.top = op.top - oy;
d.position.left = op.left - e
}
}
}
}
});
var l = function (v) {
return parseInt(v, 10) || 0
};
var k = function (a) {
return !isNaN(parseInt(a, 10))
}
})(jQCT);
(function ($, f) {
var g = "ui-dialog ui-widget ui-widget-content ui-corner-all ",
sizeRelatedOptions = {
buttons: true,
height: true,
maxHeight: true,
maxWidth: true,
minHeight: true,
minWidth: true,
width: true
}, resizableRelatedOptions = {
maxHeight: true,
maxWidth: true,
minHeight: true,
minWidth: true
};
$.widget("ui.dialog", {
options: {
autoOpen: true,
buttons: {},
closeOnEscape: true,
closeText: "close",
dialogClass: "",
draggable: true,
hide: null,
height: "auto",
maxHeight: false,
maxWidth: false,
minHeight: 150,
minWidth: 150,
modal: false,
position: {
my: "center",
at: "center",
collision: "fit",
using: function (b) {
var a = $(this).css(b).offset().top;
if (a < 0) {
$(this).css("top", b.top - a)
}
}
},
resizable: true,
show: null,
stack: true,
title: "",
width: 300,
zIndex: 1000
},
_create: function () {
this.originalTitle = this.element.attr("title");
if (typeof this.originalTitle !== "string") {
this.originalTitle = ""
}
this.options.title = this.options.title || this.originalTitle;
var b = this,
options = b.options,
title = options.title || "&#160;",
titleId = $.ui.dialog.getTitleId(b.element),
uiDialog = (b.uiDialog = $("<div></div>")).appendTo(document.body).hide().addClass(g + options.dialogClass).css({
zIndex: options.zIndex
}).attr("tabIndex", -1).css("outline", 0).keydown(function (a) {
if (options.closeOnEscape && a.keyCode && a.keyCode === $.ui.keyCode.ESCAPE) {
b.close(a);
a.preventDefault()
}
}).attr({
role: "dialog",
"aria-labelledby": titleId
}).mousedown(function (a) {
b.moveToTop(false, a)
}),
uiDialogContent = b.element.show().removeAttr("title").addClass("ui-dialog-content ui-widget-content").appendTo(uiDialog),
uiDialogTitlebar = (b.uiDialogTitlebar = $("<div></div>")).addClass("ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix ct-ui-header-primary").prependTo(uiDialog),
uiDialogTitlebarClose = $('<a href="#"></a>').addClass("ui-dialog-titlebar-close ui-corner-all").attr("role", "button").hover(function () {
uiDialogTitlebarClose.addClass("ui-state-hover")
}, function () {
uiDialogTitlebarClose.removeClass("ui-state-hover")
}).focus(function () {
uiDialogTitlebarClose.addClass("ui-state-focus")
}).blur(function () {
uiDialogTitlebarClose.removeClass("ui-state-focus")
}).click(function (a) {
b.close(a);
return false
}).appendTo(uiDialogTitlebar),
uiDialogTitlebarCloseText = (b.uiDialogTitlebarCloseText = $("<span></span>")).addClass("ct-ui-icons ico-close").appendTo(uiDialogTitlebarClose),
uiDialogTitle = $("<span></span>").addClass("ui-dialog-title").attr("id", titleId).html(title).prependTo(uiDialogTitlebar);
if ($.isFunction(options.beforeclose) && !$.isFunction(options.beforeClose)) {
options.beforeClose = options.beforeclose
}
uiDialogTitlebar.find("*").add(uiDialogTitlebar).disableSelection();
if (options.draggable && $.fn.draggable) {
b._makeDraggable()
}
if (options.resizable && $.fn.resizable) {
b._makeResizable()
}
b._createButtons(options.buttons);
b._isOpen = false;
if ($.fn.bgiframe) {
uiDialog.bgiframe()
}
},
_init: function () {
if (this.options.autoOpen) {
this.open()
}
},
destroy: function () {
var a = this;
if (a.overlay) {
a.overlay.destroy()
}
a.uiDialog.hide();
a.element.unbind(".dialog").removeData("dialog").removeClass("ui-dialog-content ui-widget-content").hide().appendTo("body");
a.uiDialog.remove();
if (a.originalTitle) {
a.element.attr("title", a.originalTitle)
}
return a
},
widget: function () {
return this.uiDialog
},
close: function (a) {
var b = this,
maxZ, thisZ;
if (false === b._trigger("beforeClose", a)) {
return
}
if (b.overlay) {
b.overlay.destroy()
}
b.uiDialog.unbind("keypress.ui-dialog");
b._isOpen = false;
if (b.options.hide) {
b.uiDialog.hide(b.options.hide, function () {
b._trigger("close", a)
})
} else {
b.uiDialog.hide();
b._trigger("close", a)
}
$.ui.dialog.overlay.resize();
if (b.options.modal) {
maxZ = 0;
$(".ui-dialog").each(function () {
if (this !== b.uiDialog[0]) {
thisZ = $(this).css("z-index");
if (!isNaN(thisZ)) {
maxZ = Math.max(maxZ, thisZ)
}
}
});
$.ui.dialog.maxZ = maxZ
}
return b
},
isOpen: function () {
return this._isOpen
},
moveToTop: function (c, a) {
var b = this,
options = b.options,
saveScroll;
if ((options.modal && !c) || (!options.stack && !options.modal)) {
return b._trigger("focus", a)
}
if (options.zIndex > $.ui.dialog.maxZ) {
$.ui.dialog.maxZ = options.zIndex
}
if (b.overlay) {
$.ui.dialog.maxZ += 1;
b.overlay.$el.css("z-index", $.ui.dialog.overlay.maxZ = $.ui.dialog.maxZ)
}
saveScroll = {
scrollTop: b.element.attr("scrollTop"),
scrollLeft: b.element.attr("scrollLeft")
};
$.ui.dialog.maxZ += 1;
b.uiDialog.css("z-index", $.ui.dialog.maxZ);
b.element.attr(saveScroll);
b._trigger("focus", a);
return b
},
open: function () {
if (this._isOpen) {
return
}
var c = this,
options = c.options,
uiDialog = c.uiDialog;
c.overlay = options.modal ? new $.ui.dialog.overlay(c) : null;
c._size();
c._position(options.position);
uiDialog.show(options.show);
c.moveToTop(true);
if (options.modal) {
uiDialog.bind("keypress.ui-dialog", function (a) {
if (a.keyCode !== $.ui.keyCode.TAB) {
return
}
var b = $(":tabbable", this),
first = b.filter(":first"),
last = b.filter(":last");
if (a.target === last[0] && !a.shiftKey) {
first.focus(1);
return false
} else {
if (a.target === first[0] && a.shiftKey) {
last.focus(1);
return false
}
}
})
}
$(c.element.find(":tabbable").get().concat(uiDialog.find(".ui-dialog-buttonpane :tabbable").get().concat(uiDialog.get()))).eq(0).focus();
c._isOpen = true;
c._trigger("open");
return c
},
_createButtons: function (e) {
var d = this,
hasButtons = false,
uiDialogButtonPane = $("<div></div>").addClass("ui-dialog-buttonpane ui-widget-content ui-helper-clearfix"),
uiButtonSet = $("<div></div>").addClass("ui-dialog-buttonset").appendTo(uiDialogButtonPane);
d.uiDialog.find(".ui-dialog-buttonpane").remove();
if (typeof e === "object" && e !== null) {
$.each(e, function () {
return !(hasButtons = true)
})
}
if (hasButtons) {
$.each(e, function (b, c) {
c = $.isFunction(c) ? {
click: c,
text: b
} : c;
var a = $('<button type="button"></button>').attr(c, true).unbind("click").click(function () {
c.click.apply(d.element[0], arguments)
}).appendTo(uiButtonSet);
if ($.fn.button) {
a.button()
}
});
uiDialogButtonPane.appendTo(d.uiDialog)
}
},
_makeDraggable: function () {
var c = this,
options = c.options,
doc = $(document),
heightBeforeDrag;
function filteredUi(a) {
return {
position: a.position,
offset: a.offset
}
}
c.uiDialog.draggable({
cancel: ".ui-dialog-content, .ui-dialog-titlebar-close",
handle: ".ui-dialog-titlebar",
containment: "document",
start: function (a, b) {
heightBeforeDrag = options.height === "auto" ? "auto" : $(this).height();
$(this).height($(this).height()).addClass("ui-dialog-dragging");
c._trigger("dragStart", a, filteredUi(b))
},
drag: function (a, b) {
c._trigger("drag", a, filteredUi(b))
},
stop: function (a, b) {
options.position = [b.position.left - doc.scrollLeft(), b.position.top - doc.scrollTop()];
$(this).removeClass("ui-dialog-dragging").height(heightBeforeDrag);
c._trigger("dragStop", a, filteredUi(b));
$.ui.dialog.overlay.resize()
}
})
},
_makeResizable: function (d) {
d = (d === f ? this.options.resizable : d);
var c = this,
options = c.options,
position = c.uiDialog.css("position"),
resizeHandles = (typeof d === "string" ? d : "n,e,s,w,se,sw,ne,nw");
function filteredUi(a) {
return {
originalPosition: a.originalPosition,
originalSize: a.originalSize,
position: a.position,
size: a.size
}
}
c.uiDialog.resizable({
cancel: ".ui-dialog-content",
containment: "document",
alsoResize: c.element,
maxWidth: options.maxWidth,
maxHeight: options.maxHeight,
minWidth: options.minWidth,
minHeight: c._minHeight(),
handles: resizeHandles,
start: function (a, b) {
$(this).addClass("ui-dialog-resizing");
c._trigger("resizeStart", a, filteredUi(b))
},
resize: function (a, b) {
c._trigger("resize", a, filteredUi(b))
},
stop: function (a, b) {
$(this).removeClass("ui-dialog-resizing");
options.height = $(this).height();
options.width = $(this).width();
c._trigger("resizeStop", a, filteredUi(b));
$.ui.dialog.overlay.resize()
}
}).css("position", position).find(".ui-resizable-se").addClass("ui-icon ui-icon-grip-diagonal-se")
},
_minHeight: function () {
var a = this.options;
if (a.height === "auto") {
return a.minHeight
} else {
return Math.min(a.minHeight, a.height)
}
},
_position: function (c) {
var b = [],
offset = [0, 0],
isVisible;
if (c) {
if (typeof c === "string" || (typeof c === "object" && "0" in c)) {
b = c.split ? c.split(" ") : [c[0], c[1]];
if (b.length === 1) {
b[1] = b[0]
}
$.each(["left", "top"], function (i, a) {
if (+b[i] === b[i]) {
offset[i] = b[i];
b[i] = a
}
});
c = {
my: b.join(" "),
at: b.join(" "),
offset: offset.join(" ")
}
}
c = $.extend({}, $.ui.dialog.prototype.options.position, c)
} else {
c = $.ui.dialog.prototype.options.position
}
isVisible = this.uiDialog.is(":visible");
if (!isVisible) {
this.uiDialog.show()
}
this.uiDialog.css({
top: 0,
left: 0
}).position($.extend({
of: window
}, c));
if (!isVisible) {
this.uiDialog.hide()
}
},
_setOptions: function (d) {
var c = this,
resizableOptions = {}, resize = false;
$.each(d, function (b, a) {
c._setOption(b, a);
if (b in sizeRelatedOptions) {
resize = true
}
if (b in resizableRelatedOptions) {
resizableOptions[b] = a
}
});
if (resize) {
this._size()
}
if (this.uiDialog.is(":data(resizable)")) {
this.uiDialog.resizable("option", resizableOptions)
}
},
_setOption: function (c, b) {
var e = this,
uiDialog = e.uiDialog;
switch (c) {
case "beforeclose":
c = "beforeClose";
break;
case "buttons":
e._createButtons(b);
break;
case "closeText":
e.uiDialogTitlebarCloseText.text("" + b);
break;
case "dialogClass":
uiDialog.removeClass(e.options.dialogClass).addClass(g + b);
break;
case "disabled":
if (b) {
uiDialog.addClass("ui-dialog-disabled")
} else {
uiDialog.removeClass("ui-dialog-disabled")
}
break;
case "draggable":
var d = uiDialog.is(":data(draggable)");
if (d && !b) {
uiDialog.draggable("destroy")
}
if (!d && b) {
e._makeDraggable()
}
break;
case "position":
e._position(b);
break;
case "resizable":
var a = uiDialog.is(":data(resizable)");
if (a && !b) {
uiDialog.resizable("destroy")
}
if (a && typeof b === "string") {
uiDialog.resizable("option", "handles", b)
}
if (!a && b !== false) {
e._makeResizable(b)
}
break;
case "title":
$(".ui-dialog-title", e.uiDialogTitlebar).html("" + (b || "&#160;"));
break
}
$.Widget.prototype._setOption.apply(e, arguments)
},
_size: function () {
var b = this.options,
nonContentHeight, minContentHeight, isVisible = this.uiDialog.is(":visible");
this.element.show().css({
width: "auto",
minHeight: 0,
height: 0
});
if (b.minWidth > b.width) {
b.width = b.minWidth
}
nonContentHeight = this.uiDialog.css({
height: "auto",
width: b.width
}).height();
minContentHeight = Math.max(0, b.minHeight - nonContentHeight);
if (b.height === "auto") {
if ($.support.minHeight) {
this.element.css({
minHeight: minContentHeight,
height: "auto"
})
} else {
this.uiDialog.show();
var a = this.element.css("height", "auto").height();
if (!isVisible) {
this.uiDialog.hide()
}
this.element.height(Math.max(a, minContentHeight))
}
} else {
this.element.height(Math.max(b.height - nonContentHeight, 0))
} if (this.uiDialog.is(":data(resizable)")) {
this.uiDialog.resizable("option", "minHeight", this._minHeight())
}
}
});
$.extend($.ui.dialog, {
version: "1.8.11",
uuid: 0,
maxZ: 0,
getTitleId: function (a) {
var b = a.attr("id");
if (!b) {
this.uuid += 1;
b = this.uuid
}
return "ui-dialog-title-" + b
},
overlay: function (a) {
this.$el = $.ui.dialog.overlay.create(a)
}
});
$.extend($.ui.dialog.overlay, {
instances: [],
oldInstances: [],
maxZ: 0,
events: $.map("focus,mousedown,mouseup,keydown,keypress,click".split(","), function (a) {
return a + ".dialog-overlay"
}).join(" "),
create: function (c) {
if (this.instances.length === 0) {
setTimeout(function () {
if ($.ui.dialog.overlay.instances.length) {
$(document).bind($.ui.dialog.overlay.events, function (a) {
if ($(a.target).zIndex() < $.ui.dialog.overlay.maxZ) {
return false
}
})
}
}, 1);
$(document).bind("keydown.dialog-overlay", function (a) {
if (c.options.closeOnEscape && a.keyCode && a.keyCode === $.ui.keyCode.ESCAPE) {
c.close(a);
a.preventDefault()
}
});
$(window).bind("resize.dialog-overlay", $.ui.dialog.overlay.resize)
}
var b = (this.oldInstances.pop() || $("<div></div>").addClass("ui-widget-overlay")).appendTo(document.body).css({
width: this.width(),
height: this.height()
});
if ($.fn.bgiframe) {
b.bgiframe()
}
this.instances.push(b);
return b
},
destroy: function (a) {
var b = $.inArray(a, this.instances);
if (b != -1) {
this.oldInstances.push(this.instances.splice(b, 1)[0])
}
if (this.instances.length === 0) {
$([document, window]).unbind(".dialog-overlay")
}
a.remove();
var c = 0;
$.each(this.instances, function () {
c = Math.max(c, this.css("z-index"))
});
this.maxZ = c
},
height: function () {
var a, offsetHeight;
if ($.browser.msie && $.browser.version < 7) {
a = Math.max(document.documentElement.scrollHeight, document.body.scrollHeight);
offsetHeight = Math.max(document.documentElement.offsetHeight, document.body.offsetHeight);
if (a < offsetHeight) {
return $(window).height() + "px"
} else {
return a + "px"
}
} else {
return $(document).height() + "px"
}
},
width: function () {
var a, offsetWidth;
if ($.browser.msie && $.browser.version < 7) {
a = Math.max(document.documentElement.scrollWidth, document.body.scrollWidth);
offsetWidth = Math.max(document.documentElement.offsetWidth, document.body.offsetWidth);
if (a < offsetWidth) {
return $(window).width() + "px"
} else {
return a + "px"
}
} else {
return $(document).width() + "px"
}
},
resize: function () {
var a = $([]);
$.each($.ui.dialog.overlay.instances, function () {
a = a.add(this)
});
a.css({
width: 0,
height: 0
}).css({
width: $.ui.dialog.overlay.width(),
height: $.ui.dialog.overlay.height()
})
}
});
$.extend($.ui.dialog.overlay.prototype, {
destroy: function () {
$.ui.dialog.overlay.destroy(this.$el)
}
})
}(jQCT));
(function ($, f) {
var e = 5;
$.widget("ui.slider", $.ui.mouse, {
widgetEventPrefix: "slide",
options: {
animate: false,
distance: 0,
max: 100,
min: 0,
orientation: "horizontal",
range: false,
step: 1,
value: 0,
values: null
},
_create: function () {
var c = this,
o = this.options;
this._keySliding = false;
this._mouseSliding = false;
this._animateOff = true;
this._handleIndex = null;
this._detectOrientation();
this._originalVal;
this._mouseInit();
this.element.addClass("ui-slider ui-slider-" + this.orientation + " ui-widget ui-widget-content ui-corner-all");
if (o.disabled) {
this.element.addClass("ui-slider-disabled ui-disabled")
}
this.range = $([]);
if (o.range) {
if (o.range === true) {
this.range = $("<div></div>");
if (!o.values) {
o.values = [this._valueMin(), this._valueMin()]
}
if (o.values.length && o.values.length !== 2) {
o.values = [o.values[0], o.values[0]]
}
} else {
this.range = $("<div></div>")
}
this.range.appendTo(this.element).addClass("ui-slider-range");
if (o.range === "min" || o.range === "max") {
this.range.addClass("ui-slider-range-" + o.range)
}
this.range.addClass("ui-widget-header").addClass("ct-ui-header-secondary")
}
if ($(".ui-slider-handle", this.element).length === 0) {
$("<a href='#'></a>").appendTo(this.element).addClass("ui-slider-handle")
}
if (o.values && o.values.length) {
while ($(".ui-slider-handle", this.element).length < o.values.length) {
$("<a href='#'></a>").appendTo(this.element).addClass("ui-slider-handle")
}
}
this.handles = $(".ui-slider-handle", this.element).addClass("ui-state-default ui-corner-all");
this.handle = this.handles.eq(0);
this.handles.add(this.range).filter("a").click(function (a) {
a.preventDefault()
}).hover(function () {
if (!o.disabled) {
$(this).addClass("ui-state-hover")
}
}, function () {
$(this).removeClass("ui-state-hover")
}).focus(function () {
if (!o.disabled) {
$(".ui-slider .ui-state-focus").removeClass("ui-state-focus");
$(this).addClass("ui-state-focus")
} else {
$(this).blur()
}
}).blur(function () {
$(this).removeClass("ui-state-focus")
});
this.handles.each(function (i) {
$(this).data("index.ui-slider-handle", i)
});
this.handles.keydown(function (a) {
var b = true,
index = $(this).data("index.ui-slider-handle"),
allowed, curVal, newVal, step;
if (c.options.disabled) {
return
}
switch (a.keyCode) {
case $.ui.keyCode.HOME:
case $.ui.keyCode.END:
case $.ui.keyCode.PAGE_UP:
case $.ui.keyCode.PAGE_DOWN:
case $.ui.keyCode.UP:
case $.ui.keyCode.RIGHT:
case $.ui.keyCode.DOWN:
case $.ui.keyCode.LEFT:
b = false;
if (!c._keySliding) {
c._keySliding = true;
$(this).addClass("ui-state-active");
allowed = c._start(a, index);
if (allowed === false) {
return
}
}
break
}
step = c.options.step;
if (c.options.values && c.options.values.length) {
curVal = newVal = c.values(index)
} else {
curVal = newVal = c.value()
}
switch (a.keyCode) {
case $.ui.keyCode.HOME:
newVal = c._valueMin();
break;
case $.ui.keyCode.END:
newVal = c._valueMax();
break;
case $.ui.keyCode.PAGE_UP:
newVal = c._trimAlignValue(curVal + ((c._valueMax() - c._valueMin()) / e));
break;
case $.ui.keyCode.PAGE_DOWN:
newVal = c._trimAlignValue(curVal - ((c._valueMax() - c._valueMin()) / e));
break;
case $.ui.keyCode.UP:
case $.ui.keyCode.RIGHT:
if (curVal === c._valueMax()) {
return
}
newVal = c._trimAlignValue(curVal + step);
break;
case $.ui.keyCode.DOWN:
case $.ui.keyCode.LEFT:
if (curVal === c._valueMin()) {
return
}
newVal = c._trimAlignValue(curVal - step);
break
}
c._slide(a, index, newVal);
return b
}).keyup(function (a) {
var b = $(this).data("index.ui-slider-handle");
if (c._keySliding) {
c._keySliding = false;
c._stop(a, b);
c._change(a, b);
$(this).removeClass("ui-state-active")
}
});
this._refreshValue();
this._animateOff = false
},
destroy: function () {
this.handles.remove();
this.range.remove();
this.element.removeClass("ui-slider ui-slider-horizontal ui-slider-vertical ui-slider-disabled ui-widget ui-widget-content ui-corner-all").removeData("slider").unbind(".slider");
this._mouseDestroy();
return this
},
_mouseCapture: function (b) {
var o = this.options,
position, normValue, distance, closestHandle, self, index, allowed, offset, mouseOverHandle;
if (o.disabled) {
return false
}
this.elementSize = {
width: this.element.outerWidth(),
height: this.element.outerHeight()
};
this.elementOffset = this.element.offset();
position = {
x: b.pageX,
y: b.pageY
};
normValue = this._normValueFromMouse(position);
distance = this._valueMax() - this._valueMin() + 1;
self = this;
this.handles.each(function (i) {
var a = Math.abs(normValue - self.values(i));
if (distance > a) {
distance = a;
closestHandle = $(this);
index = i
}
});
if (o.range === true && this.values(1) === o.min) {
index += 1;
closestHandle = $(this.handles[index])
}
allowed = this._start(b, index);
if (allowed === false) {
return false
}
this._mouseSliding = true;
self._handleIndex = index;
closestHandle.addClass("ui-state-active").focus();
offset = closestHandle.offset();
mouseOverHandle = !$(b.target).parents().andSelf().is(".ui-slider-handle");
this._clickOffset = mouseOverHandle ? {
left: 0,
top: 0
} : {
left: b.pageX - offset.left - (closestHandle.width() / 2),
top: b.pageY - offset.top - (closestHandle.height() / 2) - (parseInt(closestHandle.css("borderTopWidth"), 10) || 0) - (parseInt(closestHandle.css("borderBottomWidth"), 10) || 0) + (parseInt(closestHandle.css("marginTop"), 10) || 0)
};
if (o.range === true) {
this._originalVal = this.values()
}
if (!this.handles.hasClass("ui-state-hover")) {
this._slide(b, index, normValue)
}
this._animateOff = true;
return true
},
_mouseStart: function (a) {
return true
},
_mouseDrag: function (a) {
var b = {
x: a.pageX,
y: a.pageY
}, normValue = this._normValueFromMouse(b);
if (this._originalVal && this._originalVal[0] === this._originalVal[1] && normValue > this._originalVal[0]) {
this._handleIndex = 1
}
this._slide(a, this._handleIndex, normValue);
return false
},
_mouseStop: function (a) {
this.handles.removeClass("ui-state-active");
this._mouseSliding = false;
this._stop(a, this._handleIndex);
this._change(a, this._handleIndex);
this._handleIndex = null;
this._clickOffset = null;
this._animateOff = false;
return false
},
_detectOrientation: function () {
this.orientation = (this.options.orientation === "vertical") ? "vertical" : "horizontal"
},
_normValueFromMouse: function (b) {
var a, pixelMouse, percentMouse, valueTotal, valueMouse;
if (this.orientation === "horizontal") {
a = this.elementSize.width;
pixelMouse = b.x - this.elementOffset.left - (this._clickOffset ? this._clickOffset.left : 0)
} else {
a = this.elementSize.height;
pixelMouse = b.y - this.elementOffset.top - (this._clickOffset ? this._clickOffset.top : 0)
}
percentMouse = (pixelMouse / a);
if (percentMouse > 1) {
percentMouse = 1
}
if (percentMouse < 0) {
percentMouse = 0
}
if (this.orientation === "vertical") {
percentMouse = 1 - percentMouse
}
valueTotal = this._valueMax() - this._valueMin();
valueMouse = this._valueMin() + percentMouse * valueTotal;
return this._trimAlignValue(valueMouse)
},
_start: function (a, b) {
var c = {
handle: this.handles[b],
value: this.value()
};
if (this.options.values && this.options.values.length) {
c.value = this.values(b);
c.values = this.values()
}
return this._trigger("start", a, c)
},
_slide: function (a, c, b) {
var d, newValues, allowed;
if (this.options.values && this.options.values.length) {
d = this.values(c ? 0 : 1);
if ((this.options.values.length === 2 && this.options.range === true) && ((c === 0 && b > d) || (c === 1 && b < d))) {
b = d
}
if (b !== this.values(c)) {
newValues = this.values();
newValues[c] = b;
allowed = this._trigger("slide", a, {
handle: this.handles[c],
value: b,
values: newValues
});
d = this.values(c ? 0 : 1);
if (allowed !== false) {
this.values(c, b, true)
}
}
} else {
if (b !== this.value()) {
allowed = this._trigger("slide", a, {
handle: this.handles[c],
value: b
});
if (allowed !== false) {
this.value(b)
}
}
}
},
_stop: function (a, b) {
var c = {
handle: this.handles[b],
value: this.value()
};
if (this.options.values && this.options.values.length) {
c.value = this.values(b);
c.values = this.values()
}
this._trigger("stop", a, c)
},
_change: function (a, b) {
if (!this._keySliding && !this._mouseSliding) {
var c = {
handle: this.handles[b],
value: this.value()
};
if (this.options.values && this.options.values.length) {
c.value = this.values(b);
c.values = this.values()
}
this._trigger("change", a, c)
}
},
value: function (a) {
if (arguments.length) {
this.options.value = this._trimAlignValue(a);
this._refreshValue();
this._change(null, 0);
return
}
return this._value()
},
values: function (a, b) {
var c, newValues, i;
if (arguments.length > 1) {
this.options.values[a] = this._trimAlignValue(b);
this._refreshValue();
this._change(null, a)
}
if (arguments.length) {
if ($.isArray(arguments[0])) {
c = this.options.values;
newValues = arguments[0];
for (i = 0; i < c.length; i += 1) {
c[i] = this._trimAlignValue(newValues[i]);
this._change(null, i)
}
this._refreshValue()
} else {
if (this.options.values && this.options.values.length) {
return this._values(a)
} else {
return this.value()
}
}
} else {
return this._values()
}
},
_setOption: function (b, a) {
var i, valsLength = 0;
if ($.isArray(this.options.values)) {
valsLength = this.options.values.length
}
$.Widget.prototype._setOption.apply(this, arguments);
switch (b) {
case "disabled":
if (a) {
this.handles.filter(".ui-state-focus").blur();
this.handles.removeClass("ui-state-hover");
this.handles.attr("disabled", "disabled");
this.element.addClass("ui-disabled")
} else {
this.handles.removeAttr("disabled");
this.element.removeClass("ui-disabled")
}
break;
case "orientation":
this._detectOrientation();
this.element.removeClass("ui-slider-horizontal ui-slider-vertical").addClass("ui-slider-" + this.orientation);
this._refreshValue();
break;
case "value":
this._animateOff = true;
this._refreshValue();
this._change(null, 0);
this._animateOff = false;
break;
case "values":
this._animateOff = true;
this._refreshValue();
for (i = 0; i < valsLength; i += 1) {
this._change(null, i)
}
this._animateOff = false;
break
}
},
_value: function () {
var a = this.options.value;
a = this._trimAlignValue(a);
return a
},
_values: function (a) {
var b, vals, i;
if (arguments.length) {
b = this.options.values[a];
b = this._trimAlignValue(b);
return b
} else {
vals = this.options.values.slice();
for (i = 0; i < vals.length; i += 1) {
vals[i] = this._trimAlignValue(vals[i])
}
return vals
}
},
_trimAlignValue: function (a) {
if (a <= this._valueMin()) {
return this._valueMin()
}
if (a >= this._valueMax()) {
return this._valueMax()
}
var b = (this.options.step > 0) ? this.options.step : 1,
valModStep = (a - this._valueMin()) % b;
alignValue = a - valModStep;
if (Math.abs(valModStep) * 2 >= b) {
alignValue += (valModStep > 0) ? b : (-b)
}
return parseFloat(alignValue.toFixed(5))
},
_valueMin: function () {
return this.options.min
},
_valueMax: function () {
return this.options.max
},
_refreshValue: function () {
var a = this.options.range,
o = this.options,
self = this,
animate = (!this._animateOff) ? o.animate : false,
valPercent, _set = {}, lastValPercent, value, valueMin, valueMax;
if (this.options.values && this.options.values.length) {
this.handles.each(function (i, j) {
valPercent = (self.values(i) - self._valueMin()) / (self._valueMax() - self._valueMin()) * 100;
_set[self.orientation === "horizontal" ? "left" : "bottom"] = valPercent + "%";
$(this).stop(1, 1)[animate ? "animate" : "css"](_set, o.animate);
if (self.options.range === true) {
if (self.orientation === "horizontal") {
if (i === 0) {
self.range.stop(1, 1)[animate ? "animate" : "css"]({
left: valPercent + "%"
}, o.animate)
}
if (i === 1) {
self.range[animate ? "animate" : "css"]({
width: (valPercent - lastValPercent) + "%"
}, {
queue: false,
duration: o.animate
})
}
} else {
if (i === 0) {
self.range.stop(1, 1)[animate ? "animate" : "css"]({
bottom: (valPercent) + "%"
}, o.animate)
}
if (i === 1) {
self.range[animate ? "animate" : "css"]({
height: (valPercent - lastValPercent) + "%"
}, {
queue: false,
duration: o.animate
})
}
}
}
lastValPercent = valPercent
})
} else {
value = this.value();
valueMin = this._valueMin();
valueMax = this._valueMax();
valPercent = (valueMax !== valueMin) ? (value - valueMin) / (valueMax - valueMin) * 100 : 0;
_set[self.orientation === "horizontal" ? "left" : "bottom"] = valPercent + "%";
this.handle.stop(1, 1)[animate ? "animate" : "css"](_set, o.animate);
if (a === "min" && this.orientation === "horizontal") {
this.range.stop(1, 1)[animate ? "animate" : "css"]({
width: valPercent + "%"
}, o.animate)
}
if (a === "max" && this.orientation === "horizontal") {
this.range[animate ? "animate" : "css"]({
width: (100 - valPercent) + "%"
}, {
queue: false,
duration: o.animate
})
}
if (a === "min" && this.orientation === "vertical") {
this.range.stop(1, 1)[animate ? "animate" : "css"]({
height: valPercent + "%"
}, o.animate)
}
if (a === "max" && this.orientation === "vertical") {
this.range[animate ? "animate" : "css"]({
height: (100 - valPercent) + "%"
}, {
queue: false,
duration: o.animate
})
}
}
}
});
$.extend($.ui.slider, {
version: "1.8.11"
})
}(jQCT));
(function ($, h) {
$.effects.slide = function (o) {
return this.queue(function () {
var f = $(this),
props = ["position", "top", "bottom", "left", "right"];
var b = $.effects.setMode(f, o.options.mode || "show");
var c = o.options.direction || "left";
$.effects.save(f, props);
f.show();
$.effects.createWrapper(f).css({
overflow: "hidden"
});
var e = (c == "up" || c == "down") ? "top" : "left";
var g = (c == "up" || c == "left") ? "pos" : "neg";
var a = o.options.distance || (e == "top" ? f.outerHeight({
margin: true
}) : f.outerWidth({
margin: true
}));
if (b == "show") {
f.css(e, g == "pos" ? (isNaN(a) ? "-" + a : -a) : a)
}
var d = {};
d[e] = (b == "show" ? (g == "pos" ? "+=" : "-=") : (g == "pos" ? "-=" : "+=")) + a;
f.animate(d, {
queue: false,
duration: o.duration,
easing: o.options.easing,
complete: function () {
if (b == "hide") {
f.hide()
}
$.effects.restore(f, props);
$.effects.removeWrapper(f);
if (o.callback) {
o.callback.apply(this, arguments)
}
f.dequeue()
}
})
})
}
})(jQCT);
(function ($, v) {
var u = "ct_tmpl_layout_",
_BASE_CLASS = "ct-tmpl-layout-",
_BASE_CLASS_LOOKUP = "div.ct-tmpl-layout-",
_BASE_ICON_CLASS = "ct-ui-icon-",
_BASE_ICON_CLASS_LOOKUP = "span.ct-ui-icon-",
_NORTH = "north",
_SOUTH = "south",
_EAST = "east",
_WEST = "west",
_CENTER = "center",
_CSS_EXPRESSION = "ct_css_expr_";
$.widget("CT.templateLayout", {
_DEFAULT_TEMPLATE: ["<div data-type='container'>", "<div data-orientation='north' data-type='fixed'></div>", "<div data-orientation='center' data-type='carousel'>", "<div id='step_1' data-title='<%=$.i18n.lookup(\"step1Title\", true)%>'></div>", "<div id='step_2' data-title='<%=$.i18n.lookup(\"step2Title\", true)%>' data-history='book'></div>", "<div id='step_3' data-title='<%=$.i18n.lookup(\"step3Title\", true)%>' data-history='confirm'></div>", "<div id='step_4' data-breadcrumb-ignore='true'></div>", "</div>", "<div data-orientation='south' data-type='fixed'></div>", "</div>"].join(""),
_BOX_TEMPLATE: ["<div id='ct_box_<%=id%>_wrapper' class='ct-grid-unit-1-<%=grid%>'>", "<div class='ct-ui-box<%if(transparent){%>-trans<%}else{if(mini){%>-mini<%}%> ct-ui-shadow<%}%>' id='ct_box_<%=id%>'>", "<%if(title.enable){%>", "<div class='ct-ui-box-title ct-ui-p-border-color'>", "<h1><%=title.text%></h1>", "</div>", "<%if(title.subText){%>", "<div class='ct-ui-box-subtitle'>", "<p><%=title.subText%></p>", "</div>", "<%}%>", "<%}%>", "<div class='ct-ui-box-content<%if (!padding){%> ct-ui-box-nopadding<%}%>'><%=content%></div>", "<div class='ct-ui-box-footer'></div>", "</div>", "</div>"].join(""),
options: {
debug: false,
layout: {
baseID: "ct_tmpl",
baseClass: "ct-ui-tmpl",
basePath: "./",
baseImgPath: "./img/",
pattern: "A",
paddingOffset: 10,
orientation: {
north: {
sortOrder: 0,
zIndex: 3
},
center: {
sortOrder: 1,
zIndex: 1
},
east: {
sortOrder: 2,
zIndex: 2
},
west: {
sortOrder: 3,
zIndex: 2
},
south: {
sortOrder: 4,
zIndex: 3
}
},
header: {
enable: "false",
collapsible: "true",
state: "open",
title: {
text: ""
},
icon: {
color: "white"
}
},
carousel: {
step: 0,
breadcrumbs: {
enable: "false",
clickable: "true",
callback: $.noop()
}
},
loader: {
label: "Loading template"
},
box: {
position: "top",
id: "",
grid: 1,
content: "",
title: {
text: "",
subText: v,
icon: v,
enable: true
},
state: "expanded",
hide: false,
collapsible: false,
stateCallback: $.noop(),
stateEndCallback: $.noop(),
mini: false,
transparent: false,
custom: false,
padding: true,
sticky: false
},
minimal: false,
patterns: {
A: {
1: {
center: {
panes: {
search: {}
}
}
},
2: {
north: {
panes: {
availability_legend: {}
}
},
east: {
panes: {
change_search: {
header: {
enable: true,
state: "open",
title: {
text: function () {
return $.i18n.lookup("ChangeSearchLabel", true)
}
}
}
},
filters: {
header: {
enable: true,
collapsible: false,
state: "open",
title: {
text: function () {
return $.i18n.lookup("FilterByLabel", true)
}
}
}
}
}
},
center: {
panes: {
map: {},
availability: {}
}
}
},
3: {
east: {
panes: {
change_search: {
header: {
enable: true,
state: "close",
title: {
text: function () {
return $.i18n.lookup("ChangeSearchLabel", true)
}
}
}
},
inclusions: {
header: {
enable: true,
state: "open",
title: {
text: function () {
return $.i18n.lookup("feeBreakdownSubTitleIncludeInPrice", true)
}
}
}
}
}
},
center: {
panes: {
details: {}
}
}
}
},
B: {
1: {
center: {
panes: {
search: {}
}
}
},
2: {
north: {
panes: {
availability_legend: {},
change_search: {
header: {
enable: true,
state: "open",
title: {
text: function () {
return $.i18n.lookup("ChangeSearchLabel", true)
}
}
}
},
filters: {
header: {
enable: true,
state: "close",
title: {
text: function () {
return $.i18n.lookup("FilterByLabel", true)
}
}
}
}
}
},
center: {
panes: {
map: {},
availability: {}
}
}
},
3: {
north: {
panes: {
change_search: {
header: {
enable: true,
state: "close",
title: {
text: function () {
return $.i18n.lookup("ChangeSearchLabel", true)
}
}
}
},
inclusions: {
header: {
enable: true,
state: "close",
title: {
text: function () {
return $.i18n.lookup("feeBreakdownSubTitleIncludeInPrice", true)
}
}
}
}
}
},
center: {
panes: {
details: {}
}
}
}
},
C: {
1: {
center: {
panes: {
search: {}
}
}
},
2: {
north: {
panes: {
availability_legend: {}
}
},
west: {
panes: {
change_search: {
header: {
enable: true,
state: "open",
title: {
text: function () {
return $.i18n.lookup("ChangeSearchLabel", true)
}
}
}
},
filters: {
header: {
enable: true,
collapsible: false,
state: "open",
title: {
text: function () {
return $.i18n.lookup("FilterByLabel", true)
}
}
}
}
}
},
center: {
panes: {
map: {},
availability: {}
}
}
},
3: {
west: {
panes: {
change_search: {
header: {
enable: true,
state: "close",
title: {
text: function () {
return $.i18n.lookup("ChangeSearchLabel", true)
}
}
}
},
inclusions: {
header: {
enable: true,
state: "open",
title: {
text: function () {
return $.i18n.lookup("feeBreakdownSubTitleIncludeInPrice", true)
}
}
}
}
}
},
center: {
panes: {
details: {}
}
}
}
},
D: {
1: {
center: {
panes: {
search: {}
}
}
},
2: {
north: {
panes: {
availability_legend: {}
}
},
east: {
panes: {
change_search: {
header: {
enable: true,
state: "open",
title: {
text: function () {
return $.i18n.lookup("ChangeSearchLabel", true)
}
}
}
},
filters: {
header: {
enable: true,
collapsible: false,
state: "open",
title: {
text: function () {
return $.i18n.lookup("FilterByLabel", true)
}
}
}
}
}
},
center: {
panes: {
map: {},
availability: {}
}
}
},
3: {
west: {
panes: {
inclusions: {}
}
},
center: {
panes: {
details: {}
}
}
}
}
}
},
iconSwatch: {
primary: "white",
secondary: "black",
tertiary: "gold",
quaternary: "darkgray"
},
icons: {
open: "plus",
close: "minus"
},
onReady: v,
onShow: v,
configSettings: {}
},
_create: function () {
var a = this.element,
o = this.options;
this._transitionSpeed = $.fx.speeds.slow;
this._isShown = false;
this._carousels = [];
this._bindEvents();
this._construct($(CT.LIB.templateV2.tmpl(this._DEFAULT_TEMPLATE, {}, this)));
this.refresh(true)
},
_construct: function (p) {
var s = this,
o = this.options,
containerLevel = 0;
if (o.layout.minimal === true) {
p.find('div[data-orientation="north"],div[data-orientation="south"]').remove().end().find("div#step_2, div#step_3, div#step_4").remove().end().find('div[data-orientation="center"]').attr("data-type", "fixed")
}
var q = o.layout.pattern ? o.layout.pattern.toUpperCase() : "A";
if (typeof o.layout.patterns[q] !== "undefined") {
q = o.layout.patterns[q];
CT.LIB.Object.each(q, function (l, k) {
var m = $('<div data-type="container"/>');
CT.LIB.Object.each(k, function (j, i) {
var h = $("<div/>");
h.attr("data-type", (i.type || "fixed"));
h.attr("data-orientation", j);
if (typeof i.panes !== "undefined") {
CT.LIB.Object.each(i.panes, function (e, f) {
var g = $("<div/>");
g.attr("id", e);
if (typeof f !== "undefined") {
CT.LIB.Object.each(f, function (d, c) {
c = JSON.stringify(c, function replacer(b, a) {
if (typeof a === "boolean") {
return a ? String("true") : String("false")
}
if (typeof a === "number" && !isFinite(a)) {
return String(a)
}
if (typeof a === "function") {
return a()
}
return a
});
g.attr("data-" + d, c)
})
}
h.append(g)
})
}
m.append(h)
});
p.find("div#step_" + l).append(m)
});
p.addClass(_BASE_CLASS + o.layout.pattern.toLowerCase())
}
var t = $('<div id="' + o.layout.baseID + '" class="' + o.layout.baseClass + '"/>');
p = t.append(p);
if (typeof o.extraHTML !== "undefined") {
t.append(o.extraHTML)
}
this.template = p;
this.template.css("visibility", "hidden");
this.element.prepend(this.template);
this.processDataTags = {
orientation: function (b, a) {
if (typeof a === "string") {
b.addClass(_BASE_CLASS + a)
}
},
type: function (f, d) {
if (typeof d === "string") {
f.addClass(_BASE_CLASS + d);
if (d === "carousel") {
var g = $.extend(true, {}, s.options.layout.carousel, f.data("carousel"));
var h = f.children("div"),
breadcrumbChildren = f.children("div").filter(function () {
return $(this).data("breadcrumb-ignore") !== true
});
if (h.length > 0) {
var j = $('<div class="' + _BASE_CLASS + d + '-breadcrumbs"></div>').append("<ol></ol>");
var e = 0;
$.each(h, function (b, c) {
var a = $(c).attr("id");
$(c).addClass(_BASE_CLASS + d + "-item").data("type", "carousel-item-" + b).attr("id", u + a);
(++e)
});
var j = ["<!-- BREADCRUMBS -->", '<div id="ct-ui-breadcrumbs" class="ct-ui-active" data-ctstep="1">', ' <div class="ct-ui-meter ct-ui-action-background"></div>', ' <div class="ct-ui-current ct-ui-p-background-color" ></div>', " <ol>", ' <li class="ct-ui-step1"><span>1</span>' + $.i18n.locale.S3_V2_0_chooseyourdates_S1 + "</li>", ' <li class="ct-ui-step2" data-history="book"><span>2</span>' + $.i18n.locale.S3_V2_0_chooseyourcar_S2 + "</li>", ' <li class="ct-ui-step3" data-history="confirm"><span>3</span>' + $.i18n.locale.S3_V2_0_reserveyourcar_S3 + "</li>", " </ol>", "</div>"].join("");
if (g.breadcrumbs.enable === "true") {
f.prepend(j)
}
}
$.each(f.children().not(_BASE_CLASS_LOOKUP + "carousel-breadcrumbs"), function (i, a) {
if (i == g.step) {
$(a).addClass(_BASE_CLASS + "carousel-item-active");
return false
}
});
s._carousels.push(f);
if (typeof g.breadcrumbs === "object") {
$.each(g.breadcrumbs, function (b, a) {
try {
s.processDataTags[b](f.find("div:eq(0)"), a)
} catch (err) {}
})
}
} else {
if (d === "container") {
if (typeof f.data("icon-swatch") !== "undefined" && containerLevel === 0) {
if (!$.isEmptyObject(s.validateDataAttributes(f.data("icon-swatch")))) {
$.extend(true, s.options.iconSwatch, f.data("icon-swatch"))
}
}
if (typeof f.data("icons") !== "undefined" && containerLevel === 0) {
if (!$.isEmptyObject(s.validateDataAttributes(f.data("icons")))) {
$.extend(true, s.options.icons, f.data("icons"))
}
}
f.attr("data-level", containerLevel++).css("z-index", containerLevel);
f.children().not('[data-type="loader"]').each(function () {
var b = $(this);
b.addClass("ct-ui-pane").css("zIndex", parseInt(s.options.layout.orientation[b.data("orientation")].zIndex, 10));
if (b.data("type") !== "carousel") {
var a = b.children();
if (a.length > 0) {
a.not('[data-type="carousel"], [data-type="loader"]').each(function () {
$(this).attr("id", u + $(this).attr("id")).addClass("ct-ui-pane-item").css("position", "relative").css("display", "none")
})
}
}
}).sortElements(function (a, b) {
return parseInt(s.options.layout.orientation[$(a).data("orientation")].sortOrder, 10) > parseInt(s.options.layout.orientation[$(b).data("orientation")].sortOrder, 10) ? 1 : -1
})
}
}
s._trigger("paneCreated", null, {
element: f,
type: d
})
}
},
header: function (f, d) {
if (!$.isEmptyObject(s.validateDataAttributes(d))) {
var g = $.extend(true, {}, s.options.layout.header, d);
if (g.enable === "true" && f.parent().data("type") === "fixed") {
var h = [];
h.push('<div id="' + f.attr("id") + '_header" class="ct-ui-header-primary ' + _BASE_CLASS + 'header">');
h.push('<span class="' + _BASE_CLASS + 'header-label"' + (typeof g.title.color !== "undefined" ? ' style="color:' + g.title.color + ';"' : "") + ">" + g.title.text + "</span>");
if (g.collapsible === "true") {
h.push('<a role="button" href="#">');
h.push('<span class="' + _BASE_ICON_CLASS + g.icon.color + " " + _BASE_ICON_CLASS + ((g.state === "open") ? s.options.icons.close : s.options.icons.open) + '"></span>');
h.push("</a>")
}
h.push("</div>");
var c = $(h.join(""));
f.prepend(c);
s._trigger("paneHeaderCreated", null, {
element: f,
options: g
});
if (g.collapsible === "true") {
var e = function (a) {
var b = $(this),
parent = $(this).parent();
if (d.collapsed === true) {
$(this).find("span").removeClass(_BASE_ICON_CLASS + s.options.icons.open).addClass(_BASE_ICON_CLASS + s.options.icons.close);
d.collapsed = false
} else {
$(this).find("span").removeClass(_BASE_ICON_CLASS + s.options.icons.close).addClass(_BASE_ICON_CLASS + s.options.icons.open);
d.collapsed = true
}
parent.children().next().slideToggle("slow", function () {
s._trigger("paneHeaderToggled", a, {
element: f,
options: $.extend(true, {}, g, d)
});
b.one("click", e)
});
return false
};
f.find("div:eq(0)").css("cursor", "pointer").one("click", e)
}
if (g.state !== "open") {
f.children("div:gt(0)").data("hidden", true).css("display", "none")
}
}
}
},
"class": function (b, a) {
if (typeof a === "string") {
b.addClass(a)
}
},
config: function (b, a) {
if (!$.isEmptyObject(s.validateDataAttributes(a))) {
if (typeof b.attr("id") !== "undefined") {
var c = CT.LIB.StringV2.replaceSubstring(b.attr("id"), u, "");
if (typeof c === "string" && c.length > 0) {
s.options.configSettings[c.toUpperCase()] = a
}
}
}
},
title: function (b, a) {},
hide: function (b, a) {
if (typeof a === "string") {
a == "true" ? b.addClass(_BASE_CLASS + "auto-hide") : b.removeClass(_BASE_CLASS + "auto-hide")
}
},
overflow: function (b, a) {
if (typeof a === "string") {
a == "true" ? b.addClass(_BASE_CLASS + "allow-overflow") : b.removeClass(_BASE_CLASS + "allow-overflow")
}
},
attr: function (d, c) {
if (!$.isEmptyObject(s.validateDataAttributes(c))) {
$.each(c, function (b, a) {
try {
s.processDataTags[b](d, a)
} catch (err) {}
})
}
}
};
this.traverseDOM = function () {
var e = $(this.element).find("div").not('[data-ignore="true"]');
$.each(e, function (c, a) {
var b = $(a),
attributes = s.listDataAttributes(b);
for (var i = 0; i < attributes.length; i++) {
var d = attributes[i];
if (typeof b.data(d) !== "undefined") {
try {
s.processDataTags[d](b, b.data(d))
} catch (err) {} finally {
if (s.options.debug === false) {
b.removeAttr("data-" + d)
}
}
}
}
});
s.show()
};
this.processCSSRules = function (o) {
try {
var n = o.replace(/\/\*(?:(?!\*\/)[\s\S])*\*\/|[\r\n\t]+/g, "").replace(/([@]+)/g, _CSS_EXPRESSION).replace(/"/gi, "'").replace(/\s+/g, " ").replace(/^{/, "{\n").replace(/\}/g, "}\n");
n = "\n" + n;
n = n.replace(/\n\s*([^\{]+)\s*?\{/g, '\n"$1":{').replace(/([\{;])\s*([^:"\s]+)\s*:/g, '$1"$2":').replace(/":\s*([^\}\{;]+)\s*(;|(\}))/g, '":"$1",$3').replace(/\}/g, "},").replace(/,\s*\}/g, "}").replace(/\},\n/g, "},");
n = n.substring(0, n.length - 1);
var m = $.parseJSON("{" + n + "}");
CT.LIB.Object.each(m, function (d, e) {
d = d.replace(/^\s\s*/, "").replace(/\s\s*$/, "");
var f = /ct_css_expr_/gi;
if (f.test(d)) {
d = d.replace(/^ct_css_expr_/gi, "");
var l = d.split(/\s/);
if (l.length > 0) {
var h = l[0];
l.splice(0, 1);
var j = $(s.element).find((l.length > 0 ? l.join(" ") : (_BASE_CLASS_LOOKUP + "container")));
if (j.length > 0) {
if (/-header/gi.test(h)) {
var i = j.data("header");
if (i.enable === "true") {
var g = j.find("div:first a span");
if (g.length > 0) {
$.extend(true, i, {
icon: e
});
$(g.get(0)).addClass(_BASE_ICON_CLASS + i.icon.color)
}
}
} else {
if (!d.match(/\s/g)) {
$.extend(true, s.options[CSSHooks.cssCamelCase(h)], e)
}
j.data(h, e)
}
}
}
} else {
var c = {};
$.each(e, function (b, a) {
c[CSSHooks.cssCamelCase(b)] = a
});
try {
if (d.split(",").length > 1) {
var k = d.split(",");
for (var r = 0; r < k.length; r++) {
k[r] = k[r].replace(/^\s/, "");
CTStylesheet({
selector: "." + s.options.layout.baseClass + " " + k[r],
rule: CSSHooks.extend(c),
prefix: CSSHooks.getCurrentPrefix()
})
}
} else {
CTStylesheet({
selector: "." + s.options.layout.baseClass + " " + d,
rule: CSSHooks.extend(c),
prefix: CSSHooks.getCurrentPrefix()
})
}
} catch (err) {
if (typeof console !== "undefined") {
console.log(err.name);
console.log(err.message);
console.log("4. error modernizing key: " + d)
}
}
}
})
} catch (err) {
if (typeof console !== "undefined") {
console.log(err)
}
}
};
if (typeof o.css !== "undefined") {
$.ajax({
url: o.css,
success: function (a) {
s.traverseDOM();
if (typeof a !== "undefined") {
s.processCSSRules(a)
}
},
error: function () {
s.traverseDOM()
}
})
} else {
s.traverseDOM();
if (typeof o.cssRaw !== "undefined") {
s.processCSSRules(o.cssRaw)
}
}
},
_init: function () {
this.reset();
this._trigger("ready")
},
_isVertical: function (a) {
return (a.data("orientation") === _EAST || a.data("orientation") === _WEST)
},
_isHorizontal: function (a) {
return (a.data("orientation") === _NORTH || a.data("orientation") === _SOUTH)
},
_bindEvents: function () {
var d = this,
template = this.template;
d.element.bind("templatelayoutready", function (b, a) {
if (d.options.onReady) {
d.options.onReady.call(this, d.element)
}
});
d.element.bind("templatelayoutshow", function (b, a) {
if (d.options.onShow) {
d.options.onShow.call(this, d.element)
}
});
d.element.bind("templatelayoutreset", function (b, a) {
d.reset(a)
});
d.element.bind("templatelayoutpanecreated", function (b, a) {});
if (d.options.responsive === true) {
var c = 0;
function onResize() {
window.clearTimeout(c);
c = window.setTimeout(function () {
d.reset()
}, 500)
}
$(window).resize(onResize)
}
},
reset: function (f) {
var g = this,
tmpl = this.template,
opt = g.options,
f = f || tmpl;
var e = f.find(_BASE_CLASS_LOOKUP + "center");
if (e.length > 0) {
e.each(function (i, b) {
b = $(b);
var d = b.siblings(_BASE_CLASS_LOOKUP + "east");
var c = b.siblings(_BASE_CLASS_LOOKUP + "west");
if ((d.length > 0 && d.children().length > 0) || (c.length > 0 && c.children().length > 0)) {
if (b.children(_BASE_CLASS_LOOKUP + "center-wrapper").length === 0) {
b.wrapInner('<div class="' + _BASE_CLASS + 'center-wrapper" />')
}
var a = b.children(_BASE_CLASS_LOOKUP + "center-wrapper");
if (d.length > 0) {
a.css("marginLeft", d.outerWidth() + opt.layout.paddingOffset)
}
if (c.length > 0) {
a.css("marginRight", c.outerWidth() + opt.layout.paddingOffset)
}
}
})
}
},
refresh: function (a) {
var b = this.element,
o = this.options,
template = this.template;
if (a) {
this._trigger("refresh")
}
},
show: function (e) {
var a = this;
if (this._trigger("beforeShow") === false || this._isShown) {
return
}
var o = this.options;
a.template.css("visibility", "visible").fadeTo(a.transitionSpeed, 1);
this._isShown = true;
this._trigger("show")
},
hide: function () {
if (this._trigger("beforeHide") === false) {
return
}
var o = this.options;
self.template.fadeTo(self.transitionSpeed, 0).css("visibility", "hidden");
this._isShown = false;
this._trigger("hide")
},
loader: function (b, c) {
var a = this,
tmpl = this.template,
loader = tmpl.children(_BASE_CLASS_LOOKUP + "loader"),
opt = a.options.layout.loader,
b = b || opt.label;
if (loader.length === 0) {
loader = $('<div data-type="loader" class="' + _BASE_CLASS + 'loader"></div>');
if (typeof b !== "undefined") {
loader.append("<div><h2>" + b + "</h2></div>")
}
new CTSpinner($.extend(CT.ABE.Settings.widgets.spinner, {
left: "50%",
msg: b
})).spin(loader.get(0));
if (typeof c !== "undefined") {
loader.append(c)
}
loader.prependTo(tmpl)
} else {
loader.remove()
}
},
getPane: function (d, a) {
var c = this,
tmpl = this.template,
a = a || 0,
pane;
var b = this.element.find('[data-level="' + a + '"]');
if (b.length > 0) {
pane = $(b.find(_BASE_CLASS_LOOKUP + d))
}
return pane
},
getConfigSettings: function (b) {
var a = this,
options = this.options;
return options.configSettings[b] || {}
},
findPlaceholder: function (a) {
return el.find(_BASE_CLASS_LOOKUP).get(a || 0)
},
destroy: function () {
$.Widget.prototype.destroy.call(this);
this.template.remove();
this.element.empty();
return this
},
widget: function () {
return this.element
},
_setOption: function (c, a) {
var b = this.template;
switch (c) {
case "tmpl":
this._construct($(a));
break
}
$.Widget.prototype._setOption.apply(this, arguments)
}
});
$.CT.templateLayout.prototype.validateDataAttributes = function (a) {
if (typeof a === "string") {
try {
a = $.parseJSON(a)
} catch (err) {
if (typeof console) {
console.error(a)
}
}
}
if (typeof a === "object") {
return a
}
return {}
};
$.CT.templateLayout.prototype.listDataAttributes = function (c) {
var b = [],
prefix = "data-";
if (typeof c !== "undefined") {
c.each(function () {
var a = [];
for (var i = 0; i < this.attributes.length; i++) {
if (this.attributes[i].nodeName.substr(0, prefix.length) === prefix) {
a.push(this.attributes[i].nodeName.substr(prefix.length))
}
}
b.push(a)
})
}
return (b.length > 1 ? b : b[0])
};
$.CT.templateLayout.prototype.getPaneElement = function (q, o, p) {
var n = this,
tmpl = this.template;
element = function (m, k, l) {
m = m || "";
l = l || false;
var j = k || n.element,
container = !l ? j.find("#" + (u + m).toLowerCase()) : $(m);
if (container.length === 0) {
return $.noop()
}
show = function () {
if (abeSC.step === 3 || abeSC.step === 4) {
$("body").addClass("ct-ui-body-color");
$("#ct_tmpl_layout_inclusions").removeClass("ct-ui-summary_from_open")
} else {
$("body").removeClass("ct-ui-body-color")
} if (container.length > 0) {
var b = container.closest(_BASE_CLASS_LOOKUP + "carousel-item");
if (b.length > 0) {
b.parent().children().not(_BASE_CLASS_LOOKUP + "carousel-breadcrumbs").removeClass(_BASE_CLASS + "carousel-item-active");
b.addClass(_BASE_CLASS + "carousel-item-active");
if ($("#ct-ui-breadcrumbs").length > 0) {
var d = $("#ct-ui-breadcrumbs"),
target = ".ct-ui-step" + abeSC.step;
d.find("span").removeClass("ct-ui-p-color");
if (abeSC.step <= $("#ct-ui-breadcrumbs ol li").length) {
d.attr("data-ctstep", abeSC.step);
d.find(target + " span").addClass("ct-ui-p-color");
d.slideDown()
} else {
d.attr("data-ctstep", "full");
d.slideUp()
} if (abeSC.step === 2) {
$(".ct-ui-step2, .ct-ui-step3").removeClass("ct-ui-clickable");
var c = n.options.layout.carousel;
if (c.breadcrumbs.clickable === "true") {
d.die("click")
}
}
if (abeSC.step === 3) {
$(".ct-ui-step2, .ct-ui-step3").addClass("ct-ui-clickable");
var c = n.options.layout.carousel;
if (c.breadcrumbs.clickable === "true") {
d.die("click").live("click", function (e) {
if (e.target.tagName == "LI") {
var a = $(e.target),
stepToLoad = a.data("history");
$.publish("/tracking/analytics", ["breadcrumb", stepToLoad]);
if (abeSC.step > 1) {
if (typeof c.breadcrumbs.callback === "function") {
c.breadcrumbs.callback.apply(c.breadcrumbs.callback, [stepToLoad])
}
}
}
})
}
}
}
n.reset(b)
}
container.css("display", "").find(".ct-ui-pane-item").css("display", "")
}
return this
};
hide = function () {
if (container.length > 0) {
container.css("display", "none")
}
return this
};
block = function (b, i, h, c, a, d) {
if (container.length > 0) {
var f = n.options.layout.loader,
wrapper = $("<div>" + b + "</div>"),
loader = $('<div data-type="loader" class="' + _BASE_CLASS + 'loader"></div>');
if (c) {
if (container.children(":not(" + _BASE_CLASS_LOOKUP + "header)").length > 0) {
new CTSpinner($.extend(CT.ABE.Settings.widgets.spinner, {
left: "50%",
msg: ""
})).spin(loader.get(0));
wrapper.append(loader)
}
} else {
wrapper.addClass(_BASE_CLASS + "messagebox").children(":first").addClass(_BASE_CLASS + "messagebox-heading");
var g = [];
g.push('<button class="ct-ui-button ct-ui-button-text-icons" role="button" aria-disabled="false">');
g.push('<span class="ct-ui-button-icon-primary ct-ui-icon-primary ct-ui-icon-white ct-ui-icon-circle-cross"></span>');
g.push('<em class="ct-ui-button-text">' + $.i18n.locale.closeButton + "</em>");
g.push("</button>");
g = $(g.join("")).one("click", function (e) {
e.preventDefault();
container.unblock()
});
wrapper.append($(g))
}
container.block({
message: $(wrapper),
css: $.extend({
background: "none",
border: "none",
width: "auto",
cursor: "default"
}, d),
overlayCSS: {
backgroundColor: "#0F64BB",
opacity: 0.4,
cursor: "default"
},
onBlock: i,
onUnblock: h,
timeout: (typeof a === "number" ? a : 0),
centerX: true,
centerY: false
})
}
return this
}, unblock = function () {
if (container.length > 0) {
container.unblock()
}
return this
}, push = function (c, g) {
if (container.length > 0 && typeof c !== "undefined") {
if (typeof c === "string") {
c = $(c)
}
var h = (typeof c.attr("class") !== "undefined" && c.attr("class").length > 0 ? ("." + c.attr("class")) : (typeof c.attr("id") !== "undefined" && c.attr("id").length > 0 ? ("#" + c.attr("id")) : ""));
if (h.length > 0 && container.find(h).length > 0) {
$(container.find(h).get(0)).replaceWith(c)
} else {
g = g || "end";
switch (g) {
case "top":
c.prependTo($(container));
break;
case "end":
c.appendTo($(container));
break
}
}
var d;
if (typeof container.data("icon-swatch") !== "undefined") {
d = $.extend(true, {}, n.options.iconSwatch, container.data("icon-swatch"))
} else {
d = $.extend(true, {}, n.options.iconSwatch)
}
var f = c.find('[class*="' + _BASE_ICON_CLASS + '"]');
if (f.length > 0) {
f.addClass(function (a, b) {
if (typeof b !== "undefined" && b.match(/\bct-ui-icon-primary+/g)) {
return _BASE_ICON_CLASS + d.primary
} else {
if (typeof b !== "undefined" && b.match(/\bct-ui-icon-secondary+/g)) {
return _BASE_ICON_CLASS + d.secondary
} else {
if (typeof b !== "undefined" && b.match(/\bct-ui-icon-tertiary+/g)) {
return _BASE_ICON_CLASS + d.tertiary
} else {
if (typeof b !== "undefined" && b.match(/\bct-ui-icon-quaternary+/g)) {
return _BASE_ICON_CLASS + d.quaternary
}
}
}
}
return ""
})
}
if (typeof container.data("header") !== "undefined") {
var e = $.extend(true, {}, n.options.layout.header, container.data("header"));
if (e.state !== "open") {
container.data("header").collapsed = true;
container.children("div:gt(0)").css("display", "none")
} else {
container.data("header").collapsed = false;
container.children("div:gt(0)").css("display", "")
}
}
}
return this
};
remove = function (a) {
if (container.length > 0 && typeof a !== "undefined") {
if (typeof a === "string") {
a = $(a)
}
var b = (typeof a.attr("class") !== "undefined" && a.attr("class").length > 0 ? ("." + a.attr("class")) : (typeof a.attr("id") !== "undefined" && a.attr("id").length > 0 ? ("#" + a.attr("id")) : ""));
if (b.length > 0 && container.find(b).length > 0) {
$(container.find(b).get(0)).remove(a)
}
}
return this
};
addBox = function (a, d) {
if (container.length > 0) {
var c = $.extend(true, {}, n.options.layout.box, d);
if (c.content.length > 0) {
var b = c.custom ? c.content : CT.LIB.templateV2.tmpl(n._BOX_TEMPLATE, c, this);
if (b.length > 0) {
switch (c.position) {
case "start":
$(a || container).prepend(b);
break;
case "before":
$(a || container).before(b);
break;
case "after":
$(a || container).after(b);
break;
case "end":
$(a || container).append(b);
break;
default:
$(a || container).append(b);
break
}
var e = $("#ct_box_" + c.id);
if (c.title.icon) {
e.find(".ct-ui-box-title").prepend("<span class='icon-ct-" + c.title.icon + "'></span>")
}
if (c.collapsible === true) {
e.data("state", c.state).find(".ct-ui-box-title").addClass("ct-ui-hover").append("<span class='ct-toggle icon-ct-caret-" + (c.state === "expanded" ? "down" : "right") + "'></span>");
if (c.state === "collapsed") {
e.find(".ct-ui-box-content").hide()
}
if ($.isFunction(c.stateCallback)) {
c.stateCallback(e, e.data("state"))
}
e.find(".ct-ui-box-title").bind("click", function () {
e.data("state", e.data("state") === "expanded" ? "collapsed" : "expanded");
if ($.isFunction(c.stateCallback)) {
c.stateCallback(e, e.data("state"))
}
$(this).siblings(".ct-ui-box-content").slideToggle("slow", function () {
if (e.data("state") === "expanded") {
e.find(".ct-toggle").removeClass("icon-ct-caret-right").addClass("icon-ct-caret-down")
} else {
e.find(".ct-toggle").removeClass("icon-ct-caret-down").addClass("icon-ct-caret-right")
} if (c.tagName) {
$.publish("/tracking/analytics", [c.tagName, e.data("state")])
}
if ($.isFunction(c.stateEndCallback)) {
c.stateEndCallback(e, e.data("state"))
}
})
})
}
if (c.hide && c.id) {
e.hide()
}
if (c.sticky) {
e.parent().addClass("ct-ui-box-sticky")
}
}
}
}
return this
};
getICONSwatch = function () {
var a;
if (container.length > 0) {
if (typeof container.data("icon-swatch") !== "undefined") {
a = $.extend(true, {}, n.options.iconSwatch, container.data("icon-swatch"))
} else {
a = $.extend(true, {}, n.options.iconSwatch)
}
}
return a
};
getICONS = function () {
var a;
if (container.length > 0) {
if (typeof container.data("icons") !== "undefined") {
a = $.extend(true, {}, n.options.icons, container.data("icons"))
} else {
a = $.extend(true, {}, n.options.icons)
}
}
return a
};
visible = function (a) {
if (container.length > 0) {
container.children(":not(" + _BASE_CLASS_LOOKUP + "header)").data("hidden", a).css("display", a ? "block" : "none")
}
return this
};
showLoader = function (a, b) {
var c = container.children(_BASE_CLASS_LOOKUP + "loader"),
opt = n.options.layout.loader,
a = a || opt.label;
container.children(":not(" + _BASE_CLASS_LOOKUP + "loader)").css("display", "none");
if (c.length === 0) {
c = $('<div data-type="loader" class="' + _BASE_CLASS + 'loader"></div>');
new CTSpinner($.extend(CT.ABE.Settings.widgets.spinner, {
left: "50%",
msg: a
})).spin(c.get(0));
if (typeof b !== "undefined") {
c.append(b)
}
c.prependTo(container)
} else {
c.find("div.ct-ui-spinner-msg").html(a);
c.css("display", "")
}
return this
};
hideLoader = function () {
var a = container.children(_BASE_CLASS_LOOKUP + "loader");
if (a.length > 0) {
a.css("display", "none")
}
container.children(":not(" + _BASE_CLASS_LOOKUP + "loader)").css("display", "");
return this
};
getDOM = function () {
if (container.length > 0) {
return container
}
};
find = function (a) {
if (container.length > 0 && typeof a !== "undefined") {
return element(a, container)
}
};
clear = function (a) {
a = a || false;
if (container.length > 0) {
a ? container.empty() : container.children(":not(" + _BASE_CLASS_LOOKUP + "loader)").remove()
}
return this
};
return this
};
return element(q, o, p)
};
$.CT.templateLayout.prototype.getExternalPane = function (a) {
return $.CT.templateLayout.prototype.getPaneElement(a, v, true)
}
})(jQCT);
var CSSHooks = (function ($) {
var r = this,
tmpl = this.template,
currentPrefix;
init = function () {
if (window.getComputedStyle) {
var l = getComputedStyle(document.documentElement, null);
if (l.length) {
for (var i = 0; i < l.length; i++) {
if (l[i].charAt(0) === "-") {
var o = l[i].indexOf("-", 1);
currentPrefix = l[i].substr(1, o - 1)
}
}
} else {
currentPrefix = "o"
}
} else {
currentPrefix = "ms"
}
var q = document.createElement("div"),
divStyle = q.style,
support = $.support,
regexLinear = /^(.*?)linear-gradient(.*?)$/i,
regexLinearSettings = /^(.*?)(:?linear-gradient)(\()(.*)(\))(.*?)$/i,
regexSupportLinearW3C = /(^|\s)linear-gradient/,
regexSupportLinearMoz = /(^|\s)-moz-linear-gradient/,
regexSupportLinearWebkit = /(^|\s)-webkit-linear-gradient/,
regexSupportLinearWebkit2 = /(^|\s)-webkit-gradient/,
regexSupportLinearMs = /(^|\s)-ms-linear-gradient/,
regexSupportLinearIE = /(^|\s)progid:DXImageTransform.Microsoft.gradient/,
regexSupportLinearOpera = /(^|\s)-o-linear-gradient/,
regexWhitespace = /\s/,
regexParenWhitespace = /\)\s/,
regexWhiteGlobal = /\s/g,
cssBorderProps = "TopLeft TopRight BottomRight BottomLeft".split(" "),
cssBackgroundProps = "background backgroundImage",
cssLinearProps = "background-image: -moz-linear-gradient(red, blue);background-image: -webkit-gradient(linear, 0% 100%, 0% 0%, color-stop(0.5, red), color-stop(0.5, blue)); background-image: -webkit-linear-gradient(red, blue);background-image: -o-linear-gradient(red, blue);background-image: linear-gradient(red, blue);background-image: -ms-linear-gradient(red, blue); filter: progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr='#ffffff', endColorstr='#000000');",
cssBackgroundPropsArray = cssBackgroundProps.split(regexWhitespace);
support.borderRadius = divStyle.MozBorderRadius === "" ? "MozBorderRadius" : (divStyle.MsBorderRadius === "" ? "MsBorderRadius" : (divStyle.WebkitBorderRadius === "" ? "WebkitBorderRadius" : (divStyle.OBorderRadius === "" ? "OBorderRadius" : (divStyle.borderRadius === "" ? "BorderRadius" : false))));
support.boxShadow = divStyle.MozBoxShadow === "" ? "MozBoxShadow" : (divStyle.MsBoxShadow === "" ? "MsBoxShadow" : (divStyle.WebkitBoxShadow === "" ? "WebkitBoxShadow" : (divStyle.OBoxShadow === "" ? "OBoxShadow" : (divStyle.boxShadow === "" ? "BoxShadow" : false))));
divStyle.cssText = cssLinearProps;
$.support.linearGradient = regexSupportLinearW3C.test(divStyle.backgroundImage) ? "linear-gradient" : (regexSupportLinearMoz.test(divStyle.backgroundImage) ? "-moz-linear-gradient" : (regexSupportLinearWebkit.test(divStyle.backgroundImage) ? "-webkit-linear-gradient" : (regexSupportLinearWebkit2.test(divStyle.backgroundImage) ? "-webkit-gradient" : (regexSupportLinearMs.test(divStyle.backgroundImage) ? "-ms-linear-gradient" : (regexSupportLinearOpera.test(divStyle.backgroundImage) ? "-o-linear-gradient" : (regexSupportLinearIE.test(divStyle.filter) ? "progid:DXImageTransform.Microsoft.gradient" : false))))));
support.textShadow = (divStyle.textShadow === "");
if (support.borderRadius && support.borderRadius !== "BorderRadius") {
borderCornerRadius = function (b, a) {
a = a === undefined || a === "" ? "border" : a + "Border";
if (support.borderRadius && support.borderRadius == "MozBorderRadius") {
return a + "Radius" + b.charAt(0).toUpperCase() + b.substr(1).toLowerCase()
} else {
return a + b + "Radius"
}
};
var p = support.borderRadius.replace("BorderRadius", "");
$.cssHooks.borderRadius = {
get: function (b, c, d) {
return $.map(cssBorderProps, function (a) {
return $.css(b, borderCornerRadius(a, p))
}).join(" ")
},
set: function (b, a) {
b.style[borderCornerRadius("", p)] = a
}
};
$.each(cssBorderProps, function (i, d) {
$.cssHooks["borderRadius" + d] = {
get: function (a, b, c) {
return $.css(a, borderCornerRadius(d, p))
},
set: function (b, a) {
b.style[borderCornerRadius(d, p)] = a
}
}
})
}
if (support.boxShadow && support.boxShadow !== "BoxShadow") {
var n = function (d, b, c) {
var a = d.split(regexWhitespace);
a[c] = b;
return a.join(" ")
};
$.cssHooks.boxShadow = {
get: function (a, b, c) {
return $.css(a, support.boxShadow)
},
set: function (b, a) {
b.style[support.boxShadow] = a
}
};
$.cssHooks.boxShadowColor = {
get: function (a, b, c) {
return $.css(a, support.boxShadow).split(regexParenWhitespace)[0] + ")"
},
set: function (b, a) {
b.style[support.boxShadow] = a + " " + $.css(b, support.boxShadow).split(regexParenWhitespace)[1]
}
};
$.cssHooks.boxShadowBlur = {
get: function (a, b, c) {
return $.css(a, support.boxShadow).split(regexWhitespace)[5]
},
set: function (b, a) {
b.style[support.boxShadow] = n($.css(b, support.boxShadow), a, 5)
}
};
$.cssHooks.boxShadowSpread = {
get: function (a, b, c) {
return $.css(a, support.boxShadow).split(regexWhitespace)[6]
},
set: function (b, a) {
b.style[support.boxShadow] = n($.css(b, support.boxShadow), a, 6)
}
};
$.cssHooks.boxShadowX = {
get: function (a, b, c) {
return $.css(a, support.boxShadow).split(regexWhitespace)[3]
},
set: function (b, a) {
b.style[support.boxShadow] = n($.css(b, support.boxShadow), a, 3)
}
};
$.cssHooks.boxShadowY = {
get: function (a, b, c) {
return $.css(a, support.boxShadow).split(regexWhitespace)[4]
},
set: function (b, a) {
b.style[support.boxShadow] = n($.css(b, support.boxShadow), a, 4)
}
};
var m = "Blur Spread X Y".split(" ");
$.each(m, function (i, b) {
var c = "boxShadow" + b;
$.fx.step[c] = function (a) {
$.cssHooks[c].set(a.elem, a.now + a.unit)
}
})
}
if ($.support.linearGradient && $.support.linearGradient !== "linear-gradient") {
linearColor = function (b) {
var a = b.split(/ /);
if (a.length === 2) {
return a[0]
}
};
linearSettings = function (e) {
var d = regexLinearSettings.exec(e);
var c = d[4].split(/,\s?/);
if (currentPrefix == "ms") {
if (typeof divStyle.opacity != "undefined") {
if (c.length == 2) {
var g = '<svg xmlns="http://www.w3.org/2000/svg" version="1.0"><defs><linearGradient id="gradient" x1="0" y1="0" x2="0" y2="100%"><stop offset="0%" style="stop-color: ' + c[0] + ';"/><stop offset="100%" style="stop-color: ' + c[1] + ';"/></linearGradient></defs><rect x="0" y="0" fill="url(#gradient)" width="100%" height="100%" /></svg>';
return "url(data:image/svg+xml," + escape(g) + ")"
} else {
if (c.length >= 3) {
if (typeof c[3] !== "undefined" && c[3] === "true") {
return ""
}
var g = '<svg xmlns="http://www.w3.org/2000/svg" version="1.0"><defs><linearGradient id="gradient" x1="0" y1="0" x2="0" y2="100%"><stop offset="0%" style="stop-color: ' + (linearColor(c[0] === "top" ? c[1] : c[2])) + ';"/><stop offset="100%" style="stop-color: ' + (linearColor(c[0] === "top" ? c[2] : c[1])) + ';"/></linearGradient></defs><rect x="0" y="0" fill="url(#gradient)" width="100%" height="100%" /></svg>';
return "url(data:image/svg+xml," + escape(g) + ")"
}
}
} else {
if (c.length == 2) {
return "progid:DXImageTransform.Microsoft.gradient(startColorStr='" + c[0] + "',EndColorStr='" + c[1] + "')"
} else {
if (c.length >= 3) {
if (typeof c[3] !== "undefined" && c[3] === "true") {
return ""
}
return "progid:DXImageTransform.Microsoft.gradient(startColorStr='" + (linearColor(c[0] === "top" ? c[1] : c[2])) + "',EndColorStr='" + (linearColor(c[0] === "top" ? c[2] : c[1])) + "')"
}
}
}
} else {
if (currentPrefix == "webkit") {
if (c.length >= 3) {
var h = "left top, left bottom";
if (c[0] === "bottom") {
h = "left bottom, left top"
}
var f = function (b) {
var a = b.split(/ /);
if (a.length === 2) {
return a[1] + ", " + a[0]
}
};
return "-webkit-gradient(linear, " + h + ", color-stop(" + f(c[1]) + "), color-stop(" + f(c[2]) + "))"
}
} else {
if (c.length === 4) {
e = e.replace(/,\s/g, ",");
e = e.replace(",true", "")
}
e = e.replace(d[2], $.support.linearGradient)
}
}
return e
};
$.each(cssBackgroundPropsArray, function (i, c) {
$.cssHooks[c] = {
set: function (b, a) {
if (regexLinear.test(a)) {
if (currentPrefix === "ms" && typeof divStyle.opacity === "undefined") {
b.style.filter = linearSettings(a);
b.style.background = "url(#)"
} else {
b.style[c] = linearSettings(a)
}
} else {
b.style[c] = a
}
}
}
})
}
delete q, divStyle;
extend = function (k) {
$.each(k, function (j, d) {
switch (j) {
case "borderRadius":
if (support.borderRadius) {
if (support.borderRadius !== "BorderRadius") {
delete k.borderRadius;
k[borderCornerRadius("", p)] = d
}
} else {
delete k.borderRadius
}
break;
case "background":
case "backgroundImage":
if ($.support.linearGradient && $.support.linearGradient !== "linear-gradient") {
if (regexLinear.test(d)) {
if (currentPrefix === "ms" && typeof divStyle.opacity === "undefined") {
k.filter = linearSettings(d);
k.background = "url(#)";
var e = regexLinearSettings.exec(d);
var f = e[4].split(/,\s?/);
if (f.length === 2) {
k.backgroundColor = f[f.length - 1]
} else {
if (f.length === 3) {
k.backgroundColor = linearColor(f[f.length - 1])
}
}
delete k.backgroundImage
} else {
k[j] = linearSettings(d)
}
} else {
k[j] = d
}
} else {
if (currentPrefix === "moz" && regexLinear.test(d)) {
k[j] = "-moz-" + d
} else {
if (currentPrefix === "webkit" && regexLinear.test(d)) {
k[j] = "-webkit-" + d
}
}
}
break;
case "boxShadow":
if (!support.boxShadow) {
delete k.boxShadow
}
break;
case "textShadow":
if (!support.textShadow) {
delete k.textShadow
}
break;
case "backgroundColor":
if (currentPrefix === "ms" && typeof divStyle.opacity === "undefined" && d.indexOf("rgba") === 0) {
var g = function (c) {
var a = c.replace(/^rgba\s?\(\s?(.*?)\s?\)$/, "$1").split(/,\s?/);
var b = [];
var h;
for (var i = 0; i < a.length; i++) {
if (i == 3) {
a[i] *= 255
}
h = "0" + parseInt(a[i], 10).toString(16);
b.push(h.substr(h.length - 2, 2).toUpperCase())
}
b.splice(0, 0, b.pop());
return "#" + b.join("")
};
d = g(d);
k.filter = "progid:DXImageTransform.Microsoft.gradient(startColorStr='" + d + "',EndColorStr='" + d + "')";
k.background = "url(#)";
delete k.backgroundColor
}
break
}
});
return k
};
lookup = function (b) {
var a = "";
if (typeof b !== "undefined") {
b = b.get(0);
a += b.nodeName.toLowerCase();
a += (b.id.length > 0 ? ("#" + b.id) : ("." + b.className.replace(/\s/g, ".")))
}
return a
};
getCurrentPrefix = function () {
return currentPrefix
};
cssCamelCase = function (a) {
var s = $.camelCase(a);
return (r.currentPrefix == "ms") ? s.substr(0, 1).toLowerCase() + s.substr(1) : s
};
return this
};
return init()
})(jQCT);
var CTStylesheet = (function ($) {
var g, CTStylesheetProto, doc = document,
head = doc.head || doc.getElementsByTagName("head")[0],
sheets = doc.styleSheets,
currentPrefix;
g = function (e) {
var c = new CTStylesheetProto();
if (e.sheet instanceof Array || typeof e.sheet === "string") {
if (typeof e.sheet === "string") {
e.sheet = e.sheet.split("\n")
}
try {
var r;
for (r = 0; r < e.sheet.length; r++) {
var d = e.sheet[r];
d = d.replace(/\/\*(?:(?!\*\/)[\s\S])*\*\/|[\r\n\t]+/g, "").replace(/"/gi, "'").replace(/([@]+)/g, "ct_css_expr_").replace(/\s+/g, " ").replace(/^{/, "{\n").replace(/\}/g, "}\n");
d = "\n" + d;
d = d.replace(/\n\s*([^\{]+)\s+?\{/g, '\n"$1":{').replace(/([\{;])\s*([^:"\s]+)\s*:/g, '$1"$2":').replace(/":\s*([^\}\{;]+)\s*(;|(\}))/g, '":"$1",$3').replace(/,\s*\}/g, "}").replace(/\n+/g, "");
d = $.parseJSON("{" + d + "}");
var f = {};
$.each(CT.LIB.Object.getValues(d)[0], function (b, a) {
f[CSSHooks.cssCamelCase(b)] = a
});
c.init(CT.LIB.Object.getKey(d), e.id || g).add(CSSHooks.extend(f))
}
} catch (err) {
if (typeof console !== "undefined") {
console.log(err)
}
}
} else {
currentPrefix = e.prefix;
c.init(e.selector, e.rule)
}
return c
};
g._sheetToNode = function (a) {
return a.ownerNode || a.owningElement
};
g._nodeToSheet = function (a) {
var b, i;
for (i = 0; i < sheets.length; i++) {
if (a === g._sheetToNode(sheets[i])) {
b = sheets[i];
break
}
}
return b
};
g._getSheets = function (a) {
var b = [],
node, i;
if (!a) {
b = sheets
} else {
if (typeof a == "number") {
b = [sheets[a]]
} else {
if (typeof a == "object") {
if (a.href) {
for (i = 0; i < sheets.length; i++) {
node = g._sheetToNode(sheets[i]);
if (a.href && node.href == a.href || a.title && node.title == a.title) {
b.push(sheets[i])
}
}
}
} else {
if (typeof a == "string") {
for (i = 0; i < sheets.length; i++) {
node = g._sheetToNode(sheets[i]);
if (node.id == a) {
b.push(sheets[i])
}
}
}
}
}
}
return b
};
g._addSheet = function () {
var a = doc.createElement("style"),
i;
a.type = "text/css";
a.rel = "stylesheet";
head.appendChild(a);
if (currentPrefix === "webkit") {
var b = doc.getElementsByTagName("style");
sheets = [];
for (i = 0; i < b.length; ++i) {
sheets.push(b[i].sheet)
}
}
return g._nodeToSheet(a)
};
g._removeSheet = function (a) {
var b = g._sheetToNode(a);
b.parentNode.removeChild(b)
};
g._getRules = function (a, b) {
var c = [],
rules, i;
if (typeof a.length == "number") {
for (i = 0; i < a.length; i++) {
c = c.concat(g._getRules(a[i], b))
}
} else {
rules = a.cssRules || a.rules;
for (i = 0; i < rules.length; i++) {
if (rules[i].selectorText && rules[i].selectorText.toLowerCase() == b.toLowerCase()) {
c.push({
sheet: a,
index: i,
style: rules[i].style
})
}
}
}
return c
};
g._addRule = function (b, c) {
var a = b.cssRules || b.rules,
index = a.length;
if (b.insertRule) {
b.insertRule(c + " { }", index)
} else {
if (b.addRule) {
b.addRule(c, null, index)
}
}
return {
sheet: b,
index: index,
style: a[index].style
}
};
g._removeRule = function (a) {
var b = a.sheet,
index = a.index;
if (b.deleteRule) {
b.deleteRule(index)
} else {
if (b.removeRule) {
b.removeRule(index)
}
}
};
CTStylesheetProto = function () {};
CTStylesheetProto.prototype = {
init: function (a, b) {
var i;
if (typeof b === "undefined") {
if (!this.sheets) {
this.sheets = g._getSheets()
}
} else {
if (b === g) {
if (g.dfault === undefined) {
g.dfault = g._addSheet()
}
this.sheets = [g.dfault]
} else {
if (typeof b == "number" || typeof b == "string") {
this.sheets = g._getSheets(b)
} else {
if (typeof b == "object") {
return this.init(a, g).add(b)
}
}
}
}
this.selector = a;
return this
},
add: function (b, a) {
var i;
for (i = 0; i < this.sheets.length; i++) {
if (g._getRules(this.sheets[i], this.selector).length == 0) {
g._addRule(this.sheets[i], this.selector)
}
}
this.set(b, a);
return this
},
set: function (b, a) {
var i, rules;
if (a === undefined) {
if (b && typeof b == "object") {
for (i in b) {
if (!b.hasOwnProperty(i)) {
continue
}
this.set(i, b[i])
}
}
} else {
rules = g._getRules(this.sheets, this.selector);
for (i = 0; i < rules.length; i++) {
rules[i].style[b] = a
}
}
return this
},
get: function (b) {
var a, rules = g._getRules(this.sheets, this.selector),
propName, i, j;
if (b !== undefined) {
for (i = rules.length - 1; i >= 0; i--) {
if (rules[i].style[b] != null) {
a = rules[i].style[b];
break
}
}
} else {
a = {};
for (i = 0; i < rules.length; i++) {
for (j = 0; j < rules[i].style.length; j++) {
propName = rules[i].style[j];
a[propName] = rules[i].style[propName]
}
}
}
return a
},
remove: function () {
var a = g._getRules(this.sheets, this.selector),
i;
for (i = a.length - 1; i >= 0; i--) {
g._removeRule(a[i])
}
}
};
return g
})(jQCT);
(function ($) {
var k = {
namespace: function (b, c) {
if (typeof b === "string") {
var d = window,
ns = b.split("."),
len = ns.length;
$.each(ns, function (i, a) {
d = d[a] = d[a] || (i + 1 == len && c ? c : {})
})
}
},
Class: (function () {
var j = {}, setdiff = function (d, c) {
var e = {};
$.each(d, function (b, a) {
if (typeof c[b] === "undefined") {
e[b] = d[b]
}
});
return e
}, setupClass = function (d, a, b, c) {
if (!d.__override__) {
d.__override__ = function (o, s) {
j.override(d, o, s)
}
}
if (!d.__statics__) {
d.__statics__ = function (s) {
j.override(d, null, s)
}
}
if (!d.__extend__) {
d.__extend__ = function (o, s) {
return j.extend(d, o, s)
}
}
if (!d.__implement__) {
d.__implement__ = function (o, s) {
return j.implement(d, o, s)
}
}
if (!d.__bind__) {
d.__bind__ = function (t, h) {
j.bind(d, t, h)
}
}
if (!d.__unbind__) {
d.__unbind__ = function (t, h) {
j.unbind(d, t, h)
}
}
j.override(d, a, b);
j.bind(d, c);
return d
}, emptyClass = function () {
return function () {}
};
j.override = function (c, a, b) {
if (typeof c === "object") {
b = $.extend(a, b);
a = null
}
if (a) {
delete a.constructor;
$.extend(c.prototype, a)
}
if (b) {
$.extend(c, b)
}
};
j.bind = function (e, c, b) {
if (c) {
if (typeof e !== "function") {
$.error("Invalid class")
}
var d = {};
if (typeof c === "string") {
d[c] = b
} else {
d = c
}
var a = document.removeEventListener ? "removeEventListener" : "detachEvent";
if (typeof e.prototype[a] !== "function") {
e.prototype[a] = $.noop
}
$(e.prototype).bind(d)
}
};
j.unbind = function (c, b, a) {
if (typeof c !== "function") {
$.error("Invalid class")
}
$(c.prototype).unbind(b, a)
};
j.implement = function (g, d, b, c, e) {
if (typeof g !== "function") {
c = b;
b = d || {};
d = g;
if (typeof b.constructor === "function" && b.constructor != Object.prototype.constructor) {
g = b.constructor
} else {
g = emptyClass()
}
}
d = d instanceof Array ? d : [d];
var f = {};
$.each(d, function (i, a) {
$.extend(f, a.prototype || a)
});
b = $.extend(setdiff(f, g.prototype), b);
return setupClass(g, b, c, e)
};
j.implementOnce = function (a) {
if (!a.__implemented__) {
j.implement.apply(j, arguments);
a.__implemented__ = true
}
};
j.extend = function (a, d, b, c, e) {
if (typeof a !== "function") {
$.error("Invalid class")
}
if (typeof d !== "function") {
c = b;
b = d || {};
d = a;
if (typeof b.constructor === "function" && b.constructor != Object.prototype.constructor) {
a = b.constructor
} else {
a = function () {
d.apply(this, arguments)
}
}
}
var I = emptyClass();
I.prototype = d.prototype;
a.prototype = new I;
a.prototype.constructor = a;
a.__superclass__ = d.prototype;
return setupClass(a, b, c, e)
};
j.extendOnce = function (a) {
if (!a.__extended__) {
j.extend.apply(j, arguments);
a.__extended__ = true
}
};
j.create = function (e, a, b, c) {
var d;
if (typeof e === "function") {
d = j.extend(e, a, b, c)
} else {
if (e instanceof Array) {
d = j.implement(e, a, b, c)
} else {
b = a;
a = e;
d = j.extend(Object, a, b, c)
}
}
return d
};
return j
})()
};
$.namespace = k.namespace;
$.Class = k.Class;
$.oojs = k
})(jQCT);
(function ($) {
$.cookie = function (k, d, a) {
if (typeof d != "undefined") {
a = a || {};
if (d === null) {
d = "";
a.expires = -1
}
var g = "";
if (a.expires && (typeof a.expires == "number" || a.expires.toUTCString)) {
var f;
if (typeof a.expires == "number") {
f = new Date();
f.setTime(f.getTime() + (a.expires * 24 * 60 * 60 * 1000))
} else {
f = a.expires
}
g = "; expires=" + f.toUTCString()
}
var b = a.path ? "; path=" + (a.path) : "";
var e = a.domain ? "; domain=" + (a.domain) : "";
var l = a.secure ? "; secure" : "";
document.cookie = [k, "=", encodeURIComponent(d), g, b, e, l].join("")
} else {
if (typeof k != "undefined") {
var h = null;
if (document.cookie && document.cookie != "") {
var c = document.cookie.split(";");
for (var i = 0; i < c.length; i++) {
var j = $.trim(c[i]);
if (j.substring(0, k.length + 1) == (k + "=")) {
h = decodeURIComponent(j.substring(k.length + 1));
break
}
}
}
} else {
var h = [];
if (document.cookie && document.cookie != "") {
var c = document.cookie.split(";");
for (var i = 0; i < c.length; i++) {
var j = $.trim(c[i]).split("=");
h.push({
name: j[0],
value: decodeURIComponent(j[1])
})
}
}
}
return h
}
}
})(jQCT);
(function ($) {
var h = {}, cache = {};
$.manageAjax = (function () {
function create(a, b) {
h[a] = new $.manageAjax._manager(a, b);
return h[a]
}
var c = {
create: create
};
return c
})();
$.manageAjax._manager = function (a, b) {
this.requests = {};
this.inProgress = 0;
this.name = a;
this.qName = a;
this.opts = $.extend({}, $.ajaxSettings, $.manageAjax.defaults, b);
if (b.queue && b.queue !== true && typeof b.queue === "string" && b.queue !== "clear") {
this.qName = b.queue
}
};
$.manageAjax._manager.prototype = {
add: function (o) {
o = $.extend({}, this.opts, o);
var e = o.complete,
origSuc = o.success,
beforeSend = o.beforeSend,
origError = o.error,
strData = (typeof o.data == "string") ? o.data : $.param(o.data || {}),
xhrID = o.type + o.url + strData,
that = this,
ajaxFn = this._createAjax(xhrID, o, origSuc, e);
if (this.requests[xhrID] && o.preventDoubbleRequests) {
return
}
ajaxFn.xhrID = xhrID;
o.xhrID = xhrID;
o.beforeSend = function (b, c) {
var a = beforeSend.call(this, b, c);
if (a === false) {
that._removeXHR(xhrID)
}
b = null;
return a
};
o.complete = function (a, b) {
that._complete.call(that, this, e, a, b, xhrID, o);
a = null
};
o.success = function (b, c, a) {
that._success.call(that, this, origSuc, b, c, a, o);
a = null
};
o.error = function (c, d, a) {
var b = "",
content = "";
if (d !== "timeout" && c) {
b = c.status;
content = c.responseXML || c.responseText
}
if (origError) {
origError.call(this, c, d, a, o)
} else {
setTimeout(function () {
throw d + "| status: " + b + " | URL: " + o.url + " | data: " + strData + " | thrown: " + a + " | response: " + content
}, 0)
}
c = null
};
if (o.queue === "clear") {
$(document).clearQueue(this.qName)
}
if (o.queue) {
$.queue(document, this.qName, ajaxFn);
if (this.inProgress < o.maxRequests) {
$.dequeue(document, this.qName)
}
return xhrID
}
return ajaxFn()
},
_createAjax: function (a, o, b, d) {
var c = this;
return function () {
if (o.beforeCreate.call(o.context || c, a, o) === false) {
return
}
c.inProgress++;
if (c.inProgress === 1) {
$.event.trigger(c.name + "AjaxStart")
}
if (o.cacheResponse && cache[a]) {
if (o.clearCache) {} else {
c.requests[a] = {};
setTimeout(function () {
c._complete.call(c, o.context || o, d, {}, "success", a, o);
c._success.call(c, o.context || o, b, cache[a], "success", {}, o)
}, 0)
}
} else {
if (o.async) {
c.requests[a] = $.ajax(o)
} else {
$.ajax(o)
}
}
return a
}
},
_removeXHR: function (a) {
if (this.opts.queue) {
$.dequeue(document, this.qName)
}
this.inProgress--;
this.requests[a] = null;
delete this.requests[a]
},
_isAbort: function (b, o) {
var a = !! (o.abortIsNoSuccess && (!b || b.readyState === 0 || this.lastAbort === o.xhrID));
b = null;
return a
},
_complete: function (d, b, a, e, c, o) {
if (this._isAbort(a, o)) {
e = "abort";
o.abort.call(d, a, e, o)
}
b.call(d, a, e, o);
$.event.trigger(this.name + "AjaxComplete", [a, e, o]);
if (o.domCompleteTrigger) {
$(o.domCompleteTrigger).trigger(this.name + "DOMComplete", [a, e, o]).trigger("DOMComplete", [a, e, o])
}
this._removeXHR(c);
if (!this.inProgress) {
$.event.trigger(this.name + "AjaxStop")
}
a = null
},
_success: function (f, b, d, g, c, o) {
var e = this;
if (this._isAbort(c, o)) {
c = null;
return
}
if (o.abortOld) {
$.each(this.requests, function (a) {
if (a === o.xhrID) {
return false
}
e.abort(a)
})
}
if (o.cacheResponse && !cache[o.xhrID]) {
cache[o.xhrID] = d
}
b.call(f, d, g, c, o);
$.event.trigger(this.name + "AjaxSuccess", [c, o, d]);
if (o.domSuccessTrigger) {
$(o.domSuccessTrigger).trigger(this.name + "DOMSuccess", [d, o]).trigger("DOMSuccess", [d, o])
}
c = null
},
getData: function (b) {
if (b) {
var c = this.requests[b];
if (!c && this.opts.queue) {
c = $.grep($(document).queue(this.qName), function (a, i) {
return (a.xhrID === b)
})[0]
}
return c
}
return {
requests: this.requests,
queue: (this.opts.queue) ? $(document).queue(this.qName) : [],
inProgress: this.inProgress
}
},
abort: function (b) {
var c;
if (b) {
c = this.getData(b);
if (c && c.abort) {
this.lastAbort = b;
c.abort();
this.lastAbort = false
} else {
$(document).queue(this.qName, $.grep($(document).queue(this.qName), function (a, i) {
return (a !== c)
}))
}
c = null;
return
}
var d = this,
ids = [];
$.each(this.requests, function (a) {
ids.push(a)
});
$.each(ids, function (i, a) {
d.abort(a)
})
},
clear: function (a) {
$(document).clearQueue(this.qName);
if (a) {
this.abort()
}
}
};
$.manageAjax._manager.prototype.getXHR = $.manageAjax._manager.prototype.getData;
$.manageAjax.defaults = {
complete: $.noop,
success: $.noop,
beforeSend: $.noop,
beforeCreate: $.noop,
abort: $.noop,
abortIsNoSuccess: true,
maxRequests: 1,
cacheResponse: false,
domCompleteTrigger: false,
domSuccessTrigger: false,
preventDoubbleRequests: true,
queue: false
};
$.each($.manageAjax._manager.prototype, function (n, c) {
if (n.indexOf("_") === 0 || !$.isFunction(c)) {
return
}
$.manageAjax[n] = function (a, o) {
if (!h[a]) {
if (n === "add") {
$.manageAjax.create(a, o)
} else {
return
}
}
var b = Array.prototype.slice.call(arguments, 1);
h[a][n].apply(h[a], b)
}
})
})(jQCT);
(function ($) {
$.extend($, {
placeholder: {
browser_supported: function () {
return this._supported !== undefined ? this._supported : (this._supported = !! ("placeholder" in $('<input type="text">,<input type="email">')[0]))
},
shim: function (b) {
var a = {
color: "#AAA",
cls: "placeholder",
tb_padding: 2,
lr_padding: 2,
selector: "input[placeholder], textarea[placeholder]"
};
$.extend(a, b);
!this.browser_supported() && $(a.selector)._placeholder_shim(a)
}
}
});
$.extend($.fn, {
_placeholder_shim: function (h) {
function calcPositionCss(a) {
return {
top: (($(a).outerHeight(true) - $(a).height()) / 2) + h.tb_padding,
left: h.lr_padding,
width: "auto"
}
}
return this.each(function () {
var b = $(this);
if (b.is('input[type="text"],input[type="email"], textarea')) {
if (b.data("placeholderLabel")) {
var g = b.data("placeholderLabel");
if (g.length > 0) {
g.html(b.attr("placeholder")).css(calcPositionCss(b))
}
return true
}
var c = {};
if (!b.is("textarea") && b.css("height") != "auto") {
c = {
lineHeight: b.css("fontSize"),
whiteSpace: "nowrap"
}
}
b.parent().css({
position: "relative"
});
var d = b.css("padding-top");
try {
d = parseInt(b.css("padding-top").replace("px", "")) / 2;
d += "px"
} catch (e) {}
var f = $("<label />").text(b.attr("placeholder")).addClass(h.cls).css($.extend({
position: "absolute",
display: "inline",
"float": "none",
overflow: "hidden",
textAlign: "left",
color: h.color,
cursor: "text",
paddingTop: d,
paddingLeft: b.css("padding-left"),
fontSize: b.css("font-size"),
fontFamily: b.css("font-family"),
fontStyle: b.css("font-style"),
fontWeight: b.css("font-weight"),
textTransform: b.css("text-transform"),
zIndex: 99
}, c)).css(calcPositionCss(this)).css("display", b.val() > 0 ? "none" : "display").attr("for", this.id).data("target", b).click(function () {
$(this).data("target").focus()
}).insertBefore(this);
b.data("placeholderLabel", f).bind("change", function () {
f[b.val().length ? "hide" : "show"]()
}).focus(function () {
f.hide()
}).blur(function () {
f[b.val().length ? "hide" : "show"]();
if (!f.is(":hidden")) {
f.css(calcPositionCss(b))
}
}).keyup(function () {
if (b.val().length > 0) {
f.hide()
}
}).triggerHandler("blur");
$(window).resize(function () {
var a = f.data("target");
if (a) {
f.css(calcPositionCss(a))
}
})
}
})
}
});
var i = $.fn.val;
$.fn.extend({
val: function () {
var a = i.apply(this, arguments);
if (arguments.length && $(this).data("placeholderLabel")) {
$(this).change()
}
return a
}
})
})(jQCT);
(function ($) {
$.json2xml = function (a, b) {
l = {};
l = $.extend(true, l, r, b || {});
return q(a, l.rootTagName, "", 0)
};
var r = {
formatOutput: false,
formatTextNodes: false,
indentString: " ",
rootTagName: "root",
ignore: [],
replace: [],
nodes: [],
exceptions: []
};
var l = {};
var q = function (a, i, h, f) {
var b = (l.formatOutput) ? "\r\n" : "";
var g = (l.formatOutput) ? n(f) : "";
var k = g + "<" + i;
var j = "";
for (var c in a) {
if (a.hasOwnProperty(c)) {
var e = h + c;
var d = m(h, c);
if ($.inArray(e, l.ignore) == -1) {
if ($.isArray(a[c])) {
j += o(a[c], d, e + ".", f + 1, b)
} else {
if (typeof (a[c]) === "object") {
j += q(a[c], d, e + ".", f + 1)
} else {
if ($.inArray(e, l.nodes) != -1) {
j += p(d, a[c], f, b)
} else {
k += " " + d + '="' + a[c] + '"'
}
}
}
}
}
}
if (j !== "") {
k += ">" + b + j + g + "</" + i + ">" + b
} else {
k += "/>" + b
}
return k
};
var n = function (b) {
var a = "";
for (var i = 0; i < b; i++) {
a += l.indentString
}
return a
};
var m = function (c, a) {
var b = l.replace.length;
var d = c + a;
while (b--) {
if (l.replace[b].hasOwnProperty(d)) {
return l.replace[b][d]
}
}
return a
};
var o = function (i, h, a, f, b) {
var c = "";
if (i.length > 0) {
for (var e = 0, len = i.length; e < len; e++) {
if (typeof (i[e]) !== "object") {
if (i[e] === "") {
c += n(f) + "<" + h + "/>" + b
} else {
var g = (l.formatTextNodes) ? b + n(f + 1) : "";
var d = (l.formatTextNodes) ? b + n(f) : "";
c += n(f) + "<" + h + ">" + g + i[e] + d + "</" + h + ">" + b
}
} else {
c += q(i[e], h, a, f)
}
}
} else {
c += n(f) + "<" + h + "/>" + b
}
return c
};
var p = function (g, a, b, c) {
var e = (l.formatTextNodes) ? c + n(b + 2) : "";
var d = (l.formatTextNodes) ? c + n(b + 1) : "";
var f = n(b + 1) + "<" + g + ">" + e + a + d + "</" + g + ">" + c;
return f
}
})(jQCT);
(function ($) {
$.extend((function () {
var r = null;
var u = null;
var p = {
complex: 0,
lite: 1
};
var l = function (a) {
if ( !! a && typeof (a) === "object") {
function F() {}
F.prototype = a;
return new F()
}
};
var m = function (s) {
var b = "";
if (s && typeof s == "string") {
b = s
}
var a = /^((-)?([0-9]*)((\.{0,1})([0-9]+))?$)/;
return a.test(b)
};
var q = function (b) {
var c = /-/g;
var a = String(b).replace(c, "_");
return a
};
var w = (function () {
var h = {
activate: function () {
var g = [];
if ( !! g && u.outputType === p.complex) {
g.getNodesByAttribute = function (e, a) {
if ( !! g && g.length > 0) {
var b = [];
var c;
var d = g.length - 1;
if (d >= 0) {
do {
c = g[d];
if ( !! c && c[e] === a) {
b.push(c)
}
} while (d--)
}
b.reverse();
return b
}
};
g.getNodeByAttribute = function (d, a) {
if ( !! g && g.length > 0) {
var b = null;
var c = g.length - 1;
if (c >= 0) {
do {
b = g[c];
if ( !! b && b[d] === a) {
break
}
} while (c--)
}
return b
}
};
g.getNodesByValue = function (a) {
if ( !! g && g.length > 0) {
var b = [];
var c;
var d = g.length - 1;
if (d >= 0) {
do {
c = g[d];
if ( !! c && !! c.Text && c.Text === a) {
b.push(c)
}
} while (d--)
}
b.reverse();
return b
}
};
g.contains = function (d, a) {
if ( !! g && g.length > 0) {
var b = false;
var c = g.length - 1;
if (c >= 0) {
do {
if (g[c][d] === a) {
b = true;
break
}
} while (c--)
}
return b
}
};
g.indexOf = function (d, b) {
var a = -1;
if ( !! g && g.length > 0) {
var c = g.length - 1;
if (c >= 0) {
do {
if (g[c][d] === b) {
a = c;
break
}
} while (c--)
}
return a
}
};
g.SortByAttribute = function (f, e) {
if ( !! g && g.length > 0) {
g.sort(function (a, b) {
var c = (a[f]),
_b = (b[f]);
c = m(c) ? parseFloat(c) : c;
_b = m(_b) ? parseFloat(_b) : _b;
var d = (c < _b) ? -1 : (_b < c) ? 1 : 0;
d = ( !! e && e.toUpperCase() === "DESC") ? (0 - d) : d;
return d
})
}
};
g.SortByValue = function (e) {
if ( !! g && g.length > 0) {
g.sort(function (a, b) {
var c = (a.Text),
_b = (b.Text);
c = m(c) ? parseFloat(c) : c;
_b = m(_b) ? parseFloat(_b) : _b;
var d = (c < _b) ? -1 : (_b < c) ? 1 : 0;
d = ( !! e && e.toUpperCase() === "DESC") ? (0 - d) : d;
return d
})
}
};
g.SortByNode = function (e, f) {
if ( !! g && g.length > 0) {
g.sort(function (a, b) {
var c = (a[e][0].Text),
_b = (b[e][0].Text);
c = m(c) ? parseFloat(c) : c;
_b = m(_b) ? parseFloat(_b) : _b;
var d = (c < _b) ? -1 : (_b < c) ? 1 : 0;
d = ( !! f && f.toUpperCase() === "DESC") ? (0 - d) : d;
return d
})
}
}
}
return g
}
};
return h
})();
var v = function () {
var a = l(w);
return a.activate()
};
var t = function (b) {
var d = {
Text: "",
_processChildren: true,
_processAttributes: true
};
var c = null;
if (typeof (r) === "function") {
try {
c = r(b)
} catch (e) {}
}
if ( !! c && c === -1) {
d = null
} else {
if ( !! c) {
d = c;
d._processChildren = (typeof (d._processChildren) === "undefined") ? true : d._processChildren;
d._processAttributes = (typeof (d._processAttributes) === "undefined") ? true : d._processAttributes;
if (!d.Text) {
d.Text = ""
}
if (!d._namespace) {
if ( !! b.prefix && u.outputType === p.complex) {
d._namespace = b.prefix
}
}
} else {
var a = ( !! b.localName) ? b.localName : b.baseName;
a = q(a);
d._nodeName = a;
if ( !! b.prefix) {
d._namespace = b.prefix
}
}
}
return d
};
var o = function (c, b) {
if (b.attributes.length > 0) {
if (u.outputType === p.complex) {
c._attributes = []
}
var a = b.attributes.length - 1,
attName = null,
jParent = null;
do {
attName = String(q(b.attributes[a].name));
jParent = c._parent || false;
if ( !! jParent && !! jParent[c._nodeName][0][attName] && typeof (jParent[c._nodeName][0][attName]) === "object") {
attName = "attr_" + attName
}
if (u.outputType === p.complex) {
c._attributes.push(attName)
}
c[attName] = $.trim(b.attributes[a].value)
} while (a--)
}
};
var x = {
JSONOutputType: p,
xmlToJSON: function (g, k) {
u = k || {
outputType: x.JSONOutputType.complex
};
r = u && u.nodeHandler;
var j = null;
if (typeof (g) === "string") {
j = x.textToXML(g)
} else {
if (typeof (g) === "object" && !! g.nodeType) {
j = g
} else {
j = null
}
} if (!j) {
return null
}
var i = (j.nodeType == 9) ? j.documentElement : j;
var h = t(i);
h.typeOf = "JSXBObject";
h.RootName = h._nodeName;
if (j.nodeType == 3 || j.nodeType == 4) {
return j.nodeValue
}
function setObjects(a, c) {
var d;
var b;
var f = "";
if (!c) {
return null
}
if (c.hasChildNodes()) {
var e = c.childNodes.length - 1;
var n = 0;
do {
d = c.childNodes[n];
switch (d.nodeType) {
case 1:
if (u.outputType === p.complex) {
a._children = ( !! a._children) ? a._children : []
}
b = t(d);
if ( !! b) {
if (u.outputType === p.complex) {
b._parent = a;
if (f !== b._nodeName) {
a._children.push(b._nodeName)
}
}
if (!a[b._nodeName]) {
a[b._nodeName] = v()
}
a[b._nodeName].push(b);
if ( !! b._processChildren && d.hasChildNodes()) {
setObjects(b, d)
}
delete b._processChildren;
if ( !! b._processAttributes) {
o(b, d)
}
delete b._processAttributes;
f = b._nodeName;
if (u.outputType === p.lite) {
delete b._nodeName
}
}
break;
case 3:
a.Text += $.trim(d.nodeValue);
break;
case 4:
a.Text += ( !! d.text) ? $.trim(d.text) : $.trim(d.nodeValue);
break
}
} while (n++ < e)
}
}
o(h, i);
setObjects(h, i);
if (u.outputType === p.lite) {
delete h._nodeName
}
delete h._processChildren;
delete h._processAttributes;
j = null;
i = null;
return h
},
textToXML: function (b) {
var a = null;
try {
a = ($.browser.msie) ? new ActiveXObject("Microsoft.XMLDOM") : new DOMParser();
a.async = false
} catch (e) {
throw new Error("XML Parser could not be instantiated")
}
var c = null,
isParsed = true;
if ($.browser.msie) {
isParsed = a.loadXML(b);
c = (isParsed) ? a : false
} else {
c = a.parseFromString(b, "text/xml");
isParsed = (c.documentElement.tagName !== "parsererror")
} if (!isParsed) {
throw new Error("Error parsing XML string")
}
return c
}
};
return x
})())
})(jQCT);
(function ($) {
$.fn.ctDropdown = function (a) {
if (s[a]) {
return s[a].apply(this, Array.prototype.slice.call(arguments, 1))
} else {
if (typeof a === "object" || !a) {
return s.init.apply(this, arguments)
} else {
$.error("Method " + a + " does not exists.")
}
}
};
var s = {}, defaults = {
data: [],
keepJSONItemsOnTop: false,
appendTo: "body",
baseClass: "ct-ui-base ct-ui-s",
width: "99.5%",
height: undefined,
optionsShown: 7,
menuWidth: undefined,
selectText: "",
tabindex: "-1",
defaultSelectedIndex: undefined,
defaultSelectedValue: undefined,
truncateDescription: true,
imagePosition: "left",
showSelectedHTML: true,
showSelectedText: true,
clickOffToClose: true,
textIcons: false,
reset: false,
selectedToTop: false,
ddArrowColour: "darkgray",
position: {
my: "right top",
at: "right bottom",
collision: "flip fit"
},
pattern: "",
onSelected: function () {}
}, ddSelectHtml = '<div class="ct-ui-dd-select"><input class="ct-ui-dd-selected-value" type="text" data-type="select"/><a class="ct-ui-formfield ct-ui-dd-selected"></a><span class="ct-ui-dd-pointer ct-ui-icon ct-ui-icon-med-arrow-s"></span><span class="ct-ui-dd-pointer-divider"></span></div>';
s.init = function (r) {
var r = $.extend({}, defaults, r);
return this.each(function () {
var m = $(this),
data = m.data("ctDropdown");
if (!data || r.reset) {
r.data = [];
var n = [],
ddJson = r.data;
m.children("option").each(function () {
var a = $(this);
n.push({
text: $.trim(a.text()),
altText: $.trim(a.attr("data-text")),
smallText: $.trim(a.attr("data-small-text")),
value: a.val(),
selected: a.prop("selected"),
divider: a.attr("data-divider")
})
});
if (typeof m.attr("tabindex") !== "undefined") {
r.tabindex = m.attr("tabindex").toString()
} else {
r.tabindex = data.settings.tabindex
} if (r.keepJSONItemsOnTop) {
$.merge(r.data, n)
} else {
r.data = $.merge(n, r.data)
}
var o = m,
placeholder = $('<div id="' + m.attr("id") + (m.attr("data-cta") ? ('" data-cta="' + m.attr("data-cta")) : "") + '"></div>');
m.replaceWith(placeholder);
if (CTLoader.feature && CTLoader.feature().mobile) {
if (placeholder.find("select").length === 0) {
var j = $("<select/>");
j.append(o.find("option")).width((r.width.slice(0, r.width.length - 1)) / 2 + "%");
placeholder.append(j)
}
}
m = placeholder;
m.addClass("ct-ui-dd-container").append(ddSelectHtml);
var n = m.find(".ct-ui-dd-select"),
ddOptions = [];
if ($("#" + m.attr("id") + "-menu").length === 0) {
ddOptions = $("<ul/>").attr("id", m.attr("id") + "-menu");
ddOptions.addClass(function (a) {
if (r.baseClass) {
return r.baseClass
}
return ""
}).data("select", m.attr("id")).addClass("ct-ui-dd-options").appendTo($(r.appendTo || "body", document)[0])
} else {
ddOptions = $("#" + m.attr("id") + "-menu").removeAttr("style");
ddOptions.children().remove()
}
n.css({
width: r.width
});
m.css({
width: r.width
});
if (typeof r.height !== "undefined") {
n.css({
height: r.height
})
}
var i = [];
$.each(r.data, function (a, b) {
if (b.selected) {
r.defaultSelectedIndex = a
}
i.push('<li><a class="ct-ui-dd-option">' + (b.value ? ' <input class="ct-ui-dd-option-value" type="hidden" value="' + b.value + '" />' : "") + (b.text ? ' <span class="ct-ui-dd-option-text' + (r.textIcons ? "-icon" : "") + '">' + b.text + (b.smallText ? (" <small>" + b.smallText + "</small>") : "") + "</span>" : "") + "</a></li>")
});
ddOptions.html(i.join(""));
var h = {
settings: $.extend(true, {}, r),
original: o,
selectedIndex: -1,
selectedItem: null,
selectedData: null
};
m.data("ctDropdown", h);
if (r.selectText.length > 0 && typeof r.defaultSelectedIndex === "undefined") {
m.find(".ct-ui-dd-selected").attr("tabindex", r.tabindex).html(r.selectText)
} else {
if (typeof r.defaultSelectedValue !== "undefined") {
selectItem(m, {
value: r.defaultSelectedValue,
defaultedValue: true
})
} else {
var l = (typeof r.defaultSelectedIndex !== "undefined" && r.defaultSelectedIndex >= 0 && r.defaultSelectedIndex < r.data.length) ? r.defaultSelectedIndex : 0;
selectItem(m, {
index: l,
defaultedValue: true
})
}
}
m.find(".ct-ui-dd-selected-value").attr("name", m.attr("id")).end().find(".ct-ui-dd-pointer").addClass("ct-ui-icon-" + r.ddArrowColour);
m.find(".ct-ui-dd-select").on("click.ctDropdown", function () {
m.find(".ct-ui-dd-selected").focus();
if (CTLoader.feature && CTLoader.feature().mobile) {
var e = m.find("select");
e.bind("change", function (a) {
selectItem(m, {
value: $(this).val()
})
}).show();
var c;
c = document.createEvent("MouseEvents");
c.initMouseEvent("mousedown", true, true, window);
e.get(0).dispatchEvent(c)
} else {
open(m);
var d = ddOptions.find("li:nth-child(" + (h.selectedIndex + 1) + ")");
if (d.length > 0) {
d.trigger("mouseover");
var b = d.offset().top - ddOptions.offset().top,
scroll = ddOptions.scrollTop() || 0,
elementHeight = ddOptions.height();
if (b < 0) {
ddOptions.scrollTop(scroll + b)
} else {
if (b >= elementHeight) {
ddOptions.scrollTop(scroll + b - elementHeight)
}
}
}
}
}).end().find(".ct-ui-dd-selected").on("focus", function () {
m.children(":first").addClass("ct-ui-focus")
}).on("blur", function () {
m.children(":first").removeClass("ct-ui-focus")
});
ddOptions.find(".ct-ui-dd-option").on("click.ctDropdown", function () {
selectItem(m, {
index: $(this).closest("li").index()
})
});
if (r.clickOffToClose) {
ddOptions.addClass("ct-ui-dd-click-off-close");
m.on("click.ctDropdown", function (e) {
e.stopPropagation()
});
$(CTLoader.feature().browser.ie && CTLoader.feature().browser.version <= 8 ? document : window).on("click", function () {
if (ddOptions.data("state") === "open") {
$(".ct-ui-dd-click-off-close").filter(function () {
return $(this).data("state") === "open"
}).slideUp(50, function () {
$(this).css({
top: "auto",
left: "auto"
}).data("state", "closed")
}).each(function () {
var a = $(this).data("select");
$("#" + a).find(".ct-ui-dd-pointer").removeClass("ct-ui-icon-med-arrow-n")
})
}
})
}
var k;
var q = function () {
r.pattern = ""
};
var p = function () {
clearTimeout(k);
k = setTimeout(function () {
q()
}, 1000)
};
$(m).keydown(function (f) {
var e, elt = $(this),
alphaNumbericKeys = {
48: 0,
49: 1,
50: 2,
51: 3,
52: 4,
53: 5,
54: 6,
55: 7,
56: 8,
57: 9,
65: "a",
66: "b",
67: "c",
68: "d",
69: "e",
70: "f",
71: "g",
72: "h",
73: "i",
74: "j",
75: "k",
76: "l",
77: "m",
78: "n",
79: "o",
80: "p",
81: "q",
82: "r",
83: "s",
84: "t",
85: "u",
86: "v",
87: "w",
88: "x",
89: "y",
90: "z"
};
if (f.which != "") {
e = f.which
} else {
if (f.charCode != "") {
e = f.charCode
} else {
if (f.keyCode != "") {
e = f.keyCode
}
}
} if (alphaNumbericKeys[e] != undefined) {
r.pattern = r.pattern + alphaNumbericKeys[e]
}
p();
var d = $("ul#" + m.attr("id") + "-menu"),
highlightItem = function (a) {
var b = d.find("li:nth-child(" + (a + 1) + ")");
if (b.length > 0) {
b.trigger("mouseover");
var c = b.offset().top - ddOptions.offset().top,
scroll = ddOptions.scrollTop() || 0,
elementHeight = ddOptions.height();
if (c < 0) {
ddOptions.scrollTop(scroll + c)
} else {
if (c >= elementHeight) {
ddOptions.scrollTop(scroll + c - elementHeight + b.height())
}
}
}
};
var g = m.data("ctDropdown");
if (g) {
if (CT.LIB.Object.isDefined(alphaNumbericKeys[e])) {
CT.LIB.Array.each(g.settings.data, function (a, b) {
if (a && a.text && a.text.toLowerCase().substring(0, r.pattern.length) === r.pattern.toLowerCase()) {
selectItem(elt, {
index: b,
keepOpen: true
});
highlightItem(b);
return false
}
})
} else {
switch (e) {
case 37:
close(elt);
return false;
break;
case 38:
if (g.selectedIndex > 0) {
selectItem(elt, {
index: g.selectedIndex - 1,
keepOpen: true,
direction: "up"
});
highlightItem(g.selectedIndex)
}
return false;
break;
case 39:
open(elt);
highlightItem(g.selectedIndex);
return false;
break;
case 40:
if (g.selectedIndex < g.settings.data.length - 1) {
selectItem(elt, {
index: g.selectedIndex + 1,
keepOpen: true,
direction: "down"
});
highlightItem(g.selectedIndex)
}
return false;
break;
case 9:
case 13:
case 27:
close(elt);
break
}
}
}
})
}
})
};
s.select = function (a) {
return this.each(function () {
if (a.index || a.value) {
selectItem($(this), a)
}
})
};
s.open = function () {
return this.each(function () {
var a = $(this),
pluginData = a.data("ctDropdown");
if (pluginData) {
open(a)
}
})
};
s.close = function () {
return this.each(function () {
var a = $(this),
pluginData = a.data("ctDropdown");
if (pluginData) {
close(a)
}
})
};
s.destroy = function () {
return this.each(function () {
var a = $(this),
pluginData = a.data("ctDropdown");
if (pluginData) {
var b = pluginData.original;
a.removeData("ctDropdown").unbind(".ctDropdown").replaceWith(b);
$("ul#" + a.attr("id") + "-menu").remove()
}
})
};
function selectItem(d, e) {
var g = d.data("ctDropdown"),
ddOptions = $("ul#" + d.attr("id") + "-menu");
var f = 0;
if (typeof e.value !== "undefined") {
ddOptions.find(".ct-ui-dd-option").filter(function (i) {
var a = $(this).children("input").get(0);
if ($(a).val() === e.value) {
f = i;
return true
}
return false
})
} else {
if (typeof e.index !== "undefined") {
f = e.index
}
} if (CT.LIB.Object.isDefined(g.settings.data[f].divider)) {
(!CT.LIB.Object.isDefined(e.direction) || e.direction === "down") ? f++ : f--
}
var c = d.find(".ct-ui-dd-selected"),
ddSelectedValue = c.siblings(".ct-ui-dd-selected-value"),
ddPointer = c.siblings(".ct-ui-dd-pointer"),
selectedOption = ddOptions.find(".ct-ui-dd-option").eq(f),
selectedLiItem = selectedOption.closest("li"),
settings = g.settings,
selectedData = g.settings.data[f];
ddOptions.find(".ct-ui-dd-option").removeClass("ct-ui-dd-option-selected");
selectedOption.addClass("ct-ui-dd-option-selected");
if (g.settings.selectedToTop) {
var b = g.settings.data[f];
g.settings.data.splice(f, 1);
g.settings.data.splice(0, 0, b);
selectedLiItem.prependTo(ddOptions);
g.selectedIndex = 0
} else {
g.selectedIndex = f
}
g.selectedItem = selectedLiItem;
g.selectedData = selectedData;
g.selectedValue = ddSelectedValue;
g.defaultedValue = e.defaultedValue || false;
if (settings.showSelectedHTML) {
c.html(((selectedData.altText || selectedData.text) && settings.showSelectedText ? '<span class="ct-ui-dd-selected-text">' + (selectedData.altText || selectedData.text) + (selectedData.smallText ? " <small>" + selectedData.smallText + "</small>" : "") + "</span>" : ""))
} else {
c.html(selectedData.altText || selectedData.text)
}
c.attr("tabIndex", g.settings.tabindex);
ddSelectedValue.val(selectedData.value);
if (d.find("select").length > 0) {
d.find("select").val(selectedData.value)
}
g.original.val(selectedData.value);
d.data("ctDropdown", g);
if (g.selectedData && !g.defaultedValue && g.original.data("cta")) {
$.publish("/tracking/analytics", [g.original.data("cta"), "select"]);
$.publish("/tracking/analytics", [g.original.data("cta"), g.selectedData.value])
}
if (typeof e.onSelected !== "undefined") {
settings.onSelected = e.onSelected
}
if (typeof settings.onSelected == "function") {
settings.onSelected.call(this, g)
}
}
function open(a) {
var c = a.find(".ct-ui-dd-select"),
ddOptions = $("ul#" + a.attr("id") + "-menu"),
ddPointer = c.find(".ct-ui-dd-pointer"),
state = ddOptions.data("state");
var d = a.data("ctDropdown");
if (!CT.LIB.Object.isDefined(ddOptions.attr("style")) || ddOptions.attr("style").indexOf("height") == -1) {
var b = ddOptions.find("a.ct-ui-dd-option").first().outerHeight(true);
ddOptions.css({
height: ((d.settings.data.length < d.settings.optionsShown ? d.settings.data.length : d.settings.optionsShown) * b)
})
}
$(".ct-ui-dd-click-off-close").filter(function () {
return $(this).data("state") === "open"
}).slideUp(50);
$(".ct-ui-dd-pointer").removeClass("ct-ui-icon-med-arrow-n");
if (state === "open") {
ddOptions.slideUp("fast", function () {
$(this).css({
top: "auto",
left: "auto"
}).data("state", "closed")
});
ddPointer.removeClass("ct-ui-icon-med-arrow-n")
} else {
adjustOptionsDimensions(a);
ddOptions.slideDown("fast", function () {
$(this).data("state", "open")
});
ddPointer.addClass("ct-ui-icon-med-arrow-n")
} if (d.original.data("cta")) {
$.publish("/tracking/analytics", [d.original.data("cta"), state])
}
}
function close(a) {
var b = $("ul#" + a.attr("id") + "-menu");
if (b.data("state") === "open") {
b.slideUp(50, function () {
$(this).css({
top: "auto",
left: "auto"
})
});
a.find(".ct-ui-dd-pointer").removeClass("ct-ui-icon-med-arrow-n")
}
}
function adjustOptionsDimensions(a) {
var b = a.find(".ct-ui-dd-select"),
pluginData = a.data("ctDropdown"),
ddOptions = $("ul#" + a.attr("id") + "-menu");
ddOptions.outerWidth(pluginData.settings.menuWidth || a.outerWidth());
ddOptions.position($.extend({
of: b
}, pluginData.settings.position))
}
})(jQCT);
(function ($) {
$.extend($.fn, {
validate: function (e) {
if (!this.length) {
e && e.debug && window.console && console.warn("nothing selected, can't validate, returning nothing");
return
}
var d = $.data(this[0], "validator");
if (d) {
return d
}
this.attr("novalidate", "novalidate");
d = new $.validator(e, this[0]);
$.data(this[0], "validator", d);
if (d.settings.onsubmit) {
var c = this.find("input, button");
c.filter(".cancel").click(function () {
d.cancelSubmit = true
});
if (d.settings.submitHandler) {
c.filter(":submit").click(function () {
d.submitButton = this
})
}
this.submit(function (b) {
if (d.settings.debug) {
b.preventDefault()
}
function handle() {
if (d.settings.submitHandler) {
if (d.submitButton) {
var a = $("<input type='hidden'/>").attr("name", d.submitButton.name).val(d.submitButton.value).appendTo(d.currentForm)
}
d.settings.submitHandler.call(d, d.currentForm);
if (d.submitButton) {
a.remove()
}
return false
}
return true
}
if (d.cancelSubmit) {
d.cancelSubmit = false;
return handle()
}
if (d.form()) {
if (d.pendingRequest) {
d.formSubmitted = true;
return false
}
return handle()
} else {
d.focusInvalid();
return false
}
})
}
return d
},
valid: function () {
if ($(this[0]).is("form")) {
return this.validate().form()
} else {
var b = true;
var a = $(this[0].form).validate();
if (a) {
this.each(function () {
b &= a.element(this)
})
}
return b
}
},
removeAttrs: function (c) {
var d = {}, $element = this;
$.each(c.split(/\s/), function (a, b) {
d[b] = $element.attr(b);
$element.removeAttr(b)
});
return d
},
rules: function (h, k) {
var f = this[0];
if (h) {
var i = $.data(f.form, "validator").settings;
var d = i.rules;
var c = $.validator.staticRules(f);
switch (h) {
case "add":
$.extend(c, $.validator.normalizeRule(k));
d[f.name] = c;
if (k.messages) {
i.messages[f.name] = $.extend(i.messages[f.name], k.messages)
}
break;
case "remove":
if (!k) {
delete d[f.name];
return c
}
var e = {};
$.each(k.split(/\s/), function (a, b) {
e[b] = c[b];
delete c[b]
});
return e
}
}
var g = $.validator.normalizeRules($.extend({}, $.validator.metadataRules(f), $.validator.classRules(f), $.validator.attributeRules(f), $.validator.staticRules(f)), f);
if (g.required) {
var j = g.required;
delete g.required;
g = $.extend({
required: j
}, g)
}
return g
}
});
$.extend($.expr[":"], {
blank: function (a) {
return !$.trim("" + a.value)
},
filled: function (a) {
return !!$.trim("" + a.value)
},
unchecked: function (a) {
return !a.checked
}
});
$.validator = function (b, a) {
this.settings = $.extend(true, {}, $.validator.defaults, b);
this.currentForm = a;
this.init()
};
$.validator.format = function (c, b) {
if (arguments.length == 1) {
return function () {
var a = $.makeArray(arguments);
a.unshift(c);
return $.validator.format.apply(this, a)
}
}
if (arguments.length > 2 && b.constructor != Array) {
b = $.makeArray(arguments).slice(1)
}
if (b.constructor != Array) {
b = [b]
}
$.each(b, function (i, n) {
c = c.replace(new RegExp("\\{" + i + "\\}", "g"), n)
});
return c
};
$.extend($.validator, {
defaults: {
messages: {},
groups: {},
rules: {},
errorClass: "error",
validClass: "valid",
errorElement: "label",
focusInvalid: true,
errorContainer: $([]),
errorLabelContainer: $([]),
onsubmit: true,
ignore: ":hidden",
ignoreTitle: false,
onfocusin: function (b, a) {
this.lastActive = b;
if (this.settings.focusCleanup && !this.blockFocusCleanup) {
this.settings.unhighlight && this.settings.unhighlight.call(this, b, this.settings.errorClass, this.settings.validClass);
this.addWrapper(this.errorsFor(b)).hide()
}
},
onfocusout: function (b, a) {
if (!this.checkable(b) && (b.name in this.submitted || !this.optional(b))) {
this.element(b)
}
},
onkeyup: function (b, a) {
if (b.name in this.submitted || b == this.lastElement) {
this.element(b)
}
},
onclick: function (b, a) {
if (b.name in this.submitted) {
this.element(b)
} else {
if (b.parentNode.name in this.submitted) {
this.element(b.parentNode)
}
}
},
highlight: function (a, c, b) {
if (a.type === "radio") {
this.findByName(a.name).addClass(c).removeClass(b)
} else {
$(a).addClass(c).removeClass(b)
}
},
unhighlight: function (a, c, b) {
if (a.type === "radio") {
this.findByName(a.name).removeClass(c).addClass(b)
} else {
$(a).removeClass(c).addClass(b)
}
}
},
setDefaults: function (a) {
$.extend($.validator.defaults, a)
},
messages: {
required: "This field is required.",
remote: "Please fix this field.",
email: "Please enter a valid email address.",
url: "Please enter a valid URL.",
date: "Please enter a valid date.",
dateISO: "Please enter a valid date (ISO).",
number: "Please enter a valid number.",
digits: "Please enter only digits.",
creditcard: "Please enter a valid credit card number.",
equalTo: "Please enter the same value again.",
accept: "Please enter a value with a valid extension.",
maxlength: $.validator.format("Please enter no more than {0} characters."),
minlength: $.validator.format("Please enter at least {0} characters."),
rangelength: $.validator.format("Please enter a value between {0} and {1} characters long."),
range: $.validator.format("Please enter a value between {0} and {1}."),
max: $.validator.format("Please enter a value less than or equal to {0}."),
min: $.validator.format("Please enter a value greater than or equal to {0}.")
},
autoCreateRanges: false,
prototype: {
init: function () {
this.labelContainer = $(this.settings.errorLabelContainer);
this.errorContext = this.labelContainer.length && this.labelContainer || $(this.currentForm);
this.containers = $(this.settings.errorContainer).add(this.settings.errorLabelContainer);
this.submitted = {};
this.valueCache = {};
this.pendingRequest = 0;
this.pending = {};
this.invalid = {};
this.reset();
var f = (this.groups = {});
$.each(this.settings.groups, function (d, c) {
$.each(c.split(/\s/), function (a, b) {
f[b] = d
})
});
var e = this.settings.rules;
$.each(e, function (b, a) {
e[b] = $.validator.normalizeRule(a)
});
function delegate(a) {
var b = $.data(this[0].form, "validator"),
eventType = "on" + a.type.replace(/^validate/, "");
b.settings[eventType] && b.settings[eventType].call(b, this[0], a)
}
$(this.currentForm).validateDelegate("[type='text'], [type='password'], [type='file'], select, textarea, [type='number'], [type='search'] ,[type='tel'], [type='url'], [type='email'], [type='datetime'], [type='date'], [type='month'], [type='week'], [type='time'], [type='datetime-local'], [type='range'], [type='color'] ", "focusin focusout keyup", delegate).validateDelegate("[type='radio'], [type='checkbox'], select, option", "click", delegate);
if (this.settings.invalidHandler) {
$(this.currentForm).bind("invalid-form.validate", this.settings.invalidHandler)
}
},
form: function () {
this.checkForm();
$.extend(this.submitted, this.errorMap);
this.invalid = $.extend({}, this.errorMap);
if (!this.valid()) {
$(this.currentForm).triggerHandler("invalid-form", [this])
}
this.showErrors();
return this.valid()
},
checkForm: function () {
this.prepareForm();
for (var i = 0, elements = (this.currentElements = this.elements()); elements[i]; i++) {
this.check(elements[i])
}
return this.valid()
},
element: function (a) {
a = this.validationTargetFor(this.clean(a));
this.lastElement = a;
this.prepareElement(a);
this.currentElements = $(a);
var b = this.check(a);
if (b) {
delete this.invalid[a.name]
} else {
this.invalid[a.name] = true
} if (!this.numberOfInvalids()) {
this.toHide = this.toHide.add(this.containers)
}
this.showErrors();
return b
},
showErrors: function (b) {
if (b) {
$.extend(this.errorMap, b);
this.errorList = [];
for (var c in b) {
this.errorList.push({
message: b[c],
element: this.findByName(c)[0]
})
}
this.successList = $.grep(this.successList, function (a) {
return !(a.name in b)
})
}
this.settings.showErrors ? this.settings.showErrors.call(this, this.errorMap, this.errorList) : this.defaultShowErrors()
},
resetForm: function () {
if ($.fn.resetForm) {
$(this.currentForm).resetForm()
}
this.submitted = {};
this.lastElement = null;
this.prepareForm();
this.hideErrors();
this.elements().removeClass(this.settings.errorClass)
},
numberOfInvalids: function () {
return this.objectLength(this.invalid)
},
objectLength: function (a) {
var b = 0;
for (var i in a) {
b++
}
return b
},
hideErrors: function () {
this.addWrapper(this.toHide).hide()
},
valid: function () {
return this.size() == 0
},
size: function () {
return this.errorList.length
},
focusInvalid: function () {
if (this.settings.focusInvalid) {
try {
$(this.findLastActive() || this.errorList.length && this.errorList[0].element || []).filter(":visible").focus().trigger("focusin")
} catch (e) {}
}
},
findLastActive: function () {
var a = this.lastActive;
return a && $.grep(this.errorList, function (n) {
return n.element.name == a.name
}).length == 1 && a
},
elements: function () {
var a = this,
rulesCache = {};
return $(this.currentForm).find("input, select, textarea").not(":submit, :reset, :image, [disabled]").not(this.settings.ignore).filter(function () {
!this.name && a.settings.debug && window.console && console.error("%o has no name assigned", this);
if (this.name in rulesCache || !a.objectLength($(this).rules())) {
return false
}
rulesCache[this.name] = true;
return true
})
},
clean: function (a) {
return $(a)[0]
},
errors: function () {
return $(this.settings.errorElement + "." + this.settings.errorClass, this.errorContext)
},
reset: function () {
this.successList = [];
this.errorList = [];
this.errorMap = {};
this.toShow = $([]);
this.toHide = $([]);
this.currentElements = $([])
},
prepareForm: function () {
this.reset();
this.toHide = this.errors().add(this.containers)
},
prepareElement: function (a) {
this.reset();
this.toHide = this.errorsFor(a)
},
check: function (f) {
f = this.validationTargetFor(this.clean(f));
var b = $(f).rules();
var d = false;
for (var a in b) {
var c = {
method: a,
parameters: b[a]
};
try {
var g = $.validator.methods[a].call(this, f.value.replace(/\r/g, ""), f, c.parameters);
if (g == "dependency-mismatch") {
d = true;
continue
}
d = false;
if (g == "pending") {
this.toHide = this.toHide.not(this.errorsFor(f));
return
}
if (!g) {
this.formatAndAdd(f, c);
return false
}
} catch (e) {
this.settings.debug && window.console && console.log("exception occured when checking element " + f.id + ", check the '" + c.method + "' method", e);
throw e
}
}
if (d) {
return
}
if (this.objectLength(b)) {
this.successList.push(f)
}
return true
},
customMetaMessage: function (a, b) {
if (!$.metadata) {
return
}
var c = this.settings.meta ? $(a).metadata()[this.settings.meta] : $(a).metadata();
return c && c.messages && c.messages[b]
},
customMessage: function (a, b) {
var m = this.settings.messages[a];
return m && (m.constructor == String ? m : m[b])
},
findDefined: function () {
for (var i = 0; i < arguments.length; i++) {
if (arguments[i] !== undefined) {
return arguments[i]
}
}
return undefined
},
defaultMessage: function (a, b) {
return this.findDefined(this.customMessage(a.name, b), this.customMetaMessage(a, b), !this.settings.ignoreTitle && a.title || undefined, $.validator.messages[b], "<strong>Warning: No message defined for " + a.name + "</strong>")
},
formatAndAdd: function (b, a) {
var c = this.defaultMessage(b, a.method),
theregex = /\$?\{(\d+)\}/g;
if (typeof c == "function") {
c = c.call(this, a.parameters, b)
} else {
if (theregex.test(c)) {
c = $.format(c.replace(theregex, "{$1}"), a.parameters)
}
}
this.errorList.push({
message: c,
element: b,
method: a.method
});
this.errorMap[b.name] = c;
this.submitted[b.name] = c
},
addWrapper: function (a) {
if (this.settings.wrapper) {
a = a.add(a.parent(this.settings.wrapper))
}
return a
},
defaultShowErrors: function () {
for (var i = 0; this.errorList[i]; i++) {
var a = this.errorList[i];
this.settings.highlight && this.settings.highlight.call(this, a.element, this.settings.errorClass, this.settings.validClass);
this.showLabel(a.element, a.message)
}
if (this.errorList.length) {
this.toShow = this.toShow.add(this.containers)
}
if (this.settings.success) {
for (var i = 0; this.successList[i]; i++) {
this.showLabel(this.successList[i])
}
}
if (this.settings.unhighlight) {
for (var i = 0, elements = this.validElements(); elements[i]; i++) {
this.settings.unhighlight.call(this, elements[i], this.settings.errorClass, this.settings.validClass)
}
}
this.toHide = this.toHide.not(this.toShow);
this.hideErrors();
this.addWrapper(this.toShow).show()
},
validElements: function () {
return this.currentElements.not(this.invalidElements())
},
invalidElements: function () {
return $(this.errorList).map(function () {
return this.element
})
},
showLabel: function (a, c) {
var b = this.errorsFor(a);
if (b.length) {
b.removeClass(this.settings.validClass).addClass(this.settings.errorClass);
b.attr("generated") && b.html(c)
} else {
b = $("<" + this.settings.errorElement + "/>").attr({
"for": this.idOrName(a),
generated: true
}).addClass(this.settings.errorClass).html(c || "");
if (this.settings.wrapper) {
b = b.hide().show().wrap("<" + this.settings.wrapper + "/>").parent()
}
if (!this.labelContainer.append(b).length) {
this.settings.errorPlacement ? this.settings.errorPlacement(b, $(a)) : b.insertAfter(a)
}
} if (!c && this.settings.success) {
b.text("");
typeof this.settings.success == "string" ? b.addClass(this.settings.success) : this.settings.success(b)
}
this.toShow = this.toShow.add(b)
},
errorsFor: function (a) {
var b = this.idOrName(a);
return this.errors().filter(function () {
return $(this).attr("for") == b
})
},
idOrName: function (a) {
return this.groups[a.name] || (this.checkable(a) ? a.name : a.id || a.name)
},
validationTargetFor: function (a) {
if (this.checkable(a)) {
a = this.findByName(a.name).not(this.settings.ignore)[0]
}
return a
},
checkable: function (a) {
return /radio|checkbox/i.test(a.type)
},
findByName: function (d) {
var c = this.currentForm;
return $(document.getElementsByName(d)).map(function (a, b) {
return b.form == c && b.name == d && b || null
})
},
getLength: function (a, b) {
switch (b.nodeName.toLowerCase()) {
case "select":
return $("option:selected", b).length;
case "input":
if (this.checkable(b)) {
return this.findByName(b.name).filter(":checked").length
}
}
return a.length
},
depend: function (b, a) {
return this.dependTypes[typeof b] ? this.dependTypes[typeof b](b, a) : true
},
dependTypes: {
"boolean": function (b, a) {
return b
},
string: function (b, a) {
return !!$(b, a.form).length
},
"function": function (b, a) {
return b(a)
}
},
optional: function (a) {
return !$.validator.methods.required.call(this, $.trim(a.value), a) && "dependency-mismatch"
},
startRequest: function (a) {
if (!this.pending[a.name]) {
this.pendingRequest++;
this.pending[a.name] = true
}
},
stopRequest: function (a, b) {
this.pendingRequest--;
if (this.pendingRequest < 0) {
this.pendingRequest = 0
}
delete this.pending[a.name];
if (b && this.pendingRequest == 0 && this.formSubmitted && this.form()) {
$(this.currentForm).submit();
this.formSubmitted = false
} else {
if (!b && this.pendingRequest == 0 && this.formSubmitted) {
$(this.currentForm).triggerHandler("invalid-form", [this]);
this.formSubmitted = false
}
}
},
previousValue: function (a) {
return $.data(a, "previousValue") || $.data(a, "previousValue", {
old: null,
valid: true,
message: this.defaultMessage(a, "remote")
})
}
},
classRuleSettings: {
required: {
required: true
},
email: {
email: true
},
url: {
url: true
},
date: {
date: true
},
dateISO: {
dateISO: true
},
dateDE: {
dateDE: true
},
number: {
number: true
},
numberDE: {
numberDE: true
},
digits: {
digits: true
},
creditcard: {
creditcard: true
}
},
addClassRules: function (a, b) {
a.constructor == String ? this.classRuleSettings[a] = b : $.extend(this.classRuleSettings, a)
},
classRules: function (b) {
var a = {};
var c = $(b).attr("class");
c && $.each(c.split(" "), function () {
if (this in $.validator.classRuleSettings) {
$.extend(a, $.validator.classRuleSettings[this])
}
});
return a
},
attributeRules: function (d) {
var b = {};
var e = $(d);
for (var a in $.validator.methods) {
var c;
if (a === "required" && typeof $.fn.prop === "function") {
c = e.prop(a)
} else {
c = e.attr(a)
} if (c) {
b[a] = c
} else {
if (e[0].getAttribute("type") === a) {
b[a] = true
}
}
}
if (b.maxlength && /-1|2147483647|524288/.test(b.maxlength)) {
delete b.maxlength
}
return b
},
metadataRules: function (a) {
if (!$.metadata) {
return {}
}
var b = $.data(a.form, "validator").settings.meta;
return b ? $(a).metadata()[b] : $(a).metadata()
},
staticRules: function (b) {
var a = {};
var c = $.data(b.form, "validator");
if (c.settings.rules) {
a = $.validator.normalizeRule(c.settings.rules[b.name]) || {}
}
return a
},
normalizeRules: function (d, e) {
$.each(d, function (c, b) {
if (b === false) {
delete d[c];
return
}
if (b.param || b.depends) {
var a = true;
switch (typeof b.depends) {
case "string":
a = !! $(b.depends, e.form).length;
break;
case "function":
a = b.depends.call(e, e);
break
}
if (a) {
d[c] = b.param !== undefined ? b.param : true
} else {
delete d[c]
}
}
});
$.each(d, function (a, b) {
d[a] = $.isFunction(b) ? b(e) : b
});
$.each(["minlength", "maxlength", "min", "max"], function () {
if (d[this]) {
d[this] = Number(d[this])
}
});
$.each(["rangelength", "range"], function () {
if (d[this]) {
d[this] = [Number(d[this][0]), Number(d[this][1])]
}
});
if ($.validator.autoCreateRanges) {
if (d.min && d.max) {
d.range = [d.min, d.max];
delete d.min;
delete d.max
}
if (d.minlength && d.maxlength) {
d.rangelength = [d.minlength, d.maxlength];
delete d.minlength;
delete d.maxlength
}
}
if (d.messages) {
delete d.messages
}
return d
},
normalizeRule: function (a) {
if (typeof a == "string") {
var b = {};
$.each(a.split(/\s/), function () {
b[this] = true
});
a = b
}
return a
},
addMethod: function (c, a, b) {
$.validator.methods[c] = a;
$.validator.messages[c] = b != undefined ? b : $.validator.messages[c];
if (a.length < 3) {
$.validator.addClassRules(c, $.validator.normalizeRule(c))
}
},
methods: {
required: function (c, d, a) {
if (!this.depend(a, d)) {
return "dependency-mismatch"
}
switch (d.nodeName.toLowerCase()) {
case "select":
var b = $(d).val();
return b && b.length > 0;
case "input":
if (this.checkable(d)) {
return this.getLength(c, d) > 0
}
default:
return $.trim(c).length > 0
}
},
remote: function (f, h, j) {
if (this.optional(h)) {
return "dependency-mismatch"
}
var g = this.previousValue(h);
if (!this.settings.messages[h.name]) {
this.settings.messages[h.name] = {}
}
g.originalMessage = this.settings.messages[h.name].remote;
this.settings.messages[h.name].remote = g.message;
j = typeof j == "string" && {
url: j
} || j;
if (this.pending[h.name]) {
return "pending"
}
if (g.old === f) {
return g.valid
}
g.old = f;
var k = this;
this.startRequest(h);
var i = {};
i[h.name] = f;
$.ajax($.extend(true, {
url: j,
mode: "abort",
port: "validate" + h.name,
dataType: "json",
data: i,
success: function (d) {
k.settings.messages[h.name].remote = g.originalMessage;
var b = d === true;
if (b) {
var e = k.formSubmitted;
k.prepareElement(h);
k.formSubmitted = e;
k.successList.push(h);
k.showErrors()
} else {
var a = {};
var c = d || k.defaultMessage(h, "remote");
a[h.name] = g.message = $.isFunction(c) ? c(f) : c;
k.showErrors(a)
}
g.valid = b;
k.stopRequest(h, b)
}
}, j));
return "pending"
},
minlength: function (b, c, a) {
return this.optional(c) || this.getLength($.trim(b), c) >= a
},
maxlength: function (b, c, a) {
return this.optional(c) || this.getLength($.trim(b), c) <= a
},
rangelength: function (b, d, a) {
var c = this.getLength($.trim(b), d);
return this.optional(d) || (c >= a[0] && c <= a[1])
},
min: function (b, c, a) {
return this.optional(c) || b >= a
},
max: function (b, c, a) {
return this.optional(c) || b <= a
},
range: function (b, c, a) {
return this.optional(c) || (b >= a[0] && b <= a[1])
},
email: function (a, b) {
return this.optional(b) || /^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))$/i.test(a)
},
url: function (a, b) {
return this.optional(b) || /^(https?|ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test(a)
},
date: function (a, b) {
return this.optional(b) || !/Invalid|NaN/.test(new Date(a))
},
dateISO: function (a, b) {
return this.optional(b) || /^\d{4}[\/-]\d{1,2}[\/-]\d{1,2}$/.test(a)
},
number: function (a, b) {
return this.optional(b) || /^-?(?:\d+|\d{1,3}(?:,\d{3})+)(?:\.\d+)?$/.test(a)
},
digits: function (a, b) {
return this.optional(b) || /^\d+$/.test(a)
},
creditcard: function (b, e) {
if (this.optional(e)) {
return "dependency-mismatch"
}
if (/[^0-9 -]+/.test(b)) {
return false
}
var a = 0,
d = 0,
bEven = false;
b = b.replace(/\D/g, "");
for (var n = b.length - 1; n >= 0; n--) {
var c = b.charAt(n);
var d = parseInt(c, 10);
if (bEven) {
if ((d *= 2) > 9) {
d -= 9
}
}
a += d;
bEven = !bEven
}
return (a % 10) == 0
},
accept: function (b, c, a) {
a = typeof a == "string" ? a.replace(/,/g, "|") : "png|jpe?g|gif";
return this.optional(c) || b.match(new RegExp(".(" + a + ")$", "i"))
},
equalTo: function (c, d, a) {
var b = $(a).unbind(".validate-equalTo").bind("blur.validate-equalTo", function () {
$(d).valid()
});
return c == b.val()
}
}
});
$.format = $.validator.format
})(jQCT);
(function ($) {
var e = {};
if ($.ajaxPrefilter) {
$.ajaxPrefilter(function (b, _, a) {
var c = b.port;
if (b.mode == "abort") {
if (e[c]) {
e[c].abort()
}
e[c] = a
}
})
} else {
var d = $.ajax;
$.ajax = function (b) {
var a = ("mode" in b ? b : $.ajaxSettings).mode,
port = ("port" in b ? b : $.ajaxSettings).port;
if (a == "abort") {
if (e[port]) {
e[port].abort()
}
return (e[port] = d.apply(this, arguments))
}
return d.apply(this, arguments)
}
}
})(jQCT);
(function ($) {
if (!$.event.special.focusin && !$.event.special.focusout && document.addEventListener) {
$.each({
focus: "focusin",
blur: "focusout"
}, function (b, a) {
$.event.special[a] = {
setup: function () {
this.addEventListener(b, handler, true)
},
teardown: function () {
this.removeEventListener(b, handler, true)
},
handler: function (e) {
arguments[0] = $.event.fix(e);
arguments[0].type = a;
return $.event.handle.apply(this, arguments)
}
};
function handler(e) {
e = $.event.fix(e);
e.type = a;
return $.event.handle.call(this, e)
}
})
}
$.extend($.fn, {
validateDelegate: function (d, e, c) {
return this.bind(e, function (a) {
var b = $(a.target);
if (b.is(d)) {
return c.apply(b, arguments)
}
})
}
})
})(jQCT);
(function ($) {
$.validator.addMethod("ccMasking", function (b, c, a) {
return $(c).data("validmasking") || false
}, $.validator.messages.ccMasking);
$.validator.addMethod("ccType", function (b, c, a) {
return CT.LIB.Object.isDefined($(c).data("properties").ccType) ? true : false
}, $.validator.messages.ccType);
$.validator.addMethod("creditcarddate", function (b, c, a) {
var d = new Date(2000 + parseInt(a.year, 10), a.month, 1);
var e = new Date();
if (d > e) {
return true
} else {
return false
}
}, $.validator.messages.creditcarddate);
$.validator.addMethod("phoneNumber", function (b, c, a) {
return this.optional(c) || /^[0-9+-/(/)\s]*$/.test(b)
}, $.validator.messages.number);
$.validator.addMethod("driverage", function (b, c, a) {
var d = parseInt(b, 10);
if (d === a) {
return true
}
if (isNaN(d)) {
$("#ct_s3_dd_age_change").hide();
return false
}
if (d < 18 || d > 99) {
$("#ct_s3_dd_age_change").hide();
return false
} else {
return true
}
}, $.validator.messages.driverage);
$.validator.addMethod("driverage2", function (c, d, b) {
try {
var f = parseInt(c, 10);
var a = parseInt(b, 10);
if (f === a) {
$("#ct_s3_dd_age_change").hide();
return true
}
if (isNaN(f)) {
$("#ct_s3_dd_age_change").hide();
return false
}
if (abeSC.driversAge < 27 || abeSC.driversAge > 59) {
if (f !== abeSC.driversAge) {
$("#ct_s3_dd_age_change").show();
return false
}
}
if (f < 27 || f > 59) {
$("#ct_s3_dd_age_change").show();
return false
} else {
$("#ct_s3_dd_age_change").hide();
return true
}
} catch (e) {
try {
$("#ct_s3_dd_age_change").hide()
} catch (e2) {}
}
}, $.validator.messages.driverage2);
$.validator.addMethod("residence", function (b, c, a) {
var d = b;
if (d === a) {
$("#ct_s3_dd_country_change_btn").hide();
return true
} else {
$("#ct_s3_dd_country_change_btn").show();
return false
}
}, $.validator.messages.residence);
$.validator.addMethod("selectRequired", function (b, c, a) {
if (b === "") {
return false
} else {
return true
}
}, $.validator.messages.selectRequired);
$.validator.addMethod("checkList", function (b, c, a) {
return a.length > 0
}, $.validator.messages.checkList);
$.validator.addMethod("remoteXML", function (f, h, j) {
var k = this;
function previousValueXML(a, b) {
return $.data(a, "previousValue") || $.data(a, "previousValue", {
old: null,
valid: true,
message: b.defaultMessage(a, "remoteXML")
})
}
if (this.optional(h)) {
return true
}
var g = previousValueXML(h, k);
if (!this.settings.messages[h.name]) {
this.settings.messages[h.name] = {}
}
g.originalMessage = this.settings.messages[h.name].remoteXML;
this.settings.messages[h.name].remoteXML = g.message;
j = typeof j == "string" && {
url: j
} || j;
if (this.pending[h.name]) {
return "pending"
}
if (g.old === f) {
return g.valid
}
g.old = f;
this.startRequest(h);
var i = {};
$.ajax($.extend(true, {
url: j.proxy,
type: "POST",
dataType: "xml",
contentType: "text/xml",
data: j.object.createRequest(f),
success: function (d) {
if ($("Success", d).length) {
j.object.displayResponse($.xmlToJSON(d));
d = true
} else {
d = j.object.handleError($.xmlToJSON(d))
}
k.settings.messages[h.name].remoteXML = g.originalMessage;
var b = d === true;
if (b) {
h = k.clean(h);
var e = k.formSubmitted;
k.prepareElement(h);
k.formSubmitted = e;
k.successList.push(h);
delete k.invalid[h.name];
if (!k.numberOfInvalids()) {
k.toHide = k.toHide.add(k.containers)
}
k.showErrors();
$(h).valid()
} else {
var a = {};
var c = d || k.defaultMessage(h, "remoteXML");
a[h.name] = g.message = $.isFunction(c) ? c(f) : c;
k.invalid[h.name] = true;
k.showErrors(a)
}
g.valid = b;
k.stopRequest(h, b)
}
}, j));
return "pending"
}, $.validator.messages.remoteXML)
})(jQCT);
(function ($, h) {
var g, aps = Array.prototype.slice,
decode = decodeURIComponent,
jq_param = $.param,
jq_param_fragment, jq_deparam, jq_deparam_fragment, jq_bbq = $.bbq = $.bbq || {}, jq_bbq_pushState, jq_bbq_getState, jq_elemUrlAttr, jq_event_special = $.event.special,
str_hashchange = "hashchange",
str_querystring = "querystring",
str_fragment = "fragment",
str_elemUrlAttr = "elemUrlAttr",
str_location = "location",
str_href = "href",
str_src = "src",
re_trim_querystring = /^.*\?|#.*$/g,
re_trim_fragment = /^.*\#/,
re_no_escape, elemUrlAttr_cache = {};
function is_string(a) {
return typeof a === "string"
}
function curry(a) {
var b = aps.call(arguments, 1);
return function () {
return a.apply(this, b.concat(aps.call(arguments)))
}
}
function get_fragment(a) {
return a.replace(/^[^#]*#?(.*)$/, "$1")
}
function get_querystring(a) {
return a.replace(/(?:^[^?#]*\?([^#]*).*$)?.*/, "$1")
}
function jq_param_sub(b, c, d, a, e) {
var f, qs, matches, url_params, hash;
if (a !== g) {
matches = d.match(b ? /^([^#]*)\#?(.*)$/ : /^([^#?]*)\??([^#]*)(#?.*)/);
hash = matches[3] || "";
if (e === 2 && is_string(a)) {
qs = a.replace(b ? re_trim_fragment : re_trim_querystring, "")
} else {
url_params = jq_deparam(matches[2]);
a = is_string(a) ? jq_deparam[b ? str_fragment : str_querystring](a) : a;
qs = e === 2 ? a : e === 1 ? $.extend({}, a, url_params) : $.extend({}, url_params, a);
qs = jq_param(qs);
if (b) {
qs = qs.replace(re_no_escape, decode)
}
}
f = matches[1] + (b ? "#" : qs || !matches[1] ? "?" : "") + qs + hash
} else {
f = c(d !== g ? d : h[str_location][str_href])
}
return f
}
jq_param[str_querystring] = curry(jq_param_sub, 0, get_querystring);
jq_param[str_fragment] = jq_param_fragment = curry(jq_param_sub, 1, get_fragment);
jq_param_fragment.noEscape = function (b) {
b = b || "";
var a = $.map(b.split(""), encodeURIComponent);
re_no_escape = new RegExp(a.join("|"), "g")
};
jq_param_fragment.noEscape(",/");
$.deparam = jq_deparam = function (b, d) {
var c = {}, coerce_types = {
"true": !0,
"false": !1,
"null": null
};
$.each(b.replace(/\+/g, " ").split("&"), function (j, v) {
var a = v.split("="),
key = decode(a[0]),
val, cur = c,
i = 0,
keys = key.split("]["),
keys_last = keys.length - 1;
if (/\[/.test(keys[0]) && /\]$/.test(keys[keys_last])) {
keys[keys_last] = keys[keys_last].replace(/\]$/, "");
keys = keys.shift().split("[").concat(keys);
keys_last = keys.length - 1
} else {
keys_last = 0
} if (a.length === 2) {
val = decode(a[1]);
if (d) {
val = val && !isNaN(val) ? +val : val === "undefined" ? g : coerce_types[val] !== g ? coerce_types[val] : val
}
if (keys_last) {
for (; i <= keys_last; i++) {
key = keys[i] === "" ? cur.length : keys[i];
cur = cur[key] = i < keys_last ? cur[key] || (keys[i + 1] && isNaN(keys[i + 1]) ? {} : []) : val
}
} else {
if ($.isArray(c[key])) {
c[key].push(val)
} else {
if (c[key] !== g) {
c[key] = [c[key], val]
} else {
c[key] = val
}
}
}
} else {
if (key) {
c[key] = d ? g : ""
}
}
});
return c
};
function jq_deparam_sub(a, c, b) {
if (c === g || typeof c === "boolean") {
b = c;
c = jq_param[a ? str_fragment : str_querystring]()
} else {
c = is_string(c) ? c.replace(a ? re_trim_fragment : re_trim_querystring, "") : c
}
return jq_deparam(c, b)
}
jq_deparam[str_querystring] = curry(jq_deparam_sub, 0);
jq_deparam[str_fragment] = jq_deparam_fragment = curry(jq_deparam_sub, 1);
$[str_elemUrlAttr] || ($[str_elemUrlAttr] = function (a) {
return $.extend(elemUrlAttr_cache, a)
})({
a: str_href,
base: str_href,
iframe: str_src,
img: str_src,
input: str_src,
form: "action",
link: str_href,
script: str_src
});
jq_elemUrlAttr = $[str_elemUrlAttr];
function jq_fn_sub(b, d, c, e) {
if (!is_string(c) && typeof c !== "object") {
e = c;
c = d;
d = g
}
return this.each(function () {
var a = $(this),
attr = d || jq_elemUrlAttr()[(this.nodeName || "").toLowerCase()] || "",
url = attr && a.attr(attr) || "";
a.attr(attr, jq_param[b](url, c, e))
})
}
$.fn[str_querystring] = curry(jq_fn_sub, str_querystring);
$.fn[str_fragment] = curry(jq_fn_sub, str_fragment);
jq_bbq.pushState = jq_bbq_pushState = function (a, c) {
if (is_string(a) && /^#/.test(a) && c === g) {
c = 2
}
var b = a !== g,
url = jq_param_fragment(h[str_location][str_href], b ? a : {}, b ? c : 2);
h[str_location][str_href] = url + (/#/.test(url) ? "" : "#")
};
jq_bbq.getState = jq_bbq_getState = function (b, a) {
return b === g || typeof b === "boolean" ? jq_deparam_fragment(b) : jq_deparam_fragment(a)[b]
};
jq_bbq.removeState = function (a) {
var b = {};
if (a !== g) {
b = jq_bbq_getState();
$.each($.isArray(a) ? a : arguments, function (i, v) {
delete b[v]
})
}
jq_bbq_pushState(b, 2)
};
jq_event_special[str_hashchange] = $.extend(jq_event_special[str_hashchange], {
add: function (d) {
var f;
function new_handler(e) {
var c = e[str_fragment] = jq_param_fragment();
e.getState = function (b, a) {
return b === g || typeof b === "boolean" ? jq_deparam(c, b) : jq_deparam(c, a)[b]
};
f.apply(this, arguments)
}
if ($.isFunction(d)) {
f = d;
return new_handler
} else {
f = d.handler;
d.handler = new_handler
}
}
})
})(jQCT, this);
(function ($, g, e) {
var f, jq_event_special = $.event.special,
str_location = "location",
str_hashchange = "hashchange",
str_href = "href",
browser = $.browser,
mode = document.documentMode,
is_old_ie = browser.msie && (mode === e || mode < 8),
supports_onhashchange = "on" + str_hashchange in g && !is_old_ie;
function get_fragment(a) {
a = a || g[str_location][str_href];
return a.replace(/^[^#]*#?(.*)$/, "$1")
}
$[str_hashchange + "Delay"] = 100;
jq_event_special[str_hashchange] = $.extend(jq_event_special[str_hashchange], {
setup: function () {
if (supports_onhashchange) {
return false
}
$(f.start)
},
teardown: function () {
if (supports_onhashchange) {
return false
}
$(f.stop)
}
});
f = (function () {
var d = {}, timeout_id, iframe, set_history, get_history;
function init() {
set_history = get_history = function (a) {
return a
};
if (is_old_ie) {
iframe = $('<iframe src="javascript:0"/>').hide().insertAfter("body")[0].contentWindow;
get_history = function () {
return get_fragment(iframe.document[str_location][str_href])
};
set_history = function (a, c) {
if (a !== c) {
var b = iframe.document;
b.open().close();
b[str_location].hash = "#" + a
}
};
set_history(get_fragment())
}
}
d.start = function () {
if (timeout_id) {
return
}
var b = get_fragment();
set_history || init();
(function loopy() {
var a = get_fragment(),
history_hash = get_history(b);
if (a !== b) {
set_history(b = a, history_hash);
$(g).trigger(str_hashchange)
} else {
if (history_hash !== b) {
g[str_location][str_href] = g[str_location][str_href].replace(/#.*/, "") + "#" + history_hash
}
}
timeout_id = setTimeout(loopy, $[str_hashchange + "Delay"])
})()
};
d.stop = function () {
if (!iframe) {
timeout_id && clearTimeout(timeout_id);
timeout_id = 0
}
};
return d
})()
})(jQCT, this);
(function ($) {
$.fn.customInput = function () {
$(this).each(function (i) {
if ($(this).is("[type=checkbox],[type=radio]")) {
var d = $(this);
d.css("opacity", 0);
var b = (d.is("[type=checkbox]")) ? "checkbox" : "radio",
iconColor = d.data("iconColor");
var c = $("label[for=" + d.attr("id") + "]");
c.addClass("ct-ui-icon-" + (iconColor ? iconColor : "black"));
$('<div class="ct-ui-icon-' + b + '"></div>').insertBefore(d).append(d, c);
var a = $("input[name=" + d.attr("name") + "]");
c.hover(function () {
$(this).addClass("hover");
if (b == "checkbox" && d.is(":checked")) {
$(this).addClass("checkedHover")
}
}, function () {
$(this).removeClass("hover checkedHover")
});
d.data("custom", true).bind("updateState", function () {
if (d.is(":checked")) {
if (d.is(":radio")) {
a.each(function () {
$("label[for=" + $(this).attr("id") + "]").removeClass("checked")
})
}
c.addClass("checked")
} else {
c.removeClass("checked checkedHover checkedFocus")
}
}).trigger("updateState").click(function () {
$(this).trigger("updateState")
}).focus(function () {
c.addClass("focus");
if (b == "checkbox" && d.is(":checked")) {
$(this).addClass("checkedFocus")
}
}).blur(function () {
c.removeClass("focus checkedFocus")
})
}
});
$.propHooks.checked = {
set: function (c, b, d) {
var a = false;
if ($(c).data("custom") === true && c[d] !== b) {
a = true
}
var e = (c[d] = b);
if (a) {
$(c).trigger("updateState")
}
return e
}
}
}
})(jQCT);
(function ($) {
$.fn.sortElements = (function () {
var e = [].sort;
return function (c, b) {
b = b || function () {
return this
};
var d = this.map(function () {
var a = b.call(this),
parentNode = a.parentNode,
nextSibling = parentNode.insertBefore(document.createTextNode(""), a.nextSibling);
return function () {
if (parentNode === this) {
throw new Error("You can't sort elements if any one is a descendant of another.")
}
parentNode.insertBefore(this, nextSibling);
parentNode.removeChild(nextSibling)
}
});
return e.call(this, c).each(function (i) {
d[i].call(b.call(this))
})
}
})()
})(jQCT);
(function ($) {
function setup($) {
$.fn._fadeIn = $.fn.fadeIn;
var F = function () {};
var C = document.documentMode || 0;
var D = $.browser.msie && (($.browser.version < 8 && !C) || C < 8);
var E = $.browser.msie && /MSIE 6.0/.test(navigator.userAgent) && !C;
$.blockUI = function (a) {
install(window, a)
};
$.unblockUI = function (a) {
remove(window, a)
};
$.growlUI = function (a, c, b, e) {
var d = $('<div class="growlUI"></div>');
if (a) {
d.append("<h1>" + a + "</h1>")
}
if (c) {
d.append("<h2>" + c + "</h2>")
}
if (b == undefined) {
b = 3000
}
$.blockUI({
message: d,
fadeIn: 700,
fadeOut: 1000,
centerY: false,
timeout: b,
showOverlay: false,
onUnblock: e,
css: $.blockUI.defaults.growlCSS
})
};
$.fn.block = function (b) {
var c = $.extend({}, $.blockUI.defaults, b || {});
this.each(function () {
var a = $(this);
if (c.ignoreIfBlocked && a.data("blockUI.isBlocked")) {
return
}
a.unblock({
fadeOut: 0
})
});
return this.each(function () {
if ($.css(this, "position") == "static") {
this.style.position = "relative"
}
if ($.browser.msie) {
this.style.zoom = 1
}
install(this, b)
})
};
$.fn.unblock = function (a) {
return this.each(function () {
remove(this, a)
})
};
$.blockUI.version = 2.42;
$.blockUI.defaults = {
message: null,
title: null,
draggable: true,
theme: false,
css: {
padding: 0,
margin: 0,
width: "30%",
top: "40%",
left: "35%",
textAlign: "center",
color: "#000",
border: "3px solid #aaa",
backgroundColor: "#fff",
cursor: "wait"
},
themedCSS: {
width: "30%",
top: "40%",
left: "35%"
},
overlayCSS: {
backgroundColor: "#000",
opacity: 0.6,
cursor: "wait"
},
growlCSS: {
width: "350px",
top: "10px",
left: "",
right: "10px",
border: "none",
padding: "5px",
opacity: 0.6,
cursor: "default",
color: "#fff",
backgroundColor: "#000",
"-webkit-border-radius": "10px",
"-moz-border-radius": "10px",
"border-radius": "10px"
},
iframeSrc: /^https/i.test(window.location.href || "") ? "javascript:false" : "about:blank",
forceIframe: false,
baseZ: 1000,
centerX: true,
centerY: true,
allowBodyStretch: true,
bindEvents: true,
constrainTabKey: true,
fadeIn: 200,
fadeOut: 400,
timeout: 0,
showOverlay: true,
focusInput: true,
applyPlatformOpacityRules: true,
onBlock: null,
onUnblock: null,
quirksmodeOffsetHack: 4,
blockMsgClass: "blockMsg",
ignoreIfBlocked: false
};
var B = null;
var A = [];
function install(w, j) {
var m, themedCSS;
var n = (w == window);
var r = (j && j.message !== undefined ? j.message : undefined);
j = $.extend({}, $.blockUI.defaults, j || {});
if (j.ignoreIfBlocked && $(w).data("blockUI.isBlocked")) {
return
}
j.overlayCSS = $.extend({}, $.blockUI.defaults.overlayCSS, j.overlayCSS || {});
m = $.extend({}, $.blockUI.defaults.css, j.css || {});
themedCSS = $.extend({}, $.blockUI.defaults.themedCSS, j.themedCSS || {});
r = r === undefined ? j.message : r;
if (n && B) {
remove(window, {
fadeOut: 0
})
}
if (r && typeof r != "string" && (r.parentNode || r.jquery)) {
var g = r.jquery ? r[0] : r;
var c = {};
$(w).data("blockUI.history", c);
c.el = g;
c.parent = g.parentNode;
c.display = g.style.display;
c.position = g.style.position;
if (c.parent) {
c.parent.removeChild(g)
}
}
$(w).data("blockUI.onUnblock", j.onUnblock);
var z = j.baseZ;
var d = ($.browser.msie || j.forceIframe) ? $('<iframe class="blockUI" style="z-index:' + (z++) + ';display:none;border:none;margin:0;padding:0;position:absolute;width:100%;height:100%;top:0;left:0" src="' + j.iframeSrc + '"></iframe>') : $('<div class="blockUI" style="display:none"></div>');
var e = j.theme ? $('<div class="blockUI blockOverlay ui-widget-overlay" style="z-index:' + (z++) + ';display:none"></div>') : $('<div class="blockUI blockOverlay" style="z-index:' + (z++) + ';display:none;border:none;margin:0;padding:0;width:100%;height:100%;top:0;left:0"></div>');
var f, s;
if (j.theme && n) {
s = '<div class="blockUI ' + j.blockMsgClass + ' blockPage ui-dialog ui-widget ui-corner-all" style="z-index:' + (z + 10) + ';display:none;position:fixed"><div class="ui-widget-header ui-dialog-titlebar ui-corner-all blockTitle">' + (j.title || "&nbsp;") + '</div><div class="ui-widget-content ui-dialog-content"></div></div>'
} else {
if (j.theme) {
s = '<div class="blockUI ' + j.blockMsgClass + ' blockElement ui-dialog ui-widget ui-corner-all" style="z-index:' + (z + 10) + ';display:none;position:absolute"><div class="ui-widget-header ui-dialog-titlebar ui-corner-all blockTitle">' + (j.title || "&nbsp;") + '</div><div class="ui-widget-content ui-dialog-content"></div></div>'
} else {
if (n) {
s = '<div class="blockUI ' + j.blockMsgClass + ' blockPage" style="z-index:' + (z + 10) + ';display:none;position:fixed"></div>'
} else {
s = '<div class="blockUI ' + j.blockMsgClass + ' blockElement" style="z-index:' + (z + 10) + ';display:none;position:absolute"></div>'
}
}
}
f = $(s);
if (r) {
if (j.theme) {
f.css(themedCSS);
f.addClass("ui-widget-content")
} else {
f.css(m)
}
}
if (!j.theme && (!j.applyPlatformOpacityRules || !($.browser.mozilla && /Linux/.test(navigator.platform)))) {
e.css(j.overlayCSS)
}
e.css("position", n ? "fixed" : "absolute");
if ($.browser.msie || j.forceIframe) {
d.css("opacity", 0)
}
var p = [d, e, f],
$par = n ? $("body") : $(w);
$.each(p, function () {
this.appendTo($par)
});
if (j.theme && j.draggable && $.fn.draggable) {
f.draggable({
handle: ".ui-dialog-titlebar",
cancel: "li"
})
}
var u = D && (!$.boxModel || $("object,embed", n ? null : w).length > 0);
if (E || u) {
if (n && j.allowBodyStretch && $.boxModel) {
$("html,body").css("height", "100%")
}
if ((E || !$.boxModel) && !n) {
var t = sz(w, "borderTopWidth"),
l = sz(w, "borderLeftWidth");
var q = t ? "(0 - " + t + ")" : 0;
var k = l ? "(0 - " + l + ")" : 0
}
$.each([d, e, f], function (i, o) {
var s = o[0].style;
s.position = "absolute";
if (i < 2) {
n ? s.setExpression("height", "Math.max(document.body.scrollHeight, document.body.offsetHeight) - ($.boxModel?0:" + j.quirksmodeOffsetHack + ') + "px"') : s.setExpression("height", 'this.parentNode.offsetHeight + "px"');
n ? s.setExpression("width", '$.boxModel && document.documentElement.clientWidth || document.body.clientWidth + "px"') : s.setExpression("width", 'this.parentNode.offsetWidth + "px"');
if (k) {
s.setExpression("left", k)
}
if (q) {
s.setExpression("top", q)
}
} else {
if (j.centerY) {
if (n) {
s.setExpression("top", '(document.documentElement.clientHeight || document.body.clientHeight) / 2 - (this.offsetHeight / 2) + (blah = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + "px"')
}
s.marginTop = 0
} else {
if (!j.centerY && n) {
var b = (j.css && j.css.top) ? parseInt(j.css.top) : 0;
var a = "((document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + " + b + ') + "px"';
s.setExpression("top", a)
}
}
}
})
}
if (r) {
if (j.theme) {
f.find(".ui-widget-content").append(r)
} else {
f.append(r)
} if (r.jquery || r.nodeType) {
$(r).show()
}
}
if (($.browser.msie || j.forceIframe) && j.showOverlay) {
d.show()
}
if (j.fadeIn) {
var h = j.onBlock ? j.onBlock : F;
var x = (j.showOverlay && !r) ? h : F;
var y = r ? h : F;
if (j.showOverlay) {
e._fadeIn(j.fadeIn, x)
}
if (r) {
f._fadeIn(j.fadeIn, y)
}
} else {
if (j.showOverlay) {
e.show()
}
if (r) {
f.show()
}
if (j.onBlock) {
j.onBlock()
}
}
bind(1, w, j);
if (n) {
B = f[0];
A = $(":input:enabled:visible", B);
if (j.focusInput) {
setTimeout(focus, 20)
}
} else {
center(f[0], j.centerX, j.centerY)
} if (j.timeout) {
var v = setTimeout(function () {
n ? $.unblockUI(j) : $(w).unblock(j)
}, j.timeout);
$(w).data("blockUI.timeout", v)
}
}
function remove(d, c) {
var e = (d == window);
var f = $(d);
var b = f.data("blockUI.history");
var a = f.data("blockUI.timeout");
if (a) {
clearTimeout(a);
f.removeData("blockUI.timeout")
}
c = $.extend({}, $.blockUI.defaults, c || {});
bind(0, d, c);
if (c.onUnblock === null) {
c.onUnblock = f.data("blockUI.onUnblock");
f.removeData("blockUI.onUnblock")
}
var g;
if (e) {
g = $("body").children().filter(".blockUI").add("body > .blockUI")
} else {
g = $(".blockUI", d)
} if (e) {
B = A = null
}
if (c.fadeOut) {
g.fadeOut(c.fadeOut);
setTimeout(function () {
reset(g, b, c, d)
}, c.fadeOut)
} else {
reset(g, b, c, d)
}
}
function reset(d, a, b, c) {
d.each(function (i, o) {
if (this.parentNode) {
this.parentNode.removeChild(this)
}
});
if (a && a.el) {
a.el.style.display = a.display;
a.el.style.position = a.position;
if (a.parent) {
a.parent.appendChild(a.el)
}
$(c).removeData("blockUI.history")
}
if (typeof b.onUnblock == "function") {
b.onUnblock(c, b)
}
}
function bind(b, c, a) {
var d = c == window,
$el = $(c);
if (!b && (d && !B || !d && !$el.data("blockUI.isBlocked"))) {
return
}
$el.data("blockUI.isBlocked", b);
if (!a.bindEvents || (b && !a.showOverlay)) {
return
}
var e = "mousedown mouseup keydown keypress";
b ? $(document).bind(e, a, handler) : $(document).unbind(e, handler)
}
function handler(e) {
if (e.keyCode && e.keyCode == 9) {
if (B && e.data.constrainTabKey) {
var b = A;
var c = !e.shiftKey && e.target === b[b.length - 1];
var d = e.shiftKey && e.target === b[0];
if (c || d) {
setTimeout(function () {
focus(d)
}, 10);
return false
}
}
}
var a = e.data;
if ($(e.target).parents("div." + a.blockMsgClass).length > 0) {
return true
}
return $(e.target).parents().children().filter("div.blockUI").length == 0
}
function focus(a) {
if (!A) {
return
}
var e = A[a === true ? A.length - 1 : 0];
if (e) {
e.focus()
}
}
function center(a, x, y) {
var p = a.parentNode,
s = a.style;
var l = ((p.offsetWidth - a.offsetWidth) / 2) - sz(p, "borderLeftWidth");
var t = ((p.offsetHeight - a.offsetHeight) / 2) - sz(p, "borderTopWidth");
if (x) {
s.left = l > 0 ? (l + "px") : "0"
}
if (y) {
s.top = t > 0 ? (t + "px") : "0"
}
}
function sz(a, p) {
return parseInt($.css(a, p)) || 0
}
}
if (typeof define === "function" && define.amd && define.amd.jQuery) {
define(["jquery"], setup)
} else {
setup(jQCT)
}
})(jQCT);
(function ($) {
$.fn.bgiframe = ($.browser.msie && /msie 6\.0/i.test(navigator.userAgent) ? function (s) {
s = $.extend({
top: "auto",
left: "auto",
width: "auto",
height: "auto",
opacity: true,
src: "javascript:false;"
}, s);
var a = '<iframe class="bgiframe"frameborder="0"tabindex="-1"src="' + s.src + '"style="display:block;position:absolute;z-index:-1;' + (s.opacity !== false ? "filter:Alpha(Opacity='0');" : "") + "top:" + (s.top == "auto" ? "expression(((parseInt(this.parentNode.currentStyle.borderTopWidth)||0)*-1)+'px')" : prop(s.top)) + ";left:" + (s.left == "auto" ? "expression(((parseInt(this.parentNode.currentStyle.borderLeftWidth)||0)*-1)+'px')" : prop(s.left)) + ";width:" + (s.width == "auto" ? "expression(this.parentNode.offsetWidth+'px')" : prop(s.width)) + ";height:" + (s.height == "auto" ? "expression(this.parentNode.offsetHeight+'px')" : prop(s.height)) + ';"/>';
return this.each(function () {
if ($(this).children("iframe.bgiframe").length === 0) {
this.insertBefore(document.createElement(a), this.firstChild)
}
})
} : function () {
return this
});
$.fn.bgIframe = $.fn.bgiframe;
function prop(n) {
return n && n.constructor === Number ? n + "px" : n
}
})(jQCT);
(function ($) {
$.fn.equalizeBottoms = function (b) {
if (isNaN(b)) {
b = 0;
this.each(function () {
var a = $(this).css({
height: "auto"
});
b = Math.max(b, a.offset().top + a.outerHeight())
})
}
return this.each(function () {
var a = $(this);
a.height(b - a.offset().top - a.outerHeight() + a.height())
})
}
})(jQCT);
(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
};
h.window = function (a) {
return $(window).scrollable()
};
$.fn.scrollable = function () {
return this.map(function () {
var b = this,
isWin = !b.nodeName || $.inArray(b.nodeName.toLowerCase(), ["iframe", "#document", "html", "body"]) != -1;
if (!isWin) {
return b
}
var a = (b.contentWindow || b).document || b.ownerDocument || b;
return $.browser.safari || a.compatMode == "BackCompat" ? a.body : a.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 = 9000000000
}
g = $.extend({}, h.defaults, g);
f = f || g.speed || 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 () {
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);
case "object":
if (targ.is || targ.style) {
toff = (targ = $(targ)).offset()
}
}
$.each(g.axis.split(""), function (i, b) {
var a = b == "x" ? "Left" : "Top",
pos = a.toLowerCase(),
key = "scroll" + a,
old = d[key],
Dim = b == "x" ? "Width" : "Height";
if (toff) {
attr[key] = toff[pos] + (win ? 0 : old - $elem.offset()[pos]);
if (g.margin) {
attr[key] -= parseInt(targ.css("margin" + a)) || 0;
attr[key] -= parseInt(targ.css("border" + a + "Width")) || 0
}
attr[key] += g.offset[pos] || 0;
if (g.over[pos]) {
attr[key] += targ[Dim.toLowerCase()]() * g.over[pos]
}
} else {
attr[key] = targ[pos]
} if (/^\d+$/.test(attr[key])) {
attr[key] = attr[key] <= 0 ? 0 : Math.min(attr[key], max(Dim))
}
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)
})
}
function max(a) {
var b = "scroll" + a;
if (!win) {
return d[b]
}
var c = "client" + a,
html = d.ownerDocument.documentElement,
body = d.ownerDocument.body;
return Math.max(html[b], body[b]) - Math.min(html[c], body[c])
}
}).end()
};
function both(a) {
return typeof a == "object" ? a : {
top: a,
left: a
}
}
})(jQCT);
(function () {
var k = [].indexOf || function (a) {
for (var i = 0, l = this.length; i < l; i++) {
if (i in this && this[i] === a) {
return i
}
}
return -1
}, __slice = [].slice;
(function (b, a) {
if (typeof define === "function" && define.amd) {
return define("waypoints", ["jquery"], function ($) {
return a($, b)
})
} else {
return a(jQCT, b)
}
})(this, function ($, h) {
var j, Context, Waypoint, allWaypoints, contextCounter, contextKey, contexts, isTouch, jQMethods, methods, resizeEvent, scrollEvent, waypointCounter, waypointKey, wp, wps;
j = $(h);
isTouch = k.call(h, "ontouchstart") >= 0;
allWaypoints = {
horizontal: {},
vertical: {}
};
contextCounter = 1;
contexts = {};
contextKey = "waypoints-context-id";
resizeEvent = "resize.waypoints";
scrollEvent = "scroll.waypoints";
waypointCounter = 1;
waypointKey = "waypoints-waypoint-ids";
wp = "waypoint";
wps = "waypoints";
Context = (function () {
function Context(b) {
var c = this;
this.$element = b;
this.element = b[0];
this.didResize = false;
this.didScroll = false;
this.id = "context" + contextCounter++;
this.oldScroll = {
x: b.scrollLeft(),
y: b.scrollTop()
};
this.waypoints = {
horizontal: {},
vertical: {}
};
b.data(contextKey, this.id);
contexts[this.id] = this;
b.bind(scrollEvent, function () {
var a;
if (!(c.didScroll || isTouch)) {
c.didScroll = true;
a = function () {
c.doScroll();
return c.didScroll = false
};
return h.setTimeout(a, $[wps].settings.scrollThrottle)
}
});
b.bind(resizeEvent, function () {
var a;
if (!c.didResize) {
c.didResize = true;
a = function () {
$[wps]("refresh");
return c.didResize = false
};
return h.setTimeout(a, $[wps].settings.resizeThrottle)
}
})
}
Context.prototype.doScroll = function () {
var g, _this = this;
g = {
horizontal: {
newScroll: this.$element.scrollLeft(),
oldScroll: this.oldScroll.x,
forward: "right",
backward: "left"
},
vertical: {
newScroll: this.$element.scrollTop(),
oldScroll: this.oldScroll.y,
forward: "down",
backward: "up"
}
};
if (isTouch && (!g.vertical.oldScroll || !g.vertical.newScroll)) {
$[wps]("refresh")
}
$.each(g, function (e, f) {
var d, isForward, triggered;
triggered = [];
isForward = f.newScroll > f.oldScroll;
d = isForward ? f.forward : f.backward;
$.each(_this.waypoints[e], function (a, c) {
var b, _ref1;
if ((f.oldScroll < (b = c.offset) && b <= f.newScroll)) {
return triggered.push(c)
} else {
if ((f.newScroll < (_ref1 = c.offset) && _ref1 <= f.oldScroll)) {
return triggered.push(c)
}
}
});
triggered.sort(function (a, b) {
return a.offset - b.offset
});
if (!isForward) {
triggered.reverse()
}
return $.each(triggered, function (i, a) {
if (a.options.continuous || i === triggered.length - 1) {
return a.trigger([d])
}
})
});
return this.oldScroll = {
x: g.horizontal.newScroll,
y: g.vertical.newScroll
}
};
Context.prototype.refresh = function () {
var e, cOffset, isWin, _this = this;
isWin = $.isWindow(this.element);
cOffset = this.$element.offset();
this.doScroll();
e = {
horizontal: {
contextOffset: isWin ? 0 : cOffset.left,
contextScroll: isWin ? 0 : this.oldScroll.x,
contextDimension: this.$element.width(),
oldScroll: this.oldScroll.x,
forward: "right",
backward: "left",
offsetProp: "left"
},
vertical: {
contextOffset: isWin ? 0 : cOffset.top,
contextScroll: isWin ? 0 : this.oldScroll.y,
contextDimension: isWin ? $[wps]("viewportHeight") : this.$element.height(),
oldScroll: this.oldScroll.y,
forward: "down",
backward: "up",
offsetProp: "top"
}
};
return $.each(e, function (d, c) {
return $.each(_this.waypoints[d], function (i, a) {
if (a.options.step === abeSC.step) {
var b, elementOffset, oldOffset, _ref, _ref1;
b = a.options.offset;
oldOffset = a.offset;
elementOffset = $.isWindow(a.element) ? 0 : a.$element.offset()[c.offsetProp];
if ($.isFunction(b)) {
b = b.apply(a.element)
} else {
if (typeof b === "string") {
b = parseFloat(b);
if (a.options.offset.indexOf("%") > -1) {
b = Math.ceil(c.contextDimension * b / 100)
}
}
}
a.offset = elementOffset - c.contextOffset + c.contextScroll - b;
if ((a.options.onlyOnScroll && (oldOffset != null)) || !a.enabled) {
return
}
if (oldOffset !== null && (oldOffset < (_ref = c.oldScroll) && _ref <= a.offset)) {
return a.trigger([c.backward])
} else {
if (oldOffset !== null && (oldOffset > (_ref1 = c.oldScroll) && _ref1 >= a.offset)) {
return a.trigger([c.forward])
} else {
if (oldOffset === null && c.oldScroll >= a.offset) {
return a.trigger([c.forward])
}
}
}
}
})
})
};
Context.prototype.checkEmpty = function () {
if ($.isEmptyObject(this.waypoints.horizontal) && $.isEmptyObject(this.waypoints.vertical)) {
this.$element.unbind([resizeEvent, scrollEvent].join(" "));
return delete contexts[this.id]
}
};
return Context
})();
Waypoint = (function () {
function Waypoint(e, c, d) {
var b, _ref;
d = $.extend({}, $.fn[wp].defaults, d);
if (d.offset === "bottom-in-view") {
d.offset = function () {
var a;
a = $[wps]("viewportHeight");
if (!$.isWindow(c.element)) {
a = c.$element.height()
}
offsetXtra = $(h).height();
if (typeof d.offsetXtra === "number") {
offsetXtra = offsetXtra * d.offsetXtra
}
return a - $(this).outerHeight() + offsetXtra
}
}
this.$element = e;
this.element = e[0];
this.axis = d.horizontal ? "horizontal" : "vertical";
this.callback = d.handler;
this.context = c;
this.enabled = d.enabled;
this.id = "waypoints" + waypointCounter++;
this.offset = null;
this.options = d;
c.waypoints[this.axis][this.id] = this;
allWaypoints[this.axis][this.id] = this;
b = (_ref = e.data(waypointKey)) != null ? _ref : [];
b.push(this.id);
e.data(waypointKey, b)
}
Waypoint.prototype.trigger = function (a) {
if (!this.enabled) {
return
}
if (this.callback != null) {
this.callback.apply(this.element, a)
}
if (this.options.triggerOnce) {
return this.destroy()
}
};
Waypoint.prototype.disable = function () {
return this.enabled = false
};
Waypoint.prototype.enable = function () {
this.context.refresh();
return this.enabled = true
};
Waypoint.prototype.destroy = function () {
delete allWaypoints[this.axis][this.id];
delete this.context.waypoints[this.axis][this.id];
return this.context.checkEmpty()
};
Waypoint.getWaypointsByElement = function (b) {
var c, ids;
ids = $(b).data(waypointKey);
if (!ids) {
return []
}
c = $.extend({}, allWaypoints.horizontal, allWaypoints.vertical);
return $.map(ids, function (a) {
return c[a]
})
};
return Waypoint
})();
methods = {
init: function (f, c) {
var b;
if (c == null) {
c = {}
}
if ((b = c.handler) == null) {
c.handler = f
}
this.each(function () {
var a, context, contextElement, _ref1;
a = $(this);
contextElement = (_ref1 = c.context) != null ? _ref1 : $.fn[wp].defaults.context;
if (!$.isWindow(contextElement)) {
contextElement = a.closest(contextElement)
}
contextElement = $(contextElement);
context = contexts[contextElement.data(contextKey)];
if (!context) {
context = new Context(contextElement)
}
return new Waypoint(a, context, c)
});
$[wps]("refresh");
return this
},
trigger: function (a) {
return methods._invoke(this, "trigger", a)
},
disable: function () {
return methods._invoke(this, "disable")
},
enable: function () {
return methods._invoke(this, "enable")
},
destroy: function () {
return methods._invoke(this, "destroy")
},
prev: function (d, e) {
return methods._traverse.call(this, d, e, function (c, b, a) {
if (b > 0) {
return c.push(a[b - 1])
}
})
},
next: function (d, e) {
return methods._traverse.call(this, d, e, function (c, b, a) {
if (b < a.length - 1) {
return c.push(a[b + 1])
}
})
},
_traverse: function (b, d, c) {
var e, waypoints;
if (b == null) {
b = "vertical"
}
if (d == null) {
d = h
}
waypoints = jQMethods.aggregate(d);
e = [];
this.each(function () {
var a;
a = $.inArray(this, waypoints[b]);
return c(e, a, waypoints[b])
});
return this.pushStack(e)
},
_invoke: function (d, c, e) {
d.each(function () {
var b;
b = Waypoint.getWaypointsByElement(this);
return $.each(b, function (i, a) {
e ? a[c](e) : a[c]();
return true
})
});
return this
}
};
$.fn[wp] = function () {
var a, method;
method = arguments[0], a = 2 <= arguments.length ? __slice.call(arguments, 1) : [];
if (methods[method]) {
return methods[method].apply(this, a)
} else {
if ($.isFunction(method)) {
return methods.init.apply(this, arguments)
} else {
if ($.isPlainObject(method)) {
return methods.init.apply(this, [null, method])
} else {
if (!method) {
return $.error("jQuery Waypoints needs a callback function or handler option.")
} else {
return $.error("The " + method + " method does not exist in jQuery Waypoints.")
}
}
}
}
};
$.fn[wp].defaults = {
context: h,
continuous: true,
enabled: true,
horizontal: false,
offset: 0,
triggerOnce: false
};
jQMethods = {
refresh: function () {
return $.each(contexts, function (i, a) {
return a.refresh()
})
},
viewportHeight: function () {
var a;
return (a = h.innerHeight) != null ? a : j.height()
},
aggregate: function (e) {
var f, waypoints, _ref;
f = allWaypoints;
if (e) {
f = (_ref = contexts[$(e).data(contextKey)]) != null ? _ref.waypoints : void 0
}
if (!f) {
return []
}
waypoints = {
horizontal: [],
vertical: []
};
$.each(waypoints, function (d, c) {
$.each(f[d], function (b, a) {
return c.push(a)
});
c.sort(function (a, b) {
return a.offset - b.offset
});
waypoints[d] = $.map(c, function (a) {
return a.element
});
return waypoints[d] = $.unique(waypoints[d])
});
return waypoints
},
findBelow: function (c) {
if (c == null) {
c = h
}
return jQMethods._filter(c, "vertical", function (a, b) {
return b.offset <= $(h).height()
})
},
above: function (c) {
if (c == null) {
c = h
}
return jQMethods._filter(c, "vertical", function (a, b) {
return b.offset <= a.oldScroll.y
})
},
below: function (c) {
if (c == null) {
c = h
}
return jQMethods._filter(c, "vertical", function (a, b) {
return b.offset > a.oldScroll.y
})
},
left: function (c) {
if (c == null) {
c = h
}
return jQMethods._filter(c, "horizontal", function (a, b) {
return b.offset <= a.oldScroll.x
})
},
right: function (c) {
if (c == null) {
c = h
}
return jQMethods._filter(c, "horizontal", function (a, b) {
return b.offset > a.oldScroll.x
})
},
enable: function () {
return jQMethods._invoke("enable")
},
disable: function () {
return jQMethods._invoke("disable")
},
destroy: function () {
return jQMethods._invoke("destroy")
},
extendFn: function (a, f) {
return methods[a] = f
},
_invoke: function (c) {
var d;
d = $.extend({}, allWaypoints.vertical, allWaypoints.horizontal);
return $.each(d, function (b, a) {
a[c]();
return true
})
},
_filter: function (f, d, c) {
var e, waypoints;
e = contexts[$(f).data(contextKey)];
if (!e) {
return []
}
waypoints = [];
$.each(e.waypoints[d], function (i, a) {
if (c(e, a)) {
return waypoints.push(a)
}
});
waypoints.sort(function (a, b) {
return a.offset - b.offset
});
return $.map(waypoints, function (a) {
return a.element
})
}
};
$[wps] = function () {
var a, method;
method = arguments[0], a = 2 <= arguments.length ? __slice.call(arguments, 1) : [];
if (jQMethods[method]) {
return jQMethods[method].apply(null, a)
} else {
return jQMethods.aggregate.call(null, method)
}
};
$[wps].settings = {
resizeThrottle: 1000,
scrollThrottle: 30
};
return j.load(function () {
return $[wps]("refresh")
})
})
}).call(this);
(function () {
(function (b, a) {
if (typeof define === "function" && define.amd) {
return define(["jquery", "waypoints"], a)
} else {
return a(jQCT)
}
})(this, function ($) {
var f, sticky_wrap;
f = {
wrapper: '<div class="ct-ui-sticky-wrapper" />',
stuckClass: "ct-ui-stuck"
};
sticky_wrap = function (a, b) {
a.wrap(b.wrapper);
return a.parent()
};
$.waypoints("extendFn", "sticky", function (e) {
var d = this,
$wrap, options, originalHandler;
options = $.extend({}, $.fn.waypoint.defaults, f, e);
options.container = options.container || [];
$wrap = sticky_wrap(this, options);
originalHandler = options.handler;
options.handler = function (b) {
var a, shouldBeStuck;
a = $(this).children(".ct-ui-box-sticky");
shouldBeStuck = b === "down" || b === "right";
a.toggleClass(options.stuckClass, shouldBeStuck);
$wrap.toggleClass(options.stuckClass, shouldBeStuck);
$wrap.width(shouldBeStuck && options.container ? options.container.outerWidth() : "");
if (shouldBeStuck) {
if (options.container.length > 0) {
options.container.children().not($wrap).prependTo($wrap);
var c;
if (options.container) {
c = $(window).width() - ($(options.container).offset().left + $(options.container).width())
}
}
} else {
if (options.container.length > 0) {
$wrap.children().not(d).prependTo(options.container)
}
} if (originalHandler != null) {
return originalHandler.call(this, b)
}
};
$wrap.waypoint(options);
return this.data("stuckClass", options.stuckClass)
});
return $.waypoints("extendFn", "unsticky", function () {
this.parent().waypoint("destroy");
this.unwrap();
return this.removeClass(this.data("stuckClass"))
})
})
}).call(this);
var namespace = (function (e) {
var d = /^([\$\_a-z][\$\_a-z\d]*\.?)+$/i;
return function (a) {
var c = Array.prototype.slice.call(arguments);
var b = [];
while (c.length) {
a = genNS(c.shift());
if (a) {
b.push(a)
}
}
if (b.length == 0) {
return
}
if (arguments.length == 1) {
return b[0]
}
return b
};
function genNS(a) {
if (!a.match(d)) {
return
}
a = a.split(".");
var b = e;
for (var i = 0; i < a.length; i++) {
b[a[i]] = b[a[i]] || {};
b = b[a[i]]
}
return b
}
}(this));
(function ($) {
namespace("CT.LIB.Object");
var e = CT.LIB.Object = {
valueFrom: function (a, c, b) {
return CT.LIB.Object.isEmpty(a, b) ? c : a
},
typeOf: function (b) {
if (b === null) {
return "null"
}
var a = typeof b;
if (a === "undefined" || a === "string" || a === "number" || a === "boolean") {
return a
}
var c = Object.prototype.toString.call(b);
switch (c) {
case "[object Array]":
return "array";
case "[object Date]":
return "date";
case "[object Boolean]":
return "boolean";
case "[object Number]":
return "number";
case "[object RegExp]":
return "regexp"
}
if (a === "function") {
return "function"
}
if (a === "object") {
if (b.nodeType !== undefined) {
if (b.nodeType === 3) {
return (/\S/).test(b.nodeValue) ? "textnode" : "whitespace"
} else {
return "element"
}
}
return "object"
}
throw new Error('Failed to determine the type of the specified value "' + b + '". This is most likely a bug.')
},
isEmpty: function (a, b) {
return (a === null) || (a === undefined) || (!b ? a === "" : false) || (CT.LIB.Object.isArray(a) && a.length === 0)
},
isEmptyObject: function (a) {
var b;
if (a.length && a.length > 0) {
return false
}
for (b in a) {
if (Object.prototype.hasOwnProperty.call(a, b)) {
return false
}
}
return true
},
isArray: ("isArray" in Array) ? Array.isArray : function (a) {
return Object.prototype.toString.call(a) === "[object Array]"
},
isDate: function (a) {
return Object.prototype.toString.call(a) === "[object Date]"
},
isObject: (Object.prototype.toString.call(null) === "[object Object]") ? function (a) {
return a !== null && a !== undefined && Object.prototype.toString.call(a) === "[object Object]" && a.nodeType === undefined
} : function (a) {
return Object.prototype.toString.call(a) === "[object Object]"
},
isPrimitive: function (b) {
var a = typeof b;
return a === "string" || a === "number" || a === "boolean"
}
View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment