	$(function() {
		$("#butslide").click(function(){
				$("#panellogin").slideToggle("slow");
				$(this).toggleClass("active"); return false;
		}); 
	});
	$(function() {
		$("#searchslide").click(function(){
				$("#panelsearch").slideToggle("fast");
				$(this).toggleClass("active"); return false;
		}); 
	});
//When Mouse rolls over li
	$(document).ready(function(){
	//Hide the tooglebox when page load
	$(".main_menu ul.nav .sub_links").hide();
	//slide up and down when hover over heading 2
	$(".main_menu ul.nav li").click(function(){
	// slide toggle effect set to slow you can set it to fast too.
	$(this).next(".main_menu ul.nav .sub_links").slideToggle("slow");
	return true;
	});
	});
//FancyBox
	$(document).ready(function(){
			$(".gallery:first a[rel^='prettyPhoto']").prettyPhoto({animationSpeed:'slow',theme:'facebook',slideshow:6000, autoplay_slideshow: true});
			$(".gallery:gt(0) a[rel^='prettyPhoto']").prettyPhoto({animationSpeed:'fast',slideshow:10000});
			
			$("#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_1237859" class="bsarocks bsap_d49a0984d0f377271ccbf01a33f2b6d6" style="height:260px"></div><div id="bsap_1251710" class="bsarocks bsap_d49a0984d0f377271ccbf01a33f2b6d6"></div>',
				changepicturecallback: function(){ _bsap.exec(); }
			});
		});
		

