function inc(filename)
{
  var body = document.getElementsByTagName('head').item(0);
  script = document.createElement('script');
  script.src = filename;
  script.type = 'text/javascript';
  body.appendChild(script)
}
	inc('js/jquery.all.js');
	inc('js/jquery.hoverimagetext.js');
	inc('js/jquery.nyromodal.js');
	inc('js/jquery.tweet.js');
	inc('js/jquery.validate.js');
	
// Page enhancement
	$(function() {
		if (!$.browser.opera) {
			$('ul#menu li a, a.top, a.button, a.contact').click(function(e) {
				e.preventDefault();
				$.scrollTo($(this).attr('href'), 'slow');
			});
		}
		$('#menu').lavaLamp({
    		fx: 'swing',
    		speed: 333
    	});
	});
// Accordion
	$(function(){
	  $('ul.team, #resources ul').accordion({ 
	    header: 'a.head', 
	    active: 'true', 
	    navigation: 'true',
	    autoheight: 'false',
	    event: 'click'
	  });
	});
// Works Showcase
	$(function(){
		$.fn.HoverImageText.defaults.AnimShow = {height: "show"};
		$('.showcase li').HoverImageText();
	});
// Cufon Text Replacement
	$(function() {
	  	Cufon.replace('h1, h2, h3, h4, h5, blockquote');
	  	Cufon.replace('.title, .detail, .featured-work span, .button');
	});
// Twitter Widget
	$(function(){
		$(".tweet").tweet({
				username: "fadzril",
				join_text: "auto",
				avatar_size: 22,
				count: 2,
				auto_join_text_default: "we said,", 
				auto_join_text_ed: "we",
				auto_join_text_ing: "we were",
				auto_join_text_reply: "we replied to",
				auto_join_text_url: "we were checking out",
				loading_text: "loading tweets..."
		});
	});
// Validate contact form
	$(function(){
    $("#contactform").validate();
  });
// Modal Window