/* Gallery (slide-on-click) */jQuery.fn.gallHide = function(_options){	// defaults options		var _options = jQuery.extend({		duration: 500	},_options);	return this.each(function(){		var _hold = $(this);		var _speed = _options.duration;		_hold.show();		$('#iemask').show();		_t = setTimeout(function(){			_hold.fadeOut(_speed);			_g = setTimeout(function(){				$('#iemask').fadeOut(_speed);			}, _speed)		}, _speed)	});}jQuery.fn.gallFade = function(_options){	// defaults options		var _options = jQuery.extend({		duration: 700	},_options);	return this.each(function(){		var _hold = $(this);		var _speed = _options.duration;		_hold.hide();		$('#wrapper').hide();		_t = setTimeout(function(){			_hold.fadeIn(_speed);			_g = setTimeout(function(){				$('#wrapper').fadeIn(_speed);			}, _speed)		}, _speed)	});}function initTabs(){	$('ul.tabset').each(function(){		var btn_h = $(this);		var _btn = $(this).find('a.tab');		var _a = _btn.index(_btn.filter('.active:eq(0)'));		if(_a == -1) _btn.removeClass('active').eq(_a).addClass('active');		_btn.each(function(_i){			this._box = this.href.substr(this.href.indexOf("#") + 1);			if(this._box){				this._box = $('#'+this._box);				if(_i == _a) this._box.show();				else this._box.css({opacity:0,left:0});			}			this.onclick = function(){				changeTab(_i);				return false;			}		});		function changeTab(_ind){			if(_ind != _a){				if(_a != -1) if(_btn.get(_a)._box) _btn.get(_a)._box.animate({					opacity: 0				}, {queue:false, duration: 500});				else if(_btn.eq(_a)._box) _btn.eq(_a)._box.css({opacity:0})				_btn.eq(_a).removeClass('active');				_btn.eq(_ind).addClass('active');				if(_btn.get(_ind)._box) _btn.get(_ind)._box.animate({					opacity: 1				}, {queue:false, duration: 500});								_a = _ind;			}		}	});}$(document).ready(function(){	$('#iemask').gallHide({		duration: 500	});		$('#visual-fade').gallFade({		duration: 1000	});	initTabs();	$('#header').gallFade({		duration: 1000	});	$('#rob-shepherd-logo').gallFade({		duration: 3500	});	$('#composor-producer').gallFade({		duration: 4500	});	$('#contact-details').gallFade({		duration: 5500	});	$('#footer').gallFade({		duration: 5500	});});
