function bindAccordionSubCategories() {
    $("a.show-cats").click(function () {
        var text = $(this).find('i');
        var ul = $(this).parent().parent().find('ul');

        if (text) {
            if ($(text).find("span").text() == "Hide") {
                if (ul) {
                    $(ul).slideUp("slow");
                }
                $(text).find("span").text('Show');
                $(text).addClass("fa-plus-square").removeClass("fa-minus-square");
            } else {
                if (ul) {
                    $(ul).slideDown("slow");
                }
                $(text).find("span").text('Hide');
                $(text).addClass("fa-minus-square").removeClass("fa-plus-square");
            }
        }
    });
}
$(document).ready(function () {
    bindAccordionSubCategories();
    $('.image-gallery a').imagefill();
});
var prm = Sys.WebForms.PageRequestManager.getInstance();

prm.add_endRequest(function () {
    bindAccordionSubCategories();
});
function bindAccordionSubCategories(){$("a.show-cats").click(function(){var n=$(this).find("i"),t=$(this).parent().parent().find("ul");n&&($(n).find("span").text()=="Hide"?(t&&$(t).slideUp("slow"),$(n).find("span").text("Show"),$(n).addClass("fa-plus-square").removeClass("fa-minus-square")):(t&&$(t).slideDown("slow"),$(n).find("span").text("Hide"),$(n).addClass("fa-minus-square").removeClass("fa-plus-square")))})}$(document).ready(function(){bindAccordionSubCategories();$(".image-gallery a").imagefill()});var prm=Sys.WebForms.PageRequestManager.getInstance();prm.add_endRequest(function(){bindAccordionSubCategories()});
$(window).on('load', function () {
    if (typeof ($.fn.imagefill) == 'function') {
        $('.news-image-wrapper').imagefill();
    }
});
$(window).on("load",function(){typeof $.fn.imagefill=="function"&&$(".news-image-wrapper").imagefill()});
$(window).on('load', function () {
    if (typeof ($.fn.imagefill) == 'function') {
        $('.profile-manager-item-image-wrapper').imagefill();
    }
});

$(document).ready(function () {
    BindProfileSlideshow();

});


function BindProfileSlideshow() {

    var owl = $('.profile-manager-feed-wrapper .feed-carousel');

    owl.owlCarousel({
        autoplay: true,
        loop: true,
        lazyLoad: false,
        dots: false,
        autoplayTimeout: 8000,
        autoplayHoverPause: true,
        responsiveRefreshRate: 500,
        autoplayHoverPause: true,
        navText: ['&#xf104;', '&#xf105;'],
        responsive: {
            0: {
                items: 1
            },
            768: {
                items: 1
            },
            1200: {
                items: 1
            },
            1800: {
                items: 1
            }
        }
    });

    $('.feed-controls .next').click(function () {
        owl.trigger('next.owl.carousel');
    })
    $('.feed-controls .prev').click(function () {
        owl.trigger('prev.owl.carousel');
    })
    //$('.feed-controls .pause').on('click', function () {
    //    //$('.feed-controls .pause').addClass('hidden');
    //    //$('.feed-controls .play').removeClass('hidden');
    //    owl.trigger('stop.owl.autoplay');
    //    console.log('Pause')
    //})
    //$('.feed-controls .play').on('click', function () {
    //    //$('.feed-controls .play').addClass('hidden');
    //    //$('.feed-controls .pause').removeClass('hidden');
    //    owl.trigger('play.owl.autoplay');
    //})

}
function BindProfileSlideshow(){var n=$(".profile-manager-feed-wrapper .feed-carousel");n.owlCarousel({autoplay:!0,loop:!0,lazyLoad:!1,dots:!1,autoplayTimeout:8e3,autoplayHoverPause:!0,responsiveRefreshRate:500,autoplayHoverPause:!0,navText:["&#xf104;","&#xf105;"],responsive:{0:{items:1},768:{items:1},1200:{items:1},1800:{items:1}}});$(".feed-controls .next").click(function(){n.trigger("next.owl.carousel")});$(".feed-controls .prev").click(function(){n.trigger("prev.owl.carousel")})}$(window).on("load",function(){typeof $.fn.imagefill=="function"&&$(".profile-manager-item-image-wrapper").imagefill()});$(document).ready(function(){BindProfileSlideshow()});
$(function () {
    $('.datetimepicker').datetimepicker({
        format: 'DD/MM/YYYY'
    });

    $('[data-toggle="tooltip"]').tooltip();
});
$(function(){$(".datetimepicker").datetimepicker({format:"DD/MM/YYYY"});$('[data-toggle="tooltip"]').tooltip()});
/*!
 * accounting.js v0.4.2
 * Copyright 2014 Open Exchange Rates
 *
 * Freely distributable under the MIT license.
 * Portions of accounting.js are inspired or borrowed from underscore.js
 *
 * Full details and documentation:
 * http://openexchangerates.github.io/accounting.js/
 */

