$(document).ready(function(){
//ID NOOB SCRIPTING XB

	// SMOOTHSCROLL TO #DIV
	$("a[href^=#][href!=#]").live('click',function(e){
		$('html,body').animate({'scrollTop': $($(this).attr('href')).offset().top+'px'}); 
		e.preventDefault();
	});
	
	
	 // Automatically open external links open in new window/tab
	$("a[rel='external']").attr('target','_blank');	
	

	// HOVER FADE IN OUT
	/*$(".thumbholder a").hover(
		function () {
			$(this).fadeTo("", 0.8);
		}, 
		function () {
			$(this).fadeTo("", 1);
		}
	);*/
	
	
	// hovFade
	/*$("#element").addClass("hovFade");
	var oldOpacity = "0";
	$(".hovFade").hover(
		function () {
		oldOpacity = $(this).css("opacity");		
		$(this).animate({opacity: '1'},{"duration":300});
	},
	function () {
		$(this).animate({opacity: oldOpacity},{"duration":300});
	}
	);*/
	
	
	// USE YOUR ILLUSION
	/*$('#illusion-on').click(function () {
		$('#illusion').fadeIn('fast');
		return false;
	})	
	$('#illusion').click(function () {
		$(this).fadeOut('fast');
	})	*/
	
	
	// AJAX NOTICES
	/*$('#ajaxMessage-test').click(function () {
		$("#ajaxMessage").fadeIn(2000).fadeTo(5000, 1).fadeOut(2000);
	})	
	$('#ajaxMessage .close').click(function () {
		$('#ajaxMessage').fadeOut('fast');
	})*/
	

	// TOOLTIPS
	/*$('.tooltips a[title], .thumb-list li a').tooltip({ 
		tip: '#tooltip',
		effect: 'slide'
	});	*/
	
	
	// TABS
	/*$('.gottabs').tabs({ fx: { opacity: 'toggle' } });*/
	
	
	/** 
	 * @projectDescription	Simple Equal Columns
	 * @author 	Matt Hobbs
	 * @version 	0.01 
	 */
	jQuery.fn.equalCols = function(){
		//Array Sorter
		var sortNumber = function(a,b){return b - a;};
		var heights = [];
		//Push each height into an array
		jQuery(this).each(function(){
			heights.push(jQuery(this).height());
		});
		heights.sort(sortNumber);
		var maxHeight = heights[0];
		return this.each(function(){
			//Set each column to the max height
			jQuery(this).css({'height': maxHeight});
		});
	};
	//Usage
	//Select the columns that need to be equal e.g
	jQuery('.equal').equalCols();
	
	
	// hovFade
	/*$("#reg a").addClass("hovFade");
	var oldOpacity = "0";
	$(".hovFade").hover(
		function () {
		oldOpacity = $(this).css("opacity");		
		$(this).animate({opacity: '1'},{"duration":500});
	},
	function () {
		$(this).animate({opacity: oldOpacity},{"duration":500});
	}
	);*/
	
	
	//TABLE EVEN ODD ROWS
	/*$('table.zebra tbody tr:odd').addClass('odd');
	$('table.zebra tbody tr:even').addClass('even');*/
	
	//nth cild
	 $(".gallery li:nth-child(2n)").addClass("nobreak"); 
	
	
	//CODA SLIDER
	/*$('#coda-slider-1').codaSlider({
		autoSlide: true,
		autoSlideInterval: 6000
		});	*/
		
		
	// CROSS SLIDE
	/*$('#cross-slide').crossSlide({
		  sleep:4,
		  fade: 2
		}, [
		  { src: 'img/carousel1.jpg' },
		  { src: 'img/carousel2.jpg' },
		  { src: 'img/carousel3.jpg' }
		]);	*/
	
	/*$('#cross-slide2').crossSlide({
		  sleep:4,
		  fade: 2
		}, [
		  { src: 'img/airantou/pop01_img01.jpg' },
		  { src: 'img/airantou/pop02_img01.jpg' },
		  { src: 'img/airantou/pop03_img01.jpg' },
		  { src: 'img/airantou/pop04_img01.jpg' },
		  { src: 'img/airantou/pop05_img01.jpg' },
		  { src: 'img/airantou/pop06_img01.jpg' },
		  { src: 'img/airantou/pop07_img01.jpg' },
		  { src: 'img/airantou/pop08_img01.jpg' },
		  { src: 'img/airantou/pop09_img01.jpg' },
		  { src: 'img/airantou/pop10_img01.jpg' },
		  { src: 'img/airantou/pop11_img01.jpg' },
		]);	*/
	
	
});

