ddsmoothmenu.init({
			mainmenuid: "menu", //menu DIV id
			orientation: 'h', //Horizontal or vertical menu: Set to "h" or "v"
			classname: 'ddsmoothmenu', //class added to menu's outer DIV
			//customtheme: ["#1c5a80", "#18374a"],
			contentsource: "markup" //"markup" or ["container_id", "path_to_menu_file"]
		})
		jQuery(function() {
			var slide = false;
			var height = jQuery('#footer_content').height();
			jQuery('#footer_button').click(function() {
				var docHeight = jQuery(document).height();
				var windowHeight = jQuery(window).height();
				var scrollPos = docHeight - windowHeight + height;
				jQuery('#footer_content').animate({ height: "toggle"}, 1000);
				if(slide == false) {
					if(jQuery.browser.opera) {
						jQuery('html').animate({scrollTop: scrollPos+'px'}, 1000);
					} else {
						jQuery('html, body').animate({scrollTop: scrollPos+'px'}, 1000);
					}
					slide = true;
					jQuery('#footer_content').autoAlign('.widget-container', 50);
				} else {
					slide = false;
				}
			});
		});
		jQuery(function() {
			jQuery('#attr a').tipsy(
			{
				gravity: 's', // nw | n | ne | w | e | sw | s | se
				fade: true
			});
		});
		jQuery(function(){
			jQuery("#search").Watermark("Search");
		});
		jQuery(function(){
			jQuery.localScroll();
		});
		jQuery(function() {
			jQuery('.display img.a').hide();//hide all the images on the page
		});

		var i = 0;//initialize
		var int=0;//Internet Explorer Fix
		jQuery(window).bind("load", function() {//The load event will only fire if the entire page or document is fully loaded
			var int = setInterval("doThis(i)",500);//500 is the fade in speed in milliseconds
		});
		function doThis() {
			var imgs = jQuery('.display img.a').length;//count the number of images on the page
			if (i >= imgs) {// Loop the images
				clearInterval(int);//When it reaches the last image the loop ends
			}
			jQuery('.display img.a:hidden').eq(0).fadeIn(500);//fades in the hidden images one by one
			i++;//add 1 to the count
		}

		jQuery(document).ready(function() {
			// find the div.fade elements and hook the hover event
			jQuery('#attr a').hover(function() {
				// on hovering over find the element we want to fade *up*
				var fade = jQuery('> .hover', this);

				// if the element is currently being animated (to fadeOut)...
				if (fade.is(':animated')) {
					// ...stop the current animation, and fade it to 1 from current position
					fade.stop().fadeTo(300, 1);
				} else {
					fade.fadeIn(300);
				}
			}, function () {
				var fade = jQuery('> .hover', this);
				if (fade.is(':animated')) {
					fade.stop().fadeTo(300, 0);
				} else {
					fade.fadeOut(300);
				}
			});

			// get rid of the text
			jQuery('#attr a > .hover').empty();

			

			jQuery("a.switch_thumb").toggle(function(){
				jQuery(this).addClass("swap");
				jQuery("ul.display").fadeOut("fast", function() {
					jQuery(this).fadeIn("fast").addClass("thumb_view");
				});
			}, function () {
				jQuery(this).removeClass("swap");
				jQuery("ul.display").fadeOut("fast", function() {
					jQuery(this).fadeIn("fast").removeClass("thumb_view");
				});
			});
			jQuery(".display img.b").fadeTo("slow", 0); // This sets the opacity of the thumbs to fade down to 0% when the page loads
			jQuery(".display img.b").hover(function(){
				jQuery(this).fadeTo("slow", 0.5); // This should set the opacity to 50% on hover
			},function(){
				jQuery(this).fadeTo("slow", 0); // This should set the opacity back to 0% on mouseout
			});
			jQuery(".pic, .pic_left, .pic_right, .flickr img").css({
					backgroundColor: "#fff",
					borderColor: "#D5D5D5"
				});
			jQuery(".pic, .pic_left, .pic_right, .flickr img").hover(function() {
				jQuery(this).stop().animate({
					backgroundColor: "#666",
					borderColor: "#333"
					}, 300);
				},function() {
				jQuery(this).stop().animate({
					backgroundColor: "#fff",
					borderColor: "#D5D5D5"
					}, 500);
			});
			jQuery(".tabs_container").each(function(){
				jQuery("ul.tabs",this).tabs("div.panes > div", {tabs:'li',effect: 'fade'});
			});
			jQuery('.widget_recent_projects ul').cycle({
				fx: 'scrollLeft',
				timeout: 5000,
				delay: -1000
			});
		});
