﻿//function GetQueryValue(ji) {
//hu = window.location.search.substring(1);
//gy = hu.split("&");
//for (i=0;i<gy.length;i++) {
//ft = gy[i].split("=");
//if (ft[0] == ji) {
//return ft[1];
//}
//}
//}

//function bookmark_us(url, title){

//if (window.sidebar) // firefox
//    window.sidebar.addPanel(title, url, "");
//else if(window.opera && window.print){ // opera
//    var elem = document.createElement('a');
//    elem.setAttribute('href',url);
//    elem.setAttribute('title',title);
//    elem.setAttribute('rel','sidebar');
//    elem.click();
//}
//else if(document.all)// ie
//    window.external.AddFavorite(url, title);
//}

function bookmark_us(url, title){


if (window.sidebar) // firefox
 window.sidebar.addPanel(title, url, "");
else if(window.opera && window.print){ // opera
 var elem = document.createElement('a');
 elem.setAttribute('href',url);
 elem.setAttribute('title',title);
 elem.setAttribute('rel','sidebar');
 elem.click();
}
else if(document.all)// ie
 window.external.AddFavorite(url, title);
} 
 

 $(document).ready(function() {
 
   
      $('.boxBanner').hover(function() {
   
        $(this).addClass('boxBannerHover');
   
      }, function() {
   
        $(this).removeClass('boxBannerHover');
   
      });



AssignMenuLayout();
AssignAccordionTriggers();


        $('.header a').click(function() {
            ResetLinks(this);
        });
 
 });
 
 
 function ResetLinks(image)
 {
 
// $(".header img").removeClass('opened');
// $(".header img").removeClass('hid');
// $(".header img").addClass('hid');
// $(image).addClass('opened');
// $(image).removeClass('hid');
// 

// if($(image).attr('src').match("about") == "about")
// 
// { 
//  $(image).attr('src','/images/accordion/home_about_websafe_hover.gif');

//  }

    $('.header a').removeClass('open');
    $('.header a').removeClass('closed');
    $('.header a').removeClass('hover');
    
    $('.header a').addClass('closed');
    $(image).removeClass('open');
    $(image).removeClass('closed');
    $(image).addClass('open');
    
//      $(image).unbind();
//  AssignAccordionTriggers();
// 
 
 }
 
  function AssignAccordionTriggers()
  {
      
  $(".header a").hover(
  function () {
    if($(this).hasClass('open'))
    {
        //do nothing
    }
    else
    {
        $(this).addClass("hover");
    }
    
  },
  function () {
     if($(this).hasClass('open'))
    {
        //do nothing
    }
    else
    {
        $(this).removeClass("hover");
    }
  }
);
    
    
  
  
  
  
  }
 
 
 
 function AssignMenuLayout()
{

    var locationURL = window.location.href;
  if((locationURL.match("Website-Security") == "Website-Security") || (locationURL.match("WebsiteSecurity") == "WebsiteSecurity"))
  {
    $("a#website").addClass('active');
  }
  
  if(locationURL.match("http://localhost:49170/") == "http://localhost:49170/")
  {
    $("a#home").addClass('active');
  }
  
  if(locationURL.match("Affiliate") == "Affiliate")
  {
    $("a#aff").addClass('active');
  }
  
  if(locationURL.match("Pricing") == "Pricing")
  {
    $("a#price").addClass('active');
  }
  
  if(locationURL.match("Contact") == "Contact")
  {
    $("a#contact").addClass('active');
  }
  
  if(locationURL.match("News/") == "News/")
  {
    $("a#news").addClass('active');
  }
  if(locationURL.match("About") == "About")
  {
    $("a#about").addClass('active');
  }
    if(locationURL.match("/Check") == "/Check")
  {
    $("a#check").addClass('active');
  }
  

}

