$j(document).ready(function() {
	$j('#tabvanilla > ul').tabs({ fx: { opacity: 'toggle' } });
	// $j('#tabvanilla2 > ul').tabs({ fx: { opacity: 'toggle' } });
	$j('#tabvanilla3 > ul').tabs({ fx: { opacity: 'toggle' } });
	$j('#issues_tabs > ul').tabs({ fx: { opacity: 'toggle' } });
});

function nextTab(_tab_selector) { 
  var num_tabs = $j(_tab_selector + ' li').length; 
  var current = $j(_tab_selector).tabs('option','selected').data('selected.tabs'); 
  var next = ((current + 2)>num_tabs) ? 0 : current + 1; 
  $j(_tab_selector).tabs('select',next); 
} 

function prevTab(_tab_selector) { 
  var num_tabs = $j(_tab_selector + ' li').length; 
  var current = $j(_tab_selector).tabs('option','selected').data('selected.tabs'); 
  var next = ((current - 1)<0) ? num_tabs-1 : current - 1; 
  $j(_tab_selector).tabs('select',next); 
}

$j(document).ready(function(){

    $j("a[rel^='prettyPhoto']").prettyPhoto();

    $j("#prettyPhotoVideo").each(function() {
                this.href = this.href + "?iframe=true&width=670&height=410";
    });

    $j("#prettyPhotoTellAFriend").each(function() {
                this.href = this.href + "?iframe=true&width=550&height=350";
    });

    $j(".default_lightbox").each(function() {
                this.href = this.href + "?iframe=true&width=550&height=300";
    });

    $j(".video_lightbox").each(function() {
                this.href = this.href + "?iframe=true&width=670&height=410";
    });

    $j(".communities_lightbox").each(function() {
                this.href = this.href + "?iframe=true&width=620&height=440";
    });

    $j(".event_video").each(function() {
                this.href = this.href + "?iframe=true&width=425&height=430";
    });

});

