jQuery.noConflict();
jQuery(document).ready(function(){
	jQuery('.select li.current').prependTo('.select ul');
	jQuery('.select li.current a').click(function(){
		jQuery(this).parents('ul').toggleClass('active');
		return false;
	});
	jQuery('.select ul').mouseleave(function(){
		jQuery(this).removeClass('active');
	});
	jQuery('.add_confirm').click(function(){
		jQuery('.matches').css('visibility', 'visible');
		return false;
	});
	jQuery('.close').click(function(){
		jQuery('.matches').css('visibility', 'hidden');
		return false;
	});
	var params = {
		changedEl: "#percent",
		visRows: 10,
		scrollArrows: false
	}
	if(jQuery(params['changedEl']).is('select'))
		cuSel(params);
	
	jQuery('#mycarousel').jcarousel();  
	
	 jQuery(".salon").fancybox({
    'transitionIn'		: 'elastic',
	'transitionOut'		: 'elastic',
	'titlePosition' 	: 'inside',
	//'titlePosition' 	: 'over',
	//'titleFormat'       : function(title, currentArray, currentIndex, currentOpts){ return '<b>' + title + '</b>';}
	'titleFormat'		: function(title, currentArray, currentIndex, currentOpts){ return '<div id="tip7-title"><span><a href="javascript:;" onclick="$.fancybox.close();"><img src="/themes/jQuery/fancybox/closelabel.gif" /></a></span>' + (title && title.length ? '<b>' + title + '</b>' : '' ) + 'Image ' + (currentIndex + 1) + ' of ' + currentArray.length + '</div>';}
	//'titleFormat'       : function(title, currentArray, currentIndex, currentOpts){ return '<span id="fancybox-title-over">Image ' +  (currentIndex + 1) + ' / ' + currentArray.length + ' ' + title + '</span>';}
  });
});
