/**
 * General Cms page view functions to run on page start
 */

/* SD: Initialize lightbox 
 *$(document).ready(
 *	function() {
 *		$('a.galleryLB').each(
 *			function(i) {
 *				$(this).lightBox();
 *			}
 *		);
 *	}
 *);
*/

/* JM: Hackery 11-6-08 */
$(document).ready(
	function() {
		$('a.galleryLB').each(
			function(i) {
				$('a.galleryLB').lightBox();
			}
		);
	}
);

/* Growl Template */
$.growl.settings.noticeTemplate = ''
  + '<div>'
  + '<div style="float: right; background-image: url(' + CENTRAL_JS_ROOT_FOLDER + 'jquery/growl/normalTop.png); position: relative; width: 259px; height: 16px; margin: 0pt;"></div>'
  + '<div style="float: right; background-image: url(' + CENTRAL_JS_ROOT_FOLDER + 'jquery/growl/normalBackground.png); position: relative; display: block; color: #ffffff; font-family: Arial; font-size: 12px; line-height: 14px; width: 259px; margin: 0pt;">'
  + '  <img style="margin: 14px; margin-top: 0px; float: left;" src="%image%" />'
  + '  <h3 style="margin: 0pt; margin-left: 77px; padding-bottom: 10px; font-size: 13px;">%title%</h3>'
  + '  <p style="margin: 0pt 14px; margin-left: 77px; font-size: 12px;">%message%</p>'
  + '</div>'
  + '<div style="float: right; background-image: url(' + CENTRAL_JS_ROOT_FOLDER + 'jquery/growl/normalBottom.png); position: relative; width: 259px; height: 16px; margin-bottom: 10px;"></div>'
  + '</div>';
	
/*
 * Dynamic js loader

if(typeof($) != 'function') {
	function jsAppend(js_file) {
	  js_script = document.createElement('script');
	  js_script.type = "text/javascript";
	  js_script.src = js_file;
	  document.getElementsByTagName('head')[0].appendChild(js_script);
	}

	//Load Jquery if not already loaded
	jsAppend(CENTRAL_JS_ROOT_FOLDER + "jquery/jquery-1.2.6.js");
}*/