/*
$(document).ready(function() {
	$(function(){
			$.fn.supersized.options = {  
				startwidth: 640,  
				startheight: 480,
				vertical_center: 1,
				slides : [
					{image : ' ../slides/fence.jpg' }
				]
			};
	        $('#supersized').supersized(); 
	    });
}
*/

function openPhoto(photo,idphoto) {
	$("#gal_col2").html('loading...');  
	var img = new Image();
	var pp = idphoto;
	$(img).load(function () {
		$('#gal_col2').hide();
		$('#gal_col2').html(this);
		$('#gal_col2').fadeIn();
	}).error(function () {
		// notify the user that the image could not be loaded
	}).attr('src', photo);
	if (idphoto!='') {
		$.post(  
			'flickr_description.php',  
			{id: idphoto},  
			function(responseText){  
				$("#description").html(responseText);  
			},  
			"html"  
		);  
		$('#gal_col2').unbind();		
		$('#gal_col2').click(function() {
			$('#foto_'+pp).trigger('click');			
		});
	}
}

function mycarousel_initCallback(carousel) {
	/*
		jQuery('.jcarousel-control a').bind('click', function() {
			carousel.scroll(jQuery.jcarousel.intval(jQuery(this).text()));
			return false;
		});
		jQuery('.jcarousel-scroll select').bind('change', function() {
			carousel.options.scroll = jQuery.jcarousel.intval(this.options[this.selectedIndex].value);
			return false;
		});

	*/
    jQuery('.gal_siguiente').bind('click', function() {
        carousel.next();
        return false;
    });
    jQuery('.gal_anterior').bind('click', function() {
        carousel.prev();
        return false;
    });
};

function changeYearGallery() {
	f = document.forms['miForm'];
	location.href = 'galeria.php?year='+f.year.value;
}
