$(function () {
    $('div.gallery').fadeGallery({
        slideElements: 'ul.fade-gallery > li',
        pagerLinks: 'div.box-swicher li',
        btnNext: 'a.link-next',
        btnPrev: 'a.link-prev',
        btnPlayPause: 'a.link-play',
        autoRotation: true,
        switchTime: 4000
    });
    $('div.gallery2').fadeGallery({
        slideElements: 'ul.fade-gallery > li',
        pagerLinks: 'div.box-swicher li',
        btnNext: 'a.link-next',
        btnPrev: 'a.link-prev'
    });
    $('#carusel').scrollGallery({
        sliderHolder: 'div.carusel-inf',
        pagerLinks: 'div.box-swicher li',
        step: true
    });
});
jQuery.fn.fadeGallery = function (_options) {
    var _options = jQuery.extend({
        slideElements: 'div.slideset > div',
        pagerLinks: 'div.pager a',
        btnNext: 'a.next',
        btnPrev: 'a.prev',
        btnPlayPause: 'a.play-pause',
        btnPlay: 'a.play',
        btnPause: 'a.pause',
        pausedClass: 'paused',
        disabledClass: 'disabled',
        playClass: 'playing',
        activeClass: 'active',
        currentNum: false,
        allNum: false,
        startSlide: null,
        noCircle: false,
        pauseOnHover: true,
        autoRotation: false,
        autoHeight: false,
        onChange: false,
        switchTime: 3000,
        duration: 650,
        event: 'click'
    }, _options);

    return this.each(function () {
        // gallery options
        var _this = jQuery(this);
        var _slides = jQuery(_options.slideElements, _this);
        var _pagerLinks = jQuery(_options.pagerLinks, _this);
        var _btnPrev = jQuery(_options.btnPrev, _this);
        var _btnNext = jQuery(_options.btnNext, _this);
        var _btnPlayPause = jQuery(_options.btnPlayPause, _this);
        var _btnPause = jQuery(_options.btnPause, _this);
        var _btnPlay = jQuery(_options.btnPlay, _this);
        var _pauseOnHover = _options.pauseOnHover;
        var _autoRotation = _options.autoRotation;
        var _activeClass = _options.activeClass;
        var _disabledClass = _options.disabledClass;
        var _pausedClass = _options.pausedClass;
        var _playClass = _options.playClass;
        var _autoHeight = _options.autoHeight;
        var _duration = _options.duration;
        var _switchTime = _options.switchTime;
        var _controlEvent = _options.event;
        var _currentNum = (_options.currentNum ? jQuery(_options.currentNum, _this) : false);
        var _allNum = (_options.allNum ? jQuery(_options.allNum, _this) : false);
        var _startSlide = _options.startSlide;
        var _noCycle = _options.noCircle;
        var _onChange = _options.onChange;

        // gallery init
        var _hover = false;
        var _prevIndex = 0;
        var _currentIndex = 0;
        var _slideCount = _slides.length;
        var _timer;
        if (_slideCount < 2) return;

        _prevIndex = _slides.index(_slides.filter('.' + _activeClass));
        if (_prevIndex < 0) _prevIndex = _currentIndex = 0;
        else _currentIndex = _prevIndex;
        if (_startSlide != null) {
            if (_startSlide == 'random') _prevIndex = _currentIndex = Math.floor(Math.random() * _slideCount);
            else _prevIndex = _currentIndex = parseInt(_startSlide);
        }
        _slides.hide().eq(_currentIndex).show();
        if (_autoRotation) _this.removeClass(_pausedClass).addClass(_playClass);
        else _this.removeClass(_playClass).addClass(_pausedClass);

        // gallery control
        if (_btnPrev.length) {
            _btnPrev.bind(_controlEvent, function () {
                prevSlide();
                return false;
            });
        }
        if (_btnNext.length) {
            _btnNext.bind(_controlEvent, function () {
                nextSlide();
                return false;
            });
        }
        if (_pagerLinks.length) {
            _pagerLinks.each(function (_ind) {
                jQuery(this).bind(_controlEvent, function () {
                    if (_currentIndex != _ind) {
                        _prevIndex = _currentIndex;
                        _currentIndex = _ind;
                        switchSlide();
                    }
                    return false;
                });
            });
        }

        // play pause section
        if (_btnPlayPause.length) {
            _btnPlayPause.bind(_controlEvent, function () {
                if (_this.hasClass(_pausedClass)) {
                    _this.removeClass(_pausedClass).addClass(_playClass);
                    _autoRotation = true;
                    autoSlide();
                } else {
                    _autoRotation = false;
                    if (_timer) clearTimeout(_timer);
                    _this.removeClass(_playClass).addClass(_pausedClass);
                }
                return false;
            });
        }
        if (_btnPlay.length) {
            _btnPlay.bind(_controlEvent, function () {
                _this.removeClass(_pausedClass).addClass(_playClass);
                _autoRotation = true;
                autoSlide();
                return false;
            });
        }
        if (_btnPause.length) {
            _btnPause.bind(_controlEvent, function () {
                _autoRotation = false;
                if (_timer) clearTimeout(_timer);
                _this.removeClass(_playClass).addClass(_pausedClass);
                return false;
            });
        }

        // gallery animation
        function prevSlide() {
            _prevIndex = _currentIndex;
            if (_currentIndex > 0) _currentIndex--;
            else {
                if (_noCycle) return;
                else _currentIndex = _slideCount - 1;
            }
            switchSlide();
        }
        function nextSlide() {
            _prevIndex = _currentIndex;
            if (_currentIndex < _slideCount - 1) _currentIndex++;
            else {
                if (_noCycle) return;
                else _currentIndex = 0;
            }
            switchSlide();
        }
        function refreshStatus() {
            if (_pagerLinks.length) _pagerLinks.removeClass(_activeClass).eq(_currentIndex).addClass(_activeClass);
            if (_currentNum) _currentNum.text(_currentIndex + 1);
            if (_allNum) _allNum.text(_slideCount);
            _slides.eq(_prevIndex).removeClass(_activeClass);
            _slides.eq(_currentIndex).addClass(_activeClass);
            if (_noCycle) {
                if (_btnPrev.length) {
                    if (_currentIndex == 0) _btnPrev.addClass(_disabledClass);
                    else _btnPrev.removeClass(_disabledClass);
                }
                if (_btnNext.length) {
                    if (_currentIndex == _slideCount - 1) _btnNext.addClass(_disabledClass);
                    else _btnNext.removeClass(_disabledClass);
                }
            }
            if (typeof _onChange === 'function') {
                _onChange(_this, _currentIndex);
            }
        }
        function switchSlide() {
            _slides.eq(_prevIndex).fadeOut(_duration);
            _slides.eq(_currentIndex).fadeIn(_duration);
            if (_autoHeight) _slides.eq(_currentIndex).parent().animate({ height: _slides.eq(_currentIndex).outerHeight(true) }, { duration: _duration, queue: false });
            refreshStatus();
            autoSlide();
        }

        // autoslide function
        function autoSlide() {
            if (!_autoRotation || _hover) return;
            if (_timer) clearTimeout(_timer);
            _timer = setTimeout(nextSlide, _switchTime + _duration);
        }
        if (_pauseOnHover) {
            _this.hover(function () {
                _hover = true;
                if (_timer) clearTimeout(_timer);
            }, function () {
                _hover = false;
                autoSlide();
            });
        }
        refreshStatus();
        autoSlide();
    });
}
// scrolling gallery plugin
jQuery.fn.scrollGallery = function (_options) {
    var _options = jQuery.extend({
        sliderHolder: '>div',
        slider: '>ul',
        slides: '>li',
        pagerLinks: 'div.pager a',
        btnPrev: 'a.link-prev',
        btnNext: 'a.link-next',
        activeClass: 'active',
        disabledClass: 'disabled',
        generatePagination: 'div.pg-holder',
        curNum: 'em.scur-num',
        allNum: 'em.sall-num',
        circleSlide: true,
        pauseClass: 'gallery-paused',
        pauseButton: 'none',
        pauseOnHover: true,
        autoRotation: false,
        stopAfterClick: false,
        switchTime: 5000,
        duration: 650,
        easing: 'swing',
        event: 'click',
        afterInit: false,
        vertical: false,
        step: false
    }, _options);

    return this.each(function () {
        // gallery options
        var _this = jQuery(this);
        var _sliderHolder = jQuery(_options.sliderHolder, _this);
        var _slider = jQuery(_options.slider, _sliderHolder);
        var _slides = jQuery(_options.slides, _slider);
        var _btnPrev = jQuery(_options.btnPrev, _this);
        var _btnNext = jQuery(_options.btnNext, _this);
        var _pagerLinks = jQuery(_options.pagerLinks, _this);
        var _generatePagination = jQuery(_options.generatePagination, _this);
        var _curNum = jQuery(_options.curNum, _this);
        var _allNum = jQuery(_options.allNum, _this);
        var _pauseButton = jQuery(_options.pauseButton, _this);
        var _pauseOnHover = _options.pauseOnHover;
        var _pauseClass = _options.pauseClass;
        var _autoRotation = _options.autoRotation;
        var _activeClass = _options.activeClass;
        var _disabledClass = _options.disabledClass;
        var _easing = _options.easing;
        var _duration = _options.duration;
        var _switchTime = _options.switchTime;
        var _controlEvent = _options.event;
        var _step = _options.step;
        var _vertical = _options.vertical;
        var _circleSlide = _options.circleSlide;
        var _stopAfterClick = _options.stopAfterClick;
        var _afterInit = _options.afterInit;

        // gallery init
        if (!_slides.length) return;
        var _currentStep = 0;
        var _sumWidth = 0;
        var _sumHeight = 0;
        var _hover = false;
        var _stepWidth;
        var _stepHeight;
        var _stepCount;
        var _offset;
        var _timer;

        _slides.each(function () {
            _sumWidth += $(this).outerWidth(true);
            _sumHeight += $(this).outerHeight(true);
        });
        // calculate gallery offset
        function recalcOffsets() {
            if (_vertical) {
                if (_step) {
                    _stepHeight = _slides.eq(_currentStep).outerHeight(true);
                    _stepCount = Math.ceil((_sumHeight - _sliderHolder.height()) / _stepHeight) + 1;
                    _offset = -_stepHeight * _currentStep;
                } else {
                    _stepHeight = _sliderHolder.height();
                    _stepCount = Math.ceil(_sumHeight / _stepHeight);
                    _offset = -_stepHeight * _currentStep;
                    if (_offset < _stepHeight - _sumHeight) _offset = _stepHeight - _sumHeight;
                }
            } else {
                if (_step) {
                    _stepWidth = _slides.eq(_currentStep).outerWidth(true) * _step;
                    _stepCount = Math.ceil((_sumWidth - _sliderHolder.width()) / _stepWidth) + 1;
                    _offset = -_stepWidth * _currentStep;
                    if (_offset < _sliderHolder.width() - _sumWidth) _offset = _sliderHolder.width() - _sumWidth;
                } else {
                    _stepWidth = _sliderHolder.width();
                    _stepCount = Math.ceil(_sumWidth / _stepWidth);
                    _offset = -_stepWidth * _currentStep;
                    if (_offset < _stepWidth - _sumWidth) _offset = _stepWidth - _sumWidth;
                }
            }
        }

        // gallery control
        if (_btnPrev.length) {
            _btnPrev.bind(_controlEvent, function () {
                if (_stopAfterClick) stopAutoSlide();
                prevSlide();
                return false;
            });
        }
        if (_btnNext.length) {
            _btnNext.bind(_controlEvent, function () {
                if (_stopAfterClick) stopAutoSlide();
                nextSlide();
                return false;
            });
        }
        if (_generatePagination.length) {
            _generatePagination.empty();
            recalcOffsets();
            var _list = $('<ul />');
            for (var i = 0; i < _stepCount; i++) $('<li><a href="#">' + (i + 1) + '</a></li>').appendTo(_list);
            _list.appendTo(_generatePagination);
            _pagerLinks = _list.children();
        }
        if (_pagerLinks.length) {
            _pagerLinks.each(function (_ind) {
                jQuery(this).bind(_controlEvent, function () {
                    if (_currentStep != _ind) {
                        if (_stopAfterClick) stopAutoSlide();
                        _currentStep = _ind;
                        switchSlide();
                    }
                    return false;
                });
            });
        }

        // gallery animation
        function prevSlide() {
            recalcOffsets();
            if (_currentStep > 0) _currentStep--;
            else if (_circleSlide) _currentStep = _stepCount - 1;
            switchSlide();
        }
        function nextSlide() {
            recalcOffsets();
            if (_currentStep < _stepCount - 1) _currentStep++;
            else if (_circleSlide) _currentStep = 0;
            switchSlide();
        }
        function refreshStatus() {
            if (_pagerLinks.length) _pagerLinks.removeClass(_activeClass).eq(_currentStep).addClass(_activeClass);
            if (!_circleSlide) {
                _btnPrev.removeClass(_disabledClass);
                _btnNext.removeClass(_disabledClass);
                if (_currentStep == 0) _btnPrev.addClass(_disabledClass);
                if (_currentStep == _stepCount - 1) _btnNext.addClass(_disabledClass);
            }
            if (_curNum.length) _curNum.text(_currentStep + 1);
            if (_allNum.length) _allNum.text(_stepCount);
        }
        function switchSlide() {
            recalcOffsets();
            if (_vertical) _slider.animate({ marginTop: _offset }, { duration: _duration, queue: false, easing: _easing });
            else _slider.animate({ marginLeft: _offset }, { duration: _duration, queue: false, easing: _easing });
            refreshStatus();
            autoSlide();
        }

        // autoslide function
        function stopAutoSlide() {
            if (_timer) clearTimeout(_timer);
            _autoRotation = false;
        }
        function autoSlide() {
            if (!_autoRotation || _hover) return;
            if (_timer) clearTimeout(_timer);
            _timer = setTimeout(nextSlide, _switchTime + _duration);
        }
        if (_pauseOnHover) {
            _this.hover(function () {
                _hover = true;
                if (_timer) clearTimeout(_timer);
            }, function () {
                _hover = false;
                autoSlide();
            });
        }
        recalcOffsets();
        refreshStatus();
        autoSlide();

        // pause buttton
        if (_pauseButton.length) {
            _pauseButton.click(function () {
                if (_this.hasClass(_pauseClass)) {
                    _this.removeClass(_pauseClass);
                    _autoRotation = true;
                    autoSlide();
                } else {
                    _this.addClass(_pauseClass);
                    stopAutoSlide();
                }
                return false;
            });
        }

        if (_afterInit && typeof _afterInit === 'function') _afterInit(_this, _slides);
    });
}

