// initialise jQuery menus
jQuery(function(){
	jQuery('ul.sf-menu').superfish({
	animation:   {height:'show'},
	speed:       'fast',
	delay:     1200,
	autoArrows:  true
	});
});

// accordian jQuery panels
$(document).ready(function(){
	
	
	// Table Striping
	$(".stripeMe tr").mouseover(function() {$(this).addClass("over");}).mouseout(function() {$(this).removeClass("over");});
	$(".stripeMe tr:even").addClass("alt");
	
	$(".stripeMe tr").click(function(){
    	window.location=$(this).find("a").attr("href");return false;
	});
	
	//$(".accordion h3:first").addClass("active");
	//$(".accordion p").hide();
	$(".accordion .panel").hide();

	$(".accordion h3").click(function(){
		//$(this).next("p").slideToggle("fast")
		$(this).next(".panel").slideToggle("fast")
		//.siblings("p:visible").slideUp("slow"); // when another head is clicked 
		$(this).toggleClass("active");
		//$(this).siblings("h3").removeClass("active");
	});
	
	$(function() {
       $(".pdfppt-link").each(function() {
           var $this = $(this);
           var fileLocation = $this.attr("href");
           var html = '<iframe class="pdf-ppt-viewer" src="http://docs.google.com/gview?url=' + fileLocation + '&embedded=true" style="width:' + pdfpptWidth + 'px; height:' + pdfpptHeight + 'px;" frameborder="0"></iframe>';

           $(html).insertAfter($this);
           $this.remove();
       });    
   });

});