$(document).ready(function(){
	
	
	/************************************************************************
	 Tweets
	************************************************************************/
	getTwitters('tweets', { 
  				id: 'ckor', 
  				count: 2, 
  				enableLinks: true, 
  				ignoreReplies: true, 
  				clearContents: true,
  				newwindow: true,
  				template: '"%text%" <br/> <a href="http://twitter.com/%user_screen_name%/statuses/%id%/" class="tweet_date" target="_blank">%time%</a>'
			});
	
	
	/************************************************************************
	 tipTip
	************************************************************************/
	$(".social_icons a").tipTip({
		defaultPosition: "bottom",
		delay: 0,
		fadeIn: 100, 
		fadeOut: 100
	});
	
	$(".recent_work ul li a img").tipTip({
		defaultPosition: "bottom",
		attribute: "alt",
		delay: 0,
		fadeIn: 100, 
		fadeOut: 100
	});
	
	
	/************************************************************************
	 Portfolio Hover Opacity
	************************************************************************/
	$(".recent_work ul li a").hover(
		function(){
			$(this).animate({'opacity':0.6},300);
		},
		function(){
			$(this).animate({'opacity':1},300);
		}
	);
	
	
	
	
	/************************************************************************
	 Email Anti-Spam Replacement
	************************************************************************/
	$('.quote').attr('href', 'mailto:info@andrewckor.com');
	
	
	/************************************************************************
	 Actime Menu Class
	************************************************************************/
	$('.menu ul li a').click(function(){
		if($(this).parent().hasClass('current_menu_item')){
		}else{
			$('.menu ul li.current_menu_item').removeClass('current_menu_item');
			$(this).parent().addClass('current_menu_item');
			var scrollingPoint = $(this).attr('href');
			$.scrollTo(scrollingPoint, 800);
		}
		return false;
	});
	
	/************************************************************************
	 ScrollTo Effect
	************************************************************************/
	
	
	
	
	
	/************************************************************************
	 Fancybox
	************************************************************************/
	$(".recent_work ul li a").fancybox({
		autoScale: false,
		overlayColor:"#000",
		overlayOpacity: 0.6,
		titleFormat: function() {
			if(this.title.substring(0,4) == "www."){
				var titleLink = '<a target="_blank" class="fancybox_title_link" href="http://' + this.title + '"> Visit ' + this.title + '</a>';
				return titleLink;
			}
			var titleLink = '<span class="fancybox_title_link">' + this.title + '</span>'
            return titleLink;
        }

	});
	
	
});//end of document ready

