
// load nivo slider
$(window).load(function() {
        $('#slider').nivoSlider();
    });



function go_to_url () {
var longstring = document.URL;
var brokenstring=longstring.split('#');
var go_to = "#" + brokenstring[1];
$('#preview-frame').scrollTo( go_to, 1000);
}

function scroll_to_id ($id,$time) {
$("#preview-frame").scrollTo( $id, $time);
} 
  
  
  $(document).ready(function() { 
  

//Top menu effects
$("#menu li ").hover(
  function () {
    $(".slide-up").fadeOut(1);
	$(this).children(".slide-up").toggle(300);
  }, 
  function () {
   $(this).children(".slide-up").stop(true,true).hide("slide", { direction: "left" }, 100);
  }
);

  // Portofolio mouse over script
  $(".portfolio-img").hover(
  function () {
    $(this).find('.hover').css({ 'opacity' : 0.4 }).fadeIn(500);
  },
  function () {
    $(this).find('.hover').stop(true,true).fadeOut(500);
  }
);
  
    // Blog image mouse over script
  $(".post-image").hover(
  function () {
    $(this).find('.hover').css({ 'opacity' : 0.4 }).fadeIn(500);
  },
  function () {
    $(this).find('.hover').stop(true,true).fadeOut(500);
  }
);

  // Gallery mouse over script
  $(".gallery").hover(
  function () {
    $(this).find('.hover').css({ 'opacity' : 0.4 }).fadeIn(500);
  },
  function () {
    $(this).find('.hover').fadeOut(500);
  }
);


  // Read more animation
  $(".plus-block").find('.plus').hover(
  function () {

    $(this).stop(true,true).animate({
    width: 'toggle'
  }, 300, function() {
  
  $(this).hide(10);
  
  });
      	 $(this).next('.read_more').delay(300).stop(true,true).show("slide", { direction: "right" }, 500);
  },
  function () {

  }
);

  $(".plus-block").find('.read_more a').hover(
  function () {

  },
  function () {
  
      $(this).parent().stop(true,true).animate({
    width: 'toggle'
  }, 300, function() {
  
  });
      $(this).parent().prev('.plus').delay(300).stop(true,true).show("slide", { direction: "right" }, 500);

  }
);


});

