function inputBoxDefaultText(targ,deftext){
	if ($(targ).length > 0){
		
		$(targ).val(deftext);
		
		$(targ).click(function() {
			if($(this).val() == deftext){
				$(this).val('');			
			}
		});		
			
		$(targ).blur(function() {
			if($(this).val() == ''){
				$(this).val(deftext);
			}
		});	
	}
	
}
/*
window.Meebo||function(b){function p(){return["<",i,' onload="var d=',g,";d.getElementsByTagName('head')[0].",
j,"(d.",h,"('script')).",k,"='//",b.stage?"stage-":"","cim.meebo.com/cim?iv=",a.v,
"&",q,"=",b[q],b[l]?"&"+l+"="+b[l]:"",b[e]?"&"+e+"="+b[e]:"","'\"></",i,">"].join("")}
var f=window,a=f.Meebo=f.Meebo||function(){(a._=a._||[]).push(arguments)},d=document,
i="body",m=d[i],r;if(!m){r=arguments.callee;return setTimeout(function(){r(b)},
100)}a.$={0:+new Date};a.T=function(u){a.$[u]=new Date-a.$[0]};a.v=4;var j="appendChild",
h="createElement",k="src",l="lang",q="network",e="domain",n=d[h]("div"),v=n[j](d[h]("m")),
c=d[h]("iframe"),g="document",o,s=function(){a.T("load");a("load")};f.addEventListener?
f.addEventListener("load",s,false):f.attachEvent("onload",s);n.style.display="none";
m.insertBefore(n,m.firstChild).id="meebo";c.frameBorder="0";c.id="meebo-iframe";
c.allowTransparency="true";v[j](c);try{c.contentWindow[g].open()}catch(w){b[e]=
d[e];o="javascript:var d="+g+".open();d.domain='"+d.domain+"';";c[k]=o+"void(0);"}try{var t=
c.contentWindow[g];t.write(p());t.close()}catch(x){c[k]=o+'d.write("'+p().replace(/"/g,
'\\"')+'");d.close();'}a.T(1)}({network:"acquisitionengine_ji40gu"});
Meebo("makeEverythingSharable");
*/

$(document).ready(function(){
	
	if(window.location.pathname == '/'){
		$('#main-menu li:first-child').addClass('current_page_item');
	}
	/* Meebo("domReady"); */
	inputBoxDefaultText('#mc_signup_container input[type="text"]','Email Address')
	
	// This sets the opacity of the thumbs to fade down to 60% when the page loads
	$(".th img").fadeTo("slow", 1.0);
	$(".th img").hover(function(){
		// This should set the opacity to 100% on hover
		$(this).fadeTo("slow", 0.6);
		},function(){
			// This should set the opacity back to 60% on mouseout
			$(this).fadeTo("slow", 1.0);
		});
		
	$("#content a[rel^='prettyPhoto']").prettyPhoto({theme:'light_rounded'});
	
	jQuery("#main-menu ul").css({display: "none"}); // Opera Fix
	jQuery("#main-menu li").hover(function(){
	jQuery(this).find('ul:first').css({visibility: "visible",display: "none"}).show(268);
	},function(){
	jQuery(this).find('ul:first').css({visibility: "hidden"});
	});
			
	//When page loads...
	$(".tab_content").hide(); //Hide all content
	$("ul.tabs li:first").addClass("active").show(); //Activate first tab
	$(".tab_content:first").show(); //Show first tab content
	//On Click Event
	$("ul.tabs li").click(function() {
		$("ul.tabs li").removeClass("active"); //Remove any "active" class
		$(this).addClass("active"); //Add "active" class to selected tab
		$(".tab_content").hide(); //Hide all tab content
		var activeTab = $(this).find("a").attr("href"); //Find the href attribute value to identify the active tab + content
		$(activeTab).fadeIn(); //Fade in the active ID content
		return false;
	});
		
	$('a[href^="http://"]').filter(function() {
		return this.hostname && this.hostname !== location.hostname;
	}).attr('target', '_blank');
	
}); 
