$(document).ready(function(){
    swfobject.embedSWF('/flash/carousel_v3.swf', 'carousel1', 780, 334, '10.0.0', '/flash/expressInstall.swf',
                        {'json':'/json1.php'}, {'wmode':'transparent', 'allowScriptAccess':'sameDomain'});
    //swfobject.embedSWF('/flash/carousel.swf', 'carousel2', 750, 150, '10.0.0', '/flash/expressInstall.swf',
     //                   {'json':'/json2.php'}, {'wmode':'transparent', 'allowScriptAccess':'sameDomain'});

    $('#carouselTop img, #carouselBottom img').click(goTop);
});

function goTop(){
    switch($(this).attr('id')){
        case 'goLeft':
            $('#carousel1')[0].moveRight();
        break;
        case 'goRight':
            $('#carousel1')[0].moveLeft();
        break;
        case 'bottomGoRight':
            $('#carousel2')[0].moveLeft();
        break;
        case 'bottomGoLeft':
            $('#carousel2')[0].moveRight();
        break;
    }
}

function toggle_filter()
{
	var isVisible = $(".object:last").is(":visible");
	
	if(!isVisible)
		hide_filter();
	else
		show_filter();
}


function hide_filter()
{
	$("div#filter").css({
		height:"15px",
		overflow:"hidden"
	});
	
	$(".object:last").show();
	document.cookie += "filterVisible=true";
}

function show_filter()
{
	$("div#filter").css({
		height:"165px",
	});
	$(".object:last").hide();
	document.cookie += "filterVisible=false";
}
