//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/**
 * @package Starweb Webshop System
 * @version See version-file
 * @copyright Copyright (c) 2000 - 2010, Ehandelslogik AB
 * 
 * @author Ehandelslogik AB, org.no 556696-9019  (Starweb)
 *  Country: Sweden
 *  Homepage: www.starweb.se
 *  E-mail: support@starweb.se
 * 
 * License:
 * This program is not "free" software and restrictions apply!
 * This file as well as all other files containing the code to our software may ONLY be used and/or redistributed with written permission from us.
 * You'll find information regarding our conditions and pricing on our homepage. Contact us immediately if any of these conditions are not clear.
 */
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
$(document).ready(function()
{
   // Get: Width / height of browser window
   var iWndWidthNr = 800, iWndHeightNr = 600;
   
   if(parseInt(navigator.appVersion)>3)
   {
      if (navigator.appName=="Netscape")
      {
         iWndWidthNr  = window.innerWidth;
         iWndHeightNr = window.innerHeight;
      }
      if(navigator.appName.indexOf("Microsoft") != -1)
      {
         iWndWidthNr  = document.body.offsetWidth;
         iWndHeightNr = document.body.offsetHeight;
      }
   }
   iWndWidthNr  = iWndWidthNr * 0.8;
   iWndHeightNr = iWndHeightNr * 0.8;
   
   
   
   // Set: Fancybox settings, based on rel
   $("a[rel*=Fancybox_]").livequery(function(e){
      $(this).fancybox({
         "imageScale"         : true,
         "centerOnScroll"     : false,
         "zoomOpacity"        : true,
         "overlayShow"        : true,
         "frameWidth"         : (IsFrameset() == true) ? 560 : 620,
         "frameHeight"        : 520,
         "hideOnContentClick" : false,
         "zoomSpeedIn"        : 0,
         "zoomSpeedOut"       : 0,
         "zoomSpeedChange"    : 100
      });
   });
   $("a[rel=Fancybox_CustNewCustInsert]").livequery(function(e){
      $(this).fancybox({
         "centerOnScroll"     : false,
         "zoomOpacity"        : true,
         "overlayShow"        : true,
         "frameWidth"         : 550,
         "frameHeight"        : 435,
         "hideOnContentClick" : false
      });
   });
   $("a[rel=Fancybox_CustAlreadyCust]").livequery(function(e){
      $(this).fancybox({
         "centerOnScroll"     : false,
         "zoomOpacity"        : true,
         "overlayShow"        : true,
         "frameWidth"         : 550,
         "frameHeight"        : (bIsADMIN_IS_LOADED == true) ? 500 : 400,
         "hideOnContentClick" : false
      });
   });
   $("a[rel=Fancybox_CustLostPwd]").livequery(function(e){
      $(this).fancybox({
         "centerOnScroll"     : false,
         "zoomOpacity"        : true,
         "overlayShow"        : true,
         "frameWidth"         : 550,
         "frameHeight"        : 200,
         "hideOnContentClick" : false
      });
   });
   $("a[rel=Fancybox_Ac_ArtTellFriend]").livequery(function(e){
      $(this).fancybox({
         "centerOnScroll"     : false,
         "zoomOpacity"        : true,
         "overlayShow"        : true,
         "frameWidth"         : 550,
         "frameHeight"        : 500,
         "hideOnContentClick" : false
      });
   });
   $("a[rel=Fancybox_TplPreview]").livequery(function(e){
      $(this).fancybox({
         "centerOnScroll"     : false,
         "zoomOpacity"        : true,
         "overlayShow"        : true,
         "frameWidth"         : iWndWidthNr,
         "frameHeight"        : iWndHeightNr,
         "hideOnContentClick" : false
      });
   });
});