/*

GNU General Public License
http://www.gnu.org/licenses/gpl-3.0.txt
ozgur yazılımı desteklemektedir.
kaynak kodları istediğiniz şekilde kullanabilirsiniz.
firmanın telif haklarını dikkate almanız şartıyla

User       :  Leonidas Gorgo
Document   :  topaz.js
Created on :  Mar 19, 2011, 12:21:29 AM
Encoding   :  UTF-8
*/

  jQuery(document).ready(
				function($){ $('#container').fadeIn(2500);
					$('.news').innerfade({
						
						speed: 750,
						timeout: 3600,
						type: 'random',
						containerheight: '1em'
					});
					$('#slideone').innerfade({
						
						speed: 750,
						timeout: 3600,
						type: 'random',
                                                containerheight: '153px'
					});
                                        $('#slidetwo').innerfade({
						
						speed: 750,
						timeout: 5400,
						type: 'random',
                                                containerheight: '153px'
					});
                                        
          $('.balon').tipsy({gravity: 's'});                              
                                        
                                  //jQuery("body").append("<div id='opaque' style='display: none;'></div>");


    $('.sub_4').click(function(){
     
     $("#div_4").toggle();
     $("#div_5").hide();
     $("#div_6").hide();
    });
     
     
    $('.sub_5').click(function(){
     
     $("#div_5").toggle();
     $("#div_4").hide();
     $("#div_6").hide();
    });
    
    $('.sub_6').click(function(){
     
     $("#div_6").toggle();
     $("#div_4").hide();
     $("#div_5").hide();
    });
     $('#center').hover(function(){
         $('#div_4').delay(100).fadeOut();
         $('#div_5').delay(100).fadeOut();
         $('#div_6').delay(100).fadeOut();
//        setTimeout('$("#div_4").hide()',1000);
//        setTimeout('$("#div_5").hide()',1000);
//        setTimeout('$("#div_6").hide()',1000);
        //$("#div_4").remove();
//      $("#div_4").hide();
//     $("#div_5").hide();
//     $("#div_6").hide();
     
     });

	            $("a.kardes").fancybox({
		'transitionIn'	:	'elastic',
		'transitionOut'	:	'elastic',
                'padding'               : 0,
                'margin'                : 0,
		'speedIn'		:	600,
		'speedOut'		:	200,
		'overlayShow'	:	false //super
	});
        
     
  
  
 $("#ajax-contact-form").submit(function(){

var str = $(this).serialize();

   $.ajax({
   type: "POST",
   url: "contact.php",
   data: str,
   success: function(msg){
    
$("#note").ajaxComplete(function(event, request, settings){

if(msg == 'OK') // Message Sent? Show the 'Thank You' message and hide the form
{
result = '<div class="notification_ok">Mesajınız Başarıyla Gönderidi!</div>';
$("#fields").hide();
}
else
{
result = msg;
}

$(this).html(result);

});

}

 });

return false;

});
  
  ///jQuery.event.add(window, "load", resizeFrame);
jQuery.event.add(window, "resize", resizeFrame);

function resizeFrame() 
{
    var h = $(window).height();
    var w = $(window).width();
    $("#container").css('height',(h < 1024 || w < 768) ? 500 : 400);
}
 
					
			});

