// Delay Plugin for jQuery
// - http://www.evanbot.com
// - © 2008 Evan Byrne

jQuery.fn.delay = function(time,func){
	this.each(function(){
		setTimeout(func,time);
	});
	
	return this;
};

// Integ Home Page Gallery
// - Pitch (pitch.net.nz)
// - current jQuery v.1.3.2

$(document).ready(function(){
	var hgn = 1;
	
	var currtext = $("#home-img-1 a").text();
	$("#home-gallery-text").text(currtext);
	
	var currlink = $("#home-img-1 a").attr('href');
	$("#home-gallery-text").attr('href', currlink);
	
	
	
	$('#home-img-gallery') 
	.before('') 
	.cycle({ 
	    fx:     	'fade', 
	    speed:  	'slow', 
	    pager:  	'#home-pager',
		timeout: 	7000,
		speed: 		1000,
		pause: 		true,
		random: 	true 
	});
});


// NOT FOR GALLERY but remove all inline styles from text-editor
$(document).ready(function(){
	$('#white-box p').removeAttr('style');
	$('#white-box h2').removeAttr('style');
	$('#white-box h3').removeAttr('style');
	$('#white-box h4').removeAttr('style');
});
