// Title: Sheen Media Blog - javascript
// Author: Kalon Edser, http://www.kalonedser.com/
// Updated: 21 August 2009

jQuery(document).ready(function() {
	
	$('body').addClass('js');
	
	// first entry text
	$('.entry-body *:first-child').addClass('first');

	// window scroll effect for anchor links
	$.localScroll({ margin:true });
	$.localScroll.hash({ margin:true });

	// pretty photo controls
	$("a[rel^='prettyPhoto']").prettyPhoto({
			animationSpeed: 'normal', /* fast/slow/normal */
			padding: 40, /* padding for each side of the picture */
			opacity: 1, /* 0.35 value betwee 0 and 1 */
			showTitle: false, /* true/false */
			allowresize: true, /* true/false */
			counter_separator_label: '/', /* The separator for the gallery counter 1 "of" 2 */
			theme: 'light_square' /* light_rounded / dark_rounded / light_square / dark_square */
		});
	
	// add active class to current month
	if($('.month-title').length > 0) {
		var $thismonth = $('.month-title').text();
		$(".rssMenu li a:contains(" + $thismonth + ")").addClass('active');
	}
	
	// RSS make external
	$('#rss a').attr('rel','external');

	// open new window for external links
	$('A[rel="external"]').click( function() {
        window.open( $(this).attr('href') );
        return false;
    });

});
