// JavaScript Document
$(window).load(function() {
	
function fixPNGs(){
  if(jQuery.browser.msie && jQuery.browser.version < 9){ 
 var i;
 //alert(document.images.length);
 for(i in document.images){
   if(document.images[i].src){
  var imgSrc = document.images[i].src;
  if(imgSrc.substr(imgSrc.length-4) === '.png' || imgSrc.substr(imgSrc.length-4) === '.PNG'){
  document.images[i].style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled='true',sizingMethod='crop',src='" + imgSrc + "')";
  }
   }
 } 
  }
}


fixPNGs();

        $('#resBut img').each(function() {
            $(this).hover(function() {
				
				
				if (jQuery.support.opacity) {
				    $(this).stop().animate({ opacity: 1.0 }, 500);
				} else {
				    // $(this).stop().animate({filter: 'alpha(opacity=100)'},{duration: 500});
					}
    

            },
           function() {
			   
			   if (jQuery.support.opacity) {
               $(this).stop().animate({ opacity: 0.7 }, 500);
				} else {
				    // $(this).stop().animate({filter: 'alpha(opacity=70)'},{duration: 500});
				}

           });
        });
		

	
    $('#slider').nivoSlider({
        effect:'fade', // Specify sets like: 'fold,fade,sliceDown'
        slices:15, // For slice animations
        boxCols: 8, // For box animations
        boxRows: 4, // For box animations
        animSpeed:500, // Slide transition speed
        pauseTime:5000, // How long each slide will show
        startSlide:0, // Set starting Slide (0 index)
        directionNav:false, // Next & Prev navigation
        directionNavHide:true, // Only show on hover
        controlNav:false, // 1,2,3... navigation
        controlNavThumbs:false, // Use thumbnails for Control Nav
        controlNavThumbsFromRel:false, // Use image rel for thumbs
        keyboardNav:false, // Use left & right arrows
        pauseOnHover:true, // Stop animation while hovering
        manualAdvance:false, // Force manual transitions
        captionOpacity:0.8 // Universal caption opacity

    });
	
    $("#duyurular").slides({
    play: 4000,
    pause: 2000,
	generatePagination: false,
	hoverPause: true,
	animationStart: function(current){
					$('.rss').animate({
						bottom:-35
					},100);
					if (window.console && console.log) {
						// example return of current slide number
						console.log('animationStart on slide: ', current);
					};
				},
				animationComplete: function(current){
					$('.rss').animate({
						bottom:0
					},200);
					if (window.console && console.log) {
						// example return of current slide number
						console.log('animationComplete on slide: ', current);
					};
				},
				slidesLoaded: function() {
					$('.rss').animate({
						bottom:0
					},200);
				}
	
  });
  
  $("#postit").slides({
    play: 3000,
    pause: 4000,
	generatePagination: false,
	hoverPause: true,
	animationStart: function(current){
					$('.rss').animate({
						bottom:-35
					},100);
					if (window.console && console.log) {
						// example return of current slide number
						console.log('animationStart on slide: ', current);
					};
				},
				animationComplete: function(current){
					$('.rss').animate({
						bottom:0
					},200);
					if (window.console && console.log) {
						// example return of current slide number
						console.log('animationComplete on slide: ', current);
					};
				},
				slidesLoaded: function() {
					$('.rss').animate({
						bottom:0
					},200);
				}
	
  });
  
  
});




  
  

