﻿$(document).ready(function(){
	$("#baslik1").hover(function() {
		$("#popup_baslik div").stop().css('display','none');
		$(".anasayfa_popup_avrupa").stop().css('display','block');					
	}, function(){
		$("#popup_baslik div").stop().css('display','none');
	});
	$("#baslik2").hover(function() {
		$("#popup_baslik div").stop().css('display','none');
		$(".anasayfa_popup_antibiyotik").stop().css('display','block');			
	}, function(){
		$("#popup_baslik div").stop().css('display','none');
	});
	$("#baslik3").hover(function() {
		$("#popup_baslik div").stop().css('display','none');
		$(".anasayfa_popup_saglik").stop().css('display','block');			
	}, function(){
		$("#popup_baslik div").stop().css('display','none');
	});
	$(".aafg").dialog({
		bgiframe: true,
		autoOpen: false,
		height:682,
		width: 984,
		modal : true,
		resizable: false
	});
	$(".genel").dialog({
		bgiframe: true,
		autoOpen: false,
		height:682,
		width: 984,
		modal : true,
		resizable: false
	});
	$(".saglik").dialog({
		bgiframe: true,
		autoOpen: false,
		height:682,
		width: 984,
		modal : true,
		resizable: false
	});
	$(".doktor").dialog({
		bgiframe: true,
		autoOpen: false,
		height:682,
		width: 984,
		modal : true,
		resizable: false
	});
	$(".grip").dialog({
		bgiframe: true,
		autoOpen: false,
		height:682,
		width: 984,
		modal : true,
		resizable: false
	});
	$(".kaynakca").dialog({
		bgiframe: true,
		autoOpen: false,
		height:682,
		width: 984,
		modal : true,
		resizable: false
	});
	$(".uzun").dialog({
		bgiframe: true,
		autoOpen: false,
		height:682,
		width: 984,
		modal : true,
		resizable: false
	});
	$('.kisa').dialog({
		bgiframe: true,
		autoOpen: false,
		height:682,
		width: 984,
		modal : true,
		resizable: false
	});
	$(".iletisim").dialog({
		bgiframe: true,
		autoOpen: false,
		height:682,
		width: 984,
		modal : true,
		resizable: false
	});
	$('.slider_aafg').slider({
		orientation: 'vertical',
		range: 'min',
		min: -100,
		max: 0,
		animate: true,
		slide: sliderSlide_aafg,
		change: sliderChange_aafg
	});
	$('.slider_genel').slider({
		orientation: 'vertical',
		range: 'min',
		min: -100,
		max: 0,
		animate: true,
		slide: sliderSlide_genel,
		change: sliderChange_genel
	});
	$('.slider_saglik').slider({
		orientation: 'vertical',
		range: 'min',
		min: -100,
		max: 0,
		animate: true,
		slide: sliderSlide_saglik,
		change: sliderChange_saglik
	});
	$('.slider_doktor').slider({
		orientation: 'vertical',
		range: 'min',
		min: -100,
		max: 0,
		animate: true,
		slide: sliderSlide_doktor,
		change: sliderChange_doktor
	});
	$('.slider_grip').slider({
		orientation: 'vertical',
		range: 'min',
		min: -100,
		max: 0,
		animate: true,
		slide: sliderSlide_grip,
		change: sliderChange_grip
	});
	$('.slider_kaynakca').slider({
		orientation: 'vertical',
		range: 'min',
		min: -100,
		max: 0,
		animate: true,
		slide: sliderSlide_kaynakca,
		change: sliderChange_kaynakca
	});
});

function sliderChange_aafg(e, ui)
{
	var maxScroll = $("#aafg").attr("scrollHeight") - $("#aafg").height();
	$("#aafg").animate({scrollTop: -ui.value * (maxScroll / 100) });
}

function sliderSlide_aafg(e, ui)
{
	$('#aafg').stop(true, true);
	var maxScroll = $("#aafg").attr("scrollHeight") - $("#aafg").height();
	$("#aafg").animate({scrollTop: -ui.value * (maxScroll / 100) });
}

function sliderChange_genel(e, ui)
{
	var maxScroll = $("#genel").attr("scrollHeight") - $("#genel").height();
	$("#genel").animate({scrollTop: -ui.value * (maxScroll / 100) });
}

function sliderSlide_genel(e, ui)
{
	$('#genel').stop(true, true);
	var maxScroll = $("#genel").attr("scrollHeight") - $("#genel").height();
	$("#genel").animate({scrollTop: -ui.value * (maxScroll / 100) });
}

function sliderChange_saglik(e, ui)
{
	var maxScroll = $("#saglik").attr("scrollHeight") - $("#saglik").height();
	$("#saglik").animate({scrollTop: -ui.value * (maxScroll / 100) });
}

function sliderSlide_saglik(e, ui)
{
	$('#saglik').stop(true, true);
	var maxScroll = $("#saglik").attr("scrollHeight") - $("#saglik").height();
	$("#saglik").animate({scrollTop: -ui.value * (maxScroll / 100) });
}

function sliderChange_doktor(e, ui)
{
	var maxScroll = $("#doktor").attr("scrollHeight") - $("#doktor").height();
	$("#doktor").animate({scrollTop: -ui.value * (maxScroll / 100) });
}

function sliderSlide_doktor(e, ui)
{
	$('#doktor').stop(true, true);
	var maxScroll = $("#doktor").attr("scrollHeight") - $("#doktor").height();
	$("#doktor").animate({scrollTop: -ui.value * (maxScroll / 100) });
}

function sliderChange_grip(e, ui)
{
	var maxScroll = $("#grip").attr("scrollHeight") - $("#grip").height();
	$("#grip").animate({scrollTop: -ui.value * (maxScroll / 100) });
}

function sliderSlide_grip(e, ui)
{
	$('#grip').stop(true, true);
	var maxScroll = $("#grip").attr("scrollHeight") - $("#grip").height();
	$("#grip").animate({scrollTop: -ui.value * (maxScroll / 100) });
}

function sliderChange_kaynakca(e, ui)
{
	var maxScroll = $("#kaynakca").attr("scrollHeight") - $("#kaynakca").height();
	$("#kaynakca").animate({scrollTop: -ui.value * (maxScroll / 100) });
}

function sliderSlide_kaynakca(e, ui)
{
	$('#kaynakca').stop(true, true);
	var maxScroll = $("#kaynakca").attr("scrollHeight") - $("#kaynakca").height();
	$("#kaynakca").animate({scrollTop: -ui.value * (maxScroll / 100) });
}