// JavaScript Document
//łśćłżź
var DebugQueryMode=true; //Show Alerts
//var IE=false;

/* ================================================================================== */
/* =============================== jquery.ready [START] ============================= */
/* ================================================================================== */
/* =============================== .jAjax [START] =================================== */
/*
var Global_jAjaxPerm=true;
function jAjax2OLD(){
	try{
		if(Global_jAjaxPerm==false){ self.setTimeout("jAjax('"+'test'+"')", 300); }
		elements=$JQ('.jAjax');
		
		var glob=0;
		for(i=0;i<elements.length;i++){
			c_href='';
			single=$JQ(elements).eq(i).find('.jAjax_link');
			//alert(single.length);
			if(single.length==1){ c_href=$JQ(single).eq(0).attr('href'); }
			if(c_href!='' && c_href !='#'){
				$JQ(elements).eq(i).attr('class','.jAjaxDone');
				
				$JQ(elements).eq(i).bind("ajaxSend", function(){
					Global_jAjaxPerm=false;
					$JQ(this).unbind('ajaxSend');
					$JQ(this).hide();
					
				}).bind("ajaxComplete", function(){
					$JQ(this).unbind('ajaxError');
					$JQ(this).unbind('ajaxComplete');
					$JQ(this).show(800, function(){ Global_jAjaxPerm=true; });					
					
				}).bind("ajaxError", function(){
					$JQ(this).unbind('ajaxError');
					$JQ(this).unbind('ajaxComplete');
					$JQ(this).html('<div class="loading"><img src="/bc_graph/shared/empty.gif" alt="" width="18" height="18" /></div>');
					$JQ(this).show(800, function(){ Global_jAjaxPerm=true; });
				});
				Global_jAjaxPerm=false;
				$JQ(elements).eq(i).load(c_href);
				self.setTimeout("jAjax('"+'test'+"')", 300);
				return false;
			}//if
			
		}//for
	}catch(err){ if(DebugQueryMode==true){ alert(' jAjax: '+err); }}
}
*/

;(function($JQ){
	var _sleeptimer;
	$JQ.sleep = function( time2sleep, callback )
	{
		$JQ.sleep._sleeptimer = time2sleep;
		$JQ.sleep._cback = callback;
		$JQ.sleep.timer = setInterval('$JQ.sleep.count()', 1000);
	}
	$JQ.extend ($JQ.sleep, {
		current_i : 1,
		_sleeptimer : 0,
		_cback : null,
		timer : null,
		count : function()
		{
			if ( $JQ.sleep.current_i === $JQ.sleep._sleeptimer )
			{
				clearInterval($JQ.sleep.timer);
				$JQ.sleep._cback.call(this);
			}
			$JQ.sleep.current_i++;
		}
	});
})(jQuery);




function jAjaxIndividual(This,url){
	try{
		  $JQ.ajax({
			 url: url,
			 global: false,
			 beforeSend: function(){
				$JQ(This).css('opacity',0);
				$JQ(This).html('<div class="jAjax_loading">Loading. Please wait.</div>');
				$JQ(This).animate({opacity:1},{easing:"swing", queue:false,duration:150, complete:function(){     }});
			 },
			 success: function(data) {
				$JQ(This).animate({opacity:0},{easing:"swing", queue:false,duration:900, complete:function(){
					$JQ(This).html(data);
					
					/* added */
					c_bodywidth=parseInt($JQ('body').attr('offsetWidth'));
					if(c_bodywidth<1000){ c_bodywidth=1000; }
					var c_left=parseInt((c_bodywidth/2)- ($JQ('#layer_slider').attr('offsetWidth')/2 ));/////
					$JQ('#layer_slider').animate({left:c_left}, 60, "linear");
					//$JQ('#layer_slider').css('left',c_left);
					/* added */
					
					
					var c_height=parseInt($JQ(This).attr('offsetHeight'))-parseInt($JQ(This).css('paddingTop'))-parseInt($JQ(This).css('paddingBottom'));
					/*$JQ(This).css('height',0);
					$JQ(This).animate({opacity:1, height:c_height},{easing:"easeOutBounce", queue:false,duration:1800, complete:function(){ $JQ(This).css('height','auto');  }});*/
					
					$JQ(This).animate({opacity:1},{easing:"easeOutBounce", queue:false,duration:1800, complete:function(){ $JQ(This).css('height','auto');  }});
				}}); //animate
				
			 },
			 error: function(){
				$JQ(This).animate({opacity:0},{easing:"swing", queue:false,duration:900, complete:function(){
					$JQ(This).html('<div class="jAjax_error">Unable to load window</div>');
					var c_height=parseInt($JQ(This).attr('offsetHeight'))-parseInt($JQ(This).css('paddingTop'))-parseInt($JQ(This).css('paddingBottom'));
					$JQ(This).animate({opacity:1, height:c_height},{easing:"easeOutBounce", queue:false,duration:1800, complete:function(){ 
						$JQ.sleep(10, function(){
							$JQ(This).animate({opacity:0, height:0},{easing:"swing", queue:false,duration:900, complete:function(){  $JQ(This).hide();  }});
						}); //sleep
						
					}}); //animate
				}}); //animate
			 }
		  });
	}catch(err){ if(DebugQueryMode==true){ alert(' jAjaxIndividual: '+err); }}
}



