/*/////////////////////////////////////////////////////////////////////////////////////////////////////*/
/* seydoggy.js.min */
/* @group phpjs.include */function include(script_filename) { document.write('<' + 'script'); document.write(' src="' + script_filename + '">'); document.write('' + 'script' + '>'); }/* @end */
/* @group jsPathto *//*jsPathto v0.0.1 01-26-09 10:43*/ function rtrim ( str, charlist ) { charlist = !charlist ? ' \s\xA0' : (charlist+'').replace(/([\[\]\(\)\.\?\/\*\{\}\+\$\^\:])/g, '\$1'); var re = new RegExp('[' + charlist + ']+$', 'g'); return (str+'').replace(re, ''); } trimFromPatha = "/seydoggy.js"; jsPathtoa = rtrim(rwPathto, trimFromPatha); trimFromPathb = "scripts"; jsPathto = rtrim(jsPathtoa, trimFromPathb);/* @end */
/* @group seydoggySetHeight plugin v1.0.1 06-28-10 13:29 */(function($) { $.fn.seydoggySetHeight = function(value) { var tallest = 0; $(this).each(function(){ if ($(this).outerHeight(true) > tallest) tallest = $(this).outerHeight(true); }); $(this).height(tallest + value); }; })(jQuery);/* @end */
/* @group rwPageOn plugin v1.0.0 05-13-10 14:25 */(function($){ $.fn.rwPageOn = function(){ var i = 0; var rwPage = $(this)[0]; for (i = 0; i <= 10; i++ ) { if ($($(this)[i]).length > 0) { rwPage = $(this)[i]; break; } } return rwPage; }; })(jQuery);/* @end */
/*////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/
jQuery.noConflict();
jQuery(document).ready(function($){
/* @group Creami3 theme functions */
// kill padding used until js loads
$('.logo img,.title').css('padding-top','0');
// vertical center logo
if ($('.logo img').length > 0) {
var vcenterHeight = $('.logo').outerHeight(true);
var vcenterParentHeight = $('.siteHeader').innerHeight(true);
$('.logo').css('margin-top',((vcenterParentHeight - vcenterHeight) / 2));
}
// vertical center title
if ($('.title h1').html().length > 0) {
var vcenterHeight = $('.title').outerHeight(true);
var vcenterParentHeight = $('.siteHeader').innerHeight(true);
$('.title').css('margin-top',((vcenterParentHeight - vcenterHeight) / 2));
}
// toolbar split/vertical options
if (verticalNavigation == 0)
{
if ($('#toolbar_horizontal').children()) {
// vertical center toolbar horizontal
var vcenterHeight = $('#toolbar_horizontal').outerHeight(true);
var vcenterParentHeight = $('.siteHeader').innerHeight(true);
$('#toolbar_horizontal').css('margin-top',((vcenterParentHeight - vcenterHeight) / 2) + 2);
// show navigation children
$($('#toolbar_horizontal').children()).parent().show();
// generate #toolbar_sub on the fly
if ($('#toolbar_horizontal ul ul').length)
{
$('#toolbar_sub').prepend($('#toolbar_horizontal > .toolbarList > .currentListItem > .toolbarList, #toolbar_horizontal > .toolbarList > .currentAncestorListItem > .toolbarList').clone()).show();
$('#toolbar_sub ul').append('
');
}
// generate #toolbar_vertical on the fly
if ($('#toolbar_horizontal ul ul ul').length)
{
// crush % rounding in all browsers with Math.floor()
var wrapperWidth = Math.floor($('.wrapper').width());
$('.wrapper').width(wrapperWidth);
var mainContentWidth = Math.floor($('.mainContent').width());
$('.mainContent').width(mainContentWidth);
// test user font-size selection and set to %
var percentfontsize = 100 * parseFloat($('body').css('font-size')) / parseFloat($('html').css('font-size'));
// adjust navigation offset based on font-size selection
if (percentfontsize >= 60) var offset = 21;
if (percentfontsize >= 70) var offset = 25;
if (percentfontsize >= 85) var offset = 29;
if (percentfontsize >= 100) var offset = 33;
if (percentfontsize >= 115) var offset = 39;
var sidenavWidth = wrapperWidth - mainContentWidth - offset;
// prepend #toolbar_horizontal ul ul ul to #toolbar_vertical
$('#toolbar_vertical').prepend($('#toolbar_horizontal > .toolbarList > .currentAncestorListItem > .toolbarList > .currentListItem > .toolbarList, #toolbar_horizontal > .toolbarList > .currentAncestorListItem > .toolbarList > .currentAncestorListItem > .toolbarList')).width(sidenavWidth).show();
}
// styles for navigation center
if ($('#toolbar_horizontal').css('float') == 'none') {
$('#toolbar_horizontal').width($('#toolbar_horizontal ul:first').outerWidth(true) + 1);
}
}
}else if (verticalNavigation == 1) {
if ($('#toolbar_horizontal').children())
{
// crush % rounding in all browsers with Math.floor()
var wrapperWidth = Math.floor($('.wrapper').width());
$('.wrapper').width(wrapperWidth);
var mainContentWidth = Math.floor($('.mainContent').width());
$('.mainContent').width(mainContentWidth);
var sidenavWidth = wrapperWidth - mainContentWidth - 29;
$('#toolbar_vertical').prepend($('#toolbar_horizontal > ul')).width(sidenavWidth).show();
$('#toolbar_horizontal').remove();
}
}
// set width of .headerContainer .preContent to .pageHeader
$('.headerContainer .preContent').width($('.pageHeader').outerWidth(true) - 29);
// set width of File Sharing blocks according to available space
$('.filesharing-item').width($('.mainContent').outerWidth(true) / 3 - 45).addClass('radiusAll contentShadow');
// set height of File Sharing blocks to be the same
$('.filesharing-item').seydoggySetHeight(0);
// style movie/photo thumbnails
$('.movie-thumbnail-frame img, .thumbnail-frame img').addClass('radiusAll contentShadow');
// styles for sidebar
if ($('.sidebarContent').css('float') == 'left') {
// styles for left sidebar
$('.mainContent').css('min-height',$('.sidebarContent').outerHeight(true));
$('.mainContent').addClass('outerShadowLeft');
if ($('#toolbar_vertical ul').length) {
$('#toolbar_vertical').addClass('innerShadowRight');
// make sidenav .current state wider to cover border
if ($.browser.mozilla) {
// if FireFox
var sidenavWidth = sidenavWidth - 1;
$('#toolbar_vertical').width(sidenavWidth);
}
$('#toolbar_vertical .currentListItem').width(sidenavWidth + 1);
$('#toolbar_vertical .currentListItem .toolbarList').width(sidenavWidth);
}
} else if ($('.sidebarContent').css('float') == 'right') {
// styles for right sidebar
$('.mainContent').css('min-height',$('.sidebarContent').outerHeight(true));
$('.mainContent').addClass('outerShadowRight');
if ($('#toolbar_vertical ul').length) {
$('#toolbar_vertical').addClass('innerShadowLeft');
// make sidenav .current state wider to cover border
if ($.browser.mozilla) {
// if FireFox
var sidenavWidth = sidenavWidth - 1;
$('#toolbar_vertical').width(sidenavWidth);
}
$('#toolbar_vertical .currentListItem').width(sidenavWidth + 1).css({'position':'relative','left':'-1px'});
$('#toolbar_vertical .currentListItem .toolbarList').width(sidenavWidth).css({'position':'relative','left':'1px'});
}
}
// styles for title center
if ($('.titleBlock').css('float') == 'none') {
var logoWidth = $('.logo').outerWidth(true);
var titleWidth = $('.title').outerWidth(true);
var titleBlockWidth = logoWidth + titleWidth;
$('.titleBlock').width(titleBlockWidth);
if ($('.logo img').length == 0) {
$('.title').css({
'margin-left':'0',
'text-align':'center'
});
}
}
// show Photo Album elements
if ($('.album-title').html() == "" && $('.album-description').html() == "") {
$('.album-wrapper').css('margin-top','3em').append('
');
} else if ($('.album-title').html() != "" && $('.album-description').html() == "") {
$('.album-title').show().css('margin-bottom','1em');
} else if ($('.album-title').html() == "" && $('.album-description').html() != "") {
$('.album-description').show();
} else if ($('.album-title').html() != "" && $('.album-description').html() != "") {
$('.album-title,.album-description').show();
}
// ExtraContent r1.4.2 w/jQuery
var extraContent = (function() { var ecValue = 6; for (i=1;i<=ecValue;i++) { $('#myExtraContent'+i+' script').remove(); $('#myExtraContent'+i).appendTo('#extraContainer'+i).show(); } })();
// unhide empty ExtraContent areas
if ($('#myExtraContent1').length > 0) $('.headerContainer .preContent').show();
if ($('#myExtraContent2').length > 0) $('.preContainer').show();
if ($('#myExtraContent3').length > 0) $('.mainContainer .preContent').show();
if ($('#myExtraContent4').length > 0) $('.mainContainer .postContent').show();
if ($('#myExtraContent5').length > 0) $('.postContainer').show();
if ($('#myExtraContent6').length > 0) $('.footerContainer .preContent').show();
// shadow type on ExtraContent areas
if ($('#myExtraContent2').length == 0 && $('#myExtraContent3').length > 0) {
$('.mainContainer .preContent').removeClass('innerShadowBottom').addClass('innerShadowTopBottom');
}
if ($('#myExtraContent5').length > 0 && $('#myExtraContent6').length == 0) {
$('.postContainer').removeClass('innerShadowTop').addClass('innerShadowTopBottom');
}
if ($('#myExtraContent4').length > 0 && $('#myExtraContent6').length == 0 && $('#myExtraContent5').length == 0) {
$('.mainContainer .postContent').removeClass('innerShadowTop').addClass('innerShadowTopBottom');
}
// border type on mainContent sans ExtraContent
if ($('#myExtraContent2').length == 0 && $('#myExtraContent3').length == 0) {
$('.contentContainer').css('border-top-style','none');
}
if ($('#myExtraContent4').length == 0 && $('#myExtraContent5').length == 0 && $('#myExtraContent6').length == 0) {
$('.contentContainer').css('border-bottom-style','none');
}
// if header height variable set .pageHeader/.seydoggySlideshow height to content height
// test if varaible header is selected
if(typeof headerHeightVariable != "undefined"){
ecTallest = 0;
$('#extraContainer1 div').each(function() {
if ($(this).outerHeight(true) > ecTallest) ecTallest = $(this).outerHeight(true);
});
$('.seydoggySlideshow,.pageHeader').height(ecTallest + 30);
}
// show copyright area and adjust positions and styles accordingly
// if copyright or breadcrumb is present
if (($('.footer').html() != "") || ($('.breadcrumbContainer').length))
{
$('.copyright').show();
}else {
// if niether is present
$('.copyright').css('border-top-style','none');
// if no copyright/breadcrumb and no ExtraContent
if ($('#myExtraContent4').length == 0 && $('#myExtraContent5').length == 0 && $('#myExtraContent6').length == 0) {
$('.contentContainer').css('border-bottom-style','none').addClass('radiusBottom');
$('.copyright').css('border-top-style','none');
// bottom behaviour of main content and sidebar
if ($('.sidebarContent').css('float') == 'left') {
// if sidebar left
$('.sidebarContent').addClass('radiusBottomLeft');
$('.mainContent').addClass('radiusBottomRight');
} else if ($('.sidebarContent').css('float') == 'right') {
// if sidebar right
$('.sidebarContent').addClass('radiusBottomRight');
$('.mainContent').addClass('radiusBottomLeft');
} else if ($('.sidebarContent').css('display') == 'none') {
// if sidebar hide
$('.mainContent').addClass('radiusBottom');
}
// if no copyright/breadcrumb but has ExtraContent 4
}else if ($('#myExtraContent4').length > 0 && $('#myExtraContent5').length == 0 && $('#myExtraContent6').length == 0) {
$('.mainContainer .postContent').removeClass('innerShadowTopBottom').addClass('radiusBottom innerShadowTop');
// if no copyright/breadcrumb but has ExtraContent 5
}else if ($('#myExtraContent5').length > 0 && $('#myExtraContent6').length == 0) {
$('.postContainer').removeClass('innerShadowTopBottom').addClass('radiusBottom innerShadowTop');
// if no copyright/breadcrumb but has ExtraContent 6
}else if ($('#myExtraContent6').length > 0) {
$('.footerContainer').addClass('radiusBottom');
$('.footerContainer').removeClass('innerShadowTopBottom').addClass('innerShadowTop');
}
}
// if copyright/breadcrumb are both present
if (($('.footer').html() != "") && ($('.breadcrumbContainer').length)){
$('.footer').css({
'float':'left',
'text-align':'left'
});
$('.breadcrumbContainer').css({
'float':'right',
'text-align':'right'
});
}
// remove leading breadcrumb separator
$('.separator:first').hide();
/* @end */
});
// test to see if user has selected a slideshow option
if(typeof slideshowEnabled != "undefined") {
include(jsPathto + 'scripts/slideshow/seydoggy.slideshow.js');
}