function resizePost () {
	var height = jQuery('.centerPost').height();
	jQuery('#postContent').height(height+200);
	jQuery('#postBody').height(height+130);	
}
resizePost();

function firstVideo () {
	var obj = jQuery('#videoList li:first-child');
	obj.addClass('active');
	var idVideo = obj.find('.hidden').html();
	jQuery('#featuredVideo').html('<iframe width="574" height="323" src="http://www.youtube.com/embed/'+idVideo+'?rel=0&amp;hd=1" frameborder="0" allowfullscreen></iframe>');
	//jQuery('#featuredVideo').html('<img class="videoThumb" src="http://img.youtube.com/vi/'+idVideo+'/0.jpg" width="574" height="323" />');
}

jQuery('#newsletters').submit(function(e) {
	var nombre = jQuery('#nombre').val();
	var email = jQuery('#email').val();
	var confir = jQuery('#confirm').is(':checked');
	if (nombre=='' || email =='' || confir==false) {
		jQuery('#errorNews').css('display','block');
		e.preventDefault();	
	}
});

jQuery(document).ready(function() {
	firstVideo ();
								
	jQuery('#videoList li').click(function() {
		var obj = jQuery(this);
		jQuery('#videoList li').removeClass('active');
		obj.addClass('active');
		var idVideo = obj.find('.hidden').html();
		jQuery('#featuredVideo').html('<iframe width="574" height="323" src="http://www.youtube.com/embed/'+idVideo+'?rel=0&amp;hd=1" frameborder="0" allowfullscreen></iframe>');
	});
	jQuery('#videoList').scrollbar();
	
	jQuery('.threeCols a').click(function(e) {e.preventDefault();});
/*	jQuery(function($){
		jQuery.supersized({
			//Background image
			slides	:  [ { image : 'http://www.globalservices360.com/wp-content/themes/360/images/background360.jpg' } ]					
		});
	});*/
	
	jQuery(".archiveListPage li img").mouseover(function(){
      jQuery(this).stop();
	  jQuery(this).animate({ 
        width: 240,
		marginLeft: "-20px",
		marginTop: "-20px",
		opacity: 1
	  }, 500 );
	  
    }).mouseout(function(){
      jQuery(this).stop();
	  jQuery(this).animate({ 
        width: 210,
		marginLeft: "0",
		marginTop: "0",
		opacity: 0.5
	  }, 500 );
    });

});