function jAjax(){
	try{
		elements=$JQ('.jAjax');
		for(i=0;i<elements.length;i++){
			c_href='';
			single=$JQ(elements).eq(i).find('.jAjax_link');
			if(single.length==1){ c_href=$JQ(single).eq(0).attr('href'); }
			if(c_href!='' && c_href !='#'){
				$JQ(elements).eq(i).attr('class','.jAjaxDone');
				jAjaxIndividual($JQ(elements).eq(i),c_href);
			}//if
		}//for
	}catch(err){ if(DebugQueryMode==true){ alert(' jAjax: '+err); }}
}


function jAjaxSliderSet(){
	try{
		var elements = $JQ('a');
		for(i=0;i<=elements.length;i++){
			if($JQ(elements).eq(i).attr('rel')=='jslider'){
				$JQ(elements).eq(i).click(function () {
					var new_href=$JQ(this).attr('href');
					if(new_href=='' || new_href=='#'){ return false; }
					//var new_href='https://myhealthangel01.worldsecuresystems.com/mini/help/programs_faq/my_weight.html';
					//cmsSlideShow(new_href);
					jAjaxSlider(new_href);
					return false;
				});
				
				$JQ(elements).eq(i).bind("ajaxError", function(){
					//$JQ(this).unbind('ajaxError');
					//$JQ(this).unbind('ajaxComplete');
					
					$JQ('#layer_slider').html('<a class="layer_slider_close" href="#"><img src="/bc_graph/shared/empty.gif" alt="" /></a><div class="loading_error" style="display:none">Unable to load page</div>');
					$JQ(".layer_slider_close").click(function () { 
						$JQ('#layer_main').remove();
						return false;
					});
					$JQ('#layer_slider .loading_error').show(100);
					
					//$JQ('#layer_opacity').animate({opacity:0}, 4000,"swing",function() {  });  
					//$JQ('#layer_slider').animate({opacity:0.9}, 2000,"linear",function() {  $JQ('#layer_main').remove(); });  
					return true;
				}).bind("ajaxComplete", function(){
					//$JQ(this).unbind('ajaxError');
					//$JQ(this).unbind('ajaxComplete');
					$JQ('#layer_slider .layer_slider_close').css('opacity',0);	
					$JQ('#layer_slider .layer_slider_close').animate({opacity:1}, 800,"swing");
					return false;
				});
				
				
			}
		}	
		
		
			
	}catch(err){ if(DebugQueryMode==true){ alert(' jAjaxSliderSet: '+err); }}
}

