

/* Name This Script */
$(document).ready(function(){
$("#step li").each(function (i) {
i = i+1;
$(this).addClass("item"+i);
});
$("#number li").each(function (i) {
i = i+1;
$(this).addClass("item"+i);
});
$("#commentlist li").each(function (i) {
i = i+1;
$(this).prepend('<span class="commentnumber"> #'+i+'</span>');
});
});

/* Scroll to Top */
$(function() {
$("#toTop").scrollToTop();
});

/* Toolbar Nav */
jQuery(function(){
jQuery('ul.toolbar-nav').superfish();
});

/* Section Nav */
jQuery(function(){
jQuery('ul.section-nav').superfish();
});

/* showDiv Script */
//jQuery code for this page
$(document).ready(function(){
// close the offDiv content sections
//(doing this with js instead of css means if no js, content is all visible)
$('.offDiv > .show-hide').hide();
// show the correct buttons for each div
// they are hidden with css for no-js users
$('.offDiv > .showLink').show();
$('.onDiv > .hideLink').show();
$('a.showAll').show();
$('a.hideAll').show();
// showLink shows the content
$('a.showLink').click(function(){
$(this).siblings('.show-hide').slideToggle('slow');
$(this).parents('.offDiv').removeClass().addClass('onDiv');
$('a.hideAll').show();
$(this).hide();
$(this).siblings('.hideLink').show();
return false;
});
// hideLink hides the content
$('a.hideLink').click(function(){
$(this).siblings('.show-hide').slideToggle('slow');
$(this).parents('.onDiv').removeClass().addClass('offDiv');
$('a.showAll').show();
$(this).hide();
$(this).siblings('.showLink').show();
return false;
});
// show all link
$('a.showAll').click(function(){
$('.show-hide').slideDown('slow');
$('.offDiv').removeClass().addClass('onDiv');
$('a.hideAll').show();
$('a.hideLink').show();
$('a.showLink').hide();
$(this).hide();
return false;
});
// hide all link
$('a.hideAll').click(function(){
$('.show-hide').slideUp('slow');
$('.onDiv').removeClass().addClass('offDiv');
$('a.showLink').show();
$('a.hideLink').hide();
$(this).hide();
$('a.showAll').show();
return false;
});
// title is clickable, and toggles the content
$(".faqTitle").click( function() { 
$(this).next("div").slideToggle('slow');
$(this).parent("div").toggleClass('offDiv');
$(this).parent("div").toggleClass('onDiv');
$(this).siblings("a").toggle();
} );

$('.offDiv >.faqTitle').click(function(){
$('a.hideAll').show();
});
$('.onDiv >.faqTitle').click(function(){
$('a.showAll').show();
}); 

});

/* MegaMenu */
$(function() {
$("#menu").megaMenu('hover_slide');
});


/* PrettyPhoto */
$(document).ready(function(){
$("area[rel^='prettyPhoto']").prettyPhoto();

$(".gallery:first a[rel^='prettyPhoto']").prettyPhoto({animation_speed:'normal',theme:'dark_rounded',slideshow:3000, autoplay_slideshow: false});
$(".gallery:gt(0) a[rel^='prettyPhoto']").prettyPhoto({animation_speed:'fast',slideshow:10000, hideflash: true});

$("#custom_content a[rel^='prettyPhoto']:first").prettyPhoto({
custom_markup: '<div id="map_canvas" style="width:260px; height:265px"></div>',
changepicturecallback: function(){ initialize(); }
});

$("#custom_content a[rel^='prettyPhoto']:last").prettyPhoto({
custom_markup: '<div id="bsap_1259344" class="bsarocks bsap_d49a0984d0f377271ccbf01a33f2b6d6"></div><div id="bsap_1237859" class="bsarocks bsap_d49a0984d0f377271ccbf01a33f2b6d6" style="height:260px"></div><div id="bsap_1251710" class="bsarocks bsap_d49a0984d0f377271ccbf01a33f2b6d6"></div>',
changepicturecallback: function(){ _bsap.exec(); }
});
});

/* tipTip */
$(function(){
$(".someClass").tipTip({maxWidth: "auto", edgeOffset: 10});
});

/* EasyAccordion */
$(document).ready(function () {


$('#accordion-1').easyAccordion({ 
autoStart: true, 
slideInterval: 3000
});

$('#accordion-2').easyAccordion({ 
autoStart: false	
});

$('#accordion-3').easyAccordion({ 
autoStart: true,
slideInterval: 5000,
slideNum:false	
}); 

$('#accordion-4').easyAccordion({ 
autoStart: false,
slideInterval: 5000
}); 

});

/*  */
