$(document).ready(function() {	
		
	$('a[href*=#]').click(function() {
		var duration=1000; // duration in ms
		var easing='swing'; // easing values: swing | linear
		var newHash=this.hash; // get / set parameters
		var target=$(this.hash).offset().top;
		var oldLocation=window.location.href.replace(window.location.hash, '');
		var newLocation=this;
		
		if(oldLocation+newHash==newLocation) { // make sure it's the same location
			$('html:not(:animated),body:not(:animated)').animate({ scrollTop: target }, duration, easing, function() { // animate to target and set the hash to the window.location after the animation
				window.location.href=newLocation; // add new hash to the browser location
			});
			
			return false; // cancel default click action
		}
	});
	
	$('#header').cycle({ fx: 'fade', timeout: 5000 });
		
});

function getChannel() {
	document.getElementById('chanChild').value = document.getElementById('chanMain').value;
}

