$(document).ready(function(){

// Clients slider
	$('#bottomSlider').jcarousel({
		wrap: 'circular'
	});
	
//Menu
$('ul#menu').superfish();
	
	
//Client Logo Image Hover
$('.clients img').css({opacity: 0.7});

$(".clients li").hover(function(){
	$(this).find("img").stop(true, true).animate({ opacity: 1 }, 500);
	}, function() {
	$(this).find("img").stop(true, true).animate({ opacity: 0.7 }, 500);
});


//Image Hover
$(".image, .social a").hover(function () {						 
$(this).stop().animate({opacity: 0.6}, 800);
	}, function() {
		$(this).stop().animate({opacity: 1 }, 800);
	}); 


//prettyPhoto
$("a[rel^='pretty']").prettyPhoto();


//Tooltip
$("a[rel^='tipsy']").tipsy({gravity: 's'});


//Latest Twitter
$("#twitter").getTwitter({
	userName: "Powerbuy4you",
	numTweets: 3,
	loaderText: "Loading tweets...",
	slideIn: true,
	slideDuration: 750,
	showHeading: true,
	headingText: "Latest Tweets",
	showProfileLink: true,
	showTimestamp: true
});
	
//Tab sidebar
$('ul.tabs').each(function() {
    $(this).find('li').each(function(i) {
      $(this).click(function(){
        $(this).addClass('active').siblings().removeClass('active')
          .parents('div.tab_block').find('div.tab').hide().end().find('div.tab:eq('+i+')').fadeIn(2000);
      });
    });
});


//Tab sidebar
$('ul.tab-page').each(function() {
    $(this).find('li').each(function(i) {
      $(this).click(function(){
        $(this).addClass('active').siblings().removeClass('active')
          .parents('div.tabs-page').find('div.tabpage').hide().end().find('div.tabpage:eq('+i+')').fadeIn(2000);
      });
    });
});

  
  
//Toggle
$(".close").click(function(){$("#seting").toggle("fast");
$(this).toggleClass("openpanel");return false});
$(".toggle-block").hide(); 

$("p.toggle").click(function(){
		$(this).toggleClass("active").next().slideToggle(500);
		return false; 
	});
	
//Accordion
$('.acc-block').hide();
$('.acc-header:first').addClass('active').next().show();
$('.acc-header').click(function(){
	if( $(this).next().is(':hidden') ) {
		$('.acc-header').removeClass('active').next().slideUp();
		$(this).toggleClass('active').next().slideDown();
	}
	return false;
});



			
});
