jQuery.fn.fadeIn = function(speed, callback) { 
    return this.animate({opacity: 'show'}, speed, function() { 
        if (jQuery.browser.msie)  
            this.style.removeAttribute('filter');  
        if (jQuery.isFunction(callback)) 
            callback();  
    }); 
};

$(document).ready(function() {
	
	$("#partners div").hover(
		function(){
		$("#partners div").children("img").hide();
		
		$(this).children("img").show(); // show dot
		if($("#center_" + $(this).attr("id")).css("display") == "none")
		{
			$("#center_div div").hide();// Hide all divs in center
			$("#center_" + $(this).attr("id")).show();// Fade in the div of the choosen site
		}
		},
		function(){
			$("#center_div div").hide();// Hide all divs in center
			$("#center_web3").show();// Fade in the div of the choosen site
		// do nothing at the moment
		}
	)
	//Websites hover site on websites page
	$("#Insidepartners div").hover(
		function(){
		$(".the_website").hide(); // Hide the website logo
		$(this).children("div").show(); // show dot
		$("#center_" + $(this).attr("rel")).show();// Fade in the div of the choosen site
		
		},
		function(){
		$(this).children("div").hide(); //hide dot
		$("#center_" + $(this).attr("rel")).hide();
		$(".the_website").show();
		}
	)
	
	 $('#iphone_images').cycle({
		fx: 'fade',
		next: "#iphone_ArrowR",
		timeout: 4000
		//continuous: true
	});
	 $('#right_round_pics').cycle({
		fx: 'fade',
		next: "#iphone_ArrowR",
		timeout: 4000
		//continuous: true
	});
})
