$(document).ready(function() {
	$.Juitter.start({
		searchType:"fromUser", // needed, you can use "searchWord", "fromUser", "toUser"
		searchObject:"yct,BaylorYCT,YCT_UT,techyct,campus_reform,TexasTribune,TXHOMESCHOOL,WeTexans,TXAlliance4Life,ImagineWaco,WacoTeaParty,TPPF,NewsChannel25,EmpowerTexans,TexasAFP,KingStPatriots,texasinsider,TexasGOPVote,jonmcclellan,RightSideAustin,willlutz,LibertyLegal,TexasMajority,TXBudgetSource,GovernorPerry,SaysTheSimon,iswecrazy,TxCC,KWKTFOX44,CarolofWest,pvenable,DTeaParty,TxFOIFT,LiberalBill,kwtx,RFLWaco,TXRepublicNews,mjsamuelson,TobyMarie,FOIAchat,loud_talker,AggieCons,LoneStarReport,TexasYRs,RepPartyofTexas,cincotexan,BCSTeaParty,SanJacintoTEA,texaswatchdog,VictoryTexas,CALACTX,Radio_Free_Waco,BVConservatives,GOPisforme,weRaustin,CorbinCasteel,LoneStarStrong,KXAN_News,LoneStarTimes,texascr,HandsOffTexas,ClearLakeTP,TexasGOPHouse,kutaustin,wacotrib,KCENNews,instituteofman,NCPA,BaylorProud,buLariat,Baylor_Press,ISReligion,baylorCR,BUlinecamps,BaylorMA,BUSpiritualLife,txrepublican,WACOAN,KatyTea,KRLD,BaylorUMediaCom,BaylorSG,BaylorGuys", // needed, you can insert a username here or a word to be searched for, if you wish multiple search, separate the words by comma.

		// The values below will overwrite the ones on the Juitter default configuration. 
		// They are optional here.
		// I'm changing here as a example only
		lang:"en", // restricts the search by the given language
		live:"live-15", // the number after "live-" indicates the time in seconds to wait before request the Twitter API for updates.
		placeHolder:"juitterContainer", // Set a place holder DIV which will receive the list of tweets example <div id="juitterContainer"></div>
		loadMSG: "Loading tweets...", // Loading message, if you want to show an image, fill it with "image/gif" and go to the next variable to set which image you want to use on 
		imgName: "loader.gif", // Loading image, to enable it, go to the loadMSG var above and change it to "image/gif"
		total: 12, // number of tweets to be show - max 100
		readMore: " ", // read more message to be show after the tweet content
		nameUser:"image" // insert "image" to show avatar of "text" to show the name of the user that sent the tweet 
	});	
	$("#atab1").click(function(){
		$(".jLinks").removeClass("on");
		$(this).addClass("on");									  
		$.Juitter.start({
			searchType:"searchWord",
			searchObject:"photography,japan,jimatwood",
			live:"live-120" // it will be updated every 120 seconds/2 minutes
		});
	});
	$("#atab2").click(function(){
		$(".jLinks").removeClass("on");
		$(this).addClass("on");									  
		$.Juitter.start({
			searchType:"searchWord",
			searchObject:"Japan,Tokyo,Nagano,Nagoya",
			live:"live-120" // it will be updated every 120 seconds/2 minutes
		});
	});
	$("#atab3").click(function(){
		$(".jLinks").removeClass("on");
		$(this).addClass("on");									  
		$.Juitter.start({
			searchType:"searchWord",
			searchObject:"Photography,photog,photographer",
			live:"live-120" // it will be updated every 120 seconds/2 minutes
		});
	});
		$("#atab4").click(function(){
		$(".jLinks").removeClass("on");
		$(this).addClass("on");									  
		$.Juitter.start({
			searchType:"searchWord",
			searchObject:"tech,computer",
			live:"live-120" // it will be updated every 120 seconds/2 minutes
		});
	});
		$("#atab5").click(function(){
		$(".jLinks").removeClass("on");
		$(this).addClass("on");									  
		$.Juitter.start({
			searchType:"searchWord",
			searchObject:"wordpress",
			live:"live-120" // it will be updated every 120 seconds/2 minutes
		});
	});

		$("#atab6").click(function(){
		$(".jLinks").removeClass("on");
		$(this).addClass("on");									  
		$.Juitter.start({
			searchType:"searchWord",
			searchObject:"nikon",
			live:"live-120" // it will be updated every 120 seconds/2 minutes
		});
	});

	 $("#juitterSearch").submit(function(){						  

		$.Juitter.start({

			searchType:"searchWord",

			searchObject:$(".juitterSearch").val(),
			live:"live-20", // it will be updated every 180 seconds/3 minutes
			filter:"sex->*BAD word*,porn->*BAD word*,fuck->*BAD word*,shit->*BAD word*"
		});
                return false;

	});
        $(".juitterSearch").blur(function(){
            if($(this).val()=="") $(this).val("Type a word and press enter");
        });
        $(".juitterSearch").click(function(){
            if($(this).val()=="Type a word and press enter") $(this).val("");
        });
});
