
            $(document).ready(function(){
                $("#slider").jFlow({
                    slides: "#slider_img",
                    controller: ".jFlowControl", // must be class, use . sign
                    slideWrapper : "#jFlowSlide", // must be id, use # sign
                    selectedWrapper: "jFlowSelected",  // just pure text, no sign
                    width: "904px",
                    height: "264px",
                    easing: "easeInOutElastic",
                    duration: 250,
                    prev: ".jFlowPrev", // must be class, use . sign
                    next: ".jFlowNext" // must be class, use . sign
                });
            });
	
	// 
	$(document).ready(function() {
			$(".listing_col a").hover(function() {	//On hover...
				$(this).find("span").stop().animate({ 
					marginLeft: "10" //Find the span tag and move it up 40 pixels
				}, 250);
			} , function() { //On hover out...
				$(this).find("span").stop().animate({
					marginLeft: "0" //Move the span back to its original state (0px)
				}, 250);
			});
	});
	

	$(document).ready(function(){
		$(".fade").fadeTo(1, 0);
	});
	
	$(window).load(function(){
		$(".fade").fadeTo("slow", 1);
	});
	
	
	

	$('a[href*=portofoliu.php]').click(function() {
	
	   // duration in ms
	   var duration=1000;
	
	   // easing values: swing | linear
	   var easing='swing';
	
	   // get / set parameters
	   var newHash=this.hash;
	   var target=$(this.hash).offset().top;
	   var oldLocation=window.location.href.replace(window.location.hash, '');
	   var newLocation=this;
	
	   // make sure it's the same location      
	   if(oldLocation+newHash==newLocation)
	   {
		  // animate to target and set the hash to the window.location after the animation
		  $('html:not(:animated),body:not(:animated)').animate({ scrollTop: target }, duration, easing, function() {
	
			 // add new hash to the browser location
			 window.location.href=newLocation;
		  });
	
		  // cancel default click action
		  return false;
	   }
	
	});
	
	$(document).ready(function(){


    $(".social_facebook").css({'opacity':'0'});

	$('.hsocial_facebook').hover(
		function() {
			$(this).find('.social_facebook').stop().fadeTo(700, 1);
		},
		function() {
			$(this).find('.social_facebook').stop().fadeTo(700, 0);
		}
	)

    $(".social_linked_in").css({'opacity':'0'});

	$('.hsocial_linked_in').hover(
		function() {
			$(this).find('.social_linked_in').stop().fadeTo(700, 1);
		},
		function() {
			$(this).find('.social_linked_in').stop().fadeTo(700, 0);
		}
	)

    $(".social_google").css({'opacity':'0'});

	$('.hsocial_google').hover(
		function() {
			$(this).find('.social_google').stop().fadeTo(700, 1);
		},
		function() {
			$(this).find('.social_google').stop().fadeTo(700, 0);
		}
	)
	    $(".social_hi5").css({'opacity':'0'});

	$('.hsocial_hi5').hover(
		function() {
			$(this).find('.social_hi5').stop().fadeTo(700, 1);
		},
		function() {
			$(this).find('.social_hi5').stop().fadeTo(700, 0);
		}
	)
	    $(".social_deviantart").css({'opacity':'0'});

	$('.hsocial_deviantart').hover(
		function() {
			$(this).find('.social_deviantart').stop().fadeTo(700, 1);
		},
		function() {
			$(this).find('.social_deviantart').stop().fadeTo(700, 0);
		}
	)
	    $(".social_twitter").css({'opacity':'0'});

	$('.hsocial_twitter').hover(
		function() {
			$(this).find('.social_twitter').stop().fadeTo(700, 1);
		},
		function() {
			$(this).find('.social_twitter').stop().fadeTo(700, 0);
		}
	)
	    $(".social_google_buzz").css({'opacity':'0'});

	$('.hsocial_google_buzz').hover(
		function() {
			$(this).find('.social_google_buzz').stop().fadeTo(700, 1);
		},
		function() {
			$(this).find('.social_google_buzz').stop().fadeTo(700, 0);
		}
	)

	    $(".social_google_talk").css({'opacity':'0'});

	$('.hsocial_google_talk').hover(
		function() {
			$(this).find('.social_google_talk').stop().fadeTo(700, 1);
		},
		function() {
			$(this).find('.social_google_talk').stop().fadeTo(700, 0);
		}
	)
	    $(".social_skype").css({'opacity':'0'});

	$('.hsocial_skype').hover(
		function() {
			$(this).find('.social_skype').stop().fadeTo(700, 1);
		},
		function() {
			$(this).find('.social_skype').stop().fadeTo(700, 0);
		}
	)
	    $(".social_yahoo_messenger_smiley").css({'opacity':'0'});

	$('.hsocial_yahoo_messenger_smiley').hover(
		function() {
			$(this).find('.social_yahoo_messenger_smiley').stop().fadeTo(700, 1);
		},
		function() {
			$(this).find('.social_yahoo_messenger_smiley').stop().fadeTo(700, 0);
		}
	)


});		


	$(document).ready(function(){

$(".ro1 img").css({'opacity':'0'});


	$('.ro1').hover(
		function() {
			$('.ro1 img').fadeTo(300, 1);
		},
		function() {
			$('.ro1 img').fadeTo(300, 0);
		}
	)

	    $(".ro2 img").css({'opacity':'0'});


	$('.ro2').hover(
		function() {
			$('.ro2 img').fadeTo(300, 1);
		},
		function() {
			$('.ro2 img').fadeTo(300, 0);
		}
	)

	    $(".ro3 img").css({'opacity':'0'});


	$('.ro3').hover(
		function() {
			$('.ro3 img').fadeTo(300, 1);
		},
		function() {
			$('.ro3 img').fadeTo(300, 0);
		}
	)

	    $(".ro4 img").css({'opacity':'0'});


	$('.ro4').hover(
		function() {
			$('.ro4 img').fadeTo(300, 1);
		},
		function() {
			$('.ro4 img').fadeTo(300, 0);
		}
	)


    $(".ro5 img").css({'opacity':'0'});


	$('.ro5').hover(
		function() {
			$('.ro5 img').fadeTo(300, 1);
		},
		function() {
			$('.ro5 img').fadeTo(300, 0);
		}
	)

    $("#login").css({'opacity':'0.4'});


 $("#login").hover(
		function() {

$("#login").stop().animate({top:'0px'},{queue:false,duration:500} ); 
 $("#login").fadeTo(500, 1);
		},

		function() { $("#login").stop().animate({top:'-40px'},{queue:false,duration:500} );  
		 $("#login").fadeTo(1200, 0.4);	
		}
	)


	});		

