/*/////////////////////////////////////////////////////////////////////////////////////////////////////*/
/* 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 Flavorite theme functions */
	// set top margin for .logo img
	$('.logo img').css('margin-top',($('.siteHeader').outerHeight(true) - $('.logo img').outerHeight(true)) / 2 - 8).show();
	// generate #toolbar_vertical on the fly
	if ($('#toolbar_horizontal ul ul').length)
	{
		$('#toolbar_vertical').prepend($('#toolbar_horizontal > .toolbarList > .currentListItem > .toolbarList, #toolbar_horizontal > .toolbarList > .currentAncestorListItem > .toolbarList')).show();
	}
	// capture first and last items for toolbar_vertical
	$('#toolbar_vertical ul:first li:last a').css('border-style', 'none');
	$('#toolbar_vertical ul a:first').addClass('firstLink');
	$('#toolbar_vertical ul:first li:last').addClass('lastListItem');
	$('#toolbar_vertical ul:first li:last a').addClass('lastLink');
	// set width of .preContainer .preContent to .pageHeader
	$('.preContainer .preContent').width($('.pageHeader').outerWidth(true) - 29);
	// ExtraContent r1.3 02-23-09 12:33
	// plus slow slide in
	$('#myExtraContent1 script').remove();
	$('#myExtraContent1').appendTo('body #extraContainer1');
	var i=2;
	while (i<=10) {
		$('#myExtraContent'+i+' script').remove();
		$('#myExtraContent'+i).appendTo('body #extraContainer'+i).hide().slideDown(500);
		i++;
	}
	// hide empty ExtraContent areas
	$('#myExtraContent1').each(function(){
		$('.preContainer .preContent').show();
	});
	$('#myExtraContent2').each(function(){
		$('.mainContainer .preContent').show();
	});
	$('#myExtraContent3').each(function(){
		$('.postContainer').show();
	});
	$('#myExtraContent4').each(function(){
		$('.footerContainer .footerContent').show();
	});
	// if header height variable set .pageHeader/.seydoggySlideshow height to content height
	// test if varaible header is selected
	if(typeof headerHeightVariable != "undefined") {
		var tallest = 0;
		$('#extraContainer1 div').each(function(){
			if ( $(this).outerHeight(true) > tallest )
			tallest = $(this).outerHeight(true);
		});
		$('.pageHeader').height( tallest + 20);
		$('.seydoggySlideshow').height( tallest + 20);
	}
	// slow slide in for mainContainer
	$('.mainContainer').slideDown(500);
	// set height of File Sharing blocks to be the same
	$('.filesharing-item').seydoggySetHeight(40);
	// set width of File Sharing blocks according to available space
	$('.filesharing-item').width($('.mainContent_inner').outerWidth(true) / 4 - 20);
	// test for blog/file sharing vs normal
	if($('.blog-entry,.mainContainer .filesharing-item').length){
		$('.blog-entry,.mainContainer .filesharing-item').wrapInner('<div class="entry_inner"/>');
		$('.entry_inner').css('padding','1em');
		$('.blog-entry,.mainContainer .filesharing-item').addClass('contentBox');
		$('.mainContainer_bg').css('padding','15px 0 0.5em');
		$('.contentBox').css('padding','0');
		$('.mainContent_inner').css({
			'background-color':'transparent',
			'padding':'0',
			'border-style':'none'
		});
	}else{
		$('.mainContent_inner').addClass('contentBox');
	}
	// test for FAQMaker
	if($('.faq-rss-link,.faq-pdf-link').length){
		$('.plugin_sidebar').addClass('contentBox sidebarFAQ').css({'padding':'1em','margin-top':'1.5em'});
	}
	// hide empty sidebar
	if ($('.sidebar_title').html() != "" || $('.sidebar').html() != "")
	{
		$('.sidebarContent').show();
	}
	//  pad footer if present and EC4 is present
	if ($('.footerContainer .footerNormal').html() != "" && $('#myExtraContent4').length)
	{
		$('.footerContainer .footerNormal').css('padding-top','2em');
	}
	// ignore png backgrounds in Internet Explorer 6
	if ($.browser.msie && $.browser.version == 6)// if IE6 and IE7
	{
		$('#toolbar_vertical ul a,#toolbar_vertical, .postContainer_bg, .postContainer, .mainContainer .preContent, .mainContainer, .preContainer').css('background-image','none');
	}
	/* @end */
});
// test to see if user has selected a slideshow option
if(typeof slideshowEnabled != "undefined") {
	include(jsPathto + 'scripts/slideshow/seydoggy.slideshow.js');
}