(function(root, undefined) {

	/* --- Setup --- */

	// Create the local library object, to be exported or referenced globally later
	var lib = {};

	// Current version
	lib.version = '0.4.1';


	/* --- Exposed settings --- */

	// The library's settings configuration object. Contains default parameters for
	// currency and number formatting
	lib.settings = {
		currency: {
			symbol : "$",		// default currency symbol is '$'
			format : "%s%v",	// controls output: %s = symbol, %v = value (can be object, see docs)
			decimal : ".",		// decimal point separator
			thousand : ",",		// thousands separator
			precision : 2,		// decimal places
			grouping : 3		// digit grouping (not implemented yet)
		},
		number: {
			precision : 0,		// default precision on numbers is 0
			grouping : 3,		// digit grouping (not implemented yet)
			thousand : ",",
			decimal : "."
		}
	};


	/* --- Internal Helper Methods --- */

	// Store reference to possibly-available ECMAScript 5 methods for later
	var nativeMap = Array.prototype.map,
		nativeIsArray = Array.isArray,
		toString = Object.prototype.toString;

	/**
	 * Tests whether supplied parameter is a string
	 * from underscore.js
	 */
	function isString(obj) {
		return !!(obj === '' || (obj && obj.charCodeAt && obj.substr));
	}

	/**
	 * Tests whether supplied parameter is a string
	 * from underscore.js, delegates to ECMA5's native Array.isArray
	 */
	function isArray(obj) {
		return nativeIsArray ? nativeIsArray(obj) : toString.call(obj) === '[object Array]';
	}

	/**
	 * Tests whether supplied parameter is a true object
	 */
	function isObject(obj) {
		return obj && toString.call(obj) === '[object Object]';
	}

	/**
	 * Extends an object with a defaults object, similar to underscore's _.defaults
	 *
	 * Used for abstracting parameter handling from API methods
	 */
	function defaults(object, defs) {
		var key;
		object = object || {};
		defs = defs || {};
		// Iterate over object non-prototype properties:
		for (key in defs) {
			if (defs.hasOwnProperty(key)) {
				// Replace values with defaults only if undefined (allow empty/zero values):
				if (object[key] == null) object[key] = defs[key];
			}
		}
		return object;
	}

	/**
	 * Implementation of `Array.map()` for iteration loops
	 *
	 * Returns a new Array as a result of calling `iterator` on each array value.
	 * Defers to native Array.map if available
	 */
	function map(obj, iterator, context) {
		var results = [], i, j;

		if (!obj) return results;

		// Use native .map method if it exists:
		if (nativeMap && obj.map === nativeMap) return obj.map(iterator, context);

		// Fallback for native .map:
		for (i = 0, j = obj.length; i < j; i++ ) {
			results[i] = iterator.call(context, obj[i], i, obj);
		}
		return results;
	}

	/**
	 * Check and normalise the value of precision (must be positive integer)
	 */
	function checkPrecision(val, base) {
		val = Math.round(Math.abs(val));
		return isNaN(val)? base : val;
	}


	/**
	 * Parses a format string or object and returns format obj for use in rendering
	 *
	 * `format` is either a string with the default (positive) format, or object
	 * containing `pos` (required), `neg` and `zero` values (or a function returning
	 * either a string or object)
	 *
	 * Either string or format.pos must contain "%v" (value) to be valid
	 */
	function checkCurrencyFormat(format) {
		var defaults = lib.settings.currency.format;

		// Allow function as format parameter (should return string or object):
		if ( typeof format === "function" ) format = format();

		// Format can be a string, in which case `value` ("%v") must be present:
		if ( isString( format ) && format.match("%v") ) {

			// Create and return positive, negative and zero formats:
			return {
				pos : format,
				neg : format.replace("-", "").replace("%v", "-%v"),
				zero : format
			};

		// If no format, or object is missing valid positive value, use defaults:
		} else if ( !format || !format.pos || !format.pos.match("%v") ) {

			// If defaults is a string, casts it to an object for faster checking next time:
			return ( !isString( defaults ) ) ? defaults : lib.settings.currency.format = {
				pos : defaults,
				neg : defaults.replace("%v", "-%v"),
				zero : defaults
			};

		}
		// Otherwise, assume format was fine:
		return format;
	}


	/* --- API Methods --- */

	/**
	 * Takes a string/array of strings, removes all formatting/cruft and returns the raw float value
	 * Alias: `accounting.parse(string)`
	 *
	 * Decimal must be included in the regular expression to match floats (defaults to
	 * accounting.settings.number.decimal), so if the number uses a non-standard decimal 
	 * separator, provide it as the second argument.
	 *
	 * Also matches bracketed negatives (eg. "$ (1.99)" => -1.99)
	 *
	 * Doesn't throw any errors (`NaN`s become 0) but this may change in future
	 */
	var unformat = lib.unformat = lib.parse = function(value, decimal) {
		// Recursively unformat arrays:
		if (isArray(value)) {
			return map(value, function(val) {
				return unformat(val, decimal);
			});
		}

		// Fails silently (need decent errors):
		value = value || 0;

		// Return the value as-is if it's already a number:
		if (typeof value === "number") return value;

		// Default decimal point comes from settings, but could be set to eg. "," in opts:
		decimal = decimal || lib.settings.number.decimal;

		 // Build regex to strip out everything except digits, decimal point and minus sign:
		var regex = new RegExp("[^0-9-" + decimal + "]", ["g"]),
			unformatted = parseFloat(
				("" + value)
				.replace(/\((.*)\)/, "-$1") // replace bracketed values with negatives
				.replace(regex, '')         // strip out any cruft
				.replace(decimal, '.')      // make sure decimal point is standard
			);

		// This will fail silently which may cause trouble, let's wait and see:
		return !isNaN(unformatted) ? unformatted : 0;
	};


	/**
	 * Implementation of toFixed() that treats floats more like decimals
	 *
	 * Fixes binary rounding issues (eg. (0.615).toFixed(2) === "0.61") that present
	 * problems for accounting- and finance-related software.
	 */
	var toFixed = lib.toFixed = function(value, precision) {
		precision = checkPrecision(precision, lib.settings.number.precision);
		var power = Math.pow(10, precision);

		// Multiply up by precision, round accurately, then divide and use native toFixed():
		return (Math.round(lib.unformat(value) * power) / power).toFixed(precision);
	};


	/**
	 * Format a number, with comma-separated thousands and custom precision/decimal places
	 * Alias: `accounting.format()`
	 *
	 * Localise by overriding the precision and thousand / decimal separators
	 * 2nd parameter `precision` can be an object matching `settings.number`
	 */
	var formatNumber = lib.formatNumber = lib.format = function(number, precision, thousand, decimal) {
		// Resursively format arrays:
		if (isArray(number)) {
			return map(number, function(val) {
				return formatNumber(val, precision, thousand, decimal);
			});
		}

		// Clean up number:
		number = unformat(number);

		// Build options object from second param (if object) or all params, extending defaults:
		var opts = defaults(
				(isObject(precision) ? precision : {
					precision : precision,
					thousand : thousand,
					decimal : decimal
				}),
				lib.settings.number
			),

			// Clean up precision
			usePrecision = checkPrecision(opts.precision),

			// Do some calc:
			negative = number < 0 ? "-" : "",
			base = parseInt(toFixed(Math.abs(number || 0), usePrecision), 10) + "",
			mod = base.length > 3 ? base.length % 3 : 0;

		// Format the number:
		return negative + (mod ? base.substr(0, mod) + opts.thousand : "") + base.substr(mod).replace(/(\d{3})(?=\d)/g, "$1" + opts.thousand) + (usePrecision ? opts.decimal + toFixed(Math.abs(number), usePrecision).split('.')[1] : "");
	};


	/**
	 * Format a number into currency
	 *
	 * Usage: accounting.formatMoney(number, symbol, precision, thousandsSep, decimalSep, format)
	 * defaults: (0, "$", 2, ",", ".", "%s%v")
	 *
	 * Localise by overriding the symbol, precision, thousand / decimal separators and format
	 * Second param can be an object matching `settings.currency` which is the easiest way.
	 *
	 * To do: tidy up the parameters
	 */
	var formatMoney = lib.formatMoney = function(number, symbol, precision, thousand, decimal, format) {
		// Resursively format arrays:
		if (isArray(number)) {
			return map(number, function(val){
				return formatMoney(val, symbol, precision, thousand, decimal, format);
			});
		}

		// Clean up number:
		number = unformat(number);

		// Build options object from second param (if object) or all params, extending defaults:
		var opts = defaults(
				(isObject(symbol) ? symbol : {
					symbol : symbol,
					precision : precision,
					thousand : thousand,
					decimal : decimal,
					format : format
				}),
				lib.settings.currency
			),

			// Check format (returns object with pos, neg and zero):
			formats = checkCurrencyFormat(opts.format),

			// Choose which format to use for this value:
			useFormat = number > 0 ? formats.pos : number < 0 ? formats.neg : formats.zero;

		// Return with currency symbol added:
		return useFormat.replace('%s', opts.symbol).replace('%v', formatNumber(Math.abs(number), checkPrecision(opts.precision), opts.thousand, opts.decimal));
	};


	/**
	 * Format a list of numbers into an accounting column, padding with whitespace
	 * to line up currency symbols, thousand separators and decimals places
	 *
	 * List should be an array of numbers
	 * Second parameter can be an object containing keys that match the params
	 *
	 * Returns array of accouting-formatted number strings of same length
	 *
	 * NB: `white-space:pre` CSS rule is required on the list container to prevent
	 * browsers from collapsing the whitespace in the output strings.
	 */
	lib.formatColumn = function(list, symbol, precision, thousand, decimal, format) {
		if (!list) return [];

		// Build options object from second param (if object) or all params, extending defaults:
		var opts = defaults(
				(isObject(symbol) ? symbol : {
					symbol : symbol,
					precision : precision,
					thousand : thousand,
					decimal : decimal,
					format : format
				}),
				lib.settings.currency
			),

			// Check format (returns object with pos, neg and zero), only need pos for now:
			formats = checkCurrencyFormat(opts.format),

			// Whether to pad at start of string or after currency symbol:
			padAfterSymbol = formats.pos.indexOf("%s") < formats.pos.indexOf("%v") ? true : false,

			// Store value for the length of the longest string in the column:
			maxLength = 0,

			// Format the list according to options, store the length of the longest string:
			formatted = map(list, function(val, i) {
				if (isArray(val)) {
					// Recursively format columns if list is a multi-dimensional array:
					return lib.formatColumn(val, opts);
				} else {
					// Clean up the value
					val = unformat(val);

					// Choose which format to use for this value (pos, neg or zero):
					var useFormat = val > 0 ? formats.pos : val < 0 ? formats.neg : formats.zero,

						// Format this value, push into formatted list and save the length:
						fVal = useFormat.replace('%s', opts.symbol).replace('%v', formatNumber(Math.abs(val), checkPrecision(opts.precision), opts.thousand, opts.decimal));

					if (fVal.length > maxLength) maxLength = fVal.length;
					return fVal;
				}
			});

		// Pad each number in the list and send back the column of numbers:
		return map(formatted, function(val, i) {
			// Only if this is a string (not a nested array, which would have already been padded):
			if (isString(val) && val.length < maxLength) {
				// Depending on symbol position, pad after symbol or at index 0:
				return padAfterSymbol ? val.replace(opts.symbol, opts.symbol+(new Array(maxLength - val.length + 1).join(" "))) : (new Array(maxLength - val.length + 1).join(" ")) + val;
			}
			return val;
		});
	};


	/* --- Module Definition --- */

	// Export accounting for CommonJS. If being loaded as an AMD module, define it as such.
	// Otherwise, just add `accounting` to the global object
	if (typeof exports !== 'undefined') {
		if (typeof module !== 'undefined' && module.exports) {
			exports = module.exports = lib;
		}
		exports.accounting = lib;
	} else if (typeof define === 'function' && define.amd) {
		// Return the library as an AMD module:
		define([], function() {
			return lib;
		});
	} else {
		// Use accounting.noConflict to restore `accounting` back to its original value.
		// Returns a reference to the library's `accounting` object;
		// e.g. `var numbers = accounting.noConflict();`
		lib.noConflict = (function(oldAccounting) {
			return function() {
				// Reset the value of the root's `accounting` variable:
				root.accounting = oldAccounting;
				// Delete the noConflict method:
				lib.noConflict = undefined;
				// Return reference to the library to re-assign it:
				return lib;
			};
		})(root.accounting);

		// Declare `fx` on the root (global/window) object:
		root['accounting'] = lib;
	}

	// Root will be `window` in browser or `global` on the server:
}(this));

