﻿/* 
* jQuery Plugin: Scroll to Top
* http://blog.ph-creative.com/post/jQuery-Plugin-Scroll-to-Top-v3.aspx
*/
$(function() {
  $("#toTop").scrollToTop({speed:1000,ease:"easeInBack",start:700});
});

$(function() {
		$("button, input, input:submit, textarea", ".demo").button();
});

$(function(){
// Accordion
$("#accordion").accordion({ header: "h3" });
// Tabs
$('#tabs,#tabs_2,#tabs_3').tabs();
// Dialog			
$('#dialog').dialog({
autoOpen: false,
width: 600,
buttons: {
"Ok": function() { 
$(this).dialog("close"); 
}, 
"Cancel": function() { 
$(this).dialog("close"); 
} 
}
});
				
// Dialog Link
$('#dialog_link').click(function(){
$('#dialog').dialog('open');
return false;
});

// Datepicker
$('#datepicker').datepicker({
inline: true
});
				
// Slider
// $('#slider').slider({
// range: true,
// values: [17, 67]
// });
				
// Progressbar
$("#progressbar").progressbar({
value: 20 
});
	
//hover states on the static widgets
$('#dialog_link, ul#icons li').hover(
function() { $(this).addClass('ui-state-hover'); }, 
function() { $(this).removeClass('ui-state-hover'); }
);
});

// nadvizenie texta na kartinki
$(document).ready(function () {
		// transition effect
		style = 'easeOutQuart';
		// if the mouse hover the image
		$('.photo, .photoTabs').hover(
			function() {
				//display heading and caption
				$(this).children('div:first').stop(false,true).animate({top:0},{duration:200, easing: style});
				$(this).children('div:last').stop(false,true).animate({bottom:0},{duration:200, easing: style});
			},
			function() {
				//hide heading and caption
				$(this).children('div:first').stop(false,true).animate({top:-30},{duration:200, easing: style});
				$(this).children('div:last').stop(false,true).animate({bottom:-200},{duration:200, easing: style});
			}
		);
});

// slider index
$(document).ready(function(){	
				$("#slider").easySlider({
					auto: true,
					continuous: true 
				});
});	
