/* SCROLL */
$(document).ready(function(){
$(".scroll").click(function(event){
//prevent the default action for the click event
event.preventDefault();
		
//get the full url - like mysitecom/index.htm#home
var full_url = this.href;
		
//split the url by # and get the anchor target name - home in mysitecom/index.htm#home
var parts = full_url.split("#");
var trgt = parts[1];
		
//get the top offset of the target anchor
var target_offset = $("#"+trgt).offset();
var target_top = target_offset.top;
		
//goto that anchor by setting the body scroll top to anchor top
$('html, body').animate({scrollTop:target_top}, 500);
});
});


/* CUFON */
Cufon.replace('.weather .city p', {
fontFamily: 'AGLettericaCondensedLight',
textShadow: '1px 1px #3caed9',
color: '-linear-gradient(#d5f4ff, #9adcf5)'
});

Cufon.replace('.weather .tempr p', {
fontFamily: 'AGLettericaCondensedLight',
textShadow: '1px 1px #3588a7',
color: '-linear-gradient(#ffeb31, #dfcb10)'
});

Cufon.replace('#slider p.date, #slider p.month, #slider p.year, .news p.date, .news p.month, .news p.year', {
fontFamily: 'AGLettericaCondensedLight'
});


/* PRETTY PHOTO */
$(document).ready(function(){
	$(".gallery a[rel^='prettyPhoto']").prettyPhoto({hideflash: true, autoplay: false, allow_resize: true, theme: 'facebook'});
});


/* FADE */
$(document).ready(function(){
	$("img.normal").hover(
	function() {
	$(this).stop().animate({"opacity": "0"}, "fast");
	},
	function() {
	$(this).stop().animate({"opacity": "1"}, "fast");
	});
});
