function paginationAjax(addr)
	{
    	addr = addr + '/ajax';
    	$("#main").load(addr);
    	return false;
	};
	

$(document).ready(function()
{
  $("a.m_p").click(function()
    {
    	$(this).next("div.m_p").toggle("fast");
        $("a.m_p").not(this).next("div.m_p:visible").hide("fast");
        $("div.m_d").hide("fast");
        return false;
    });

    $("a.m_d").click(function()
    {
     	$(this).next("div.m_d").toggle("slow");
        $("a.m_d").not(this).next("div.m_d:visible").hide("slow");
        return false;
    });

    $("#all").click(function()
    {
     	$("div.m_p").toggle("slow");
    	$("div.m_d").toggle("slow");
		return false;
	});

    $('#logo_bottom').innerfade({
		speed: 'slow',
		timeout: 5000,
		type: 'sequence',
		containerheight: '70px',
		left: 15
	});

	$('#gallery_rand').innerfade({
		speed: 3000,
		timeout: 5000,
		type: 'random',
		containerheight: '120px'
	});

	$(".gallery_image").ready(
	function()
	{
		$(".gallery_image").animate({
			opacity: 0.5
		});
	});

	$(".gallery_image").hover(
	function()
	{
		$(this).animate({
			opacity: 1
		}, 200);
	},
	function()
	{
		$(this).animate({
			opacity: 0.5
		}, 200);
	});
	
	$("#set_gallery").click(function()
    {
     	$("div#webcam_rand").hide(0);
     	$("div#gallery_rand").show(0);
     	return false;
	});
	
	$("#set_webcam").click(function()
    {
     	$("div#gallery_rand").hide(0);
     	$("div#webcam_rand").show(0);
     	return false;
	});
});

