$(document).ready(function() {
	
	if($('#feature_slider').length) {
		$("#feature_slider").nivoSlider({
			effect:'fade',
			slices:15,
			animSpeed:0,
			pauseTime:6000,
			directionNav:false, //Next & Prev
			controlNav:true, //1,2,3...
			keyboardNav:true, //Use left & right arrows
			pauseOnHover:true, //Stop animation while hovering
			manualAdvance:false, //Force manual transitions
			captionOpacity:1.0, //Universal caption opacity
			beforeChange: function(){},
			afterChange: function(){},
			slideshowEnd: function(){} //Triggers after all slides have been shown
		});
	}
	
	if($('#slider').length) {
		$('#slider').easySlider({
			auto: true, 
			continuous: true,
			pause:6000,
			speed:0,
			controlsShow:false
		});	
	}
	
	if($('#map_canvas').length) {
		$('#map_canvas').googleMaps({
			markers: {
				latitude: 	-31.909244,
				longitude: 	115.805224
}
		});
	}
	
	if($('form.jqtransform').length) {
		$("form.jqtransform").jqTransform();
	}
	
	if($('.boxgrid.captionfull').length) {
		//Full Caption Sliding (Hidden to Visible)
		$('.boxgrid.captionfull').hover(function(){
			$(".cover", this).stop().animate({top:'0px'},{queue:false,duration:160});
		}, function() {
			$(".cover", this).stop().animate({top:'140px'},{queue:false,duration:160});
		});
	}
	
	if($('.kwicks1').length) {
		$('.kwicks1').kwicks({
			min : 35,
			spacing : 4,
			sticky:true
		});

	}
	if($('.kwicks2').length) {
		$('.kwicks2').kwicks({
			min : 35,
			spacing : 4,
			sticky:true
		});

	}
	if($('.kwicks3').length) {
		$('.kwicks3').kwicks({
			min : 35,
			spacing : 4,
			sticky:true
		});

	}
	if($('.kwicks4').length) {
		$('.kwicks4').kwicks({
			min : 34,
			spacing : 4,
			sticky:true
		});

	}
	if($('.kwicks5').length) {
		$('.kwicks5').kwicks({
			min : 35,
			spacing : 4,
			sticky:true
		});

	}
	if($('.kwicks6').length) {
		$('.kwicks6').kwicks({
			min : 32,
			spacing : 4,
			sticky:true
		});

	}
	
	if($('.news').length) {
		var maxHeight = 0;

		$(".news").each(function(){
		   if ($(this).height() > maxHeight) { maxHeight = $(this).height(); }
		});
		
		$(".news").height(maxHeight);	
	}

});

var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-11449116-8']);
_gaq.push(['_trackPageview']);

(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();

