
var mobile = (/iphone|ipod|android|blackberry|mini|windows\sce|palm/i.test(navigator.userAgent.toLowerCase()));  
if (mobile) {  
    if ($.cookie("mobile") == null) {
        $.cookie("mobile", 1, {path: baseUrl});
        location.reload(true);
    }
}

$(document).ready(function() {

    $('.newsDetail').hide();
	$('#newChannelForm').hide();
	$('#reviewerContact').hide();
	$('#authorizedUsers').hide();
    if($(".message"))
        $("div:not(.info).message").animate({opacity: '+=0'}, 5000).fadeOut('slow');	
    if($("#lastname"))
        $("#lastname").select();
    
    if($("#tabs"))
		$("#tabs").tabs();
    if($("#tabs2"))
		$("#tabs2").tabs();
    
	$(".zend_form").each(function (i,elem) {
		$(elem).closest("form").attr("action", "#"+$(elem).closest("div").attr("id"));
	});

    
    
    $("#reviewerContactButton").click(function () {   
     if ($("#reviewerLine").css("height") == "60px") {
    	 $("#reviewerLine").animate({ 
        	 height: 30
          }, 500);
         $("#reviewerContact").hide();   
     } else {
    	 $("#reviewerLine").animate({ 
        	 height: 60
          }, 500);
         $("#reviewerContact").show();      	 
     }
     
       
    });


$(function(){ 
 $('a[href^=#]:not(a[href$=#])').click(function(){
  var $target = $("a[name="+this.hash.substring(1)+"]");
  if($target.size()){
   var top = $target.offset().top;
   var is_chrome = /chrome/.test( navigator.userAgent.toLowerCase() );

   $(($.browser.safari&&!is_chrome) ? 'body' : 'html').animate({scrollTop:top}, 500, 'swing');
   window.location.hash = this.hash;
  }
  return false;
 });
});



    $('.h_check').val(hToken);
    $('#h_check-label, #h_check-element').hide();
  
});

           
function isIE(){
return /msie/i.test(navigator.userAgent) && !/opera/i.test(navigator.userAgent);
}

