/* -------------------------------------------------
	BASE JAVASCRIPT
	(c)2007    www.elitemediacompany.com
	Created:   06.12.2008
	Author:    ELITE MEDIA COMPANY LLC
------------------------------------------------- */

$().ready(function()
{
	/* Display a user Flash message */
	$("#FlashNotice").hide().fadeIn();

	$("#FlashNotice a.close").click( function(e){
		e.preventDefault();
		$("#FlashNotice").hide("normal", function() {
			$("#FlashNotice").remove();
		});
	});

	// Open all links with class .oulink or all banners in links page in a new window
	$('.outlink').attr('target', '_blank');
	$('#html_links li a').attr('target', '_blank');

	// Scroll to the errors if there are
	$(".error").each(function(){
		$.scrollTo('.error');
	});

    // Show lightbox (Fancybox) for gallery elements
	$("#gallery a.thumbnail").fancybox({ 'hideOnContentClick': true });

    // Show lightbox (Fancybox) for gallery elements
    $('#mainnav a').hover(
    function() {
		$(this).animate({'lineHeight': '35px'}, 250);
	},
	function() {
		$(this).animate({'lineHeight': '55px'}, 700, 'swing');
	});

});

/* FLV Player */
function createplayer(publicpath, width, height, movie, divID)
{
    var divID = (!divID || divID=='' || divID==null) ? 'player' : divID;

    var s = new SWFObject(publicpath+'/js/flvplayer/flvplayer.swf',"FLVplayer",width,height,"7");
    s.addParam("allowfullscreen","true");
    s.addVariable("image",publicpath+"/images/playvideo.jpg");
    s.addVariable("file",movie);
    s.addVariable("overstretch","fit");
    s.write(divID);
}