/*!
 * accounting.js v0.4.2
 * Copyright 2014 Open Exchange Rates
 *
 * Freely distributable under the MIT license.
 * Portions of accounting.js are inspired or borrowed from underscore.js
 *
 * Full details and documentation:
 * http://openexchangerates.github.io/accounting.js/
 */
(function(n,t){function o(n){return!!(n===""||n&&n.charCodeAt&&n.substr)}function u(n){return a?a(n):v.call(n)==="[object Array]"}function s(n){return n&&v.call(n)==="[object Object]"}function h(n,t){var i;n=n||{};t=t||{};for(i in t)t.hasOwnProperty(i)&&n[i]==null&&(n[i]=t[i]);return n}function r(n,t,i){var u=[],r,f;if(!n)return u;if(l&&n.map===l)return n.map(t,i);for(r=0,f=n.length;r<f;r++)u[r]=t.call(i,n[r],r,n);return u}function f(n,t){return n=Math.round(Math.abs(n)),isNaN(n)?t:n}function y(n){var t=i.settings.currency.format;return(typeof n=="function"&&(n=n()),o(n)&&n.match("%v"))?{pos:n,neg:n.replace("-","").replace("%v","-%v"),zero:n}:!n||!n.pos||!n.pos.match("%v")?o(t)?i.settings.currency.format={pos:t,neg:t.replace("%v","-%v"),zero:t}:t:n}var i={};i.version="0.4.1";i.settings={currency:{symbol:"$",format:"%s%v",decimal:".",thousand:",",precision:2,grouping:3},number:{precision:0,grouping:3,thousand:",",decimal:"."}};var l=Array.prototype.map,a=Array.isArray,v=Object.prototype.toString;var e=i.unformat=i.parse=function(n,t){if(u(n))return r(n,function(n){return e(n,t)});if(n=n||0,typeof n=="number")return n;t=t||i.settings.number.decimal;var o=new RegExp("[^0-9-"+t+"]",["g"]),f=parseFloat((""+n).replace(/\((.*)\)/,"-$1").replace(o,"").replace(t,"."));return isNaN(f)?0:f},p=i.toFixed=function(n,t){t=f(t,i.settings.number.precision);var r=Math.pow(10,t);return(Math.round(i.unformat(n)*r)/r).toFixed(t)},c=i.formatNumber=i.format=function(n,t,o,l){if(u(n))return r(n,function(n){return c(n,t,o,l)});n=e(n);var a=h(s(t)?t:{precision:t,thousand:o,decimal:l},i.settings.number),y=f(a.precision),b=n<0?"-":"",v=parseInt(p(Math.abs(n||0),y),10)+"",w=v.length>3?v.length%3:0;return b+(w?v.substr(0,w)+a.thousand:"")+v.substr(w).replace(/(\d{3})(?=\d)/g,"$1"+a.thousand)+(y?a.decimal+p(Math.abs(n),y).split(".")[1]:"")},w=i.formatMoney=function(n,t,o,l,a,v){if(u(n))return r(n,function(n){return w(n,t,o,l,a,v)});n=e(n);var p=h(s(t)?t:{symbol:t,precision:o,thousand:l,decimal:a,format:v},i.settings.currency),b=y(p.format),k=n>0?b.pos:n<0?b.neg:b.zero;return k.replace("%s",p.symbol).replace("%v",c(Math.abs(n),f(p.precision),p.thousand,p.decimal))};i.formatColumn=function(n,t,l,a,v,p){if(!n)return[];var w=h(s(t)?t:{symbol:t,precision:l,thousand:a,decimal:v,format:p},i.settings.currency),b=y(w.format),d=b.pos.indexOf("%s")<b.pos.indexOf("%v")?!0:!1,k=0,g=r(n,function(n){if(u(n))return i.formatColumn(n,w);n=e(n);var r=n>0?b.pos:n<0?b.neg:b.zero,t=r.replace("%s",w.symbol).replace("%v",c(Math.abs(n),f(w.precision),w.thousand,w.decimal));return t.length>k&&(k=t.length),t});return r(g,function(n){return o(n)&&n.length<k?d?n.replace(w.symbol,w.symbol+new Array(k-n.length+1).join(" ")):new Array(k-n.length+1).join(" ")+n:n})};typeof exports!="undefined"?(typeof module!="undefined"&&module.exports&&(exports=module.exports=i),exports.accounting=i):typeof define=="function"&&define.amd?define([],function(){return i}):(i.noConflict=function(r){return function(){return n.accounting=r,i.noConflict=t,i}}(n.accounting),n.accounting=i)})(this);
window.onload = function () {
    $('.event-image-wrapper').imagefill();
    $('.event-item-grid a').imagefill();
    Sys.WebForms.PageRequestManager.getInstance().add_endRequest(EndRequestHandler);
}
function EndRequestHandler() {
    $('.event-image-wrapper').imagefill();
    $('.event-item-grid a').imagefill();
}
$(document).ready(function () {
    //initial bind
    updateTicketAmounts();
    $(".regonline-ts-ticketouter .qty-select").on("change", updateTicketAmounts);
});

