/* Virtualmente jQuery Hover */

jQuery(function( $ ){	
	
	// Smooth Scroll
	$('a[href*=#]').click(function() { 
    if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') 
        && location.hostname == this.hostname) {
            var $target = $(this.hash);
            $target = $target.length && $target || $('[name=' + this.hash.slice(1) +']');
            if ($target.length) {
                var targetOffset = $target.offset().top;
                $('html,body').animate({scrollTop: targetOffset}, 600);
                return false;
            }
        }
    });
	
	// About Toggle
	$('#toggle-view li').click(function () {
	var text = $(this).children('p');
	if (text.is(':hidden')) {
		text.slideDown('200');
		$(this).children('span').html('-');	
	} else {
		text.slideUp('200');
		$(this).children('span').html('+');	
	}
	});
	
	// Clients Carousel
	$(".scroll-content").jCarouselLite({
		hoverPause:true,
		visible: 5,
		auto:3000,
		speed:800,
		btnNext: ".scroll-next",
		btnPrev: ".scroll-prev"
	});
	
	// Solutions Hover
	$('ul#featured-services a').each(function(){
		$(this).append('<span class="hover"></span>');
		$(this).find('.txt').fadeTo(1, 0.6);
		$(this).find('.hover').fadeTo(1, 0);
	});
	$('ul#featured-services a').hover(function(){
		$(this).find('.txt').stop().fadeTo(400, 1);
		$(this).find('.hover').stop().fadeTo(400, 1);							   
	}, function(){
		$(this).find('.txt').stop().fadeTo(250, 0.6);
		$(this).find('.hover').stop().fadeTo(250, 0);
	});
	
	$('ul#featured-services-pt a').each(function(){
		$(this).append('<span class="hover"></span>');
		$(this).find('.txt').fadeTo(1, 0.5);
		$(this).find('.hover').fadeTo(1, 0);
	});
	$('ul#featured-services-pt a').hover(function(){
		$(this).find('.txt').stop().fadeTo(400, 1);
		$(this).find('.hover').stop().fadeTo(400, 1);							   
	}, function(){
		$(this).find('.txt').stop().fadeTo(250, 0.6);
		$(this).find('.hover').stop().fadeTo(250, 0);
	});
	
})

/* Virtualmente Flash Content Holder */

var pageHeadersParams = {
	scale: "noscale",
	quality: "high",
	wmode: "opaque"
};

var pageHeadersWidth = '960';
var pageHeadersHeight = '130';
var pageHeadersVersion = '9.0.0';

function loadFlash()
{

	try{	
	swfobject.embedSWF('http://www.virtualmente.net/images/titles/web-design.swf', 'FlashContentID1', pageHeadersWidth, pageHeadersHeight, pageHeadersVersion, '', '', pageHeadersParams, '');
	}
	catch(err1) {}
	
	
	try{
	swfobject.embedSWF('http://www.virtualmente.net/images/titles/web-design.swf', 'FlashContentID2', pageHeadersWidth, pageHeadersHeight, pageHeadersVersion, '', '', pageHeadersParams, '');	
	}
	catch(err2) {}
	
	
	try{
	swfobject.embedSWF('http://www.virtualmente.net/images/titles/web-design.swf', 'FlashContentID3', pageHeadersWidth, pageHeadersHeight, pageHeadersVersion, '', '', pageHeadersParams, '');		
	}
	catch(err3) {}
	
	
	try{
	swfobject.embedSWF('http://www.virtualmente.net/images/titles/web-design.swf', 'FlashContentID4', pageHeadersWidth, pageHeadersHeight, pageHeadersVersion, '', '', pageHeadersParams, '');		
	}
	catch(err4) {}

}

