$(document).ready(function(){
				
	// FONT REPLACEMENT
	Cufon.replace('h1,.rep');
	
	// NAVIGATION OVER EFFECT
	$('.navItem').mouseover( function() { $(this).css("background-color","#EEEEEE"); });
	$('.navItem').mouseout( function() { $(this).css("background","none"); });
	
	// SHOW/HIDE LATEST BLOG POSTS - home page
	$('#mcTitle').mouseover( function() { $(this).css("background-color","#222222"); });
	$('#mcTitle').mouseout( function() { $(this).css("background-color","#1a1a1a"); });
	$('#mcText').hide();
	$('#mcTitle').click( function() { $('#mcText').slideToggle("slow"); });
	
	// BUTTON OVER EFFECT - home page
	$('.readMore').mouseover( function() { $(this).css("background-color","#EEEEEE"); });
	$('.readMore').mouseout( function() { $(this).css("background-color","#FFFFFF"); });
	
	// TIPS
	$(".tip").tipTip({maxWidth: "auto", edgeOffset: 5, defaultPosition: "bottom", delay:100});  
	
	// IMAGES LIGHTBOX
	$('.colorbox').colorbox();

	// PORTFOLIO IMAGES OVER EFFECT
	$('.boxPortfolioImage').mouseover( function() { $(this).fadeTo(0,0.6); });
	$('.boxPortfolioImage').mouseout( function() { $(this).fadeTo(0,1); });
	
	// PORTFOLIO IMAGES OVER EFFECT
	$('.xtrig').click( function() { $('.panelTabs').removeClass("grey"); });
	$('.xtrig').click( function() { $(this).parent(".panelTabs").addClass("grey"); });

	// PORTFOLIO SLIDER FADE EFFECT
	$(".xtrig").click(function () {
	  panel = $(this).attr("title");
	  $(".panel-wrapper").fadeTo("fast", 0);
	  $(panel).fadeTo("fast", 1);
	});
	
	// SEARCHBOX
		// global vars
		var searchBox = $("#searchInput");
		var searchBoxDefault = "Type here to search...";
		
		// Effects for searchbox
		searchBox.focus(function(e){
			$(this).addClass("inputActive");
		});
		searchBox.blur(function(e){
			$(this).removeClass("inputActive");
		});
		
		//Searchbox show/hide default text if needed
		searchBox.focus(function(){
			if($(this).attr("value") == searchBoxDefault) $(this).attr("value", "");
		});
		searchBox.blur(function(){
			if($(this).attr("value") == "") $(this).attr("value", searchBoxDefault);
		});

});
