// JavaScript Document
jQuery(function($){

// DROP DOWN STYLING

	if (!$.browser.opera) {
		$('select.select').each(function(){
			var title = $(this).attr('title');
			if( $('option:selected', this).val() != ''  ) title = $('option:selected',this).text();
			$(this)
				.css({'z-index':10,'opacity':0,'-khtml-appearance':'none'})
				.after('<span class="select">' + title + '</span>')
				.change(function(){
				val = $('option:selected',this).text();
					$(this).next().text(val);
					})
		});
	};

	$('select').each(function () {
		if($(this).hasClass('error')) {
			$(this).siblings('span.select').addClass('error-select');
		}
	});
	
	<!-- include Cycle plugin -->
	$('.twitter').cycle({
		fx: 'scrollDown', // choose your transition type, ex: fade, scrollUp, shuffle, etc...
		timeout:  6000   // choose your transition type, ex: fade, scrollUp, shuffle, etc...
		}); 
	
	// Menu Animation
	
	$('.menu-button').hover(
		function() {
			$(this).parents('.menus').find('.hand-container img').stop().animate({ 
			  	marginLeft: "20px"
			}, 500 );
		},
		function() {
			$(this).parents('.menus').find('.hand-container img').stop().animate({ 
			  	marginLeft: "0px"
			}, 500 );
			//out
		});
	
	
	//Gallery Dragable
	
	var firstimage = $('ul.gallery li a:first').attr('href');
	$('#main-image').append('<img src="'+firstimage+'" alt="drag and drop" width="467" height="264" class="png_bg" title="drag and drop"/>')
	
	
	$('ul.gallery li').draggable({
			containment: $('.main-content'),
			"revert": true,
			start:function(){
				linkURL=$(this).children('a').attr('href');
			}
		})

		$('#main-image').droppable({
			accept: "ul.gallery li",
			drop: function() {
				$(this).append('<img src="'+linkURL+'" alt="drag and drop" width="467" height="264" class="png_bg" title="drag and drop" style="display:none" />')
				$('#main-image img:not(":visible")').preload({
					onRequest:function(){
						
					}, onFinish:function(){
						$('#main-image img:not(":visible")').fadeIn(1000, function(){
							$('#main-image img:first').remove();
						});
					}
				});
			}
		})
	
	//Music Listings Accordian
	
	$('.music-listing-weekly #first').show();
	
	$('.accordian-content').hide();
	$('.accordian-wrap #first').show();
	$('.week-btn:first').addClass('on');

	//ACCORDION BUTTON ACTION (ON CLICK DO THE FOLLOWING)
	$('.week-btn').click(function() {

		//REMOVE THE ON CLASS FROM ALL BUTTONS
		$('.week-btn').removeClass('on');

		//NO MATTER WHAT WE CLOSE ALL OPEN SLIDES
	 	$('.accordian-content').slideUp('normal');

		//IF THE NEXT SLIDE WASN'T OPEN THEN OPEN IT
		

			//ADD THE ON CLASS TO THE BUTTON
			$(this).addClass('on');

			//OPEN THE SLIDE
			$(this).parent('.accordian-btn').next().slideDown('normal');
	 });



/*$(".week-btn").click(function(e){
	e.preventDefault();		
	
	artId = $(this).attr("class");

	if ($("#faq-main article p."+artId).is(":visible")) {
		$("#faq-main article p:visible").slideUp();
	} else{
		$("#faq-main article p:visible").slideUp();
		$("#faq-main article p."+artId).slideDown();
		jQuery.get($(this).attr('href'));
	}
	return false;
});
*/


});//end jquery
