$j=jQuery.noConflict();


jQuery(function(){

	if($j("#body").height() <= $j("window").height()){
		$j("#body").height($j("window").height());
	}
	
	$j(".page-id-10 #title h1").html("Support Request");
	
	$j('#filmstrip').hover(function() {
	 $j(this).css('cursor','pointer');
	 }, function() {
	 $j(this).css('cursor','auto');
	});
	
	if (!$j("#newMenu .current-menu-item ul").length > 0){
    $j("#newMenu").remove();
}
	
	$j(".parent-pageid-10 #newMenu #menu-primary-navigation-1 > li > a").remove();
	$j(".page-id-10 #newMenu #menu-primary-navigation-1 > li > a").remove();
	$j(".page-id-10 #newMenu #menu-primary-navigation-1 li.current-menu-item li:first a").addClass("firstLink");
	$j("#newMenu #menu-primary-navigation-1 > li > a").addClass("firstLink");


	$j("#wrapper").css('margin-left',($j("body").width() - $j("#wrapper").width()) / 2);
	var marginLeft = ($j("#body").width() - $j("#wrapper").width()) / 2
	var stripLeft = (parseFloat($j("#wrapper").css('margin-left')) * -1);
	$j("#stripBack").css("width", $j("body").width()).css('margin-left', stripLeft + marginLeft);

	$j("#filmstrip a").each(function(){
		$j(this).html($j(this).html() + " &raquo;");
	})

	$j("#filmstrip li").each(function(){
		$j(this).click(function(){
			window.location = $j(this).children("a").attr("href");
		})
	})
	
	$j("#light").click(function(){
		console.log('test')
	})
	
	if ($j("#silver").outerHeight() >= $j("#sideNav").height()){
		$j("#sideNav").height($j("#silver").outerHeight())
	};


	$j("#bodyShade").height($j("#body").height() + $j("#nav_holder").height() + 66)

	var timeout    = 500;
	var closetimer = 0;
	var ddmenuitem = 0;


	function jsddm_open()
	{  jsddm_canceltimer();
		jsddm_close();
		ddmenuitem = $j(this).find('ul').css('visibility', 'visible');}

		function jsddm_close()
		{  if(ddmenuitem) ddmenuitem.css('visibility', 'hidden');}

		function jsddm_timer()
		{  closetimer = window.setTimeout(jsddm_close, timeout);}

		function jsddm_canceltimer()
		{  if(closetimer)
			{  window.clearTimeout(closetimer);
				closetimer = null;}}

				$j(document).ready(function(){
					$j('#menu-primary-navigation > li').bind('mouseover', jsddm_open)
					$j('#menu-primary-navigation > li').bind('mouseout',  jsddm_timer)
				}
			);

			document.onclick = jsddm_close;


			$j("#menu-primary-navigation > li:last").children("a").addClass("lastNav");
			$j("#menu-primary-navigation > li").each(function(){
				$j(this).children("ul").children("li:last").children("a").addClass("lastNav");
			})
		});
		

		window.onresize = function(){
			$j("#wrapper").css('margin-left',($j("body").width() - $j("#wrapper").width()) / 2);
			var marginLeft = ($j("#body").width() - $j("#wrapper").width()) / 2
			var stripLeft = (parseFloat($j("#wrapper").css('margin-left')) * -1);
			$j("#stripBack").css("width", $j("body").width()).css('margin-left', stripLeft + marginLeft);
	

	

		};


