jQuery.noConflict();
jQuery(document).ready(function(){
    doAccordion();
     
    jQuery('#menuboard').snogMenu({
          
        });

})


function doAccordion(){
    jQuery('.answerLink').click(function() {
        jQuery(this).parents('div.questionHolderBottom').next('.answer').slideToggle();
        return false;
    }).next().hide();     
}

function loadFlashPhotos(shopId,setId, divId, styleCode, flashMovie){
    console.log(divId)
    if(shopId && shopId !==""){
        if(jQuery('#'+divId).length){
            switch(flashMovie){
                case 'imageviewer':
                    var flashWidth 		= '520';
                    var flashHeight 	= '245';
                    break;
                default:
                    flashMovie = 'imageViewer';
                    var flashWidth 		= '725';
                    var flashHeight 	= '245';
                    break;				
            }
	

            //alert(styleCode)
            //var flashURL = "http://facebook.ifancyasnog.com/swf/"+flashMovie+".swf?id="+shopId+"&setId="+setId+"&local=1&showdebug=0&styleCode="+styleCode;
            var flashURL = "/swf/"+flashMovie+".swf?id="+shopId+"&setId="+setId+"&local=0&showdebug=0";

            var so = new SWFObject(flashURL, "flashPhotos", flashWidth, flashHeight, "8", "#ffffff");				
            //var so = new SWFObject("http://www.icodesign.co.uk/swf/imgViewer.swf?id="+projectId+"&local=0&showdebug=0", "flashPhotos", flashWidth, flashHeight, "8", "#ffffff");	
            so.addParam("wmode", "transparent");    
            so.write(divId);
			
        //so.write("flashPhotos");	
        }
    }
}

function goToQuickLinkShop(elem) {
    var val = elem.options[elem.selectedIndex].value;
    
    if (val != '') {
        location.href=val;
    }
}    

function launchMusicPlayer() {

    var title = "Snog music";
    
    if (!!window.attachEvent) {
        // because IE doesnt like spaces in window name .... 
        title = "Music"
    }
    
    var newwindow=window.open("/music/snogPlayer.html",title,'width=382,height=322, status=no, toolbar=no,menubar=no,location=no');
    if (window.focus) {
        newwindow.focus()
    }
    return false;
}


