﻿/* Replacement calls. Please see documentation for more information. */
//<![CDATA[
    var helveticaneuebold = { src: '/includes/EF/StudentSite/flash/helveticaneuebold.swf' };
    var helveticaNeue = { src: '/includes/EF/StudentSite/flash/helveticaneue.swf' };
    sIFR.useStyleCheck = true;
    sIFR.activate(helveticaneuebold);
                
    //Side Nav                  
    sIFR.replace(helveticaneuebold, {
        selector: '#inThisSection'
        ,css: [
          '.sIFR-root { color:#FFFFFF; font-size:11px; text-transform:uppercase; margin-bottom:3px; }'
        ]
        ,transparent:true
        ,selectable:false
        ,forceSingleLine:true
        ,opaque:true
      });
      
    //H1    
    sIFR.replace(helveticaneuebold, {
        selector: 'h1'
        ,css: [
          '.sIFR-root { padding:0px; margin:0px; font-size:22px; color:#FFAE00; }'
        ]
        ,transparent:true
        ,selectable:false
        ,forceSingleLine:true
        ,opaque:true
    });    
    
    function OpenWindow(url,wname,params) {
        var oWin = window.open(url,wname,params);
        return false;
    }
    function SwapImg(ctrl, img) {
        document.getElementById(ctrl).src = img;
    }
    
    function showlargemap(pageURL,title,w,h) 
    { 
	    var left = (screen.width/2)-(w/2);
        var top = (screen.height/2)-(h/2);
        window.open (pageURL, title, 'toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, copyhistory=no, width='+w+', height='+h+', top='+top+', left='+left);
    }
    
    function closeWin() 
{
	window.close();
}

function printdiv()
{
	window.print();
}

$(document).ready(function(){
//var linkindex = this.getAttribute("href");
//linkindex.indexOf("travel-photos")
if($.browser.msie){
$(".nyroModal").each(function(e){
    var link = $(this).attr("href");
    link = link.indexOf("travel-photos");
    if(link > -1){
        $(this).removeClass("nyroModal").addClass("nyroModalTemp");
    }
});
};

  // Event listeners for nyro links
  $(".nyroModal, .nyroModalTemp").bind("click",function(e){
    var linkindex = this.getAttribute("href");
    // Check to see if travel photos or videos
    if(linkindex.indexOf("travel-photos") > -1){
    
    // catch IE
      if($.browser.msie){
        // Get size of screen to center pop up
        var winleft = (screen.width-615)/2;
        var wintop = (screen.height-635)/2;
        // Pop up
        var mywindow = window.open(linkindex, "", "width=615,height=635,top="+wintop+",left="+winleft+",resizable=0,scrollbars=0,status=1,toolbar=0,menubar=0");    
        // Hide nyromodal from displaying
        //$("#nyroModalFull").hide();
        // Remove nyromodal after a second
        setTimeout(function(){$.nyroModalRemove();}, 1000);
        
        return false;
      
      } else {
        setTimeout(function(){$.nyroModalSettings({width:600,height: 660})}, 0);
      };
    } else if(linkindex.indexOf("travel-videos") > -1){
      
      setTimeout(function(){$.nyroModalSettings({width:750,height: 521})}, 0);
      $("#nyroModalFull").show();
      // Otherwise, ignore this event
    } else {
      return;
    }
  });
});


//]]>