function jAjaxSlider(c_href){
	try{
		//alert('tet');
		var elements=$JQ('#layer_main');
		if(elements.length>0){ return false; }
		$JQ('body').prepend('<div class="layer_main" id="layer_main"></div>');
		$JQ('#layer_main').append('<div class="layer_opacity" id="layer_opacity"></div>');
		$JQ('#layer_main').append('<div class="layer_slider" id="layer_slider" align="center"><a class="layer_slider_close" href="#"><img src="/bc_graph/shared/empty.gif" alt="" /></a></div>');
		
		$JQ('#layer_slider').append('<div class="layer_slider_ajax"><div class="jAjax"><a class="jAjax_link" href="'+c_href+'"></a></div></div>');
		
		$JQ('#layer_slider .layer_slider_close').css('opacity',0);
		/*$JQ('#layer_main').css('height', $JQ('body').attr('scrollHeight'));
		$JQ('#layer_opacity').css('height', $JQ('body').attr('scrollHeight'));*/
		
		$JQ('#layer_main').css('height', $JQ(document).height());
		$JQ('#layer_opacity').css('height', $JQ(document).height());
		//alert($JQ(document).height()+ ' - '+ $JQ('body').attr('scrollHeight'));
		
		var scrolls=getScrollXY();
		var c_top=scrolls[1]+150;
		/*----*/
		//alert(scrolls[1])
		/*----*/
		
		
		$JQ('#layer_slider').animate({top:c_top}, 60, "linear");
		
		$JQ(".layer_opacity").click(function () { 
		  	$JQ('#layer_main').remove();
		  	return false;
		});
		
		$JQ(".layer_slider_close").click(function () { 
		  	$JQ('#layer_main').remove();
		  	return false;
		});
		
		$JQ('#layer_opacity').css('opacity',0);
		//$JQ('#layer_main').show();
		jAjaxSliderPosition();
		$JQ('#layer_opacity').animate({opacity:0.77}, 1000,"swing",function() { jAjax(); }); //animate
		
		
		//$JQ('#layer_main').show(1000, );
		
		
		
	}catch(err){ if(DebugQueryMode==true){ alert(' jAjaxSlider: '+err); }}
}

function jAjaxSliderPosition(){
	try{
		var elements=$JQ('#layer_main');
		if(elements.length!=1){ return false; }
		
		c_bodywidth=parseInt($JQ('body').attr('offsetWidth'));
		if(c_bodywidth<1000){ c_bodywidth=1000; }

		$JQ('#layer_main').css('width',c_bodywidth);
		$JQ('#layer_opacity').css('width',c_bodywidth);
		
		if(parseInt($JQ('.layer_slider_ajax').attr('offsetHeight'))>=430){ 
			$JQ('.layer_slider_ajax').css('padding-right','18px');
		}
		
		var c_left=parseInt((c_bodywidth/2)- ($JQ('#layer_slider').attr('offsetWidth')/2 ));
		//var scrolls=getScrollXY();
		//var c_top=scrolls[1]+150;
		
		//$JQ('#layer_slider').css('left',c_left);
		//$JQ('#layer_slider').css('top',c_top);
		
		$JQ('#layer_slider').animate({left:c_left}, 60, "linear");
		//$JQ('#layer_slider').animate({top:c_top}, 60, "linear");
		
		/*----*/
		//$JQ('#layer_main').css('height', $JQ(document).height());
		$JQ('#layer_opacity').css('height', $JQ(document).height());
		/*----*/
		self.setTimeout("jAjaxSliderPosition('"+'test'+"')", 400);
		
	}catch(err){ if(DebugQueryMode==true){ alert('jAjaxSliderPosition: '+err); }}
}
/* =============================== .jAjax [END] ===================================== */
/* =============================== .SliderMVA [START] =============================== */
function jSliderMVA_Set(event){
	try{
		var IDlink=event.data.IDlink;
		var IDslide=event.data.IDslide;
		
		if(jQuery.data(document.body,IDslide).PERM!=true){ return false; }
		else{ jQuery.data(document.body,IDslide,{PERM:false}); }
		
		
		$JQ('#'+IDlink+' li').attr('class','');
		$JQ('#'+IDlink+' li').eq(event.data.LINKindex).attr('class','active');
		var c_fullwidth=parseInt($JQ('#'+IDslide+' ul').css('width'));
		var c_width=parseInt($JQ('#'+IDslide+' li').eq(0).attr('offsetWidth'));
		var c_left=parseInt($JQ('#'+IDslide+' ul').css('left'));
		
		var c_newlt=event.data.LINKindex*c_width*(-1);
		var c_newheight=$JQ('#'+IDslide+' li').eq(event.data.LINKindex).attr('offsetHeight');
		//$JQ('#'+IDslide+' ul').animate({ left:c_newlt },{easing:"easeOutElastic",duration:1500, queue:false, complete:function(){ jQuery.data(document.body,IDslide,{PERM:true});  }}); 
		//$JQ('#'+IDslide).animate({ height:c_newheight },{easing:"swing",duration:750, queue:false, complete:function(){     }}); //setHeight
		
		/*$JQ('#'+IDslide+' ul').animate({ left:c_newlt },{easing:"easeInOutExpo",duration:1000, queue:false, complete:function(){ jQuery.data(document.body,IDslide,{PERM:true});  }}); */
		$JQ('#'+IDslide).animate({ height:c_newheight },{easing:"swing",duration:750, queue:false, complete:function(){     }}); //setHeight
		
		$JQ('#'+IDslide+' ul').animate({ opacity:0 },{easing:"easeOutSine",duration:400, queue:false, complete:function(){
			$JQ('#'+IDslide+' ul').css('left',c_newlt);
			$JQ('#'+IDslide+' ul').animate({ opacity:1 },{easing:"easeInSine",duration:1000, queue:false, complete:function(){ jQuery.data(document.body,IDslide,{PERM:true});  }}); 
		}}); 
		
		
		return false;
	}catch(err){ if(jDebugMode==true){ alert('jSliderMVA_Set: ' + err); }}
}

