// Перенос

// head.tmpl.html
$(document).ready( function(){
    $('.lightgallery a').each ( function() {
	$(this).lightBox({
	    imageLoading: '/published/SC/html/scripts/images/lightbox-ico-loading.gif',
	    imageBtnClose: '/published/SC/html/scripts/images/lightbox-btn-close.gif',
	    imageBtnPrev: '/published/SC/html/scripts/images/lightbox-btn-prev.gif',
	    imageBtnNext: '/published/SC/html/scripts/images/lightbox-btn-next.gif',
	});
    });

    $('a[rel=lightbox]').each ( function() {
	$(this).lightBox({
	    imageLoading: '/published/SC/html/scripts/images/lightbox-ico-loading.gif',
	    imageBtnClose: '/published/SC/html/scripts/images/lightbox-btn-close.gif',
	    imageBtnPrev: '/published/SC/html/scripts/images/lightbox-btn-prev.gif',
	    imageBtnNext: '/published/SC/html/scripts/images/lightbox-btn-next.gif',
	});
    });

    $("a.fancybox").fancybox({
        'titlePosition'	: 'inside'
    });



});

// images/tm/head.js

function open_window(link,w,h) {
  var win = "width="+w+",height="+h+",menubar=no,location=no,resizable=yes,scrollbars=yes";
  newWin = window.open(link,'newWin',win);
  newWin.focus(); }
function open_printable_version(link) {
  var win = "menubar=no,location=no,resizable=yes,scrollbars=yes";
  newWin = window.open(link,'perintableWin',win);
  newWin.focus(); }
function confirmDelete(id, ask, url) {
  temp = window.confirm(ask);
  if (temp) {window.location=url+id;}}
function confirmUnsubscribe() {
  temp = window.confirm('{/literal}{$smarty.const.QUESTION_UNSUBSCRIBE}{literal}');
  if (temp) {window.location="index.php?killuser=yes";}}
function validate() {
  if (document.subscription_form.email.value.length<1) {alert("{/literal}{$smarty.const.ERROR_INPUT_EMAIL}{literal}"); return false;}
  if (document.subscription_form.email.value == 'Email') {alert("{/literal}{$smarty.const.ERROR_INPUT_EMAIL}{literal}"); return false;}
  return true;}
function validate_disc() {
  if (document.formD.nick.value.length<1) {alert("{/literal}{$smarty.const.ERROR_INPUT_NICKNAME}{literal}"); return false;}
  if (document.formD.topic.value.length<1) {alert("{/literal}{$smarty.const.ERROR_INPUT_MESSAGE_SUBJECT}{literal}"); return false;}
  return true;}
function validate_search() {
  if (document.Sform.price1.value!="" && ((document.Sform.price1.value < 0) || isNaN(document.Sform.price1.value))) {
    alert("{/literal}{$smarty.const.ERROR_INPUT_PRICE}{literal}"); return false;}
  if (document.Sform.price2.value!="" && ((document.Sform.price2.value < 0) || isNaN(document.Sform.price2.value))) {
    alert("{/literal}{$smarty.const.ERROR_INPUT_PRICE}{literal}"); return false; }
  return true;}
function showBlock() {
  document.getElementById('loginpanel').style.display='block';
  document.getElementById('loginpanel').focus(); }
function hideBlock() {
  document.getElementById('loginpanel').style.display='none'; }
function showBlock() {
  document.getElementById('loginpanel2').style.display='block';
  document.getElementById('loginpanel2').focus(); }
function hideBlock() {
  document.getElementById('loginpanel2').style.display='none'; }
function _changeCurrency() {
  document.ChangeCurrencyForm.submit();}
/*
  hs.graphicsDir = '../../highslide/graphics/';
  hs.outlineType = 'outer-glow';
  hs.wrapperClassName = 'outer-glow';
*/

