
$(document).ready(function(){ 
						   
						   /*
jQuery Url Plugin
	* Version 1.0
	* 2009-03-22 19:30:05
	* URL: http://ajaxcssblog.com/jquery/url-read-get-variables/
	* Description: jQuery Url Plugin gives the ability to read GET parameters from the actual URL
	* Author: Matthias Jäggli
	* Copyright: Copyright (c) 2009 Matthias Jäggli under dual MIT/GPL license.
	*
	* USAGE
	* example: http://example.com/test.htm?name=john&last=doe
	* $.url.param("name");
	* returns a string containing "john"
	* 
	* if an inexistent or empty variable, it'll return an empty string ""
	*
*/
(function ($) {
	$.url = {};
	$.extend($.url, {
		_params: {},
		init: function(){
			var paramsRaw = "";
			try{
				paramsRaw = 
					(document.location.href.split("?", 2)[1] || "").split("#")[0].split("&") || [];
				for(var i = 0; i< paramsRaw.length; i++){
					var single = paramsRaw[i].split("=");
					if(single[0])
						this._params[single[0]] = unescape(single[1]);
				}
			}
			catch(e){
				alert(e);
			}
		},
		param: function(name){
			return this._params[name] || "";
		},
		paramAll: function(){
			return this._params;
		}
	});
	$.url.init();
})(jQuery);

/**
 * Equal Heights Plugin
 * Equalize the heights of elements. Great for columns or any elements
 * that need to be the same size (floats, etc).
 * 
 * Version 1.0
 * Updated 12/10/2008
 *
 * Copyright (c) 2008 Rob Glazebrook (cssnewbie.com) 
 *
 * Usage: $(object).equalHeights([minHeight], [maxHeight]);
 * 
 * Example 1: $(".cols").equalHeights(); Sets all columns to the same height.
 * Example 2: $(".cols").equalHeights(400); Sets all cols to at least 400px tall.
 * Example 3: $(".cols").equalHeights(100,300); Cols are at least 100 but no more
 * than 300 pixels tall. Elements with too much content will gain a scrollbar.
 * 
 */

(function($) {
	$.fn.equalHeights = function(minHeight, maxHeight) {
		tallest = (minHeight) ? minHeight : 0;
		this.each(function() {
			if($(this).height() > tallest) {
				tallest = $(this).height();
			}
		});
		if((maxHeight) && tallest > maxHeight) tallest = maxHeight;
		return this.each(function() {
			$(this).height(tallest); //.css("overflow","auto");
		});
	}
})(jQuery);


// to do a jquery server-sice include using
// <div class="includeFile">url/to/included/file.htm</div>
//
// used in software for standalone products, tnav, ip product license pages
if ( $('div.includeFile').length > 0 ) {
	var divInclude = 'div.includeFile';
	var numIncludes = $(divInclude).length;
	for (i = 0; i < numIncludes; i++)
	{
   		var includeUrl = $(divInclude+':eq('+i+')').text();
   		$(divInclude+':eq('+ i +')').load(includeUrl, function()
		{ //callback function after page is loaded
			if ( $(".featureTable").length > 0 ) {
				$(".featureTable tr:odd").addClass("stripe");
				var h, s;
			} // end if .featureTable
			if ( $(".overviewLCol").length > 0 ) {
				// used for standalone tools pages
				// resizes images with a max width of 470px
				$(".overviewLCol .includeFile img").each(function() 
				{
       			 if($(this).width() > 470) 
					{
						h=$(this).height()/$(this).width()*470;
            			$(this).attr({height : h });
						$(this).attr({width : "470"});
			        }
    			});
			} // end if .overviewLCol      
		}); // end callback function for divInclude
	 } // end for loop
} // end if div.includeFile


if ($('.vtabs').length > 0) {
	var $vtabs = $('.vtabs');
	$vtabs.jVertTabs();
	$('ul a', $vtabs).each(function() {
		$(this).addClass('vtabs-links');
	});
	var $vtabs_links = $('.vtabs-links');
	var numTabs = $vtabs_links.length;
	$vtabs_links.hover(function() {
		for (i = 0; i < numTabs; i++)
		{
   			$('.vtabs-links:eq('+ i +')').removeClass('highlight');
		}
		$(this).addClass('highlight');
	});
}

if ($('.accordion').length > 0) {
	$('.accordion').accordion({
		active: '.selected',
		selectedClass: 'active',
		header: "a.acTitle"
	});
}
if ($('.accord').length > 0) {
	$('.accord').accordion({
		active: '.selected',
		selectedClass: 'active',
		header: "a.acTitle"
	});
}
if ($('#tabs').length > 0) {
	$('#tabs > ul').tabs(
	    { 
		fx: { opacity:'toggle'} 
		}
	);
}
if ($('.sort').length > 0) 	{ 
		$('.sort').tablesorter({
				widgets: ['zebra']
    });
}

if ( $(".stripeMe").length > 0 ) {
	var tableStripe = '.stripeMe';
	var numTables = $(tableStripe).length;
	for (i = 0; i < numTables; i++)
	{
		$(tableStripe+':eq('+ i +') tr:odd').addClass("stripe");
	}
}
if ( $(".modules2col").length > 0 ) {
	var module2col = $(".modules2col");
	var numModule2col = $(module2col).length;
	for (i = 0; i < numModule2col; i++)
	{
		var module2col_i = $(module2col).eq(i);
		$('.module', module2col_i).addClass('column-module-'+i);
		$('.moduleBody', module2col_i).addClass('column-moduleBody-'+i);
		$('h3', module2col_i).addClass('column-h3-'+i);
		$('.column-moduleBody-'+i).equalHeights();
		$('.column-module-'+i).equalHeights();
		$('.column-h3-'+i).equalHeights();
	}
	
}
if ( $(".modules4col").length > 0 ) {
	var module4col = $(".modules4col");
	var numModule4col = $(module4col).length;
	for (i = 0; i < numModule4col; i++)
	{
	    $('.moduleBody', module4col).addClass("column-moduleBody");
		$('.module', module4col).addClass("column-module");
		$('h3', module4col).addClass("column-h3")
	}
	$('.column-moduleBody').equalHeights();
	$('.column-module').equalHeights();
	$('.column-h3').equalHeights();
}
				
if ($('.alliance-member').length > 0) {
	  $('.alliance-member').css('display','none');
}

if ($("#srch-field").length > 0) {
    $("input#srch-field").focus(function() {
        $(this).attr("value","").css('color','black');
    });
}

});

