// Easing equation, borrowed from jQuery easing plugin
// http://gsgd.co.uk/sandbox/jquery/easing/
jQuery.easing.easeOutQuart = function (x, t, b, c, d) {
	return -c * ((t=t/d-1)*t*t*t - 1) + b;
};

	$(document).ready(function() {
		$(".topMenuAction").click( function() {
			if ($("#openCloseIdentifier").is(":hidden")) {
				$("#slider").animate({ 
					marginTop: "0px"
					}, 300 );
				$("#topMenuImage").html('Přihlásit');
				$("#topMenuImage").removeClass("zavrit");
				$("#openCloseIdentifier").show();
			} else {
				$("#slider").animate({ 
					marginTop: "-44px"
					}, 300 );
				$("#topMenuImage").html('Zavřít');
        $("#topMenuImage").addClass("zavrit");
				$("#openCloseIdentifier").hide();
			}
		});  
	});


jQuery(function( $ ){
    
    /* LOKALNI SKROLOVANI */
    /*
	 * Restart the scroll position to ( 0, 0 ) (Firefox doesn't reset it)
	 */


	$.localScroll({
		queue:true,
		duration:1000,
		hash:false
	});		
	

  /* SERIAL SCROLL*/	
	$('#superdeal').serialScroll({
		items:'li',
		//prev:'#buttons a.prev',
	  //next:'#buttons a.next',
		//offset:-198, //when scrolling to photo, stop 230 before reaching it (from the left)
    duration:4000,
		force:true,
		axis:'y',
		easing:'easeOutQuart',
		lazy:false,// NOTE: it's set to true, meaning you can add/remove/reorder items and the changes are taken into account.
		interval:1, // yeah! I now added auto-scrolling
		cycle:true, //don't pull back once you reach the end

		step:1 // scroll 2 news each time
	});
	
	/**
	 * The call below, is just to show that you are not restricted to prev/next buttons
	 * In this case, the plugin will react to a custom event on the container
	 * You can trigger the event from the outside.
	 */



/* Barvičky tabulky , row, evenc
/*$("table tr:even").addClass("even");*/
/*$("table tr:odd").addClass("odd");*/

});



