$(document).ready(function() {

    $('div#navFotolia ul li').hide();
    $('div#navDesigner ul li').hide();

	$(".round_5").corner("5px");
	$(".round_10").corner("10px");
	$(".round_20").corner("20px");
	$(".text_teaser").corner("15px");
	$(".navigator_admin").corner("15px");
	$("#navPseu").corner("15px");

	$(".accordion").accordion( {
		header : 'h1',
		autoHeight : false,
		icons : {
			'header' : 'ui-icon-plus',
			'headerSelected' : 'ui-icon-minus'
		}
	});


	$('div#navFotolia h1').click(function() {

		$('div#navFotolia ul li').animate({
			opacity:'toggle',
			height: 'toggle'
		},{
			duration: 400,
			specialEasing: {
				width: 'linear',
				height: 'easeOutBounce'
			},
			complete: function() {
				//$(this).after('<div>Animation complete.</div>');
			}
		})
		//$('span.toggler').hide();
		//if($(this).html() == 'Upload') { $(this).html(''); } else { $(this).html(''); }
	});


	$('div#navDesigner h1').click(function() {
		$('div#navDesigner ul li').animate({
			opacity:'toggle',
			height: 'toggle'
		},{
			duration: 400,
			specialEasing: {
				width: 'linear',
				height:'easeOutBounce'
			},
			complete: function() {
			//	$(this).after('<div>Animation complete.</div>');
			}
		})
	});

	$("a.iframe").fancybox( {
		'frameWidth' : 820,
		'frameHeight' : 650,
		"zoomSpeedIn" : 400,
		"zoomSpeedOut" : 400,
		"zoomSpeedChange" : 400,
		"zoomOpacity" : true,
		"overlayShow" : true,
		"overlayOpacity" : 0.7
	});

	$('a.replace').click(function(e) {
		$('#free_tags').replaceSelection($(this).text(), true);
		$.each($('#free_tags'));
		e.preventDefault();
	});

	$(".alert_pic_details").hide(5000);

	// image_zoom
	$('.mclightbox').fancybox({
		'zoomSpeedIn':		300,
		'zoomSpeedOut': 	300,
		'zoomSpeedChange':  300,
		'zoomOpacity':		true,
		'overlayShow':		false,
		'easingIn':			'easeOutBack',
		'easingOut':		'easeInBack'
	});


});

function openDesigner(url) {
	designer = window.open(url,"Designer","width=850,height=700,status=no,scrollbars=no,resizable=no,menubar=no,location=no,directories=no");
	designer.focus();
}

