jQuery(function() {
         jQuery("#toTop").scrollToTop({speed:1000,ease:"easeOutExpo",start:100});
		 jQuery("#demo img[title]").tooltip({offset: [30]});		 
});



jQuery(function() {

jQuery("ul#menu").lavaLamp({
	fx: "easeOutExpo",
	speed: 1200,
	startItem: 0
});

jQuery(document).ready(function () {
if (jQuery(".scrollbox").length > 0) {
		var g = jQuery('.scrollbox').offset().top - parseFloat(jQuery('.scrollbox').css('marginTop').replace(/auto/, 0));
		jQuery(window).scroll(function () {
			var y = jQuery(this).scrollTop();
			if (y >= g) {
				jQuery('.scrollbox').addClass('fixed')
			} else {
				jQuery('.scrollbox').removeClass('fixed')
			}
            })
	}
});

});

		
jQuery(function() {
	jQuery("#pl").scrollable({ circular: true });
});

jQuery(function() {
	jQuery(".scrollable").scrollable();
});

jQuery(function() {			

jQuery(".items img").click(function() {

	// see if same thumb is being clicked
	if (jQuery(this).hasClass("active")) { return; }

	// calclulate large image's URL based on the thumbnail URL (flickr specific)
	var url = jQuery(this).attr("alt");

	// get handle to element that wraps the image and make it semi-transparent
	var wrap = jQuery("#image_wrap").fadeTo("medium", 0.1);

	// the large image from www.flickr.com
	var img = new Image();


	// call this function after it's loaded
	img.onload = function() {

		// make wrapper fully visible
		wrap.fadeTo("fast", 1);

		// change the image
		wrap.find("img").attr("src", url);

	};

	// begin loading the image from www.flickr.com
	img.src = url;

	// activate item
	jQuery(".items img").removeClass("active");
	jQuery(this).addClass("active");

// when page loads simulate a "click" on the first image
}).filter(":first").click();
});



