// JavaScript Document

$(document).ready(function(){
						   
   	$('#navWrapper li:first').addClass('navFirstLi');
	$('#navWrapper li:last').addClass('navLastLi');
	
	$('.entry table thead tr th:first').addClass('firstTH');
	$('.entry table tbody tr td:first-child').addClass('firstTD');

	$('tbody tr:nth-child(odd)').addClass('odd'); // zebra table
	
	$('#featureSlide div').click(function(){
    	window.location=$(this).find('a').attr('href');return false;
	});
	
    $('#shareContainerDrop').hover(
      function () {
        $('#shareContainerWrap').show();
        $('#shareContainerDrop a:first').addClass('hovered');
      }, 
      function () {
        $('#shareContainerWrap').hide();
        $('#shareContainerDrop a:first').removeClass('hovered');
      }
    );
	
	$('#featureNav').jFlow({
		slides: '#featureSlide',
		controller: '.jFlowControl',
		slideWrapper : '#featureMask',
		selectedWrapper: 'jFlowSelected',
		width: '566px',
		height: '258px',
		duration: 400,
		prev: '#featButtonHolder .previous',
		next: '#featButtonHolder .next'
	});
	
    $('#homeTabs').tabs({ fxFade: true, fxSpeed: 'fast' });
	
	if (jQuery.browser.msie) {
		if(parseInt(jQuery.browser.version) == 6) {
			$('#commentTabs').tabs();
		}
	}
	if( (parseInt(jQuery.browser.version) == 7) || (parseInt(jQuery.browser.version) == 8) ) {
		$('#commentTabs').tabs();
	}
	else {
		$('#commentTabs').tabs({ fxFade: true, fxSpeed: 'fast' });		
	}
    
    $("a[rel^='galeria']").prettyPhoto( { theme: 'facebook' } );
	
});

DD_belatedPNG.fix('img.ribbon');
DD_belatedPNG.fix('#footerLogo');

function mailpage()
{
	mail_str = 'mailto:?subject=Check out the ' + document.title;
	mail_str += '&body=I thought you might be interested in the ' + document.title;
	mail_str += '. You can view it at, ' + location.href;
	location.href = mail_str;
}