//Portfolio thumbnail
$(document).ready(function(){

	$('.post a').hover(function() {
		
		//Show darkenned hover over thumbnail image
		$(this).find('img').stop(true, true).animate({opacity:0.5},400);

	}, function() {
		
		//Hide darkenned hover over thumbnail image
		$(this).find('img').stop(true, true).animate({opacity:1},400);
			
	});

});


	
    $(function () {
        $('.facebook').each(function () {
            var distance = 10;
            var time = 250;
            var hideDelay = 500;

            var hideDelayTimer = null;

            var beingShown = false;
            var shown = false;
            var trigger = $('.hsocial_facebook', this);
            var info = $('.popup', this).css('opacity', 0);


            $([trigger.get(0), info.get(0)]).mouseover(function () {
                if (hideDelayTimer) clearTimeout(hideDelayTimer);
                if (beingShown || shown) {
                    // don't trigger the animation again
                    return;
                } else {
                    // reset position of info box
                    beingShown = true;

                    info.css({
                        top: -200,
                        left: -118,
                        display: 'block'
                    }).animate({
                        top: '-=' + distance + 'px',
                        opacity: 1
                    }, time, 'swing', function() {
                        beingShown = false;
                        shown = true;
                    });
                }

                return false;
            }).mouseout(function () {
                if (hideDelayTimer) clearTimeout(hideDelayTimer);
                hideDelayTimer = setTimeout(function () {
                    hideDelayTimer = null;
                    info.animate({
                        top: '-=' + distance + 'px',
                        opacity: 0
                    }, time, 'swing', function () {
                        shown = false;
                        info.css('display', 'none');
                    });

                }, hideDelay);

                return false;
            });
        });
    });



	    $(function () {
        $('.yahoo').each(function () {
            var distance = 10;
            var time = 250;
            var hideDelay = 500;

            var hideDelayTimer = null;

            var beingShown = false;
            var shown = false;
            var trigger = $('.hsocial_yahoo_messenger_smiley', this);
            var info = $('.popup', this).css('opacity', 0);


            $([trigger.get(0), info.get(0)]).mouseover(function () {
                if (hideDelayTimer) clearTimeout(hideDelayTimer);
                if (beingShown || shown) {
                    // don't trigger the animation again
                    return;
                } else {
                    // reset position of info box
                    beingShown = true;

                    info.css({
                        top: -50,
                        right: -35,
                        display: 'block'
                    }).animate({
                        top: '-=' + distance + 'px',
                        opacity: 1
                    }, time, 'swing', function() {
                        beingShown = false;
                        shown = true;
                    });
                }

                return false;
            }).mouseout(function () {
                if (hideDelayTimer) clearTimeout(hideDelayTimer);
                hideDelayTimer = setTimeout(function () {
                    hideDelayTimer = null;
                    info.animate({
                        top: '-=' + distance + 'px',
                        opacity: 0
                    }, time, 'swing', function () {
                        shown = false;
                        info.css('display', 'none');
                    });

                }, hideDelay);

                return false;
            });
        });
    });
	

	


	    $(function () {
        $('.gtalk').each(function () {
            var distance = 10;
            var time = 250;
            var hideDelay = 500;

            var hideDelayTimer = null;

            var beingShown = false;
            var shown = false;
            var trigger = $('.hsocial_google_talk', this);
            var info = $('.popup', this).css('opacity', 0);


            $([trigger.get(0), info.get(0)]).mouseover(function () {
                if (hideDelayTimer) clearTimeout(hideDelayTimer);
                if (beingShown || shown) {
                    // don't trigger the animation again
                    return;
                } else {
                    // reset position of info box
                    beingShown = true;

                    info.css({
                        top: -32,
                        right: -3,
                        display: 'block'
                    }).animate({
                        top: '-=' + distance + 'px',
                        opacity: 1
                    }, time, 'swing', function() {
                        beingShown = false;
                        shown = true;
                    });
                }

                return false;
            }).mouseout(function () {
                if (hideDelayTimer) clearTimeout(hideDelayTimer);
                hideDelayTimer = setTimeout(function () {
                    hideDelayTimer = null;
                    info.animate({
                        top: '-=' + distance + 'px',
                        opacity: 0
                    }, time, 'swing', function () {
                        shown = false;
                        info.css('display', 'none');
                    });

                }, hideDelay);

                return false;
            });
        });
    });


		    $(function () {
        $('.skype').each(function () {
            var distance = 10;
            var time = 250;
            var hideDelay = 500;

            var hideDelayTimer = null;

            var beingShown = false;
            var shown = false;
            var trigger = $('.hsocial_skype', this);
            var info = $('.popup', this).css('opacity', 0);


            $([trigger.get(0), info.get(0)]).mouseover(function () {
                if (hideDelayTimer) clearTimeout(hideDelayTimer);
                if (beingShown || shown) {
                    // don't trigger the animation again
                    return;
                } else {
                    // reset position of info box
                    beingShown = true;

                    info.css({
                        top: -32,
                        right: 100,
                        display: 'block'
                    }).animate({
                        top: '-=' + distance + 'px',
                        opacity: 1
                    }, time, 'swing', function() {
                        beingShown = false;
                        shown = true;
                    });
                }

                return false;
            }).mouseout(function () {
                if (hideDelayTimer) clearTimeout(hideDelayTimer);
                hideDelayTimer = setTimeout(function () {
                    hideDelayTimer = null;
                    info.animate({
                        top: '-=' + distance + 'px',
                        opacity: 0
                    }, time, 'swing', function () {
                        shown = false;
                        info.css('display', 'none');
                    });

                }, hideDelay);

                return false;
            });
        });
    });
	
	
