  jQuery(document).ready(function(){
         $("#email").click(function() {
                 $(this).attr("value","");
         });

	$(".sidebar .menu a:first").addClass("first");
	$(".sidebar .menu a:last").addClass("last");

	jQuery("a.support-bar").hover(
      function () {
        jQuery(this).animate({"width": "135px"}, "fast");
      }, 
      function () {
        jQuery(this).animate({"width": "32px"}, "slow");
      });

		jQuery(".header a, .btm a, .sidebar .menu a").each(function() {
			if(this.href == window.location) jQuery(this).addClass("active");
		});
		jQuery(".sidebar .menu a.first").each(function() {
			if(this.href == window.location) jQuery(this).addClass("first-active");
		});
		jQuery(".sidebar .menu a.last").each(function() {
			if(this.href == window.location) jQuery(this).addClass("last-active");
		});
		

		$("a.shot").fancybox(
			{
				'hideOnContentClick': false,
				'zoomSpeedIn': 300, 'zoomSpeedOut': 300
			}
		);

		$('ul#screenshots').innerfade({
			speed: 'slow',
			timeout: 4000, 
			type: 'random',
			containerheight: '299px'
		});	
	});
	
		function loginUser(form, username) {
			if (document.forms[form].username) {
				document.forms[form].username.value = username;
				document.forms[form].submit();
			}
		}
		
function mailchimp_subscribe (form,site_url,link_id){
	var req = jQuery.post
	( 
		site_url, 
		jQuery('#' + form).serialize(), 
		function(html){
			var kt = html.split('|:|');
			if(kt[0]=='Success') {
				jQuery('#' + link_id).addClass('success');
			}
			else if (kt[0]=='Error') {
				jQuery('#' + link_id).addClass('error');
			}
			jQuery('#' + link_id).html(kt[1]);
			jQuery('#' + link_id).slideDown("slow");
			req = null;
		}
	);
}