function jSliderMVA_Direction(event){
	try{
		var IDlink=event.data.IDlink;
		var c_direction=event.data.Direction;
		
		var elements=$JQ('#'+IDlink+' li');
		var c_active=-1;
		
		for(var i=0;i<elements.length;i++){
			if($JQ(elements).eq(i).attr('class')=='active'){  c_active=i; break; }
		}
		if(c_active==-1){ alert('MVA Error: #50'); return false;  }
		
		switch(c_direction) {
			case 'next': if(c_active<elements.length-1){ c_active+=1; }else{ c_active=0; }  break;
			case 'prev': if(c_active>=1){ c_active-=1; }else{ c_active=elements.length-1; }  break;
			default: return false;
		}
		//alert('ter:'+c_active+' - direction:'+c_direction); 
		if(c_active>=0 && c_active<elements.length){ $JQ(elements).eq(c_active).click(); }
		return false;
	}catch(err){ if(jDebugMode==true){ alert('jSliderMVA_Direction: ' + err); }}
}
			
			
function jSliderMVA(IDprev, IDnext, IDlink, IDslide, Num){
	try{ 
		if(!IDprev || IDprev==''){ return false; }
		if(!IDnext || IDnext==''){ return false; }
		if(!IDlink || IDlink==''){ return false; }
		if(!IDslide || IDslide==''){ return false; }
		if(!Num || Num==''){ Num=-1; }else{ Num=parseInt(Num); }
		
		//alert('test');
		//
		var c_total=$JQ('#'+IDslide+' li').length; //setWidth
		var c_width=parseInt($JQ('#'+IDslide).find('li').eq(0).attr('offsetWidth'));
		var c_height=parseInt($JQ('#'+IDslide).find('li').eq(0).attr('offsetHeight'));
		if(c_total<=0 || c_width<=0){ return false; }

		$JQ('#'+IDslide).animate({ height:c_height },{easing:"swing",duration:750, queue:false, complete:function(){     }}); //setHeight
		$JQ('#'+IDslide+' ul').css('width',parseInt(c_total*c_width));
		$JQ('#'+IDslide+' ul').css('left',0);
		
		
		
		var elements=$JQ('#'+IDlink+' li');
		$JQ(elements).attr('class','');
		if((Num>0 && Num<elements.length) && (c_total==elements.length)){ 
			$JQ(elements).eq(Num).attr('class','active');
			$JQ('#'+IDslide+' ul').css('left',parseInt((-1)*Num*c_width));
			
		}else{ $JQ(elements).eq(0).attr('class','active'); }
		
		jQuery.data(document.body,IDslide,{PERM:true});
		for(var i=0; i<elements.length; i++){
			$JQ(elements).eq(i).bind("click", {IDprev:IDprev, IDnext:IDnext, IDlink:IDlink, IDslide:IDslide, LINKindex:i}, jSliderMVA_Set);
		}
		
		$JQ('#'+IDprev).bind("click", {IDprev:IDprev, IDnext:IDnext, IDlink:IDlink, IDslide:IDslide, Direction:'prev'}, jSliderMVA_Direction);
		$JQ('#'+IDnext).bind("click", {IDprev:IDprev, IDnext:IDnext, IDlink:IDlink, IDslide:IDslide, Direction:'next'}, jSliderMVA_Direction);
		
		jItemHoverAnimation(IDprev);
		jItemHoverAnimation(IDnext);
		//alert($JQ('#'+IDslide+' ul').css('width'));
		//for(var i=0;i<elements.length;i++){
			
		//}
		
		
	}catch(err){ if(jDebugMode==true){ alert('jSliderMVA: ' + err); }}
}