$(document).ready(function () {
    // Scriptable
    jQuery('body').addClass('js');

    $(".dp").datePicker({ startDate: "01/01/1900", calendarIconURL: "/images/icons/calendar.gif" });
    $(".dp-alt").datePicker({ startDate: "01/01/1900", calendarIconURL: "images/icons/calendar.gif" }).dpSetPosition($.dpConst.POS_TOP, $.dpConst.POS_RIGHT);
    $('ul.nav').superfish();
	$('#box-social ul').superfish();
	
	$('.form-inform select').uniform();
	$('.form-inform select').change(function() {
		var a = $(this);
		$('.form-inform select').each(function() {
			var b = $(this);
			if (b.attr('id') != a.attr('id')) {
				b.prop('selectedIndex', 0);
				b.prev('span').text(b.find('option:checked').text());
			}
		});
	});

    // Calendar Focus Jumping
    var calFocus;
    $('.dp-choose-date').live('mouseup', function () {
        calFocus = $(this).prev();
    });

    $('.dp-nav-today-date, .dp-popup table').live('mouseup', function () {
        calFocus.parent().next('.form-row').find('input').first().focus();
    });

    // Polls
    // Carousel
    $('#poll-carousel .panel-inner div').carousel(250, '#previous', '#next', true, 5000);
    // Equal heights
    var pcH = 0;
    $('#poll-carousel .panel-inner li').each(function () {
        if ($(this).outerHeight() > pcH) pcH = $(this).outerHeight()
    });
    $('#poll-carousel .panel-inner li').height(pcH - 18)
    // Tabs
    $('.tabs').accessibleTabs({ tabhead: 'h2.tab-head' });

    // Topic Discussions Vote
    $('#topics .vote a').click(function (e) {
        e.preventDefault();
        var $val = $(this).next(), intVal = parseInt($val.text()), $this = $(this);
        if ($this.hasClass('complete')) { $this.parent().append('<p class="err">You have already voted.</p>'); $this.parent().find('p').wait(2000).fadeOut() }
        else {
            intVal += 1;
            // Set values
            $val.text(intVal);
            // Set DB values
            $.ajax({
                type: "POST",
                url: "/ForumRatePost.ashx?postid=" + $(this).attr('data-id') + "&votes=" + intVal, // This is the backend page that we post to: This needs to return some data, just to denote. change the query string..
                dataType: "html",
                success: function () { $this.parent().append('<p>Thank you for your vote</p>'); $this.next().text('+' + intVal).addClass('up'); $this.addClass('complete') },
                error: function () { $this.parent().append('<p>Ooops! Somethings gone wild... Please refresh the page and try again.</p>') },
                complete: function () { $this.parent().find('p').wait(2000).fadeOut() }
            });
        }
    });

    //Wait function
    $.fn.wait = function (time, type) {
        time = time || 1000;
        type = type || "fx";
        return this.queue(type, function () {
            var self = this;
            setTimeout(function () {
                $(self).dequeue();
            }, time)
        });
    };

    // Multimedia : Same height panels
    var $box = $('#multimedia .box-related .frame'), boxCount = $box.length, $box1, $box2;
    for (x = 0; x < boxCount; x += 2) {
        $box1 = $box.eq(x);
        $box2 = $box.eq(x + 1);
        if ($box1.height() > $box2.height()) {
            $box2.height($box1.height())
        }
        else if ($box2.height() > $box1.height()) {
            $box1.height($box2.height())
        }
    }

    // Fake File
    var $file = $('.form-row-file span div input[type="file"]');
    $file.change(function (e) {
        $('.form-row-file .fake-file input[type="text"]').val($file.val())
    });

    // Clear text input values
    var swap_text_boxes = [];
    jQuery.each($("input[type='text'].autoclear"), function () {
        swap_text_boxes[$(this).attr('id')] = $(this).attr('value');
        $(this).bind('focus', function () {
            if ($(this).val() == swap_text_boxes[$(this).attr('id')]) {
                $(this).val('');
            }
        });
        $(this).bind('blur', function () {
            if ($(this).val() == '') {
                $(this).val(swap_text_boxes[$(this).attr('id')]);
            }
        });
    });

    // Enable forms to be submitted via ENTER key
    var AreaSelector = "#content, .form-search";
    var ButtonSelector = "input[type='submit'],input[type='image'],button";
    jQuery.each($(AreaSelector), function () {
        $(this).keypress(function (e) {
            if (e.which == 13 && e.target.type != 'textarea') {
                var arrItems = $(this).find(ButtonSelector);
                if (arrItems.length > 0) {
                    $(this).find(ButtonSelector)[0].click();
                }
                return false;
            }
        });
    });
    //Jahangir - form mododule email inject
    function getParameterByName(name) {
        name = name.replace(/[\[]/, "\\\[").replace(/[\]]/, "\\\]");
        var regexS = "[\\?&]" + name + "=([^&#]*)";
        var regex = new RegExp(regexS);
        var results = regex.exec(window.location.href);
        if (results == null)
            return "";
        else
            return decodeURIComponent(results[1].replace(/\+/g, " "));
    }    
    
    if (getParameterByName('wonce') == '3215' && getParameterByName('email') != null) {
        var email = getParameterByName('email');
        $("#form-builder").find("label:contains('Email')").next('.txt-input').attr('value', email);
    }

});


