$(document).ready(function() {
	$("#slidesc").slideBox();
	$('.slideshow').cycle({ 
	fx:     'fade', 
	speed:  2500, 
	timeout: 0,
	next:   '#sc-next', 
    prev:   '#sc-prev',
	pager:  '#nav',
			pagerAnchorBuilder: function(idx, slide) {
			return '#nav a span:eq(' + (idx) + ')';
	}
});

$("#lookinside").click(function() {
    $("#sc-click").fadeTo(1000, 0.01, function() {
    	$("#sc-click-bg").fadeTo(2000, 0.01, function() {
    	$("#sc-first").fadeTo(2000, 0.01, function() {
    	$(this).remove();
    	});
    	$(".content").stop().animate({height: "14px", opacity: "0.8"}, 2000);
	        });
    });
});

});


$(document).ready(function(){
	  $("#sc-next, #sc-prev, .sc-btn-slide").fadeTo("slow", 0.7); 	
	
       $("#sc-next, #sc-prev").mouseover(function(){
      $(this).stop().animate({width:"35px", opacity: 1.0});
    });
    
       $("#sc-next, #sc-prev").mouseout(function(){
      $(this).stop().animate({width:"24px", opacity: 0.7});
    });
    
       $(".sc-btn-slide").mouseover(function(){
      $(this).stop().animate({opacity: 1.0});
    });
    
       $(".sc-btn-slide").mouseout(function(){
      $(this).stop().animate({opacity: 0.7});
    });
    
    
           $("#lookinside").mouseover(function(){
      $(this).stop().animate({opacity: 0.7});
    });
    
       $("#lookinside").mouseout(function(){
      $(this).stop().animate({opacity: 1.0});
    });
    
    
	$("#nav").hover(function(){
		$("#scshow").stop().fadeTo(500, 0);
			},function(){
   		$("#scshow").stop().fadeTo(500, 1.0); 
   		});
   		
   	$("#btn").hover(function(){
		$("#intro").stop().fadeTo(800, 0.8);
			},function(){
   		$("#intro").stop().fadeTo(800, 1.0); 
   		});

});

window.onload = function() { // Nelauj iezimet tekstu SC Galerijas modulim (Mozilla bug fix)
  var element = document.getElementById('box');
  element.onselectstart = function () { return false; } // ie
  element.onmousedown = function () { return false; } // mozilla
}

$(window).load(function() {
	$("#box").show();
   setTimeout(function() {
    $('#scloader').hide();
   },2100);
});


