sfHover = function() {
	var sfEls = document.getElementById("nav").getElementsByTagName("LI");
	for (var i=0; i<sfEls.length; i++) {
		sfEls[i].onmouseover=function() {
			this.className+=" sfhover";
		}
		sfEls[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
		}
	}
}
if (window.attachEvent) window.attachEvent("onload", sfHover);

function clearText(thefield){
if (thefield.defaultValue==thefield.value)
thefield.value = ""
} 


function expandcontent(qid, ansid){
document.getElementById(ansid).style.display=(document.getElementById(ansid).style.display!="block")? "block" : "none" 
if (document.getElementById(ansid).style.display == "block") 
{
  document.getElementById(qid).style.backgroundImage= "url(/template/q_open.gif)"
} 
else 
{
  document.getElementById(qid).style.backgroundImage= "url(/template/q_closed.gif)"
}
}

$(function() {

$("a[href^='http']").not("[href*='savvymom.ca']").click(function(){
	window.open(this.href);
	return false;
});

$("a[href*=.pdf]").click(function(){
	window.open(this.href);
	return false;
});


$("ul > :first-child").addClass("first");
$("ul > :last-child").addClass("last");



var container = $('#carousel'); 
var startPlace = $('a',container).index($('.selected',container)); 

$("#carousel").show();

jQuery('#carousel').jcarousel({
       vertical: true,
      start: startPlace 
    });

$('#animation3').cycle({ 
    fx:    'fade', 
 
        pager:      '#pager',
        pagerEvent: 'mouseover',
        fastOnEvent: true,
    pause:           1,      // true to enable "pause on hover" 
   allowPagerClickBubble: true, 
    pauseOnPagerHover: 1, // true to pause when hovering over pager link 
        cleartype: true,
    pagerAnchorBuilder: function(idx, slide) { 
        // return selector string for existing anchor 
        return '#pager li:eq(' + idx + ') a'; 
    } 
});



});