// Thickbox 3 - One Box To Rule Them All
var tb_pathToImage = "/images/pre-loaders/loader2.gif";
$(document).ready(function () { tb_init('a.thickbox, area.thickbox, input.thickbox'); imgLoader = new Image(); imgLoader.src = tb_pathToImage; }); function tb_init(domChunk) { $(domChunk).click(function () { var t = this.title || this.name || null; var a = this.href || this.alt; var g = this.rel || false; tb_show(t, a, g); this.blur(); return false; }); } function tb_show(caption, url, imageGroup) { try { if (typeof document.body.style.maxHeight === "undefined") { $("body", "html").css({ height: "100%", width: "100%" }); $("html").css("overflow", "hidden"); if (document.getElementById("TB_HideSelect") === null) { $("body").append("<iframe id='TB_HideSelect'></iframe><div id='TB_overlay'></div><div id='TB_window' role='dialog' aria-live='assertive' aria-relevant='additions'></div>"); } } else { if (document.getElementById("TB_overlay") === null) { $("body").append("<div id='TB_overlay'></div><div id='TB_window' role='dialog' aria-live='assertive' aria-relevant='additions'></div>"); $("#TB_overlay").click(tb_remove); } } if (tb_detectMacXFF()) { $("#TB_overlay").addClass("TB_overlayMacFFBGHack"); } else { $("#TB_overlay").addClass("TB_overlayBG"); } if (caption === null) { caption = ""; } $("body").append("<div id='TB_load'><img src='" + imgLoader.src + "' alt='Loading...' /></div>"); $('#TB_load').show(); var baseURL; if (url.indexOf("?") !== -1) { baseURL = url.substr(0, url.indexOf("?")); } else { baseURL = url; } var urlString = /\.jpg$|\.jpeg$|\.png$|\.gif$|\.bmp$/; var urlType = baseURL.toLowerCase().match(urlString); if (urlType == '.jpg' || urlType == '.jpeg' || urlType == '.png' || urlType == '.gif' || urlType == '.bmp') { TB_PrevCaption = ""; TB_PrevURL = ""; TB_PrevHTML = ""; TB_NextCaption = ""; TB_NextURL = ""; TB_NextHTML = ""; TB_imageCount = ""; TB_FoundURL = false; if (imageGroup) { TB_TempArray = $("a[rel=" + imageGroup + "]").get(); for (TB_Counter = 0; ((TB_Counter < TB_TempArray.length) && (TB_NextHTML === "")); TB_Counter++) { var urlTypeTemp = TB_TempArray[TB_Counter].href.toLowerCase().match(urlString); if (!(TB_TempArray[TB_Counter].href == url)) { if (TB_FoundURL) { TB_NextCaption = TB_TempArray[TB_Counter].title; TB_NextURL = TB_TempArray[TB_Counter].href; TB_NextHTML = "<a href='#' id='TB_next'><img src='/images/template/tbox-nxt.gif' width='32' height='32' alt='Next' /></a>"; } else { TB_PrevCaption = TB_TempArray[TB_Counter].title; TB_PrevURL = TB_TempArray[TB_Counter].href; TB_PrevHTML = "<a href='#' id='TB_prev'><img src='/images/template/tbox-prev.gif' width='32' height='32' alt='Previous' /></a>"; } } else { TB_FoundURL = true; TB_imageCount = "Image " + (TB_Counter + 1) + " of " + (TB_TempArray.length); } } } imgPreloader = new Image(); imgPreloader.onload = function () { imgPreloader.onload = null; var pagesize = tb_getPageSize(); var x = pagesize[0] - 150; var y = pagesize[1] - 150; var imageWidth = imgPreloader.width; var imageHeight = imgPreloader.height; if (imageWidth > x) { imageHeight = imageHeight * (x / imageWidth); imageWidth = x; if (imageHeight > y) { imageWidth = imageWidth * (y / imageHeight); imageHeight = y; } } else if (imageHeight > y) { imageWidth = imageWidth * (y / imageHeight); imageHeight = y; if (imageWidth > x) { imageHeight = imageHeight * (x / imageWidth); imageWidth = x; } } TB_WIDTH = imageWidth + 30; TB_HEIGHT = imageHeight + 60; $("#TB_window").append("<a href='#' id='TB_ImageOff' title='Close'><img id='TB_Image' src='" + url + "' width='" + imageWidth + "' height='" + imageHeight + "' alt='" + caption + "' /></a>" + "<p id='TB_footer'>" + TB_PrevHTML + TB_NextHTML + "<span>" + TB_imageCount + " | <em>" + caption + "</em></span></p><a href='#' id='TB_closeWindowButton'><img src='/images/template/tbox-close.gif' width='32' height='32' alt='Close' /></a>"); $("#TB_closeWindowButton").click(tb_remove); if (!(TB_PrevHTML === "")) { function goPrev() { if ($(document).unbind("click", goPrev)) { $(document).unbind("click", goPrev); } $("#TB_window").remove(); $("body").append("<div id='TB_window'></div>"); tb_show(TB_PrevCaption, TB_PrevURL, imageGroup); return false; } $("#TB_prev").click(goPrev); } if (!(TB_NextHTML === "")) { function goNext() { $("#TB_window").remove(); $("body").append("<div id='TB_window'></div>"); tb_show(TB_NextCaption, TB_NextURL, imageGroup); return false; } $("#TB_next").click(goNext); } document.onkeydown = function (e) { if (e == null) { keycode = event.keyCode; } else { keycode = e.which; } if (keycode == 27) { tb_remove(); } else if (keycode == 190) { if (!(TB_NextHTML == "")) { document.onkeydown = ""; goNext(); } } else if (keycode == 188) { if (!(TB_PrevHTML == "")) { document.onkeydown = ""; goPrev(); } } }; tb_position(); $("#TB_load").remove(); $("#TB_ImageOff").click(tb_remove); $("#TB_window").css({ position: "fixed", top: "50%", left: "50%", height: "auto", overflow: "auto" }); if (typeof document.body.style.maxHeight === "undefined") { $("#TB_window").css({ position: "absolute" }); }; }; imgPreloader.src = url; } else { var queryString = url.replace(/^[^\?]+\??/, ''); var params = tb_parseQuery(queryString); TB_WIDTH = (params['width'] * 1) + 30 || 630; TB_HEIGHT = (params['height'] * 1) + 40 || 440; ajaxContentW = TB_WIDTH - 30; ajaxContentH = TB_HEIGHT - 45; if (url.indexOf('TB_iframe') != -1) { urlNoQuery = url.split('TB_'); $("#TB_iframeContent").remove(); if (params['modal'] != "true") { $("#TB_window").css({ padding: "15px 15px 48px" }).append("<a href='#' id='TB_closeWindowButton'><img src='/images/template/tbox-close.gif' width='32' height='32' alt='Close' /></a><iframe allowtransparency='true' frameborder='0' hspace='0' src='" + urlNoQuery[0] + "' id='TB_iframeContent' name='TB_iframeContent" + Math.round(Math.random() * 1000) + "' onload='tb_showIframe()' style='width:" + (ajaxContentW + 29) + "px;height:" + (ajaxContentH + 17) + "px;' > </iframe>"); } else { $("#TB_overlay").unbind(); $("#TB_window").css({ padding: "15px" }).append("<iframe allowtransparency='true' frameborder='0' hspace='0' src='" + urlNoQuery[0] + "' id='TB_iframeContent' name='TB_iframeContent" + Math.round(Math.random() * 1000) + "' onload='tb_showIframe()' style='width:" + (ajaxContentW + 29) + "px;height:" + (ajaxContentH + 17) + "px;'> </iframe>"); } } else { if ($("#TB_window").css("overflow") != "visible") { if (params['modal'] != "true") { $("#TB_window").css({ padding: "15px 15px 48px" }).append("<a href='#' id='TB_closeWindowButton'><img src='/images/template/tbox-close.gif' width='32' height='32' alt='Close' /></a><div id='TB_ajaxContent' style='width:" + ajaxContentW + "px;height:" + ajaxContentH + "px'></div>"); } else { $("#TB_overlay").unbind(); $("#TB_window").css({ padding: "15px" }).append("<div id='TB_ajaxContent' class='TB_modal' style='width:" + ajaxContentW + "px;height:" + ajaxContentH + "px;'></div>"); } } else { $("#TB_ajaxContent")[0].style.width = ajaxContentW + "px"; $("#TB_ajaxContent")[0].style.height = ajaxContentH + "px"; $("#TB_ajaxContent")[0].scrollTop = 0; $("#TB_ajaxWindowTitle").html(caption); } } $("#TB_closeWindowButton").click(tb_remove); if (url.indexOf('TB_inline') != -1) { $("#TB_ajaxContent").append($('#' + params['inlineId']).children()); $("#TB_window").unload(function () { $('#' + params['inlineId']).append($("#TB_ajaxContent").children()); }); tb_position(); $("#TB_load").remove(); $("#TB_window").css({ position: "fixed", top: "50%", left: "50%", height: "auto", width: "auto", overflow: "visible" }); if (typeof document.body.style.maxHeight === "undefined") { $("#TB_window").css({ position: "absolute" }); }; } else if (url.indexOf('TB_iframe') != -1) { tb_position(); if ($.browser.safari) { $("#TB_load").remove(); $("#TB_window").css({ display: "block" }); } } else { $("#TB_ajaxContent").load(url += "&random=" + (new Date().getTime()), function () { tb_position(); $("#TB_load").remove(); tb_init("#TB_ajaxContent a.thickbox"); $("#TB_window").css({ position: "fixed", top: "50%", left: "50%", height: "auto", width: "auto", overflow: "visible" }); if (typeof document.body.style.maxHeight === "undefined") { $("#TB_window").css({ position: "absolute" }); }; }); } } if (!params['modal']) { document.onkeyup = function (e) { if (e == null) { keycode = event.keyCode; } else { keycode = e.which; } if (keycode == 27) { tb_remove(); } }; } } catch (e) { } } function tb_showIframe() { $("#TB_load").remove(); $("#TB_window").css({ position: "fixed", top: "50%", left: "50%", height: "auto", overflow: "visible" }); if (typeof document.body.style.maxHeight === "undefined") { $("#TB_window").css({ position: "absolute" }); }; } function tb_remove() { $("#TB_imageOff").unbind("click"); $("#TB_closeWindowButton").unbind("click"); $("#TB_window,#TB_overlay").fadeOut("fast", function () { $('#TB_window,#TB_overlay,#TB_HideSelect').trigger("unload").unbind().remove(); }); $("#TB_load").remove(); if (typeof document.body.style.maxHeight == "undefined") { $("body", "html").css({ height: "auto", width: "auto" }); $("html").css("overflow", ""); } document.onkeydown = ""; document.onkeyup = ""; return false; } function tb_position() { $("#TB_window").css({ marginLeft: '-' + parseInt((TB_WIDTH / 2), 10) + 'px', width: TB_WIDTH + 'px' }); if (!(jQuery.browser.msie && jQuery.browser.version < 7)) { $("#TB_window").css({ marginTop: '-' + parseInt((TB_HEIGHT / 2), 10) + 'px' }); } } function tb_parseQuery(query) { var Params = {}; if (!query) { return Params; } var Pairs = query.split(/[;&]/); for (var i = 0; i < Pairs.length; i++) { var KeyVal = Pairs[i].split('='); if (!KeyVal || KeyVal.length != 2) { continue; } var key = unescape(KeyVal[0]); var val = unescape(KeyVal[1]); val = val.replace(/\+/g, ' '); Params[key] = val; } return Params; } function tb_getPageSize() { var de = document.documentElement; var w = window.innerWidth || self.innerWidth || (de && de.clientWidth) || document.body.clientWidth; var h = window.innerHeight || self.innerHeight || (de && de.clientHeight) || document.body.clientHeight; arrayPageSize = [w, h]; return arrayPageSize; } function tb_detectMacXFF() { var userAgent = navigator.userAgent.toLowerCase(); if (userAgent.indexOf('mac') != -1 && userAgent.indexOf('firefox') != -1) { return true; } }
//jQuery Infinite Carousel - Copyright 2009 Stéphane Roucheray
jQuery.fn.carousel = function (speed, previous, next, autoscroll, duration, options) { var sliderList = jQuery(this).children("ul")[0]; if (sliderList) { var increment = jQuery(sliderList).children().outerWidth("true"), elmnts = jQuery(sliderList).children(), numElmts = elmnts.length, sizeFirstElmnt = increment, shownInViewport = Math.round(jQuery(this).width() / sizeFirstElmnt), firstElementOnViewPort = 1, isAnimating = false; if (numElmts <= shownInViewport) { jQuery(previous).hide(); jQuery(next).hide(); jQuery(sliderList).css('width', (numElmts + shownInViewport) * increment + increment + "px"); } else { for (i = 0; i < shownInViewport; i++) { jQuery(sliderList).css('width', (numElmts + shownInViewport) * increment + increment + "px"); if (i < numElmts) { jQuery(sliderList).append(jQuery(elmnts[i]).clone()); }; } }; jQuery(previous).click(function (event) { event.preventDefault(); if (!isAnimating) { if (firstElementOnViewPort == 1) { jQuery(sliderList).css('left', "-" + numElmts * sizeFirstElmnt + "px"); firstElementOnViewPort = numElmts; } else { firstElementOnViewPort--; } jQuery(sliderList).animate({ left: "+=" + increment, y: 0, queue: false }, speed, "swing", function () { isAnimating = false; }); isAnimating = true; } }); jQuery(next).click(function (event) { event.preventDefault(); if (!isAnimating) { if (firstElementOnViewPort > numElmts) { firstElementOnViewPort = 2; jQuery(sliderList).css('left', "0px"); } else { firstElementOnViewPort++; } jQuery(sliderList).animate({ left: "-=" + increment, y: 0, queue: false }, speed, "swing", function () { isAnimating = false; }); isAnimating = true; } }); if (autoscroll && numElmts > shownInViewport) { var intervalId = window.setInterval(function () { jQuery(next).click(); }, duration); jQuery(this).mouseenter(function () { window.clearInterval(intervalId); }); jQuery(this).mouseleave(function () { intervalId = window.setInterval(function () { jQuery(next).click(); }, duration); }); } } };
// YAML Tabs Version: 1.1.1 http://blog.ginader.de/dev/yamltabs/index.php Copyright (c) 2007 Dirk Ginader (ginader.de) Dual licensed under the MIT and GPL licenses: http://www.opensource.org/licenses/mit-license.php - http://www.gnu.org/licenses/gpl.html
// Edited by Krishan Rodrigo on 8Aug2011
;
(function ($) {
    $.fn.getUniqueId = function (p) {
        return p + new Date().getTime()
    };
    $.fn.accessibleTabs = function (config) {
        var defaults = {
            wrapperClass: 'tab-content-wrap clearfix',
            currentClass: 'current',
            parentCurrentClass: 'active',
            tabhead: 'h4',
            tabbody: '.tab-content',
            fx: 'show',
            fxspeed: 0,
            currentInfoText: 'current tab: ',
            currentInfoPosition: 'prepend',
            currentInfoClass: 'current-info hide'
        };
        var options = $.extend(defaults, config);
        var o = this;
        return this.each(function () {
            var el = $(this);
            var list = '';
            var contentAnchor = o.getUniqueId('accessibletabscontent');
            var tabsAnchor = o.getUniqueId('accessibletabs');
            $(el).wrapInner('<div class="' + options.wrapperClass + '"></div>');
            $(el).find(options.tabhead).each(function (i) {
                var id = '';
                if (i === 0) {
                    id = ' id="' + tabsAnchor + '"'
                }
                list += '<li class="item-' + (i + 1) + '"><a' + id + ' href="#' + contentAnchor + '">' + $(this).text() + '</a></li>';
                $(this).remove()
            });
            $(el).prepend('<ul id="tab-nav">' + list + '</ul>');
            $(el).find(options.tabbody).hide();
            $(el).find(options.tabbody + ':first').show().before('<' + options.tabhead + '><a tabindex="0" class="hide" name="' + contentAnchor + '" id="' + contentAnchor + '">' + $(el).find("ul>li:first").text() + '</a></' + options.tabhead + '>');
            $(el).find("ul>li:first a").addClass(options.currentClass).find('a')[options.currentInfoPosition]('<span class="' + options.currentInfoClass + '">' + options.currentInfoText + '</span>');
            $(el).find("ul>li:first a").parent().addClass(options.parentCurrentClass);
            $(el).find('ul#tab-nav>li>a').each(function (i) {
                $(this).click(function (event) {
                    event.preventDefault();
                    $(el).find('ul>li>a.current').removeClass(options.currentClass).find("span." + options.currentInfoClass).remove();
                    $(this).blur();
                    $(el).find(options.tabbody + ':visible').hide();
                    $(el).find(options.tabbody).eq(i)[options.fx](options.fxspeed);
                    $('#' + contentAnchor).text($(this).text()).focus();
                    $(this)[options.currentInfoPosition]('<span class="' + options.currentInfoClass + '">' + options.currentInfoText + '</span>')./*parent().*/addClass(options.currentClass);
                    $(el).find("ul>li").removeClass(options.parentCurrentClass);
                    $(el).find("ul>li a." + options.currentClass).parent().addClass(options.parentCurrentClass)
                })
            })
        })
    }
})(jQuery);
// $Id: jquery.datePicker.js 15 2008-12-17 04:40:18Z kelvin.luck $ Copyright (c) 2008 Kelvin Luck (http://www.kelvinluck.com/) Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.
eval(function (p, a, c, k, e, d) { e = function (c) { return (c < a ? '' : e(parseInt(c / a))) + ((c = c % a) > 35 ? String.fromCharCode(c + 29) : c.toString(36)) }; if (!''.replace(/^/, String)) { while (c--) { d[e(c)] = k[c] || e(c) } k = [function (e) { return d[e] } ]; e = function () { return '\\w+' }; c = 1 }; while (c--) { if (k[c]) { p = p.replace(new RegExp('\\b' + e(c) + '\\b', 'g'), k[c]) } } return p } ('(8($){$.1o.2b({3I:8(s){5 11=8(a){b 25.4i(a)};s=$.2b({},$.1o.1K.2B,s);4(s.24!=$.19.2t){5 2F=$(11(\'2S\'));1R(5 i=k.2D;i<k.2D+7;i++){5 1n=i%7;5 1Y=k.4j[1n];2F.N(2i(11(\'4k\')).1g({\'4h\':\'4g\',\'4c\':1Y,\'I\':(1n==0||1n==6?\'2O\':\'1n\')}).3O(s.24==$.19.2x?1Y.4d(0,1):1Y))}};5 2r=$(11(\'4e\')).1g({\'4f\':0,\'1P\':\'4l\'}).N((s.24!=$.19.2t?$(11(\'2R\')).N(2F):11(\'2R\')));5 1S=$(11(\'1S\'));5 K=(F k()).2a();5 j=s.j==S?K.M():s.j;5 u=s.u||K.Y();5 R=F k(u,j,1);5 1M=k.2D-R.4u()+1;4(1M>1)1M-=7;5 2P=4v.4s(((-1*1M+1)+R.4r())/7);R.2N(1M-1);5 2V=8(){4(s.Z){$(3).B(s.Z)}};5 2U=8(){4(s.Z){$(3).16(s.Z)}};5 w=0;3g(w++<2P){5 r=2i(11(\'2S\'));1R(5 i=0;i<7;i++){5 2v=R.M()==j;5 d=$(11(\'q\')).Q(R.1a()+\'\').1g(\'1P\',(2v?\'1X-j \':\'1q-j \')+(R.4w()?\'2O \':\'1n \')+(2v&&R.J()==K.J()?\'K \':\'\')).3D(2V,2U);4(s.U){s.U(d,R,j,u)}r.N(d);R.2N(1)}1S.N(r)}2r.N(1S);b 3.X(8(){$(3).29().N(2r)})},1K:8(s){4(!$.1k.1r)$.1k.1r=[];s=$.2b({},$.1o.1K.2B,s);b 3.X(8(){5 $3=$(3);5 28=l;4(!3.1j){3.1j=$.1k.3T++;$.1k.1r[3.1j]=F 2u(3);28=p}4(s.T){s.2z=p;s.1w=p;s.1x=p;$3.29()}5 1B=$.1k.1r[3.1j];1B.2X(s);4(!28&&s.2z){1B.1F=$(\'<a 1i="#9-P" I="9-3Q-1L"><3R 3X="\'+s.1H+\'" 4a="3J 1L 47 H" /></a>\').L(\'18\',8(){$3.2J(3);3.3L();b p});$3.3e(1B.1F)}4(!28&&$3.1m(\':Q\')){$3.L(\'35\',8(e,2L,$q){3.1I=2L.48()}).L(\'37\',8(){4(3.1I!=\'\'){5 d=k.1O(3.1I);4(d){1B.1s(d,l,l)}}});4(s.3F){$3.L(\'18\',8(){$3.2J()})}5 d=k.1O(3.1I);4(3.1I!=\'\'&&d){1B.1s(d,l,l)}}$3.B(\'9-46\')})},45:8(s){b O.C(3,\'3a\',s)},41:8(d){b O.C(3,\'2w\',d)},42:8(d){b O.C(3,\'2A\',d)},43:8(){5 c=2K(3[0]);4(c){b c.2G()}b z},4x:8(d,v,m){4(v==S)v=l;4(m==S)m=l;b O.C(3,\'1s\',k.1O(d),v,m,l)},4p:8(m,y){b O.C(3,\'1b\',W(m),W(y),l)},2J:8(e){b O.C(3,\'21\',e)},4V:8(a){b O.C(3,\'2l\',a)},4W:8(v,h){b O.C(3,\'3b\',v,h)},4R:8(v,h){b O.C(3,\'2y\',v,h)},4Y:8(){b O.C(3,\'1h\',p,3[0])},3B:8(){}});5 O=8(f,2M,2T,3k,3d){b 3.X(8(){5 c=2K(3);4(c){c[f](2M,2T,3k,3d)}})};8 2u(g){3.g=g;3.A=z;3.E=z;3.D=z;3.G=z;3.1J=z;3.1x=z;3.1w=z;3.1v=z;3.1u=z;3.1z=z;3.1A=z;3.1y=z;3.1F=z;3.U=[];3.1t={};3.T=z;3.n=\'#9-P\';3.1H=\'/3C/3y/H.3z\'};$.2b(2u.4C,{2X:8(s){3.2w(s.D);3.2A(s.G);3.1b(W(s.j),W(s.u));3.2l(s.U);3.1J=s.1J;3.1x=s.1x;3.1w=s.1w;3.1v=s.1v;3.1u=s.1u;3.1z=s.1z;3.Z=s.Z;3.2y(s.1A,s.1y);3.T=s.T;4(3.T){3.n=3.g;3.21()}3.1H=s.1H},2w:8(d){4(d){3.D=k.1O(d)}4(!3.D){3.D=(F k()).2a()}3.1b(3.A,3.E)},2A:8(d){4(d){3.G=k.1O(d)}4(!3.G){3.G=(F k(\'12/31/4z\'))}4(3.G.J()<3.D.J()){3.G=3.D}3.1b(3.A,3.E)},3b:8(v,h){3.1u=v;3.1z=h},2y:8(v,h){3.1A=3i(v)||0;3.1y=3i(h)||0},3a:8(s){$e=$(3.g);$e[s?\'B\':\'16\'](\'9-o\');4(3.1F){$2s=$(3.1F);$2s[s?\'B\':\'16\'](\'9-o\');$2s.1g(\'1p\',s?\'\':$.1l.3E)}4($e.1m(\':Q\')){$e.1g(\'o\',s?\'o\':\'\')}},1b:8(m,y,2Y){4(3.D==S||3.G==S){b}5 s=F k(3.D.J());s.2I(1);5 e=F k(3.G.J());e.2I(1);5 t;4((!m&&!y)||(2g(m)&&2g(y))){t=F k().2a();t.2I(1)}10 4(2g(m)){t=F k(y,3.A,1)}10 4(2g(y)){t=F k(3.E,m,1)}10{t=F k(y,m,1)}4(t.J()<s.J()){t=s}10 4(t.J()>e.J()){t=e}5 33=3.A;5 38=3.E;3.A=t.M();3.E=t.Y();4(2Y&&(3.A!=33||3.E!=38)){3.3N();$(3.g).1D(\'4G\',[3.A,3.E])}},1s:8(d,v,36,3c){4(v==3.27(d)){b}4(3.1v==p){3.1t={};$(\'q.1Q\',3.n).16(\'1Q\')}4(36&&3.A!=d.M()){3.1b(d.M(),d.Y(),l)}3.1t[d.34()]=v;5 1W=\'q.\';1W+=d.M()==3.A?\'1X-j\':\'1q-j\';1W+=\':4K("\'+d.1a()+\'")\';5 $q;$(1W,3.g).X(8(){4($(3).Q()==d.1a()){$q=$(3);$q[v?\'B\':\'16\'](\'1Q\')}});4(3c){5 s=3.27(d);$e=$(3.g);$e.1D(\'35\',[d,$q,s]);$e.1D(\'37\')}},27:8(d){b 3.1t[d.34()]},2G:8(){5 r=[];1R(s 3A 3.1t){4(3.1t[s]==l){r.4A(k.4M(s))}}b r},21:8(2h){4($(3.g).1m(\'.9-o\'))b;2h=2h||3.g;5 c=3;5 $g=$(2h);5 1G=$g.4T();5 $2m;5 2e;5 4P;5 1V;4(c.T){$2m=$(3.g);2e={\'2n\':\'H-\'+3.g.1j,\'1P\':\'9-P 9-P-T\',\'2Z\':\'30\',\'2c-32\':\'39\',\'2c-3h\':\'3j\'};1V={}}10{$2m=$(3.g);2e={\'2n\':\'9-P\',\'1P\':\'9-P\',\'2Z\':\'30\',\'2c-32\':\'39\',\'2c-3h\':\'3j\'};1V={\'1U\':1G.1U+c.1A,\'2d\':1G.2d+c.1y};5 1E=8(e){5 1N=e.4E;5 3f=$(\'#9-P\')[0];3g(l){4(1N==3f){b l}10 4(1N==25){c.1h();b p}10{1N=$(1N).4D()[0]}}};3.1E=1E;3.1h(l)}5 K=(F k()).2a();$(\'#3Y\').3e($(\'<V></V>\').1g(2e).23(1V).N($(\'<2j></2j>\'),$(\'<V I="9-x-1d"></V>\').N($(\'<a I="9-x-1d-u" 1i="#" 1p="\'+$.1l.3n+\'">&2k;&2k;<1e I="1Z">2f 2W</1e></a>\').L(\'18\',8(){b c.1C.C(c,3,0,-1)}),$(\'<a I="9-x-1d-j" 1i="#" 1p="\'+$.1l.3o+\'">&2k;<1e I="1Z">2f 2Q</1e></a>\').L(\'18\',8(){b c.1C.C(c,3,-1,0)})),$(\'<V I="9-x-1c"></V>\').N($(\'<a I="9-x-1c-u" 1i="#" 1p="\'+$.1l.3p+\'">&2o;&2o;<1e I="1Z">26 2W</1e></a>\').L(\'18\',8(){b c.1C.C(c,3,0,1)}),$(\'<a I="9-x-1c-j" 1i="#" 1p="\'+$.1l.3w+\'">&2o;<1e I="1Z">26 2Q</1e></a>\').L(\'18\',8(){b c.1C.C(c,3,1,0)})),$(\'<V></V>\').1g(\'1P\',\'9-H\'),$(\'<V I="9-x-K"></V>\').N($(\'<a I="9-x-K-1L" 1i="#" 1p="4U K\\\'s 1L">4m: \'+K.1a()+\'/\'+(K.M()+1)+\'/\'+K.Y()+\'</a>\').L(\'18\',8(){b c.3M.C(c,K)}))).2H());5 $1f=3.T?$(\'.9-P\',3.n):$(\'#9-P\');4(3.1J==p){$(\'.9-x-1d-u, .9-x-1c-u\',c.n).23(\'21\',\'4o\')}4(3.1w){$1f.N($(\'<a 1i="#" 2n="9-4b">\'+$.1l.3x+\'</a>\').L(\'18\',8(){c.1h();b p}))}c.2p();$(3.g).1D(\'4q\',$1f);4(!c.T){4(3.1u==$.19.3q){$1f.23(\'1U\',1G.1U+$g.3K()-$1f.3K()+c.1A)}4(3.1z==$.19.3m){$1f.23(\'2d\',1G.2d+$g.3P()-$1f.3P()+c.1y)}$(25).L(\'3v\',3.1E)}},2l:8(a){4(a==z)b;4(a&&3S(a)==\'8\'){a=[a]}3.U=3.U.4Q(a)},3s:8($q,3l,j,u){5 c=3.3t;5 d=F k(3l.J());$q.L(\'18\',8(){5 $3=$(3);4(!$3.1m(\'.o\')){c.1s(d,!$3.1m(\'.1Q\')||!c.1v,p,l);4(c.1x){c.1h()}}});4(c.27(d)){$q.B(\'1Q\')}1R(5 i=0;i<c.U.4B;i++){c.U[i].4y(3,4F)}},1C:8(g,m,y){4(!$(g).1m(\'.o\')){3.1b(3.A+m,3.E+y,l)}g.3L();b p},3M:8(d){3.1b(d.M(),d.Y(),l);3.1s(d,1,l,l);3.1h(l);b p},3N:8(){3.2C();3.2p()},2p:8(){$(\'2j\',3.n).3O(k.44[3.A]+\' \'+3.E);$(\'.9-H\',3.n).3I({j:3.A,u:3.E,U:3.3s,3t:3,Z:3.Z});4(3.E==3.D.Y()&&3.A==3.D.M()){$(\'.9-x-1d-u\',3.n).B(\'o\');$(\'.9-x-1d-j\',3.n).B(\'o\');$(\'.9-H q.1q-j\',3.n).X(8(){5 $3=$(3);4(W($3.Q())>20){$3.B(\'o\')}});5 d=3.D.1a();$(\'.9-H q.1X-j\',3.n).X(8(){5 $3=$(3);4(W($3.Q())<d){$3.B(\'o\')}})}10{$(\'.9-x-1d-u\',3.n).16(\'o\');$(\'.9-x-1d-j\',3.n).16(\'o\');5 d=3.D.1a();4(d>20){5 1T=F k(3.D.J());1T.3u(1);4(3.E==1T.Y()&&3.A==1T.M()){$(\'9-H q.1q-j\',3.n).X(8(){5 $3=$(3);4(W($3.Q())<d){$3.B(\'o\')}})}}}4(3.E==3.G.Y()&&3.A==3.G.M()){$(\'.9-x-1c-u\',3.n).B(\'o\');$(\'.9-x-1c-j\',3.n).B(\'o\');$(\'.9-H q.1q-j\',3.n).X(8(){5 $3=$(3);4(W($3.Q())<14){$3.B(\'o\')}});5 d=3.G.1a();$(\'.9-H q.1X-j\',3.n).X(8(){5 $3=$(3);4(W($3.Q())>d){$3.B(\'o\')}})}10{$(\'.9-x-1c-u\',3.n).16(\'o\');$(\'.9-x-1c-j\',3.n).16(\'o\');5 d=3.G.1a();4(d<13){5 22=F k(3.G.J());22.3u(-1);4(3.E==22.Y()&&3.A==22.M()){$(\'.9-H q.1q-j\',3.n).X(8(){5 $3=$(3);4(W($3.Q())>d){$3.B(\'o\')}})}}}},1h:8(3r,g){4(!g||g==3.g){$(25).2q(\'3v\',3.1E);3.2C();$(\'#9-P a\').2q();$(\'#9-P\').29().4H();4(!3r){$(3.g).1D(\'4I\',[3.2G()])}}},2C:8(){$(\'.9-H q\',3.n).2q();$(\'.9-H\',3.n).29()}});$.19={2t:0,2x:1,4J:2,3G:0,3q:1,3H:0,3m:1};$.1l={3n:\'2f u\',3o:\'2f j\',3p:\'26 u\',3w:\'26 j\',3x:\'4L\',3E:\'3J 1L\'};$.4X=\'$4O: 4N.1K.4S 15 49-12-17 3Z:40:3U 3W.3V $\';$.1o.1K.2B={j:S,u:S,24:$.19.2x,D:S,G:S,T:p,U:z,2z:l,1J:l,1x:l,1w:p,1v:p,3F:p,1u:$.19.3G,1z:$.19.3H,1A:0,1y:0,Z:\'9-3D\',1H:\'/3C/3y/H.3z\'};8 2K(g){4(g.1j)b $.1k.1r[g.1j];b p};4($.1o.2H==S){$.1o.2H=8(){b 3}};$(4n).L(\'4t\',8(){5 2E=$.1k.1r||[];1R(5 i 3A 2E){$(2E[i].g).3B()}})})(2i);', 62, 309, '|||this|if|var|||function|dp||return|||||ele|||month|Date|true||context|disabled|false|td||||year|||nav||null|displayedMonth|addClass|call|startDate|displayedYear|new|endDate|calendar|class|getTime|today|bind|getMonth|append|_w|popup|text|currentDate|undefined|inline|renderCallback|div|Number|each|getFullYear|hoverClass|else|dc|||||removeClass||click|dpConst|getDate|setDisplayedMonth|next|prev|span|pop|attr|_closeCalendar|href|_dpId|event|dpText|is|weekday|fn|title|other|_dpCache|setSelected|selectedDates|verticalPosition|selectMultiple|displayClose|closeOnSelect|horizontalOffset|horizontalPosition|verticalOffset|controller|_displayNewMonth|trigger|_checkMouse|button|eleOffset|calendarIconURL|value|showYearNavigation|datePicker|date|firstDayOffset|el|fromString|className|selected|for|tbody|sd|top|cssRules|selectorString|current|day|hide||display|ed|css|showHeader|document|Next|isSelected|alreadyExists|empty|zeroTime|extend|aria|left|attrs|Previous|isNaN|eleAlignTo|jQuery|h4|lt|setRenderCallback|createIn|id|gt|_renderCalendar|unbind|calendarTable|but|SHOW_HEADER_NONE|DatePicker|thisMonth|setStartDate|SHOW_HEADER_SHORT|setOffset|createButton|setEndDate|defaults|_clearCalendar|firstDayOfWeek|els|headRow|getSelected|bgIframe|setDate|dpDisplay|_getController|selectedDate|a1|addDays|weekend|weeksToDraw|Month|thead|tr|a2|unHover|doHover|Year|init|rerender|role|dialog||live|oldMonth|toString|dateSelected|moveToMonth|change|oldYear|assertive|setDisabled|setPosition|dispatchEvents|a4|after|cal|while|relevant|parseInt|additions|a3|thisDate|POS_RIGHT|TEXT_PREV_YEAR|TEXT_PREV_MONTH|TEXT_NEXT_YEAR|POS_BOTTOM|programatic|cellRender|dpController|addMonths|mousedown|TEXT_NEXT_MONTH|TEXT_CLOSE|icons|gif|in|_dpDestroy|images|hover|TEXT_CHOOSE_DATE|clickInput|POS_TOP|POS_LEFT|renderCalendar|Choose|height|blur|_navigateToToday|_rerenderCalendar|html|width|choose|img|typeof|guid|18Z|luck|kelvin|src|wrapper|04||dpSetStartDate|dpSetEndDate|dpGetSelected|monthNames|dpSetDisabled|applied|from|asString|2008|alt|close|abbr|substr|table|cellspacing|col|scope|createElement|dayNames|th|jCalendar|Today|window|none|dpSetDisplayedMonth|dpDisplayed|getDaysInMonth|ceil|unload|getDay|Math|isWeekend|dpSetSelected|apply|2999|push|length|prototype|parent|target|arguments|dpMonthChanged|remove|dpClosed|SHOW_HEADER_LONG|contains|Close|parse|jquery|Id|attrsCalendarHolder|concat|dpSetOffset|js|offset|Select|dpSetRenderCallback|dpSetPosition|dpVersion|dpClose'.split('|'), 0, {}))
eval(function (p, a, c, k, e, d) { e = function (c) { return (c < a ? '' : e(parseInt(c / a))) + ((c = c % a) > 35 ? String.fromCharCode(c + 29) : c.toString(36)) }; if (!''.replace(/^/, String)) { while (c--) { d[e(c)] = k[c] || e(c) } k = [function (e) { return d[e] } ]; e = function () { return '\\w+' }; c = 1 }; while (c--) { if (k[c]) { p = p.replace(new RegExp('\\b' + e(c) + '\\b', 'g'), k[c]) } } return p } ('9.Z=[\'1e\',\'1h\',\'1K\',\'1w\',\'1l\',\'1m\',\'1k\'];9.V=[\'1q\',\'1i\',\'1a\',\'1d\',\'1G\',\'1F\',\'1C\'];9.U=[\'1E\',\'1o\',\'1c\',\'1L\',\'10\',\'1z\',\'1A\',\'1B\',\'1y\',\'1x\',\'1u\',\'1v\'];9.t=[\'1D\',\'1J\',\'1I\',\'1H\',\'10\',\'1t\',\'1s\',\'1f\',\'1b\',\'1j\',\'1p\',\'1r\'];9.1n=1;9.G=\'E/A/D\';9.14=\'20\';(8(){8 b(B,N){h(!9.S[B]){9.S[B]=N}};b("R",8(){e y=5.l();a(y%4==0&&y%1g!=0)||y%26==0});b("P",8(){a 5.x()==0||5.x()==6});b("2a",8(){a!5.P()});b("27",8(){a[g,(5.R()?29:28),g,q,g,q,g,g,q,g,q,g][5.m()]});b("24",8(u){a u?9.V[5.x()]:9.Z[5.x()]});b("W",8(u){a u?9.t[5.m()]:9.U[5.m()]});b("T",8(){e v=18 9("1/1/"+5.l());a X.2c((5.K()-v.K())/25)});b("2b",8(){a X.2f(5.T()/7)});b("2d",8(11){5.w(0);5.J(11);a 5});b("2e",8(c){5.I(5.l()+c);a 5});b("1M",8(c){e v=5.j();5.w(5.m()+c);h(v>5.j())5.M(-5.j());a 5});b("M",8(c){5.J(5.j()+c);a 5});b("22",8(c){5.12(5.1R()+c);a 5});b("1S",8(c){5.Q(5.23()+c);a 5});b("1Q",8(c){5.O(5.1P()+c);a 5});b("1N",8(){5.1O(0);5.O(0);5.Q(0);5.12(0);a 5});b("1T",8(){e r=9.G;a r.p(\'D\').n(5.l()).p(\'13\').n((5.l()+\'\').L(2)).p(\'15\').n(5.W(1U)).p(\'A\').n(F(5.m()+1)).p(\'E\').n(F(5.j()))});9.1Z=8(s){e f=9.G;e d=18 9(\'19/19/21\');e C=f.o(\'D\');h(C>-1){d.I(z(s.k(C,4)))}17{d.I(z(9.14+s.k(f.o(\'13\'),2)))}e H=f.o(\'15\');h(H>-1){e 16=s.k(H,3);1Y(e i=0;i<9.t.Y;i++){h(9.t[i]==16)1X}d.w(i)}17{d.w(z(s.k(f.o(\'A\'),2))-1)}d.J(z(s.k(f.o(\'E\'),2)));h(1V(d.K())){a 1W}a d};e F=8(c){e s=\'0\'+c;a s.L(s.Y-2)}})();', 62, 140, '|||||this|||function|Date|return|add|num||var||31|if||getDate|substr|getFullYear|getMonth|join|indexOf|split|30|||abbrMonthNames|abbreviated|tmpdtm|setMonth|getDay||Number|mm|name|iY|yyyy|dd|_zeroPad|format|iM|setFullYear|setDate|getTime|substring|addDays|method|setSeconds|isWeekend|setMinutes|isLeapYear|prototype|getDayOfYear|monthNames|abbrDayNames|getMonthName|Math|length|dayNames|May|day|setHours|yy|fullYearStart|mmm|mStr|else|new|01|Tue|Sep|March|Wed|Sunday|Aug|100|Monday|Mon|Oct|Saturday|Thursday|Friday|firstDayOfWeek|February|Nov|Sun|Dec|Jul|Jun|November|December|Wednesday|October|September|June|July|August|Sat|Jan|January|Fri|Thu|Apr|Mar|Feb|Tuesday|April|addMonths|zeroTime|setMilliseconds|getSeconds|addSeconds|getHours|addMinutes|asString|true|isNaN|false|break|for|fromString||1977|addHours|getMinutes|getDayName|86400000|400|getDaysInMonth|||isWeekDay|getWeekOfYear|floor|setDayOfYear|addYears|ceil'.split('|'), 0, {}))
// bgIframe
eval(function (p, a, c, k, e, r) { e = function (c) { return (c < a ? '' : e(parseInt(c / a))) + ((c = c % a) > 35 ? String.fromCharCode(c + 29) : c.toString(36)) }; if (!''.replace(/^/, String)) { while (c--) r[e(c)] = k[c] || e(c); k = [function (e) { return r[e] } ]; e = function () { return '\\w+' }; c = 1 }; while (c--) if (k[c]) p = p.replace(new RegExp('\\b' + e(c) + '\\b', 'g'), k[c]); return p } ('(5($){$.h.q=$.h.e=5(s){i($.r.t&&/6.0/.u(v.w)){s=$.x({7:\'3\',8:\'3\',9:\'3\',b:\'3\',j:y,f:\'A:k;\'},s||{});B a=5(n){g n&&n.C==D?n+\'4\':n},l=\'<m E="e"F="0"G="-1"f="\'+s.f+\'"\'+\'H="I:J;K:L;z-M:-1;\'+(s.j!==k?\'N:O(P=\\\'0\\\');\':\'\')+\'7:\'+(s.7==\'3\'?\'c(((o(2.d.p.Q)||0)*-1)+\\\'4\\\')\':a(s.7))+\';\'+\'8:\'+(s.8==\'3\'?\'c(((o(2.d.p.R)||0)*-1)+\\\'4\\\')\':a(s.8))+\';\'+\'9:\'+(s.9==\'3\'?\'c(2.d.S+\\\'4\\\')\':a(s.9))+\';\'+\'b:\'+(s.b==\'3\'?\'c(2.d.T+\\\'4\\\')\':a(s.b))+\';\'+\'"/>\';g 2.U(5(){i($(\'> m.e\',2).V==0)2.W(X.Y(l),2.Z)})}g 2}})(10);', 62, 63, '||this|auto|px|function||top|left|width||height|expression|parentNode|bgiframe|src|return|fn|if|opacity|false|html|iframe||parseInt|currentStyle|bgIframe|browser||msie|test|navigator|userAgent|extend|true||javascript|var|constructor|Number|class|frameborder|tabindex|style|display|block|position|absolute|index|filter|Alpha|Opacity|borderTopWidth|borderLeftWidth|offsetWidth|offsetHeight|each|length|insertBefore|document|createElement|firstChild|jQuery'.split('|'), 0, {}))
