﻿// Gallery tooltip plugin
/*function armtip(selector, selectname, atrribute){
jQuery(selector).each(function(i){
			if (jQuery(this).attr(atrribute) != ""){
				
			jQuery("#left-col").append("<div class='"+selectname+"' id='"+selectname+i+"'><div><img class='tooltipimg' src='"+jQuery(this).attr(atrribute)+"' alt='' width='100%' height='100%' /></div></div>");
			
			jQuery(this).mouseover(function(e){
					jQuery("#"+selectname+i).css({display:"none", visibility:"visible"}).fadeIn(400);
			}).mousemove(function(e){
					jQuery("#"+selectname+i).css({left:e.pageX+35, top:e.pageY+35});
			}).mouseout(function(){
					jQuery("#"+selectname+i).css({visibility:"hidden"});				  
			});
			
			
			}
		});
 	}*/

//Prevent conflicts with other  js frameworks
var $jq = jQuery.noConflict();

// News image opacity from 0.5 to 1 and stay there
$jq(document).ready(function() {
			$jq('.news_info img').animate({'opacity': .5});
			$jq('.news_info img').hover(function(){
				$jq(this).stop().animate({'opacity': 1});
			});
});

$jq(document).ready(function() {
		 // Remove last article_separator from content
	 $jq(".inner .article_separator:last").addClass("last");
});

// Media > Audio [ td altering for songlist ]
$jq(document).ready(function() {	
	 $jq('table tr.audio_base:odd').addClass('odd');
});

// All contact form tooltip 
$jq(document).ready(function(){		
	                         $jq('.link a').tooltip({
							    track: true, delay: 0, showURL: false, opacity: 1, fixPNG: true, fade:200, left:-10
							});
});

// Toggler for AUDIO category (up and down)
$jq(document).ready(function(){
	// Lounch toggler 1	
	$jq('div.toggler-1').css({"display":"none"});
   $jq('div.toggler-1').toggleElements();	
});

function play(file,title,length,banner,cover,terms)
{
  var popup=window.open('','name','height=220,width=500');
  
  popup.document.write('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">\n');
  popup.document.write('<html><head><title>'+ title +'</title>\n');
  popup.document.write('<link rel="stylesheet" href="http://www.hofpro.com/files/css/popup/style.css">\n');
  popup.document.write('<script src="http://www.hofpro.com/files/tv/swfobject.js" type="text/javascript"/></script>\n');
  popup.document.write('</head>\n<body>\n');
  popup.document.write('<div id="wraper"><div class="head"><img src="/files/logo.png" alt="HOF Pro logo" /></div><div id="banner">');
  popup.document.write('<object width="230" height="47"><param name="movie" value="http://www.hofpro.com/images/stories/audio/images/'+banner+'"><embed src="http://www.hofpro.com/images/stories/audio/images/'+banner+'" width="230" height="47"></embed></object>\n');
  popup.document.write('</div><div class="clear"></div>\n');
  popup.document.write('<div class="content"><h1>'+title+'</h1><h2>'+length+'</h2><div class="cover"><img src="http://www.hofpro.com/images/stories/audio/images/'+cover+'" alt="Cover image" /></div>');
  popup.document.write('<object class="denvideo" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" style="width: 60px; height: 12px;">\n');
  popup.document.write('<param value="http://hofpro.com/plugins/content/denvideo/jwplayer.swf" name="movie"/>\n');
  popup.document.write('<param value="transparent" name="wmode"/>\n');
  popup.document.write('<param value="file=http://hofpro.com/images/stories/audio/'+file+'&&skin=/plugins/content/denvideo/stylish.swf" name="flashvars"/>\n');
  popup.document.write('<param value="high" name="quality"/>\n');
  popup.document.write('<param value="false" name="menu"/>\n');
  popup.document.write('<param value="true" name="allowfullscreen"/>\n');
  popup.document.write('<param value="always" name="allowscriptaccess"/>\n');
  popup.document.write('<object class="denvideo" type="application/x-shockwave-flash" data="http://hofpro.com/plugins/content/denvideo/jwplayer.swf" style="width: 60px; height: 12px;">\n');
  popup.document.write('<param value="transparent" name="wmode"/>\n');
  popup.document.write('<param value="file=http://hofpro.com/images/stories/audio/'+file+'&&skin=/plugins/content/denvideo/stylish.swf" name="flashvars"/>\n');
  popup.document.write('<param value="high" name="quality"/>\n');
  popup.document.write('<param value="false" name="menu"/>\n');
  popup.document.write('<param value="true" name="allowfullscreen"/>\n');
  popup.document.write('<param value="always" name="allowscriptaccess"/>\n');
  popup.document.write('<a href="http://www.adobe.com/go/getflashplayer">\n');
  popup.document.write('<img style="border: medium none ;" alt="Get Adobe Flash player" src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif"/></a>\n');
  popup.document.write('</div><div class="terms"><h3>Информация о приобретении этого CD <a target="_blank" href="'+terms+'">здесь</a></h3></div><div class="clearthem"></div><div class="alink"><a onclick="window.close()" href="#">закрыть окно</a></div></div>');
  popup.document.write('</body>\n</html>');
  popup.document.close();
}

// Gallery tooltip (holder,cssname off tooltip,attribute)
/*$jq(document).ready(function(){
   armtip('.thumbnail-bg a, .thumbnail a', 'tooltip_image', 'href');
   });*/