/* =============================== .SliderMVA [END] ================================= */
/* =============================== .SliderMVA2 [START] ============================== */
function jSliderMVA2_Set(event){
	try{
		var IDlink=event.data.IDlink;
		var IDslide=event.data.IDslide;
		
		if(jQuery.data(document.body,IDslide).PERM!=true){ return false; }
		else{ jQuery.data(document.body,IDslide,{PERM:false}); }
		
		
		$JQ('#'+IDlink+' li').attr('class','');
		$JQ('#'+IDlink+' li').eq(event.data.LINKindex).attr('class','active');
		var c_fullwidth=parseInt($JQ('#'+IDslide+' .ul2').css('width'));
		var c_width=parseInt($JQ('#'+IDslide+' .li2').eq(0).attr('offsetWidth'));
		var c_left=parseInt($JQ('#'+IDslide+' .ul2').css('left'));
		
		var c_newlt=event.data.LINKindex*c_width*(-1);
		var c_newheight=$JQ('#'+IDslide+' .li2').eq(event.data.LINKindex).attr('offsetHeight');
		//$JQ('#'+IDslide+' ul').animate({ left:c_newlt },{easing:"easeOutElastic",duration:1500, queue:false, complete:function(){ jQuery.data(document.body,IDslide,{PERM:true});  }}); 
		//$JQ('#'+IDslide).animate({ height:c_newheight },{easing:"swing",duration:750, queue:false, complete:function(){     }}); //setHeight
		
		//$JQ('#'+IDslide+' .ul2').animate({ left:c_newlt },{easing:"easeInOutExpo",duration:1000, queue:false, complete:function(){ jQuery.data(document.body,IDslide,{PERM:true});  }}); 
		$JQ('#'+IDslide+' .ul2').animate({ opacity:0 },{easing:"easeOutSine",duration:300, queue:false, complete:function(){
			$JQ('#'+IDslide+' .ul2').css('left',c_newlt);
			$JQ('#'+IDslide+' .ul2').animate({ opacity:1 },{easing:"easeInSine",duration:700, queue:false, complete:function(){ jQuery.data(document.body,IDslide,{PERM:true});  }}); 
		}}); 
		$JQ('#'+IDslide).animate({ height:c_newheight },{easing:"swing",duration:750, queue:false, complete:function(){     }}); //setHeight
		//easeInOutExpo
		//alert(c_active);
		return false;
	}catch(err){ if(jDebugMode==true){ alert('jSliderMVA2_Set: ' + err); }}
}

