﻿$(document).ready(function () { $('.help-link').click(function () { $($(this).attr('data')).toggle(); }); $('#list-populer a').click(function () { $($(this).attr('href')).next().show(); }); }); function login() {
    var nickaddressVal = $("#tbUserNameLoginOut").val(); if (nickaddressVal == '' || nickaddressVal == 'Üye adı ya da e-mail adresiniz') { $("#tbUserNameLoginOut").css('border-color', '#fc6d42'); return false; }
    else { $("#tbUserNameLoginOut").css('border-color', '#BBB #DDD #DDD #BBB'); }
    var pwdVal = $("#tbPasswordLoginOut").val(); if (pwdVal == '') { $("#tbPasswordLoginOut").css('border-color', '#fc6d42'); return false; }
    else { $("#tbPasswordLoginOut").css('border-color', '#BBB #DDD #DDD #BBB'); }
    $("#loginLoadinOut").show(); var remember = false; if ($('#cbHatirlaLoginOut').is(":checked")) { remember = true; }
    $.ajax({ type: "POST", url: "services/outservices.asmx/siteyeGir", data: '{"un":"' + $("#tbUserNameLoginOut").val() + '","pwd":"' + $("#tbPasswordLoginOut").val() + '","remember":"' + remember + '"}', contentType: "application/json; charset=utf-8", dataType: "json", success: function (msg) {
        if (msg.d == "ok") { window.location.href = "default.aspx"; }
        else { $("#loginLoadinOut").hide(); fall("Girdiğiniz kullanıcı adı veya şifre yanlış", false); $("#tbUserNameLoginOut").val(''); $("#tbPasswordLoginOut").val(''); return false; } 
    } 
    });
}
$(document).ready(function () {
    $("#btnLogin").click(function (e) { loginOut(); }); $('.loginInputsh').keypress(function (e) { if (e.which == 13) { loginOut(); return false; } }); $("#divGiris").click(function (e) {
        e.stopPropagation(); $("#divGiris").toggleClass("active"); $("#girisDropdown").toggle(); if ($("a#signin-link i").css('background-image').indexOf('toggle_down_light.png') != -1)
            $("a#signin-link i").css('background-image', 'url(http://www.seks-partner.com/images/toggle_up_light.png)'); else
            $("a#signin-link i").css('background-image', 'url(http://www.seks-partner.com/images/toggle_down_light.png)');
    }); $("#girisDropdown").mouseup(function (e) { e.stopPropagation(); }); $(document).mouseup(function (e) { if ($(e.target).parents("#girisDropdown").length == 0 && $(e.target).parents("#divGirisContainer").length == 0) { $("#girisDropdown").hide(); $("#divGiris").removeClass("active"); $("a#signin-link i").css('background-image', 'url(http://www.seks-partner.com/images/toggle_down_light.png)'); } });
}); function loginOut() {
    var nickaddressVal = $("#tbUserNameLogin").val(); if (nickaddressVal == '') { $("#tbUserNameLogin").css('border-color', '#fc6d42'); return false; }
    else { $("#tbUserNameLogin").css('border-color', '#ccc'); }
    var pwdVal = $("#tbPasswordLogin").val(); if (pwdVal == '') { $("#tbPasswordLogin").css('border-color', '#fc6d42'); return false; }
    else { $("#tbPasswordLogin").css('border-color', '#ccc'); }
    $("#loginLoadin").show(); var remember = false; if ($('#cbHatirlaLogin').is(":checked")) { remember = true; }
    $.ajax({ type: "POST", url: "services/outservices.asmx/siteyeGir", data: '{"un":"' + $("#tbUserNameLogin").val() + '","pwd":"' + $("#tbPasswordLogin").val() + '","remember":"' + remember + '"}', contentType: "application/json; charset=utf-8", dataType: "json", success: function (msg) {
        if (msg.d == "ok") { window.location.href = "http://www.seks-partner.com/default.aspx"; }
        else { $("#loginLoadin").hide(); fall("Girdiğiniz kullanıcı adı veya şifre yanlış.", false); $("#girisDropdown").hide(); $("#tbUserNameLogin").val(''); $("#tbPasswordLogin").val(''); $("#divGiris").removeClass("active"); $("a#signin-link i").css('background-image', 'url(http://www.seks-partner.com/images/toggle_down_light.png)'); return false; } 
    } 
    });
}
$(document).ready(function () { $(".splitscreen-load-mask").css({ 'display': 'none' }); }); function fall(message, type) { var ic = 'error'; if (type) ic = 'check'; $.fallr('show', { content: '<p>' + message + '</p>', zIndex: 7000, useOverlay: true, icon: ic, position: 'center' }); }
(function ($) {
    jQuery.cookie = function (key, value, options) {
        if (arguments.length > 1 && String(value) !== "[object Object]") {
            options = jQuery.extend({}, options); if (value === null || value === undefined) { options.expires = -1; }
            if (typeof options.expires === 'number') { var days = options.expires, t = options.expires = new Date(); t.setDate(t.getDate() + days); }
            value = String(value); return (document.cookie = [encodeURIComponent(key), '=', options.raw ? value : encodeURIComponent(value), options.expires ? '; expires=' + options.expires.toUTCString() : '', options.path ? '; path=' + options.path : '', options.domain ? '; domain=' + options.domain : '', options.secure ? '; secure' : ''].join(''));
        }
        options = value || {}; var result, decode = options.raw ? function (s) { return s; } : decodeURIComponent; return (result = new RegExp('(?:^|; )' + encodeURIComponent(key) + '=([^;]*)').exec(document.cookie)) ? decode(result[1]) : null;
    }; function showOption(settingName) {
        if (settingName === false) { return 'display:none;'; }
        else { return 'display:block;'; } 
    }
    function showOptionBtn(settingName) {
        if (settingName === false) { return 'display:none;'; }
        else { return 'display:inline-block;'; } 
    }
    function showLinkHint(settingName, button, value) {
        if (settingName === true && button == "promo") { return 'title="' + value + '"'; }
        if (settingName === true && button == "continue") { return 'title="' + value + '"'; }
        if (settingName === false) { return; } 
    }
    $.fn.splitscreen = function (options) {
        var 
defaults = { splitMode: 'splash', cookieName: 'splitscreen', cookieOn: false, showPromoBtn: true, showContinueBtn: true, showFade: true, showRaster: true, showCenter: true, showCenterTop: false, showCenterBottom: false, showFloatRightTop: false, showFloatRightCenter: false, showFloatRightBottom: false, showFloatLeftTop: false, showFloatLeftCenter: false, showFloatLeftBottom: false, showUnderlay: true, showIntroSplit: true, showAutoSplit: true, showHints: false, splitTimeIntro: 2000, splitTimeAuto: 15000, imageDir: 'img/', imageBG: 'background-1.jpg', imageWidthBG: 1920, imageHeightBG: 1080, imageRaster: 'raster00.png', alphaRaster: '80', imageCenter: 'logo-large.png', imageFloating: 'logo-large.png', imageFadeLeft: 'fade-left.png', imageFadeRight: 'fade-right.png', imageLoading: 'loader-black.gif', imageLoadingBG: '#000000', verticalAlignTeaser: 'middle', verticalAlignBtn: 'bottom', textContinueBtn: 'Continue to site &raquo;', colorContinueTxt: '#ffffff', fontContinueTxt: 'Georgia1, Georgia, serif', sizeContinueBtn: '14px', colorContinueBtn: '#333333', colorContinueRoll: '#999999', textPromoBtn: 'Click here for the story true story of karate &raquo;', colorPromoTxt: '#ffffff', fontPromoTxt: 'Georgia1, Georgia, serif', sizePromoBtn: '18px', colorPromoBtn: '#cc0000', colorPromoRoll: '#ff0000', urlPromoBtn: 'http://www.google.com', targetPromoBtn: '_blank', colorUnderlay: '#000000', alphaUnderlay: '80' }, settings = $.extend({}, defaults, options); var splitscreenCookie = $.cookie(settings.cookieName); if (settings.cookieOn === true && splitscreenCookie === null || settings.cookieOn === false) {
            if (settings.cookieOn === true) { $.cookie(settings.cookieName, settings.cookieName); }
            return this.each(function () {
                var alreadyopen = false; var splitscreenHtml; if (settings.splitMode == 'splash') { splitscreenHtml = '<!--[ START SPLITSCREEN ]-->' + '<div class="splitscreen-load-mask" style="background:' + settings.imageLoadingBG + ' url(' + settings.imageDir + settings.imageLoading + ') center center no-repeat;"></div>' + '<div class="splitscreen">' + '<!--[ SPLIT SCREEN ]-->' + '<div class="splitscreen-main splitscreen-erase">' + '<div class="splitscreen-activate x-splitscreen splitscreen-erase" ' + showLinkHint(settings.showHints, "continue", settings.textContinueBtn) + '></div>' + '<div class="splitscreen-fade-left splitscreen-erase splitscreen-sector" style="background:transparent url(' + settings.imageDir + settings.imageFadeLeft + ') 0 0 repeat-y; background-size: 50%; ' + showOption(settings.showFade) + '"></div>' + '<div class="splitscreen-fade-right splitscreen-erase splitscreen-sector" style="background:transparent url(' + settings.imageDir + settings.imageFadeRight + ') 100% 0 repeat-y; background-size: 50%; ' + showOption(settings.showFade) + '"></div>' + '<div class="splitscreen-left splitscreen-erase splitscreen-sector">' + '<div class="splitscreen-bg-left">' + '<img src="' + settings.imageDir + settings.imageBG + '" width="' + settings.imageWidthBG + '" height="' + settings.imageHeightBG + '" class="splitscreen-fullscreen" />' + '<div class="splitscreen-raster-left main-raster" style="background:transparent url(' + settings.imageDir + settings.imageRaster + ') 0 0; ' + showOption(settings.showRaster) + ' filter:alpha(opacity=' + settings.alphaRaster + '); -moz-opacity:0.' + settings.alphaRaster + '; opacity:0.' + settings.alphaRaster + '; filter:progid:DXImageTransform.Microsoft.Alpha(opacity=' + settings.alphaRaster + ');"></div>' + '</div>' + '<div class="splitscreen-logo-left splitscreen-logo" style="background:transparent url(' + settings.imageDir + settings.imageCenter + ') center top no-repeat; ' + showOption(settings.showCenterTop) + '"></div>' + '<div class="splitscreen-logo-left splitscreen-logo" style="background:transparent url(' + settings.imageDir + settings.imageCenter + ') center center no-repeat; ' + showOption(settings.showCenter) + '"></div>' + '<div class="splitscreen-logo-left splitscreen-logo" style="background:transparent url(' + settings.imageDir + settings.imageCenter + ') center bottom no-repeat; ' + showOption(settings.showCenterBottom) + '"></div>' + '<div class="splitscreen-logo" style="background:transparent url(' + settings.imageDir + settings.imageFloating + ') left top no-repeat; ' + showOption(settings.showFloatLeftTop) + '"></div>' + '<div class="splitscreen-logo" style="background:transparent url(' + settings.imageDir + settings.imageFloating + ') left center no-repeat; ' + showOption(settings.showFloatLeftCenter) + '"></div>' + '<div class="splitscreen-logo" style="background:transparent url(' + settings.imageDir + settings.imageFloating + ') left bottom no-repeat; ' + showOption(settings.showFloatLeftBottom) + '"></div>' + '</div>' + '<div class="splitscreen-right splitscreen-erase splitscreen-sector">' + '<div class="splitscreen-bg-right">' + '<img src="' + settings.imageDir + settings.imageBG + '" width="' + settings.imageWidthBG + '" height="' + settings.imageHeightBG + '" class="splitscreen-fullscreen" />' + '<div class="splitscreen-raster-right main-raster" style="background:transparent url(' + settings.imageDir + settings.imageRaster + ') 0 0; ' + showOption(settings.showRaster) + ' filter:alpha(opacity=' + settings.alphaRaster + '); -moz-opacity:0.' + settings.alphaRaster + '; opacity:0.' + settings.alphaRaster + '; filter:progid:DXImageTransform.Microsoft.Alpha(opacity=' + settings.alphaRaster + ');"></div>' + '</div>' + '<div class="splitscreen-logo-right splitscreen-logo" style="background:transparent url(' + settings.imageDir + settings.imageCenter + ') center top no-repeat; ' + showOption(settings.showCenterTop) + '"></div>' + '<div class="splitscreen-logo-right splitscreen-logo" style="background:transparent url(' + settings.imageDir + settings.imageCenter + ') center center no-repeat; ' + showOption(settings.showCenter) + '"></div>' + '<div class="splitscreen-logo-right splitscreen-logo" style="background:transparent url(' + settings.imageDir + settings.imageCenter + ') center bottom no-repeat; ' + showOption(settings.showCenterBottom) + '"></div>' + '<div class="splitscreen-logo" style="background:transparent url(' + settings.imageDir + settings.imageFloating + ') right top no-repeat; ' + showOption(settings.showFloatRightTop) + '"></div>' + '<div class="splitscreen-logo" style="background:transparent url(' + settings.imageDir + settings.imageFloating + ') right center no-repeat; ' + showOption(settings.showFloatRightCenter) + '"></div>' + '<div class="splitscreen-logo" style="background:transparent url(' + settings.imageDir + settings.imageFloating + ') right bottom no-repeat; ' + showOption(settings.showFloatRightBottom) + '"></div>' + '</div>' + '<div class="splitscreen-shadow-left splitscreen-erase">' + '<div class="splitscreen-shadow splitscreen-erase"></div>' + '</div>' + '<div class="splitscreen-shadow-right splitscreen-erase">' + '<div class="splitscreen-shadow splitscreen-erase"></div>' + '</div>' + '<!--[ UNDERLAY ]-->' + '<div class="splitscreen-underlay splitscreen-erase-fade" style="background:' + settings.colorUnderlay + '; filter:alpha(opacity=' + settings.alphaUnderlay + '); -moz-opacity:0.' + settings.alphaUnderlay + '; opacity:0.' + settings.alphaUnderlay + '; filter:progid:DXImageTransform.Microsoft.Alpha(opacity=' + settings.alphaUnderlay + '); ' + showOption(settings.showUnderlay) + ';"></div>' + '</div>' + '</div>' + '<!--[ STOP SPLITSCREEN ]-->'; }
                if (settings.splitMode == 'promo') { splitscreenHtml = '<style type="text/css">' + '.awesome-promo, .awesome-promo:visited {background-color:' + settings.colorPromoBtn + ';}' + '.awesome-promo:hover {background-color:' + settings.colorPromoRoll + ';}' + '.awesome-continue, .awesome-continue:visited {background-color:' + settings.colorContinueBtn + ';}' + '.awesome-continue:hover {background-color:' + settings.colorContinueRoll + ';}' + '</style>' + '<!--[ START SPLITSCREEN ]-->' + '<div class="splitscreen-load-mask" style="background:' + settings.imageLoadingBG + ' url(' + settings.imageDir + settings.imageLoading + ') center center no-repeat;"></div>' + '<div class="splitscreen">' + '<!--[ SPLIT SCREEN ]-->' + '<div class="splitscreen-main splitscreen-erase">' + '<div class="splitscreen-activate splitscreen-erase"></div>' + '<div class="splitscreen-activate-2 splitscreen-erase"></div>' + '<div class="splitscreen-fade-left splitscreen-erase splitscreen-sector" style="background:transparent url(' + settings.imageDir + settings.imageFadeLeft + ') 0 0 repeat-y; background-size: 50%; ' + showOption(settings.showFade) + '"></div>' + '<div class="splitscreen-fade-right splitscreen-erase splitscreen-sector" style="background:transparent url(' + settings.imageDir + settings.imageFadeRight + ') 100% 0 repeat-y; background-size: 50%; ' + showOption(settings.showFade) + '"></div>' + '<div class="splitscreen-left splitscreen-erase splitscreen-sector">' + '<div class="splitscreen-bg-left">' + '<img src="' + settings.imageDir + settings.imageBG + '" width="' + settings.imageWidthBG + '" height="' + settings.imageHeightBG + '" class="splitscreen-fullscreen" />' + '<div class="splitscreen-raster-left main-raster" style="background:transparent url(' + settings.imageDir + settings.imageRaster + ') 0 0; ' + showOption(settings.showRaster) + ' filter:alpha(opacity=' + settings.alphaRaster + '); -moz-opacity:0.' + settings.alphaRaster + '; opacity:0.' + settings.alphaRaster + '; filter:progid:DXImageTransform.Microsoft.Alpha(opacity=' + settings.alphaRaster + ');"></div>' + '</div>' + '<div class="splitscreen-logo-left splitscreen-logo" style="background:transparent url(' + settings.imageDir + settings.imageCenter + ') center top no-repeat; ' + showOption(settings.showCenterTop) + '"></div>' + '<div class="splitscreen-logo-left splitscreen-logo" style="background:transparent url(' + settings.imageDir + settings.imageCenter + ') center center no-repeat; ' + showOption(settings.showCenter) + '"></div>' + '<div class="splitscreen-logo-left splitscreen-logo" style="background:transparent url(' + settings.imageDir + settings.imageCenter + ') center bottom no-repeat; ' + showOption(settings.showCenterBottom) + '"></div>' + '<div class="splitscreen-logo" style="background:transparent url(' + settings.imageDir + settings.imageFloating + ') left top no-repeat; ' + showOption(settings.showFloatLeftTop) + '"></div>' + '<div class="splitscreen-logo" style="background:transparent url(' + settings.imageDir + settings.imageFloating + ') left center no-repeat; ' + showOption(settings.showFloatLeftCenter) + '"></div>' + '<div class="splitscreen-logo" style="background:transparent url(' + settings.imageDir + settings.imageFloating + ') left bottom no-repeat; ' + showOption(settings.showFloatLeftBottom) + '"></div>' + '</div>' + '<div class="splitscreen-right splitscreen-erase splitscreen-sector">' + '<div class="splitscreen-bg-right">' + '<img src="' + settings.imageDir + settings.imageBG + '" width="' + settings.imageWidthBG + '" height="' + settings.imageHeightBG + '" class="splitscreen-fullscreen" />' + '<div class="splitscreen-raster-right main-raster" style="background:transparent url(' + settings.imageDir + settings.imageRaster + ') 0 0; ' + showOption(settings.showRaster) + ' filter:alpha(opacity=' + settings.alphaRaster + '); -moz-opacity:0.' + settings.alphaRaster + '; opacity:0.' + settings.alphaRaster + '; filter:progid:DXImageTransform.Microsoft.Alpha(opacity=' + settings.alphaRaster + ');"></div>' + '</div>' + '<div class="splitscreen-logo-right splitscreen-logo" style="background:transparent url(' + settings.imageDir + settings.imageCenter + ') center top no-repeat; ' + showOption(settings.showCenterTop) + '"></div>' + '<div class="splitscreen-logo-right splitscreen-logo" style="background:transparent url(' + settings.imageDir + settings.imageCenter + ') center center no-repeat; ' + showOption(settings.showCenter) + '"></div>' + '<div class="splitscreen-logo-right splitscreen-logo" style="background:transparent url(' + settings.imageDir + settings.imageCenter + ') center bottom no-repeat; ' + showOption(settings.showCenterBottom) + '"></div>' + '<div class="splitscreen-logo" style="background:transparent url(' + settings.imageDir + settings.imageFloating + ') right top no-repeat; ' + showOption(settings.showFloatRightTop) + '"></div>' + '<div class="splitscreen-logo" style="background:transparent url(' + settings.imageDir + settings.imageFloating + ') right center no-repeat; ' + showOption(settings.showFloatRightCenter) + '"></div>' + '<div class="splitscreen-logo" style="background:transparent url(' + settings.imageDir + settings.imageFloating + ') right bottom no-repeat; ' + showOption(settings.showFloatRightBottom) + '"></div>' + '</div>' + '<div class="splitscreen-shadow-left splitscreen-erase">' + '<div class="splitscreen-shadow splitscreen-erase"></div>' + '</div>' + '<div class="splitscreen-shadow-right splitscreen-erase">' + '<div class="splitscreen-shadow splitscreen-erase"></div>' + '</div>' + '<!--[ UNDERLAY ]-->' + '<div class="splitscreen-underlay splitscreen-erase-fade" style="background:' + settings.colorUnderlay + '; filter:alpha(opacity=' + settings.alphaUnderlay + '); -moz-opacity:0.' + settings.alphaUnderlay + '; opacity:0.' + settings.alphaUnderlay + '; filter:progid:DXImageTransform.Microsoft.Alpha(opacity=' + settings.alphaUnderlay + '); ' + showOption(settings.showUnderlay) + ';">' + '</div>' + '<div class="splitscreen-button-div">' + '<table class="splitscreen-button-holder" cellpadding="0" cellspacing="0"><tbody><td align="center" valign="' + settings.verticalAlignBtn + '">' + '<a href="' + settings.urlPromoBtn + '" target="' + settings.targetPromoBtn + '" class="' + settings.sizePromoBtn + ' awesome awesome-promo" ' + showLinkHint(settings.showHints, "promo", settings.textPromoBtn) + ' style="font-size:' + settings.sizePromoBtn + '; font-family:' + settings.fontPromoTxt + '; color:' + settings.colorPromoTxt + '; ' + showOptionBtn(settings.showPromoBtn) + '">' + settings.textPromoBtn + '</a><br /><br />' + '<a class="x-splitscreen ' + settings.sizeContinueBtn + ' awesome awesome-continue" ' + showLinkHint(settings.showHints, "continue", settings.textContinueBtn) + ' style="font-size:' + settings.sizeContinueBtn + '; font-family:' + settings.fontContinueTxt + '; color:' + settings.colorContinueTxt + '; ' + showOptionBtn(settings.showContinueBtn) + '">' + settings.textContinueBtn + '</a>' + '</td></tbody></table>' + '</div>' + '</div>' + '</div>' + '<!--[ STOP SPLITSCREEN ]-->'; }
                if (settings.splitMode == 'teaser') { splitscreenHtml = '<!--[ START SPLITSCREEN ]-->' + '<div class="splitscreen-load-mask" style="background:' + settings.imageLoadingBG + ' url(' + settings.imageDir + settings.imageLoading + ') center center no-repeat;"></div>' + '<div class="splitscreen">' + '<!--[ SPLIT SCREEN ]-->' + '<div class="splitscreen-main splitscreen-erase">' + '<div class="splitscreen-activate splitscreen-erase"></div>' + '<div class="splitscreen-activate-2 splitscreen-erase"></div>' + '<div class="splitscreen-fade-left splitscreen-erase splitscreen-sector" style="background:transparent url(' + settings.imageDir + settings.imageFadeLeft + ') 0 0 repeat-y; background-size: 50%; ' + showOption(settings.showFade) + '"></div>' + '<div class="splitscreen-fade-right splitscreen-erase splitscreen-sector" style="background:transparent url(' + settings.imageDir + settings.imageFadeRight + ') 100% 0 repeat-y; background-size: 50%; ' + showOption(settings.showFade) + '"></div>' + '<div class="splitscreen-left splitscreen-erase splitscreen-sector">' + '<div class="splitscreen-bg-left">' + '<img src="' + settings.imageDir + settings.imageBG + '" width="' + settings.imageWidthBG + '" height="' + settings.imageHeightBG + '" class="splitscreen-fullscreen" />' + '<div class="splitscreen-raster-left main-raster" style="background:transparent url(' + settings.imageDir + settings.imageRaster + ') 0 0; ' + showOption(settings.showRaster) + ' filter:alpha(opacity=' + settings.alphaRaster + '); -moz-opacity:0.' + settings.alphaRaster + '; opacity:0.' + settings.alphaRaster + '; filter:progid:DXImageTransform.Microsoft.Alpha(opacity=' + settings.alphaRaster + ');"></div>' + '</div>' + '<div class="splitscreen-logo-left splitscreen-logo" style="background:transparent url(' + settings.imageDir + settings.imageCenter + ') center top no-repeat; ' + showOption(settings.showCenterTop) + '"></div>' + '<div class="splitscreen-logo-left splitscreen-logo" style="background:transparent url(' + settings.imageDir + settings.imageCenter + ') center center no-repeat; ' + showOption(settings.showCenter) + '"></div>' + '<div class="splitscreen-logo-left splitscreen-logo" style="background:transparent url(' + settings.imageDir + settings.imageCenter + ') center bottom no-repeat; ' + showOption(settings.showCenterBottom) + '"></div>' + '<div class="splitscreen-logo" style="background:transparent url(' + settings.imageDir + settings.imageFloating + ') left top no-repeat; ' + showOption(settings.showFloatLeftTop) + '"></div>' + '<div class="splitscreen-logo" style="background:transparent url(' + settings.imageDir + settings.imageFloating + ') left center no-repeat; ' + showOption(settings.showFloatLeftCenter) + '"></div>' + '<div class="splitscreen-logo" style="background:transparent url(' + settings.imageDir + settings.imageFloating + ') left bottom no-repeat; ' + showOption(settings.showFloatLeftBottom) + '"></div>' + '</div>' + '<div class="splitscreen-right splitscreen-erase splitscreen-sector">' + '<div class="splitscreen-bg-right">' + '<img src="' + settings.imageDir + settings.imageBG + '" width="' + settings.imageWidthBG + '" height="' + settings.imageHeightBG + '" class="splitscreen-fullscreen" />' + '<div class="splitscreen-raster-right main-raster" style="background:transparent url(' + settings.imageDir + settings.imageRaster + ') 0 0; ' + showOption(settings.showRaster) + ' filter:alpha(opacity=' + settings.alphaRaster + '); -moz-opacity:0.' + settings.alphaRaster + '; opacity:0.' + settings.alphaRaster + '; filter:progid:DXImageTransform.Microsoft.Alpha(opacity=' + settings.alphaRaster + ');"></div>' + '</div>' + '<div class="splitscreen-logo-right splitscreen-logo" style="background:transparent url(' + settings.imageDir + settings.imageCenter + ') center top no-repeat; ' + showOption(settings.showCenterTop) + '"></div>' + '<div class="splitscreen-logo-right splitscreen-logo" style="background:transparent url(' + settings.imageDir + settings.imageCenter + ') center center no-repeat; ' + showOption(settings.showCenter) + '"></div>' + '<div class="splitscreen-logo-right splitscreen-logo" style="background:transparent url(' + settings.imageDir + settings.imageCenter + ') center bottom no-repeat; ' + showOption(settings.showCenterBottom) + '"></div>' + '<div class="splitscreen-logo" style="background:transparent url(' + settings.imageDir + settings.imageFloating + ') right top no-repeat; ' + showOption(settings.showFloatRightTop) + '"></div>' + '<div class="splitscreen-logo" style="background:transparent url(' + settings.imageDir + settings.imageFloating + ') right center no-repeat; ' + showOption(settings.showFloatRightCenter) + '"></div>' + '<div class="splitscreen-logo" style="background:transparent url(' + settings.imageDir + settings.imageFloating + ') right bottom no-repeat; ' + showOption(settings.showFloatRightBottom) + '"></div>' + '</div>' + '<div class="splitscreen-shadow-left splitscreen-erase">' + '<div class="splitscreen-shadow splitscreen-erase"></div>' + '</div>' + '<div class="splitscreen-shadow-right splitscreen-erase">' + '<div class="splitscreen-shadow splitscreen-erase"></div>' + '</div>' + '<!--[ UNDERLAY ]-->' + '<div class="splitscreen-underlay splitscreen-erase-fade" style="background:' + settings.colorUnderlay + '; filter:alpha(opacity=' + settings.alphaUnderlay + '); -moz-opacity:0.' + settings.alphaUnderlay + '; opacity:0.' + settings.alphaUnderlay + '; filter:progid:DXImageTransform.Microsoft.Alpha(opacity=' + settings.alphaUnderlay + '); ' + showOption(settings.showUnderlay) + ';"></div>' + '<div class="splitscreen-teaser">' + '<table class="splitscreen-teaser-holder" cellpadding="0" cellspacing="0"><tbody><td class="splitscreen-teaser-body" valign="' + settings.verticalAlignTeaser + '"></td></tbody></table>' + '</div>' + '</div>' + '</div>' + '<!--[ STOP SPLITSCREEN ]-->'; }
                $(this).prepend(splitscreenHtml); $("body").addClass("splitscreen_body"); $('div.splitscreen-teaser td.splitscreen-teaser-body').append($('div.splitscreen-teaser-html')); function FullScreenBackground(theItem) {
                    var winWidth = $(window).width(); var winHeight = $(window).height(); var imageWidth = $(theItem).width(); var imageHeight = $(theItem).height(); var picHeight = imageHeight / imageWidth; var picWidth = imageWidth / imageHeight; if ((winHeight / winWidth) < picHeight) { $(theItem).css("width", winWidth); $(theItem).css("height", picHeight * winWidth); } else { $(theItem).css("height", winHeight); $(theItem).css("width", picWidth * winHeight); }
                    $(theItem).css("margin-left", winWidth / $(theItem).width() / 2); $(theItem).css("margin-top", winHeight / $(theItem).height() / 2);
                }
                window.onload = function () { FullScreenBackground('.splitscreen-fullscreen'); $(".splitscreen-load-mask").css({ 'display': 'none' }); }; $(window).resize(function () { FullScreenBackground('.splitscreen-fullscreen'); }); function update() { if (alreadyopen === false) { $(".splitscreen-left, .splitscreen-shadow-left").animate({ left: "-15%" }, { duration: 1500, easing: 'jswing' }); $(".splitscreen-right, .splitscreen-shadow-right").animate({ left: "65%" }, { duration: 1500, easing: 'jswing' }); $(".splitscreen-left, .splitscreen-shadow-left").animate({ left: "0%" }, { duration: 1000, easing: 'jswing' }); $(".splitscreen-right, .splitscreen-shadow-right").animate({ left: "50%" }, { duration: 1000, easing: 'jswing' }); } }
                if (settings.showIntroSplit === true) { setTimeout(update, settings.splitTimeIntro); }
                if (settings.showAutoSplit === true) { var autoplay = setInterval(update, settings.splitTimeAuto); }
                if (DetectTierIphone() || DetectTierTablet()) {
                    if (settings.splitMode == 'splash') { $('.splitscreen-activate').mousedown(function () { $('.splitscreen-left, .splitscreen-shadow-left').queue('fx', []); $('.splitscreen-right, .splitscreen-shadow-right').queue('fx', []); $(".splitscreen-left, .splitscreen-shadow-left").animate({ left: "-10%" }, { duration: 1000, easing: 'jswing' }); $(".splitscreen-right, .splitscreen-shadow-right").animate({ left: "60%" }, { duration: 1000, easing: 'jswing' }); alreadyopen = true; }); $('.splitscreen-sector').mousedown(function () { $(".splitscreen-left, .splitscreen-shadow-left").animate({ left: "0%" }, { duration: 1000, easing: 'jswing' }); $(".splitscreen-right, .splitscreen-shadow-right").animate({ left: "50%" }, { duration: 1000, easing: 'jswing' }); alreadyopen = false; }); }
                    if (settings.splitMode == 'promo' || settings.splitMode == 'teaser') { $('.splitscreen-activate').mousedown(function () { $('.splitscreen-left, .splitscreen-shadow-left').queue('fx', []); $('.splitscreen-right, .splitscreen-shadow-right').queue('fx', []); $(".splitscreen-left, .splitscreen-shadow-left").animate({ left: "-10%" }, { duration: 1000, easing: 'jswing' }); $(".splitscreen-right, .splitscreen-shadow-right").animate({ left: "60%" }, { duration: 1000, easing: 'jswing' }); $(".splitscreen-activate").animate({ width: "2px" }, { duration: 1000, easing: 'jswing' }); $(".splitscreen-activate-2").animate({ width: "2px", left: "69.9%" }, { duration: 1000, easing: 'jswing' }); alreadyopen = true; }); $('.splitscreen-underlay').mousedown(function () { $(".splitscreen-left, .splitscreen-shadow-left").animate({ left: "-10%" }, { duration: 1000, easing: 'jswing' }); $(".splitscreen-right, .splitscreen-shadow-right").animate({ left: "60%" }, { duration: 1000, easing: 'jswing' }); alreadyopen = true; }); $('.splitscreen-teaser').mousedown(function () { $(".splitscreen-left, .splitscreen-shadow-left").animate({ left: "-10%" }, { duration: 1000, easing: 'jswing' }); $(".splitscreen-right, .splitscreen-shadow-right").animate({ left: "60%" }, { duration: 1000, easing: 'jswing' }); alreadyopen = true; }); $('.splitscreen-sector').mousedown(function () { $('.splitscreen-left, .splitscreen-shadow-left').queue('fx', []); $('.splitscreen-right, .splitscreen-shadow-right').queue('fx', []); $('.splitscreen-activate').queue('fx', []); $(".splitscreen-left, .splitscreen-shadow-left").animate({ left: "0%" }, { duration: 1000, easing: 'jswing' }); $(".splitscreen-right, .splitscreen-shadow-right").animate({ left: "50%" }, { duration: 1000, easing: 'jswing' }); $(".splitscreen-activate").animate({ width: "20%" }, { duration: 1000, easing: 'jswing' }); $(".splitscreen-activate-2").animate({ width: "20%", left: "50%" }, { duration: 1000, easing: 'jswing' }); alreadyopen = false; }); } 
                } else {
                    if (settings.splitMode == 'splash') { $('.splitscreen-activate').mouseenter(function () { $('.splitscreen-left, .splitscreen-shadow-left').queue('fx', []); $('.splitscreen-right, .splitscreen-shadow-right').queue('fx', []); $(".splitscreen-left, .splitscreen-shadow-left").animate({ left: "-10%" }, { duration: 1000, easing: 'jswing' }); $(".splitscreen-right, .splitscreen-shadow-right").animate({ left: "60%" }, { duration: 1000, easing: 'jswing' }); alreadyopen = true; }); $('.splitscreen-sector').mouseenter(function () { $(".splitscreen-left, .splitscreen-shadow-left").animate({ left: "0%" }, { duration: 1000, easing: 'jswing' }); $(".splitscreen-right, .splitscreen-shadow-right").animate({ left: "50%" }, { duration: 1000, easing: 'jswing' }); alreadyopen = false; }); }
                    if (settings.splitMode == 'promo' || settings.splitMode == 'teaser') { $('.splitscreen-activate').mouseenter(function () { $('.splitscreen-left, .splitscreen-shadow-left').queue('fx', []); $('.splitscreen-right, .splitscreen-shadow-right').queue('fx', []); $(".splitscreen-left, .splitscreen-shadow-left").animate({ left: "-10%" }, { duration: 1000, easing: 'jswing' }); $(".splitscreen-right, .splitscreen-shadow-right").animate({ left: "60%" }, { duration: 1000, easing: 'jswing' }); $(".splitscreen-activate").animate({ width: "2px" }, { duration: 1000, easing: 'jswing' }); $(".splitscreen-activate-2").animate({ width: "2px", left: "69.9%" }, { duration: 1000, easing: 'jswing' }); alreadyopen = true; }); $('.splitscreen-underlay').mouseenter(function () { $(".splitscreen-left, .splitscreen-shadow-left").animate({ left: "-10%" }, { duration: 1000, easing: 'jswing' }); $(".splitscreen-right, .splitscreen-shadow-right").animate({ left: "60%" }, { duration: 1000, easing: 'jswing' }); alreadyopen = true; }); $('.splitscreen-teaser').mouseenter(function () { $(".splitscreen-left, .splitscreen-shadow-left").animate({ left: "-10%" }, { duration: 1000, easing: 'jswing' }); $(".splitscreen-right, .splitscreen-shadow-right").animate({ left: "60%" }, { duration: 1000, easing: 'jswing' }); alreadyopen = true; }); $('.splitscreen-sector').mouseenter(function () { $('.splitscreen-left, .splitscreen-shadow-left').queue('fx', []); $('.splitscreen-right, .splitscreen-shadow-right').queue('fx', []); $('.splitscreen-activate').queue('fx', []); $(".splitscreen-left, .splitscreen-shadow-left").animate({ left: "0%" }, { duration: 1000, easing: 'jswing' }); $(".splitscreen-right, .splitscreen-shadow-right").animate({ left: "50%" }, { duration: 1000, easing: 'jswing' }); $(".splitscreen-activate").animate({ width: "20%" }, { duration: 1000, easing: 'jswing' }); $(".splitscreen-activate-2").animate({ width: "20%", left: "50%" }, { duration: 1000, easing: 'jswing' }); alreadyopen = false; }); } 
                }
                $.closeSplitscreen = function () {
                    function slideOut() { $(".splitscreen-left, .splitscreen-shadow-left").animate({ left: "-150%" }, { duration: 850, easing: 'jswing' }); $(".splitscreen-right, .splitscreen-shadow-right").animate({ left: "200%" }, { duration: 850, easing: 'jswing' }); setTimeout(postFade, 1000); }
                    function postFade() { $(".splitscreen-erase").fadeOut({ duration: 1000 }); $(".splitscreen-erase-fade").fadeOut({ duration: 1000 }); $(".splitscreen").fadeOut({ duration: 2000 }); $('body').removeClass('splitscreen_body'); }
                    var closeSplitscreen = slideOut();
                }; $('.x-splitscreen').bind('click', function () { $.closeSplitscreen(); if (settings.autoSplit === true) { clearInterval(autoplay); } });
            });
        } else { } 
    };
})(jQuery); (function ($) { var ver = "2.99"; if ($.support == undefined) { $.support = { opacity: !($.browser.msie) }; } function debug(s) { $.fn.cycle.debug && log(s); } function log() { window.console && console.log && console.log("[cycle] " + Array.prototype.join.call(arguments, " ")); } $.expr[":"].paused = function (el) { return el.cyclePause; }; $.fn.cycle = function (options, arg2) { var o = { s: this.selector, c: this.context }; if (this.length === 0 && options != "stop") { if (!$.isReady && o.s) { log("DOM not ready, queuing slideshow"); $(function () { $(o.s, o.c).cycle(options, arg2); }); return this; } log("terminating; zero elements found by selector" + ($.isReady ? "" : " (DOM not ready)")); return this; } return this.each(function () { var opts = handleArguments(this, options, arg2); if (opts === false) { return; } opts.updateActivePagerLink = opts.updateActivePagerLink || $.fn.cycle.updateActivePagerLink; if (this.cycleTimeout) { clearTimeout(this.cycleTimeout); } this.cycleTimeout = this.cyclePause = 0; var $cont = $(this); var $slides = opts.slideExpr ? $(opts.slideExpr, this) : $cont.children(); var els = $slides.get(); if (els.length < 2) { log("terminating; too few slides: " + els.length); return; } var opts2 = buildOptions($cont, $slides, els, opts, o); if (opts2 === false) { return; } var startTime = opts2.continuous ? 10 : getTimeout(els[opts2.currSlide], els[opts2.nextSlide], opts2, !opts2.backwards); if (startTime) { startTime += (opts2.delay || 0); if (startTime < 10) { startTime = 10; } debug("first timeout: " + startTime); this.cycleTimeout = setTimeout(function () { go(els, opts2, 0, !opts.backwards); }, startTime); } }); }; function handleArguments(cont, options, arg2) { if (cont.cycleStop == undefined) { cont.cycleStop = 0; } if (options === undefined || options === null) { options = {}; } if (options.constructor == String) { switch (options) { case "destroy": case "stop": var opts = $(cont).data("cycle.opts"); if (!opts) { return false; } cont.cycleStop++; if (cont.cycleTimeout) { clearTimeout(cont.cycleTimeout); } cont.cycleTimeout = 0; $(cont).removeData("cycle.opts"); if (options == "destroy") { destroy(opts); } return false; case "toggle": cont.cyclePause = (cont.cyclePause === 1) ? 0 : 1; checkInstantResume(cont.cyclePause, arg2, cont); return false; case "pause": cont.cyclePause = 1; return false; case "resume": cont.cyclePause = 0; checkInstantResume(false, arg2, cont); return false; case "prev": case "next": var opts = $(cont).data("cycle.opts"); if (!opts) { log('options not found, "prev/next" ignored'); return false; } $.fn.cycle[options](opts); return false; default: options = { fx: options }; } return options; } else { if (options.constructor == Number) { var num = options; options = $(cont).data("cycle.opts"); if (!options) { log("options not found, can not advance slide"); return false; } if (num < 0 || num >= options.elements.length) { log("invalid slide index: " + num); return false; } options.nextSlide = num; if (cont.cycleTimeout) { clearTimeout(cont.cycleTimeout); cont.cycleTimeout = 0; } if (typeof arg2 == "string") { options.oneTimeFx = arg2; } go(options.elements, options, 1, num >= options.currSlide); return false; } } return options; function checkInstantResume(isPaused, arg2, cont) { if (!isPaused && arg2 === true) { var options = $(cont).data("cycle.opts"); if (!options) { log("options not found, can not resume"); return false; } if (cont.cycleTimeout) { clearTimeout(cont.cycleTimeout); cont.cycleTimeout = 0; } go(options.elements, options, 1, !options.backwards); } } } function removeFilter(el, opts) { if (!$.support.opacity && opts.cleartype && el.style.filter) { try { el.style.removeAttribute("filter"); } catch (smother) { } } } function destroy(opts) { if (opts.next) { $(opts.next).unbind(opts.prevNextEvent); } if (opts.prev) { $(opts.prev).unbind(opts.prevNextEvent); } if (opts.pager || opts.pagerAnchorBuilder) { $.each(opts.pagerAnchors || [], function () { this.unbind().remove(); }); } opts.pagerAnchors = null; if (opts.destroy) { opts.destroy(opts); } } function buildOptions($cont, $slides, els, options, o) { var opts = $.extend({}, $.fn.cycle.defaults, options || {}, $.metadata ? $cont.metadata() : $.meta ? $cont.data() : {}); if (opts.autostop) { opts.countdown = opts.autostopCount || els.length; } var cont = $cont[0]; $cont.data("cycle.opts", opts); opts.$cont = $cont; opts.stopCount = cont.cycleStop; opts.elements = els; opts.before = opts.before ? [opts.before] : []; opts.after = opts.after ? [opts.after] : []; if (!$.support.opacity && opts.cleartype) { opts.after.push(function () { removeFilter(this, opts); }); } if (opts.continuous) { opts.after.push(function () { go(els, opts, 0, !opts.backwards); }); } saveOriginalOpts(opts); if (!$.support.opacity && opts.cleartype && !opts.cleartypeNoBg) { clearTypeFix($slides); } if ($cont.css("position") == "static") { $cont.css("position", "relative"); } if (opts.width) { $cont.width(opts.width); } if (opts.height && opts.height != "auto") { $cont.height(opts.height); } if (opts.startingSlide) { opts.startingSlide = parseInt(opts.startingSlide); } else { if (opts.backwards) { opts.startingSlide = els.length - 1; } } if (opts.random) { opts.randomMap = []; for (var i = 0; i < els.length; i++) { opts.randomMap.push(i); } opts.randomMap.sort(function (a, b) { return Math.random() - 0.5; }); opts.randomIndex = 1; opts.startingSlide = opts.randomMap[1]; } else { if (opts.startingSlide >= els.length) { opts.startingSlide = 0; } } opts.currSlide = opts.startingSlide || 0; var first = opts.startingSlide; $slides.css({ position: "absolute", top: 0, left: 0 }).hide().each(function (i) { var z; if (opts.backwards) { z = first ? i <= first ? els.length + (i - first) : first - i : els.length - i; } else { z = first ? i >= first ? els.length - (i - first) : first - i : els.length - i; } $(this).css("z-index", z); }); $(els[first]).css("opacity", 1).show(); removeFilter(els[first], opts); if (opts.fit && opts.width) { $slides.width(opts.width); } if (opts.fit && opts.height && opts.height != "auto") { $slides.height(opts.height); } var reshape = opts.containerResize && !$cont.innerHeight(); if (reshape) { var maxw = 0, maxh = 0; for (var j = 0; j < els.length; j++) { var $e = $(els[j]), e = $e[0], w = $e.outerWidth(), h = $e.outerHeight(); if (!w) { w = e.offsetWidth || e.width || $e.attr("width"); } if (!h) { h = e.offsetHeight || e.height || $e.attr("height"); } maxw = w > maxw ? w : maxw; maxh = h > maxh ? h : maxh; } if (maxw > 0 && maxh > 0) { $cont.css({ width: maxw + "px", height: maxh + "px" }); } } if (opts.pause) { $cont.hover(function () { this.cyclePause++; }, function () { this.cyclePause--; }); } if (supportMultiTransitions(opts) === false) { return false; } var requeue = false; options.requeueAttempts = options.requeueAttempts || 0; $slides.each(function () { var $el = $(this); this.cycleH = (opts.fit && opts.height) ? opts.height : ($el.height() || this.offsetHeight || this.height || $el.attr("height") || 0); this.cycleW = (opts.fit && opts.width) ? opts.width : ($el.width() || this.offsetWidth || this.width || $el.attr("width") || 0); if ($el.is("img")) { var loadingIE = ($.browser.msie && this.cycleW == 28 && this.cycleH == 30 && !this.complete); var loadingFF = ($.browser.mozilla && this.cycleW == 34 && this.cycleH == 19 && !this.complete); var loadingOp = ($.browser.opera && ((this.cycleW == 42 && this.cycleH == 19) || (this.cycleW == 37 && this.cycleH == 17)) && !this.complete); var loadingOther = (this.cycleH == 0 && this.cycleW == 0 && !this.complete); if (loadingIE || loadingFF || loadingOp || loadingOther) { if (o.s && opts.requeueOnImageNotLoaded && ++options.requeueAttempts < 100) { log(options.requeueAttempts, " - img slide not loaded, requeuing slideshow: ", this.src, this.cycleW, this.cycleH); setTimeout(function () { $(o.s, o.c).cycle(options); }, opts.requeueTimeout); requeue = true; return false; } else { log("could not determine size of image: " + this.src, this.cycleW, this.cycleH); } } } return true; }); if (requeue) { return false; } opts.cssBefore = opts.cssBefore || {}; opts.cssAfter = opts.cssAfter || {}; opts.cssFirst = opts.cssFirst || {}; opts.animIn = opts.animIn || {}; opts.animOut = opts.animOut || {}; $slides.not(":eq(" + first + ")").css(opts.cssBefore); $($slides[first]).css(opts.cssFirst); if (opts.timeout) { opts.timeout = parseInt(opts.timeout); if (opts.speed.constructor == String) { opts.speed = $.fx.speeds[opts.speed] || parseInt(opts.speed); } if (!opts.sync) { opts.speed = opts.speed / 2; } var buffer = opts.fx == "none" ? 0 : opts.fx == "shuffle" ? 500 : 250; while ((opts.timeout - opts.speed) < buffer) { opts.timeout += opts.speed; } } if (opts.easing) { opts.easeIn = opts.easeOut = opts.easing; } if (!opts.speedIn) { opts.speedIn = opts.speed; } if (!opts.speedOut) { opts.speedOut = opts.speed; } opts.slideCount = els.length; opts.currSlide = opts.lastSlide = first; if (opts.random) { if (++opts.randomIndex == els.length) { opts.randomIndex = 0; } opts.nextSlide = opts.randomMap[opts.randomIndex]; } else { if (opts.backwards) { opts.nextSlide = opts.startingSlide == 0 ? (els.length - 1) : opts.startingSlide - 1; } else { opts.nextSlide = opts.startingSlide >= (els.length - 1) ? 0 : opts.startingSlide + 1; } } if (!opts.multiFx) { var init = $.fn.cycle.transitions[opts.fx]; if ($.isFunction(init)) { init($cont, $slides, opts); } else { if (opts.fx != "custom" && !opts.multiFx) { log("unknown transition: " + opts.fx, "; slideshow terminating"); return false; } } } var e0 = $slides[first]; if (opts.before.length) { opts.before[0].apply(e0, [e0, e0, opts, true]); } if (opts.after.length) { opts.after[0].apply(e0, [e0, e0, opts, true]); } if (opts.next) { $(opts.next).bind(opts.prevNextEvent, function () { return advance(opts, 1); }); } if (opts.prev) { $(opts.prev).bind(opts.prevNextEvent, function () { return advance(opts, 0); }); } if (opts.pager || opts.pagerAnchorBuilder) { buildPager(els, opts); } exposeAddSlide(opts, els); return opts; } function saveOriginalOpts(opts) { opts.original = { before: [], after: [] }; opts.original.cssBefore = $.extend({}, opts.cssBefore); opts.original.cssAfter = $.extend({}, opts.cssAfter); opts.original.animIn = $.extend({}, opts.animIn); opts.original.animOut = $.extend({}, opts.animOut); $.each(opts.before, function () { opts.original.before.push(this); }); $.each(opts.after, function () { opts.original.after.push(this); }); } function supportMultiTransitions(opts) { var i, tx, txs = $.fn.cycle.transitions; if (opts.fx.indexOf(",") > 0) { opts.multiFx = true; opts.fxs = opts.fx.replace(/\s*/g, "").split(","); for (i = 0; i < opts.fxs.length; i++) { var fx = opts.fxs[i]; tx = txs[fx]; if (!tx || !txs.hasOwnProperty(fx) || !$.isFunction(tx)) { log("discarding unknown transition: ", fx); opts.fxs.splice(i, 1); i--; } } if (!opts.fxs.length) { log("No valid transitions named; slideshow terminating."); return false; } } else { if (opts.fx == "all") { opts.multiFx = true; opts.fxs = []; for (p in txs) { tx = txs[p]; if (txs.hasOwnProperty(p) && $.isFunction(tx)) { opts.fxs.push(p); } } } } if (opts.multiFx && opts.randomizeEffects) { var r1 = Math.floor(Math.random() * 20) + 30; for (i = 0; i < r1; i++) { var r2 = Math.floor(Math.random() * opts.fxs.length); opts.fxs.push(opts.fxs.splice(r2, 1)[0]); } debug("randomized fx sequence: ", opts.fxs); } return true; } function exposeAddSlide(opts, els) { opts.addSlide = function (newSlide, prepend) { var $s = $(newSlide), s = $s[0]; if (!opts.autostopCount) { opts.countdown++; } els[prepend ? "unshift" : "push"](s); if (opts.els) { opts.els[prepend ? "unshift" : "push"](s); } opts.slideCount = els.length; $s.css("position", "absolute"); $s[prepend ? "prependTo" : "appendTo"](opts.$cont); if (prepend) { opts.currSlide++; opts.nextSlide++; } if (!$.support.opacity && opts.cleartype && !opts.cleartypeNoBg) { clearTypeFix($s); } if (opts.fit && opts.width) { $s.width(opts.width); } if (opts.fit && opts.height && opts.height != "auto") { $s.height(opts.height); } s.cycleH = (opts.fit && opts.height) ? opts.height : $s.height(); s.cycleW = (opts.fit && opts.width) ? opts.width : $s.width(); $s.css(opts.cssBefore); if (opts.pager || opts.pagerAnchorBuilder) { $.fn.cycle.createPagerAnchor(els.length - 1, s, $(opts.pager), els, opts); } if ($.isFunction(opts.onAddSlide)) { opts.onAddSlide($s); } else { $s.hide(); } }; } $.fn.cycle.resetState = function (opts, fx) { fx = fx || opts.fx; opts.before = []; opts.after = []; opts.cssBefore = $.extend({}, opts.original.cssBefore); opts.cssAfter = $.extend({}, opts.original.cssAfter); opts.animIn = $.extend({}, opts.original.animIn); opts.animOut = $.extend({}, opts.original.animOut); opts.fxFn = null; $.each(opts.original.before, function () { opts.before.push(this); }); $.each(opts.original.after, function () { opts.after.push(this); }); var init = $.fn.cycle.transitions[fx]; if ($.isFunction(init)) { init(opts.$cont, $(opts.elements), opts); } }; function go(els, opts, manual, fwd) { if (manual && opts.busy && opts.manualTrump) { debug("manualTrump in go(), stopping active transition"); $(els).stop(true, true); opts.busy = 0; } if (opts.busy) { debug("transition active, ignoring new tx request"); return; } var p = opts.$cont[0], curr = els[opts.currSlide], next = els[opts.nextSlide]; if (p.cycleStop != opts.stopCount || p.cycleTimeout === 0 && !manual) { return; } if (!manual && !p.cyclePause && !opts.bounce && ((opts.autostop && (--opts.countdown <= 0)) || (opts.nowrap && !opts.random && opts.nextSlide < opts.currSlide))) { if (opts.end) { opts.end(opts); } return; } var changed = false; if ((manual || !p.cyclePause) && (opts.nextSlide != opts.currSlide)) { changed = true; var fx = opts.fx; curr.cycleH = curr.cycleH || $(curr).height(); curr.cycleW = curr.cycleW || $(curr).width(); next.cycleH = next.cycleH || $(next).height(); next.cycleW = next.cycleW || $(next).width(); if (opts.multiFx) { if (opts.lastFx == undefined || ++opts.lastFx >= opts.fxs.length) { opts.lastFx = 0; } fx = opts.fxs[opts.lastFx]; opts.currFx = fx; } if (opts.oneTimeFx) { fx = opts.oneTimeFx; opts.oneTimeFx = null; } $.fn.cycle.resetState(opts, fx); if (opts.before.length) { $.each(opts.before, function (i, o) { if (p.cycleStop != opts.stopCount) { return; } o.apply(next, [curr, next, opts, fwd]); }); } var after = function () { opts.busy = 0; $.each(opts.after, function (i, o) { if (p.cycleStop != opts.stopCount) { return; } o.apply(next, [curr, next, opts, fwd]); }); }; debug("tx firing(" + fx + "); currSlide: " + opts.currSlide + "; nextSlide: " + opts.nextSlide); opts.busy = 1; if (opts.fxFn) { opts.fxFn(curr, next, opts, after, fwd, manual && opts.fastOnEvent); } else { if ($.isFunction($.fn.cycle[opts.fx])) { $.fn.cycle[opts.fx](curr, next, opts, after, fwd, manual && opts.fastOnEvent); } else { $.fn.cycle.custom(curr, next, opts, after, fwd, manual && opts.fastOnEvent); } } } if (changed || opts.nextSlide == opts.currSlide) { opts.lastSlide = opts.currSlide; if (opts.random) { opts.currSlide = opts.nextSlide; if (++opts.randomIndex == els.length) { opts.randomIndex = 0; } opts.nextSlide = opts.randomMap[opts.randomIndex]; if (opts.nextSlide == opts.currSlide) { opts.nextSlide = (opts.currSlide == opts.slideCount - 1) ? 0 : opts.currSlide + 1; } } else { if (opts.backwards) { var roll = (opts.nextSlide - 1) < 0; if (roll && opts.bounce) { opts.backwards = !opts.backwards; opts.nextSlide = 1; opts.currSlide = 0; } else { opts.nextSlide = roll ? (els.length - 1) : opts.nextSlide - 1; opts.currSlide = roll ? 0 : opts.nextSlide + 1; } } else { var roll = (opts.nextSlide + 1) == els.length; if (roll && opts.bounce) { opts.backwards = !opts.backwards; opts.nextSlide = els.length - 2; opts.currSlide = els.length - 1; } else { opts.nextSlide = roll ? 0 : opts.nextSlide + 1; opts.currSlide = roll ? els.length - 1 : opts.nextSlide - 1; } } } } if (changed && opts.pager) { opts.updateActivePagerLink(opts.pager, opts.currSlide, opts.activePagerClass); } var ms = 0; if (opts.timeout && !opts.continuous) { ms = getTimeout(els[opts.currSlide], els[opts.nextSlide], opts, fwd); } else { if (opts.continuous && p.cyclePause) { ms = 10; } } if (ms > 0) { p.cycleTimeout = setTimeout(function () { go(els, opts, 0, !opts.backwards); }, ms); } } $.fn.cycle.updateActivePagerLink = function (pager, currSlide, clsName) { $(pager).each(function () { $(this).children().removeClass(clsName).eq(currSlide).addClass(clsName); }); }; function getTimeout(curr, next, opts, fwd) { if (opts.timeoutFn) { var t = opts.timeoutFn.call(curr, curr, next, opts, fwd); while (opts.fx != "none" && (t - opts.speed) < 250) { t += opts.speed; } debug("calculated timeout: " + t + "; speed: " + opts.speed); if (t !== false) { return t; } } return opts.timeout; } $.fn.cycle.next = function (opts) { advance(opts, 1); }; $.fn.cycle.prev = function (opts) { advance(opts, 0); }; function advance(opts, moveForward) { var val = moveForward ? 1 : -1; var els = opts.elements; var p = opts.$cont[0], timeout = p.cycleTimeout; if (timeout) { clearTimeout(timeout); p.cycleTimeout = 0; } if (opts.random && val < 0) { opts.randomIndex--; if (--opts.randomIndex == -2) { opts.randomIndex = els.length - 2; } else { if (opts.randomIndex == -1) { opts.randomIndex = els.length - 1; } } opts.nextSlide = opts.randomMap[opts.randomIndex]; } else { if (opts.random) { opts.nextSlide = opts.randomMap[opts.randomIndex]; } else { opts.nextSlide = opts.currSlide + val; if (opts.nextSlide < 0) { if (opts.nowrap) { return false; } opts.nextSlide = els.length - 1; } else { if (opts.nextSlide >= els.length) { if (opts.nowrap) { return false; } opts.nextSlide = 0; } } } } var cb = opts.onPrevNextEvent || opts.prevNextClick; if ($.isFunction(cb)) { cb(val > 0, opts.nextSlide, els[opts.nextSlide]); } go(els, opts, 1, moveForward); return false; } function buildPager(els, opts) { var $p = $(opts.pager); $.each(els, function (i, o) { $.fn.cycle.createPagerAnchor(i, o, $p, els, opts); }); opts.updateActivePagerLink(opts.pager, opts.startingSlide, opts.activePagerClass); } $.fn.cycle.createPagerAnchor = function (i, el, $p, els, opts) { var a; if ($.isFunction(opts.pagerAnchorBuilder)) { a = opts.pagerAnchorBuilder(i, el); debug("pagerAnchorBuilder(" + i + ", el) returned: " + a); } else { a = '<a href="#">' + (i + 1) + "</a>"; } if (!a) { return; } var $a = $(a); if ($a.parents("body").length === 0) { var arr = []; if ($p.length > 1) { $p.each(function () { var $clone = $a.clone(true); $(this).append($clone); arr.push($clone[0]); }); $a = $(arr); } else { $a.appendTo($p); } } opts.pagerAnchors = opts.pagerAnchors || []; opts.pagerAnchors.push($a); $a.bind(opts.pagerEvent, function (e) { e.preventDefault(); opts.nextSlide = i; var p = opts.$cont[0], timeout = p.cycleTimeout; if (timeout) { clearTimeout(timeout); p.cycleTimeout = 0; } var cb = opts.onPagerEvent || opts.pagerClick; if ($.isFunction(cb)) { cb(opts.nextSlide, els[opts.nextSlide]); } go(els, opts, 1, opts.currSlide < i); }); if (!/^click/.test(opts.pagerEvent) && !opts.allowPagerClickBubble) { $a.bind("click.cycle", function () { return false; }); } if (opts.pauseOnPagerHover) { $a.hover(function () { opts.$cont[0].cyclePause++; }, function () { opts.$cont[0].cyclePause--; }); } }; $.fn.cycle.hopsFromLast = function (opts, fwd) { var hops, l = opts.lastSlide, c = opts.currSlide; if (fwd) { hops = c > l ? c - l : opts.slideCount - l; } else { hops = c < l ? l - c : l + opts.slideCount - c; } return hops; }; function clearTypeFix($slides) { debug("applying clearType background-color hack"); function hex(s) { s = parseInt(s).toString(16); return s.length < 2 ? "0" + s : s; } function getBg(e) { for (; e && e.nodeName.toLowerCase() != "html"; e = e.parentNode) { var v = $.css(e, "background-color"); if (v && v.indexOf("rgb") >= 0) { var rgb = v.match(/\d+/g); return "#" + hex(rgb[0]) + hex(rgb[1]) + hex(rgb[2]); } if (v && v != "transparent") { return v; } } return "#ffffff"; } $slides.each(function () { if ($.browser.msie) { $(this).css("background-color", "transparent") } else { $(this).css("background-color", getBg(this)) }; }); } $.fn.cycle.commonReset = function (curr, next, opts, w, h, rev) { $(opts.elements).not(curr).hide(); if (typeof opts.cssBefore.opacity == "undefined") { opts.cssBefore.opacity = 1; } opts.cssBefore.display = "block"; if (opts.slideResize && w !== false && next.cycleW > 0) { opts.cssBefore.width = next.cycleW; } if (opts.slideResize && h !== false && next.cycleH > 0) { opts.cssBefore.height = next.cycleH; } opts.cssAfter = opts.cssAfter || {}; opts.cssAfter.display = "none"; $(curr).css("zIndex", opts.slideCount + (rev === true ? 1 : 0)); $(next).css("zIndex", opts.slideCount + (rev === true ? 0 : 1)); }; $.fn.cycle.custom = function (curr, next, opts, cb, fwd, speedOverride) { var $l = $(curr), $n = $(next); var speedIn = opts.speedIn, speedOut = opts.speedOut, easeIn = opts.easeIn, easeOut = opts.easeOut; $n.css(opts.cssBefore); if (speedOverride) { if (typeof speedOverride == "number") { speedIn = speedOut = speedOverride; } else { speedIn = speedOut = 1; } easeIn = easeOut = null; } var fn = function () { $n.animate(opts.animIn, speedIn, easeIn, function () { cb(); }); }; $l.animate(opts.animOut, speedOut, easeOut, function () { $l.css(opts.cssAfter); if (!opts.sync) { fn(); } }); if (opts.sync) { fn(); } }; $.fn.cycle.transitions = { fade: function ($cont, $slides, opts) { $slides.not(":eq(" + opts.currSlide + ")").css("opacity", 0); opts.before.push(function (curr, next, opts) { $.fn.cycle.commonReset(curr, next, opts); opts.cssBefore.opacity = 0; }); opts.animIn = { opacity: 1 }; opts.animOut = { opacity: 0 }; opts.cssBefore = { top: 0, left: 0 }; } }; $.fn.cycle.ver = function () { return ver; }; $.fn.cycle.defaults = { activePagerClass: "activeSlide", after: null, allowPagerClickBubble: false, animIn: null, animOut: null, autostop: 0, autostopCount: 0, backwards: false, before: null, cleartype: !$.support.opacity, cleartypeNoBg: false, containerResize: 1, continuous: 0, cssAfter: null, cssBefore: null, delay: 0, easeIn: null, easeOut: null, easing: null, end: null, fastOnEvent: 0, fit: 0, fx: "fade", fxFn: null, height: "auto", manualTrump: true, next: null, nowrap: 0, onPagerEvent: null, onPrevNextEvent: null, pager: null, pagerAnchorBuilder: null, pagerEvent: "click.cycle", pause: 0, pauseOnPagerHover: 0, prev: null, prevNextEvent: "click.cycle", random: 0, randomizeEffects: 1, requeueOnImageNotLoaded: true, requeueTimeout: 250, rev: 0, shuffle: null, slideExpr: null, slideResize: 1, speed: 1000, speedIn: null, speedOut: null, startingSlide: 0, sync: 1, timeout: 4000, timeoutFn: null, updateActivePagerLink: null }; })(jQuery); (function ($) { $.fn.cycle.transitions.none = function ($cont, $slides, opts) { opts.fxFn = function (curr, next, opts, after) { $(next).show(); $(curr).hide(); after(); }; }; $.fn.cycle.transitions.fadeout = function ($cont, $slides, opts) { $slides.not(":eq(" + opts.currSlide + ")").css({ display: "block", opacity: 1 }); opts.before.push(function (curr, next, opts, w, h, rev) { $(curr).css("zIndex", opts.slideCount + (!rev === true ? 1 : 0)); $(next).css("zIndex", opts.slideCount + (!rev === true ? 0 : 1)); }); opts.animIn.opacity = 1; opts.animOut.opacity = 0; opts.cssBefore.opacity = 1; opts.cssBefore.display = "block"; opts.cssAfter.zIndex = 0; }; $.fn.cycle.transitions.scrollUp = function ($cont, $slides, opts) { $cont.css("overflow", "hidden"); opts.before.push($.fn.cycle.commonReset); var h = $cont.height(); opts.cssBefore.top = h; opts.cssBefore.left = 0; opts.cssFirst.top = 0; opts.animIn.top = 0; opts.animOut.top = -h; }; $.fn.cycle.transitions.scrollDown = function ($cont, $slides, opts) { $cont.css("overflow", "hidden"); opts.before.push($.fn.cycle.commonReset); var h = $cont.height(); opts.cssFirst.top = 0; opts.cssBefore.top = -h; opts.cssBefore.left = 0; opts.animIn.top = 0; opts.animOut.top = h; }; $.fn.cycle.transitions.scrollLeft = function ($cont, $slides, opts) { $cont.css("overflow", "hidden"); opts.before.push($.fn.cycle.commonReset); var w = $cont.width(); opts.cssFirst.left = 0; opts.cssBefore.left = w; opts.cssBefore.top = 0; opts.animIn.left = 0; opts.animOut.left = 0 - w; }; $.fn.cycle.transitions.scrollRight = function ($cont, $slides, opts) { $cont.css("overflow", "hidden"); opts.before.push($.fn.cycle.commonReset); var w = $cont.width(); opts.cssFirst.left = 0; opts.cssBefore.left = -w; opts.cssBefore.top = 0; opts.animIn.left = 0; opts.animOut.left = w; }; $.fn.cycle.transitions.scrollHorz = function ($cont, $slides, opts) { $cont.css("overflow", "hidden").width(); opts.before.push(function (curr, next, opts, fwd) { if (opts.rev) { fwd = !fwd; } $.fn.cycle.commonReset(curr, next, opts); opts.cssBefore.left = fwd ? (next.cycleW - 1) : (1 - next.cycleW); opts.animOut.left = fwd ? -curr.cycleW : curr.cycleW; }); opts.cssFirst.left = 0; opts.cssBefore.top = 0; opts.animIn.left = 0; opts.animOut.top = 0; }; $.fn.cycle.transitions.scrollVert = function ($cont, $slides, opts) { $cont.css("overflow", "hidden"); opts.before.push(function (curr, next, opts, fwd) { if (opts.rev) { fwd = !fwd; } $.fn.cycle.commonReset(curr, next, opts); opts.cssBefore.top = fwd ? (1 - next.cycleH) : (next.cycleH - 1); opts.animOut.top = fwd ? curr.cycleH : -curr.cycleH; }); opts.cssFirst.top = 0; opts.cssBefore.left = 0; opts.animIn.top = 0; opts.animOut.left = 0; }; $.fn.cycle.transitions.slideX = function ($cont, $slides, opts) { opts.before.push(function (curr, next, opts) { $(opts.elements).not(curr).hide(); $.fn.cycle.commonReset(curr, next, opts, false, true); opts.animIn.width = next.cycleW; }); opts.cssBefore.left = 0; opts.cssBefore.top = 0; opts.cssBefore.width = 0; opts.animIn.width = "show"; opts.animOut.width = 0; }; $.fn.cycle.transitions.slideY = function ($cont, $slides, opts) { opts.before.push(function (curr, next, opts) { $(opts.elements).not(curr).hide(); $.fn.cycle.commonReset(curr, next, opts, true, false); opts.animIn.height = next.cycleH; }); opts.cssBefore.left = 0; opts.cssBefore.top = 0; opts.cssBefore.height = 0; opts.animIn.height = "show"; opts.animOut.height = 0; }; $.fn.cycle.transitions.shuffle = function ($cont, $slides, opts) { var i, w = $cont.css("overflow", "visible").width(); $slides.css({ left: 0, top: 0 }); opts.before.push(function (curr, next, opts) { $.fn.cycle.commonReset(curr, next, opts, true, true, true); }); if (!opts.speedAdjusted) { opts.speed = opts.speed / 2; opts.speedAdjusted = true; } opts.random = 0; opts.shuffle = opts.shuffle || { left: -w, top: 15 }; opts.els = []; for (i = 0; i < $slides.length; i++) { opts.els.push($slides[i]); } for (i = 0; i < opts.currSlide; i++) { opts.els.push(opts.els.shift()); } opts.fxFn = function (curr, next, opts, cb, fwd) { if (opts.rev) { fwd = !fwd; } var $el = fwd ? $(curr) : $(next); $(next).css(opts.cssBefore); var count = opts.slideCount; $el.animate(opts.shuffle, opts.speedIn, opts.easeIn, function () { var hops = $.fn.cycle.hopsFromLast(opts, fwd); for (var k = 0; k < hops; k++) { fwd ? opts.els.push(opts.els.shift()) : opts.els.unshift(opts.els.pop()); } if (fwd) { for (var i = 0, len = opts.els.length; i < len; i++) { $(opts.els[i]).css("z-index", len - i + count); } } else { var z = $(curr).css("z-index"); $el.css("z-index", parseInt(z) + 1 + count); } $el.animate({ left: 0, top: 0 }, opts.speedOut, opts.easeOut, function () { $(fwd ? this : curr).hide(); if (cb) { cb(); } }); }); }; $.extend(opts.cssBefore, { display: "block", opacity: 1, top: 0, left: 0 }); }; $.fn.cycle.transitions.turnUp = function ($cont, $slides, opts) { opts.before.push(function (curr, next, opts) { $.fn.cycle.commonReset(curr, next, opts, true, false); opts.cssBefore.top = next.cycleH; opts.animIn.height = next.cycleH; opts.animOut.width = next.cycleW; }); opts.cssFirst.top = 0; opts.cssBefore.left = 0; opts.cssBefore.height = 0; opts.animIn.top = 0; opts.animOut.height = 0; }; $.fn.cycle.transitions.turnDown = function ($cont, $slides, opts) { opts.before.push(function (curr, next, opts) { $.fn.cycle.commonReset(curr, next, opts, true, false); opts.animIn.height = next.cycleH; opts.animOut.top = curr.cycleH; }); opts.cssFirst.top = 0; opts.cssBefore.left = 0; opts.cssBefore.top = 0; opts.cssBefore.height = 0; opts.animOut.height = 0; }; $.fn.cycle.transitions.turnLeft = function ($cont, $slides, opts) { opts.before.push(function (curr, next, opts) { $.fn.cycle.commonReset(curr, next, opts, false, true); opts.cssBefore.left = next.cycleW; opts.animIn.width = next.cycleW; }); opts.cssBefore.top = 0; opts.cssBefore.width = 0; opts.animIn.left = 0; opts.animOut.width = 0; }; $.fn.cycle.transitions.turnRight = function ($cont, $slides, opts) { opts.before.push(function (curr, next, opts) { $.fn.cycle.commonReset(curr, next, opts, false, true); opts.animIn.width = next.cycleW; opts.animOut.left = curr.cycleW; }); $.extend(opts.cssBefore, { top: 0, left: 0, width: 0 }); opts.animIn.left = 0; opts.animOut.width = 0; }; $.fn.cycle.transitions.zoom = function ($cont, $slides, opts) { opts.before.push(function (curr, next, opts) { $.fn.cycle.commonReset(curr, next, opts, false, false, true); opts.cssBefore.top = next.cycleH / 2; opts.cssBefore.left = next.cycleW / 2; $.extend(opts.animIn, { top: 0, left: 0, width: next.cycleW, height: next.cycleH }); $.extend(opts.animOut, { width: 0, height: 0, top: curr.cycleH / 2, left: curr.cycleW / 2 }); }); opts.cssFirst.top = 0; opts.cssFirst.left = 0; opts.cssBefore.width = 0; opts.cssBefore.height = 0; }; $.fn.cycle.transitions.fadeZoom = function ($cont, $slides, opts) { opts.before.push(function (curr, next, opts) { $.fn.cycle.commonReset(curr, next, opts, false, false); opts.cssBefore.left = next.cycleW / 2; opts.cssBefore.top = next.cycleH / 2; $.extend(opts.animIn, { top: 0, left: 0, width: next.cycleW, height: next.cycleH }); }); opts.cssBefore.width = 0; opts.cssBefore.height = 0; opts.animOut.opacity = 0; }; $.fn.cycle.transitions.blindX = function ($cont, $slides, opts) { var w = $cont.css("overflow", "hidden").width(); opts.before.push(function (curr, next, opts) { $.fn.cycle.commonReset(curr, next, opts); opts.animIn.width = next.cycleW; opts.animOut.left = curr.cycleW; }); opts.cssBefore.left = w; opts.cssBefore.top = 0; opts.animIn.left = 0; opts.animOut.left = w; }; $.fn.cycle.transitions.blindY = function ($cont, $slides, opts) { var h = $cont.css("overflow", "hidden").height(); opts.before.push(function (curr, next, opts) { $.fn.cycle.commonReset(curr, next, opts); opts.animIn.height = next.cycleH; opts.animOut.top = curr.cycleH; }); opts.cssBefore.top = h; opts.cssBefore.left = 0; opts.animIn.top = 0; opts.animOut.top = h; }; $.fn.cycle.transitions.blindZ = function ($cont, $slides, opts) { var h = $cont.css("overflow", "hidden").height(); var w = $cont.width(); opts.before.push(function (curr, next, opts) { $.fn.cycle.commonReset(curr, next, opts); opts.animIn.height = next.cycleH; opts.animOut.top = curr.cycleH; }); opts.cssBefore.top = h; opts.cssBefore.left = w; opts.animIn.top = 0; opts.animIn.left = 0; opts.animOut.top = h; opts.animOut.left = w; }; $.fn.cycle.transitions.growX = function ($cont, $slides, opts) { opts.before.push(function (curr, next, opts) { $.fn.cycle.commonReset(curr, next, opts, false, true); opts.cssBefore.left = this.cycleW / 2; opts.animIn.left = 0; opts.animIn.width = this.cycleW; opts.animOut.left = 0; }); opts.cssBefore.top = 0; opts.cssBefore.width = 0; }; $.fn.cycle.transitions.growY = function ($cont, $slides, opts) { opts.before.push(function (curr, next, opts) { $.fn.cycle.commonReset(curr, next, opts, true, false); opts.cssBefore.top = this.cycleH / 2; opts.animIn.top = 0; opts.animIn.height = this.cycleH; opts.animOut.top = 0; }); opts.cssBefore.height = 0; opts.cssBefore.left = 0; }; $.fn.cycle.transitions.curtainX = function ($cont, $slides, opts) { opts.before.push(function (curr, next, opts) { $.fn.cycle.commonReset(curr, next, opts, false, true, true); opts.cssBefore.left = next.cycleW / 2; opts.animIn.left = 0; opts.animIn.width = this.cycleW; opts.animOut.left = curr.cycleW / 2; opts.animOut.width = 0; }); opts.cssBefore.top = 0; opts.cssBefore.width = 0; }; $.fn.cycle.transitions.curtainY = function ($cont, $slides, opts) { opts.before.push(function (curr, next, opts) { $.fn.cycle.commonReset(curr, next, opts, true, false, true); opts.cssBefore.top = next.cycleH / 2; opts.animIn.top = 0; opts.animIn.height = next.cycleH; opts.animOut.top = curr.cycleH / 2; opts.animOut.height = 0; }); opts.cssBefore.height = 0; opts.cssBefore.left = 0; }; $.fn.cycle.transitions.cover = function ($cont, $slides, opts) { var d = opts.direction || "left"; var w = $cont.css("overflow", "hidden").width(); var h = $cont.height(); opts.before.push(function (curr, next, opts) { $.fn.cycle.commonReset(curr, next, opts); if (d == "right") { opts.cssBefore.left = -w; } else { if (d == "up") { opts.cssBefore.top = h; } else { if (d == "down") { opts.cssBefore.top = -h; } else { opts.cssBefore.left = w; } } } }); opts.animIn.left = 0; opts.animIn.top = 0; opts.cssBefore.top = 0; opts.cssBefore.left = 0; }; $.fn.cycle.transitions.uncover = function ($cont, $slides, opts) { var d = opts.direction || "left"; var w = $cont.css("overflow", "hidden").width(); var h = $cont.height(); opts.before.push(function (curr, next, opts) { $.fn.cycle.commonReset(curr, next, opts, true, true, true); if (d == "right") { opts.animOut.left = w; } else { if (d == "up") { opts.animOut.top = -h; } else { if (d == "down") { opts.animOut.top = h; } else { opts.animOut.left = -w; } } } }); opts.animIn.left = 0; opts.animIn.top = 0; opts.cssBefore.top = 0; opts.cssBefore.left = 0; }; $.fn.cycle.transitions.toss = function ($cont, $slides, opts) { var w = $cont.css("overflow", "visible").width(); var h = $cont.height(); opts.before.push(function (curr, next, opts) { $.fn.cycle.commonReset(curr, next, opts, true, true, true); if (!opts.animOut.left && !opts.animOut.top) { $.extend(opts.animOut, { left: w * 2, top: -h / 2, opacity: 0 }); } else { opts.animOut.opacity = 0; } }); opts.cssBefore.left = 0; opts.cssBefore.top = 0; opts.animIn.left = 0; }; $.fn.cycle.transitions.wipe = function ($cont, $slides, opts) { var w = $cont.css("overflow", "hidden").width(); var h = $cont.height(); opts.cssBefore = opts.cssBefore || {}; var clip; if (opts.clip) { if (/l2r/.test(opts.clip)) { clip = "rect(0px 0px " + h + "px 0px)"; } else { if (/r2l/.test(opts.clip)) { clip = "rect(0px " + w + "px " + h + "px " + w + "px)"; } else { if (/t2b/.test(opts.clip)) { clip = "rect(0px " + w + "px 0px 0px)"; } else { if (/b2t/.test(opts.clip)) { clip = "rect(" + h + "px " + w + "px " + h + "px 0px)"; } else { if (/zoom/.test(opts.clip)) { var top = parseInt(h / 2); var left = parseInt(w / 2); clip = "rect(" + top + "px " + left + "px " + top + "px " + left + "px)"; } } } } } } opts.cssBefore.clip = opts.cssBefore.clip || clip || "rect(0px 0px 0px 0px)"; var d = opts.cssBefore.clip.match(/(\d+)/g); var t = parseInt(d[0]), r = parseInt(d[1]), b = parseInt(d[2]), l = parseInt(d[3]); opts.before.push(function (curr, next, opts) { if (curr == next) { return; } var $curr = $(curr), $next = $(next); $.fn.cycle.commonReset(curr, next, opts, true, true, false); opts.cssAfter.display = "block"; var step = 1, count = parseInt((opts.speedIn / 13)) - 1; (function f() { var tt = t ? t - parseInt(step * (t / count)) : 0; var ll = l ? l - parseInt(step * (l / count)) : 0; var bb = b < h ? b + parseInt(step * ((h - b) / count || 1)) : h; var rr = r < w ? r + parseInt(step * ((w - r) / count || 1)) : w; $next.css({ clip: "rect(" + tt + "px " + rr + "px " + bb + "px " + ll + "px)" }); (step++ <= count) ? setTimeout(f, 13) : $curr.css("display", "none"); })(); }); $.extend(opts.cssBefore, { display: "block", opacity: 1, top: 0, left: 0 }); opts.animIn = { left: 0 }; opts.animOut = { left: 0 }; }; })(jQuery); jQuery.easing['jswing'] = jQuery.easing['swing']; jQuery.extend(jQuery.easing, { def: 'easeOutQuad', swing: function (x, t, b, c, d) { return jQuery.easing[jQuery.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 * .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 * .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 * (.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 -.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) * .5 + c + b }, easeInBack: function (x, t, b, c, d, s) { if (s == undefined) s = 1.70158; return c * (t /= d) * t * ((s + 1) * t - s) + b }, easeOutBack: function (x, t, b, c, d, s) { if (s == undefined) 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 == undefined) 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 - jQuery.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 + .75) + b } else if (t < (2.5 / 2.75)) { return c * (7.5625 * (t -= (2.25 / 2.75)) * t + .9375) + b } else { return c * (7.5625 * (t -= (2.625 / 2.75)) * t + .984375) + b } }, easeInOutBounce: function (x, t, b, c, d) { if (t < d / 2) return jQuery.easing.easeInBounce(x, t * 2, 0, c, d) * .5 + b; return jQuery.easing.easeOutBounce(x, t * 2 - d, 0, c, d) * .5 + c * .5 + b } }); (function () {
    var chunker = /((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g, done = 0, toString = Object.prototype.toString, hasDuplicate = false, baseHasDuplicate = true, rBackslash = /\\/g, rNonWord = /\W/; [0, 0].sort(function () { baseHasDuplicate = false; return 0; }); var Sizzle = function (selector, context, results, seed) {
        results = results || []; context = context || document; var origContext = context; if (context.nodeType !== 1 && context.nodeType !== 9) { return []; }
        if (!selector || typeof selector !== "string") { return results; }
        var m, set, checkSet, extra, ret, cur, pop, i, prune = true, contextXML = Sizzle.isXML(context), parts = [], soFar = selector; do { chunker.exec(""); m = chunker.exec(soFar); if (m) { soFar = m[3]; parts.push(m[1]); if (m[2]) { extra = m[3]; break; } } } while (m); if (parts.length > 1 && origPOS.exec(selector)) {
            if (parts.length === 2 && Expr.relative[parts[0]]) { set = posProcess(parts[0] + parts[1], context, seed); } else {
                set = Expr.relative[parts[0]] ? [context] : Sizzle(parts.shift(), context); while (parts.length) {
                    selector = parts.shift(); if (Expr.relative[selector]) { selector += parts.shift(); }
                    set = posProcess(selector, set, seed);
                } 
            } 
        } else {
            if (!seed && parts.length > 1 && context.nodeType === 9 && !contextXML && Expr.match.ID.test(parts[0]) && !Expr.match.ID.test(parts[parts.length - 1])) { ret = Sizzle.find(parts.shift(), context, contextXML); context = ret.expr ? Sizzle.filter(ret.expr, ret.set)[0] : ret.set[0]; }
            if (context) {
                ret = seed ? { expr: parts.pop(), set: makeArray(seed)} : Sizzle.find(parts.pop(), parts.length === 1 && (parts[0] === "~" || parts[0] === "+") && context.parentNode ? context.parentNode : context, contextXML); set = ret.expr ? Sizzle.filter(ret.expr, ret.set) : ret.set; if (parts.length > 0) { checkSet = makeArray(set); } else { prune = false; }
                while (parts.length) {
                    cur = parts.pop(); pop = cur; if (!Expr.relative[cur]) { cur = ""; } else { pop = parts.pop(); }
                    if (pop == null) { pop = context; }
                    Expr.relative[cur](checkSet, pop, contextXML);
                } 
            } else { checkSet = parts = []; } 
        }
        if (!checkSet) { checkSet = set; }
        if (!checkSet) { Sizzle.error(cur || selector); }
        if (toString.call(checkSet) === "[object Array]") { if (!prune) { results.push.apply(results, checkSet); } else if (context && context.nodeType === 1) { for (i = 0; checkSet[i] != null; i++) { if (checkSet[i] && (checkSet[i] === true || checkSet[i].nodeType === 1 && Sizzle.contains(context, checkSet[i]))) { results.push(set[i]); } } } else { for (i = 0; checkSet[i] != null; i++) { if (checkSet[i] && checkSet[i].nodeType === 1) { results.push(set[i]); } } } } else { makeArray(checkSet, results); }
        if (extra) { Sizzle(extra, origContext, results, seed); Sizzle.uniqueSort(results); }
        return results;
    }; Sizzle.uniqueSort = function (results) {
        if (sortOrder) { hasDuplicate = baseHasDuplicate; results.sort(sortOrder); if (hasDuplicate) { for (var i = 1; i < results.length; i++) { if (results[i] === results[i - 1]) { results.splice(i--, 1); } } } }
        return results;
    }; Sizzle.matches = function (expr, set) { return Sizzle(expr, null, null, set); }; Sizzle.matchesSelector = function (node, expr) { return Sizzle(expr, null, null, [node]).length > 0; }; Sizzle.find = function (expr, context, isXML) {
        var set, i, len, match, type, left; if (!expr) { return []; }
        for (i = 0, len = Expr.order.length; i < len; i++) { type = Expr.order[i]; if ((match = Expr.leftMatch[type].exec(expr))) { left = match[1]; match.splice(1, 1); if (left.substr(left.length - 1) !== "\\") { match[1] = (match[1] || "").replace(rBackslash, ""); set = Expr.find[type](match, context, isXML); if (set != null) { expr = expr.replace(Expr.match[type], ""); break; } } } }
        if (!set) { set = typeof context.getElementsByTagName !== "undefined" ? context.getElementsByTagName("*") : []; }
        return { set: set, expr: expr };
    }; Sizzle.filter = function (expr, set, inplace, not) {
        var match, anyFound, type, found, item, filter, left, i, pass, old = expr, result = [], curLoop = set, isXMLFilter = set && set[0] && Sizzle.isXML(set[0]); while (expr && set.length) {
            for (type in Expr.filter) {
                if ((match = Expr.leftMatch[type].exec(expr)) != null && match[2]) {
                    filter = Expr.filter[type]; left = match[1]; anyFound = false; match.splice(1, 1); if (left.substr(left.length - 1) === "\\") { continue; }
                    if (curLoop === result) { result = []; }
                    if (Expr.preFilter[type]) { match = Expr.preFilter[type](match, curLoop, inplace, result, not, isXMLFilter); if (!match) { anyFound = found = true; } else if (match === true) { continue; } }
                    if (match) { for (i = 0; (item = curLoop[i]) != null; i++) { if (item) { found = filter(item, match, i, curLoop); pass = not ^ found; if (inplace && found != null) { if (pass) { anyFound = true; } else { curLoop[i] = false; } } else if (pass) { result.push(item); anyFound = true; } } } }
                    if (found !== undefined) {
                        if (!inplace) { curLoop = result; }
                        expr = expr.replace(Expr.match[type], ""); if (!anyFound) { return []; }
                        break;
                    } 
                } 
            }
            if (expr === old) { if (anyFound == null) { Sizzle.error(expr); } else { break; } }
            old = expr;
        }
        return curLoop;
    }; Sizzle.error = function (msg) { throw "Syntax error, unrecognized expression: " + msg; }; var Expr = Sizzle.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 (elem) { return elem.getAttribute("href"); }, type: function (elem) { return elem.getAttribute("type"); } }, relative: { "+": function (checkSet, part) {
        var isPartStr = typeof part === "string", isTag = isPartStr && !rNonWord.test(part), isPartStrNotTag = isPartStr && !isTag; if (isTag) { part = part.toLowerCase(); }
        for (var i = 0, l = checkSet.length, elem; i < l; i++) {
            if ((elem = checkSet[i])) {
                while ((elem = elem.previousSibling) && elem.nodeType !== 1) { }
                checkSet[i] = isPartStrNotTag || elem && elem.nodeName.toLowerCase() === part ? elem || false : elem === part;
            } 
        }
        if (isPartStrNotTag) { Sizzle.filter(part, checkSet, true); } 
    }, ">": function (checkSet, part) {
        var elem, isPartStr = typeof part === "string", i = 0, l = checkSet.length; if (isPartStr && !rNonWord.test(part)) { part = part.toLowerCase(); for (; i < l; i++) { elem = checkSet[i]; if (elem) { var parent = elem.parentNode; checkSet[i] = parent.nodeName.toLowerCase() === part ? parent : false; } } } else {
            for (; i < l; i++) { elem = checkSet[i]; if (elem) { checkSet[i] = isPartStr ? elem.parentNode : elem.parentNode === part; } }
            if (isPartStr) { Sizzle.filter(part, checkSet, true); } 
        } 
    }, "": function (checkSet, part, isXML) {
        var nodeCheck, doneName = done++, checkFn = dirCheck; if (typeof part === "string" && !rNonWord.test(part)) { part = part.toLowerCase(); nodeCheck = part; checkFn = dirNodeCheck; }
        checkFn("parentNode", part, doneName, checkSet, nodeCheck, isXML);
    }, "~": function (checkSet, part, isXML) {
        var nodeCheck, doneName = done++, checkFn = dirCheck; if (typeof part === "string" && !rNonWord.test(part)) { part = part.toLowerCase(); nodeCheck = part; checkFn = dirNodeCheck; }
        checkFn("previousSibling", part, doneName, checkSet, nodeCheck, isXML);
    } 
    }, find: { ID: function (match, context, isXML) { if (typeof context.getElementById !== "undefined" && !isXML) { var m = context.getElementById(match[1]); return m && m.parentNode ? [m] : []; } }, NAME: function (match, context) {
        if (typeof context.getElementsByName !== "undefined") {
            var ret = [], results = context.getElementsByName(match[1]); for (var i = 0, l = results.length; i < l; i++) { if (results[i].getAttribute("name") === match[1]) { ret.push(results[i]); } }
            return ret.length === 0 ? null : ret;
        } 
    }, TAG: function (match, context) { if (typeof context.getElementsByTagName !== "undefined") { return context.getElementsByTagName(match[1]); } } 
    }, preFilter: { CLASS: function (match, curLoop, inplace, result, not, isXML) {
        match = " " + match[1].replace(rBackslash, "") + " "; if (isXML) { return match; }
        for (var i = 0, elem; (elem = curLoop[i]) != null; i++) { if (elem) { if (not ^ (elem.className && (" " + elem.className + " ").replace(/[\t\n\r]/g, " ").indexOf(match) >= 0)) { if (!inplace) { result.push(elem); } } else if (inplace) { curLoop[i] = false; } } }
        return false;
    }, ID: function (match) { return match[1].replace(rBackslash, ""); }, TAG: function (match, curLoop) { return match[1].replace(rBackslash, "").toLowerCase(); }, CHILD: function (match) {
        if (match[1] === "nth") {
            if (!match[2]) { Sizzle.error(match[0]); }
            match[2] = match[2].replace(/^\+|\s*/g, ''); var test = /(-?)(\d*)(?:n([+\-]?\d*))?/.exec(match[2] === "even" && "2n" || match[2] === "odd" && "2n+1" || !/\D/.test(match[2]) && "0n+" + match[2] || match[2]); match[2] = (test[1] + (test[2] || 1)) - 0; match[3] = test[3] - 0;
        }
        else if (match[2]) { Sizzle.error(match[0]); }
        match[0] = done++; return match;
    }, ATTR: function (match, curLoop, inplace, result, not, isXML) {
        var name = match[1] = match[1].replace(rBackslash, ""); if (!isXML && Expr.attrMap[name]) { match[1] = Expr.attrMap[name]; }
        match[4] = (match[4] || match[5] || "").replace(rBackslash, ""); if (match[2] === "~=") { match[4] = " " + match[4] + " "; }
        return match;
    }, PSEUDO: function (match, curLoop, inplace, result, not) {
        if (match[1] === "not") {
            if ((chunker.exec(match[3]) || "").length > 1 || /^\w/.test(match[3])) { match[3] = Sizzle(match[3], null, null, curLoop); } else {
                var ret = Sizzle.filter(match[3], curLoop, inplace, true ^ not); if (!inplace) { result.push.apply(result, ret); }
                return false;
            } 
        } else if (Expr.match.POS.test(match[0]) || Expr.match.CHILD.test(match[0])) { return true; }
        return match;
    }, POS: function (match) { match.unshift(true); return match; } 
    }, filters: { enabled: function (elem) { return elem.disabled === false && elem.type !== "hidden"; }, disabled: function (elem) { return elem.disabled === true; }, checked: function (elem) { return elem.checked === true; }, selected: function (elem) {
        if (elem.parentNode) { elem.parentNode.selectedIndex; }
        return elem.selected === true;
    }, parent: function (elem) { return !!elem.firstChild; }, empty: function (elem) { return !elem.firstChild; }, has: function (elem, i, match) { return !!Sizzle(match[3], elem).length; }, header: function (elem) { return (/h\d/i).test(elem.nodeName); }, text: function (elem) { var attr = elem.getAttribute("type"), type = elem.type; return elem.nodeName.toLowerCase() === "input" && "text" === type && (attr === type || attr === null); }, radio: function (elem) { return elem.nodeName.toLowerCase() === "input" && "radio" === elem.type; }, checkbox: function (elem) { return elem.nodeName.toLowerCase() === "input" && "checkbox" === elem.type; }, file: function (elem) { return elem.nodeName.toLowerCase() === "input" && "file" === elem.type; }, password: function (elem) { return elem.nodeName.toLowerCase() === "input" && "password" === elem.type; }, submit: function (elem) { var name = elem.nodeName.toLowerCase(); return (name === "input" || name === "button") && "submit" === elem.type; }, image: function (elem) { return elem.nodeName.toLowerCase() === "input" && "image" === elem.type; }, reset: function (elem) { var name = elem.nodeName.toLowerCase(); return (name === "input" || name === "button") && "reset" === elem.type; }, button: function (elem) { var name = elem.nodeName.toLowerCase(); return name === "input" && "button" === elem.type || name === "button"; }, input: function (elem) { return (/input|select|textarea|button/i).test(elem.nodeName); }, focus: function (elem) { return elem === elem.ownerDocument.activeElement; } 
    }, setFilters: { first: function (elem, i) { return i === 0; }, last: function (elem, i, match, array) { return i === array.length - 1; }, even: function (elem, i) { return i % 2 === 0; }, odd: function (elem, i) { return i % 2 === 1; }, lt: function (elem, i, match) { return i < match[3] - 0; }, gt: function (elem, i, match) { return i > match[3] - 0; }, nth: function (elem, i, match) { return match[3] - 0 === i; }, eq: function (elem, i, match) { return match[3] - 0 === i; } }, filter: { PSEUDO: function (elem, match, i, array) {
        var name = match[1], filter = Expr.filters[name]; if (filter) { return filter(elem, i, match, array); } else if (name === "contains") { return (elem.textContent || elem.innerText || Sizzle.getText([elem]) || "").indexOf(match[3]) >= 0; } else if (name === "not") {
            var not = match[3]; for (var j = 0, l = not.length; j < l; j++) { if (not[j] === elem) { return false; } }
            return true;
        } else { Sizzle.error(name); } 
    }, CHILD: function (elem, match) {
        var type = match[1], node = elem; switch (type) {
            case "only": case "first": while ((node = node.previousSibling)) { if (node.nodeType === 1) { return false; } }
                if (type === "first") { return true; }
                node = elem; case "last": while ((node = node.nextSibling)) { if (node.nodeType === 1) { return false; } }
                return true; case "nth": var first = match[2], last = match[3]; if (first === 1 && last === 0) { return true; }
                var doneName = match[0], parent = elem.parentNode; if (parent && (parent.sizcache !== doneName || !elem.nodeIndex)) {
                    var count = 0; for (node = parent.firstChild; node; node = node.nextSibling) { if (node.nodeType === 1) { node.nodeIndex = ++count; } }
                    parent.sizcache = doneName;
                }
                var diff = elem.nodeIndex - last; if (first === 0) { return diff === 0; } else { return (diff % first === 0 && diff / first >= 0); } 
        } 
    }, ID: function (elem, match) { return elem.nodeType === 1 && elem.getAttribute("id") === match; }, TAG: function (elem, match) { return (match === "*" && elem.nodeType === 1) || !!elem.nodeName && elem.nodeName.toLowerCase() === match; }, CLASS: function (elem, match) { return (" " + (elem.className || elem.getAttribute("class")) + " ").indexOf(match) > -1; }, ATTR: function (elem, match) { var name = match[1], result = Sizzle.attr ? Sizzle.attr(elem, name) : Expr.attrHandle[name] ? Expr.attrHandle[name](elem) : elem[name] != null ? elem[name] : elem.getAttribute(name), value = result + "", type = match[2], check = match[4]; return result == null ? type === "!=" : !type && Sizzle.attr ? result != null : type === "=" ? value === check : type === "*=" ? value.indexOf(check) >= 0 : type === "~=" ? (" " + value + " ").indexOf(check) >= 0 : !check ? value && result !== false : type === "!=" ? value !== check : type === "^=" ? value.indexOf(check) === 0 : type === "$=" ? value.substr(value.length - check.length) === check : type === "|=" ? value === check || value.substr(0, check.length + 1) === check + "-" : false; }, POS: function (elem, match, i, array) { var name = match[2], filter = Expr.setFilters[name]; if (filter) { return filter(elem, i, match, array); } } 
    }
    }; var origPOS = Expr.match.POS, fescape = function (all, num) { return "\\" + (num - 0 + 1); }; for (var type in Expr.match) { Expr.match[type] = new RegExp(Expr.match[type].source + (/(?![^\[]*\])(?![^\(]*\))/.source)); Expr.leftMatch[type] = new RegExp(/(^(?:.|\r|\n)*?)/.source + Expr.match[type].source.replace(/\\(\d+)/g, fescape)); }
    var makeArray = function (array, results) {
        array = Array.prototype.slice.call(array, 0); if (results) { results.push.apply(results, array); return results; }
        return array;
    }; try { Array.prototype.slice.call(document.documentElement.childNodes, 0)[0].nodeType; } catch (e) {
        makeArray = function (array, results) {
            var i = 0, ret = results || []; if (toString.call(array) === "[object Array]") { Array.prototype.push.apply(ret, array); } else { if (typeof array.length === "number") { for (var l = array.length; i < l; i++) { ret.push(array[i]); } } else { for (; array[i]; i++) { ret.push(array[i]); } } }
            return ret;
        };
    }
    var sortOrder, siblingCheck; if (document.documentElement.compareDocumentPosition) {
        sortOrder = 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 {
        sortOrder = function (a, b) {
            if (a === b) { hasDuplicate = true; return 0; } else if (a.sourceIndex && b.sourceIndex) { return a.sourceIndex - b.sourceIndex; }
            var al, 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; }
            al = ap.length; bl = bp.length; for (var i = 0; i < al && i < bl; i++) { if (ap[i] !== bp[i]) { return siblingCheck(ap[i], bp[i]); } }
            return i === al ? siblingCheck(a, bp[i], -1) : siblingCheck(ap[i], b, 1);
        }; siblingCheck = function (a, b, ret) {
            if (a === b) { return ret; }
            var cur = a.nextSibling; while (cur) {
                if (cur === b) { return -1; }
                cur = cur.nextSibling;
            }
            return 1;
        };
    }
    Sizzle.getText = function (elems) {
        var ret = "", elem; for (var i = 0; elems[i]; i++) { elem = elems[i]; if (elem.nodeType === 3 || elem.nodeType === 4) { ret += elem.nodeValue; } else if (elem.nodeType !== 8) { ret += Sizzle.getText(elem.childNodes); } }
        return ret;
    }; (function () {
        var form = document.createElement("div"), id = "script" + (new Date()).getTime(), root = document.documentElement; form.innerHTML = "<a name='" + id + "'/>"; root.insertBefore(form, root.firstChild); if (document.getElementById(id)) { Expr.find.ID = function (match, context, isXML) { if (typeof context.getElementById !== "undefined" && !isXML) { var m = context.getElementById(match[1]); return m ? m.id === match[1] || typeof m.getAttributeNode !== "undefined" && m.getAttributeNode("id").nodeValue === match[1] ? [m] : undefined : []; } }; Expr.filter.ID = function (elem, match) { var node = typeof elem.getAttributeNode !== "undefined" && elem.getAttributeNode("id"); return elem.nodeType === 1 && node && node.nodeValue === match; }; }
        root.removeChild(form); root = form = null;
    })(); (function () {
        var div = document.createElement("div"); div.appendChild(document.createComment("")); if (div.getElementsByTagName("*").length > 0) {
            Expr.find.TAG = function (match, context) {
                var results = context.getElementsByTagName(match[1]); if (match[1] === "*") {
                    var tmp = []; for (var i = 0; results[i]; i++) { if (results[i].nodeType === 1) { tmp.push(results[i]); } }
                    results = tmp;
                }
                return results;
            };
        }
        div.innerHTML = "<a href='#'></a>"; if (div.firstChild && typeof div.firstChild.getAttribute !== "undefined" && div.firstChild.getAttribute("href") !== "#") { Expr.attrHandle.href = function (elem) { return elem.getAttribute("href", 2); }; }
        div = null;
    })(); if (document.querySelectorAll) {
        (function () {
            var oldSizzle = Sizzle, div = document.createElement("div"), id = "__sizzle__"; div.innerHTML = "<p class='TEST'></p>"; if (div.querySelectorAll && div.querySelectorAll(".TEST").length === 0) { return; }
            Sizzle = function (query, context, extra, seed) {
                context = context || document; if (!seed && !Sizzle.isXML(context)) {
                    var match = /^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(query); if (match && (context.nodeType === 1 || context.nodeType === 9)) { if (match[1]) { return makeArray(context.getElementsByTagName(query), extra); } else if (match[2] && Expr.find.CLASS && context.getElementsByClassName) { return makeArray(context.getElementsByClassName(match[2]), extra); } }
                    if (context.nodeType === 9) {
                        if (query === "body" && context.body) { return makeArray([context.body], extra); } else if (match && match[3]) { var elem = context.getElementById(match[3]); if (elem && elem.parentNode) { if (elem.id === match[3]) { return makeArray([elem], extra); } } else { return makeArray([], extra); } }
                        try { return makeArray(context.querySelectorAll(query), extra); } catch (qsaError) { } 
                    } else if (context.nodeType === 1 && context.nodeName.toLowerCase() !== "object") {
                        var oldContext = context, old = context.getAttribute("id"), nid = old || id, hasParent = context.parentNode, relativeHierarchySelector = /^\s*[+~]/.test(query); if (!old) { context.setAttribute("id", nid); } else { nid = nid.replace(/'/g, "\\$&"); }
                        if (relativeHierarchySelector && hasParent) { context = context.parentNode; }
                        try { if (!relativeHierarchySelector || hasParent) { return makeArray(context.querySelectorAll("[id='" + nid + "'] " + query), extra); } } catch (pseudoError) { } finally { if (!old) { oldContext.removeAttribute("id"); } } 
                    } 
                }
                return oldSizzle(query, context, extra, seed);
            }; for (var prop in oldSizzle) { Sizzle[prop] = oldSizzle[prop]; }
            div = null;
        })();
    }
    (function () {
        var html = document.documentElement, matches = html.matchesSelector || html.mozMatchesSelector || html.webkitMatchesSelector || html.msMatchesSelector; if (matches) {
            var disconnectedMatch = !matches.call(document.createElement("div"), "div"), pseudoWorks = false; try { matches.call(document.documentElement, "[test!='']:sizzle"); } catch (pseudoError) { pseudoWorks = true; }
            Sizzle.matchesSelector = function (node, expr) {
                expr = expr.replace(/\=\s*([^'"\]]*)\s*\]/g, "='$1']"); if (!Sizzle.isXML(node)) { try { if (pseudoWorks || !Expr.match.PSEUDO.test(expr) && !/!=/.test(expr)) { var ret = matches.call(node, expr); if (ret || !disconnectedMatch || node.document && node.document.nodeType !== 11) { return ret; } } } catch (e) { } }
                return Sizzle(expr, null, null, [node]).length > 0;
            };
        } 
    })(); (function () {
        var div = document.createElement("div"); div.innerHTML = "<div class='test e'></div><div class='test'></div>"; if (!div.getElementsByClassName || div.getElementsByClassName("e").length === 0) { return; }
        div.lastChild.className = "e"; if (div.getElementsByClassName("e").length === 1) { return; }
        Expr.order.splice(1, 0, "CLASS"); Expr.find.CLASS = function (match, context, isXML) { if (typeof context.getElementsByClassName !== "undefined" && !isXML) { return context.getElementsByClassName(match[1]); } }; div = null;
    })(); function dirNodeCheck(dir, cur, doneName, checkSet, nodeCheck, isXML) {
        for (var i = 0, l = checkSet.length; i < l; i++) {
            var elem = checkSet[i]; if (elem) {
                var match = false; elem = elem[dir]; while (elem) {
                    if (elem.sizcache === doneName) { match = checkSet[elem.sizset]; break; }
                    if (elem.nodeType === 1 && !isXML) { elem.sizcache = doneName; elem.sizset = i; }
                    if (elem.nodeName.toLowerCase() === cur) { match = elem; break; }
                    elem = elem[dir];
                }
                checkSet[i] = match;
            } 
        } 
    }
    function dirCheck(dir, cur, doneName, checkSet, nodeCheck, isXML) {
        for (var i = 0, l = checkSet.length; i < l; i++) {
            var elem = checkSet[i]; if (elem) {
                var match = false; elem = elem[dir]; while (elem) {
                    if (elem.sizcache === doneName) { match = checkSet[elem.sizset]; break; }
                    if (elem.nodeType === 1) {
                        if (!isXML) { elem.sizcache = doneName; elem.sizset = i; }
                        if (typeof cur !== "string") { if (elem === cur) { match = true; break; } } else if (Sizzle.filter(cur, [elem]).length > 0) { match = elem; break; } 
                    }
                    elem = elem[dir];
                }
                checkSet[i] = match;
            } 
        } 
    }
    if (document.documentElement.contains) { Sizzle.contains = function (a, b) { return a !== b && (a.contains ? a.contains(b) : true); }; } else if (document.documentElement.compareDocumentPosition) { Sizzle.contains = function (a, b) { return !!(a.compareDocumentPosition(b) & 16); }; } else { Sizzle.contains = function () { return false; }; }
    Sizzle.isXML = function (elem) { var documentElement = (elem ? elem.ownerDocument || elem : 0).documentElement; return documentElement ? documentElement.nodeName !== "HTML" : false; }; var posProcess = function (selector, context, seed) {
        var match, tmpSet = [], later = "", root = context.nodeType ? [context] : context; while ((match = Expr.match.PSEUDO.exec(selector))) { later += match[0]; selector = selector.replace(Expr.match.PSEUDO, ""); }
        selector = Expr.relative[selector] ? selector + "*" : selector; for (var i = 0, l = root.length; i < l; i++) { Sizzle(selector, root[i], tmpSet, seed); }
        return Sizzle.filter(later, tmpSet);
    }; window.Sizzle = Sizzle;
})(); $(document).ready(function () { markup_init(); qblocks_init(); }); function markup_init() {
    $('.qblock_wrapper').each(function () { $(this).addClass('n' + ($(this).index('.qblock_wrapper') + 1)); }); $('.content li').each(function () { $(this).html('<div class="li_inner">' + $(this).html() + '</div>'); }); $('.content > li.quote > .li_inner').each(function () {
        var $author = $(this).find('.author'); if ($author.length)
        { var author = $author.html(); $author.remove(); $(this).html('<div class="quote"><span></span>' + $(this).html() + '</div><div class="author">' + author + '</div>'); } 
    }); var $butt = $('.center_button > a:first'); if ($butt.length) {
        $butt.html('<span class="hov"></span><span class="inner">' + $butt.html() + '</span>'); if ($.browser.msie)
        { $butt.mouseenter(function () { $(this).children('.hov').show(); }).mouseleave(function () { $(this).children('.hov').hide(); }); }
        else
        { $butt.mouseenter(function () { $(this).children('.hov').stop().fadeTo(300, 1); }).mouseleave(function () { $(this).children('.hov').stop().fadeTo(200, 0); }); } 
    }
    $('.countdown').each(function () {
        var txt = $(this).text().replace(/^\s+/g, '').replace(/\s+$/g, ''); var tmp = txt.split(' '); if (tmp.length == 2) {
            var tmp_d = tmp[0].split('-'); var tmp_h = tmp[1].split(':'); if (tmp_d.length == 3 && tmp_h.length == 3)
            { $(this).countdown({ until: new Date(tmp_d[0], tmp_d[1] - 1, tmp_d[2], tmp_h[0], tmp_h[1], tmp_h[2]), labels: ['years', 'months', 'weeks', 'days', 'hours', 'min', 'sec'], labels1: ['year', 'month', 'week', 'day', 'hour', 'min', 'sec'] }); }
            else
                $(this).remove();
        }
        else
            $(this).remove();
    }); $('.socials > a').fadeTo(0, 0.5).mouseenter(function () { $(this).stop().fadeTo(400, 1); }).mouseleave(function () { $(this).stop().fadeTo(300, 0.5); });
}
function qblocks_init() {
    $('.qblock .content').each(function () {
        if ($(this).children().length > 1) {
            var $qb = $(this).parent(); var ind = $qb.parent().index(); var txt = 'Next'; var $nl = $qb.find('.next_link_anchor'); if ($nl.length)
            { txt = $nl.text(); $nl.remove(); }
            $qb.append('<div class="control"><span class="next" id="qblock' + ind + '_next">' + txt + '</span></div>'); $(this).cycle({ timeout: 0, fx: 'scrollHorz', next: '#qblock' + ind + '_next', easing: 'easeOutExpo' });
        } 
    }); $('.control .next, .static_block a').mouseenter(function () { $(this).stop().animate({ paddingLeft: '4px', marginRight: '-4px' }, 500, 'easeOutExpo'); }); $('.control .next, .static_block a').mouseleave(function () { $(this).stop().css('top', '0').css('left', '0').animate({ paddingLeft: '0', marginRight: '0' }, 300, 'easeOutExpo'); }); $('.control .next, .static_block a').mousedown(function () { $(this).stop().css('top', '1px').css('left', '1px'); }); $('.control .next, .static_block a').mouseup(function () { $(this).stop().css('top', '0px').css('left', '0px'); });
}
function fonts_init()
{ Cufon.replace('.cufon, h1, h2, h3, h4'); }
function fancybox_init()
{ $("a[rel=fancybox]").fancybox({ titlePosition: 'inside' }); }
function fillform_init() {
    var options = { data: { site: 1 }, success: fillform_success, dataType: 'json', beforeSubmit: fillform_before }; $("#filltheform_form").validate({ submitHandler: function (form) { $(form).ajaxSubmit(options); }, errorPlacement: function (error, element) { error.addClass('errorTip'); }, wrapper: 'div' }); $("#filltheform_form").find("input[type=text], textarea").focus(function () {
        if ($(this).val() == this.defaultValue)
            $(this).attr('value', '');
    }).blur(function () {
        if ($(this).val() == '')
            $(this).attr('value', this.defaultValue);
    }).each(function () {
        var $icon = $(this).next(); if ($icon.hasClass('input_icon'))
        { var pos = $(this).position(); pos.left += $(this).outerWidth() - 25; pos.top += 6; var hei = $(this).outerHeight() - 2; $icon.css('height', hei + 'px'); $icon.css('left', pos.left + 'px'); $icon.css('top', pos.top + 'px'); $icon.css('display', 'block'); } 
    });
}
function fillform_before()
{ var $obj = $('#filltheform_form'); $obj.fadeTo(300, 0.5); $obj.before('<div id="filltheform_form_blocker" style="position:absolute;width:' + $obj.outerWidth() + 'px;height:' + $obj.outerHeight() + 'px;z-index:9999;background:url(img/ajax-loading.gif) no-repeat center center"></div>'); }
function fillform_success(obj) {
    $('#filltheform_form_blocker').remove(); if (obj.error == 0)
    { $('#filltheform_form').fadeOut(300, function () { $('#filltheform_form').remove(); $('#filltheform_form_success').fadeIn(200); }); }
    else
    { $('#filltheform_form').fadeOut(300, function () { $('#filltheform_form').remove(); $('#filltheform_form_error').fadeIn(200); }); } 
}; (function ($) { var defaults = { buttons: { button1: { text: 'OK', danger: false, onclick: function () { $.fallr('hide'); } } }, icon: 'check', content: 'Hello', position: 'top', closeKey: false, closeOverlay: false, useOverlay: true, autoclose: false, easingDuration: 300, easingIn: 'swing', easingOut: 'swing', height: 'auto', width: '360px', zIndex: 100 }, opts, timeoutId, $w = $(window), methods = { hide: function (options, callback, self) { if (helpers.isActive()) { $('#fallr-wrapper').stop(true, true); var $f = $('#fallr-wrapper'), pos = $f.css('position'), yminpos = 0; switch (opts.position) { case 'bottom': case 'center': yminpos = ((pos === 'fixed') ? $w.height() : $f.offset().top + $f.height()) + 10; break; default: yminpos = ((pos === 'fixed') ? (-1) * ($f.outerHeight()) : $f.offset().top) - 10; }; $f.animate({ 'top': (yminpos) }, (opts.easingDuration || opts.duration), opts.easingOut, function () { if ($.browser.msie) { $('#fallr-overlay').css('display', 'none'); } else { $('#fallr-overlay').fadeOut('fast'); }; $f.remove(); clearTimeout(timeoutId); if (typeof callback === "function") { callback.call(self); } }); $(document).unbind('keydown', helpers.enterKeyHandler).unbind('keydown', helpers.closeKeyHandler).unbind('keydown', helpers.tabKeyHandler); } }, resize: function (options, callback, self) { var $f = $('#fallr-wrapper'), newWidth = parseInt(options.width, 10), newHeight = parseInt(options.height, 10), diffWidth = Math.abs($f.outerWidth() - newWidth), diffHeight = Math.abs($f.outerHeight() - newHeight); if (helpers.isActive() && (diffWidth > 5 || diffHeight > 5)) { $f.animate({ 'width': newWidth }, function () { $(this).animate({ 'height': newHeight }, function () { helpers.fixPos(); }); }); $('#fallr').animate({ 'width': newWidth - 94 }, function () { $(this).animate({ 'height': newHeight - 131 }, function () { if (typeof callback === "function") { callback.call(self); } }); }); } }, show: function (options, callback, self) { if (helpers.isActive()) { $.error('Can\'t create new message with content: "' + options.content + '", past message with content "' + opts.content + '" is still active'); } else { opts = $.extend({}, defaults, options); $('<div id="fallr-wrapper"></div>').appendTo('body'); var $f = $('#fallr-wrapper'), $o = $('#fallr-overlay'); $f.css({ 'width': opts.width, 'height': opts.height, 'position': 'absolute', 'top': '-9999px', 'left': '-9999px' }).html('<div id="fallr-icon"></div>' + '<div id="fallr"></div>' + '<div id="fallr-buttons"></div>').find('#fallr-icon').addClass('icon-' + opts.icon).end().find('#fallr').html(opts.content).css({ 'height': (opts.height == 'auto') ? 'auto' : $f.height() - 131, 'width': $f.width() - 94 }).end().find('#fallr-buttons').html((function () { var buttons = ''; var i; for (i in opts.buttons) { if (opts.buttons.hasOwnProperty(i)) { buttons = buttons + '<a href="#" class="fallr-button ' + (opts.buttons[i].danger ? 'fallr-button-danger' : '') + '" id="fallr-button-' + i + '">' + opts.buttons[i].text + '</a>'; } }; return buttons; } ())).find('.fallr-button').bind('click', function () { var buttonId = $(this).attr('id').substring(13); if (typeof opts.buttons[buttonId].onclick === 'function' && opts.buttons[buttonId].onclick != false) { var scope = document.getElementById('fallr'); opts.buttons[buttonId].onclick.apply(scope); } else { methods.hide(); }; return false; }); var showFallr = function () { $f.show(); var xpos = ($w.width() - $f.outerWidth()) / 2 + $w.scrollLeft(), yminpos, ymaxpos, pos = ($w.height() > $f.height() && $w.width() > $f.width()) ? 'fixed' : 'absolute'; switch (opts.position) { case 'bottom': yminpos = (pos === 'fixed') ? $w.height() : $w.scrollTop() + $w.height(); ymaxpos = yminpos - $f.outerHeight(); break; case 'center': yminpos = (pos === 'fixed') ? (-1) * $f.outerHeight() : $o.offset().top - $f.outerHeight(); ymaxpos = yminpos + $f.outerHeight() + (($w.height() - $f.outerHeight()) / 2); break; default: ymaxpos = (pos === 'fixed') ? 0 : $w.scrollTop(); yminpos = ymaxpos - $f.outerHeight(); }; $f.css({ 'left': xpos, 'position': pos, 'top': yminpos, 'z-index': opts.zIndex + 1 }).animate({ 'top': ymaxpos }, opts.easingDuration, opts.easingIn, function () { if (typeof callback === "function") { callback.call(self); }; if (opts.autoclose) { timeoutId = setTimeout(methods.hide, opts.autoclose); } }); }; if (opts.useOverlay) { if ($.browser.msie && $.browser.version < 9) { $o.css({ 'display': 'block', 'z-index': opts.zIndex }); showFallr(); } else { $o.css({ 'z-index': opts.zIndex }).fadeIn(showFallr); } } else { showFallr(); }; $(document).bind('keydown', helpers.enterKeyHandler).bind('keydown', helpers.closeKeyHandler).bind('keydown', helpers.tabKeyHandler); $('#fallr-buttons').children().eq(-1).bind('focus', function () { $(this).bind('keydown', helpers.tabKeyHandler); }); $f.find(':input').bind('keydown', function (e) { helpers.unbindKeyHandler(); if (e.keyCode === 13) { console.log(1); $('.fallr-button').eq(0).trigger('click'); } }); } }, set: function (options, callback, self) { for (var i in options) { if (defaults.hasOwnProperty(i)) { defaults[i] = options[i]; if (opts && opts[i]) { opts[i] = options[i]; } } }; if (typeof callback === "function") { callback.call(self); } } }, helpers = { blink: function () { $('#fallr-wrapper').fadeOut(150, function () { $(this).fadeIn(150); }); }, fixPos: function () { var $f = $('#fallr-wrapper'), pos = $f.css('position'); if ($w.width() > $f.outerWidth() && $w.height() > $f.outerHeight()) { var newLeft = ($w.width() - $f.outerWidth()) / 2, newTop = $w.height() - $f.outerHeight(); switch (opts.position) { case 'center': newTop = newTop / 2; break; case 'bottom': break; default: newTop = 0; }; if (pos == 'fixed') { $f.animate({ 'left': newLeft }, function () { $(this).animate({ 'top': newTop }); }); } else { $f.css({ 'position': 'fixed', 'left': newLeft, 'top': newTop }); } } else { var newLeft = ($w.width() - $f.outerWidth()) / 2 + $w.scrollLeft(); var newTop = $w.scrollTop(); if (pos != 'fixed') { $f.animate({ 'left': newLeft }, function () { $(this).animate({ 'top': newTop }); }); } else { $f.css({ 'position': 'absolute', 'top': newTop, 'left': (newLeft > 0 ? newLeft : 0) }); } } }, isActive: function () { return !!($('#fallr-wrapper').length > 0); }, enterKeyHandler: function (e) { if (e.keyCode === 13) { $('#fallr-buttons').children().eq(0).focus(); helpers.unbindKeyHandler(); } }, tabKeyHandler: function (e) { if (e.keyCode === 9) { $('#fallr-wrapper').find(':input, .fallr-button').eq(0).focus(); helpers.unbindKeyHandler(); e.preventDefault(); } }, closeKeyHandler: function (e) { if (e.keyCode === 27 && opts.closeKey) { methods.hide(); } }, unbindKeyHandler: function () { $(document).unbind('keydown', helpers.enterKeyHandler).unbind('keydown', helpers.tabKeyHandler); } }; $(document).ready(function () { $('body').append('<div id="fallr-overlay"></div>'); $('#fallr-overlay').bind('click', function () { if (opts.closeOverlay) { methods.hide(); } else { helpers.blink(); } }); }); $(window).resize(function () { if (helpers.isActive()) { helpers.fixPos(); } }); $.fallr = function (method, options, callback) { var self = window; if (typeof method === 'object') { options = method; method = 'show'; }; if (methods[method]) { if (typeof options === 'function') { callback = options; options = null; }; methods[method](options, callback, self); } else { $.error('Method "' + method + '" does not exist in $.fallr'); } }; } (jQuery)); var isIphone = false; var isAndroidPhone = false; var isTierTablet = false; var isTierIphone = false; var isTierRichCss = false; var isTierGenericMobile = false; var engineWebKit = "webkit"; var deviceIphone = "iphone"; var deviceIpod = "ipod"; var deviceIpad = "ipad"; var deviceMacPpc = "macintosh"; var deviceAndroid = "android"; var deviceGoogleTV = "googletv"; var deviceXoom = "xoom"; var deviceHtcFlyer = "htc_flyer"; var deviceNuvifone = "nuvifone"; var deviceSymbian = "symbian"; var deviceS60 = "series60"; var deviceS70 = "series70"; var deviceS80 = "series80"; var deviceS90 = "series90"; var deviceWinPhone7 = "windows phone os 7"; var deviceWinMob = "windows ce"; var deviceWindows = "windows"; var deviceIeMob = "iemobile"; var devicePpc = "ppc"; var enginePie = "wm5 pie"; var deviceBB = "blackberry"; var vndRIM = "vnd.rim"; var deviceBBStorm = "blackberry95"; var deviceBBBold = "blackberry97"; var deviceBBTour = "blackberry96"; var deviceBBCurve = "blackberry89"; var deviceBBTorch = "blackberry 98"; var deviceBBPlaybook = "playbook"; var devicePalm = "palm"; var deviceWebOS = "webos"; var deviceWebOShp = "hpwos"; var engineBlazer = "blazer"; var engineXiino = "xiino"; var deviceKindle = "kindle"; var vndwap = "vnd.wap"; var wml = "wml"; var deviceTablet = "tablet"; var deviceBrew = "brew"; var deviceDanger = "danger"; var deviceHiptop = "hiptop"; var devicePlaystation = "playstation"; var deviceNintendoDs = "nitro"; var deviceNintendo = "nintendo"; var deviceWii = "wii"; var deviceXbox = "xbox"; var deviceArchos = "archos"; var engineOpera = "opera"; var engineNetfront = "netfront"; var engineUpBrowser = "up.browser"; var engineOpenWeb = "openweb"; var deviceMidp = "midp"; var uplink = "up.link"; var engineTelecaQ = 'teleca q'; var devicePda = "pda"; var mini = "mini"; var mobile = "mobile"; var mobi = "mobi"; var maemo = "maemo"; var linux = "linux"; var qtembedded = "qt embedded"; var mylocom2 = "com2"; var manuSonyEricsson = "sonyericsson"; var manuericsson = "ericsson"; var manuSamsung1 = "sec-sgh"; var manuSony = "sony"; var manuHtc = "htc"; var svcDocomo = "docomo"; var svcKddi = "kddi"; var svcVodafone = "vodafone"; var disUpdate = "update"; var uagent = navigator.userAgent.toLowerCase(); function DetectIphone() {
    if (uagent.search(deviceIphone) > -1) {
        if (DetectIpad() || DetectIpod())
            return false; else
            return true;
    }
    else
        return false;
}
function DetectIpod() {
    if (uagent.search(deviceIpod) > -1)
        return true; else
        return false;
}
function DetectIpad() {
    if (uagent.search(deviceIpad) > -1 && DetectWebkit())
        return true; else
        return false;
}
function DetectIphoneOrIpod() {
    if (uagent.search(deviceIphone) > -1 || uagent.search(deviceIpod) > -1)
        return true; else
        return false;
}
function DetectIos() {
    if (DetectIphoneOrIpod() || DetectIpad())
        return true; else
        return false;
}
function DetectAndroid() {
    if ((uagent.search(deviceAndroid) > -1) || DetectGoogleTV())
        return true; if (uagent.search(deviceHtcFlyer) > -1)
        return true; else
        return false;
}
function DetectAndroidPhone() {
    if (DetectAndroid() && (uagent.search(mobile) > -1))
        return true; if (uagent.search(deviceHtcFlyer) > -1)
        return true; else
        return false;
}
function DetectAndroidTablet() {
    if (uagent.search(deviceHtcFlyer) > -1)
        return false; if (DetectAndroid() && !(uagent.search(mobile) > -1))
        return true; else
        return false;
}
function DetectAndroidWebKit() {
    if (DetectAndroid() && DetectWebkit())
        return true; else
        return false;
}
function DetectGoogleTV() {
    if (uagent.search(deviceGoogleTV) > -1)
        return true; else
        return false;
}
function DetectWebkit() {
    if (uagent.search(engineWebKit) > -1)
        return true; else
        return false;
}
function DetectS60OssBrowser() {
    if (DetectWebkit()) {
        if ((uagent.search(deviceS60) > -1 || uagent.search(deviceSymbian) > -1))
            return true; else
            return false;
    }
    else
        return false;
}
function DetectSymbianOS() {
    if (uagent.search(deviceSymbian) > -1 || uagent.search(deviceS60) > -1 || uagent.search(deviceS70) > -1 || uagent.search(deviceS80) > -1 || uagent.search(deviceS90) > -1)
        return true; else
        return false;
}
function DetectWindowsPhone7() {
    if (uagent.search(deviceWinPhone7) > -1)
        return true; else
        return false;
}
function DetectWindowsMobile() {
    if (DetectWindowsPhone7())
        return false; if (uagent.search(deviceWinMob) > -1 || uagent.search(deviceIeMob) > -1 || uagent.search(enginePie) > -1)
        return true; if ((uagent.search(devicePpc) > -1) && !(uagent.search(deviceMacPpc) > -1))
        return true; if (uagent.search(manuHtc) > -1 && uagent.search(deviceWindows) > -1)
        return true; else
        return false;
}
function DetectBlackBerry() {
    if (uagent.search(deviceBB) > -1)
        return true; if (uagent.search(vndRIM) > -1)
        return true; else
        return false;
}
function DetectBlackBerryTablet() {
    if (uagent.search(deviceBBPlaybook) > -1)
        return true; else
        return false;
}
function DetectBlackBerryWebKit() {
    if (DetectBlackBerry() && uagent.search(engineWebKit) > -1)
        return true; else
        return false;
}
function DetectBlackBerryTouch() {
    if (DetectBlackBerry() && ((uagent.search(deviceBBStorm) > -1) || (uagent.search(deviceBBTorch) > -1)))
        return true; else
        return false;
}
function DetectBlackBerryHigh() {
    if (DetectBlackBerryWebKit())
        return false; if (DetectBlackBerry()) {
        if (DetectBlackBerryTouch() || uagent.search(deviceBBBold) > -1 || uagent.search(deviceBBTour) > -1 || uagent.search(deviceBBCurve) > -1)
            return true; else
            return false;
    }
    else
        return false;
}
function DetectBlackBerryLow() {
    if (DetectBlackBerry()) {
        if (DetectBlackBerryHigh() || DetectBlackBerryWebKit())
            return false; else
            return true;
    }
    else
        return false;
}
function DetectPalmOS() {
    if (uagent.search(devicePalm) > -1 || uagent.search(engineBlazer) > -1 || uagent.search(engineXiino) > -1) {
        if (DetectPalmWebOS())
            return false; else
            return true;
    }
    else
        return false;
}
function DetectPalmWebOS() {
    if (uagent.search(deviceWebOS) > -1)
        return true; else
        return false;
}
function DetectWebOSTablet() {
    if (uagent.search(deviceWebOShp) > -1 && uagent.search(deviceTablet) > -1)
        return true; else
        return false;
}
function DetectGarminNuvifone() {
    if (uagent.search(deviceNuvifone) > -1)
        return true; else
        return false;
}
function DetectSmartphone() {
    if (DetectIphoneOrIpod() || DetectAndroidPhone() || DetectS60OssBrowser() || DetectSymbianOS() || DetectWindowsMobile() || DetectWindowsPhone7() || DetectBlackBerry() || DetectPalmWebOS() || DetectPalmOS() || DetectGarminNuvifone())
        return true; return false;
}; function DetectArchos() {
    if (uagent.search(deviceArchos) > -1)
        return true; else
        return false;
}
function DetectBrewDevice() {
    if (uagent.search(deviceBrew) > -1)
        return true; else
        return false;
}
function DetectDangerHiptop() {
    if (uagent.search(deviceDanger) > -1 || uagent.search(deviceHiptop) > -1)
        return true; else
        return false;
}
function DetectMaemoTablet() {
    if (uagent.search(maemo) > -1)
        return true; if ((uagent.search(linux) > -1) && (uagent.search(deviceTablet) > -1) && !DetectWebOSTablet())
        return true; else
        return false;
}
function DetectSonyMylo() {
    if (uagent.search(manuSony) > -1) {
        if (uagent.search(qtembedded) > -1 || uagent.search(mylocom2) > -1)
            return true; else
            return false;
    }
    else
        return false;
}
function DetectOperaMobile() {
    if (uagent.search(engineOpera) > -1) {
        if (uagent.search(mini) > -1 || uagent.search(mobi) > -1)
            return true; else
            return false;
    }
    else
        return false;
}
function DetectSonyPlaystation() {
    if (uagent.search(devicePlaystation) > -1)
        return true; else
        return false;
}; function DetectNintendo() {
    if (uagent.search(deviceNintendo) > -1 || uagent.search(deviceWii) > -1 || uagent.search(deviceNintendoDs) > -1)
        return true; else
        return false;
}; function DetectXbox() {
    if (uagent.search(deviceXbox) > -1)
        return true; else
        return false;
}; function DetectGameConsole() {
    if (DetectSonyPlaystation())
        return true; if (DetectNintendo())
        return true; if (DetectXbox())
        return true; else
        return false;
}; function DetectKindle() {
    if (uagent.search(deviceKindle) > -1)
        return true; else
        return false;
}
function DetectMobileQuick() {
    if (DetectTierTablet())
        return false; if (DetectSmartphone())
        return true; if (uagent.search(deviceMidp) > -1 || DetectBrewDevice())
        return true; if (DetectOperaMobile())
        return true; if (uagent.search(engineNetfront) > -1)
        return true; if (uagent.search(engineUpBrowser) > -1)
        return true; if (uagent.search(engineOpenWeb) > -1)
        return true; if (DetectDangerHiptop())
        return true; if (DetectMaemoTablet())
        return true; if (DetectArchos())
        return true; if ((uagent.search(devicePda) > -1) && !(uagent.search(disUpdate) > -1))
        return true; if (uagent.search(mobile) > -1)
        return true; if (DetectKindle())
        return true; return false;
}; function DetectMobileLong() {
    if (DetectMobileQuick())
        return true; if (DetectGameConsole())
        return true; if (DetectSonyMylo())
        return true; if (uagent.search(manuSamsung1) > -1 || uagent.search(manuSonyEricsson) > -1 || uagent.search(manuericsson) > -1)
        return true; if (uagent.search(svcDocomo) > -1)
        return true; if (uagent.search(svcKddi) > -1)
        return true; if (uagent.search(svcVodafone) > -1)
        return true; return false;
}; function DetectTierTablet() {
    if (DetectIpad() || DetectAndroidTablet() || DetectBlackBerryTablet() || DetectWebOSTablet())
        return true; else
        return false;
}; function DetectTierIphone() {
    if (DetectIphoneOrIpod())
        return true; if (DetectAndroidPhone())
        return true; if (DetectBlackBerryWebKit() && DetectBlackBerryTouch())
        return true; if (DetectPalmWebOS())
        return true; if (DetectGarminNuvifone())
        return true; if (DetectMaemoTablet())
        return true; else
        return false;
}; function DetectTierRichCss() {
    if (DetectMobileQuick()) {
        if (DetectTierIphone())
            return false; if (DetectWebkit())
            return true; if (DetectS60OssBrowser())
            return true; if (DetectBlackBerryHigh())
            return true; if (DetectWindowsPhone7())
            return true; if (DetectWindowsMobile())
            return true; if (uagent.search(engineTelecaQ) > -1)
            return true; else
            return false;
    }
    else
        return false;
}; function DetectTierOtherPhones() {
    if (DetectMobileLong()) {
        if (DetectTierIphone() || DetectTierRichCss())
            return false; else
            return true;
    }
    else
        return false;
}; function InitDeviceScan()
{ isIphone = DetectIphoneOrIpod(); isAndroidPhone = DetectAndroidPhone(); isTierIphone = DetectTierIphone(); isTierTablet = DetectTierTablet(); isTierRichCss = DetectTierRichCss(); isTierGenericMobile = DetectTierOtherPhones(); }; InitDeviceScan()
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 } ('h.i[\'1a\']=h.i[\'z\'];h.O(h.i,{y:\'D\',z:9(x,t,b,c,d){6 h.i[h.i.y](x,t,b,c,d)},17:9(x,t,b,c,d){6 c*(t/=d)*t+b},D:9(x,t,b,c,d){6-c*(t/=d)*(t-2)+b},13:9(x,t,b,c,d){e((t/=d/2)<1)6 c/2*t*t+b;6-c/2*((--t)*(t-2)-1)+b},X:9(x,t,b,c,d){6 c*(t/=d)*t*t+b},U:9(x,t,b,c,d){6 c*((t=t/d-1)*t*t+1)+b},R:9(x,t,b,c,d){e((t/=d/2)<1)6 c/2*t*t*t+b;6 c/2*((t-=2)*t*t+2)+b},N:9(x,t,b,c,d){6 c*(t/=d)*t*t*t+b},M:9(x,t,b,c,d){6-c*((t=t/d-1)*t*t*t-1)+b},L:9(x,t,b,c,d){e((t/=d/2)<1)6 c/2*t*t*t*t+b;6-c/2*((t-=2)*t*t*t-2)+b},K:9(x,t,b,c,d){6 c*(t/=d)*t*t*t*t+b},J:9(x,t,b,c,d){6 c*((t=t/d-1)*t*t*t*t+1)+b},I:9(x,t,b,c,d){e((t/=d/2)<1)6 c/2*t*t*t*t*t+b;6 c/2*((t-=2)*t*t*t*t+2)+b},G:9(x,t,b,c,d){6-c*8.C(t/d*(8.g/2))+c+b},15:9(x,t,b,c,d){6 c*8.n(t/d*(8.g/2))+b},12:9(x,t,b,c,d){6-c/2*(8.C(8.g*t/d)-1)+b},Z:9(x,t,b,c,d){6(t==0)?b:c*8.j(2,10*(t/d-1))+b},Y:9(x,t,b,c,d){6(t==d)?b+c:c*(-8.j(2,-10*t/d)+1)+b},W:9(x,t,b,c,d){e(t==0)6 b;e(t==d)6 b+c;e((t/=d/2)<1)6 c/2*8.j(2,10*(t-1))+b;6 c/2*(-8.j(2,-10*--t)+2)+b},V:9(x,t,b,c,d){6-c*(8.o(1-(t/=d)*t)-1)+b},S:9(x,t,b,c,d){6 c*8.o(1-(t=t/d-1)*t)+b},Q:9(x,t,b,c,d){e((t/=d/2)<1)6-c/2*(8.o(1-t*t)-1)+b;6 c/2*(8.o(1-(t-=2)*t)+1)+b},P:9(x,t,b,c,d){f s=1.l;f p=0;f a=c;e(t==0)6 b;e((t/=d)==1)6 b+c;e(!p)p=d*.3;e(a<8.w(c)){a=c;f s=p/4}m f s=p/(2*8.g)*8.r(c/a);6-(a*8.j(2,10*(t-=1))*8.n((t*d-s)*(2*8.g)/p))+b},H:9(x,t,b,c,d){f s=1.l;f p=0;f a=c;e(t==0)6 b;e((t/=d)==1)6 b+c;e(!p)p=d*.3;e(a<8.w(c)){a=c;f s=p/4}m f s=p/(2*8.g)*8.r(c/a);6 a*8.j(2,-10*t)*8.n((t*d-s)*(2*8.g)/p)+c+b},T:9(x,t,b,c,d){f s=1.l;f p=0;f a=c;e(t==0)6 b;e((t/=d/2)==2)6 b+c;e(!p)p=d*(.3*1.5);e(a<8.w(c)){a=c;f s=p/4}m f s=p/(2*8.g)*8.r(c/a);e(t<1)6-.5*(a*8.j(2,10*(t-=1))*8.n((t*d-s)*(2*8.g)/p))+b;6 a*8.j(2,-10*(t-=1))*8.n((t*d-s)*(2*8.g)/p)*.5+c+b},F:9(x,t,b,c,d,s){e(s==u)s=1.l;6 c*(t/=d)*t*((s+1)*t-s)+b},E:9(x,t,b,c,d,s){e(s==u)s=1.l;6 c*((t=t/d-1)*t*((s+1)*t+s)+1)+b},16:9(x,t,b,c,d,s){e(s==u)s=1.l;e((t/=d/2)<1)6 c/2*(t*t*(((s*=(1.B))+1)*t-s))+b;6 c/2*((t-=2)*t*(((s*=(1.B))+1)*t+s)+2)+b},A:9(x,t,b,c,d){6 c-h.i.v(x,d-t,0,c,d)+b},v:9(x,t,b,c,d){e((t/=d)<(1/2.k)){6 c*(7.q*t*t)+b}m e(t<(2/2.k)){6 c*(7.q*(t-=(1.5/2.k))*t+.k)+b}m e(t<(2.5/2.k)){6 c*(7.q*(t-=(2.14/2.k))*t+.11)+b}m{6 c*(7.q*(t-=(2.18/2.k))*t+.19)+b}},1b:9(x,t,b,c,d){e(t<d/2)6 h.i.A(x,t*2,0,c,d)*.5+b;6 h.i.v(x,t*2-d,0,c,d)*.5+c*.5+b}});', 62, 74, '||||||return||Math|function|||||if|var|PI|jQuery|easing|pow|75|70158|else|sin|sqrt||5625|asin|||undefined|easeOutBounce|abs||def|swing|easeInBounce|525|cos|easeOutQuad|easeOutBack|easeInBack|easeInSine|easeOutElastic|easeInOutQuint|easeOutQuint|easeInQuint|easeInOutQuart|easeOutQuart|easeInQuart|extend|easeInElastic|easeInOutCirc|easeInOutCubic|easeOutCirc|easeInOutElastic|easeOutCubic|easeInCirc|easeInOutExpo|easeInCubic|easeOutExpo|easeInExpo||9375|easeInOutSine|easeInOutQuad|25|easeOutSine|easeInOutBack|easeInQuad|625|984375|jswing|easeInOutBounce'.split('|'), 0, {}))
