jQuery(document).ready(function() {

	// input value autoclear and replace (requires class="input" and title="something")
	var inputs = $(".field");
	inputs.focus( function() {
		tag = $(this).get(0).tagName;
		if (tag == 'SELECT' || $(this).attr('title') == '') return;
		if (tag == 'INPUT') {
			if ($(this).attr('title') == $(this).val()) $(this).val('').addClass('on');
		} else if (tag == 'TEXTAREA') {
			if ($(this).attr('title') == $(this).text()) $(this).text('').addClass('on');
		}
	});
	inputs.blur(function() {
		tag = $(this).get(0).tagName;
		if (tag == 'SELECT' || $(this).attr('title') == '') return;
		if (tag == 'INPUT') {
			if ($(this).val() == '' || $(this).val() == ' ') $(this).val($(this).attr('title')).removeClass('on');
		} else if (tag == 'TEXTAREA') {
			if ($(this).val() == '' || $(this).val() == ' ') $(this).text($(this).attr('title')).removeClass('on');
		}
	});
	
	// add rel="external" for external links to open in new window
	$('a[rel="external"]').click( function() {
	        window.open( $(this).attr('href') );
	        return false;
	    });



	
});
	
	
	

jQuery(document).ready(function() {
	jQuery('a[rel*=facebox], a.facebox, .facebox a').facebox();
  
	$('.slider')
	.cycle({ 
		fx:'fade',
		speed:850,
		timeout: 6000
	});

	var GB_ANIMATION = true;
	$(document).ready(function(){
	  $("a.greybox").click(function(){
	    var t = this.title || this.innerHTML || this.href;
	    GB_show(t,this.href,650,700);
	    return false;
	  	});
	});      
});
