﻿<!--
function jumpMenu(targ,selObj,restore) { eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'"); if (restore) selObj.selectedIndex=0; }

// StyleSwitcher functions written by Paul Sowden
// http://www.alistapart.com/stories/alternate/

function setActiveSS(Increment) { 
	var i, a, main, ssTitle, textSize; ssTitle = ''; 
	textSize = currentTextSize + Increment; 
	if (textSize > 2) {textSize = 2;}	
	else if (textSize < 0){textSize = 0;}
	switch (textSize) {case 0:	break;case 1: ssTitle = 'Large Text'; break; case 2: ssTitle = 'Larger Text'; break;} 
	for (i=0; (a = document.getElementsByTagName("link")[i]); i++) 
	{
		if (a.getAttribute("rel") && a.getAttribute("rel").indexOf("style") != -1 && a.getAttribute("title")) 
		{	
			a.disabled = true;
			if(a.getAttribute("title") == ssTitle) 
			{
				a.disabled = false; 
			}
		} 
	} 
	currentTextSize = textSize;
}
//function getActiveSS() { var i, a; for (i=0; (a = document.getElementsByTagName("link")[i]); i++) { if (a.getAttribute("rel") && a.getAttribute("rel").indexOf("style") != -1 && a.getAttribute("title") && !a.disabled ) return a.getAttribute("title"); } return null; }
var currentTextSize=0;
function createCookie(name,value,days) { if (days) { var date = new Date(); date.setTime(date.getTime()+(days*24*60*60*1000)); var expires = "; expires="+date.toGMTString(); } else expires = ""; document.cookie = name+"="+value+expires+"; path=/"; }
function readCookie(name) { var nameEQ = name + "="; var ca = document.cookie.split(';'); for(var i=0;i < ca.length;i++) { var c = ca[i]; while (c.charAt(0)==' ') c = c.substring(1,c.length); if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length); } return null; }
window.onload = function(e) 
{ 
	var size;
	var cookie = readCookie("size"); 
	if (cookie != null){
		size = cookie ? parseInt(cookie) : 0;
	}
	else {
		size = 0;
	}
	currentTextSize = size;
	setActiveSS(0); 
}
var cookie = readCookie("size");
//currentTextSize = cookie ? parseInt(cookie) : 0;
window.onunload = function(e) {createCookie("size", currentTextSize, 365); }
setActiveSS(0);

var domain = window.location.hostname.toLowerCase();

if (domain == "lakeforestmba.edu") {
	// window.location='http://www.lakeforestmba.edu'
	window.location='http://www.lakeforestmba.edu' + window.location.pathname + window.location.hash + window.location.search
}

//-->

// Search Field Placeholder
$(document).ready(function(){ 
	$("input[type=text]").focus(function(){ 
		if($(this).val() == $(this).attr("defaultValue"))
		{
		$(this).val("");
		}
	});
	
	$("input[type=text]").blur(function(){
		if($(this).val() == "")
		{
		$(this).val($(this).attr("defaultValue"));
		} 
	});
});

// Home Feature
$(document).ready(function(){
	$("#home .feature .overlay .slides").cycle({
		timeout: 0,
		prev: "#home .feature .overlay .prev",
		next: "#home .feature .overlay .next",
		pager: "#home .feature .overlay .pager",
		pagerAnchorBuilder: function(idx, slide) { 
			return '<a href="#" id="image'+idx+'">'+idx+'</a>'; 
		}
	});
	$("#home .feature .images").cycle({
		timeout: 0,
		prev: "#home .feature .overlay .prev",
		next: "#home .feature .overlay .next"
	});
	$("#home .feature .overlay .pager #image0").click(function(){
		$("#home .feature .images").cycle(0);
	});
	$("#home .feature .overlay .pager #image1").click(function(){
		$("#home .feature .images").cycle(1);
	});
	$("#home .feature .overlay .pager #image2").click(function(){
		$("#home .feature .images").cycle(2);
	});
	$("#home .feature .overlay .pager #image3").click(function(){
		$("#home .feature .images").cycle(3);
	});
	$("#home .feature .overlay .pager #image4").click(function(){
		$("#home .feature .images").cycle(4);
	});
});

// Home Spifs
$(document).ready(function(){
	$("#home .spifs .news .slides").cycle({
		timeout: 0,
		fx: "scrollHorz",
		prev: "#home .spifs .news .prev",
		next: "#home .spifs .news .next"
	});
	$("#home .spifs .video .slides").cycle({
		timeout: 0,
		fx: "scrollHorz",
		prev: "#home .spifs .video .prev",
		next: "#home .spifs .video .next"
	});
});

// Home Social Toggle
//$(document).ready(function(){
//	$(".twitterToggle").click(function(){
//		$(this).addClass("activeTab");
//		$(".facebookToggle").removeClass("activeTab");
//		$("#home .social .tab, #home .social .action").hide();
//		$("#home .social .twitter").show();
//		$("#home .social .title span").html("LFGSM on Twitter");
//		return false;
//	});
//	$(".facebookToggle").click(function(){
//		$(this).addClass("activeTab");
//		$(".twitterToggle").removeClass("activeTab");
//		$("#home .social .tab, #home .social .action").hide();
//		$("#home .social .facebook").show();
//		$("#home .social .title span").html("LFGSM on Facebook");
//		return false;
//	});
//});

// Home Twitter
//$(document).ready(function(){
//	$("#home .spifs .block .twitterFeed").tweet({
//		username: "lfgsm",
//		join_text: "auto",
//		avatar_size: 32,
//		count: 3,
//		auto_join_text_default: "we said,",
//		auto_join_text_ed: "we",
//		auto_join_text_ing: "we were",
//		auto_join_text_reply: "we replied to",
//		auto_join_text_url: "we were checking out",
//		loading_text: "loading tweets..."
//	});
//});

// Home News Navigation Variables
$(document).ready(function() {
	var slideCount = $("#home .spifs .news .slides").children(".slide").size();
	if (slideCount == 1 ) {
		$("#home .spifs .news .prev, #home .spifs .news .next").hide();
	};
});

// Home Video Navigation Variables
$(document).ready(function() {
	var slideCount = $("#home .spifs .video .slides").children(".slide").size();
	if (slideCount == 1 ) {
		$("#home .spifs .video .prev, #home .spifs .video .next").hide();
	};
});

function setText(obj, text) {
if (obj.value == text) {
obj.value = ""
}
}

function clearText(obj, text) {
if (obj.value.length == 0) {
obj.value = text
}
}

function recordOutboundLink(link, category, action, event, label) 
{
    try {

	_gaq.push(['_trackEvent',category, event, label]);
        setTimeout('document.location = "http://' + action + '"', 100)  
    }
    catch (err) {
        document.location = 'http://' + action;
    }
}
