/*
*   L2CM© 2011 PXW version 0.1c
*/

$(document).ready(function() {
/*
*   Examples - images
*/

/* fancybox */
$("a#img_only").fancybox({
'titlePosition'	: 'over',
'titleShow'		: true,
'transitionIn'	: 'elastic',
'transitionOut'	: 'nene'
});


$("a[rel=img_groupe]").fancybox({
'transitionIn'		: 'none',
'transitionOut'		: 'none',
'titlePosition'     : 'over',
'titleFormat'		: function(title, currentArray, currentIndex, currentOpts) {
return '<span id="fancybox-title-over">Image ' + (currentIndex + 1) + ' / ' + currentArray.length + (title.length ? '   ' + title : '') + '</span>';
}
});

$("a#webframe").fancybox({
'width'				: '55%',
'height'			: '75%',
'autoScale'			: false,
'transitionIn'		: 'elastic',
'transitionOut'		: 'nene',
'type'				: 'iframe',
'overlayColor'		: '#000'
});
/* fancybox (end) */

/* Jquery */
$(function() {
	$( "#dialog" ).dialog({
		autoOpen: false,
		show: "blind"
	});

	$( "#open-dial" ).click(function() {
		$( "#dialog" ).dialog( "open" );
		return false;
	});

	$( "#accordion" ).accordion({
			active: false,
			collapsible: true,
			autoHeight: false
	});

	$( "#tabs" ).tabs({
		
	});

	$( "#tabsAjax" ).tabs({
			ajaxOptions: {
				error: function( xhr, status, index, anchor ) {
					$( anchor.hash ).html(
						"Couldn't load this tab. We'll try to fix this as soon as possible. " +
						"If this wouldn't be a demo." );
				}
			}
	});

	$( "#datepicker1" ).datepicker({ dateFormat: "dd/mm/yy", changeYear: true });
	$( "#datepicker2" ).datepicker({ dateFormat: "dd/mm/yy", changeYear: true });

	// togglesbox on clicking the noted link  
	$('#toggle_1').click(function() {
	$('#togglebox_1').toggle(400);
	return false;
	});
	
	// togglesbox on clicking the noted link  
	$('#toggle_2').click(function() {
	$('#togglebox_2').toggle(400);
	return false;
	});
	
	// togglesbox on clicking the noted link  
	$('#toggle_3').click(function() {
	$('#togglebox_3').toggle(400);
	return false;
	});

});
/* Jquery (end) */


/* Nivo Slider */
$(window).load(function() {
$('#slider').nivoSlider({

pauseTime:5000,
captionOpacity:0.7,
controlNav:false

});
});
/* Nivo Slider (end) */

});

function pxw_pb(id,val) {
			$(function() {
				$( "#" + id ).progressbar({
					value: val
				});
			});
		}


