// initialise Menu plugins
//jQuery(function(){
//	jQuery('ul.sf-menu').superfish();
//});

//if ( jQuery('ul.sf-menu').superfish() ) {
//jQuery('ul.sf-menu').superfish();
//}

// initialise carousels

// - S.C.  Squish128 
//jQuery(document).ready(function() {
jQuery(document).ready( function(){
    //window.alert('hello dere');

    //this is for the slideShow control on the home page
    //jQuery("#pikame").PikaChoose({ carousel: true, carouselVertical: true });

	var myCarousel = jQuery('#mycarousel');
	if( myCarousel && myCarousel.jcarousel ){
		myCarousel.jcarousel();
	}
	var carouselShare = jQuery('#carouselShare');
	if( carouselShare && carouselShare.jcarousel ){
		carouselShare.jcarousel({
			auto: 4,
			wrap: 'last',
			initCallback: carousel_initCallback
		});
	}
});


function carousel_initCallback(carousel) { // Disable autoscrolling if the user clicks the prev or next button.
carousel.buttonNext.bind('click', function() { carousel.startAuto(0); }); carousel.buttonPrev.bind('click', function() { carousel.startAuto(0); }); // Pause autoscrolling if the user moves with the cursor over the clip.
carousel.clip.hover(function() {
carousel.stopAuto();
}, function() {
carousel.startAuto();
});
}; 

$(function(){

// The height of the content block when it's not expanded
var adjustheight = 350;
// The "more" link text
var moreText = "<img src='images\/close.gif' alt='\' \/>  More";
// The "less" link text
var lessText = "<img src='images\/open.gif' alt='\' \/> Less";

// Sets the .more-block div to the specified height and hides any content that overflows
$(".more-less .more-block").css('height', adjustheight).css('overflow', 'hidden');

// The section added to the bottom of the "more-less" div
$(".more-less").append('<a href="#" class="adjust"></a>');

$("a.adjust").html(moreText);

$(".adjust").toggle(function() {
		$(this).parents("div:first").find(".more-block").css('height', 'auto').css('overflow', 'visible');
		// Hide the [...] when expanded
		$(this).parents("div:first").find("p.continued").css('display', 'none');
		$(this).html(lessText);
	}, function() {
		$(this).parents("div:first").find(".more-block").css('height', adjustheight).css('overflow', 'hidden');
		$(this).parents("div:first").find("p.continued").css('display', 'block');
		$(this).html(moreText);
});
});


