/**@auth : can acar
 **@mail : can.acar@windowslive.com
 **@since:2009
 **@content: Don't remove content 
 */

/*-- top menu --*/
$(function(){
	
$('#contact').click(function(){
var iletisim = '/index.php/contact/';
tb_show('İletişim',iletisim+'?&TB_iframe=true&height=620&width=470&modal=true','');
});
$('#ulasim').click(function(){
var ulasim = '/index.php/ulasim';
tb_show('Ulaşım',ulasim+'?&TB_iframe=true&height=738&width=562&modal=true','');
});
});
/*-- search box --*/  
$(function(){

$('ul.list').hide(); 
      $('#ara').click(function() {
  	  $(this).next('ul.list').slideToggle("fast")
     .siblings('ul.list:visible').fadeIn("slow");
    });
});
/*-- Kurumsal Menu --*/
$(function(){
		$('ul.menu_list').hide();
		$('#kurumsal').click(function(){
         $(this).next('ul.menu_list').slideToggle("medium")
		 .siblings('ul.menu_list.li:visible').fadeIn("slow");
    	});
  });

/*-- slide --*/
  $(function() {
    $('#intro').crossSlide({
      sleep: 2,
      fade: 2
    }, [
      { 
      	src: 'dosya/kizilay41.jpg',
   	  	from: '100% 80% 1x',
        to:   '100% 0% 1.7x',
        time: 3
	  },
      {
      	src: 'dosya/kizilay21.jpg',
	  	from: 'top left',
        to:   'bottom right 1.5x',
        time: 2
	   },
      { 
      	src: 'dosya/kizilay31.jpg',
   	   	from: '100% 80% 1.5x',
        to:   '100% 0% 1.1x',
        time: 2

	   }

    ]);
  });
/*-- function --*/
/**@auth : can acar
 **@mail : can.acar@windowslive.com
 **@since:2009
 **@content: Don't remove content 
 */


$(function(){
	$('#services ul li > a').click(function(){
		var alt = $(this).attr('alt');
		var id	= $(this).attr('id');
		var title = $(this).attr('title');
		var load_gif = '/loader.gif'
		$('#birim_view ').html('<img src='+load_gif+' border="0" />');
		get_birim(id,alt);
	});
	
	$('#diger_side ul li > a').click(function(){
		var alt = $(this).attr('alt');
		var id	= $(this).attr('id');
		var title = $(this).attr('title');
		var load_gif = '/loader.gif'
		$('#birim_view ').html('<img src='+load_gif+' border="0" />');
		get_birim(id,alt);
	});	
	
	$('#hekim_list ul li > a').click(function(){
		var id = $(this).attr('id');
		var title = $(this).attr('title');
		var satanize = '?goster_id='+id+'&str=doktor&TB_iframe=true&width=460&height=340&modal=true';
		var satanize_url = '/index.php/goster'+satanize;
		tb_show(title,satanize_url,'');
	});
	
	$('#hekim_list a').tooltip({ 
    track: true, 
    delay: 0, 
    showURL: false, 
    fade: 250 
	});
    $('.topmenu a').tooltip({
    track: true, 
    delay: 0, 
    showURL: false, 
    fade: 250 
    });
});

function get_birim(id,str){
		birim = 'goster_id='+id+'&str='+str;
 		$.ajax({
		type: 'GET',
		url: '/index.php/goster',
		data: birim,	 		
		success: function(goster) {
	$('#birim_view').each(function(){
		$(this).animate({opacity: 0}, 500,function(){
		$(this).html(goster);
		$(this).animate({opacity: 1},1000);
	 	});});}});
return false;}


