Cufon.replace('#nav a', { hover: true }, { fontFamily: 'Museo Sans' }) ('.h1_title', { hover: true }, { fontFamily: 'Museo Sans' }) ('.h2_title', { hover: true }, { fontFamily: 'Museo Sans' }) ('.h3_title', { hover: true }, { fontFamily: 'Museo Sans' }) ('#tabs li', { fontFamily: 'Museo Sans' }) ('.catP', { fontFamily: 'Museo Sans' }) ('#sidebar_nav a', { hover: true }, { fontFamily: 'Museo Sans' }) ('#cformsform label', { fontFamily: 'Museo Sans' }) ('.post_details', { fontFamily: 'Museo Sans' });



// portofolio inner slider

$("#inner_slider").scrollable({

	items: '.items_inner_slider',

	interval: '5000',

	easing: 'swing',

	size: '1',

	loop: 'true',

	prev: '#btn_left',

	next: '#btn_right',

	navi:'#inner_slider_nav_dots',

	naviItem: 'a',

	keyboard: true,

	speed: '800'

});





// home slider

$("#scrollable").scrollable({

	easing: 'swing',

	interval: '5000',

	size: '1',

	loop: 'true',

	prev: '#btn_prev' ,

	next: '#btn_next' ,

	navi:'#tabs',

	keyboard: true,

	speed: '800'

});



$("#scrollable_testimonial").scrollable({

	items: '.items_testimonial',

	easing: 'swing',

	size: '1',

	loop: 'true',

	next: '#btn_right1',

	navi:'#testimonial_nav',

	naviItem: 'a',

	keyboard: true,

	speed: '800'

});







//home tabs	

$(".tab_content").hide(); //Hide all content

$("#serv_thumb_listing li:first").addClass("active").show(); //Activate first tab

$(".tab_content:first").show(); //Show first tab content



//On Click Event

$("#serv_thumb_listing li").hover(function() {



	$("#serv_thumb_listing li").removeClass("active"); //Remove any "active" class

	$(this).addClass("active"); //Add "active" class to selected tab

	$(".tab_content").hide(); //Hide all tab content



	var activeTab = $(this).find("a").attr("rel"); //Find the href attribute value to identify the active tab + content

	$(activeTab).fadeIn(); //Fade in the active ID content

	return false;

});

	





//sidebar_nav animation

$("#sidebar_nav a").not("#sidebar_nav .active a").hover(function() {

	$(this).stop().animate({marginLeft: "12px"}, 400);

	}, function() {

	$(this).stop().animate({marginLeft: "0px"}, 200);

});



//submenuListing animation

$(".submenuListing a").hover(function() {

	$(this).stop().animate({marginLeft: "12px"}, 400);

	}, function() {

	$(this).stop().animate({marginLeft: "0px"}, 200);

});





//portofolio filter

$('ul#filter a').click(function() {

	$(this).css('outline','none');

	$('ul#filter .current').removeClass('current');

	$(this).parent().addClass('current');

	

	var filterVal = $(this).text().toLowerCase().replace(' ','-');

			

	if(filterVal == 'all') {

		$('ul.portofolioLising li.hidden').fadeIn('slow').removeClass('hidden');

	} else {

		

		$('ul.portofolioLising li').each(function() {

			if(!$(this).hasClass(filterVal)) {

				$(this).fadeOut('normal').addClass('hidden');

			} else {

				$(this).fadeIn('slow').removeClass('hidden');

			}

		});

	}

	

	return false;

});



//fancybox

$("#Listing360 a").fancybox({ 'zoomSpeedIn': 300, 'frameWidth': 800, 'frameHeight': 600 });





//tooltip

(function($) {

    $.fn.tipsy = function(opts) {



        opts = $.extend({fade: false, gravity: 'n'}, opts || {});

        var tip = null, cancelHide = false;



        this.hover(function() {

            

            $.data(this, 'cancel.tipsy', true);



            var tip = $.data(this, 'active.tipsy');

            if (!tip) {

                tip = $('<div class="tipsy"><span><span>' + $(this).attr('title') + '</span></span></div>');

                tip.css({position: 'absolute', zIndex: 100000});

                $(this).attr('title', '');

                $.data(this, 'active.tipsy', tip);

            }

            

            var pos = $.extend({}, $(this).offset(), {width: this.offsetWidth, height: this.offsetHeight});

            tip.remove().css({top: 0, left: 0, visibility: 'hidden', display: 'block'}).appendTo(document.body);

            var actualWidth = tip[0].offsetWidth, actualHeight = tip[0].offsetHeight;

            

            switch (opts.gravity.charAt(0)) {

                case 'n':

                    tip.css({top: pos.top + pos.height, left: pos.left + pos.width / 2 - actualWidth / 2}).addClass('tipsy-north');

                    break;

                case 's':

                    tip.css({top: pos.top - actualHeight, left: pos.left + pos.width / 2 - actualWidth / 2}).addClass('tipsy-south');

                    break;

                case 'r':

                    tip.css({top: pos.top - actualHeight, left: pos.left + pos.width - actualWidth}).addClass('tipsy-south');

                    break;

                case 'w':

                    tip.css({top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left + pos.width}).addClass('tipsy-west');

                    break;

            }



            if (opts.fade) {

                tip.css({opacity: 0, display: 'block', visibility: 'visible'}).animate({opacity: 1});

            } else {

                tip.css({visibility: 'visible'});

            }



        }, function() {

            $.data(this, 'cancel.tipsy', false);

            var self = this;

            setTimeout(function() {

                if ($.data(this, 'cancel.tipsy')) return;

                var tip = $.data(self, 'active.tipsy');

                if (opts.fade) {

                    tip.stop().fadeOut(function() { $(this).remove(); });

                } else {

                    tip.remove();

                }

            }, 100);

            

        });



    };

})(jQuery);



$('.tooltip').tipsy({gravity: 's', fade: true});

$('.tooltip_r').tipsy({gravity: 'r', fade: true});