//functions are duplicated here due to updatepanel
function BindRegisterOnlineEvents() {
    $(document).ready(function () {
        if ($(".regonline-ts-ticketouter .col-qty .qty-select").length) {
            updateTicketAmounts();   
        }

        $(".regonline-ts-ticketouter .col-qty .qty-select").on("change", updateTicketAmounts);
    });
}
function updateTicketAmounts() {
    //loop through all ddl
    //get selected val
    var total = 0.00;
    $(".regonline-ts-ticketouter .col-qty .qty-select").each(function () {
        
        var selValue = $(this).val();
        var parent = $(this).parent().parent();

        if (!isNaN(Number(selValue))) {
            
            //get text and format to number
            var ticketAmountText = parent.find(".ticketamount").text();
            var ticketAmount = Number(ticketAmountText.replace(/[^0-9\.]+/g, ""));

            //exit if not number
            if (isNaN(ticketAmount)) {
                return;
            }

            var calculatedAmount = selValue * ticketAmount;

            //set total
            var totAmount = parent.parent().find(".tickettotalamount");
            if (calculatedAmount > 0.0) {
                totAmount.text(accounting.formatMoney(calculatedAmount));
            }
            else {
                totAmount.text(accounting.formatMoney(0.0));
            }
            total += calculatedAmount;
        }
    });

    //update total
    if (total > 0.0) {
        $("#total-amount span").text(accounting.formatMoney(total));
        $(".no-ticket-warning").addClass("hidden");
    } else {
        $("#total-amount span").text(accounting.formatMoney(0.0));
    }
}

