//sidebar show & hide

jQuery(document).ready(function() {
  jQuery('div.sideblocks> div').hide();
  jQuery('#sidebar1 br').remove();
  jQuery('div.sideblocks> h3').click(function() {
	$('h3').removeClass('opaque');
	$(this).addClass('opaque');
 var $nextDiv = $(this).next();
 var $visibleSiblings = $nextDiv.siblings('div:visible');
 if ($visibleSiblings.length ) {
   $visibleSiblings.slideUp('fast', function() {
  $nextDiv.slideToggle('fast');
   });
 } else {
    $nextDiv.slideToggle('fast');
 }
  });
  
  
  jQuery("#comps-tabs li.inactive").hover(function(){
        jQuery(this).addClass("selected");
	},function(){
        jQuery(this).removeClass("selected");
	});
});




//Jumpstart video show & hide

jQuery(function () {
    var tabContainers = jQuery('div.jumpstartTabs > div');
    
    jQuery('div.jumpstartTabs ul.tabNavigation a.vidNav').click(function () {
        tabContainers.hide().filter(this.hash).fadeIn('fast');
        
        jQuery('div.jumpstartTabs ul.tabNavigation a.vidNav').removeClass('selected');
        jQuery(this).addClass('selected');
        
        return false;
    }).filter(':first').click();
});



jQuery("a.jumpstart-vid1").click(function(){
 jQuery("#view-vid").load("video/jumpstart1.html");
 return false;
});
jQuery("a.jumpstart-vid2").click(function(){
 jQuery("#view-vid").load("video/jumpstart2.html");
 return false;
});



//Partner section show & hide

jQuery(function () {
    var tabContainer = jQuery('div#partner-wrap > div');
    
    jQuery('#cg-partners ul#comps-tabs a').click(function () {
        tabContainer.hide().filter(this.hash).fadeIn('fast');
        
        jQuery('#cg-partners ul#comps-tabs li').removeClass('selected');
        jQuery(this).parent().addClass('selected');
        
        return false;
    }).filter(':first').click();
});

//Partner video show & hide

/*
jQuery(function () {
    var tabContainer2 = jQuery('div.partner-panels > div');
    
    jQuery('ul.partner-vids a').click(function () {
        tabContainer2.hide().filter(this.hash).fadeIn('fast');
        
        jQuery('ul.partner-vids a').removeClass('selected');
        jQuery(this).addClass('selected');
        
        return false;
    }).filter(':first').click();
});
*/

jQuery("#cg-partners #comps-tabs a").click(function(){
 jQuery("#view-vid").load("video/blank.html");
 return false;
});
jQuery("a.telstra-vid1").click(function(){
 jQuery("#view-vid").load("video/telstra1.html");
 return false;
});
jQuery("a.telstra-vid2").click(function(){
 jQuery("#view-vid").load("video/telstra2.html");
 return false;
});
jQuery("a.telstra-vid3").click(function(){
 jQuery("#view-vid").load("video/telstra3.html");
 return false;
});
jQuery("a.telstra-vid4").click(function(){
 jQuery("#view-vid").load("video/telstra4.html");
 return false;
});
jQuery("a.htc-vid1").click(function(){
 jQuery("#view-vid").load("video/htc1.html");
 return false;
});
jQuery("a.htc-vid2").click(function(){
 jQuery("#view-vid").load("video/htc2.html");
 return false;
});
jQuery("a.htc-vid3").click(function(){
 jQuery("#view-vid").load("video/htc3.html");
 return false;
});
jQuery("a.htc-vid4").click(function(){
 jQuery("#view-vid").load("video/htc4.html");
 return false;
});
jQuery("a.samsung-vid1").click(function(){
 jQuery("#view-vid").load("video/samsung1.html");
 return false;
});
jQuery("a.samsung-vid2").click(function(){
 jQuery("#view-vid").load("video/samsung2.html");
 return false;
});
jQuery("a.samsung-vid3").click(function(){
 jQuery("#view-vid").load("video/samsung3.html");
 return false;
});
jQuery("a.samsung-vid4").click(function(){
 jQuery("#view-vid").load("video/samsung4.html");
 return false;
});









//Developer profile carousel

jQuery(function() {
							
				jQuery('#dev-profile > ul').tabs({ fx: { opacity: 'toggle', duration: 150 },event: 'mouseover' }).tabs('rotate', 4000, true);		                            
            });
			
			jQuery(function(){
			
				jQuery("#dev-profile > ul > li").mouseout(function(){
					setTimeout( function(){
					jQuery("div").css({'opacity' : '1.0'});}, 350);
					return false;
				});	
				 
			});








jQuery("#partner-feed p + ul").hide();
jQuery("#feed1 + ul").show();

jQuery("a#tab-telstra").click(function(){
 jQuery("#partner-feed p + ul").hide();
 jQuery("#feed1 + ul").show();
 return false;
});

jQuery("a#tab-htc").click(function(){
 jQuery("#partner-feed p + ul").hide();
 jQuery("#feed2 + ul").show();
 return false;
});

jQuery("a#tab-samsung").click(function(){
 jQuery("#partner-feed p + ul").hide();
 jQuery("#feed3 + ul").show();
 return false;
});

