All pastes #2071887 Raw Edit

Miscellany

public text v1 · immutable
#2071887 ·published 2011-05-30 06:10 UTC
rendered paste body
console.log(window.film);
if (window.film == 1){
	console.log($('div.ad-image').children().first().attr("src"));
	var fImg = $('div.ad-image').children().first().attr("src"); 
  if (fImg == 'mnslb.jpg'){
  	$('div.ad-image').addClass('film1').removeClass('film2 film3');
					 	if (window.haveqt2 == true){
  					$('div.film1').live('click', function() {
									    	Shadowbox.open({
									        content:    "film1.html",
									        showMovieControls: false,
									        player:     "iframe",
									        title:      "",
									        height:     "360",
									        width:      "640",
									        handleOversize:	"none"
									    		});
									    	});									    	
									    }else{
									    	// noqt, clicked one
	      		$('div.film1').live('click', function() {
									    	Shadowbox.open({
									        content:    "noqt.html",
									        showMovieControls: false,
									        player:     "iframe",
									        title:      "",
									        height:     "432",
									        width:      "444",
									        handleOversize:	"none"
									    		});
									    	});								    	
									    }// end click
 
									
			}else { // if film2
			if (fImg == 'khwyb.jpg'){
				$('div.ad-image, div#playBut').addClass('film2').removeClass('film1 film3');
    		if (window.haveqt2 == true){

    		$('div.film2').live('click', function() {
					    	Shadowbox.open({
					        content:    "film2.html",
					        showMovieControls: false,
					        player:     "iframe",
					        title:      "",
					        height:     "360",
					        width:      "640",
					        handleOversize:	"none"
					    		});
					    });
					    }else{
    		
    		$('div.film2').live('click', function() {
							    	Shadowbox.open({
							        content:    "noqt.html",
							        showMovieControls: false,
							        player:     "iframe",
							        title:      "",
							        height:     "432",
							        width:      "444",
							        handleOversize:	"none"
							    		});
							    });
							  };  // end click 2
														
					}else{
						// assume film 3
						$('div.ad-image, div#playBut').addClass('film3').removeClass('film1 film2');
						if (window.haveqt2 == true){

	$('div.film3').live('click', function() {
				    	Shadowbox.open({
				        content:    "film3.html",
				        showMovieControls: false,
				        player:     "iframe",
				        title:      "",
				        height:     "540",
				        width:      "960",
				        handleOversize:	"none"
				    		});
				    });
				    
				  }else{
				  	
	$('div.film3').live('click', function() {
    	Shadowbox.open({
        content:    "noqt.html",
        showMovieControls: false,
        player:     "iframe",
        title:      "",
        height:     "432",
        width:      "444",
        handleOversize:	"none"
    		});
    	});   					
		};
						
		};
													
	}