add = function (dbx,idx) {
     $.get('http://'+siteRoot+'/js/ajax.php',{db: dbx, id: idx })
      };
user = function (name) {
     $.get('http://'+siteRoot+'/js/user.php',{user: name })
      };
calendar = function (url) { 
  window.location.href=url;
}

 var Photos=[  
            {"url":"/custom/pics/1.jpg" },  
            {"url":"/custom/pics/2.jpg" },  
            {"url":"/custom/pics/5.jpg"},
            {"url":"/custom/pics/10.jpg"},
             {"url":"/custom/pics/11.jpg"},  
             {"url":"/custom/pics/12.jpg"},
              {"url":"/custom/pics/13.jpg"},
               {"url":"/custom/pics/14.jpg"},
                {"url":"/custom/pics/15.jpg"},
                 {"url":"/custom/pics/16.jpg"},
                  {"url":"/custom/pics/17.jpg"},
                   {"url":"/custom/pics/18.jpg"},
                    {"url":"/custom/pics/19.jpg"},
                     {"url":"/custom/pics/20.jpg"},
                      {"url":"/custom/pics/21.jpg"},
                       {"url":"/custom/pics/22.jpg"},
                        {"url":"/custom/pics/23.jpg"},
                         {"url":"/custom/pics/24.jpg"},
                          {"url":"/custom/pics/26.jpg"},
                            {"url":"/custom/pics/27.jpg"},
                             {"url":"/custom/pics/28.jpg"}
           
                ]  
$(document).ready( function() {
 
  $("#myform :input").tooltip({
	position: "center right",
	effect: "fade",
	tipClass: "formtip"
  }); 
  $(":range").rangeinput({'progress': true});
  $('a.zoom').fancybox({
				'titlePosition'	: 'over',
				'opacity'		: true,
				'overlayShow'	: false,
				'transitionIn'	: 'elastic',
				'transitionOut'	: 'none'
			});
    $('a.obrazek').fancybox({
				'titlePosition'	: 'over',
				'opacity'		: true,
				'overlayShow'	: false,
				'transitionIn'	: 'elastic',
				'transitionOut'	: 'none'
			});
   $("#autostart").fancybox().trigger('click'); 
   $(".zatahovaci").next("p").hide();
  //toggle the componenet with class msg_body
  $(".zatahovaci").click(function()
  {
    $(this).next("p").slideToggle(100);
  });
$(".iframe").fancybox({
		'transitionIn'	: 'none',
		'transitionOut'	: 'none'
	});   
  $(".slide").oSlide({  
                    'images': Photos,      // an array containing all data to the images
                    'enableCaptions':false,  
                    'enableNavigationBar':false,  
                    'enableNavigationControls' : false  
                      
                });  
$(":date").dateinput({
	format: 'yyyy/mm/dd',	// the format displayed for the user
	selectors: true,             	// whether month/year dropdowns are shown
	min: -100,                    // min selectable day (100 days backwards)
	max: 100,                    	// max selectable day (100 days onwards)
	offset: [10, 20],            	// tweak the position of the calendar
	speed: 'fast',               	// calendar reveal speed
	firstDay: 1                  	// which day starts a week. 0 = sunday, 1 = monday etc..
});
$(":range").rangeinput(); 
  		
 });
   
