﻿function getColor(className){
	switch(className)
{
case 'color1':
  return '#ffee00';
  break;
case 'color2':
  return '#f3960a';
  break;
case 'color3':
  return '#722e8a';
  break;
case 'color4':
  return '#db225b';
  break;
case 'color5':
  return '#a0c422';
  break;
default:
  return '#ffee00';
  break;

}
}

//Page Animation
$(function() {
    
    // Menu Animation
    var currentColor;
    var currentClass;
    $('#topmenu li').hover(function() {
        currentClass = $(this).attr("class");
        //selector = '#bottom > li.' + currentClass
        //alert(selector);
        currentColor = getColor(currentClass); // $('.' + currentClass).css("background-color");
        $(this).stop().animate({ backgroundColor: "#222" }, 200);
        $(this).children("a").stop().animate({ color: currentColor }, 200);
        $('#menuemph').html($(this).children('a').html());
        //	$('#menuemph').stop().fadeIn(200);
    }, function() {
        $(this).stop().animate({ backgroundColor: currentColor }, 300);
        $(this).children("a").stop().animate({ color: "#222" }, 300);
        $('#menuemph').html('&nbsp;');
        //	$('#menuemph').stop().fadeOut(300);
    });


});


 


// Insert flash function 
$(function () {

    $('div').each(function () {
        if ($(this).attr('id') == 'flash-op') {
            $(this).hide();
            $(this).flash({
                swf: $(this).attr('name'),
                width: $(this).attr('width'),
                height: $(this).attr('height'),
                wmode: 'opaque'
            }).html="";
            $(this).delay(1000).slideDown(500);
         }
        else if ($(this).attr('id') == 'flash-tr') {
            $(this).hide();
            $(this).flash({
                swf: $(this).attr('name'),
                width: $(this).attr('width'),
                height: $(this).attr('height'),
                wmode: 'transparent'
            }).html="";
            $(this).delay(1000).slideDown(500);

        }
        else if ($(this).attr('id') == 'flash-win') {
            $(this).hide();
            $(this).flash({
                swf: $(this).attr('name'),
                width: $(this).attr('width'),
                height: $(this).attr('height'),
                wmode: 'window'
            }).html="";
            $(this).delay(1000).slideDown(500);
       }
    });


});


$(function() {
    var imgsrc;
    $('.buyonlinebutton').hover(function() {
        imgsrc = $(this).attr("src");
        $(this).attr("src", "/build_images/tickets-down.jpg");
        
    }, function() {
    $(this).attr("src", imgsrc);
     });

});