function jSliderMVA2_Direction(event){
	try{
		var IDlink=event.data.IDlink;
		var c_direction=event.data.Direction;
		
		var elements=$JQ('#'+IDlink+' li');
		var c_active=-1;
		
		for(var i=0;i<elements.length;i++){
			if($JQ(elements).eq(i).attr('class')=='active'){  c_active=i; break; }
		}
		if(c_active==-1){ alert('MVA2 Error: #50'); return false;  }
		
		switch(c_direction) {
			case 'next': if(c_active<elements.length-1){ c_active+=1; }else{ c_active=0; }  break;
			case 'prev': if(c_active>=1){ c_active-=1; }else{ c_active=elements.length-1; }  break;
			default: return false;
		}
		//alert('ter:'+c_active+' - direction:'+c_direction); 
		if(c_active>=0 && c_active<elements.length){ $JQ(elements).eq(c_active).click(); }
		return false;
	}catch(err){ if(jDebugMode==true){ alert('jSliderMVA2_Direction: ' + err); }}
}
			
			
function jSliderMVA2(IDprev, IDnext, IDlink, IDslide, Num){
	try{ 
		if(!IDprev || IDprev==''){ return false; }
		if(!IDnext || IDnext==''){ return false; }
		if(!IDlink || IDlink==''){ return false; }
		if(!IDslide || IDslide==''){ return false; }
		if(!Num || Num==''){ Num=-1; }else{ Num=parseInt(Num); }
		
		//alert('test');
		//
		var c_total=$JQ('#'+IDslide+' .li2').length; //setWidth
		var c_width=parseInt($JQ('#'+IDslide).find('.li2').eq(0).attr('offsetWidth'));
		if(Num>-1){ var c_height=parseInt($JQ('#'+IDslide).find('.li2').eq(Num).attr('offsetHeight')); }
		else{ var c_height=parseInt($JQ('#'+IDslide).find('.li2').eq(0).attr('offsetHeight')); }
		if(c_total<=0 || c_width<=0){ return false; }

		$JQ('#'+IDslide).animate({ height:c_height },{easing:"swing",duration:750, queue:false, complete:function(){     }}); //setHeight
		$JQ('#'+IDslide).find('.ul2').eq(0).css('width',parseInt(c_total*c_width));
		$JQ('#'+IDslide).find('.ul2').eq(0).css('left',0);
		
		
		
		var elements=$JQ('#'+IDlink+' li');
		$JQ(elements).attr('class','');
		if((Num>0 && Num<elements.length) && (c_total==elements.length)){ 
			$JQ(elements).eq(Num).attr('class','active');
			$JQ('#'+IDslide+' .ul2').css('left',parseInt((-1)*Num*c_width));
			
		}else{ $JQ(elements).eq(0).attr('class','active'); }
		
		jQuery.data(document.body,IDslide,{PERM:true});
		for(var i=0; i<elements.length; i++){
			$JQ(elements).eq(i).bind("click", {IDprev:IDprev, IDnext:IDnext, IDlink:IDlink, IDslide:IDslide, LINKindex:i}, jSliderMVA2_Set);
		}
		
		$JQ('#'+IDprev).bind("click", {IDprev:IDprev, IDnext:IDnext, IDlink:IDlink, IDslide:IDslide, Direction:'prev'}, jSliderMVA2_Direction);
		$JQ('#'+IDnext).bind("click", {IDprev:IDprev, IDnext:IDnext, IDlink:IDlink, IDslide:IDslide, Direction:'next'}, jSliderMVA2_Direction);
		
		jItemHoverAnimation(IDprev);
		jItemHoverAnimation(IDnext);
		//alert($JQ('#'+IDslide+' ul').css('width'));
		//for(var i=0;i<elements.length;i++){
			
		
		var c_found=false;
		for(var i=0; i<GlobalMVA2Change.length; i++){
			if(GlobalMVA2Change[i]==IDslide){ c_found=true; break; }
		}
		if(c_found==false){
			//alert('sleeper');
			GlobalMVA2Change[GlobalMVA2Change.length]=IDslide;
			jSliderMVA2_Change(IDlink, IDslide);
		}
		//alert(GlobalMVA2Change[0].IDlink);
	}catch(err){ if(jDebugMode==true){ alert('jSliderMVA2: ' + err); }}
}

var GlobalMVA2Change=new Array();
function jSliderMVA2_Change(IDlink, IDslide){
	try{
		if(!IDlink || IDlink==''){ return false; }
		if(!IDslide || IDslide==''){ return false; }
		//alert('test');
		
		elements=$JQ('#'+IDlink+' li');
		var c_found=false;
		for(var i=0; i<elements.length; i++){
			if($JQ(elements).eq(i).attr('class')=='active'){ c_found=true; break; }
		}
		
		if(c_found==true){
			var c_height=parseInt($JQ('#'+IDslide).find('.li2').eq(i).attr('offsetHeight')); 
			$JQ('#'+IDslide).animate({ height:c_height },{easing:"swing",duration:750, queue:false, complete:function(){ self.setTimeout("jSliderMVA2_Change('"+IDlink+"','"+IDslide+"')", 1000);  }}); //setHeight
		}else{ self.setTimeout("jSliderMVA2_Change('"+IDlink+"','"+IDslide+"')", 1000); }
		
	}catch(err){ if(jDebugMode==true){ alert('jSliderMVA2_Change: ' + err); }}
}