function HighlightValidationInput() {
    if (typeof (Page_ClientValidate) != "undefined") {
        ValidatorUpdateDisplay = CustomValidatorUpdateDisplay;
    }
}

function CustomValidatorUpdateDisplay(val) {
    if (val.isvalid) {
        // do custom removing
        $(val).fadeOut('slow');
        $(val).parent().removeClass('has-error');;
    } else {
        // do custom show
        $(val).fadeIn('slow');
        $(val).parent().addClass('has-error');
    }
}
function EndRequestHandler(){$(".event-image-wrapper").imagefill();$(".event-item-grid a").imagefill()}function BindRegisterOnlineEvents(){$(document).ready(function(){$(".regonline-ts-ticketouter .col-qty .qty-select").length&&updateTicketAmounts();$(".regonline-ts-ticketouter .col-qty .qty-select").on("change",updateTicketAmounts)})}function updateTicketAmounts(){var n=0;$(".regonline-ts-ticketouter .col-qty .qty-select").each(function(){var u=$(this).val(),f=$(this).parent().parent(),e,i,t,r;if(!isNaN(Number(u))){if(e=f.find(".ticketamount").text(),i=Number(e.replace(/[^0-9\.]+/g,"")),isNaN(i))return;t=u*i;r=f.parent().find(".tickettotalamount");t>0?r.text(accounting.formatMoney(t)):r.text(accounting.formatMoney(0));n+=t}});n>0?($("#total-amount span").text(accounting.formatMoney(n)),$(".no-ticket-warning").addClass("hidden")):$("#total-amount span").text(accounting.formatMoney(0))}function HighlightValidationInput(){typeof Page_ClientValidate!="undefined"&&(ValidatorUpdateDisplay=CustomValidatorUpdateDisplay)}function CustomValidatorUpdateDisplay(n){n.isvalid?($(n).fadeOut("slow"),$(n).parent().removeClass("has-error")):($(n).fadeIn("slow"),$(n).parent().addClass("has-error"))}window.onload=function(){$(".event-image-wrapper").imagefill();$(".event-item-grid a").imagefill();Sys.WebForms.PageRequestManager.getInstance().add_endRequest(EndRequestHandler)};$(document).ready(function(){updateTicketAmounts();$(".regonline-ts-ticketouter .qty-select").on("change",updateTicketAmounts)});
$('.nav-tabs a').click(function (e) {
    e.preventDefault();
    $(this).tab('show');
});

