/*/////////////////////////////////////////////////////////////////////////////////////////////////////*/
/* seydoggy.js.min */
/* @group phpjs.include */var include = function(script_filename) { document.write('<' + 'script'); document.write(' src="' + script_filename + '">'); document.write('</' + 'script' + '>'); }/* @end */
/* @group RwGet */RwGet = { pathto: function(path, file) { var rtrim = function(str, list) { var charlist = !list ? 's\xA0': (list + '').replace(/([\[\]\(\)\.\?\/\*\{\}\+\$\^\:])/g, '$1'); var re = new RegExp('[' + charlist + ']+$', 'g'); return (str + '').replace(re, ''); }; var jspathto = rtrim(RwSet.pathto, "javascript.js"); if ((path !== undefined) && (file !== undefined)) { jspathto = jspathto + path + file; } else if (path !== undefined) { jspathto = jspathto + path; } return jspathto; }, baseurl: function(path, file) { var jsbaseurl = RwSet.baseurl; if ((path !== undefined) && (file !== undefined)) { jsbaseurl = jsbaseurl + path + file; } else if (path !== undefined) { jsbaseurl = jsbaseurl + path; } return jsbaseurl; } };/* @end */
/* @group rwAddLinks v1.0.0 06-17-11 07:54*/ (function($) { $.fn.rwAddLinks = function(linkArr) { var i = 0; $(this).each(function(i) { $(this).click(function() { location.href = linkArr[i++]; }).hover(function() { $(this).css("cursor", "pointer"); }); }); }; })(jQuery); /* @end */
/* @group sdVertAlign 2.0.0 07-29-11 11:53*/ (function($) { $.fn.sdVertAlign = function(parent) { var vcenterParentHeight = $(parent).innerHeight(true); var vcenterHeight = $(this).innerHeight(true); $(this).css('padding-top', ((vcenterParentHeight - vcenterHeight) / 2)); }; })(jQuery);
/* @group sdSetHeight 1.1.0 07-28-11 12:07 */ (function($) { $.fn.sdSetHeight = function(elem, value) { sdTallest = 0; $(elem).each(function() { var thisTallest = $(this).outerHeight(true); if (thisTallest > sdTallest) sdTallest = thisTallest; }); $(this).height(sdTallest + value); }; })(jQuery); /* @end */
/*////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/

jQuery.noConflict();
jQuery(document).ready(function($){
	var sdCRE4MYFunctions = (function(){
		// VARIABLES
		var hContainer = $('.headerContainer');
		var siteLogo = $('.logo img');
		var title = $('.title');
		var siteTitle = $('.title h1');
		var siteSlogan = $('.title h2');
		var siteHeader = $('.siteHeader');
		var tbh = '#toolbar_horizontal';
		var tbs = '#toolbar_sub';
		var tbv = '#toolbar_vertical';
		var tbH = $(tbh);
		var tbS = $(tbs);
		var tbV = $(tbv);
		var tbhLast = $('#toolbar_horizontal > .toolbarList > li:last >  a');
		var noHeader = false;
		if (hContainer.css('display') == 'none') noHeader = true;
		var hPreContent = $('.headerContainer .preContent');
		var emptySub = false;
		if ((sdNavigationType == 1 || sdNavigationType == 3 || sdNavigationType == 4) || (sdNavigationType == 0 && !($(tbh + ' ul ul').length))) emptySub = true;
		var mPreContent = $('.mainContainer .preContent');
		var mContent = $('.mainContent');
		var cContainer = $('.contentContainer');
		var sContent = $('.sidebarContent');
		var fContainer = $('.footerContainer');
		var footer = $('.footer');
		var copyright = $('.copyright');
		var bContainer = $('.breadcrumbContainer');
		// GLOBAL VARIABLES
		seydoggy = {};
	    seydoggy.sdSlideshow = $('.seydoggySlideshow');
		seydoggy.isVariable = typeof headerHeightVariable != 'undefined';
		seydoggy.slideHeader = $('.seydoggySlideshow,.pageHeader');
		seydoggy.pageHeader = $('.pageHeader');
		seydoggy.emptyBar = false;
		if (!(siteLogo.length) && !(siteTitle.html().length) && !(siteSlogan.html().length) && sdNavigationType >= 2) seydoggy.emptyBar = true;

		// FUNCTIONS
		/* @group ExtraContent */
		// function/styles for ExtraContent
		var sdExtracontent = (function(){
			// VARIABLES
			var myEC = '#myExtraContent';
			var ec = [
			hPreContent,
			$('.preContainer'),
			mPreContent,
			$('.mainContainer .postContent'),
			$('.postContainer'),
			fContainer
			];
			
			/* ExtraContent (jQuery) VERSION: r1.4.2 */
			var extraContent =  (function() {
				// change ecValue to suit your theme
				var ecValue = 6;
				for (i=1;i<=ecValue;i++) {
					if ($(myEC + i).length) {
						$(myEC + i + ' script').remove();
						$(myEC + i).appendTo('#extraContainer'+i).show();
						// !hide !empty ExtraContent areas
						ec[i-1].show();
					}
				}
			})();
		})();
		/* @end */
		
		/* @group Header Height */
		var sdHeader = (function(){
			if(typeof sdSlideNum == "undefined") {
				// if header height variable set .pageHeader/.seydoggySlideshow height to content height
				if (seydoggy.isVariable) {
					seydoggy.slideHeader.sdSetHeight('#extraContainer1 div',29);
				}
			}
		})();
		/* @end */

		/* @group title vertical alignment */
		var sdTitleValign = (function(){
			var thisParent = title;
			if (!(siteTitle.html().length && siteSlogan.html().length)) {
				// vertical center just title
				if (siteTitle.html().length && !siteSlogan.html().length) siteTitle.sdVertAlign(thisParent);
				// vertical center just slogan
				else siteSlogan.sdVertAlign(thisParent);
			}
			// vertical center logo
			thisParent = siteHeader;
			if (siteLogo.length > 0) {
				siteLogo.sdVertAlign(thisParent);
			}
		})();
		/* @end */

		/* @group rounding */
		var sdRounding = (function(){
			/* @group header/toolbar rounding */
			var headRound = (function(){
				// !round top of #toolbar_horizontal if header is used
				if (noHeader == false) {
					// handle the title bar when all elements are empty
					if (seydoggy.emptyBar == true) {
						seydoggy.slideHeader.removeClass('radiusTop').addClass('radiusAll');
						siteHeader.hide();
					}
					if (sdTopbarPosition == 1) {
						// move siteHeader above header
						hContainer.parent().prepend(siteHeader.removeClass('radiusAll').addClass('radiusTop'));
						if (seydoggy.emptyBar == false) seydoggy.slideHeader.removeClass('radiusTop').addClass('radiusBottom');
						// round lower right corner of last link
						if (sdNavigationType <= 1) tbhLast.addClass('radiusTopRight');
						// remove top border from .seydoggySlideshow
						seydoggy.sdSlideshow.css('border-top-style','none');
						
					} else {
						// remove bottom borders from title bar
						siteHeader.removeClass('radiusAll').addClass('radiusBottom');
						// round lower right corner of last link
						if (sdNavigationType <= 1) tbhLast.addClass('radiusBottomRight');
						// remove bottom border from .seydoggySlideshow
						seydoggy.sdSlideshow.css('border-bottom-style','none');
					}
				} else {
					// round both right corners of last link
					if (sdNavigationType <= 1) tbhLast.addClass('radiusRight');
					// handle the title bar when all elements are empty
					if (seydoggy.emptyBar == true) siteHeader.hide();
				}
			})();
			/* @end */
			/* @group content round */
			var contentRound = (function(){
				//VARIABLES
				var thisEC3 = $('#myExtraContent3');
				var thisEC4 = $('#myExtraContent4');
				// adjust top and bottom radius of contentContainer accordingly
				if ((thisEC3.length && thisEC4.length) || (emptySub == false && thisEC4.length)) {
					cContainer.removeClass('radiusAll').css({
						'border-top-style':'none',
						'border-bottom-style':'none'
					});
				} else if (thisEC3.length || emptySub == false) {
					cContainer.removeClass('radiusAll').addClass('radiusBottom').css({
						'border-top-style':'none'
					});
				} else if (thisEC4.length)	{
					cContainer.removeClass('radiusAll').addClass('radiusTop').css({
						'border-bottom-style':'none'
					});
				}
				if (emptySub == false) mPreContent.css('border-top-style','none');
			})();
			/* @end */
			var footerRound = (function() {
				// VARIABLES
				var thisEC6 = $('#myExtraContent6');
				var cbColor = copyright.css('border-color');
			    // adjust copyright/footer top/bottom radius accordingly
			    if (thisEC6.length) copyright.removeClass('radiusAll').addClass('radiusBottom'), $('.breadcrumbContainer > ul > li:last >  a').addClass('radiusBottomRight');
			    else $('.breadcrumbContainer > ul > li:last >  a').addClass('radiusRight');
			    // hide empty copyright area and adjust positions and styles accordingly
			    if ((footer.html().length) || (bContainer.length)) copyright.show(), fContainer.css('border-bottom-style','none');
			    else fContainer.removeClass('radiusTop').addClass('radiusAll');
			    // styles for copyright/breadcrumb
			    if ((footer.html() != "") && (bContainer.length)) footer.css({'float': 'left','text-align': 'left'});
			})();
		})();
		/* @end */
		
		/* @group toolbar split/vertical options */
		var sdNavOptions = (function(){
			if (tbH.children()) {
				if (sdNavigationType <= 1) {
					// if option 3-tier or 2-tier (a)
					// show navigation children
					$(tbH.children()).parent().show();
					// generate #toolbar_sub/#toolbar_vertical on the fly
					if ($(tbh + ' ul ul').length) {
						if (sdNavigationType == 0) {
							// generate #toolbar_sub on the fly
							tbS.prepend($(tbh + ' > .toolbarList > .currentListItem > .toolbarList, ' + tbh + ' > .toolbarList > .currentAncestorListItem > .toolbarList')).show();
							// round first list item
							$(tbs + ' > .toolbarList > li:first >  a').addClass('radiusTopLeft');
							// clear #toolbar_sub floats
							$(tbs + ' ul').append('<div class="clear">');
							// generate #toolbar_vertical on the fly
							if ($(tbs + ' ul ul').length) {
								// prepend #toolbar_sub ul ul to #toolbar_vertical
								tbV.prepend($(tbs + ' > .toolbarList > .currentListItem > .toolbarList, ' + tbs + ' > .toolbarList > .currentAncestorListItem > .toolbarList')).show();
							}
						}else{
							// generate #toolbar_vertical on the fly
							tbV.prepend($(tbh + ' > .toolbarList > .currentListItem > .toolbarList, ' + tbh + ' > .toolbarList > .currentAncestorListItem > .toolbarList')).show();
							// round .mainContainer .preContent
							mPreContent.addClass('radiusTop');
						}					
					} else {
						mPreContent.addClass('radiusTop');
					}
				}else{
					// if option 2-tier (b) or Vertical
					if (sdNavigationType == 2) {
						tbS.prepend($(tbh + ' > ul')).show();
						// clear #toolbar_sub floats
						$(tbs + ' ul').append('<div class="clear">');
						// generate #toolbar_vertical on the fly
						if ($(tbs + ' ul ul').length) tbV.prepend($(tbs + ' > .toolbarList > .currentListItem > .toolbarList, ' + tbs + ' > .toolbarList > .currentAncestorListItem > .toolbarList')).show();
					}else{
						// if vertical, prepend #toolbar_horizontal ul to #toolbar_vertical
						if (sdNavigationType == 3) tbV.prepend($(tbh + ' > ul')).show();
						// round mPreContent
						mPreContent.addClass('radiusTop');
					}
					tbH.remove();
				}
			}
			// capture first and last items for toolbar_vertical
			if ($('#toolbar_vertical ul li').length > 1) {
				$('#toolbar_vertical ul:first li:first a:first').addClass('radiusTop');
				$('#toolbar_vertical ul:first li:last a:last').addClass('radiusBottom').css('border-style', 'none');
			} else {
				$('#toolbar_vertical a').addClass('radiusAll');
			}
		})();
		/* @end */

		/* @group various common styles */
		var sdCommonStyles = (function(){
			// set width of .headerContainer .preContent to .pageHeader
			var pageWidth = seydoggy.pageHeader.outerWidth(true);
			hPreContent.width(pageWidth - 29);
			// set height .mainContent to that of .sidebarContent if shorter
			if (sContent.css('display') != 'none') mContent.css('min-height',sContent.height());
		})();
		
		/* @group various page style */
		var sdPageStyles = (function(){
			// styles for File Sharing page
			var sdFilesharing = (function(){
				if ($('.filesharing-item').length) {
					var fsI = $('.filesharing-item');
					// set width of File Sharing blocks according to available space
					fsI.width(mContent.outerWidth(true) / 3 - 45).addClass('radiusAll contentShadow');
					// set height of File Sharing blocks to be the same
					fsI.sdSetHeight(fsI,0);
				}
			})();
		})();
		
		/* @group Movie/Photo Album functions */
		var sdLightboxAlbums = (function(){
			if ($('.album-wrapper').length || $('.movie-thumbnail-frame').length) {
				// load css (prettyPhoto)
				$("head").append("<link>").children(":last").attr({
			      rel:  "stylesheet",
			      type: "text/css",
			      href: RwGet.pathto('css/jquery.prettyPhoto.css')
			    });
				// load js (prettyPhoto)
				$.getScript(RwGet.pathto('scripts/jquery.prettyPhoto.js'), function() {
					// Photo Album
					if ($('.album-wrapper').length) {
						// style photo thumbnails (!prettyPhoto)
						$('.thumbnail-frame img').addClass('radiusAll contentShadow');
						// show Photo Album elements (!prettyPhoto)
						var sd_at = $('.album-title');
						var sd_atH = sd_at.html();
						var sd_ad = $('.album-description');
						var sd_adH = sd_ad.html();
						if (sd_at.html() == "" && sd_ad.html() == "") $('.album-wrapper').css('margin-top','3em').append('<div class="clear"/>');
						else if (sd_atH != "" && sd_adH == "") sd_at.show().css('margin-bottom','1em');
						else if (sd_atH == "" && sd_adH != "") sd_ad.show();
						else if (sd_atH != "" && sd_adH != "") sd_at.show();sd_ad.show();
						// get thumbnail links and alter attributes (prettyPhoto)
					  	$('.thumbnail-frame').each(function(){
							var thisAnch = $('a',this);
							var thisImg = $('a img',this);
							var thisCap = $('.thumbnail-caption',this);
					        thisAnch.attr({
					            'href' : thisImg.attr('src').replace(/thumb/i,'full'),
					            'rel' : 'prettyPhoto[gallery]',
					            'title' : thisCap.text()
					        });
					    });
					} else {
						// since photo album is false movie album is true
						// style movie thumbnails
						$('.movie-thumbnail-frame img').addClass('radiusAll contentShadow');
						// get thumbnails links and alter attributes (prettyPhoto)
						$('.movie-thumbnail-frame').each(function(){
							var thisAnch = $('a',this);
							var thisCap = $('.movie-thumbnail-caption',this);
							var	thisPage = thisAnch.attr('href');
							thisAnch.removeAttr('onclick').removeAttr('onkeypress').attr({
								'href' : thisPage + '?iframe=true&width=75%&height=75%',
								'rel' : 'prettyPhoto[iframes]',
								'title' : thisCap.text()
							});
						});
					}
					// apply effects (prettyPhoto)
					$('a[rel^=prettyPhoto]').prettyPhoto({
						animation_speed: 'fast',
						show_title: false,
						theme: 'light_square'
					});
				});
			}
		})();
		/* @end */
	})();
});
// test to see if user has selected a slideshow option
if((typeof sdSlideNum != "undefined") || (typeof sdSlideWH != "undefined")) {
	include(RwGet.pathto('scripts/slideshow/jquery.cycle.all.min.js'));
	include(RwGet.pathto('scripts/slideshow/seydoggy.slideshow.js'));
}
