$(document).ready(function() { 

    // malsup.com/jquery/form/#code-samples
    var options = { 
        target:     '#form_echo',   // target element(s) to be updated with server response 
        type:      'post'
    }; 
 
    // bind to the form's submit event 
    $('#myform').submit(function() { 
        $(this).ajaxSubmit(options); 
        return false; 
    }); 
    
    // malsup.com/jquery/form/#code-samples
    var options1 = { 
        target:     '#form_echo1',   // target element(s) to be updated with server response 
        type:      'post'
    }; 
 
    // bind to the form's submit event 
    $('#myform1').submit(function() { 
        $(this).ajaxSubmit(options1); 
        return false; 
    }); 
    
    // malsup.com/jquery/form/#code-samples
    var options2 = { 
        target:     '#form_echo2',   // target element(s) to be updated with server response 
        type:      'post'
    }; 
 
    // bind to the form's submit event 
    $('#myform2').submit(function() { 
        $(this).ajaxSubmit(options2); 
        return false; 
    }); 
    
    // malsup.com/jquery/form/#code-samples
    var options3 = { 
        target:     '#form_echo3',   // target element(s) to be updated with server response 
        type:      'post'
    }; 
 
    // bind to the form's submit event 
    $('#myform3').submit(function() { 
        $(this).ajaxSubmit(options3); 
        return false; 
    });
    
    
    
    /********/
    //povecava fontov
    var section = new Array('.content h2');  
    section = section.join(',');  
    var section2 = new Array('.content');  // var section2 = new Array('p');  
    section2 = section2.join(',');
    /*var section3 = new Array('#main_content h3');  
    section3 = section3.join(',');*/
   
    // Reset Font Size  
   /* var originalFontSize = $(section).css('font-size');    
         $(".resetFont").click(function(){  
         $(section).css('font-size', originalFontSize);  
     });  */
     // Increase Font Size  
     $(".increaseFont").click(function(){ 
     
        var currentFontSize = $(section).css('font-size');
        if(currentFontSize < '34'){             
         var currentFontSizeNum = parseFloat(currentFontSize, 10);  
         var newFontSize = currentFontSizeNum*1.2;  
         $(section).css('font-size', newFontSize);  
         }
         
         var currentFontSize = $(section2).css('font-size'); 
        //alert(currentFontSize);
         if(currentFontSize < '19'){ 
         var currentFontSizeNum = parseFloat(currentFontSize, 10);  
         var newFontSize = currentFontSizeNum*1.2;  
         $(section2).css('font-size', newFontSize); 
         }

        /*var currentFontSize = $(section3).css('font-size');  
        if(currentFontSize < '22'){         
         var currentFontSizeNum = parseFloat(currentFontSize, 10);  
         var newFontSize = currentFontSizeNum*1.2;  
         $(section3).css('font-size', newFontSize);
         }*/
         
         return false;  
     });  
          
     
     // Decrease Font Size  
     $(".decreaseFont").click(function(){ 
      
         var currentFontSize = $(section).css('font-size'); 
         if(currentFontSize > '22'){  
         var currentFontSizeNum = parseFloat(currentFontSize, 10);  
         var newFontSize = currentFontSizeNum/1.2;  
         $(section).css('font-size', newFontSize);  
         }
         
         var currentFontSize = $(section2).css('font-size');
         if(currentFontSize > '13'){   
         var currentFontSizeNum = parseFloat(currentFontSize, 10);  
         var newFontSize = currentFontSizeNum/1.2;  
         $(section2).css('font-size', newFontSize);  
         }
         
         /*var currentFontSize = $(section3).css('font-size');  
         if(currentFontSize > '13'){  
         var currentFontSizeNum = parseFloat(currentFontSize, 10);  
         var newFontSize = currentFontSizeNum*0.8;  
         $(section3).css('font-size', newFontSize);
         }*/ 
         
         return false;  
     });  
    /********/    
    
}); 
