$(function() {
/* <![CDATA[ */  
	$('#slider').before("<div id='slidercontainer'><a id='slideprev' href='#'>Prev</a><div id='slidernav'></div><a id='slidenext' href='#'>Next</a>").cycle({ 
	fx:      'scrollHorz', 
	speed:    300, 
	timeout:  8000,
	pager:  '#slidernav', 
	next:   '#slidenext', 
    prev:   '#slideprev', 
    pagerAnchorBuilder: function(idx, slide) { 
        return '<a href="#"><span>&bull;</span> </a>'; 
    }
});

	$('#sidebarslider').cycle({ 
	fx:      'scrollVert', 
	speed:    300, 
	timeout:  10000,
	slideExpr: '.sidebarslide'
});


$('.javascript').hide();
$('#content .inner ul.tabs').show();
$('#slidercontainer').show();
$('#slider').show();

// $('a.lightbox').lightBox();

$('#pauseresume').toggle(function() {

                $('#slider').cycle('pause');
                $(this).html("<img src='images/play.png' title='resume' />");

                }, function() {

                $('#slider').cycle('resume', true);
                $(this).html("<img src='images/pause.png' title='pause' />");
        }); 
		
//TOOLTIP	
$(".tooltiptrigger").tooltip({ 
    position: ['top', 'center'], 
    opacity: 1.0,
	offset: [10, 0]
});	


// setup ul.tabs to work as tabs for each div directly under div.panes 
$("ul.tabs").tabs("div.panes > div"); 

//make Purchase tab activate when you click a certain link
$('#pricelink').click(function(){
	$("ul.tabs").tabs().click(1);
	return false;
});

var ulOptions = '<ul class="tabs noindent categories"> <li><a href="#" class="all">All</a></li> <li><a href="#" class="DocumentManagementScanningViewers">Document Management, Scanning, Viewers</a></li><li><a href="#" class="TiffPdfConv">Tiff, PDF, Image Conversion</a></li><li><a href="#" class="GraphicsEditing">Graphics Editing/Markup</a></li><li><a href="#" class="PrinterDrivers">TIFF, PDF Printer Drivers</a></li><li><a href="#" class="OCR">OCR</a></li><li><a href="#" class="Mapdraw">Mapdraw</a></li><li><a href="#" class="Other">Other</a></li></ul>';

var $links = $('#links');

$links.before(ulOptions)
  		   .children('div')
		   .addClass('all');

$('.tabs li a').click(function() {
	var $this = $(this),
		type = $this.attr('class');

	$links.children('div')
		.fadeOut('500')
		.filter('.' + type)
		.fadeIn('500');

	//$(this).parent('li').parent('ul').children('li').children('a').removeClass('current');
	//$this.addClass('current');
				
	return false;
});


//collapsible sections
$('#collapsible h4').next('div').hide();

$('#collapsible h4 + div').addClass("collapsedpanel");

$('#collapsible h4').click(function(){
	$('#collapsible h4').removeClass('collapsedpanelselected');
	$(this).addClass('collapsedpanelselected');
	$(this).next('div').slideToggle();
	return false;
})


$('#suggest').jsonSuggest(mySuggestions);


});

function getParameterByName( name )
{
  name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");
  var regexS = "[\\?&]"+name+"=([^&#]*)";
  var regex = new RegExp( regexS );
  var results = regex.exec( window.location.href );
  if( results == null )
    return "";
  else
    return results[1];
}



var mySuggestions = [
	{
		text: "Informatik Scan" 
	},

	{
		text: "Informatik OCR" 
	}
	
	
	,
	
	{
		text: "Informatik Image Markup" 
	},
	
	{
		text: "Informatik xPrint Image Driver" 
	},
	
	{
		text: "TiffDLL50" 
	},
	
		{
		text: "TiffDLL90" 
	},	
	
	{
		text: "TiffMaker50" 
	},
	
	{
		text: "TiffMaker90" 
	},
	
	{
		text: "AppendTiff" 
	},
	
	{
		text: "AppendPDF" 
	},
	
	{
		text: "Informatik Deskew" 
	},
	
	{
		text: "AsciiConvert" 
	},
	
	{
		text: "Mapdraw" 
	},
	
	{
		text: "Informatik Docview" 
	},
	
	{
		text: "Imagistik Image Viewer" 
	},
	
	{
		text: "Wincopy Screen Capture" 
	},
	
	{
		text: "Mathwiz Financial Calculator" 
	},
	
	{
		text: "Tiff FixIT" 
	},
	
	
	{
		text: "Informatik Doc2Tiff" 
	},
	
	{
		text: "RSS Feeds" 
	},
	
	{
		text: "Privacy Policy" 
	},
	
	{
		text: "Site Map" 
	},
	
	{
		text: "Help and Support" 
	},
	
	{
		text: "Manuals" 
	},
	
	{
		text: "Video Tutorials" 
	}
	
]