if (typeof ($.fn.imagefill) == 'function') {
    $('.account-image-wrapper').imagefill();
    $('.hr-contact-image-wrapper').imagefill();
}

function gridViewSort() {
    $(".gvTable[data-client-sortable]").sortable({
        items: 'tr:not(tr:first-child)',
        cursor: 'pointer',
        axis: 'y',
        dropOnEmpty: false,
        placeholder: 'sort-placeholder'
    });
}

$(document).ready(function () {
    gridViewSort();
});

function runOnPagePostback() {
    gridViewSort();
}

Sys.WebForms.PageRequestManager.getInstance().add_endRequest(runOnPagePostback);

//$(document).click(function (event) {
//    if (event.target.classList.contains("modal-backdrop")) {
//        hideModal("#link-edit");
//    }
//});
function gridViewSort(){$(".gvTable[data-client-sortable]").sortable({items:"tr:not(tr:first-child)",cursor:"pointer",axis:"y",dropOnEmpty:!1,placeholder:"sort-placeholder"})}function runOnPagePostback(){gridViewSort()}$(".nav-tabs a").click(function(n){n.preventDefault();$(this).tab("show")});typeof $.fn.imagefill=="function"&&($(".account-image-wrapper").imagefill(),$(".hr-contact-image-wrapper").imagefill());$(document).ready(function(){gridViewSort()});Sys.WebForms.PageRequestManager.getInstance().add_endRequest(runOnPagePostback);