function jSliderHrefLocation(Addons){
	try{
		if(!Addons || Addons==''){ return false; }
		switch(Addons.charAt(0)){
			case '#': break;
			//case '?': break;
			default: return false;
		}
		
		 var c_url=window.location.toString();
         var c_varexists=c_url.indexOf('#');
		 
		 if(c_varexists>0){
			var c_newurl=c_url.slice(0,c_varexists);
			window.location=c_newurl+Addons;
		 }else{ window.location+=Addons; }
		
		
		return false;
	}catch(err){ if(jDebugMode==true){ alert('jSliderHrefLocation: ' + err); }}
}
/* =============================== .SliderMVA2 [END] ================================ */
/* =============================== .single [START] ================================== */
function jCommentBlogRecreate(mainClass, ID, firstcommentID){
	try{
		var c_name, c_date, c_rate, c_cont, container;
		if($JQ('#tag_commentlist').html()=='{tag_commentlist,date}'){ return false; } //New line, checks if comments are not disabled
		var main=$JQ('.'+mainClass);
		if(main.length>1){ $JQ(main).css('display','none'); return false; }
		$JQ(main).eq(0).css('display','block');
		//var old=$JQ('.comment-container');
		var old=$JQ('.blog-comment-container');
		for(i=0;i<old.length;i++){
			c_flag=$JQ('.blog-comment-container:eq('+i+') .header .flag').html();
			c_name=$JQ('.blog-comment-container:eq('+i+') .header .name').html();
			c_date=$JQ('.blog-comment-container:eq('+i+') .header .date').html();
			c_rate=$JQ('.blog-comment-container:eq('+i+') .header .rating').html();
			c_cont=$JQ('.blog-comment-container .content:eq('+i+')').html();
			
			container='<div class="combox_title"><div class="c_name">' + c_flag + ' ' + c_name + ' ' + c_rate + '</div><div class="c_date">' + c_date + '</div></div>';
			container+='<div class="combox">' + c_cont + '</div>';
			
			$JQ('#'+ID).append(container);
			if(i==0){ $JQ('#'+firstcommentID).html(c_cont); }
		}
		
		if(old.length<=0){ 
			container='<p align="center">Post has no comments.</p>';
			$JQ('#'+ID).append(container);
			$JQ('#'+firstcommentID).html(container);
		}
		
	}catch(err){ if(DebugMode==true){ alert('jCommentBlogRecreate: '+err); }}
}

function jItemHoverAnimation(Name, Duration){
	try{ 
		if(!Name || Name=='' || Name.length<2){ return false; }
		if(!Duration || Duration==''){ Duration=300; }
		
		switch(Name.charAt(0)){
			case '.': break;
			case '#': break;
			default: Name='#'+Name;
		}
		
		$JQ(Name+' img').css('opacity',0);
		$JQ(Name+' img').css('visibility','visible');
		
		$JQ(Name).hover(function(){
			$JQ(this).find('img').eq(0).animate({ opacity:1 },{easing:"swing",duration:Duration, queue:false, complete:function(){    }});
		},function(){
			$JQ(this).find('img').eq(0).animate({ opacity:0 },{easing:"swing",duration:Duration, queue:false, complete:function(){    }});
		});
		
	}catch(err){ if(jDebugMode==true){ alert('jItemHoverAnimation: ' + err); }}
}

/*
function jTopLogin(module_islogged){
	try{
		 if(module_islogged==1){ $JQ('#topbox_login').html('<a id="topbox_loginarea" href="/members/information.html">Members Area</a> (<a id="topbox_loginout" href="/LogOutProcess.aspx">Log out</a>)'); }
	
		return false;
		if(module_isloggedin==1){
			$JQ('#topbox_login').text('Customer Area');
			$JQ('#topbox_login').attr('href','/customer/information.html');
			$JQ('#topbox_login').after('<span style="padding-left:5px;"></span>(<a class=" " style="color:#ebb2b2" href="/LogOutProcess.aspx">Log out</a>)');
		}
	}catch(err){ if(DebugMode==true){ alert('setTopLogin: ' + err); }}
}
*/
/* =============================== .single [END] ==================================== */

$JQ(document).ready( function(){

	
});
/* ================================================================================== */
/* =============================== jquery.ready [END] =============================== */
/* ================================================================================== */

