<xen:if is="{$xenOptions.uix_useSameJsForAllStyles}">
<xen:set var="$uix_jsPathUsed">{$xenOptions.uix_jsPath}</xen:set>
<xen:else/>
<xen:set var="$uix_jsPathUsed">@uix_jsPath</xen:set>
</xen:if>
<xen:set var="$headerTabHeight_outer">{xen:calc '@headerTabHeight + @navTabs.border-top-width + @navTabs.border-bottom-width + @navTabs.padding-top + @navTabs.padding-bottom'}</xen:set>
<xen:set var="$uix_fixedNavigationHeight_outer">{xen:calc '@uix_fixedNavigationHeight + @uix_fixedNavigation_style.border-top-width + @uix_fixedNavigation_style.border-bottom-width + @uix_fixedNavigation_style.padding-top + @uix_fixedNavigation_style.padding-bottom'}</xen:set>
<xen:set var="$uix_tabLinksHeight_outer">{xen:calc '@uix_tabLinksHeight + @uix_tabLinks_style.padding-top + @uix_tabLinks_style.padding-bottom + @uix_tabLinks_style.border-bottom-width + @uix_tabLinks_style.border-top-width'}</xen:set>
<xen:set var="$uix_tabLinksHeightSticky_outer">{xen:calc '@uix_tabLinksHeightSticky + @uix_tabLinksSticky_style.padding-top + @uix_tabLinksSticky_style.padding-bottom + @uix_tabLinksSticky_style.border-bottom-width + @uix_tabLinksSticky_style.border-top-width'}</xen:set>
<xen:set var="$userBar_headerTabHeight_outer">{xen:calc '@uix_userBarHeight + @uix_userBar_style.border-top-width + @uix_userBar_style.border-bottom-width + @uix_userBar_style.padding-top + @uix_userBar_style.padding-bottom'}</xen:set>
<xen:set var="$userBar_uix_fixedNavigationHeight_outer">{xen:calc '@uix_fixedUserBarHeight + @uix_fixedUserBar_style.border-top-width + @uix_fixedUserBar_style.border-bottom-width + @uix_fixedUserBar_style.padding-top + @uix_fixedUserBar_style.padding-bottom'}</xen:set>
<xen:comment>LOAD FONTS</xen:comment>
<xen:if is="@uix_fontAwesome"><link href="@uix_fontAwesome" rel="stylesheet"></xen:if>
<xen:if is="@uix_googleFonts"><link href='//fonts.googleapis.com/css?family=@uix_googleFonts' rel='stylesheet' type='text/css'></xen:if>
<script src="{$jQuerySource}"></script>
<xen:if is="{$jQuerySource} != {$jQuerySourceLocal}">
<script>if (!window.jQuery) { document.write('<scr'+'ipt type="text/javascript" src="{$jQuerySourceLocal}"><\/scr'+'ipt>'); }</script>
</xen:if>
<xen:if is="{$xenOptions.uncompressedJs} == 1 OR {$xenOptions.uncompressedJs} == 3">
<script src="{$javaScriptSource}/jquery/jquery.xenforo.rollup.js?_v={$xenOptions.jsVersion}"></script>
</xen:if>
<script src="{xen:helper javaScriptUrl, '{$javaScriptSource}/xenforo/xenforo.js?_v={$xenOptions.jsVersion}'}"></script>
<!--XenForo_Require:JS-->
<xen:if is="@uix_ie8Support">
<!--[if lt IE 9]>
<xen:if is="@uix_ie8Support_local">
<script src="{$javaScriptSource}/audentio/{$uix_jsPathUsed}/ie8_polyfill.min.js"></script>
<xen:else />
<xen:comment> HTML5 Shim </xen:comment>
<script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.2/html5shiv.min.js"></script>
<xen:comment> Media queries for IE8 </xen:comment>
<script src="//cdnjs.cloudflare.com/ajax/libs/respond.js/1.4.2/respond.js"></script>
<xen:comment> CSS3 selectors for IE8 </xen:comment>
<script src="//cdnjs.cloudflare.com/ajax/libs/selectivizr/1.0.2/selectivizr-min.js"></script>
</xen:if>
<![endif]-->
</xen:if>
<script>
uix = {
elm: {},
fn:{},
init: function(){
if (uix.betaMode) {
console.group('uix.%cinit()', 'color:#3498DB');
}
for(var x=0;x<uix.events.init.length;x++){
uix.events.init[x]()
}
console.groupEnd('uix.%cinit()','color:#3498DB')
},
events: {init:[]},
on: function(event, fn){
if(event=='init'){
uix.events.init.push(fn)
}
},
betaMode : parseInt('@uix_beta'),
jsPathUsed : '{$uix_jsPathUsed}',
jsGlobal : parseInt('{$xenOptions.uix_useSameJsForAllStyles}'),
version : '@uix_version',
jsHeadVersion : '1.5.6.0',
addonVersion : '{$xenAddOns.uix}',
contentTemplate : '{$contentTemplate}',
globalPadding : parseInt('@uix_gutterWidth'),
sidebarWidth : parseInt('@sidebar.width'),
mainContainerMargin : '{xen:calc '@sidebar.width + @uix_gutterWidth'}px',
maxResponsiveWideWidth : parseInt('@maxResponsiveWideWidth'),
maxResponsiveMediumWidth : parseInt('@maxResponsiveMediumWidth'),
maxResponsiveNarrowWidth : parseInt('@maxResponsiveNarrowWidth'),
sidebarMaxResponsiveWidth : parseInt('@uix_sidebarMaxResponsiveWidth'),
<xen:if is="@uix_responsiveMessageBreakpoint == '100%'">
responsiveMessageBreakpoint : 99999,
<xen:else />
responsiveMessageBreakpoint : parseInt('@uix_responsiveMessageBreakpoint'),
</xen:if>
sidebarMaxResponsiveWidthStr : '@uix_sidebarMaxResponsiveWidth',
<xen:if is="@uix_rightPanelBreakpoint == '100%' || !@uix_rightPanelBreakpoint">
offCanvasRightTriggerWidth : 99999,
<xen:else />
offCanvasRightTriggerWidth : parseInt('@uix_rightPanelBreakpoint'),
</xen:if>
<xen:if is="@uix_leftPanelBreakpoint == '100%' || !@uix_leftPanelBreakpoint">
offCanvasLeftTriggerWidth : 99999,
<xen:else />
offCanvasLeftTriggerWidth : parseInt('@uix_leftPanelBreakpoint'),
</xen:if>
<xen:if is="@uix_offCanvasSidebarRight == 1">
<xen:if is="@uix_rightPanelBreakpoint == '100%' || !@uix_rightPanelBreakpoint">
offCanvasNavTriggerWidth : 99999,
<xen:else />
offCanvasNavTriggerWidth : parseInt('@uix_rightPanelBreakpoint'),
</xen:if>
<xen:elseif is="@uix_offCanvasSidebarLeft == 1" />
<xen:if is="@uix_leftPanelBreakpoint == '100%' || !@uix_leftPanelBreakpoint">
offCanvasNavTriggerWidth : 99999,
<xen:else />
offCanvasNavTriggerWidth : parseInt('@uix_leftPanelBreakpoint'),
</xen:if>
<xen:else />
offCanvasNavTriggerWidth : 99999,
</xen:if>
<xen:if is="@uix_offCanvasSidebarRight == 2">
<xen:if is="@uix_rightPanelBreakpoint == '100%' || !@uix_rightPanelBreakpoint">
offCanvasVisitorTriggerWidth : 99999,
<xen:else />
offCanvasVisitorTriggerWidth : parseInt('@uix_rightPanelBreakpoint'),
</xen:if>
<xen:elseif is="@uix_offCanvasSidebarLeft == 2" />
<xen:if is="@uix_leftPanelBreakpoint == '100%' || !@uix_leftPanelBreakpoint">
offCanvasVisitorTriggerWidth : 99999,
<xen:else />
offCanvasVisitorTriggerWidth : parseInt('@uix_leftPanelBreakpoint'),
</xen:if>
<xen:else />
offCanvasVisitorTriggerWidth : 99999,
</xen:if>
offcanvasTriggerAnimationDuration : parseInt('@uix_panelAnimationDuration'),
dropdownMenuAnimationSpeed : parseInt('@uix_dropdownMenuAnimationSpeed'),
inlineAlertBalloons : (parseInt('@uix_inlineAlertBalloon_navigation') && !parseInt('@uix_visitorTabsToUserBar')) || parseInt('@uix_visitorTabsToUserBar'),
jumpToFixedDelayHide : parseInt('@uix_jumpToTopFixed_delayHide'),
stickyNavigationMinWidth : parseInt('@uix_stickyNavigation_minWidth'),
stickyNavigationMinHeight : parseInt('@uix_stickyNavigation_minHeight'),
stickyNavigationMaxWidth : parseInt('@uix_stickyNavigation_maxWidth'),
stickyNavigationMaxHeight : parseInt('@uix_stickyNavigation_maxHeight'),
stickyNavigationPortraitMinWidth : parseInt('@uix_stickyNavigationPortrait_minWidth'),
stickyNavigationPortraitMinHeight : parseInt('@uix_stickyNavigationPortrait_minHeight'),
stickyNavigationPortraitMaxWidth : parseInt('@uix_stickyNavigationPortrait_maxWidth'),
stickyNavigationPortraitMaxHeight : parseInt('@uix_stickyNavigationPortrait_maxHeight'),
stickySidebar : {xen:if '@uix_sidebarMaxResponsiveWidth != "100%"', '@uix_collapsibleSidebar_sticky', 0},
<xen:if is="{$uix_sidebarLocation}">
sidebarInnerFloat : {xen:if "{$pageIsRtl}", '"right"', '"left"'},
<xen:else />
sidebarInnerFloat : {xen:if "{$pageIsRtl}", '"left"', '"right"'},
</xen:if>
RTL : {xen:if "{$pageIsRtl}", "1", "0"},
stickyItems : {},
stickyGlobalMinimumPosition : parseInt('@uix_stickyGlobalMinimumPosition'),
stickyGlobalScrollUp : parseInt('@uix_stickyGlobalScrollUp'),
stickyDisableIOSThirdParty : parseInt('@uix_disableStickyIOS'),
preventAlwaysSticky : parseInt('@uix_preventAlwaysSticky'),
searchMinimalSize : {xen:if '@uix_searchMinimalSize == "100%"', "99999", "parseInt('@uix_searchMinimalSize')"},
searchPosition : parseInt('<xen:comment> EDGE CASES WHERE SEARCH POSITION DEFAULTS TO 2 </xen:comment><xen:if is="( @uix_searchPosition == 1 && ( @uix_navStyle == 2 || (@uix_navStyle == 3 && @uix_pageStyle != 1) ) || (@uix_searchPosition == 0 && @uix_removeTabLinks) )">2<xen:else />@uix_searchPosition</xen:if>'),
nodeStyle : parseInt('@uix_nodeStyle'),
pageStyle : parseInt('@uix_pageStyle'),
enableBorderCheck : parseInt('@uix_enableBorderJS'),
enableULManager : parseInt('@uix_enableULManagerJs'),
threadSlidingAvatar : parseInt('@uix_threadSlidingAvatar'),
threadSlidingExtra : parseInt('@uix_threadSlidingExtra'),
threadSlidingHover : parseInt('@uix_threadSlidingHover'),
threadSlidingStaffShow : parseInt('{$xenOptions.uix_noCollapseStaffPost}'),
threadSlidingGlobalEnable : parseInt('{$xenOptions.uix_enableCollapseUserInfo}'),
signatureHidingEnabled : parseInt('@uix_signatureHidingEnabled'),
signatureHidingEnabledAddon : parseInt('{$xenOptions.uix_enableCollapseUserInfo}'),
signatureMaxHeight : parseInt('@uix_signatureMaxHeight'),
signatureHoverEnabled : parseInt('@uix_signatureHoverEnabled'),
enableStickyFooter : parseInt('@uix_enableStickyFooter'),
stickyFooterBottomOffset : parseInt('@uix_gutterWidth') * 2,
<xen:if is="@uix_nodeStyle == 3">
sidebarStickyBottomOffset : parseInt('{xen:calc '(@uix_gutterWidthSmall / 2)'}'),
<xen:else />
sidebarStickyBottomOffset : parseInt(0),
</xen:if>
<xen:if is="@uix_offCanvasSidebarLeft > 0 || @uix_offCanvasSidebarRight > 0">
offCanvasSidebar : 1,
<xen:if is="@uix_offCanvasSidebarLeft == 2 || @uix_offCanvasSidebarRight == 2">
offCanvasSidebarVisitorTabs : 1,
<xen:else />
offCanvasSidebarVisitorTabs : 0,
</xen:if>
<xen:else />
offCanvasSidebar : 0,
offCanvasSidebarVisitorTabs : 0,
</xen:if>
offcanvasLeftStatic : {xen:if {$visitor.user_id}, '1', {xen:if '@uix_offCanvasSidebarLeft==2', '0', '1'}} && parseInt('@uix_offCanvasSidebarLeftStatic') && parseInt('{xen:if '(@uix_offCanvasSidebarLeft != 4) OR (@uix_offCanvasSidebarLeft == 4 && {$sidebar})', '1', '0'}'),
offcanvasRightStatic : {xen:if {$visitor.user_id}, '1', {xen:if '@uix_offCanvasSidebarRight==2', '0', '1'}} && parseInt('@uix_offCanvasSidebarRightStatic') && parseInt('{xen:if '(@uix_offCanvasSidebarRight != 4) OR (@uix_offCanvasSidebarRight == 4 && {$sidebar})', '1', '0'}'),
offcanvasLeftStaticBreakpoint : parseInt('@uix_offCanvasSidebarLeftStaticBreakpoint'),
offcanvasRightStaticBreakpoint : parseInt('@uix_offCanvasSidebarRightStaticBreakpoint'),
reinsertWelcomeBlock : parseInt('@uix_reinsertWelcomeBlock'),
sidebarCookieExpire : '{$xenOptions.adhub_sidebarCollapseDays}',
canCollapseSidebar : '{$uix_canCollapseSidebar}',
cookiePrefix : '{xen:jsescape $xenOptions.cookieConfig.prefix}',
sidebarLocation : parseInt('{$uix_sidebarLocation}'),
collapsibleSidebar : parseInt('@uix_collapsibleSidebar'),
collapsedNodesDefault : '<xen:if is="is_array({$uix_collapsedNodes})"><xen:foreach loop="$uix_collapsedNodes" value="$nodeId">node_{$nodeId},</xen:foreach></xen:if>',
widthToggleUpper : '100%',
widthToggleLower : '@uix_pageWidth',
<xen:if is="@uix_pageWidth > 100">
toggleWidthEnabled : parseInt('@uix_widthToggle'),
<xen:else />
toggleWidthEnabled : false,
</xen:if>
toggleWidthBreakpoint : parseInt('{xen:calc '@uix_pageWidth + @pageWidth.padding-left + @pageWidth.padding-right'}'),
collapsibleNodes : parseInt('@uix_collapseNodes'),
collapsibleSticky : parseInt('@uix_collapseSticky'),
ajaxWidthToggleLink : '{xen:link uix/toggle-width}',
ajaxStickyThreadToggleLink : '{xen:link uix/toggle-sticky-threads}',
ajaxStickyThreadExpandLink : '{xen:link uix/expand-sticky-threads}',
ajaxStickyThreadCollapseLink : '{xen:link uix/collapse-sticky-threads}',
ajaxSidebarToggleLink : '{xen:link uix/toggle-sidebar}',
stickySidebarDelayInit : parseInt('@uix_stickySidebarDelayInit'),
user : {
'themeName' : '{$visitorStyle.title}',
'-themeParents' : '{$visitorStyle.parent_list}',
'-themeModified' : '{$visitorStyle.last_modified_date}',
'-themeSelectable' : '{$visitorStyle.user_selectable}',
languageName : '{$visitorLanguage.title}',
stickyEnableUserbar : (parseInt('{$visitor.uix_sticky_userbar}') == parseInt('{$visitor.uix_sticky_userbar}')) ? parseInt('{$visitor.uix_sticky_userbar}') : true,
stickyEnableNav : (parseInt('{$visitor.uix_sticky_navigation}') == parseInt('{$visitor.uix_sticky_navigation}')) ? parseInt('{$visitor.uix_sticky_navigation}') : true,
stickyEnableSidebar : (parseInt('{$visitor.uix_sticky_sidebar}') == parseInt('{$visitor.uix_sticky_sidebar}')) ? parseInt('{$visitor.uix_sticky_sidebar}') : true,
widthToggleState : (parseInt('{$visitor.uix_width}') == parseInt('{$visitor.uix_width}')) ? parseInt('{$visitor.uix_width}') : parseInt('{$xenOptions.uix_defaultWidth}'),
stickyThreadsState : (parseInt('{$uix_collapseStickyThreads}') == parseInt('{$uix_collapseStickyThreads}')) ? (parseInt('{$uix_collapseStickyThreads}') > 0) : 0,
<xen:if is="{$visitor.uix_sidebar} > {$uix_currentTimestamp}">
sidebarState : 1,
<xen:else />
sidebarState : 0,
</xen:if>
<xen:if is="!{$visitor.user_id} || {$visitor.uix_collapse_user_info}">
collapseUserInfo : 1,
<xen:else />
collapseUserInfo : 0,
</xen:if>
<xen:if is="!{$visitor.user_id} || {$visitor.uix_collapse_signature}">
signatureHiding : 1,
<xen:else />
signatureHiding : 0,
</xen:if>
isAdmin : parseInt('{$visitor.is_admin}"')
}
};
if(uix.stickyNavigationMaxWidth == 0){uix.stickyNavigationMaxWidth = 999999}
if(uix.stickyNavigationMaxHeight == 0){uix.stickyNavigationMaxHeight = 999999}
if(uix.stickyNavigationPortraitMaxWidth == 0){uix.stickyNavigationPortraitMaxWidth = 999999}
if(uix.stickyNavigationPortraitMaxHeight == 0){uix.stickyNavigationPortraitMaxHeight = 999999}
<xen:if is="@uix_stickyNavigation && ({$visitor.uix_sticky_navigation} || {$visitor.user_id} == 0)">
uix.stickyItems['#navigation'] = {normalHeight:parseInt('{$headerTabHeight_outer}'), stickyHeight:parseInt('{$uix_fixedNavigationHeight_outer}')}
var subElement = null;
<xen:if is="@uix_removeTabLinks == 0">
//if tablinks are visible
uix.stickyItems['#navigation'].options = {subElement: '#navigation .tabLinks', subNormalHeight: parseInt('{$uix_tabLinksHeight_outer}'), subStickyHeight: parseInt('{$uix_tabLinksHeightSticky_outer}'), subStickyHide: @uix_removeTabLinksSticky == 1 , scrollSticky: uix.stickyGlobalScrollUp }
<xen:else />
uix.stickyItems['#navigation'].options = {scrollSticky: uix.stickyGlobalScrollUp }
</xen:if>
</xen:if>
<xen:if is="@uix_stickyUserBar && ({$visitor.uix_sticky_userbar} || {$visitor.user_id} == 0)">
$(document).ready(function() {
if ( $('#userBar').length ) {
uix.stickyItems['#userBar']= {normalHeight:parseInt('{$userBar_headerTabHeight_outer}'), stickyHeight:parseInt('{$userBar_uix_fixedNavigationHeight_outer}')}
uix.stickyItems['#userBar'].options = {scrollSticky: uix.stickyGlobalScrollUp }
}
});
</xen:if>
<xen:include template="uix_quickScripts_head" />
uix.debug = function() {
result = "\n\n############============ Begin Copying Here ============############\n\n";
result += "Error: the functions file was not found.";
result += "\n\n############============ End Copying Here ============############\n\n";
console.log(result);
}
</script>
<script src="{$javaScriptSource}/audentio/{$uix_jsPathUsed}/functions{xen:if '!@uix_beta', '.min'}.js?_v={$xenOptions.jsVersion}_@uix_version"></script>
<script>
uix.adminJsError = function(errMsg) {
console.error(errMsg);
<xen:if is="{$visitor.is_admin}">
if (parseInt('{$xenOptions.uix_enableHelpfulAlerts}')) {
var errorEle = document.createElement("div");
errorEle.innerHTML = '<div class="uix_upgradeMessage importantMessage"><i class="uix_icon uix_icon-alerts"></i>' + errMsg.split('\n').join('<br />') + '</div>';
var contentPage = $('#content .pageContent');
if (contentPage.length) {
contentPage.prepend(errorEle);
}
}
</xen:if>
}
uix.fixJsVisibility = function() {
var userBar = $('.hasJs #userBar');
var nodeList = $('.hasJs #forums, .hasJs .category_view .nodeList, .hasJs .watch_forums .nodeList');
var panels = $('.js-uix_panels')
if (userBar.length) userBar.css('display', 'block');
if (nodeList.length) nodeList.css('visibility', 'visible');
if (panels.length) $('.js-uix_panels').removeClass('needsInit');
}
uix.catchJsError = function(err) {
console.log("\n\n############============ Begin Copying Here ============############\n\n")
var errMsg = "Uh Oh! It looks like there's an error in your page's javascript. There will likely be significant issues with the use of the forum until this is corrected. If you are unable to resolve this and believe it is due to a bug in your Audentio Design theme, contact Audentio support and include a copy of the text between the designated areas from your javascript console. This is the error: \n\n" + err ;
uix.fixJsVisibility();
uix.adminJsError(errMsg);
console.log("\n\n");
console.log(err);
console.log("\n\n");
try {
uix.debug(true);
} catch (err) {
console.log("Unable to include uix.debug();");
}
console.log("\n\n############============ End Copying Here ============############\n\n");
}
$(document).ready(function(){
if (typeof(audentio) === 'undefined') {
var errMsg = 'Uh Oh! It looks like the javascript for your theme was not found in /js/audentio/{$uix_jsPathUsed}/.\n\n';
if (uix.jsGlobal) {
errMsg += 'Your forum is set to use the same javascript directory for all your themes. Consider disabling this or modifying the directory. Options are located under Options > [UI.X] General.\n\n'
} else {
errMsg += 'Your theme has set the location of its javascript directory. You may need to modify the javascript directory location style property located under [UI.X] Global Settings > Javascript Path.\n\n'
}
errMsg += 'If your files are in the directory specified, ensure that your file permissions allow them to be read. There will likely be significant issues with the use of the forum until this is corrected. If you are unable to resolve this, contact Audentio support. This error has also been logged to the javascript console.';
uix.fixJsVisibility();
uix.adminJsError(errMsg);
} else if (uix.jsHeadVersion != uix.jsVersion) {
var errMsg = 'Uh Oh! It looks like the version of your javascript functions file does not match the version of your page_container_js_head template. \n\nYour javascript functions file is version "' + uix.jsVersion + '". \nYour page_container_js_head is version "' + uix.jsHeadVersion + '". \n\nIf your functions file version number is higher, ensure that you have merged all templates (especially page_container_js_head). If your page_container_js_head version number is higher, ensure that you have correctly uploaded the latest version of the javascript functions file and that you have cleared anything that could cache an old version of the javascript (CDN / Cloudflare / etc.). \n\nThis issue could cause parts of your forum to not display or function correctly. If this does not resolve the issue contact Audentio support. This error has also been logged to the javascript console.';
uix.adminJsError(errMsg);
}
});
</script>
<script>
try {
uix.dateHelper.phrase = {
now: '{xen:phrase uix_now}',
second: '{xen:phrase uix_second}',
minute: '{xen:phrase uix_minute}',
hour: '{xen:phrase uix_hour}',
day: '{xen:phrase uix_day}',
week: '{xen:phrase uix_week}',
year: '{xen:phrase uix_year}',
century: '{xen:phrase uix_century}',
ago: '{xen:phrase uix_x_ago}'
}
uix.sticky.stickyMinDist = parseInt('@uix_stickyGlobalMinTriggerDist');
$(document).ready(function(){
try {
<xen:if is="@uix_nodeStyle == 3">
audentio.grid.parse('{xen:raw $uix_nodeLayouts}');
<xen:include template="uix_grid_sizeListeners_js" />
</xen:if>
<xen:if is="@uix_postPagination">
audentio.pagination.enabled = true;
<xen:if is="@uix_postPaginationPos == 0">
audentio.grid.parentEle = 'navigation';
<xen:elseif is="@uix_postPaginationPos == 1" />
audentio.grid.parentEle = 'userBar';
</xen:if>
audentio.pagination.outOfPhrase = '{xen:phrase uix_x_out_of_y, 'x=<span id="audentio_postPaginationCurrent" class="uix_postPagination_x"></span>', 'y=<span id="audentio_postPaginationTotal" class="uix_postPagination_y"></span>'}';
audentio.pagination.enterIndexPhrase = '{xen:phrase uix_enter_index}';
audentio.pagination.offset = parseInt('@uix_postPaginationOffset');
</xen:if>
uix.initFunc();
} catch (err) {
uix.catchJsError(err);
}
});
} catch (err) {
uix.catchJsError(err);
}
</script>
<xen:if is="@uix_enableBackstretch && @uix_backstretchImages">
<script src="{$javaScriptSource}/audentio/{$uix_jsPathUsed}/backstretch.min.js?_v={$xenOptions.jsVersion}_@uix_version"></script>
<script>
$(document).ready(function() {
var backstretchImages = [@uix_backstretchImages];
function shuffle(array) {
var m = array.length, t, i;
// While there remain elements to shuffle…
while (m) {
// Pick a remaining element…
i = Math.floor(Math.random() * m--);
// And swap it with the current element.
t = array[m];
array[m] = array;
array = t;
}
return array;
}
backstretchImages = shuffle(backstretchImages);
$<xen:if is="@uix_backstretchSelector">("@uix_backstretchSelector")</xen:if>.backstretch(backstretchImages, {
fade: @uix_backstretchFade,
duration: @uix_backstretchDuration
});
});
</script>
</xen:if>