/*/////////////////////////////////////////////////////////////////////////////////////////////////////*/
/* 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.0 05-13-10 14:27 */(function($) { $.fn.seydoggySetHeight = function() { var tallest = 0; $(this).each(function(){ if ($(this).outerHeight(true) > tallest) tallest = $(this).outerHeight(true); }); $(this).height(tallest); }; })(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 Havnit theme functions */
	// generate #toolbar_sub on the fly
	if ($('#toolbar_horizontal ul ul').length)
	{
		$('.mainContainer .preContent').addClass('radius0');/* removes rounded corners when bumped down by the toolbar_sub */
		$('#toolbar_sub').prepend($('#toolbar_horizontal > .toolbarList > .currentListItem > .toolbarList, #toolbar_horizontal > .toolbarList > .currentAncestorListItem > .toolbarList').clone()).show();
	}
	// generate #toolbar_vertical on the fly
	if ($('#toolbar_horizontal ul ul ul').length)
	{
		$('#toolbar_vertical').prepend($('#toolbar_horizontal > .toolbarList > .currentAncestorListItem > .toolbarList > .currentListItem > .toolbarList, #toolbar_horizontal > .toolbarList > .currentAncestorListItem > .toolbarList > .currentAncestorListItem > .toolbarList')).show();
	}
	//  hide empty top nav/footer
	$($('#toolbar_horizontal').children(), '.breadcrumbContainer').parent().show();
	if ($('.footerContent').children().length)
	{
		$('.footerContainer').show();
	}
	// set width of .preContainer .preContent to .pageHeader
	$('.preContainer .preContent').width($('.pageHeader').outerWidth(true) - 74);
	// additional breadcrumb seprator styling
	$('.breadcrumbList').append('/');
	$('.breadcrumbList li:last').css('margin','0 5px');
	$('.breadcrumbList li a:last').css('margin','0 5px');
	// no margin/padding on last blog entry
	$('.blog-entry:last').css({'margin':'0','padding':'0'});
	// set height of File Sharing blocks to be the same
	$('.filesharing-item').seydoggySetHeight();
	// set height .mainContent to that of .sidebarContent if shorter
	$('.mainContent').css('min-height',$('.sidebarContent').outerHeight(true));
	// set top margin for #toolbar_horizontal
	$('#toolbar_horizontal').css('margin-top',($('.siteHeader').outerHeight(true) - $('#toolbar_horizontal').outerHeight(true)) / 2);
	// set top margin for .siteHeader .title
	$('.siteHeader .title').css('margin-top',($('.siteHeader').outerHeight(true) - $('.siteHeader .title').outerHeight(true)) / 2);
	// set top margin for .logo img
	$('.logo img').css('margin-top',($('.siteHeader').outerHeight(true) - $('.logo img').outerHeight(true)) / 2)
	// hide empty ExtraContent areas
	$('#myExtraContent1').each(function(){
		$('.preContainer .preContent').show();
	});
	$('#myExtraContent2').each(function(){
		$('.mainContainer .preContent').show();
	});
	$('#myExtraContent3').each(function(){
		$('.mainContainer .postContent').show();
	});
	$('#myExtraContent4').each(function(){
		$('.postContainer').show();
	});
	/* @end */
});