    $().ready(function() {
        $('.impDnR').draggable({ handle:'.impHandle' });
	    $('.contDnR').draggable({ handle:'.contHandle' });
	    $('.linkDnR').draggable({ handle:'.linkHandle' });
	    $('.newsDnR').draggable({ handle:'.newsHandle' });
		$('.newsDnR_visited').draggable({ handle:'.newsHandle' });
		$("div").disableSelection();

	$('.pic').mousedown(function(e){	
		var maxZ = 0;
	$('.pic').each(function(){
		var thisZ = parseInt($(this).css('zIndex'))
		if(thisZ>maxZ) maxZ=thisZ;
		});
		if($(e.target).hasClass("pic"))
		{
	$(e.target).css({zIndex:maxZ+1});
		}
		else $(e.target).closest('.pic').css({zIndex:maxZ+1});
	});
	
	$("#content9").click(function () {
      $(".impDnR").fadeIn("fast");
    });
    $("#content7").click(function () {
      $(".contDnR").fadeIn("fast");
    });
    $("#content8").click(function () {
      $(".linkDnR").fadeIn("fast");
    });
    $("#content").click(function () {
      $(".newsDnR, .newsDnR_visited").fadeIn("fast");
    });
    $("#impClose").click(function () {
      $(".impDnR").fadeOut("fast");
    });
    $("#contClose").click(function () {
      $(".contDnR").fadeOut("fast");
    });
    $("#linkClose").click(function () {
      $(".linkDnR").fadeOut("fast");
    });
    $("#newsClose").click(function () {
      $(".newsDnR, .newsDnR_visited").fadeOut("fast");
    });
$("#content").hover(
function(e) {
$("#text_holder").hoverFlow(e.type, { left: 0 }, 'fast');
},
function(e) {
$("#text_holder").hoverFlow(e.type, { left: -625 }, 1);
});
$("#content2").hover(
function(e) {
$("#text_holder2").hoverFlow(e.type, { left: 0 }, 'fast');
},
function(e) {
$("#text_holder2").hoverFlow(e.type, { left: -625 }, 1);
});
$("#content3").hover(
function(e) {
$("#text_holder3").hoverFlow(e.type, { left: 0 }, 'fast');
},
function(e) {
$("#text_holder3").hoverFlow(e.type, { left: -625 }, 1);
});
$("#content4").hover(
function(e) {
$("#text_holder4").hoverFlow(e.type, { left: 0 }, 'fast');
},
function(e) {
$("#text_holder4").hoverFlow(e.type, { left: -625 }, 1);
});
$("#content5").hover(
function(e) {
$("#text_holder5").hoverFlow(e.type, { left: 0 }, 'fast');
},
function(e) {
$("#text_holder5").hoverFlow(e.type, { left: -625 }, 1);
});
$("#content6").hover(
function(e) {
$("#text_holder6").hoverFlow(e.type, { left: 0 }, 'fast');
},
function(e) {
$("#text_holder6").hoverFlow(e.type, { left: -625 }, 1);
});
$("#content7").hover(
function(e) {
$("#text_holder7").hoverFlow(e.type, { left: 0 }, 'fast');
},
function(e) {
$("#text_holder7").hoverFlow(e.type, { left: -625 }, 1);
});
$("#content8").hover(
function(e) {
$("#text_holder8").hoverFlow(e.type, { left: 0 }, 'fast');
},
function(e) {
$("#text_holder8").hoverFlow(e.type, { left: -625 }, 1);
});
$("#content9").hover(
function(e) {
$("#text_holder9").hoverFlow(e.type, { left: 0 }, 'fast');
},
function(e) {
$("#text_holder9").hoverFlow(e.type, { left: -625 }, 1);
});
$("#content10").hover(
function(e) {
$("#text_holder10").hoverFlow(e.type, { left: 0 }, 'fast');
},
function(e) {
$("#text_holder10").hoverFlow(e.type, { left: -625 }, 1);
});

});
	
$(function() {
    $('#slideshow-container').cycle({ 
    fx:    'cover',
	timeout: 2500, 
    speed:  500,
    pause:  1
    });
	$("#content").jFade({
		trigger: "mouseover",
		property: 'background',
		start: 'F7F7F7',
		end: 'c1c1c1',
		steps: 5,
		duration: 1
	}).jFade({
		trigger: "mouseout",
		property: 'background',
		start: 'c1c1c1',
		end: 'F7F7F7',
		steps: 30,
		duration: 20
	});	
	$("#content2").jFade({
		trigger: "mouseover",
		property: 'background',
		start: 'FFFF00',
		end: 'ff9600',
		steps: 5,
		duration: 1
	}).jFade({
		trigger: "mouseout",
		property: 'background',
		start: 'ff9600',
		end: 'FFFF00',
		steps: 30,
		duration: 20
	});	
	$("#content3").jFade({
		trigger: "mouseover",
		property: 'background',
		start: '66cccc',
		end: '004040',
		steps: 5,
		duration: 1
	}).jFade({
		trigger: "mouseout",
		property: 'background',
		start: '004040',
		end: '66cccc',
		steps: 30,
		duration: 20
	});
	$("#content4").jFade({
		trigger: "mouseover",
		property: 'background',
		start: '00FF00',
		end: '008000',
		steps: 5,
		duration: 1
	}).jFade({
		trigger: "mouseout",
		property: 'background',
		start: '008000',
		end: '00FF00',
		steps: 30,
		duration: 20
	});
	$("#content5").jFade({
		trigger: "mouseover",
		property: 'background',
		start: 'FF00FF',
		end: '800080',
		steps: 5,
		duration: 1
	}).jFade({
		trigger: "mouseout",
		property: 'background',
		start: '800080',
		end: 'FF00FF',
		steps: 30,
		duration: 20
	});
	$("#content6").jFade({
		trigger: "mouseover",
		property: 'background',
		start: 'FF0000',
		end: '800000',
		steps: 5,
		duration: 1
	}).jFade({
		trigger: "mouseout",
		property: 'background',
		start: '800000',
		end: 'FF0000',
		steps: 30,
		duration: 20
	});
	$("#content7").jFade({
		trigger: "mouseover",
		property: 'background',
		start: '0000FF',
		end: '000080',
		steps: 5,
		duration: 1
	}).jFade({
		trigger: "mouseout",
		property: 'background',
		start: '000080',
		end: '0000FF',
		steps: 30,
		duration: 20
	});
	$("#content8").jFade({
		trigger: "mouseover",
		property: 'background',
		start: '808000',
		end: '663300',
		steps: 5,
		duration: 1
	}).jFade({
		trigger: "mouseout",
		property: 'background',
		start: '663300',
		end: '808000',
		steps: 30,
		duration: 20
	});
	$("#content9").jFade({
		trigger: "mouseover",
		property: 'background',
		start: 'CCCCCC',
		end: '282828',
		steps: 5,
		duration: 1
	}).jFade({
		trigger: "mouseout",
		property: 'background',
		start: '282828',
		end: 'CCCCCC',
		steps: 30,
		duration: 20
	});
	$("#content10").jFade({
		trigger: "mouseover",
		property: 'background',
		start: '141414',
		end: 'c0c0c0',
		steps: 5,
		duration: 1
	}).jFade({
		trigger: "mouseout",
		property: 'background',
		start: 'c0c0c0',
		end: '141414',
		steps: 30,
		duration: 20
	});
});
