// scrllTop mouse actions
jQuery(function(){
jQuery('.scrllTop a')
.mouseover(function(){jQuery(this).stop().css({"background-position":"-32px 0px"}).animate({opacity: 1.0}, 150)})
.mouseout(function(){jQuery(this).stop().css({"background-position":"0px 0px"}).animate({opacity: 0.5}, 150)})
});
// scrllTop mouse actions

// writeUs mouse actions
jQuery(function(){
jQuery('#writeUs a')
.mouseover(function(){jQuery(this).stop().css({"background-position":"0px -30px"}).animate({opacity: 1.0}, 150)})
.mouseout(function(){jQuery(this).stop().css({"background-position":"0px 0px"}).animate({opacity: 0.8}, 150)})
});
// writeUs mouse actions

// showInBigPreview
function showInBigPreview(object,filename,description){
var prevSmallText="small";
var prevBigText="big";
var prevExtension=filename.substring(filename.length-4,filename.length);
var _filename=filename.substring(0,filename.length-(prevSmallText.length+prevExtension.length))+prevBigText+prevExtension;
jQuery("img."+object).stop(true,true).animate({opacity:0.1},{duration:700,complete:function(){
jQuery("img."+object).attr("src",_filename)}});
jQuery("img."+object).stop(true,true).animate({opacity:1.0},{duration:500});
jQuery("img."+object).parent().animate({rotate:'0deg'},{duration:300}).stop(true,true).delay(5000).animate({rotate:'3deg'},{duration:300});
}
// showInBigPreview

// ajax contact form
jQuery(function() {
  jQuery(".submitbttn").click(function() {
		var mail = jQuery(".mail").val();  
		var message = jQuery(".message").val();  
		var dataString = 'mail=' + mail + '&message=' + message;
		jQuery.ajax({
			type: "POST",
			url: "moduly/mail.php",
			data: dataString,
			timeout: 10000,
			success: function(msg) {
				jQuery(function(){
					jQuery('#dialog').html('<p><span class="ui-icon ui-icon-info" style="float:left; margin:0 7px 50px 0;"></span>' + msg + '</p>');
					jQuery('#dialog').dialog({
						modal: true,
						minWidth: 400,
						show: 'fade',
						hide: "fade",
						title: 'Správa',
						buttons: {
							Ok: function(){
								jQuery(this).dialog('close');
							}
						}
					});
				});
			}
		});
		return false;
  });
});
// ajax contact form

// input field helper
function inputFieldHelper(obj, val)
{
	if (obj.value==val){
		obj.value=""
    obj.style.color="black"
		obj.style.fontStyle="normal"
	}else{
    if (obj.value==""){
    	obj.value=val
    	obj.style.color="#444"
			obj.style.fontStyle="italic"
    }
  }
}
// input field helper
