jQuery(document).ready(function() {




	// placeholdery
	function placehol(el, placeholdtext) {
		$(el).val(placeholdtext);

		$(el).focusin(function() {
			if($(el).val() == placeholdtext)
				$(el).val('');
		});
		$(el).focusout(function() {
			if($(el).val() == '')
				$(el).val(placeholdtext);
		});
	}

	var map = 'Najdi na mapě';
	var username = 'jméno';
	var password = 'heslo';

	placehol('#map', map);
	placehol('#username', username);
	placehol('#password', password);





	// rozbaleni schranky
	

	
	
	
	
	
	
	
	
	
	
	
	
	
	
	updateCart();

	jQuery("a.group").fancybox({
		'transitionIn' : 'elastic',
		'transitionOut' : 'elastic',
		'speedIn' : 600,
		'speedOut' : 200,
		'overlayShow' : false
	});

	/*jQuery('#tree2').checkboxTree({
	 collapseImage: '/js/v3/checkboxtree/images/minus.png',
	 expandImage: '/js/v3/checkboxtree/images/plus.png',
	 initializeChecked: 'collapsed',
	 initializeUnchecked: 'collapsed'
	 }); */

	jQuery("#expander1").expander({
		slicePoint : 500,
		widow : 2,
		expandEffect : 'show',
		userCollapseText : '[skrýt]',
		expandText : 'více',
	});

	jQuery("#expander2").expander({
		slicePoint : 500,
		widow : 2,
		expandEffect : 'show',
		userCollapseText : '[skrýt]',
		expandText : 'více',
	});

	jQuery("#expander3").expander({
		slicePoint : 500,
		widow : 2,
		expandEffect : 'show',
		userCollapseText : '[skrýt]',
		expandText : 'více',
	});

	jQuery("#expander4").expander({
		slicePoint : 500,
		widow : 2,
		expandEffect : 'show',
		userCollapseText : '[skrýt]',
		expandText : 'více',
	});

	jQuery('#mycarousel').jcarousel({
		vertical : true,
		scroll : 2
	});

	jQuery("#expander").expander({
		slicePoint : 500,
		widow : 2,
		expandEffect : 'show',
		userCollapseText : '[skrýt]',
		expandText : 'více',
	});

	//jQuery("ul.sf-menu").superfish();

	jQuery("ul.sf-menu").supersubs({
		minWidth : 12, // minimum width of sub-menus in em units
		maxWidth : 27, // maximum width of sub-menus in em units
		extraWidth : 1     // extra width can ensure lines don't sometimes turn over
		// due to slight rounding differences and font-family
	}).superfish({
		onBeforeShow : function() {
			//$(".sub_1").css("right",100); // in this case shifts the last sub menu  to avoid extending beyond  main container
			//$(".sub_2").css("right",400); // in this case shifts the last sub menu  to avoid extending beyond  main container
		},
		autoArrows : true,

		delay : 1200,

	});
	// call supersubs first, then superfish, so that subs are
	// not display:none when measuring. Call before initialising
	// containing tabs for same reason.

});

