﻿$(document).ready( function() {
   
  
   //alert($("span.global_helper:eq(1) span:first-child").attr("class"));
   for(var i = 0; i < $("span.global_helper").length; i++)
   {
   //alert($("span.global_helper:eq("+i+") span:first-child").attr("class"));
  //$("span.global_helper:eq("+i+")").html($("span.global_helper:eq("+i+") span:first-child").attr("class"));
        var idClass = $("span.global_helper:eq("+i+") span:first-child").attr("class");
        
        if(idClass != undefined)
        {
        idClass = idClass.replace("helper_", "");
        var loc = "span.global_helper:eq("+i+")";
    
      var holder = GlobalVars[idClass];
      if(holder.indexOf("infoLink") > -1)
      {
         holder = holder.replace("infoLink","infoLink_" + i);
      }
     
     
       $(loc).html(holder);
      }
      
       
      
     
   }
   


   
 $(".edit_close").click(function () {
     var link = "/admin/checkinContent.aspx?id=" + $(".edit_close").attr("rel");
     $.getScript(link,$("#edit_panel").slideToggle());
     var sURL = window.location.href;
     window.location.href = sURL;
     return false;
 });
   
   
$('A[rel="external"]').click( function(e) {
    $(".edit_frame").attr("src",$(this).attr('href'));
    $("html").scrollTop(0);
    $("#edit_panel").slideToggle();
    return false;
});
    
    
$("a.edit").click(function(){
   var id = this.toString();
   id = id.substring(id.lastIndexOf("id="),id.length);
   id=id.replace("id=","");
   $(".edit_close").attr("rel",id) ;
   
   
  
   
}); 
});

function HideCopy(x)
{
x = "#" + x;
$(x).slideToggle();

}


$(document.body).ready(function () {


//PNG FIX
    $('img[@src$=.png]').ifixpng(); 
 });
 
 

